/* ==========================================================
   Corporate Gifting OS
   Visual language: institutional, not consumer. Built for
   procurement committees and audit reviewers — hairline rules
   instead of drop shadows, one restrained accent, serif
   headings for document gravitas, tabular figures everywhere
   a number appears.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces — cool paper, no warmth */
  --bg:        #EFF1F4;
  --surface:   #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EDEFF3;

  /* Ink */
  --ink:       #0D1520;
  --ink-2:     #3D4A5C;
  --ink-3:     #6B7889;
  --ink-4:     #97A2B0;

  /* Rules */
  --line:      #DFE3E9;
  --line-2:    #C6CCD6;
  --line-3:    #AAB3C0;

  /* Single institutional accent */
  --brand:      #12457B;
  --brand-dk:   #0C3159;
  --brand-lt:   #E8EFF7;

  /* Semantic — muted, print-safe, never neon */
  --pos:        #1D6B4F;
  --pos-tint:   #E6F0EB;
  --warn:       #8A6100;
  --warn-tint:  #F7F0DF;
  --risk:       #8C2A22;
  --risk-tint:  #F6E9E7;
  --commit:     #4A5A70;   /* reserved but unspent */
  --commit-tint:#E9ECF1;

  --display: 'Source Serif 4', Georgia, serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --rail: 244px;
  --r:  4px;
  --r2: 3px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -.006em;
  line-height: 1.22;
  color: var(--ink);
}
h1 { font-size: 1.52rem; font-weight: 600; }
h2 { font-size: 1.08rem; font-weight: 600; }
h3 { font-size: .95rem;  font-weight: 600; }

code, .mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

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

.rail {
  background: var(--ink);
  color: #B4BECC;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: .6rem; padding: 1.15rem 1.15rem .55rem; }
.brand__mark {
  width: 20px; height: 20px; flex: none; border-radius: 2px;
  background: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  position: relative;
}
.brand__mark::after {
  content: ''; position: absolute; inset: 5px 5px auto 5px; height: 2px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 4px 0 rgba(255,255,255,.4);
}
.brand__text {
  font-family: var(--display); font-size: 1rem; font-weight: 600; color: #fff;
  letter-spacing: -.01em;
}
.brand__text strong { font-weight: 700; }

.railmeta {
  padding: 0 1.15rem .85rem;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .16em;
  text-transform: uppercase; color: #64717F;
}

.orgchip {
  margin: 0 .85rem .95rem;
  padding: .55rem .7rem;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r);
}
.orgchip__name { display: block; color: #fff; font-weight: 600; font-size: .8rem; }
.orgchip__meta { display: block; font-family: var(--mono); font-size: .63rem; color: #75828F; margin-top: 2px; letter-spacing: .04em; }

.railnav { flex: 1; padding: 0 .6rem 1rem; }
.railnav__group {
  font-family: var(--mono); font-size: .565rem; letter-spacing: .17em; text-transform: uppercase;
  color: #5C6875; padding: 1rem .65rem .3rem;
}
.railnav a {
  display: block; padding: .4rem .65rem; border-radius: var(--r2);
  font-size: .825rem; color: #B4BECC; border-left: 2px solid transparent;
}
.railnav a:hover { background: rgba(255,255,255,.055); color: #fff; }
.railnav a[aria-current="page"] {
  background: rgba(255,255,255,.085); color: #fff; font-weight: 500;
  border-left-color: var(--brand);
}

.railfoot { padding: .85rem 1.15rem 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.who strong { display: block; color: #fff; font-size: .8rem; font-weight: 600; }
.who span   { display: block; font-size: .685rem; color: #75828F; }
.signout { display: inline-block; margin-top: .5rem; font-size: .72rem; color: #75828F; }
.signout:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main > .inner { padding: 1.35rem 1.85rem 0; flex: 1; }

/* Classification bar — enterprise buyers expect screens to be marked */
.classbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .32rem 1.85rem;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .58rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-3);
}
.classbar a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.classbar a:hover { color: var(--brand); }

.appfoot {
  margin-top: 2.5rem; padding: .9rem 1.85rem;
  border-top: 1px solid var(--line);
  display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center;
  font-size: .72rem; color: var(--ink-3);
}
.appfoot a { text-decoration: underline; text-underline-offset: 2px; }
.appfoot a:hover { color: var(--brand); }
.appfoot .spacer { margin-left: auto; }

/* ---------- Page furniture ---------- */

.pagetop {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-bottom: .9rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-2);
}
.pagetop .sub { margin: .35rem 0 0; color: var(--ink-2); font-size: .855rem; max-width: 78ch; }
.pagetop__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.flashes { display: grid; gap: .45rem; margin-bottom: 1.05rem; }
.flashmsg {
  padding: .6rem .85rem; border-radius: var(--r); font-size: .855rem;
  background: var(--pos-tint); border: 1px solid #C4DACF; color: #145038;
  border-left: 3px solid var(--pos);
}
.flashmsg--err { background: var(--risk-tint); border-color: #E3C6C2; border-left-color: var(--risk); color: var(--risk); }
.flashmsg--warn{ background: var(--warn-tint); border-color: #E2D2AC; border-left-color: var(--warn); color: #6B4B00; }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
}
.card + .card { margin-top: 1rem; }
.card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .85rem; flex-wrap: wrap;
  padding-bottom: .6rem; border-bottom: 1px solid var(--line);
}
.card__head p { margin: .2rem 0 0; color: var(--ink-3); font-size: .8rem; }

.cols   { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 1rem; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; align-items: start; }

/* ---------- Stats ---------- */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(155px,1fr)); gap: 0;
  margin-bottom: 1.2rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.stat { padding: .8rem .95rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__label { display: block; font-family: var(--mono); font-size: .585rem; letter-spacing: .13em;
               text-transform: uppercase; color: var(--ink-3); }
.stat__value { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600;
               margin-top: .25rem; font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.stat__note  { display: block; font-size: .715rem; color: var(--ink-3); margin-top: .05rem; }
.stat--good .stat__value { color: var(--pos); }
.stat--warn .stat__value { color: var(--warn); }
.stat--bad  .stat__value { color: var(--risk); }

/* ---------- SIGNATURE: budget meter ---------- */

.meter {
  display: flex; height: 7px; border-radius: 1px; overflow: hidden;
  background: var(--surface-3); margin: .55rem 0 .5rem;
  border: 1px solid var(--line);
}
.meter__seg { display: block; height: 100%; transition: width .35s cubic-bezier(.3,.8,.3,1); }
.meter__seg--spent    { background: var(--brand); }
.meter__seg--reserved { background: var(--commit); }
.meter__seg--free     { background: var(--line-2); }

.meter__key { display: flex; gap: .95rem; flex-wrap: wrap; font-size: .725rem; color: var(--ink-2); }
.meter__key i { width: 7px; height: 7px; border-radius: 1px; display: inline-block; margin-right: .35rem; }
.k--spent    { background: var(--brand); }
.k--reserved { background: var(--commit); }
.k--free     { background: var(--line-2); }
.k--released { background: var(--warn); }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-family: var(--mono); font-size: .585rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  padding: .45rem .6rem; border-bottom: 1px solid var(--line-2); white-space: nowrap;
  background: var(--surface-2);
}
.table td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .855rem; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table a.link { color: var(--brand); font-weight: 500; }
.table a.link:hover { text-decoration: underline; text-underline-offset: 2px; }
.tablewrap { overflow-x: auto; margin: 0 -1.2rem; padding: 0 1.2rem; }

/* ---------- Tags ---------- */

.tag {
  display: inline-block; padding: .1rem .45rem; border-radius: 2px;
  font-family: var(--mono); font-size: .655rem; font-weight: 500; white-space: nowrap;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--commit-tint); color: var(--commit); border: 1px solid transparent;
}
.tag--good    { background: var(--pos-tint);  color: #145038;     border-color: #C4DACF; }
.tag--warn    { background: var(--warn-tint); color: #6B4B00;     border-color: #E2D2AC; }
.tag--bad     { background: var(--risk-tint); color: var(--risk); border-color: #E3C6C2; }
.tag--neutral { background: var(--commit-tint); color: var(--commit); border-color: var(--line); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .48rem .95rem; border-radius: var(--r2); border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font-family: var(--body);
  font-size: .825rem; font-weight: 500; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--brand-dk); border-color: var(--brand-dk); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn--danger { background: var(--risk); border-color: var(--risk); }
.btn--danger:hover { background: #6E211A; border-color: #6E211A; }
.btn--sm { padding: .3rem .62rem; font-size: .765rem; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .28rem; }
.field > span {
  font-family: var(--mono); font-size: .605rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.field small { color: var(--ink-3); font-size: .725rem; }
.field .err { color: var(--risk); font-size: .745rem; }

.input, select.input, textarea.input {
  width: 100%; padding: .5rem .65rem; font-family: var(--body); font-size: .855rem;
  border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--surface); color: var(--ink);
}
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 2px var(--brand-lt); }
textarea.input { resize: vertical; min-height: 82px; }
select.input { cursor: pointer; }

.checkline { display: flex; align-items: flex-start; gap: .55rem; font-size: .845rem; line-height: 1.5; }
.checkline input[type=checkbox] { margin-top: .22rem; flex: none; width: 15px; height: 15px; accent-color: var(--brand); }

/* ---------- Wizard steps ---------- */

.steps {
  display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface);
}
.steps span {
  font-family: var(--mono); font-size: .68rem; padding: .45rem 1rem;
  color: var(--ink-3); border-right: 1px solid var(--line); letter-spacing: .05em;
}
.steps span:last-child { border-right: 0; }
.steps span.on   { background: var(--ink); color: #fff; }
.steps span.done { background: var(--brand-lt); color: var(--brand-dk); }

/* ---------- Plan options ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px,1fr)); gap: .9rem; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.05rem; display: flex; flex-direction: column; gap: .5rem;
}
.plan--rec { border-color: var(--brand); box-shadow: inset 0 2px 0 var(--brand); }
.plan--blocked { opacity: .58; }
.plan__tier { font-family: var(--mono); font-size: .6rem; letter-spacing: .15em;
              text-transform: uppercase; color: var(--ink-3); }
.plan__cost { font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: -.015em;
              font-variant-numeric: tabular-nums; }
.plan__total { font-size: .78rem; color: var(--ink-2); font-family: var(--mono); }
.plan__why { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .28rem; }
.plan__why li { font-size: .765rem; color: var(--ink-2); padding-left: .8rem; position: relative; }
.plan__why li::before { content: '—'; position: absolute; left: 0; color: var(--ink-4); }
.plan__why li.blocked { color: var(--risk); }
.plan__why li.blocked::before { content: '!'; font-weight: 700; }

/* ---------- Product tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px,1fr)); gap: .7rem; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem; display: flex; flex-direction: column; gap: .25rem;
}
.tile__cat { font-family: var(--mono); font-size: .585rem; letter-spacing: .12em;
             text-transform: uppercase; color: var(--ink-3); }
.tile__name { font-weight: 600; font-size: .875rem; line-height: 1.3; }
.tile__meta { font-size: .735rem; color: var(--ink-3); }
.tile__price { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin-top: auto;
               padding-top: .5rem; font-variant-numeric: tabular-nums; }

/* ---------- Empty / notes ---------- */

.empty { text-align: center; padding: 3.2rem 1rem; background: var(--surface);
         border: 1px solid var(--line); border-radius: var(--r); }
.empty h2 { margin-bottom: .4rem; }
.empty p  { color: var(--ink-2); max-width: 50ch; margin: 0 auto 1.25rem; }

.note {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--commit);
  padding: .7rem .9rem; border-radius: 0 var(--r) var(--r) 0; font-size: .81rem; color: var(--ink-2);
}
.note--warn { border-left-color: var(--warn); background: var(--warn-tint); border-color: #E2D2AC; color: #6B4B00; }
.note strong { color: var(--ink); }

.muted { color: var(--ink-3); }
.tiny  { font-size: .745rem; }
.right { text-align: right; }
.stack { display: grid; gap: .5rem; }
.row   { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.filters { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin-bottom: .95rem; }
.chip {
  padding: .28rem .68rem; border-radius: var(--r2); border: 1px solid var(--line-2);
  background: var(--surface); font-size: .765rem; color: var(--ink-2);
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Login ---------- */

.loginpage {
  display: grid; place-items: center; min-height: 100vh; padding: 2rem;
  background: var(--ink);
  background-image: linear-gradient(160deg, #0D1520 0%, #16233A 100%);
}
.loginbox {
  width: min(100%, 410px); background: var(--surface); border-radius: var(--r);
  padding: 2rem; border: 1px solid rgba(255,255,255,.1);
}
.loginbox .brand { padding: 0 0 1.1rem; }
.loginbox .brand__text { color: var(--ink); }
.demo-users { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .95rem; }
.demo-users h4 { font-size: .605rem; font-family: var(--mono); letter-spacing: .13em;
                 text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem; font-weight: 500; }
.demo-users button {
  display: block; width: 100%; text-align: left; padding: .38rem .5rem; border: 1px solid var(--line);
  border-radius: var(--r2); background: var(--surface-2); font-size: .765rem; cursor: pointer;
  margin-bottom: .25rem; font-family: var(--body); color: var(--ink);
}
.demo-users button:hover { border-color: var(--brand); background: var(--brand-lt); }
.demo-users code { font-size: .705rem; color: var(--ink-3); }

/* ---------- Privacy / consent ---------- */

.consent {
  position: fixed; inset: auto 0 0 0; z-index: 90;
  background: var(--surface); border-top: 2px solid var(--brand);
  box-shadow: 0 -6px 24px -12px rgba(13,21,32,.4);
  padding: 1rem 1.85rem;
}
.consent__inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap;
}
.consent h3 { margin-bottom: .25rem; font-size: .95rem; }
.consent p { margin: 0; font-size: .8rem; color: var(--ink-2); max-width: 82ch; }
.consent p + p { margin-top: .35rem; }
.consent__actions { display: flex; gap: .5rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.consent a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(13,21,32,.55); padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal__panel {
  background: var(--surface); border-radius: var(--r); max-width: 720px; width: 100%;
  max-height: 84vh; display: flex; flex-direction: column; border: 1px solid var(--line-2);
}
.modal__head { padding: 1.1rem 1.4rem .8rem; border-bottom: 1px solid var(--line); }
.modal__head p { margin: .25rem 0 0; font-size: .78rem; color: var(--ink-3); }
.modal__body { padding: 1.1rem 1.4rem; overflow-y: auto; font-size: .845rem; color: var(--ink-2); }
.modal__body h4 { font-family: var(--display); font-size: .9rem; margin: 1.1rem 0 .3rem; color: var(--ink); }
.modal__body h4:first-child { margin-top: 0; }
.modal__body ul { margin: .3rem 0; padding-left: 1.1rem; }
.modal__body li { margin-bottom: .22rem; }
.modal__foot { padding: .85rem 1.4rem; border-top: 1px solid var(--line); display: flex; gap: .5rem;
               justify-content: flex-end; flex-wrap: wrap; }

/* Legal / policy prose */
.legal { max-width: 78ch; }
.legal h2 { margin: 1.7rem 0 .45rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: .5rem; }
.legal h3 { margin: 1.1rem 0 .3rem; }
.legal p, .legal li { color: var(--ink-2); font-size: .875rem; }
.legal ul { padding-left: 1.15rem; }
.legal li { margin-bottom: .3rem; }

/* ---------- Recipient claim (public, mobile-first) ---------- */

.claim { max-width: 660px; margin: 0 auto; padding: 1.4rem 1.1rem 4rem; }
.claim__brand { text-align: center; padding: 1.6rem 0 1.2rem; }
.claim__org { font-family: var(--mono); font-size: .625rem; letter-spacing: .2em;
              text-transform: uppercase; color: var(--ink-3); }
.claim__hi { font-family: var(--display); font-size: 1.72rem; font-weight: 600; margin: .55rem 0 .4rem;
             letter-spacing: -.015em; }
.claim__msg { color: var(--ink-2); font-size: .925rem; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px,1fr)); gap: .6rem; margin: 1.1rem 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; flex-direction: column; gap: .25rem; height: 100%;
  padding: .8rem; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); cursor: pointer; transition: border-color .12s ease;
}
.choice label:hover { border-color: var(--ink-3); }
.choice input:checked + label {
  border-color: var(--brand); background: var(--brand-lt);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.choice input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice__name { font-weight: 600; font-size: .855rem; line-height: 1.3; }
.choice__meta { font-size: .725rem; color: var(--ink-3); margin-top: auto; }

.claim .form { grid-template-columns: repeat(2, minmax(0,1fr)); }
.claim .card { margin-top: 1rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) { .cols, .cols-2, .cols-3 { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: .5rem; padding: .55rem .9rem;
  }
  .brand { padding: 0; }
  .railmeta, .orgchip, .who { display: none; }
  .railnav { display: flex; gap: .15rem; overflow-x: auto; padding: 0; width: 100%; }
  .railnav__group { display: none; }
  .railnav a { white-space: nowrap; font-size: .765rem; padding: .3rem .5rem;
               border-left: 0; border-bottom: 2px solid transparent; }
  .railnav a[aria-current="page"] { border-bottom-color: var(--brand); }
  .railfoot { border: 0; padding: 0; margin-left: auto; }
  .classbar, .main > .inner, .appfoot, .consent { padding-left: 1rem; padding-right: 1rem; }
  .form, .claim .form { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat { border-bottom: 1px solid var(--line); }
  .consent__actions { margin-left: 0; width: 100%; }
}

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

@media print {
  .rail, .consent, .modal, .pagetop__actions, .btn { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  body { background: #fff; font-size: 10pt; }
  .card { border-color: #999; break-inside: avoid; }
  .classbar { border-bottom: 1px solid #000; }
}
