:root {
    --ink: #172033;
    --paper: #e7edf2;
    --sheet: #fbfcfd;
    --line: #c5d0da;
    --stamp: #8c2f27;
    --mute: #3e4c5a;
    --pine: #e5f2ea;
    --warn: #fde8e4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Schibsted Grotesk", "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.45;
}

a { color: inherit; }

img { max-width: 100%; }

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 2px;
}

.bar,
main,
.colophon {
    width: min(1080px, calc(100% - 32px));
    margin-inline: auto;
}

.bar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: baseline;
    padding: 18px 0 14px;
    border-bottom: 1px solid var(--line);
}

.word {
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.word span {
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0;
    color: var(--mute);
    margin-left: 8px;
}

.bar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; }

main { padding: 28px 0 64px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 0.95; max-width: 11ch; }
h2 { font-size: 28px; }
h3 { font-size: 18px; margin: 0; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }

.lead { font-size: 20px; max-width: 38ch; }

.desk {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: start;
}

.places { list-style: none; padding: 0; margin: 20px 0; }
.places li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.places span { color: var(--mute); }

.slip {
    background: var(--sheet);
    border: 1px solid var(--ink);
    padding: 22px 22px 16px;
}

.slip-kicker { margin: 0; color: var(--mute); }
.slip-no {
    margin: 4px 0 12px;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.stamp {
    display: inline-block;
    margin: 0 0 8px;
    border: 2px solid var(--stamp);
    color: var(--stamp);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 8px;
    transform: rotate(-6deg);
}
.perf { border-top: 1px dashed var(--line); margin: 14px 0; }
.slip ul { list-style: none; padding: 0; margin: 0; }
.slip li, .total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-variant-numeric: tabular-nums;
}
.slip li { padding: 6px 0; }

.sheet { margin-top: 48px; }
.sheet-head, .search {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}
.sheet-head h1 { max-width: none; font-size: 40px; }

.row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.mark {
    width: 72px;
    height: 52px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--sheet);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.mark.big { width: 120px; height: 88px; font-size: 28px; }

.meta { margin: 4px 0 0; color: var(--mute); font-size: 15px; }
.price { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.price span { font-weight: 400; color: var(--mute); }

button, .button {
    display: inline-block;
    background: var(--stamp);
    color: white;
    border: 0;
    text-decoration: none;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}
button.quiet {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.notice, .error { padding: 10px 12px; margin: 0 0 16px; }
.notice { background: var(--pine); }
.error { background: var(--warn); }
.error p, .notice { margin: 0; }

.fields { display: grid; gap: 14px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    max-width: 420px;
    background: white;
    border: 1px solid var(--ink);
    padding: 10px 12px;
}
.search { align-items: end; }
.search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search input { max-width: 240px; }
.search button { margin-left: 8px; }

.product {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 28px;
    align-items: start;
}
.product h1 { max-width: 16ch; font-size: 48px; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 16px; }
.buy input { max-width: 100px; }
.row form { display: flex; gap: 8px; align-items: end; }
.row form input { max-width: 80px; }
.row form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.total { font-weight: 600; margin-top: 18px; }
.colophon { padding-bottom: 40px; color: var(--mute); }

@media (max-width: 800px) {
    .desk, .product { grid-template-columns: 1fr; }
    .bar { display: block; }
    .bar nav { margin-top: 10px; }
    .row { grid-template-columns: 56px minmax(0, 1fr); }
    .row .price, .row form, .row .meta { grid-column: 2; }
    .mark { width: 56px; }
    h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .stamp { transform: none; }
}
