/* dnata guest portal — one stylesheet, no build step.
   Mobile first: a guest holds a phone in one hand and a bag in the other, so
   primary actions sit in the thumb zone and every target is at least 48px. */

@view-transition { navigation: auto; }

:root {
  color-scheme: light dark;
  --paper: #f4efe6;
  --paper-2: #ebe3d5;
  --card: #fffdf8;
  --ink: #16171a;
  --ink-2: #4a4a4f;
  --ink-3: #8a877f;
  --line: #e0d6c5;
  --line-strong: #cbbfa9;
  --accent: #b5452c;
  --accent-2: #8f3320;
  --accent-soft: #f5e1d7;
  --on-accent: #fffaf5;
  --sage: #395447;
  --sage-soft: #e1e9e2;
  --gold: #c6932f;
  --warn: #8a5a00;
  --warn-soft: #fbf0d6;
  --danger: #a1281c;
  --danger-soft: #fae3df;
  --ok: #2c6a4d;
  --shadow: 0 1px 0 rgb(40 30 10 / .04), 0 12px 32px -12px rgb(60 40 10 / .18);
  --shadow-lift: 0 1px 0 rgb(40 30 10 / .05), 0 22px 44px -18px rgb(60 40 10 / .28);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-ui: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13110e;
    --paper-2: #1b1814;
    --card: #1f1c18;
    --ink: #f3eee5;
    --ink-2: #c3bdb1;
    --ink-3: #8c867b;
    --line: #2f2a23;
    --line-strong: #463f35;
    --accent: #e27a5c;
    --accent-2: #f09a7f;
    --accent-soft: #3a2119;
    --on-accent: #1a0f0a;
    --sage: #9cc2ad;
    --sage-soft: #1f2b25;
    --gold: #e3b458;
    --warn: #f0c46b;
    --warn-soft: #2f2412;
    --danger: #ff8d80;
    --danger-soft: #3a1714;
    --ok: #7fd1a8;
    --shadow: 0 1px 0 rgb(0 0 0 / .3), 0 14px 34px -14px rgb(0 0 0 / .6);
    --shadow-lift: 0 1px 0 rgb(0 0 0 / .3), 0 24px 48px -18px rgb(0 0 0 / .7);
  }
}

[dir="rtl"] {
  --font-display: "IBM Plex Sans Arabic", "Fraunces", ui-serif, serif;
  --font-ui: "IBM Plex Sans Arabic", "Inter Tight", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
/* A warm light in one corner and a paper grain over everything. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 110% -10%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(40rem 30rem at -20% 110%, color-mix(in oklab, var(--sage) 12%, transparent), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */

.shell {
  width: min(100%, 38rem);
  margin-inline: auto;
  padding: 0 var(--gutter) calc(env(safe-area-inset-bottom) + 28px);
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: calc(env(safe-area-inset-top) + 16px) 8px;
  view-transition-name: topbar;
}
.wordmark {
  display: inline-flex; align-items: baseline; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.wordmark b {
  font: 600 26px/1 var(--font-ui);
  letter-spacing: -.04em;
  font-family: "Inter Tight", system-ui, sans-serif;
}
.wordmark span {
  font-size: 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase;
}
[dir="rtl"] .wordmark span { letter-spacing: 0; }

/* Language: a native <details> menu, so it works without JS. */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding-inline: 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  backdrop-filter: blur(8px);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang[open] summary { border-color: var(--ink); color: var(--ink); }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; min-width: 11rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lift);
  animation: pop .18s var(--ease);
}
.lang li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; border-radius: 10px; text-decoration: none; font-size: 15px;
}
.lang li a:hover { background: var(--paper); color: var(--ink); }
.lang li a[aria-current="true"]::after { content: "✓"; color: var(--accent); font-weight: 700; }

main { flex: 1; display: flex; flex-direction: column; }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.display {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(38px, 10.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin: 14px 0 0;
  text-wrap: balance;
}
.display em {
  font-style: italic; font-weight: 420; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
[dir="rtl"] .display { font-weight: 500; letter-spacing: 0; line-height: 1.25; font-size: clamp(34px, 9vw, 50px); }
[dir="rtl"] .display em { font-style: normal; font-weight: 600; }
.lede { font-size: 18px; color: var(--ink-2); margin: 16px 0 0; text-wrap: pretty; }
h2.title {
  font-family: var(--font-display); font-weight: 420;
  font-size: clamp(30px, 7.5vw, 40px); line-height: 1.08; letter-spacing: -.02em;
  font-variation-settings: "opsz" 96;
  margin: 8px 0 0; text-wrap: balance;
}
[dir="rtl"] h2.title { letter-spacing: 0; line-height: 1.3; font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* ---------- Splash ---------- */

.hero { padding: 7vh 0 28px; view-transition-name: hero; }
.hero .loc-line { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ink-3); font-size: 14px; }
.hero .loc-line svg { width: 16px; height: 16px; flex: none; }

.choices { display: grid; gap: 14px; margin-top: auto; padding-top: 12px; }
.choice {
  position: relative; display: grid; grid-template-columns: 56px 1fr 24px; align-items: center; gap: 16px;
  padding: 20px 20px 20px 18px; min-height: 104px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s;
  animation: rise .7s var(--ease) both;
}
.choice:nth-child(2) { animation-delay: .08s; }
.choice:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); color: var(--ink); }
.choice:active { transform: scale(.985); }
.choice .icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.choice.alt .icon { background: var(--sage-soft); color: var(--sage); }
.choice .icon svg { width: 28px; height: 28px; }
.choice h3 { margin: 0; font: 600 19px/1.25 var(--font-ui); letter-spacing: -.01em; }
.choice p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.choice .chev { width: 22px; height: 22px; color: var(--ink-3); transition: transform .35s var(--ease), color .2s; }
.choice:hover .chev { transform: translateX(4px); color: var(--accent); }
[dir="rtl"] .choice .chev { transform: scaleX(-1); }
[dir="rtl"] .choice:hover .chev { transform: scaleX(-1) translateX(4px); }

.foot {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3);
}

/* ---------- Page header with back + steps ---------- */

.pagehead { padding: 18px 0 8px; view-transition-name: pagehead; }
.back {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; margin-inline-start: -8px; padding-inline: 8px;
  font-size: 15px; color: var(--ink-2); text-decoration: none; border-radius: 10px;
}
.back svg { width: 18px; height: 18px; }
[dir="rtl"] .back svg { transform: scaleX(-1); }

.steps { display: flex; gap: 6px; margin: 14px 0 18px; padding: 0; list-style: none; }
.steps li { flex: 1; display: grid; gap: 7px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.steps li::before {
  content: ""; height: 4px; border-radius: 4px; background: var(--line);
  transition: background .4s var(--ease);
}
.steps li.done::before { background: var(--ink); }
.steps li.now::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
[dir="rtl"] .steps li.now::before { background: linear-gradient(-90deg, var(--accent), var(--accent-2)); }
.steps li.now { color: var(--ink); }

/* ---------- Cards and form controls ---------- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  animation: rise .55s var(--ease) both;
}
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 4px; font: 600 18px/1.3 var(--font-ui); letter-spacing: -.01em; }
.card .hint { margin: 0 0 16px; font-size: 14.5px; color: var(--ink-3); }

.field { display: grid; gap: 8px; margin-top: 18px; }
.field:first-child { margin-top: 0; }
.field label, .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, .textarea {
  width: 100%; min-height: 56px; padding: 14px 16px;
  font: 500 18px/1.3 var(--font-ui); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); font-weight: 400; }
.input:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus {
  outline: none; border-color: var(--ink); background: var(--card);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.input.big {
  min-height: 68px; font-size: 26px; font-weight: 600; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; text-transform: uppercase;
}
.input.big::placeholder { text-transform: none; letter-spacing: .02em; }
.textarea { min-height: 110px; resize: vertical; field-sizing: content; max-height: 18rem; }
input[type="date"].input { font-variant-numeric: tabular-nums; }
.help { font-size: 13.5px; color: var(--ink-3); margin: 0; }
.inline-status { font-size: 13.5px; min-height: 1.2em; margin: 0; }
.inline-status.ok { color: var(--ok); }
.inline-status.bad { color: var(--danger); }

.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 0 24px;
  font: 600 17px/1 var(--font-ui); letter-spacing: -.005em;
  background: var(--bg); color: var(--fg); border: 0; border-radius: 16px; cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .2s;
  box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--bg) 70%, transparent);
}
.btn:hover { transform: translateY(-1px); color: var(--fg); }
.btn:active { transform: scale(.985); }
.btn svg { width: 20px; height: 20px; }
.btn.accent { --bg: var(--accent); --fg: var(--on-accent); }
.btn.ghost {
  --bg: transparent; --fg: var(--ink); box-shadow: none;
  border: 1.5px solid var(--line-strong);
}
.btn.ghost:hover { border-color: var(--ink); }
.btn[aria-busy="true"] { color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--fg); border-inline-end-color: transparent;
  animation: spin .7s linear infinite;
}
.btn:disabled { opacity: .45; pointer-events: none; }
.actions { display: grid; gap: 10px; margin-top: 22px; }

/* Primary action docked to the bottom of the viewport on phones. */
.dock {
  position: sticky; bottom: 0; z-index: 5;
  margin: 22px calc(var(--gutter) * -1) 0; padding: 14px var(--gutter) calc(env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(to top, var(--paper) 70%, color-mix(in oklab, var(--paper) 0%, transparent));
}

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; line-height: 1.45;
  background: var(--danger-soft); color: var(--danger); margin-bottom: 14px;
  animation: shake .4s var(--ease);
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); animation: none; }
.alert.info { background: var(--sage-soft); color: var(--sage); animation: none; }

/* ---------- Feedback: faces, stars, NPS, chips ---------- */

.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.faces input { position: absolute; opacity: 0; pointer-events: none; }
.faces label {
  display: grid; justify-items: center; gap: 6px; padding: 12px 2px 10px; cursor: pointer;
  border-radius: 16px; border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .2s, border-color .2s;
}
.faces label svg { width: 44px; height: 44px; color: var(--ink-3); transition: color .2s, transform .35s var(--ease); }
.faces label span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-align: center; line-height: 1.2; }
.faces label:hover svg { color: var(--ink-2); transform: translateY(-2px); }
.faces input:focus-visible + label { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.faces input:checked + label { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.faces input:checked + label svg { color: var(--accent); transform: scale(1.12); }
.faces input:checked + label span { color: var(--accent); }

.aspect { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.aspect:first-of-type { border-top: 0; }
.aspect .name { font-size: 15.5px; font-weight: 500; }
.stars { display: inline-flex; gap: 2px; flex: none; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { cursor: pointer; padding: 4px; line-height: 0; color: var(--line-strong); transition: color .15s, transform .2s var(--ease); }
.stars label svg { width: 26px; height: 26px; }
.stars label:active { transform: scale(.85); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 6px; }
/* Fill every star up to the one checked (or hovered): :has() does what used to need JS. */
.stars:has(input:nth-of-type(1):checked) label:nth-of-type(-n+1),
.stars:has(input:nth-of-type(2):checked) label:nth-of-type(-n+2),
.stars:has(input:nth-of-type(3):checked) label:nth-of-type(-n+3),
.stars:has(input:nth-of-type(4):checked) label:nth-of-type(-n+4),
.stars:has(input:nth-of-type(5):checked) label:nth-of-type(-n+5) { color: var(--gold); }
@media (hover: hover) {
  .stars:has(label:nth-of-type(1):hover) label:nth-of-type(-n+1),
  .stars:has(label:nth-of-type(2):hover) label:nth-of-type(-n+2),
  .stars:has(label:nth-of-type(3):hover) label:nth-of-type(-n+3),
  .stars:has(label:nth-of-type(4):hover) label:nth-of-type(-n+4),
  .stars:has(label:nth-of-type(5):hover) label:nth-of-type(-n+5) { color: color-mix(in oklab, var(--gold) 70%, var(--line-strong)); }
}

.nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 5px; margin-top: 14px; }
.nps input { position: absolute; opacity: 0; pointer-events: none; }
.nps label {
  display: grid; place-items: center; height: 46px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper);
  font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.nps label:hover { border-color: var(--line-strong); }
.nps input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.nps input:focus-visible + label { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.nps-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 380px) {
  .nps { grid-template-columns: repeat(6, 1fr); }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.chips label::before { content: "+"; font-weight: 600; color: var(--ink-3); transition: transform .25s var(--ease); }
.chips input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips input:checked + label::before { content: "✓"; color: var(--paper); }
.chips input:focus-visible + label { outline: 2.5px solid var(--accent); outline-offset: 2px; }
/* Offer praise after a good score, problems after a poor one, both when unsure. */
form:has(input[name="overall"][value="1"]:checked) .chip-pos,
form:has(input[name="overall"][value="2"]:checked) .chip-pos,
form:has(input[name="overall"][value="4"]:checked) .chip-neg,
form:has(input[name="overall"][value="5"]:checked) .chip-neg { display: none; }

/* Switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; min-height: 48px; }
.switch span { font-weight: 600; font-size: 16px; }
.switch input {
  appearance: none; flex: none; width: 52px; height: 32px; border-radius: 999px; margin: 0;
  background: var(--line-strong); position: relative; cursor: pointer; transition: background .25s var(--ease);
}
.switch input::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transition: inset-inline-start .3s var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { inset-inline-start: 23px; }

.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.reveal > div { overflow: hidden; }
form:has(#wants_reply:checked) .reveal { grid-template-rows: 1fr; }
form:has(#wants_reply:checked) .anon-note { display: none; }

.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 12px 0; cursor: pointer; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.check + .check { border-top: 1px dashed var(--line); }
.check input {
  appearance: none; margin: 1px 0 0; width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--paper); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.check input::after { content: ""; width: 12px; height: 7px; border: 2.5px solid var(--on-accent); border-top: 0; border-inline-end: 0; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease); margin-top: -3px; }
[dir="rtl"] .check input::after { transform: rotate(45deg) scale(0); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
[dir="rtl"] .check input:checked::after { transform: rotate(45deg) scale(1); }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Invoice ---------- */

.pips { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.pips i.used { background: transparent; border: 1.5px solid var(--line-strong); }
.pips .dots { display: inline-flex; gap: 5px; }

.company { padding: 0; overflow: hidden; }
.company .head { padding: 22px 22px 18px; background: linear-gradient(135deg, var(--sage-soft), transparent 70%); border-bottom: 1px solid var(--line); }
.company .name { font-family: var(--font-display); font-size: 26px; line-height: 1.15; font-weight: 450; letter-spacing: -.015em; margin: 8px 0 0; font-variation-settings: "opsz" 72; }
[dir="rtl"] .company .name { font-family: "Fraunces", serif; direction: ltr; text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sage); color: var(--card); }
.badge.off { background: var(--line-strong); color: var(--ink); }
.company dl { margin: 0; padding: 6px 22px 12px; }
.company dl > div { display: grid; grid-template-columns: minmax(7.5rem, 38%) 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.company dl > div:first-child { border-top: 0; }
.company dt { font-size: 13.5px; color: var(--ink-3); }
.company dd { margin: 0; font-weight: 500; font-size: 15.5px; overflow-wrap: anywhere; }
.company dd.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
[dir="rtl"] .company dd { direction: ltr; text-align: right; }

.receipt-grid { display: grid; gap: 14px; }
@media (min-width: 60rem) {
  .shell.wide { width: min(100%, 64rem); }
  .receipt-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
  .receipt-grid .guide { position: sticky; top: 20px; }
  .receipt-grid details.where > summary { display: none; }
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field, .row2 .field:first-child { margin-top: 18px; }
@media (max-width: 360px) { .row2 { grid-template-columns: 1fr; } }

details.where { margin-top: 10px; }
details.where .guide { margin-top: 10px; }
details.where > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: var(--accent); min-height: 40px;
}
details.where > summary::-webkit-details-marker { display: none; }
details.where > summary svg { width: 18px; height: 18px; }
details.where[open] > summary svg { transform: rotate(180deg); }

/* The paper receipt illustration */
.guide { padding: 18px; background: var(--paper-2); border-radius: var(--radius); border: 1px solid var(--line); }
.guide p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-2); }
.paper {
  --tooth: 10px;
  margin-inline: auto; width: min(100%, 17.5rem);
  background: #fffefa; color: #222;
  padding: 22px 18px 26px; border-radius: 3px;
  box-shadow: 0 20px 40px -20px rgb(50 30 0 / .45), 0 2px 6px rgb(50 30 0 / .08);
  font: 500 11.5px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  direction: ltr; text-align: left;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
  transform: rotate(-1.2deg);
}
.paper .c { text-align: center; }
.paper .b { font-weight: 700; }
.paper .hr { border-top: 1px dashed #999; margin: 8px 0; }
.paper .kv { display: flex; justify-content: space-between; gap: 8px; }
.paper .dim { color: #999; }
.paper .hit {
  position: relative; margin: 4px -8px; padding: 6px 8px; border-radius: 4px;
  background: color-mix(in oklab, #f2c14e 45%, transparent); color: #000; font-weight: 700;
  box-shadow: 0 0 0 2px #e0a526;
  animation: glow 2.2s ease-in-out infinite;
}
.paper .tot { font-size: 13px; }
.paper .hit.total-hit { animation-delay: 1.1s; }
.paper .qr {
  width: 64px; height: 64px; margin: 8px auto; opacity: .35;
  background: repeating-conic-gradient(#222 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.paper .not-it { position: relative; color: #9a1c10; text-decoration: line-through 1.5px; }
.not-it-note { margin: 14px 0 0 !important; font-size: 13.5px !important; font-weight: 600; color: var(--danger) !important; text-align: center; }
.receipt-photo { position: relative; margin: 0 auto; width: min(100%, 20rem); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lift); }
.receipt-photo img { display: block; width: 100%; height: auto; }

/* Done */
.done-mark { width: 76px; height: 76px; margin: 8px 0 6px; }
.done-mark circle { fill: var(--sage-soft); }
.done-mark path { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .7s .25s var(--ease) forwards; }
.docframe {
  margin-top: 18px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); height: min(70dvh, 46rem);
}
.docframe iframe { width: 100%; height: 100%; border: 0; display: block; }
/* On a narrow screen the A4 page is laid out at its real width and scaled down
   to fit, like a thumbnail of the paper, instead of being squeezed to 390px. */
.docframe.scaled { position: relative; height: auto; }
.docframe.scaled iframe { width: var(--doc-w); height: var(--doc-h); transform: scale(var(--doc-s)); transform-origin: 0 0; }
[dir="rtl"] .docframe.scaled iframe { transform-origin: 100% 0; margin-inline-start: auto; }
.ref { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-3); margin-top: 14px; word-break: break-all; }
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Privacy */
.prose h3 { font: 600 17px/1.3 var(--font-ui); margin: 24px 0 6px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; }
.prose ul { padding-inline-start: 20px; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes spin { to { rotate: 1turn; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 5px color-mix(in oklab, #e0a526 35%, transparent); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
  .done-mark path { stroke-dashoffset: 0; }
}

@media print {
  body::before, .topbar, .foot, .dock, .actions { display: none; }
}
