/* Privacy portal styles. The look follows unico.io: warm off-white pages, near
   black text and buttons, soft rounded cards, large light headings. No fonts are
   bundled: the system stack keeps the page fast and avoids shipping a licensed
   typeface. */

:root {
  --bg: #fbf9f4;
  --surface: #ffffff;
  --band: #f6f4ee;
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --line: #e7e3da;
  --line-strong: #cfc9bb;
  --brand: #161616;
  --brand-hover: #2b2b2b;
  --accent: #b9dc9d;
  --accent-ink: #1f3d0f;
  --info-bg: #e8eefb;
  --info-ink: #1b3a8a;
  --warn-bg: #fff4d6;
  --warn-line: #f0d98a;
  --warn-ink: #6a4a00;
  --danger: #b3261e;
  --danger-hover: #8f1d17;
  --danger-bg: #fdecea;
  --ok-bg: #e3f2d6;
  --ok-ink: #24480f;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px rgba(17, 17, 17, 0.06);
  --font: ui-sans-serif, "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

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

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid #2b6cff; outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; background: var(--brand); color: #fff;
  padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 100;
}
.skip-link:focus { top: 1rem; }

.topbar { height: 10px; background: #2b2b2b; }

.container { width: min(100% - 2rem, 1280px); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 640px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { background: var(--bg); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 76px; gap: .5rem 1rem; padding-block: .5rem; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 24px; width: auto; display: block; }
/* The links stay on a phone too, and wrap there: hiding them left a holder with no way
   to the help or to their own requests from the top of the page. */
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .35rem 1.25rem; }
.nav a { text-decoration: none; font-size: .95rem; }
.nav a:hover { text-decoration: underline; }

@media (min-width: 720px) { .nav { gap: .35rem 1.5rem; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  border-radius: var(--radius-sm); padding: .85rem 1.4rem; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); text-decoration: none; }
.btn--arrow::after { content: "\203A"; font-size: 1.15em; line-height: 1; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: #fff; border-color: var(--ink); }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn--sm { padding: .55rem 1rem; font-size: .95rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: #e2dfd6; border-color: #e2dfd6; color: #8a8579; cursor: not-allowed; pointer-events: none;
}
.btn--ghost[disabled], .btn--ghost[aria-disabled="true"] { background: transparent; border-color: var(--line); }
.link-arrow { font-weight: 600; text-decoration: underline; }
.link-arrow::after { content: " \203A"; }

/* ---------- typography ---------- */
.display { font-size: clamp(2.5rem, 6.2vw, 5.25rem); line-height: 1.02; font-weight: 400; letter-spacing: -0.035em; margin: 0; }
.headline { font-size: clamp(1.4rem, 2.6vw, 2.4rem); line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.title { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.title-sm { font-size: 1.4rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.lead { font-size: 1.15rem; color: var(--ink-2); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.pre-line { white-space: pre-line; }

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 4rem; }
.hero .container { display: grid; gap: 1.25rem; max-width: 1280px; }
.hero .headline { max-width: 22ch; }
.hero .lead { max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-top: .75rem; }

/* ---------- sections ---------- */
.section { padding: 3rem 0; }
.section--band { background: var(--band); }
.section--white { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.015em; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
}
.card--shadow { box-shadow: var(--shadow); border-color: transparent; }

.right-card {
  display: flex; align-items: center; gap: 1rem; min-height: 92px; padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.right-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.right-card .label { flex: 1; font-weight: 500; line-height: 1.3; }
.right-card .chev { color: var(--muted); display: inline-flex; }

.icon-box {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px; background: #f1ede4; color: var(--ink);
}
.icon-box--lg { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: #fff; }
.icon-box--round { border-radius: 999px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-box--lg .icon { width: 30px; height: 30px; }

/* ---------- ticket cards ---------- */
.ticket-card {
  display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.ticket-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.ticket-card .top { display: flex; align-items: center; gap: .9rem; }
.ticket-card .name { font-weight: 600; line-height: 1.3; }
.ticket-card .when { color: var(--muted); font-size: .875rem; }
.ticket-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.ticket-card .action { font-weight: 600; text-decoration: underline; }
.ticket-card .action::after { content: " \203A"; }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; }
.badge--primary { background: var(--info-bg); color: var(--info-ink); }
.badge--success { background: var(--ok-bg); color: var(--ok-ink); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--warning { background: var(--warn-bg); color: var(--warn-ink); }
.badge--neutral { background: #ece9e1; color: var(--ink-2); }

/* ---------- page card (centered flows) ---------- */
.page { padding: 2.5rem 0 4rem; }
.flow { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.flow .stack { text-align: left; width: 100%; }
.panel {
  width: min(100%, 592px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.5rem 2rem; display: grid; gap: 1.25rem; justify-items: center; text-align: center;
  box-shadow: var(--shadow); border-color: transparent;
}
.panel--left { justify-items: stretch; text-align: left; }
.panel .btn { min-width: 220px; }
@media (max-width: 719px) {
  .panel { padding: 1.5rem 1rem; box-shadow: none; background: transparent; border: 0; }
}

.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .875rem; color: var(--muted); padding-top: 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); }
.crumbs .sep::before { content: "\203A"; }

/* ---------- notices ---------- */
.notice {
  display: flex; gap: .85rem; text-align: left; width: 100%;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  border-radius: 12px; padding: 1rem 1.1rem;
}
.notice .icon { flex: none; margin-top: .15rem; }
.notice strong { display: block; }
.notice--plain { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.notice a { font-weight: 600; }

/* ---------- forms ---------- */
.form { width: 100%; display: grid; gap: 1.1rem; text-align: left; }
.field { display: grid; gap: .4rem; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .875rem; }
.field .error { color: var(--danger); font-size: .875rem; }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 12px; padding: .8rem .95rem;
}
.textarea { min-height: 7.5rem; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid #2b6cff33; border-color: #2b6cff; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.row-2 { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }

/* ---------- lists ---------- */
.bullets { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; text-align: left; }
.section-block { display: grid; gap: .6rem; text-align: left; width: 100%; }
.section-block h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; text-align: left; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; position: relative; padding-bottom: 1.4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line-strong);
}
.timeline li:last-child::before { display: none; }
.dot { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.dot .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.dot--standard { background: transparent; }
.dot--standard::after { content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--line-strong); }
.dot--done { background: var(--ok-bg); color: var(--ok-ink); }
.dot--analysing { background: transparent; position: relative; }
.dot--analysing::after { content: ""; width: 14px; height: 14px; border-radius: 999px; background: #0652b0; animation: pulse 1s ease-out infinite; }
.dot--refused { background: var(--danger-bg); color: var(--danger); }
.dot--expired { background: #ece9e1; color: var(--muted); }
.dot--download { background: var(--warn-bg); color: var(--warn-ink); }
.timeline .t-title { font-weight: 600; }
.timeline .t-sub { color: var(--muted); font-size: .875rem; }
.timeline .t-info { color: var(--ink-2); margin-top: .35rem; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(6, 82, 176, .45); } 100% { box-shadow: 0 0 0 12px rgba(6, 82, 176, 0); } }
@media (prefers-reduced-motion: reduce) { .dot--analysing::after { animation: none; } }

/* ---------- accordion ---------- */
details.expander { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; text-align: left; width: 100%; }
details.expander summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.expander summary::-webkit-details-marker { display: none; }
details.expander summary::after { content: "\2304"; color: var(--muted); }
details.expander[open] summary::after { content: "\2303"; }
details.expander .body { margin-top: .75rem; color: var(--ink-2); }

/* ---------- answer html ---------- */
.answer { text-align: left; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; overflow-wrap: anywhere; }
.answer p:first-child { margin-top: 0; }
.answer p:last-child { margin-bottom: 0; }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: var(--radius); padding: 2rem; max-width: 480px; width: calc(100% - 2rem); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(17, 17, 17, .5); }
.qr { display: block; margin: 1rem auto; width: 200px; height: 200px; image-rendering: pixelated; border: 8px solid #fff; border-radius: 8px; box-shadow: var(--shadow); }

/* ---------- state swaps ---------- */
.spinner { width: 44px; height: 44px; border-radius: 999px; border: 4px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }

/* ---------- only-desktop / only-mobile ---------- */
.only-desktop { display: none; }
@media (min-width: 720px) { .only-desktop { display: inline; } .only-mobile { display: none; } }

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

/* ---------- state icons ---------- */
.icon-box--ok { background: var(--ok-bg); color: var(--ok-ink); }
.icon-box--bad { background: var(--danger-bg); color: var(--danger); }
.icon-box--warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- layout helpers ---------- */
.group { display: grid; gap: 1rem; }
.group + .group { margin-top: 2.5rem; }
.actions { display: grid; gap: .75rem; width: 100%; }
.actions .btn { width: 100%; }
.option { display: flex; align-items: flex-start; gap: 1rem; text-align: left; width: 100%; }
.option p { margin: 0; }
.option .title-sm { margin-bottom: .35rem; }
.panel--left .option { padding: 1rem 1.25rem; align-items: center; }
.link-button {
  background: none; border: 0; padding: 0; margin-top: .5rem; font: inherit; font-weight: 600; color: inherit;
  text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
}
.link-button .icon { width: 16px; height: 16px; }
dialog .actions { margin-top: 1rem; }

/* ---------- sign-in code ---------- */
.input--code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.75rem; letter-spacing: .5em;
  text-align: center; padding-left: calc(.95rem + .5em);
}
.form > .error { color: var(--danger); font-size: .875rem; margin: 0; }
.form > .muted { margin: 0; }

/* ---------- cookie notice ---------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem max(1rem, calc((100vw - 1280px) / 2));
  background: var(--brand); color: #fff; box-shadow: 0 -8px 24px rgba(17, 17, 17, .18);
}
.cookie-banner p { margin: 0; font-size: .95rem; max-width: 62ch; }
.cookie-banner a, .cookie-banner .link-button { color: #fff; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.cookie-banner .btn { background: #fff; color: var(--brand); border-color: #fff; }
.cookie-banner .btn:hover { background: var(--accent); border-color: var(--accent); }
.cookie-banner .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.cookie-banner .btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.cookie-banner .link-button { margin-top: 0; }
.cookie-kind { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.cookie-kind p { margin: .25rem 0 0; }
.switch input { width: 2.75rem; height: 1.5rem; accent-color: var(--brand); cursor: pointer; }
.cookie-kind .badge { white-space: nowrap; flex: none; }

/* ---------- sign-in: CPF and the framed capture ---------- */
.accent { color: var(--info-ink); }

/* The page where the face is captured is Orca's, shown in a frame. */
.frame-box { width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; }
.frame-box iframe { display: block; width: 100%; height: min(78vh, 640px); border: 0; }
.panel .error { color: var(--danger); font-size: .875rem; margin: 0; }
