/* Direction A of the second pass, "the journey", in the visual language of the corridor, Business Registration and
   Business Facilitation sites: their tokens, read on 04-11-2026. Montserrat for titles, Inter for the interface; blue
   for information, coral for the one action. The coral and the small blues are darkened where contrast requires it. */
@font-face { font-family: 'Inter'; src: url('fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --brand: #3b84b9; --brand-deep: #28658f; --action: #ad5645; --action-hover: #96493a; --mark: #e08170;
  --gray-0: #fff; --gray-50: #f5f7fa; --gray-100: #f0f4f7; --gray-200: #e0e6eb; --gray-300: #c9d2da;
  --gray-500: #637381; --gray-600: #526273; --gray-800: #263746; --gray-900: #1d2a33;
  --highlight: #edf5fa; --gap-ink: #8a5a00; --gap-soft: #fdf3e1; --bad-ink: #a12d1f;
  --r-control: 10px; --r-card: 14px; --r-pill: 999px;
  --shadow-float: 0 8px 28px rgb(29 42 51 / .09);
  --font: 'Inter', system-ui, -apple-system, sans-serif; --title: 'Montserrat', 'Inter', sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--gray-100); color: var(--gray-800); font: 1rem/1.5 var(--font); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.print-only { display: none; }

/* The header, and the line of the total that hangs under it */
.top-wrap { position: sticky; top: 0; z-index: 20; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray-200); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seal { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-deep); color: #fff; font: 700 .72rem var(--title); letter-spacing: .02em; }
.brand b { font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.brand b span { font-weight: 400; }
.brand sup { color: var(--mark); font-size: .62rem; font-weight: 600; letter-spacing: .08em; margin-left: 4px; }
.langs { flex: none; display: flex; padding: 3px; border-radius: var(--r-pill); background: var(--gray-100); font-size: .8rem; font-weight: 600; }
.langs button { border: 0; background: none; padding: 3px 10px; border-radius: var(--r-pill); color: var(--gray-600); cursor: pointer; font-weight: 600; }
.langs button[aria-pressed="true"] { background: var(--gray-0); color: var(--gray-800); box-shadow: 0 1px 3px rgb(29 42 51 / .12); }
.embed .top { display: none; }
.totalline { position: absolute; left: 0; right: 0; top: 100%; background: var(--gray-0); border-bottom: 1px solid var(--gray-200); box-shadow: 0 4px 14px rgb(29 42 51 / .08); font-size: .92rem; }
.totalline-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; max-width: 1168px; margin: 0 auto; padding: 6px 24px; }
.totalline b { color: var(--brand-deep); font-weight: 700; }

.eyebrow { font: 700 .74rem var(--title); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-deep); }
h1.title { font: 600 1.9rem/1.2 var(--title); color: var(--gray-800); margin: 6px 0 0; letter-spacing: -.01em; }
h2.sec { font: 700 1.3rem/1.3 var(--title); margin-bottom: 12px; }

/* Controls */
.card { background: var(--gray-0); border-radius: var(--r-card); box-shadow: var(--shadow-float); }
.pad { padding: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 26px; border: 0; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn.go { background: var(--action); color: #fff; }
.btn.go:hover { background: var(--action-hover); }
.btn.go.busy { cursor: progress; background: var(--action-hover); }
.btn.line { background: var(--gray-0); box-shadow: inset 0 0 0 1.5px var(--gray-300); color: var(--gray-800); }
.btn.line:hover { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-deep); }
.btn.small { min-height: 34px; padding: 4px 14px; font-size: .85rem; }
.link { background: none; border: 0; padding: 0; color: var(--brand-deep); font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.link:hover { text-decoration-color: currentColor; }
.link.small { font-size: .85rem; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.chip.warn { background: var(--gap-soft); color: var(--gap-ink); }
.chip.info { background: var(--highlight); color: var(--brand-deep); }

.field { display: block; min-width: 0; }
.label { display: block; font-size: .85rem; font-weight: 500; color: var(--gray-600); margin-bottom: 4px; }
.ctl { position: relative; display: flex; align-items: center; min-height: 44px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-control); }
.ctl:focus-within { border-color: var(--brand-deep); background: var(--gray-0); }
.ctl input, .ctl select { flex: 1; width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 0; background: transparent; outline: 0; font-size: 1rem; }
.ctl .unit { flex: none; padding: 0 12px; color: var(--gray-600); font-size: .8rem; font-weight: 600; }
.ctl .unit:empty { display: none; }
.ctl select.own { flex: none; width: auto; padding: 0 8px; color: var(--gray-600); font-size: .85rem; font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.err { display: block; margin-top: 4px; color: var(--bad-ink); font-size: .82rem; font-weight: 500; }
.bad .ctl { border-color: var(--bad-ink); box-shadow: inset 0 0 0 1px var(--bad-ink); }

.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--gray-200); }
.seg button { border: 0; background: none; padding: 6px 20px; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; color: var(--gray-600); }
.seg button[aria-pressed="true"] { background: var(--gray-0); color: var(--brand-deep); box-shadow: 0 1px 3px rgb(29 42 51 / .14); }

/* The product */
.search { position: relative; }
.list-note { padding: 6px 12px; border-top: 1px solid var(--gray-100); font-size: .78rem; color: var(--gray-600); }
.clear { flex: none; width: 28px; height: 28px; margin-right: 4px; border: 0; border-radius: 50%; background: none; color: var(--gray-600); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.clear:hover { background: var(--gray-100); }
.list-pop { position: absolute; z-index: 15; left: -4px; width: min(620px, calc(100vw - 48px)); top: calc(100% + 8px); background: var(--gray-0); border-radius: var(--r-control); box-shadow: var(--shadow-float); border: 1px solid var(--gray-200); overflow: hidden; }
.list { max-height: 320px; overflow: auto; }
.opt { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 10px 12px; cursor: pointer; font-size: .9rem; border-bottom: 1px solid var(--gray-100); }
.opt:last-child { border-bottom: 0; }
.opt:hover, .opt[aria-selected="true"] { background: var(--highlight); }
.opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--brand-deep); }
.opt code { font: 600 .84rem var(--font); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.list .msg { padding: 12px; color: var(--gray-600); font-size: .9rem; }
.boxes { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.boxes i { font: 600 .8rem var(--font); padding: 2px 7px; border-radius: 6px; background: var(--gray-0); color: var(--brand-deep); box-shadow: inset 0 0 0 1px #cfe0ec; }
.boxes i.nat { background: var(--gap-soft); color: var(--gap-ink); box-shadow: none; }
/* The product chosen: one strip, its code beside its description, the first thing read under the questions. */
.picked { display: flex; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: var(--r-control); border-left: 4px solid var(--brand); background: var(--gray-0); box-shadow: var(--shadow-float); }
.picked .boxes { flex: none; flex-wrap: nowrap; }
.picked .boxes i { font-size: .92rem; padding: 3px 8px; }
.picked p { margin: 0; min-width: 0; font-size: .95rem; font-weight: 600; color: var(--gray-900); }
.picked p .link { font-weight: 500; }

/* The band */
.a-band { padding: 22px 24px 28px; background: linear-gradient(180deg, var(--highlight), var(--gray-100)); }
.a-band > div { max-width: 1120px; margin: 0 auto; }
.embed .a-band { padding-top: 14px; }
.a-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.a-plan { display: grid; align-items: stretch; padding: 8px; border-radius: var(--r-card); background: var(--gray-0); box-shadow: var(--shadow-float); }
.a-plan.four { grid-template-columns: 2.2fr 1.5fr 1.1fr auto; }
.a-plan.five { grid-template-columns: 1.9fr 1.3fr .85fr 1.1fr 1.15fr auto; }
.a-plan.six { grid-template-columns: 1.35fr .9fr .9fr 1.15fr 1.15fr auto; }
.a-plan.six .a-product { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--gray-200); }
.a-cell { padding: 8px 12px; border-right: 1px solid var(--gray-200); min-width: 0; }
.required-mark { padding: 0 6px; border-radius: var(--r-pill); background: var(--highlight); color: var(--brand-deep); font-size: .72rem; font-weight: 600; }
.a-cell .label { margin-bottom: 0; }
.a-cell .ctl { min-height: 32px; background: none; border: 0; border-radius: 6px; }
.a-cell .ctl:focus-within { box-shadow: 0 2px 0 var(--brand-deep); border-radius: 0; }
.a-cell .ctl input, .a-cell .ctl select { height: 32px; padding: 0; font-size: 1.04rem; font-weight: 500; }
/* A native list indents its text: drawn by hand, it starts where the box's text starts. */
.a-cell .ctl select { appearance: none; padding-right: 16px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 5px center, right 0 center; background-size: 5px 5px; background-repeat: no-repeat; }
.a-cell .ctl .unit { padding: 0 0 0 6px; }
.cur-wrap { flex: none; }
.a-cell .ctl select.cur { width: auto; margin-left: 6px; color: var(--gray-600); font-size: .85rem; font-weight: 600; }
.cur-wrap.bad select.cur { color: var(--bad-ink); }
.a-cell.bad .label { color: var(--bad-ink); }
.a-cell.bad .ctl { box-shadow: 0 2px 0 var(--bad-ink); border-radius: 0; }
.a-cell:nth-last-child(2) { border-right: 0; }
.box.bad .label { color: var(--bad-ink); }
.a-go { display: flex; align-items: center; padding: 4px 8px; }
.missing { margin-top: 10px; padding: 8px 14px; border-radius: var(--r-control); background: var(--gap-soft); color: var(--gap-ink); font-size: .9rem; font-weight: 600; }
.a-more { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 24px; }
#picked-slot { flex: 1 1 100%; min-width: 0; }
#picked-slot:empty { display: none; }
.a-links { flex: 0 1 auto; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .92rem; }
.a-extra { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; }
.a-group { padding: 16px; }
.a-group h3 { margin: 0 0 12px; font-family: var(--title); font-size: .95rem; font-weight: 600; color: var(--brand-deep); }
.a-group-boxes { display: grid; gap: 12px; }
.rates-before .label { font-weight: 600; margin-bottom: 6px; }
.a-body { max-width: 1168px; margin: 0 auto; padding: 22px 24px 64px; }
.empty-hint { padding: 10px 2px; color: var(--gray-600); }
.load-failed { max-width: 720px; margin: 40px auto; }

/* The result */
#result { scroll-margin-top: 110px; outline: none; }
#total-card { scroll-margin-top: 110px; outline: none; }
.result.stale .dim { opacity: .55; }
.stale-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r-control); background: var(--gap-soft); color: var(--gap-ink); font-weight: 600; font-size: .92rem; }
.a-leg { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; padding: 20px 22px; }
.total-k { font-size: .88rem; color: var(--gray-600); }
.total-v { font: 700 2.1rem/1.15 var(--title); color: var(--brand-deep); overflow-wrap: anywhere; }
.total-v small { font: 600 1rem var(--title); }
.beside { font-size: .92rem; color: var(--gray-600); margin-top: 2px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 14px; font-size: .9rem; }
.facts span { color: var(--gray-600); margin-right: 6px; }
.facts b { font-weight: 700; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.a-expand { width: 100%; border: 0; border-top: 1px solid var(--gray-200); background: var(--gray-50); padding: 12px 22px; display: flex; justify-content: space-between; font-weight: 600; cursor: pointer; }
.a-expand:hover { background: var(--highlight); }
.a-expand[aria-expanded="false"] { border-radius: 0 0 var(--r-card) var(--r-card); }
.fold-body { padding: 14px 22px 20px; }
.fold-body.closed { display: none; }
table.lines { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lines th { font-size: .8rem; font-weight: 600; color: var(--gray-600); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gray-200); }
.lines td { padding: 9px 10px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.lines .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines tr.zero td { color: var(--gray-500); }
.lines tr.sum td { font-weight: 700; border-top: 2px solid var(--gray-300); border-bottom: 0; }
.lines .chip { margin-left: 6px; }
.sub { font-size: .85rem; color: var(--gray-600); font-weight: 400; }
.note { padding: 12px 14px; border-radius: var(--r-control); background: var(--highlight); color: var(--brand-deep); font-size: .9rem; }
.note.warm { background: var(--gap-soft); color: var(--gap-ink); }
.note.warm .link { color: var(--gap-ink); text-decoration-color: currentColor; }
.note b { font-weight: 700; }
.note.cheaper { margin-top: 14px; }
.messages { margin: 6px 0 0; padding-left: 18px; }
.quiet { padding-left: 12px; border-left: 3px solid var(--gray-300); color: var(--gray-600); font-size: .88rem; }
.stack { display: grid; gap: 14px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--gray-300); border-top-color: var(--brand-deep); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
.spin.light { border-color: rgb(255 255 255 / .4); border-top-color: #fff; margin-right: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* Too narrow for one line: the product on its own, the other questions under it */
@media (max-width: 1040px) {
  .a-plan.four, .a-plan.five, .a-plan.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .a-extra { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-plan .a-cell { grid-column: span 2; border-right: 0; }
  .a-plan.five .a-cell[data-cell="origin"], .a-plan.five .a-cell[data-cell="destination"] { grid-column: span 3; }
  .a-plan .a-product { grid-column: 1 / -1; border-bottom: 1px solid var(--gray-200); }
  .a-go { grid-column: span 3; justify-content: flex-end; }
  .a-plan.four .a-go, .a-plan.six .a-go { grid-column: span 2; }
}

/* A phone: everything stacked */
@media (max-width: 720px) {
  .a-body { padding: 18px 16px 72px; }
  .top { padding: 10px 16px; }
  .totalline-in { padding: 6px 16px; }
  .a-band { padding: 14px 16px 18px; }
  h1.title { font-size: 1.5rem; }
  .total-v { font-size: 1.6rem; }
  .brand b span { display: none; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .a-plan.four, .a-plan.five, .a-plan.six { grid-template-columns: minmax(0, 1fr); }
  .a-extra { grid-template-columns: minmax(0, 1fr); }
  .a-plan .a-cell, .a-plan.five .a-cell[data-cell="origin"], .a-plan.five .a-cell[data-cell="destination"] { grid-column: auto; border-bottom: 1px solid var(--gray-200); }
  .a-cell:nth-last-child(2) { border-bottom: 0; }
  .a-go, .a-plan.four .a-go, .a-plan.six .a-go { grid-column: auto; padding: 8px; }
  .a-go .btn { width: 100%; }
  .a-links { margin-left: 0; align-items: flex-start; }
  .picked { flex-wrap: wrap; }
  .a-leg { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .a-expand { padding: 12px 16px; }
  .fold-body { padding: 12px 16px 16px; }
  .list-pop { left: -6px; width: calc(100vw - 48px); }
  /* A table of charges becomes rows of two lines. */
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 9px 2px; border-bottom: 1px solid var(--gray-100); }
  .lines td { padding: 0; border: 0; white-space: normal; }
  .lines td.name { grid-column: 1; }
  .lines td.amt { grid-column: 2; grid-row: 1; font-weight: 600; }
  .lines td.base { grid-column: 1 / -1; color: var(--gray-600); font-size: .84rem; text-align: left; }
  .lines td.base::before { content: attr(data-k) ' '; }
  .lines tr.sum { border-bottom: 0; border-top: 2px solid var(--gray-300); }
  .lines td.empty { display: none; }
  .lines tr.sum td { border-top: 0; }
}

/* On paper: the result, its notice and the product, every line unfolded */
@media print {
  .top-wrap, .a-band, .noprint, #reshead { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .a-body { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid var(--gray-200); }
  .print-only { display: block; }
  .print-product { margin-bottom: 6px; }
  .print-product p { margin-top: 4px; }
  .fold-body, .fold-body.closed { display: grid !important; }
  .result.stale .dim { opacity: 1; }
  .chip, .boxes i, .note { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.lines { page-break-inside: auto; }
  .lines tr { page-break-inside: avoid; }
}

/* A preview framed by the administration: a thin banner, and the page when it is not open yet. */
.preview-banner { margin: 0; padding: 4px 16px; font-size: 12px; text-align: center; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); color: var(--gray-600); }
.not-open { margin: 48px auto; max-width: 560px; padding: 0 16px; font-size: 18px; text-align: center; }
