/* ============================================================
   Form Drop: the staff app and the platform's own pages.

   The world is a jet-age ticket wallet: carrier-navy rail, white coupon
   stock ruled in hairlines, carbon-purple figures, and states that stamp
   themselves onto a guest's line (Waiting, Sent, Void, Paid). Red is spent
   only on money owed, failure and void.
   ============================================================ */

:root {
    --navy: #1c2b5a;
    --navy-hi: #26386f;
    --navy-deep: #15214a;
    --navy-rule: #34457d;
    --stock: #ffffff;
    --band: #f6f7fa;
    --band-2: #eef0f6;
    --carbon: #5b3f8c;
    --carbon-soft: #f1ecf8;
    --carbon-line: #d6cae9;
    --red: #d22630;
    --red-ink: #a91c25;
    --red-soft: #fdf4f4;
    --red-line: #efbcc0;
    --sent: #2b6657;
    --sent-soft: #eaf3f0;
    --sent-line: #b9d6cd;
    --ink: #151b30;
    --ink-2: #4b5370;
    --mute: #646b84;
    --rule: #e1e4ec;
    --rule-2: #c6cbda;
    --rail-ink: #c3cbe6;
    --rail-mute: #8d99c4;
    --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-cap: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
    --radius: 3px;
    --rail-w: 232px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* The wallet is printed on white stock. "only" stops the browser's automatic
       dark mode from inverting it on machines set to dark. */
    color-scheme: only light;
}

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

body,
h1, h2, h3, h4, p, ul, ol, li, dl, dd, figure {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
}

[hidden] {
    display: none !important;
}

html {
    scrollbar-color: var(--rule-2) transparent;
}

.app-page {
    min-height: 100vh;
    background: var(--stock);
    color: var(--ink);
    font: 400 15px/1.45 var(--font);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

.app-page ::selection {
    background: var(--carbon-line);
    color: var(--ink);
}

.app-page a {
    color: var(--navy);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.app-page a:hover {
    color: var(--carbon);
}

.app-page :focus-visible {
    outline: 2px solid var(--carbon);
    outline-offset: 2px;
}

.app-page button,
.app-page input,
.app-page select,
.app-page textarea {
    font: inherit;
    color: inherit;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Type ---------- */

.cap {
    font-family: var(--font-cap);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.fig {
    color: var(--carbon);
    font-weight: 600;
}

.mute { color: var(--mute); }
.dim { color: var(--ink-2); }

.app-page h1 {
    font: 700 40px/1 var(--font-cap);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--navy);
}

.app-page h2 {
    font: 600 21px/1.15 var(--font-cap);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy);
}

.app-page h3 {
    font: 600 16px/1.2 var(--font-cap);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy);
}

.lead {
    color: var(--ink-2);
    max-width: 68ch;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius);
    border: 1px solid var(--navy);
    background: var(--stock);
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.app-page a.btn { color: var(--navy); }

.btn:hover {
    background: var(--band);
}

.btn svg {
    flex: none;
}

.btn.pri,
.app-page a.btn.pri {
    background: var(--navy);
    color: #fff;
}

.btn.pri:hover {
    background: var(--navy-hi);
    color: #fff;
}

.btn.pri .fig {
    color: #fff;
}

.btn.sm {
    height: 30px;
    padding: 0 11px;
    font-size: 13px;
    border-color: var(--rule-2);
}

.btn.red {
    border-color: var(--red);
    color: var(--red-ink);
    background: var(--stock);
}

.btn.red:hover {
    background: var(--red-soft);
}

.btn.ghost {
    border-color: transparent;
    background: transparent;
}

.btn.ghost:hover {
    background: var(--band);
}

.btn:disabled,
.btn[aria-disabled='true'] {
    color: var(--mute);
    background: var(--band);
    border-color: var(--rule-2);
    cursor: default;
}

.btn.is-busy {
    cursor: progress;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    cursor: pointer;
}

.link-btn:hover {
    color: var(--carbon);
}

/* ---------- Stamps: the signature ---------- */

.stamp {
    --tilt: -4deg;
    display: inline-block;
    font: 700 13px/1 var(--font-cap);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 5px 7px 4px 9px;
    border: 2px solid currentColor;
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1.5px var(--stamp-ground, var(--stock)), inset 0 0 0 2.5px currentColor;
    transform: rotate(var(--tilt));
    white-space: nowrap;
}

.stamp.s-sent { color: var(--sent); }
.stamp.s-red { color: var(--red); }
.stamp.s-carbon { color: var(--carbon); }
.stamp.s-navy { color: var(--navy); }

/* The stamp strike: a state that changes in place lands once. */
.stamp.is-struck {
    animation: stamp-strike 0.34s var(--ease-out) both;
}

@keyframes stamp-strike {
    0% { opacity: 0; transform: rotate(calc(var(--tilt) - 9deg)) scale(1.7); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: rotate(var(--tilt)) scale(1); }
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 2px;
    padding: 5px 8px 4px;
    white-space: nowrap;
}

.tag.is-carbon {
    color: var(--carbon);
    border-color: var(--carbon-line);
    background: var(--carbon-soft);
}

.tag.is-red {
    color: var(--red-ink);
    border-color: var(--red-line);
    background: var(--red-soft);
}

.tag.is-sent {
    color: var(--sent);
    border-color: var(--sent-line);
    background: var(--sent-soft);
}

/* ============================================================
   Shell: rail + main
   ============================================================ */

.app {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    min-height: 100vh;
}

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--navy);
    color: var(--rail-ink);
    display: flex;
    flex-direction: column;
    padding: 22px 0 18px 14px;
    scrollbar-color: var(--navy-rule) transparent;
}

.mark {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 8px;
    color: #fff;
    font: 600 13px/1 var(--font-cap);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
}

.app-page a.mark { color: #fff; }

.prop-card {
    display: block;
    margin: 22px 14px 6px 0;
    padding: 10px 11px;
    border: 1px solid var(--navy-rule);
    border-radius: 4px;
    color: #fff;
}

.prop-card small {
    display: block;
    margin-bottom: 5px;
    font: 600 11px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rail-mute);
}

.prop-card strong {
    display: block;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.25;
}

.prop-card span {
    display: block;
    margin-top: 2px;
    color: var(--rail-mute);
    font-size: 13px;
}

.prop-card .prop-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    color: var(--rail-ink);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-page .prop-card .prop-open:hover { color: #fff; }

.nav-group {
    padding: 18px 10px 6px;
    font: 600 11px/1 var(--font-cap);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rail-mute);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 38px;
    padding: 0 12px 0 10px;
    margin-right: 14px;
    border-radius: var(--radius);
    color: var(--rail-ink);
    text-decoration: none;
    font: 500 15px/1 var(--font-cap);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-page a.nav-link { color: var(--rail-ink); }

.app-page a.nav-link:hover {
    background: var(--navy-hi);
    color: #fff;
}

.app-page a.nav-link[aria-current='page'] {
    background: var(--stock);
    color: var(--navy);
    margin-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    font-weight: 600;
}

.ct {
    min-width: 26px;
    padding: 3px 6px;
    border-radius: 2px;
    background: #fff;
    color: var(--carbon);
    font: 600 12px/1 var(--font);
    letter-spacing: 0;
    text-align: center;
}

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

.ct.is-pass {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--rail-mute);
    font: 600 11px/1 var(--font-cap);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-link[aria-current='page'] .ct {
    box-shadow: inset 0 0 0 1px var(--rule-2);
}

.who {
    margin: auto 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--navy-rule);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--rail-mute);
    display: grid;
    place-items: center;
    color: #fff;
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.08em;
}

.who-text {
    min-width: 0;
}

.who-text b {
    display: block;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.who-text small {
    color: var(--rail-mute);
    font-size: 12px;
}

.who form {
    margin-left: auto;
}

.who .signout {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--rail-ink);
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.who .signout:hover {
    color: #fff;
}

/* ---------- Main ---------- */

.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 28px clamp(18px, 3vw, 40px) 0;
}

.head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}

.sub {
    margin-top: 8px;
    color: var(--ink-2);
    font-size: 15px;
}

.head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.content {
    flex: 1;
    padding: 20px 0 40px;
}

/* ---------- Notices ---------- */

.notice {
    --stamp-ground: var(--band);
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 11px 12px 11px 16px;
    border: 1px solid var(--rule-2);
    border-radius: 4px;
    background: var(--band);
}

.notice p {
    flex: 1;
    min-width: 0;
}

.notice.is-red {
    --stamp-ground: var(--red-soft);
    border-color: var(--red-line);
    background: var(--red-soft);
}

.notice.is-red strong {
    color: var(--red-ink);
}

.notice.is-success {
    --stamp-ground: var(--sent-soft);
    border-color: var(--sent-line);
    background: var(--sent-soft);
}

.notice.is-success strong {
    color: var(--sent);
}

.notice.is-carbon {
    --stamp-ground: var(--carbon-soft);
    border-color: var(--carbon-line);
    background: var(--carbon-soft);
}

.notice form {
    flex: none;
}

/* ---------- Toolbar ---------- */

.tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 0 0 16px;
}

.search {
    position: relative;
    flex: 0 1 380px;
    min-width: 220px;
}

.search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mute);
}

.search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
}

.search input::placeholder {
    color: var(--mute);
}

.meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
}

.ml-auto {
    margin-left: auto;
}

/* ============================================================
   Tables: ruled coupon lines
   ============================================================ */

.table-wrap {
    overflow-x: auto;
    border-bottom: 1px solid var(--rule);
}

.ruled {
    width: 100%;
    border-collapse: collapse;
}

.ruled thead th {
    height: 36px;
    padding: 0 12px;
    text-align: left;
    background: var(--band);
    border-top: 2px solid var(--navy);
    border-bottom: 1px solid var(--rule-2);
    white-space: nowrap;
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    cursor: pointer;
}

.sort-trigger svg {
    color: var(--rule-2);
}

.sort-trigger[data-direction] {
    color: var(--navy);
}

.sort-trigger[data-direction='asc'] .up,
.sort-trigger[data-direction='desc'] .down {
    color: var(--navy);
    fill: var(--navy);
}

.ruled td {
    --stamp-ground: #fff;
    height: 52px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--rule);
    vertical-align: middle;
    background: #fff;
}

.ruled tbody tr:hover td {
    --stamp-ground: #fafbfd;
    background: #fafbfd;
}

.ruled tbody tr:last-child td {
    border-bottom: 0;
}

/* The queue number is the coupon's flight number: a carbon figure at display scale. */
.ruled .no {
    color: var(--carbon);
    font: 600 24px/1 var(--font-cap);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ruled .no small {
    margin-right: 1px;
    font-size: 16px;
    color: var(--mute);
}

.ruled .nm {
    font-weight: 500;
    font-size: 15px;
}

.ruled .nowrap {
    white-space: nowrap;
}

.ruled .answer {
    max-width: 260px;
    color: var(--ink-2);
}

.ruled .empty td {
    height: 120px;
    text-align: center;
    color: var(--mute);
}

.email-locked {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
    white-space: nowrap;
}

.email-locked svg {
    color: var(--mute);
}

/* ---------- Photo cell ---------- */

.photo-cell {
    min-width: 280px;
}

.photo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.photo-row .fig {
    font-size: 15px;
}

.photo-state {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.photo-state .label {
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.photo-picked,
.photo-status {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ink-2);
}

.photo-status:empty,
.photo-picked:empty {
    display: none;
}

.photo-status.is-error {
    color: var(--red-ink);
}

.photo-status.is-success {
    color: var(--sent);
}

.photo-history {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ink-2);
}

.photo-history summary {
    cursor: pointer;
    width: fit-content;
    text-decoration: underline;
    text-decoration-color: var(--rule-2);
    text-underline-offset: 3px;
}

.photo-history[data-empty] {
    display: none;
}

.photo-history ul {
    margin-top: 6px;
    padding-left: 12px;
    border-left: 1px solid var(--rule-2);
}

.photo-history li {
    overflow-wrap: anywhere;
}

/* ---------- The batch stub ---------- */

/* The tray docked to the foot of the page: a batch ticket waiting to be torn off. */
.stub {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 calc(-1 * clamp(18px, 3vw, 40px));
    padding: 12px clamp(18px, 3vw, 40px) 14px;
    background: color-mix(in srgb, var(--band) 92%, transparent);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--rule);
}

.stub .ticket {
    --ticket-ground: var(--band);
    box-shadow: 0 10px 26px -18px rgba(21, 27, 48, 0.5);
}

.stub p {
    font-size: 15px;
}

.stub small {
    display: block;
    color: var(--mute);
    font-size: 13px;
}

/* ============================================================
   Tickets: a body and a tear-off stub, split by a perforation with
   punched notches. Used for every priced action: the batch, an
   export, the season pass.
   ============================================================ */

.ticket {
    --notch: 9px;
    --ticket-ground: var(--stock); /* What shows through the punched notches */
    --stamp-ground: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--rule-2);
    border-top: 2px solid var(--navy);
    border-radius: 2px 2px 4px 4px;
    background: #fff;
}

.ticket.has-tag {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.ticket-tag {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 18px;
    background: var(--navy);
    color: #fff;
    font: 600 13px/1.05 var(--font-cap);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ticket-tag small {
    color: var(--rail-mute);
    font: 500 12px/1 var(--font);
    letter-spacing: 0.02em;
    text-transform: none;
}

.ticket-body {
    min-width: 0;
    padding: 16px 20px;
    align-self: center;
}

.ticket-line {
    font-size: 17px;
    line-height: 1.5;
}

.ticket-line .fig {
    font: 600 26px/1 var(--font-cap);
    letter-spacing: 0.02em;
    vertical-align: -2px;
}

.ticket-line .sep {
    margin: 0 8px;
    color: var(--rule-2);
}

.ticket-note {
    margin-top: 6px;
    color: var(--ink-2);
    font-size: 14px;
}

.ticket-stub {
    --stamp-ground: var(--carbon-soft);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    min-width: 220px;
    padding: 16px 20px;
    border-left: 1px dashed var(--carbon-line);
    background: var(--carbon-soft);
}

/* A stamp keeps its own size; the stub's stretch is for buttons. */
.ticket-stub > .stamp {
    align-self: center;
    width: max-content;
}

/* A stub that only carries a stamp needs no button width. */
.ticket-stub.is-stamp {
    min-width: 0;
    padding-inline: 24px;
}

.ticket-stub.is-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
}

/* Punched notches where the perforation meets the top and bottom edges. */
.ticket-stub::before,
.ticket-stub::after {
    content: '';
    position: absolute;
    left: calc(-1 * var(--notch) - 0.5px);
    width: calc(var(--notch) * 2);
    height: calc(var(--notch) * 2);
    border-radius: 50%;
    background: var(--ticket-ground);
    border: 1px solid var(--rule-2);
}

.ticket-stub::before {
    top: calc(-1 * var(--notch) - 2px);
    clip-path: inset(50% 0 0 0);
}

.ticket-stub::after {
    bottom: calc(-1 * var(--notch) - 1px);
    clip-path: inset(0 0 50% 0);
}

.ticket-price {
    font: 600 34px/1 var(--font-cap);
    letter-spacing: 0.02em;
    color: var(--carbon);
}

.ticket-price small {
    margin-left: 5px;
    font-size: 14px;
    letter-spacing: 0.16em;
    color: var(--ink-2);
}

.ticket-stub .btn.pri {
    width: 100%;
}

.ticket-spaced {
    margin-top: 18px;
}

.ticket-stub.is-row .btn.pri {
    width: auto;
}

/* ============================================================
   Panels: coupons, used where a block needs its own frame
   ============================================================ */

.section {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}

.section:first-child {
    padding-top: 0;
}

.section:last-child {
    border-bottom: 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 14px;
}

.section-head .lead {
    margin-top: 4px;
    font-size: 14px;
}

.coupon {
    --stamp-ground: var(--stock);
    border: 1px solid var(--rule-2);
    border-top: 2px solid var(--navy);
    border-radius: 2px 2px 4px 4px;
    background: var(--stock);
}

.coupon-body {
    padding: 18px 20px;
}

.coupon-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
}

.coupon-figure {
    font: 600 44px/1 var(--font-cap);
    letter-spacing: 0.02em;
    color: var(--carbon);
}

.coupon-figure small {
    margin-left: 6px;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 0.12em;
    color: var(--ink-2);
}

.coupon-cells {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border-top: 1px solid var(--rule);
}

.coupon-cells > div {
    padding: 10px 20px 12px;
    border-right: 1px solid var(--rule);
}

.coupon-cells > div:last-child {
    border-right: 0;
}

.cell-label {
    display: block;
    margin-bottom: 4px;
    font: 600 11px/1 var(--font-cap);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}

.cell-value {
    font-weight: 600;
    color: var(--ink);
}

.cell-value.fig {
    color: var(--carbon);
}

/* Perforation between a coupon and its stub. */
.perf {
    border-top: 1px dashed var(--rule-2);
}

/* ---------- Ruled lists ---------- */

.lines {
    border-top: 2px solid var(--navy);
}

.lines > li {
    --stamp-ground: var(--stock);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}

.lines .line-main {
    flex: 1;
    min-width: 200px;
}

.lines .line-no {
    min-width: 48px;
    font-size: 17px;
}

.lines .line-title {
    font-weight: 600;
}

.lines .line-meta {
    color: var(--ink-2);
    font-size: 14px;
}

.lines.is-off > li.is-off .line-title,
.lines > li.is-off .line-title {
    color: var(--mute);
}

.empty-note {
    padding: 22px 0;
    color: var(--ink-2);
    border-top: 1px solid var(--rule);
}

/* Fare rules: the small print, as a ruled two-column list. */
.rules {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    max-width: 1000px;
    border-top: 1px solid var(--rule-2);
}

.rules dt,
.rules dd {
    padding: 11px 0;
    border-bottom: 1px solid var(--rule);
}

.rules dt {
    padding-right: 20px;
    font: 600 13px/1.4 var(--font-cap);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
}

.rules dd {
    color: var(--ink-2);
}

.rules dd .fig {
    color: var(--carbon);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* ---------- Form controls ---------- */

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field + .field {
    margin-top: 14px;
}

.field-label {
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.field-hint {
    font-size: 13px;
    color: var(--mute);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}

.textarea {
    min-height: 84px;
    line-height: 1.45;
    resize: vertical;
}

.textarea.is-code {
    min-height: 220px;
    font: 13px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace;
    tab-size: 2;
}

.select {
    appearance: none;
    padding-right: 34px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none' stroke='%234b5370' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center,
        #fff;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--mute);
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: var(--ink-2);
}

.app-page .input:focus-visible,
.app-page .select:focus-visible,
.app-page .textarea:focus-visible {
    outline: none;
    border-color: var(--carbon);
    box-shadow: 0 0 0 3px var(--carbon-soft);
}

.input[readonly] {
    background: var(--band);
    color: var(--ink-2);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.grid-2 .field + .field,
.grid-3 .field + .field {
    margin-top: 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--navy);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* ============================================================
   Customize and Form: controls beside a live preview
   ============================================================ */

.studio {
    display: grid;
    grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.studio-controls {
    min-width: 0;
}

.studio-preview {
    position: sticky;
    top: 16px;
    min-width: 0;
}

.preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding-bottom: 10px;
}

.seg {
    display: inline-flex;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    overflow: hidden;
}

.seg button {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-right: 1px solid var(--rule-2);
    background: #fff;
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
}

.seg button:last-child {
    border-right: 0;
}

.seg button[aria-pressed='true'] {
    background: var(--navy);
    color: #fff;
}

.preview-frame {
    position: relative;
    height: calc(100vh - 150px);
    min-height: 460px;
    overflow: hidden;
    border: 1px solid var(--rule-2);
    border-top: 2px solid var(--navy);
    border-radius: 2px 2px 4px 4px;
    background: var(--band-2);
}

.preview-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    transform-origin: 0 0;
    background: #fff;
}

.preview-frame.is-phone iframe {
    left: 50%;
    border-radius: 14px;
    box-shadow: 0 0 0 8px var(--ink), 0 18px 40px -16px rgba(21, 27, 48, 0.5);
}

.preview-status {
    margin-left: auto;
    font-size: 13px;
    color: var(--mute);
}

/* Control groups: each one a coupon leg with a tabbed head. */
.leg {
    border-top: 2px solid var(--navy);
}

.leg + .leg {
    margin-top: 0;
}

.leg > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 2px;
    list-style: none;
    cursor: pointer;
    font: 600 15px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
}

.leg > summary::-webkit-details-marker {
    display: none;
}

.leg > summary small {
    margin-left: auto;
    font: 500 13px/1.2 var(--font);
    letter-spacing: 0;
    text-transform: none;
    color: var(--mute);
}

.leg > summary .chev {
    flex: none;
    transition: transform 0.2s var(--ease-out);
}

.leg[open] > summary .chev {
    transform: rotate(180deg);
}

.leg-body {
    padding: 4px 2px 22px;
}

/* One rhythm inside every control group: 14px between items, more above a subhead. */
.leg-body > * + * {
    margin-top: 14px;
}

.subhead {
    margin: 20px 0 10px;
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}

.leg-body > .subhead {
    margin-top: 24px;
}

.leg-body > .subhead:first-child {
    margin-top: 4px;
}

.leg-body > .subhead + * {
    margin-top: 0;
}

.bulb-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bulb-picks input[type='color'] {
    width: 38px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.bulb-picks input[type='color']:disabled {
    opacity: 0.45;
    cursor: default;
}

.tones > summary {
    width: fit-content;
    cursor: pointer;
    color: var(--ink-2);
    font-size: 14px;
    text-decoration: underline;
    text-decoration-color: var(--rule-2);
    text-underline-offset: 3px;
}

.tones > .field-hint {
    margin: 10px 0 8px;
}

.slug-input .btn {
    height: auto;
    border: 0;
    border-left: 1px solid var(--rule);
    border-radius: 0;
}

.studio-controls .form-actions + .field-hint {
    margin-top: 10px;
}

/* Layout and preset pickers: radio cards. */
.options {
    display: grid;
    gap: 8px;
}

.options.is-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.options.is-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option:hover {
    border-color: var(--ink-2);
}

.option:has(input:checked) {
    border-color: var(--navy);
    box-shadow: inset 0 0 0 1px var(--navy);
}

.option:has(input:focus-visible) {
    outline: 2px solid var(--carbon);
    outline-offset: 2px;
}

.option-name {
    font: 600 13px/1.1 var(--font-cap);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
}

.option-hint {
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--mute);
}

/* Layout thumbnails, drawn from the layout's own proportions. */
.thumb {
    display: grid;
    height: 54px;
    padding: 6px;
    gap: 4px;
    border-radius: 2px;
    background: var(--band-2);
}

.thumb i {
    display: block;
    border-radius: 1px;
    background: var(--rule-2);
}

.thumb i.ink { background: var(--navy); }

.thumb.is-invitation { grid-template-columns: 1fr 1.1fr; }
.thumb.is-card { grid-template-rows: 1fr 1.3fr; width: 58%; margin: 0 auto; justify-self: stretch; }
.thumb.is-backdrop { grid-template-columns: 1.2fr 1fr; background: linear-gradient(120deg, #c5ccde, #e8ebf3); }
.thumb.is-backdrop i:first-child { background: transparent; box-shadow: inset 0 -12px 0 -9px var(--navy); }

.swatches {
    display: flex;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(21, 27, 48, 0.12);
}

.swatches i {
    flex: 1;
}

/* Colour rows. */
.colors {
    display: grid;
    gap: 2px;
}

.color-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 92px;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--rule);
}

.color-row label {
    font-size: 14px;
    color: var(--ink);
}

.color-row input[type='color'] {
    width: 34px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.color-row input[type='color']::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-row input[type='color']::-webkit-color-swatch {
    border: 0;
    border-radius: 1px;
}

.color-row .input {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    text-transform: lowercase;
}

.color-row.is-auto .input {
    color: var(--mute);
    font-style: italic;
}

.contrast-list {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

.contrast-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-2);
}

.contrast-list .tag {
    font-size: 11px;
}

/* Upload rows for logo and backdrop. */
.upload-tile {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
}

.upload-tile .tile-art {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: var(--band-2) center / contain no-repeat;
    box-shadow: inset 0 0 0 1px var(--rule-2);
}

.upload-tile .tile-art.is-cover {
    background-size: cover;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 6px;
}

/* The save bar under the controls. */
.savebar {
    --stamp-ground: var(--stock);
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 6px;
    padding: 14px 0 18px;
    background: var(--stock);
    border-top: 1px dashed var(--rule-2);
}

.savebar .savebar-state {
    flex: 1;
    min-width: 160px;
    color: var(--mute);
    font-size: 14px;
}

.savebar.is-dirty .savebar-state {
    color: var(--carbon);
    font-weight: 600;
}

/* ---------- Question editor ---------- */

.questions {
    border-top: 2px solid var(--navy);
}

.question {
    --stamp-ground: var(--stock);
    border-bottom: 1px solid var(--rule);
}

.question.is-hidden .q-label-input {
    color: var(--mute);
}

.q-head {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.q-no {
    font: 600 18px/1 var(--font-cap);
    color: var(--carbon);
    text-align: center;
}

.q-label-input {
    font-weight: 600;
}

.q-moves {
    display: flex;
    gap: 2px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    color: var(--ink-2);
    cursor: pointer;
}

.icon-btn:hover {
    border-color: var(--rule-2);
    background: var(--band);
    color: var(--navy);
}

.icon-btn:disabled {
    opacity: 0.35;
    cursor: default;
    background: none;
    border-color: transparent;
}

.q-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 0 0 10px 38px;
    font-size: 14px;
}

.q-flags .lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mute);
    font-size: 13px;
}

.q-more {
    padding: 0 0 14px 38px;
}

.q-more > summary {
    width: fit-content;
    cursor: pointer;
    color: var(--ink-2);
    font-size: 13px;
    text-decoration: underline;
    text-decoration-color: var(--rule-2);
    text-underline-offset: 3px;
}

.q-more[open] > summary {
    margin-bottom: 12px;
}

.q-type {
    min-height: 30px;
    padding: 4px 30px 4px 8px;
    font-size: 13px;
}

/* ============================================================
   Gate: sign-in, sign-up, verification
   ============================================================ */

/* A boarding pass on the counter: navy head with the wordmark, the form, then a torn-off stub. */
.is-centered {
    display: grid;
    justify-items: center;
    align-content: start;
    padding: clamp(32px, 9vh, 96px) 16px 48px;
    background: var(--band-2);
}

.gate {
    width: min(440px, 100%);
}

.gate.is-wide {
    width: min(560px, 100%);
}

.gate-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: #fff;
    font: 600 13px/1 var(--font-cap);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.gate-card {
    --stamp-ground: var(--stock);
    border: 1px solid var(--rule-2);
    border-radius: 4px;
    background: var(--stock);
}

.gate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 26px;
    background: var(--navy);
    color: #fff;
    font: 600 13px/1 var(--font-cap);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.gate-head .mark {
    padding-left: 0;
}

.gate-head span:last-child {
    color: var(--rail-mute);
    letter-spacing: 0.16em;
}

.gate-body {
    padding: 24px 26px 22px;
}

.gate-card h1 {
    font-size: 32px;
}

.gate-lead {
    margin: 8px 0 20px;
    color: var(--ink-2);
}

.gate-card form .btn.pri {
    width: 100%;
    height: 44px;
    margin-top: 18px;
    font-size: 15px;
}

.gate-error {
    margin-bottom: 16px;
}

/* The stub: torn along a perforation, notched at both edges. */
.gate-foot {
    --stamp-ground: var(--carbon-soft);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 15px 26px 16px;
    border-top: 1px dashed var(--carbon-line);
    background: var(--carbon-soft);
    font-size: 14px;
    color: var(--ink-2);
}

.gate-foot::before,
.gate-foot::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--band-2);
    border: 1px solid var(--rule-2);
}

.gate-foot::before {
    left: -10px;
    clip-path: inset(0 0 0 50%);
}

.gate-foot::after {
    right: -10px;
    clip-path: inset(0 50% 0 0);
}

.gate-card {
    overflow: visible;
}

.gate-head {
    border-radius: 3px 3px 0 0;
}

.slug-input {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.slug-input span {
    display: flex;
    align-items: center;
    padding: 0 0 0 11px;
    color: var(--mute);
    font-size: 14px;
    white-space: nowrap;
}

.slug-input .input {
    border: 0;
    padding-left: 2px;
}

.app-page .slug-input:focus-within {
    border-color: var(--carbon);
    box-shadow: 0 0 0 3px var(--carbon-soft);
}

.app-page .slug-input .input:focus-visible {
    box-shadow: none;
}

/* ============================================================
   Season pass coupon and charges dialog
   ============================================================ */

.pass {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    border: 1px solid var(--rule-2);
    border-top: 2px solid var(--navy);
    border-radius: 2px 2px 4px 4px;
    background: var(--stock);
}

.pass-main {
    padding: 20px 22px;
}

.pass-main h2 {
    margin-bottom: 6px;
}

.pass-list {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.pass-list li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    color: var(--ink-2);
}

.pass-list svg {
    margin-top: 3px;
    color: var(--sent);
}

.pass-stub {
    --stamp-ground: var(--carbon-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    border-left: 1px dashed var(--carbon-line);
    background: var(--carbon-soft);
}

.pass-price {
    font: 600 48px/1 var(--font-cap);
    color: var(--carbon);
}

.pass-price small {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    letter-spacing: 0.16em;
    color: var(--ink-2);
}

.pass-stub .btn.pri {
    width: 100%;
}

.pass-note {
    font-size: 13px;
    color: var(--ink-2);
}

.dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 1px solid var(--rule-2);
    border-top: 2px solid var(--navy);
    border-radius: 2px 2px 4px 4px;
    background: var(--stock);
    color: var(--ink);
    box-shadow: 0 30px 80px -30px rgba(21, 27, 48, 0.6);
}

.dialog::backdrop {
    background: rgba(21, 33, 74, 0.45);
}

.dialog[open] {
    display: flex;
    flex-direction: column;
    animation: dialog-in 0.28s var(--ease-out) both;
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 0;
}

.dialog-body {
    padding: 14px 22px 4px;
    overflow-y: auto;
}

.dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px 18px;
    border-top: 1px dashed var(--rule-2);
}

/* ============================================================
   Responsive: the rail becomes a top bar, rows become coupon stubs
   ============================================================ */

.only-narrow,
.preview-close,
.preview-open {
    display: none !important;
}

@media (max-width: 1180px) {
    .studio {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Too narrow to sit beside the controls: the preview opens as a full-screen sheet. */
    .studio-preview {
        display: none;
    }

    .studio.is-previewing .studio-preview {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        z-index: 40;
        padding: 12px 16px 16px;
        background: var(--band-2);
    }

    .studio.is-previewing .preview-frame {
        flex: 1;
        height: auto;
        min-height: 0;
    }

    .preview-close,
    .preview-open {
        display: inline-flex !important;
    }

    .preview-close {
        margin-left: auto;
    }

    .preview-status {
        display: none;
    }
}

@media (max-width: 960px) {
    .only-narrow {
        display: inline-flex !important;
    }
}

@media (max-width: 960px) {
    .app {
        grid-template-columns: minmax(0, 1fr);
    }

    .rail {
        position: sticky;
        top: 0;
        z-index: 10;
        height: auto;
        overflow: visible;
        padding: 12px 16px 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px 14px;
    }

    .rail .mark {
        padding-left: 0;
    }

    .prop-card {
        margin: 0;
        padding: 0;
        border: 0;
        min-width: 0;
    }

    .prop-card small,
    .prop-card span {
        display: none;
    }

    .prop-card strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 14px;
        color: var(--rail-ink);
    }

    .prop-card .prop-open {
        display: none;
    }

    .who {
        margin: 0;
        padding: 0;
        border: 0;
        grid-column: 3;
        grid-row: 1;
    }

    .who .avatar,
    .who-text {
        display: none;
    }

    .rail nav {
        grid-column: 1 / -1;
        display: flex;
        gap: 2px;
        margin: 6px -16px 0;
        padding: 0 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .rail nav::-webkit-scrollbar {
        display: none;
    }

    /* On the strip, group labels become thin rules so the three groups still read as three. */
    .nav-group {
        flex: none;
        align-self: center;
        width: 1px;
        height: 20px;
        margin: 0 8px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
        background: color-mix(in srgb, var(--rail-mute) 55%, transparent);
    }

    .rail nav > .nav-group:first-child {
        display: none;
    }

    .app-page a.nav-link,
    .app-page a.nav-link[aria-current='page'] {
        flex: none;
        margin: 0;
        height: 42px;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .main {
        padding-top: 22px;
    }

    .app-page h1 {
        font-size: 30px;
    }

    .head {
        flex-direction: column;
        align-items: flex-start;
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .pass {
        grid-template-columns: minmax(0, 1fr);
    }

    .pass-stub {
        border-left: 0;
        border-top: 1px dashed var(--carbon-line);
    }
}

@media (max-width: 760px) {
    /* Each entry becomes a coupon stub: number and name on top, then ruled cells. */
    .ruled.is-stacking thead {
        display: none;
    }

    .ruled.is-stacking,
    .ruled.is-stacking tbody,
    .ruled.is-stacking tr,
    .ruled.is-stacking td {
        display: block;
    }

    .ruled.is-stacking tbody tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        margin-bottom: 12px;
        border: 1px solid var(--rule-2);
        border-top: 2px solid var(--navy);
        border-radius: 2px 2px 4px 4px;
        background: #fff;
    }

    .ruled.is-stacking td {
        height: auto;
        padding: 8px 14px;
        border-bottom: 1px solid var(--rule);
        grid-column: 1 / -1;
    }

    .ruled.is-stacking td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        font: 600 11px/1 var(--font-cap);
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--mute);
    }

    .ruled.is-stacking td.no {
        grid-column: 1;
        padding-right: 0;
        border-bottom: 1px dashed var(--rule-2);
        font: 600 26px/1 var(--font-cap);
    }

    .ruled.is-stacking td.nm {
        grid-column: 2;
        display: flex;
        align-items: center;
        border-bottom: 1px dashed var(--rule-2);
        font-size: 17px;
    }

    .ruled.is-stacking td.no::before,
    .ruled.is-stacking td.nm::before {
        display: none;
    }

    .ruled.is-stacking td:last-child {
        border-bottom: 0;
    }

    .ruled.is-stacking td.answer {
        max-width: none;
    }

    .ruled.is-stacking .empty td {
        height: auto;
        padding: 30px 14px;
    }

    .table-wrap {
        overflow: visible;
        border-bottom: 0;
    }

    .photo-cell {
        min-width: 0;
    }

    .grid-2,
    .grid-3,
    .options.is-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .rules {
        grid-template-columns: minmax(0, 1fr);
    }

    .rules dt {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .stub {
        padding-top: 8px;
        padding-bottom: 10px;
    }

    .stub small {
        display: none; /* The rate is on the button; keep the stub short on a phone */
    }

    /* Tickets stack: the perforation runs across, notched at both side edges. */
    .ticket,
    .ticket.has-tag {
        grid-template-columns: minmax(0, 1fr);
    }

    .ticket.has-tag {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ticket.has-tag .ticket-stub {
        grid-column: 1 / -1;
    }

    .ticket-tag {
        padding: 8px 12px;
        font-size: 12px;
    }

    .ticket-body {
        padding: 10px 14px;
    }

    .ticket-stub {
        min-width: 0;
        padding: 12px 14px;
        border-left: 0;
        border-top: 1px dashed var(--carbon-line);
    }

    .ticket-stub::before,
    .ticket-stub::after {
        top: calc(-1 * var(--notch) - 0.5px);
        bottom: auto;
    }

    .ticket-stub::before {
        left: calc(-1 * var(--notch) - 1px);
        clip-path: inset(0 0 0 50%);
    }

    .ticket-stub::after {
        left: auto;
        right: calc(-1 * var(--notch) - 1px);
        clip-path: inset(0 50% 0 0);
    }

    .ticket-stub.is-row .btn {
        flex: 1;
    }

    .notice {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

.q-kind {
    font: 600 12px/1 var(--font-cap);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
}

.q-more > * + * {
    margin-top: 14px;
}

.q-more > summary + * {
    margin-top: 0;
}

.gap-top {
    margin-top: 14px;
}

.gap-top-sm {
    margin-top: 6px;
}

.gate-agree {
    margin-top: 16px;
    align-items: flex-start;
}

.gate-agree input {
    margin-top: 3px;
}

.gate-action {
    width: 100%;
    height: 44px;
    margin-top: 6px;
}

/* ============================================================
   Forms, payments and the plan
   ============================================================ */

.prop-links {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.head-form {
    color: var(--carbon);
    font-weight: 600;
}

/* Unpaid entries stay on the list, quieter, until they are paid or voided. */
.ruled tr.is-unpaid td {
    --stamp-ground: var(--band);
    background: var(--band);
}

.ruled tr.is-unpaid .nm {
    color: var(--ink-2);
}

.pay-cell {
    min-width: 180px;
}

.pay-order {
    margin-top: 4px;
    font-size: 13px;
    color: var(--ink-2);
}

.pay-check {
    display: inline;
    margin-left: 10px;
    font-size: 13px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
}

.item-grid .field + .field {
    margin-top: 0;
}

.sale-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding-bottom: 4px;
}

.plan-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

/* Both tiers start at the same line, whatever their lists wrap to. */
.plan-pair .ticket-body {
    align-self: start;
}

.plan-pair .ticket-stub form + form {
    margin-top: -2px;
}

.plan-pair .ticket-stub .btn {
    width: 100%;
}

@media (max-width: 960px) {
    .plan-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .item-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pay-cell {
        min-width: 0;
    }
}
