/*
 * WeaveBridge workspace theme.
 * Component mechanics live in style.css; this file owns the visual system.
 * Country files provide the two account accents. All fonts stay local.
 */
:root {
  --bg: #f5f7f8;
  --surface: #fff;
  --panel: #f0f3f5;
  --text: #182b3a;
  --text-muted: #596976;
  --border: #dde4e8;
  --hairline: #e6ebee;
  --border-input: #8797a3;
  --primary: #183b46;
  --primary-press: #102c35;
  --accent: #086d68;
  --accent-tint: #e9f3f1;
  --primary-tint: var(--accent-tint);
  --brand-copper: #b67750;
  --copper-text: #875336;
  --material: #fff;
  --material-blur: none;
  --radius-card: 12px;
  --radius-control: 8px;
  --shadow-card: 0 2px 3px rgba(24, 43, 58, .025);
  --shadow-float: 0 12px 40px rgba(24, 43, 58, .12);
  --header-h: 4rem;
  --sidebar-w: 13rem;
  --tabbar-h: 4.5rem;
}

body { font-size: .9375rem; line-height: 1.6; }
h1, h2, h3 { color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(1.65rem, 2.6vw, 2.125rem); font-weight: 650; line-height: 1.2; letter-spacing: -.04em; }
h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.4; }
h3 { font-size: .9375rem; font-weight: 600; letter-spacing: -.015em; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.eyebrow { color: var(--text-muted); font-size: .75rem; font-weight: 600; letter-spacing: .015em; text-transform: none; }
.fine { font-size: .8125rem; line-height: 1.6; }
.page-sub { margin-top: .5rem; font-size: .875rem; }
.page-head { align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.page-head-text { flex: 1 1 18rem; }
.page { max-width: 82rem; padding: 2rem clamp(1rem, 3vw, 2.5rem) 6.5rem; }
.page-narrow { max-width: 51rem; }
.section-title { margin: 1.75rem 0 1rem; }
.section-head { flex-wrap: wrap; margin-top: 1.75rem; margin-bottom: 1rem; }
.back-link { font-size: .8125rem; color: var(--text-muted); margin-bottom: .75rem; }

/* Persistent frame: a quiet header, task navigation, and a single work area. */
#app-header { background: var(--surface); border: 0; border-bottom: 1px solid var(--border); backdrop-filter: none; }
.header-bar { max-width: 112rem; margin: 0 auto; padding-inline: 1.5rem; }
.header-logo { height: 3.5rem; max-width: 43vw; }
.header-controls { gap: 1rem; }
.header-lang { color: var(--text-muted); font-size: .75rem; }
.header-account { border-left: 1px solid var(--border); border-radius: 0; padding-left: 1rem; gap: .75rem; }
.header-account-company { font-size: .8125rem; font-weight: 600; }
.header-account-person { font-size: .6875rem; margin-top: .1875rem; }
.header-lang, .menu { border-radius: var(--radius-control); }
.avatar { border: 1px solid var(--border); background: var(--panel); color: var(--text); font-weight: 600; }
.header-account .avatar { background: var(--accent-tint); color: var(--accent); border-color: transparent; }
.menu { padding: .5rem; border-color: var(--border); box-shadow: var(--shadow-float); }
.menu-item { font-size: .875rem; }
.sidenav-heading, .sidenav-foot { display: none; }
#app-bottomnav { background: var(--surface); border-color: var(--border); backdrop-filter: none; }
.tabbar { max-width: 40rem; }
.tabbar-link { font-size: .6875rem; gap: .25rem; }
.tabbar-link.is-active { color: var(--accent); font-weight: 650; }
.tabbar-link .nav-icon { padding: .1875rem .875rem; border-radius: 8px; }
.tabbar-link.is-active .nav-icon { background: var(--accent-tint); }
.nav-count { background: var(--primary); }

@media (min-width: 1024px) {
  .app-shell { flex-direction: column; align-items: stretch; }
  #app-sidebar:not(:empty) { position: sticky; top: var(--header-h); z-index: 20; width: 100%; flex: none; height: auto; padding: 0 1.5rem; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); overflow: visible; }
  .sidenav { display: flex; gap: .75rem; max-width: 77rem; margin: 0 auto; }
  .sidenav-link { gap: .625rem; padding: .75rem; min-height: 3.25rem; border-radius: 0; border-bottom: 2px solid transparent; color: var(--text-muted); font-size: .875rem; font-weight: 500; }
  .sidenav-link .icon { width: 1.125rem; height: 1.125rem; color: inherit; }
  .sidenav-link.is-active, .sidenav-link.is-active:hover { color: var(--accent); background: transparent; border-bottom-color: var(--accent); }
  .sidenav-link.is-active .icon { color: inherit; }
  .sidenav-link:hover { background: var(--panel); }
  .page { padding-bottom: 2.5rem; }
  html { scroll-padding-top: calc(var(--header-h) + 4rem); }
}

@media (min-width: 1280px) {
  .app-shell { flex-direction: row; align-items: flex-start; }
  #app-sidebar:not(:empty) { flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); height: calc(100dvh - var(--header-h)); padding: 2rem .875rem; border: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
  .sidenav-heading { display: block; color: var(--text-muted); font-size: .6875rem; font-weight: 500; margin: 0 .875rem .75rem; }
  .sidenav { display: grid; gap: .375rem; margin: 0; }
  .sidenav-link { min-height: 2.875rem; padding: .75rem .875rem; border: 0; border-radius: var(--radius-control); }
  .sidenav-link.is-active, .sidenav-link.is-active:hover { background: var(--accent-tint); font-weight: 600; }
  .sidenav-foot { display: flex; align-items: flex-start; gap: .5rem; margin: auto .875rem 0; padding-top: 2rem; color: var(--text-muted); font-size: .6875rem; line-height: 1.6; }
  .sidenav-foot .icon { margin-top: .125rem; }
  html { scroll-padding-top: calc(var(--header-h) + 1.5rem); }
}

/* Controls and surfaces. Colour indicates an action or a status. */
.btn { min-height: 2.75rem; padding: .625rem 1rem; font-size: .8125rem; line-height: 1.4; font-weight: 600; border: 1px solid transparent; }
.btn-small { min-height: 2.75rem; padding-inline: .875rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(24, 43, 58, .08); }
.btn-secondary { background: var(--surface); border-color: var(--border-input); color: var(--text); }
.btn-secondary:active:not(:disabled) { background: var(--panel); }
.btn-text { color: var(--text-muted); font-size: .8125rem; }
.foc-card, .table-card, .list-card, .stepper { border-color: var(--border); box-shadow: var(--shadow-card); }
.foc-card { padding: 1.5rem; }
.foc-card > h2 { margin-bottom: 1rem; }
.list-row { padding: 1rem 1.25rem; gap: .875rem; }
.list-row-title { font-size: .875rem; font-weight: 550; line-height: 1.5; }
.list-row-sub { font-size: .75rem; margin-top: .1875rem; }
.list-row-end { max-width: 48%; }
.foc-badge { font-size: .6875rem; font-weight: 550; line-height: 1.4; padding: .25rem .5rem; border-radius: 6px; }
.foc-badge .icon { width: .875rem; height: .875rem; }
.step-mark { width: 1.625rem; height: 1.625rem; border-width: 1.5px; }
.step-mark.is-done { background: var(--meets-bg); color: var(--meets-text); border-color: transparent; }
.data-row { gap: .5rem 1.25rem; padding-block: .75rem; font-size: .875rem; }
.data-row dd { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.data-row dt { color: var(--text-muted); }
.field input, .field select, .field textarea { padding: .6875rem .875rem; border-radius: var(--radius-control); font-size: 1rem; background: var(--surface); }
.field label, .choice-group legend { font-size: .8125rem; font-weight: 600; margin-bottom: .5rem; }
.field { margin-bottom: 1.25rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.choice { padding: 1rem; border-color: var(--border-input); font-size: .875rem; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.choice input { accent-color: var(--accent); }
.notice, .legal-note { font-size: .8125rem; line-height: 1.6; }
.notice { background: var(--panel); border-radius: var(--radius-control); }
.legal-note { color: var(--text-muted); }
.chip { min-height: 2.75rem; border-color: var(--border-input); background: var(--surface); font-size: .8125rem; }
.chip.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }
.tabs { gap: 1rem; border-bottom-color: var(--border); }
.tab { min-height: 3rem; padding-inline: .25rem; color: var(--text-muted); font-size: .8125rem; font-weight: 500; }
.tab.is-active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tile { border-color: var(--border); padding: 1.5rem; }
.tile-title { font-size: 1.0625rem; font-weight: 600; }
.tile-text { font-size: .875rem; line-height: 1.65; }
.prose { max-width: 68ch; line-height: 1.75; }
.action-bar { gap: .75rem; }
.action-bar.is-sticky { background: var(--surface); border-top: 1px solid var(--border); backdrop-filter: none; padding-block: 1rem; }
.help-link { color: var(--accent); padding: .75rem; margin: -.75rem -.25rem; }

/* One next step, then context. Waiting never looks like an urgent task. */
.status-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem 1.5rem; margin-bottom: 1.5rem; padding: 1.5rem; border: 1px solid #c9ded9; border-radius: var(--radius-card); background: var(--accent-tint); }
.status-line .eyebrow { color: var(--accent); margin-bottom: .375rem; }
.status-line .status-text { max-width: 65ch; margin: 0; font-size: .875rem; }
.status-text strong { font-weight: 600; }
.status-line .next-actions { margin: 0; }
.status-line .next-switch { grid-column: 1 / -1; margin: .25rem 0 0; padding-top: .875rem; border-color: #c9ded9; font-size: .75rem; }
.status-line.is-waiting { background: var(--surface); border-color: var(--border); }
.status-line.is-waiting .eyebrow { color: var(--text-muted); }
.next-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--accent-tint); color: var(--text); box-shadow: none; }
.next-card h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.35; }
.next-card .eyebrow { color: var(--accent); }
.next-card > p:not(.eyebrow) { font-size: .875rem; }
.next-card .btn-primary, .next-card .btn-primary:hover, .next-card .btn-primary:active { background: var(--primary); color: #fff; }
.next-card.is-waiting, .next-card.is-done { background: var(--surface); border-color: var(--border); }
.next-card.is-waiting .eyebrow { color: var(--text-muted); }
.next-card.is-done .eyebrow { color: var(--meets-text); }
.next-card a:not(.btn) { color: var(--accent); }
.next-switch { color: var(--text-muted); line-height: 1.6; }

/* Process tracker stays readable without repeating the next action. */
.stepper { padding: 1.25rem; border: 1px solid var(--border); }
.stepper-item { font-size: .6875rem; gap: .625rem; }
.stepper-dot { width: 1.75rem; height: 1.75rem; font-size: .75rem; border-width: 1.5px; }
.stepper-item.is-done .stepper-dot { background: var(--accent); border-color: var(--accent); }
.stepper-item.is-done + .stepper-item::before { background: var(--accent); }
.stepper-item.is-current .stepper-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.stepper-status { margin-top: 1.25rem; font-size: .75rem; }
.stepper-now { font-weight: 500; }
.stepper-turn { font-size: .6875rem; font-weight: 550; border-radius: 6px; }
.stepper-turn.is-mine { color: var(--accent); background: var(--accent-tint); }

/* Importer overview: the active order and estimate sit side by side. */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 1fr); gap: 1.25rem; align-items: start; }
.overview-grid > * { min-width: 0; margin: 0; }
.order-block { padding: 1.5rem; }
.order-block > .eyebrow { margin-bottom: .625rem; }
.order-block h2 { font-size: 1.125rem; margin-bottom: .5rem; }
.order-block > .muted { font-size: .8125rem; }
.order-block .stepper { margin: 1.5rem 0 0; padding: 1.5rem 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.order-block .stepper-status { gap: .625rem; align-items: flex-start; }
.duty-summary { padding: 1.5rem; }
.duty-summary h3 { font-size: .8125rem; font-weight: 500; color: var(--text-muted); }
.stake-figure { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 0 1.25rem; margin: 0; }
.stake-value { font-size: clamp(1.875rem, 2.5vw, 2.375rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.stake-label { color: var(--text-muted); font-size: .6875rem; line-height: 1.5; }
.duty-summary .data-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: .5rem; font-size: .75rem; }
.duty-summary .data-row dt { flex: 1; font-size: inherit; }
.duty-summary .data-row dd { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.duty-summary > .fine { margin-top: 1rem; font-size: .75rem; }
.readiness-details { border-top: 1px solid var(--border); margin-top: 1.25rem; }
.readiness-details > summary, .activity-details > summary { display: flex; align-items: center; gap: .75rem; list-style: none; cursor: pointer; min-height: 3.5rem; padding-block: 1rem; font-size: .8125rem; font-weight: 550; }
.readiness-details > summary::-webkit-details-marker,
.activity-details > summary::-webkit-details-marker { display: none; }
.disclosure-meta { color: var(--text-muted); font-size: .6875rem; font-weight: 400; margin-left: auto; text-align: right; }
.disclosure-chevron { margin-left: auto; transition: transform 150ms ease; }
.disclosure-meta + .disclosure-chevron { margin-left: 0; }
details[open] > summary .disclosure-chevron { transform: rotate(180deg); }
.readiness-body > .fine { margin: 0 0 1rem; }
.readiness-body .list-card { border: 0; border-radius: 0; box-shadow: none; }
.readiness-body .list-row { padding: .75rem 0; }
.readiness-body .list-row-title { font-size: .8125rem; }
.readiness-body .list-row-sub, .readiness-body .list-row-end { font-size: .6875rem; }
.activity-details { margin-top: 1.5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.activity-details > summary { padding-inline: .25rem; }
.activity-body { padding: .5rem .25rem 1.25rem; }
.history-item { gap: .75rem; font-size: .8125rem; padding-block: .875rem; }
.history-time { font-size: .6875rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1rem; }
.stat { display: flex; align-items: baseline; gap: .375rem; padding: 0; background: none; border: 0; border-radius: 0; }
.stat-value { display: inline; color: var(--text); font-size: .8125rem; font-weight: 650; letter-spacing: 0; }
.stat-label { display: inline; font-size: .75rem; color: var(--text-muted); }
.data-table { table-layout: fixed; }
.data-table th { background: #f9fafb; font-size: .75rem; font-weight: 550; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.data-table th, .data-table td { padding: 1rem; overflow-wrap: anywhere; }
.data-table td { font-size: .8125rem; line-height: 1.6; }
.styles-table th:first-child { width: 20%; }
.styles-table th:nth-child(2) { width: 17%; }
.styles-table th:nth-child(3) { width: 15%; }
.styles-table th:nth-child(4) { width: 18%; }
.styles-table th:nth-child(5) { width: 19%; }
.styles-table th:last-child { width: 11%; }
.cell-title { font-size: .875rem; font-weight: 600; line-height: 1.5; }
.cell-sub { font-size: .75rem; margin-top: .375rem; }
.table-card + .fine { margin-top: .875rem; font-size: .6875rem; }

/* Start page: explain the task, then choose a company. */
.welcome { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 3rem 5rem; max-width: 78rem; padding: clamp(2rem, 6vh, 5rem) 2rem 2.5rem; }
.welcome-hero { align-self: center; padding: 0 0 2rem; }
.welcome-hero > .eyebrow { font-size: .6875rem; color: var(--accent); }
.welcome-hero .display { max-width: 16ch; font-size: clamp(2.25rem, 3.7vw, 3.5rem); line-height: 1.08; font-weight: 550; letter-spacing: -.055em; margin: 1.25rem 0 1.5rem; text-wrap: balance; }
.welcome-lead { font-size: 1rem; max-width: 43ch; line-height: 1.8; }
.welcome-journey { display: grid; gap: 1rem; margin-top: 2rem; }
.welcome-journey li { display: flex; align-items: center; gap: 1rem; font-size: .8125rem; }
.journey-number { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border: 1px solid var(--border); border-radius: 50%; color: var(--text-muted); font-size: .625rem; font-variant-numeric: tabular-nums; }
.welcome-accounts > h2 { font-size: .875rem; margin: 0 0 1rem; }
.account-grid { grid-template-columns: 1fr; gap: 1rem; }
.account-card { gap: .25rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.account-card-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.account-card-icon { display: inline-flex; padding: .5rem; margin: 0; border-radius: 8px; color: var(--accent); background: var(--accent-tint); }
.account-card-icon .icon { width: 1.125rem; height: 1.125rem; }
.account-card-role { font-size: .6875rem; font-weight: 500; color: var(--text-muted); }
.account-card-company { font-size: 1.25rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.35; }
.account-card-does { margin: .25rem 0 1rem; font-size: .8125rem; line-height: 1.6; max-width: 48ch; }
.account-card-person { font-size: .6875rem; line-height: 1.6; gap: .625rem; }
.account-card-person .avatar { width: 1.625rem; height: 1.625rem; font-size: .5625rem; }
.account-card-cta { display: flex; width: 100%; justify-content: space-between; border-top: 1px solid var(--border); padding-top: .875rem; margin-top: 1rem; font-size: .8125rem; color: var(--accent); font-weight: 600; }
.account-card[data-account='producer'] .account-card-icon { background: #f7eee6; color: var(--copper-text); }
.account-card[data-account='producer'] .account-card-cta { color: var(--copper-text); }
.welcome-foot { grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: .25rem 2rem; margin: 0; padding-top: 1.5rem; font-size: .6875rem; line-height: 1.7; }
.welcome-foot p { grid-column: 1; }
.welcome-foot .btn-text { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: end; font-size: .75rem; margin: 0; }
.signin { max-width: 30rem; padding-top: 3rem; }
.signin-card { padding: 2rem; }
.signin-who { gap: 1rem; margin-bottom: 2rem; }
.signin-who h1 { font-size: 1.5rem; }
.signin-who .muted { font-size: .8125rem; margin-top: .25rem; }
.signin-card .fine { font-size: .75rem; }
.app-footer { display: grid; grid-template-columns: 1fr 1.3fr 1.2fr; gap: 1.5rem; margin-top: 2.5rem; padding: 1.5rem 0 0; border-top: 1px solid var(--border); background: none; color: var(--text-muted); font-size: .6875rem; line-height: 1.7; }
.app-footer strong { color: var(--text); font-weight: 600; }

@media (hover: hover) {
  .btn-secondary:hover:not(:disabled) { background: var(--panel); }
  .account-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(24, 43, 58, .06); transform: translateY(-2px); }
  .account-card[data-account='producer']:hover { border-color: var(--brand-copper); }
  .readiness-details > summary:hover, .activity-details > summary:hover { color: var(--accent); }
}

/* Tablet layouts keep generous reading width and avoid compressed columns. */
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr); gap: 1rem; }
  .order-block, .duty-summary { padding: 1.25rem; }
  .welcome { gap: 3rem; }
}
@media (max-width: 899px) {
  .overview-grid { grid-template-columns: 1fr; }
  .duty-summary { display: grid; grid-template-columns: 1fr 1.25fr; column-gap: 2rem; }
  .duty-summary h3 { grid-column: 1; }
  .duty-summary .stake-figure { grid-column: 1; align-self: start; }
  .duty-summary .data-list { grid-column: 2; grid-row: 1 / 3; }
  .duty-summary > .fine { grid-column: 1 / -1; margin-top: .75rem; }
  .welcome { max-width: 42rem; grid-template-columns: 1fr; gap: 2.5rem; }
  .welcome-hero { padding: 0; }
  .welcome-hero .display { max-width: 18ch; font-size: 3rem; }
  .welcome-journey { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
  .welcome-journey li { font-size: .6875rem; gap: .5rem; }
  .welcome-foot { grid-template-columns: 1fr; }
  .welcome-foot .btn-text { grid-column: 1; grid-row: auto; justify-self: start; margin-left: -.5rem; }
  .data-table th, .data-table td { padding: .75rem; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .page { padding-top: 1.5rem; }
  .data-table, .data-table tbody { width: 100%; }
  .data-table tr { padding: .5rem 1rem; margin-bottom: .875rem; border-color: var(--border); }
  .data-table td { padding: .625rem 0; font-size: .8125rem; }
  .data-table td::before { flex: 0 1 40%; min-width: 0; font-size: .6875rem; overflow-wrap: anywhere; }
  .data-table td > * { min-width: 0; }
  .data-table td.cell-main { padding: .75rem 0; }
  .cell-title { font-size: .9375rem; }
  .cell-sub { font-size: .75rem; }
  .data-table td .foc-badge { max-width: 60%; text-align: left; }
  .styles-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; }
  .styles-table td { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .5rem; text-align: left; }
  .styles-table td.cell-main, .styles-table td:nth-child(2) { grid-column: 1 / -1; }
  .styles-table td:nth-child(2) { flex-direction: row; justify-content: space-between; gap: 1rem; }
  .styles-table td:nth-child(2)::before { flex-basis: auto; }
  .styles-table td::before { flex: none; }
  .styles-table td .foc-badge { max-width: 100%; }
  .styles-table td:nth-last-child(2) { border-bottom: 0; }
  .glossary-table td::before { flex: 0 0 5rem; }
  .stat-row { gap: .375rem 1rem; }
  .app-footer { grid-template-columns: 1fr; gap: .75rem; margin-top: 2rem; padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 560px) {
  .header-bar { padding-inline: 1rem; gap: .5rem; }
  .header-controls { gap: .25rem; }
  .header-account { gap: .25rem; padding-left: .5rem; }
  .header-account > .icon { display: none; }
  .header-logo { height: 3rem; }
  .header-lang { padding-inline: .5rem; }
  .page-head { gap: .875rem; margin-bottom: 1.25rem; }
  .page-head-text { flex-basis: 100%; }
  .page-actions { width: 100%; }
  .page-actions .btn-primary { width: 100%; }
  .page-sub { font-size: .8125rem; line-height: 1.65; }
  .status-line { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }
  .status-line .next-actions .btn { width: 100%; }
  .status-line .next-switch { margin-top: 0; }
  .next-card { padding: 1.25rem; }
  .next-card .next-actions .btn { width: 100%; }
  .next-card h2 { font-size: 1.25rem; }
  .foc-card { padding: 1.25rem; }
  .duty-summary { display: block; }
  .duty-summary .data-row { font-size: .8125rem; }
  .stake-value { font-size: 2rem; }
  .stake-label, .duty-summary > .fine { font-size: .75rem; }
  .order-block .stepper { padding-top: 1.25rem; margin-top: 1.25rem; }
  .stepper-status { align-items: flex-start; flex-direction: column; }
  .readiness-details > summary { flex-wrap: wrap; gap: .375rem .5rem; }
  .disclosure-meta { margin-left: 0; }
  .readiness-details .disclosure-chevron { margin-left: auto; }
  .list-row { padding: 1rem; }
  .list-card .list-row { flex-wrap: wrap; }
  .list-card .list-row > .list-row-main { flex: 1 1 65%; }
  .list-card .list-row > .list-row-end, .forum-row .forum-meta { flex: 1 1 100%; max-width: 100%; justify-content: flex-start; }
  .list-card .step-mark ~ .list-row-end { padding-left: 2.5rem; }
  .row-chevron { display: none; }
  .welcome { padding: 2.25rem 1.25rem 2rem; gap: 2rem; }
  .welcome-hero .display { font-size: clamp(2.25rem, 9.5vw, 3rem); max-width: 18ch; margin: 1rem 0; }
  .welcome-lead { font-size: .9375rem; line-height: 1.75; }
  .welcome-journey { display: grid; gap: .75rem; margin-top: 1.5rem; }
  .welcome-journey li { font-size: .8125rem; gap: .75rem; }
  .account-card { padding: 1.25rem; }
  .account-card-company { font-size: 1.1875rem; }
  .account-card-role { font-size: .75rem; }
  .account-card-person { font-size: .75rem; }
  .welcome-foot { font-size: .75rem; }
  .signin { padding-top: 1.5rem; }
  .signin-card { padding: 1.5rem; }
  .action-bar .btn { flex: 1 1 8rem; }
}

@media (prefers-contrast: more) {
  :root { --text-muted: #354754; --border: #8797a3; --hairline: #8797a3; }
}
@media (prefers-reduced-motion: reduce) {
  .account-card:hover { transform: none; }
}
@media print {
  body { background: #fff; }
  .app-shell, .overview-grid { display: block; }
  .page { max-width: none; padding: 0; }
  .app-footer, .sidenav-heading, .sidenav-foot { display: none; }
  .foc-card, .table-card, .list-card { box-shadow: none; }
}

/* Shared work surfaces and the two company entry points. */
@media screen {
  :root { --bg: #eaf0ee; --panel: #f0f5f3; --border: #d6e1de; --hairline: #e3ebe8; --accent-tint: #e4f1ec; }
  body[data-country='de'] { --panel: #f0f5f3; --accent-tint: #e4f1ec; }
  .app-shell { background: var(--bg); }
  #app-header { box-shadow: 0 1px 0 rgba(25, 61, 55, .03); }
  .page { padding-top: 2.5rem; }
  .page-head h1 { letter-spacing: -.035em; }
  .page-sub { color: #506a66; }
  .foc-card, .table-card, .list-card, .stepper { box-shadow: 0 2px 8px rgba(31, 68, 59, .04); }

  .welcome { display: block; max-width: 72rem; padding: 4.25rem 2rem 2.5rem; }
  .welcome-hero { max-width: 45rem; padding: 0; margin-bottom: 3rem; }
  .welcome-hero .display { max-width: 20ch; margin: .875rem 0 1rem; font-size: clamp(2.5rem, 4vw, 3.75rem); }
  .welcome-lead { max-width: 62ch; line-height: 1.7; }
  .welcome-accounts > h2 { margin-bottom: 1rem; font-size: 1rem; }
  .account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .account-card { padding: 1.75rem; min-height: 18.5rem; border: 1px solid #d4e1dd; background: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(26, 65, 56, .045); }
  .account-card-top { gap: .875rem; margin: 0 0 1.5rem; }
  .country-flag { display: inline-block; flex: 0 0 auto; width: 3rem; height: 2rem; overflow: hidden; border: 1px solid rgba(0,0,0,.12); border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.09); }
  .flag-de { background: linear-gradient(to bottom, #1b1b1b 0 33.333%, #d52b1e 33.333% 66.666%, #f7c948 66.666% 100%); }
  .flag-id { background: linear-gradient(to bottom, #d92832 0 50%, #fff 50% 100%); }
  .account-card-role { color: #526a64; font-size: .8125rem; font-weight: 600; }
  .account-card-company { font-size: 1.4rem; }
  .account-card-does { font-size: .9375rem; margin: .5rem 0 1.25rem; }
  .account-card-person { font-size: .8125rem; }
  .account-card-cta, .account-card[data-account='producer'] .account-card-cta { width: auto; gap: 1rem; padding: .625rem .875rem; margin-top: 1.5rem; border: 0; border-radius: 8px; background: #e5f1ed; color: #075e59; font-size: .8125rem; }
  .account-card:hover .account-card-cta { background: #d6ebe4; }
  .welcome-foot { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: 3rem; padding-top: 1.25rem; color: #526a64; }
  .welcome-foot p { flex: 1 1 35rem; }
  .welcome-foot .btn-text { margin: 0; }

  .status-line { grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem 1rem; padding: 1.5rem; border-color: #c6ded5; background: #dceee7; }
  .status-line.is-waiting { background: #f7faf8; border-color: #d6e1de; }
  .status-symbol, .section-symbol { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 10px; background: #c7e4d9; color: #086d68; }
  .status-symbol { align-self: start; }
  .status-line.is-waiting .status-symbol { background: #e4eeeb; }
  .status-line .eyebrow { margin-bottom: .2rem; }
  .status-line .status-title { margin: 0 0 .25rem; font-size: 1.0625rem; line-height: 1.35; }
  .status-line .status-text { color: #415c57; max-width: 66ch; }
  .status-line .next-switch { grid-column: 2 / -1; }
  .overview-section-heading { display: flex; align-items: center; gap: .875rem; margin: 2rem 0 1rem; }
  .overview-section-heading .section-title { margin: 0; }
  .section-symbol { width: 2.5rem; height: 2.5rem; background: #d7e8e2; }
  .section-symbol .icon { width: 1.2rem; height: 1.2rem; }
  .stat-row { padding: .75rem 1rem; margin-bottom: .75rem; background: #dfeae6; border-radius: 8px; }
  .stat-label { color: #415b56; }
  .order-block, .duty-summary { border-color: #d6e1de; }
  .duty-summary { background: #f8fbf9; }
  .data-table th { background: #f0f5f3; }
  .data-table tbody tr:hover { background: #f5f9f7; }
  .empty-request { padding: 2rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card); }
  .empty-request .empty-state { padding: 1.25rem 1rem; border: 0; background: transparent; }
  .empty-request .empty-state-icon { background: #e4f1ec; color: #086d68; }
  .empty-request > .next-switch { margin: 1rem 0 0; padding: 1rem; border: 0; border-radius: 8px; background: #f0f5f3; }
  .page-tasks { max-width: 72rem; }
  .task-overview { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr); align-items: stretch; gap: 1.25rem; }
  .task-main { min-width: 0; }
  .task-main .next-card { background: #dceee7; border-color: #c6ded5; }
  .task-main .next-card.is-waiting, .task-main .next-card.is-done { background: #f7faf8; border-color: var(--border); }
  .task-main .stepper { margin-bottom: 0; }
  .request-card { align-self: stretch; margin: 0; background: #f8fbf9; }
  .request-card > .eyebrow { margin-bottom: .75rem; }
  .request-card .request-due { display: flex; align-items: flex-start; gap: .5rem; margin-top: 1.25rem; padding: .875rem; border-radius: 8px; background: #eaf2ef; font-size: .8125rem; }
  .request-card .disclosure { margin-top: 1rem; }
  .page-tasks .section-head { margin-top: 2rem; }
  .page-tasks .group-label { margin-top: 1.25rem; color: #415b56; }
  @media (max-width: 900px) {
    .task-overview { grid-template-columns: 1fr; }
    .request-card { margin-bottom: 0; }
  }
  @media (max-width: 700px) {
    .welcome { padding: 2.5rem 1.25rem 2rem; }
    .welcome-hero { margin-bottom: 2rem; }
    .welcome-hero .display { font-size: clamp(2.15rem, 9vw, 3rem); }
    .account-grid { grid-template-columns: 1fr; gap: .875rem; }
    .account-card { min-height: 0; padding: 1.25rem; }
    .account-card-top { margin-bottom: 1rem; }
    .account-card-company { font-size: 1.1875rem; }
    .account-card-does { font-size: .875rem; }
    .account-card-cta { margin-top: 1rem; }
    .welcome-foot { margin-top: 2rem; }
  }
  @media (max-width: 560px) {
    .page { padding-top: 1.5rem; }
    .status-line { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .75rem; padding: 1.25rem; }
    .status-line .next-actions, .status-line .next-switch { grid-column: 1 / -1; }
    .status-line .next-actions { margin-top: .25rem; }
    .status-symbol { width: 2.5rem; height: 2.5rem; }
    .empty-request { padding: 1.25rem; }
    .stat-row { gap: .5rem 1rem; }
  }
}

/* The parts the browser draws follow the palette too. */
::selection { background: color-mix(in srgb, var(--accent) 24%, #fff); color: var(--text); }
input, textarea { caret-color: var(--accent); }
.welcome-foot strong { color: var(--text); font-weight: 600; }
