/* Public pages of the COUPONS.DE MCP server: the documentation and the privacy policy. */

@font-face {
    font-family: "Aller";
    src: url("fonts/aller-regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* COUPONS.DE: coupon red, slate ink, a cool tray for the coupons to sit on. */
    --red: #d03b21;
    --red-ink: #b5321b;
    --ink: #2e3b3d;
    --ink-2: #4d6266;
    --ground: #eef2f2;
    --paper: #fff;
    --rule: #d3dde0;
    --code-bg: #26363a;
    --code-ink: #e6eef0;

    --display: "Aller", "Trebuchet MS", sans-serif;
    --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --wrap: 70rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --radius: 10px;

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 1.5rem;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 400 1.0625rem/1.6 var(--text);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--red);
    color: #fff;
}

a {
    color: var(--red-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 3px;
}

img,
svg {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.15;
    text-wrap: balance;
}

p,
li,
dd {
    text-wrap: pretty;
}

code,
kbd,
pre {
    font-family: var(--mono);
    font-size: 0.9em;
}

:not(pre) > code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--ground);
    overflow-wrap: anywhere;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: #fff;
}

.skip:focus {
    top: 1rem;
}

/* Bar --------------------------------------------------------------------- */

.bar {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

.bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0.9rem var(--gutter);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    width: clamp(132px, 30vw, 170px);
    height: auto;
}

.brand__product {
    padding-left: 0.85rem;
    border-left: 1px solid var(--rule);
    font-family: var(--display);
    font-size: 1.05rem;
    line-height: 1;
    white-space: nowrap;
}

.lang {
    display: flex;
    gap: 0.25rem;
}

.lang a {
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    color: var(--ink-2);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.lang a:hover {
    background: var(--ground);
    color: var(--ink);
}

.lang a[aria-current="page"] {
    background: var(--ink);
    color: #fff;
}

/* Hero: the red field with the voucher --------------------------------------- */

.hero {
    background: var(--red);
    color: #fff;
}

.hero__inner {
    display: grid;
    gap: 2.5rem;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(2.75rem, 6vw, 4.5rem);
}

@media (min-width: 64rem) {
    .hero__inner {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: clamp(2.5rem, 5vw, 4.5rem);
        align-items: end;
    }
}

.hero__main {
    min-width: 0;
}

.hero h1 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2.35rem, 1.4rem + 4.4vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
}

.hero__lede {
    max-width: 38rem;
    margin: 1.25rem 0 0;
    font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
    line-height: 1.5;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
}

.hero__facts li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero__facts svg {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
}

.hero :focus-visible {
    outline-color: #fff;
}

/* The voucher is white paper on the red field, so its focus ring goes back to ink. */
.hero .voucher :focus-visible {
    outline-color: var(--ink);
}

/* The voucher: a coupon box as on COUPONS.DE, with punched notches. */
.voucher {
    --notch: 0.85rem;
    position: relative;
    max-width: 44rem;
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding: 0.6rem;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 18px 40px -22px rgb(60 14 4 / 0.55);
}

.voucher::before,
.voucher::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(var(--notch) * 2);
    height: calc(var(--notch) * 2);
    margin-top: calc(var(--notch) * -1);
    border-radius: 50%;
    background: var(--red);
}

.voucher::before {
    left: calc(var(--notch) * -1);
}

.voucher::after {
    right: calc(var(--notch) * -1);
}

.voucher__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.25rem 1rem 1.5rem;
    border: 2px dashed var(--red);
    border-radius: calc(var(--radius) - 4px);
}

.voucher__text {
    flex: 1 1 18rem;
    min-width: 0;
}

.voucher__label {
    margin: 0;
    color: var(--ink-2);
    font-family: var(--display);
    font-size: 1rem;
}

.voucher__url {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--mono);
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
    font-weight: 600;
    overflow-wrap: anywhere;
    user-select: all;
    padding: 0;
    background: none;
}

/* Buttons ---------------------------------------------------------------- */

.copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border: 0;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font: 600 1rem/1.2 var(--text);
    cursor: pointer;
    transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.copy:hover {
    background: var(--red-ink);
}

.copy:active {
    transform: translateY(1px);
}

.copy svg {
    width: 1.1rem;
    height: 1.1rem;
}

.copy[data-state="done"] {
    background: var(--ink);
}

.copy--small {
    padding: 0.4rem 0.7rem;
    border: 1px solid rgb(255 255 255 / 0.35);
    background: transparent;
    font-size: 0.85rem;
}

.copy--small:hover {
    background: rgb(255 255 255 / 0.12);
}

.copy--small[data-state="done"] {
    background: rgb(255 255 255 / 0.18);
}

/* Adding the connector in Claude, in Claude's own colours: its spark (claude.svg, from
   claude.ai) on warm black in the sheet, on ivory with the field lift on the red field. The
   only button that leaves the site, so its arrow points away; on hover the spark turns. */
.button {
    --claude-ink: #141413;
    --claude-ivory: #faf9f5;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3rem;
    padding: 0.65rem 1.05rem 0.65rem 0.85rem;
    border-radius: 8px;
    background: var(--claude-ink);
    color: var(--claude-ivory);
    font: 600 1.05rem/1.2 var(--text);
    letter-spacing: 0.005em;
    text-decoration: none;
    transition: background-color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
}

.button:hover {
    background: #2b2a27;
    color: var(--claude-ivory);
}

.button:active {
    transform: translateY(1px);
}

.button img {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover img,
.button:focus-visible img {
    transform: rotate(30deg);
}

.button svg {
    flex: none;
    width: 0.9rem;
    height: 0.9rem;
    margin-left: 0.1rem;
    opacity: 0.65;
    transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.button:hover svg {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* On the red field: ivory paper with the field lift, like the voucher below it. */
.button--light {
    background: var(--claude-ivory);
    color: var(--claude-ink);
    box-shadow: 0 18px 40px -22px rgb(60 14 4 / 0.55);
}

.button--light:hover {
    background: #fff;
    color: var(--claude-ink);
    box-shadow: 0 20px 44px -20px rgb(60 14 4 / 0.6);
}

/* Read out, not shown: "opens in a new tab" on the Claude button. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.hero__actions {
    margin: 1.75rem 0 1.5rem;
}

/* In the hero it is the first thing to do, so it is a step larger than in the steps. */
.hero__actions .button {
    min-height: 3.35rem;
    padding: 0.75rem 1.25rem 0.75rem 1rem;
    font-size: 1.12rem;
}

.hero__actions .button img {
    width: 1.55rem;
    height: 1.55rem;
}

.sheet .hero__actions,
.sheet .button-row {
    margin: 0 0 1.25rem;
}


/* The cut line under the red field, cut by the scissors once on load. */
.cut {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 1.4rem var(--gutter) 0;
}

.cut__track {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 2rem;
    border-bottom: 0;
    background: linear-gradient(90deg, var(--red) 55%, transparent 0) 0 50% / 14px 2px repeat-x;
    animation: cut 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.cut__track img {
    width: 2rem;
    height: 2rem;
    margin-right: -0.6rem;
    transform: rotate(-112deg);
    background: var(--ground);
}

@keyframes cut {
    from {
        width: 2rem;
    }

    to {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cut__track {
        animation: none;
    }

    .copy,
    .button,
    .button img,
    .button svg {
        transition: none;
    }
}

/* Page layout ------------------------------------------------------------- */

.page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 1.5rem var(--gutter) 4rem;
}

@media (min-width: 60rem) {
    .page {
        grid-template-columns: 13rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }

    .toc {
        position: sticky;
        top: 1.5rem;
    }
}

.toc h2 {
    margin: 0 0 0.6rem;
    color: var(--ink-2);
    font-family: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

.toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc a {
    display: block;
    padding: 0.35rem 0 0.35rem 0.85rem;
    border-left: 2px solid var(--rule);
    color: var(--ink);
    text-decoration: none;
}

.toc a:hover {
    border-left-color: var(--red);
    color: var(--red-ink);
}

.sheet {
    min-width: 0;
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border-radius: var(--radius);
    background: var(--paper);
}

/* The brand's cut line divides the column into its parts, as it cuts the page from the red field. */
.sheet > section + section {
    margin-top: clamp(2.25rem, 4.5vw, 3.25rem);
    padding-top: clamp(2.25rem, 4.5vw, 3.25rem);
    background: linear-gradient(90deg, var(--red) 55%, transparent 0) 0 0 / 14px 2px space no-repeat;
}

.sheet h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.35rem);
}

.sheet h3 {
    margin: 2.5rem 0 0.75rem;
    font-size: 1.4rem;
}

.sheet p,
.sheet ul,
.sheet ol,
.sheet dl {
    max-width: 40rem;
}

.sheet p {
    margin: 0 0 1rem;
}

.note {
    color: var(--ink-2);
    font-size: 0.95rem;
}

/* Smaller text, same measure as the body text. */
.sheet .note {
    max-width: 36rem;
}

/* Setup steps: a real sequence, so they are numbered. */
.steps {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    min-height: 2rem;
    padding-left: 2.85rem;
    counter-increment: step;
}

.steps li + li {
    margin-top: 0.85rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -0.05rem;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 2px dashed var(--red);
    border-radius: 50%;
    color: var(--red-ink);
    font-family: var(--display);
    font-size: 1rem;
    line-height: 1;
}

.ui {
    font-weight: 600;
}

/* Code -------------------------------------------------------------------- */

.code {
    position: relative;
    max-width: 44rem;
    margin: 0 0 1.25rem;
    border-radius: 8px;
    background: var(--code-bg);
    color: var(--code-ink);
}

.code__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
    color: #b9c7c4;
    font-size: 0.85rem;
}

.code pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.55;
    scrollbar-color: #6f8589 transparent;
}

/* On narrow screens code wraps instead of hiding its end. */
@media (max-width: 40rem) {
    .code--wrap pre {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
}

.code ::selection {
    background: #f2b5a6;
    color: var(--ink);
}

/* Example chat -------------------------------------------------------------- */

.prompts {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prompts li {
    justify-self: start;
    max-width: 100%;
    padding: 0.55rem 1rem;
    border-radius: 1.2rem 1.2rem 1.2rem 0.3rem;
    background: var(--ground);
}

.chat {
    max-width: 34rem;
    margin: 0;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
    box-shadow: 0 18px 40px -22px rgb(60 14 4 / 0.55);
}

.chat__user {
    width: fit-content;
    max-width: 85%;
    margin: 0 0 1rem auto;
    padding: 0.6rem 1rem;
    border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
    background: var(--ink);
    color: #fff;
}

.chat__answer p {
    margin: 0 0 0.75rem;
}

.chat__answer p:last-child {
    margin-bottom: 0;
}

.chip {
    display: inline-block;
    padding: 0.05em 0.45em;
    border: 2px dashed var(--red);
    border-radius: 5px;
    font-family: var(--mono);
    font-size: 0.92em;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.chat figcaption {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-2);
    font-size: 0.9rem;
    text-wrap: pretty;
}

/* Tools ------------------------------------------------------------------- */

.tools {
    margin: 0;
}

.tools dt {
    margin-top: 1.75rem;
    font-family: var(--display);
    font-size: 1.3rem;
}

.tools dt code {
    margin-left: 0.4rem;
    font-size: 0.8rem;
    vertical-align: 0.15em;
}

.tools dd {
    margin: 0.4rem 0 0;
}

.table {
    max-width: 44rem;
    margin: 1.25rem 0 0;
    overflow-x: auto;
    scrollbar-color: var(--rule) transparent;
}

/* The table scrolls, so identifiers in it stay whole. */
.table code {
    overflow-wrap: normal;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

caption {
    padding-bottom: 0.5rem;
    color: var(--ink-2);
    font-weight: 600;
    text-align: left;
}

th,
td {
    padding: 0.6rem 0.75rem 0.6rem 0;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--ink-2);
    font-weight: 600;
}

td:first-child {
    white-space: nowrap;
}

/* Privacy page ------------------------------------------------------------ */

.page--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 52rem;
}

.page--single h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
}

/* Footer ------------------------------------------------------------------ */

.foot {
    border-top: 1px solid var(--rule);
    color: var(--ink-2);
    font-size: 0.95rem;
}

.foot__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 1.75rem var(--gutter) 2.5rem;
}

.foot p {
    margin: 0;
}

.foot ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.foot a {
    color: var(--ink);
}

/* On narrow screens the footer stacks and centres. */
@media (max-width: 40rem) {
    .foot__inner {
        flex-direction: column;
        text-align: center;
    }

    .foot ul {
        justify-content: center;
    }
}

[hidden] {
    display: none !important;
}

/* A link as it appears in an assistant's answer, shown in the example only. */
.link {
    color: var(--red-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.page--single h2 {
    margin-top: 2.5rem;
    font-size: 1.5rem;
}
