/* =====================================================================
   PNGeSW – Papua New Guinea Electronic Single Window
   Design system. No external assets (CSP: style-src 'self').
   Brand colours taken from the PNGeSW logo: PNG red, black, bird-of-paradise gold.
   ===================================================================== */
:root {
  --red: #c8202f; --red-600: #a8141f; --red-50: #fdeeee;
  --gold: #f4c21b; --gold-600: #d9a400; --gold-50: #fff8e0;
  --ink: #17140f; --night: #14110f; --night-2: #221d18;
  --bg: #f5f4f1; --surface: #ffffff; --surface-2: #faf9f7;
  --text: #1d1a16; --muted: #6b665e; --line: #e7e3dc; --line-2: #d8d2c8;
  --ok: #157a4a; --ok-bg: #e6f5ed; --warn: #9a6200; --warn-bg: #fff3d6;
  --bad: #b3141f; --bad-bg: #fdeaea; --info: #1e5aa8; --info-bg: #e8f0fb;
  --radius: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 20, 15, .06);
  --shadow: 0 1px 2px rgba(23, 20, 15, .05), 0 6px 20px rgba(23, 20, 15, .06);
  --shadow-lg: 0 12px 40px rgba(23, 20, 15, .14);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100e; --surface: #1b1815; --surface-2: #211d19; --text: #f1ede6; --muted: #a59f95;
    --line: #2f2a24; --line-2: #3d362f; --red-50: #3a1518; --gold-50: #3a2f0e;
    --ok: #5cc690; --ok-bg: #12301f; --warn: #f0b64a; --warn-bg: #36290c;
    --bad: #f4808a; --bad-bg: #3d1619; --info: #86b5f0; --info-bg: #142740;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; }
a { color: var(--info); text-underline-offset: 2px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .3rem; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: 1.15rem; margin: 2rem 0 .8rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }
h1.mono { font-size: 1.4rem; }
.sr-only, .sprite { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: .5rem 1rem; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

/* ---------- Utility bar ---------- */
.utility { background: var(--night); color: #cfc8bd; font-size: .78rem; }
.utility-inner { display: flex; align-items: center; gap: .75rem; min-height: 34px; }
.utility-flag { width: 24px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); flex: none; }
.utility-links { margin-left: auto; display: flex; gap: 1.1rem; }
.utility-links a { color: #e9e3d8; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.utility-links a:hover { color: var(--gold); }
.utility .ic { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .site-header { background: rgba(27, 24, 21, .88); } }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); flex: none; }
.brand img { width: 52px; height: 52px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.25rem; letter-spacing: -.02em; font-weight: 800; }
.brand-text strong span { color: var(--red); }
.brand-text small { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: .2rem; }
.primary-nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; position: relative; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { color: var(--red); background: var(--red-50); }
.nav-link.is-active::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: -15px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); }
.nav-cta { margin-left: .5rem; }
.nav-toggle { display: none; margin-left: auto; order: 3; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: .5rem; padding-left: .75rem; border-left: 1px solid var(--line); }
.icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--muted); }
.icon-btn:hover, .icon-btn.is-active { background: var(--surface-2); color: var(--text); }
.icon-btn .ic { width: 20px; height: 20px; }
.dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem .3rem .3rem; border-radius: 99px; cursor: pointer; border: 1px solid transparent; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--surface-2); border-color: var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-600)); color: #fff; font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; max-width: 170px; }
.user-meta strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.user-menu[open] .chev { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 50; }
.menu-head { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); word-break: break-all; }
.menu a, .menu button { display: flex; width: 100%; gap: .6rem; align-items: center; padding: .55rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu button { color: var(--red); }

/* ---------- Main ---------- */
.main { flex: 1; width: 100%; padding-top: 1.75rem; padding-bottom: 3.5rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: .2rem 0 0; }

/* ---------- Cards, grid, stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.card > h3:first-child, .card > h1:first-child { margin-top: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--red); }
.stat:nth-child(2n)::before { background: var(--gold); } .stat:nth-child(3n)::before { background: var(--ink); }
.stat .n { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); white-space: nowrap; font-weight: 700; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a.mono { font-weight: 600; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: .5rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; } dl.kv dd { margin: 0; word-break: break-word; font-weight: 500; }

/* ---------- Badges & alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); } .badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; border: 1px solid transparent; word-break: break-word; }
.alert .ic { margin-top: 2px; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }

/* ---------- Forms & buttons ---------- */
form.stack > * + * { margin-top: .9rem; }
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=file], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.check input { width: auto; accent-color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; font-size: .9rem; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #d72a39, var(--red)); border-color: var(--red-600); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 2px 6px rgba(200, 32, 47, .25); }
.btn-primary:hover { background: linear-gradient(180deg, var(--red), var(--red-600)); border-color: var(--red-600); }
.btn-gold { background: var(--gold); border-color: var(--gold-600); color: var(--ink); }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn-ghost-inv { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-ghost-inv:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }

/* ---------- Hero / landing ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 3rem 2.5rem; margin-bottom: 2rem; display: grid; grid-template-columns: 1.3fr .9fr; gap: 2rem; align-items: center;
  background: radial-gradient(circle at 85% 20%, rgba(244, 194, 27, .28), transparent 40%), radial-gradient(circle at 70% 110%, rgba(200, 32, 47, .55), transparent 50%), linear-gradient(135deg, #1a1612 0%, #0f0d0b 100%); box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, #000, transparent 75%); -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%); }
.hero > * { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); background: rgba(244, 194, 27, .12); border: 1px solid rgba(244, 194, 27, .3); padding: .3rem .7rem; border-radius: 99px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { color: #d8d1c5; font-size: 1.05rem; max-width: 560px; margin: 0 0 1.6rem; }
.hero-logo { justify-self: center; width: min(320px, 100%); aspect-ratio: 1; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
.hero-trust { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.6rem; font-size: .82rem; color: #bdb5a8; }
.hero-trust span { display: inline-flex; gap: .4rem; align-items: center; }
.hero-trust .ic { color: var(--gold); width: 16px; height: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--red-50); color: var(--red); margin-bottom: .9rem; }
.feature:nth-child(2) .feature-ic { background: var(--gold-50); color: var(--gold-600); }
.feature:nth-child(3) .feature-ic { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.feature-ic .ic { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 0; font-size: .92rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 2.5rem 0 1rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step { position: relative; padding: 1.2rem 1.2rem 1.2rem 3.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.1rem; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
.agency-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.agency-list li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: .35rem .8rem; font-size: .84rem; }
.agency-list li strong { color: var(--red); margin-right: .25rem; }
.tier { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }

/* ---------- Auth pages ---------- */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); max-width: 1000px; margin: 1rem auto; }
.auth-aside { position: relative; color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: radial-gradient(circle at 20% 10%, rgba(244, 194, 27, .25), transparent 45%), radial-gradient(circle at 90% 100%, rgba(200, 32, 47, .6), transparent 55%), #14110f; }
.auth-aside img { width: 150px; height: 150px; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .5)); }
.auth-aside h2 { margin: 1rem 0 .4rem; font-size: 1.5rem; }
.auth-aside p { color: #d0c8bb; margin: 0; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .9rem; color: #e8e1d5; }
.auth-aside li { display: flex; gap: .5rem; align-items: center; }
.auth-aside li .ic { color: var(--gold); }
.auth-main { padding: 2.5rem; }
.auth-main h1 { margin-bottom: .2rem; }
.auth-foot { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* ---------- Misc components ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .5rem 0 .6rem 1.4rem; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .8rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--surface); }
.secret { font-family: var(--mono); background: var(--surface-2); border: 1px dashed var(--line-2); padding: .7rem; border-radius: var(--radius-sm); word-break: break-all; letter-spacing: .05em; }
.qr-wrap { background: #fff; display: inline-block; padding: 10px; border-radius: 12px; border: 1px solid var(--line); margin: .25rem 0 1rem; box-shadow: var(--shadow-sm); }
.qr { display: block; width: 240px; height: 240px; image-rendering: pixelated; }
details summary { cursor: pointer; margin-bottom: .5rem; }
.narrow { max-width: 480px; } .align-end { align-self: end; } .mt-3 { margin-top: 3rem; } .mt-1 { margin-top: 1rem; } .hidden { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #d6cfc3; margin-top: auto; }
.footer-stripe { display: flex; height: 5px; } .footer-stripe i { flex: 1; } .footer-stripe i:nth-child(1) { background: #3a332c; } .footer-stripe i:nth-child(2) { background: var(--red); } .footer-stripe i:nth-child(3) { background: var(--gold); }
.muted-inv { color: #a99f90 !important; font-size: .88rem; max-width: 360px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: #9b9284; }
.footer-bottom-inner { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.to-top { color: #d6cfc3; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; border: 1px solid rgba(255, 255, 255, .15); padding: .3rem .7rem; border-radius: 99px; }
.to-top:hover { color: var(--gold); border-color: var(--gold); }
.to-top .ic { width: 14px; height: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .user-meta { display: none; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .is-auth .nav-toggle { margin-left: 0; }
  .header-actions { margin-left: auto; border-left: 0; padding-left: 0; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: .2rem; padding: .75rem 20px 1rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .primary-nav.is-open { display: flex; }
  .nav-cta { margin: .4rem 0 0; }
  .site-header { position: sticky; }
  .header-inner { position: static; }
  .hero { grid-template-columns: 1fr; padding: 2rem 1.4rem; text-align: left; }
  .hero-logo { width: 170px; grid-row: 1; justify-self: start; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { padding: 1.75rem; } .auth-aside ul { display: none; } .auth-aside img { width: 90px; height: 90px; }
  .auth-main { padding: 1.75rem; }
  .utility-inner > span:nth-child(2) { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand-text small { display: none; }
  .brand img { width: 44px; height: 44px; }
  dl.kv { grid-template-columns: 1fr; } dl.kv dt { margin-top: .4rem; }
  .card { padding: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .utility, .site-header, .site-footer, .actions, form { display: none !important; } body { background: #fff; } .card, .table-wrap { box-shadow: none; } }

/* =====================================================================
   Platform guide (help centre)
   ===================================================================== */
:root { --dia-line: #a39b8f; --dia-tint: #f3f1ec; }
@media (prefers-color-scheme: dark) { :root { --dia-line: #7a7166; --dia-tint: #221e1a; } }
.guide { --toc-w: 248px; }
.g-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; border-radius: 22px; padding: 2.4rem 2.4rem 2rem; color: #fff; margin-bottom: 1.25rem;
  background: radial-gradient(circle at 90% 0%, rgba(244, 194, 27, .25), transparent 40%), radial-gradient(circle at 75% 120%, rgba(200, 32, 47, .55), transparent 50%), linear-gradient(135deg, #1a1612, #0f0d0b); box-shadow: var(--shadow-lg); }
.g-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.03em; margin-bottom: .5rem; }
.g-hero p { color: #d8d1c5; max-width: 620px; margin: 0 0 1.25rem; font-size: 1.02rem; }
.g-hero-logo { width: 190px; height: 190px; filter: drop-shadow(0 16px 36px rgba(0, 0, 0, .5)); }
.g-search { display: flex; align-items: center; gap: .6rem; max-width: 640px; background: rgba(255, 255, 255, .96); border-radius: 14px; padding: .35rem .5rem .35rem .9rem; color: #6b665e; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); margin: 0; font-weight: 400; }
.g-search:focus-within { outline: 3px solid var(--gold); }
.g-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; color: #1d1a16 !important; padding: .6rem 0 !important; font-size: 1rem; }
.g-search .ic { width: 20px; height: 20px; }
.g-search kbd { font: 600 .75rem var(--mono); color: #6b665e; border: 1px solid #d8d2c8; border-radius: 6px; padding: .15rem .45rem; }
.g-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.g-chip { font: inherit; font-size: .85rem; font-weight: 600; color: #e9e3d8; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 99px; padding: .4rem .9rem; cursor: pointer; transition: background .15s, color .15s; }
.g-chip:hover { background: rgba(255, 255, 255, .16); }
.g-chip.is-on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.g-start { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.g-card { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.g-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.g-card-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--red-50); color: var(--red); margin-bottom: .4rem; }
.g-card:nth-child(2) .g-card-ic { background: var(--gold-50); color: var(--gold-600); }
.g-card:nth-child(3) .g-card-ic { background: var(--info-bg); color: var(--info); }
.g-card:nth-child(4) .g-card-ic { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.g-card-ic .ic { width: 22px; height: 22px; }
.g-card span { color: var(--muted); font-size: .9rem; }
.g-card em { font-style: normal; font-weight: 700; color: var(--red); font-size: .85rem; margin-top: auto; padding-top: .5rem; display: inline-flex; align-items: center; gap: .3rem; }
.g-card em .ic { width: 15px; height: 15px; transition: transform .15s; }
.g-card:hover em .ic { transform: translateX(3px); }
.g-layout { display: grid; grid-template-columns: var(--toc-w) minmax(0, 1fr); gap: 2rem; align-items: start; }
.g-toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.g-toc-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow-sm); }
.g-toc-box summary { list-style: none; display: flex; align-items: center; gap: .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); padding: .5rem .6rem; margin: 0; cursor: default; }
.g-toc-box summary::-webkit-details-marker { display: none; }
.g-toc nav { display: flex; flex-direction: column; gap: 1px; }
.g-toc nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 550; border-left: 3px solid transparent; }
.g-toc nav a .ic { width: 16px; height: 16px; }
.g-toc nav a:hover { background: var(--surface-2); color: var(--text); }
.g-toc nav a.is-current { background: var(--red-50); color: var(--red); border-left-color: var(--red); }
.g-toc nav a.is-hidden { display: none; }
.g-toc-foot { display: flex; flex-direction: column; gap: .2rem; margin-top: .8rem; padding: 0 .4rem; }
.g-toc-foot a { display: flex; gap: .5rem; align-items: center; font-size: .84rem; color: var(--muted); text-decoration: none; padding: .35rem .3rem; }
.g-toc-foot a:hover { color: var(--red); }
.g-toc-foot .ic { width: 15px; height: 15px; }
.g-status { margin: 0 0 .75rem; color: var(--muted); font-size: .9rem; min-height: 1.2em; }
.g-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.g-empty .ic { width: 36px; height: 36px; }
.linkish { background: none; border: 0; padding: 0; color: var(--info); text-decoration: underline; cursor: pointer; font: inherit; }
.g-section { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem 1.8rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); scroll-margin-top: 92px; }
.g-section[hidden] { display: none; }
.g-head { display: flex; align-items: flex-start; gap: .9rem; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.g-head h2 { margin: 0 0 .35rem; font-size: 1.35rem; }
.g-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--red), var(--red-600)); color: #fff; box-shadow: 0 4px 12px rgba(200, 32, 47, .25); }
.g-ic .ic { width: 22px; height: 22px; }
.g-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.aud { font-size: .7rem; font-weight: 700; padding: .1rem .55rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.aud-trader { background: var(--red-50); color: var(--red); border-color: transparent; }
.aud-agency { background: var(--gold-50); color: var(--gold-600); border-color: transparent; }
.aud-integrator { background: var(--info-bg); color: var(--info); border-color: transparent; }
.aud-admin { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.g-anchor { margin-left: auto; color: var(--line-2); text-decoration: none; font-weight: 800; font-size: 1.2rem; padding: 0 .3rem; }
.g-anchor:hover { color: var(--red); }
.g-body { max-width: 860px; }
.g-body > p { margin: 0 0 1rem; }
.g-body > p:first-child { font-size: 1.05rem; color: var(--text); }
.g-body p > strong:only-child { display: block; margin-top: 1.4rem; font-size: .95rem; }
.g-body ul, .g-body ol { padding-left: 1.3rem; margin: 0 0 1rem; } .g-body li { margin: .3rem 0; }
.g-body li.todo { list-style: none; position: relative; margin-left: -1.3rem; padding-left: 1.7rem; }
.g-body li.todo::before { content: ""; position: absolute; left: 0; top: .2rem; width: 16px; height: 16px; border: 2px solid var(--line-2); border-radius: 4px; }
.g-body code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .35rem; font-size: .84em; }
.g-body .table-wrap { margin: .5rem 0 1.25rem; box-shadow: none; }
.g-body table { font-size: .87rem; }
.g-body td:first-child { font-weight: 600; }
.code { position: relative; margin: .5rem 0 1.25rem; }
.code pre { margin: 0; background: #16130f; color: #f1ead9; border-radius: 12px; padding: 1rem 1.1rem; overflow-x: auto; font-size: .82rem; line-height: 1.6; }
.code pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.copy-btn { position: absolute; top: .5rem; right: .5rem; font: 600 .72rem var(--font); color: #e9e3d8; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 7px; padding: .25rem .6rem; cursor: pointer; }
.copy-btn:hover { background: rgba(255, 255, 255, .2); }
.copy-btn.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.dia-wrap { margin: .75rem 0 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.dia { display: block; width: 100%; height: auto; font-family: var(--font); }
.dia-wrap figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .5rem; }
::highlight(guide-hit) { background: var(--gold); color: var(--ink); }
.to-guide-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--gold); display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); text-decoration: none; }
.to-guide-top.is-shown { display: flex; }
@media (max-width: 1080px) { .g-start { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 920px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); }
  .g-toc { position: static; max-height: none; }
  .g-toc-box summary { cursor: pointer; }
  .g-toc-foot { display: none; }
  .g-hero { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; }
  .g-hero-logo { display: none; }
}
@media (max-width: 560px) { .g-start { grid-template-columns: 1fr; } .g-section { padding: 1.2rem 1rem; border-radius: 14px; } .g-search kbd { display: none; } }
@media print { .g-hero, .g-start, .g-toc, .copy-btn { display: none !important; } .g-layout { display: block; } .g-section { break-inside: avoid-page; box-shadow: none; } }
.g-content { min-width: 0; } .g-toc { min-width: 0; }
.g-search input { flex: 1; min-width: 0; width: auto; }
.guide.is-searching .g-start { display: none; }

/* =====================================================================
   Trade Facilitation page
   ===================================================================== */
.tf-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; color: #fff; border-radius: 22px; padding: 2.6rem 2.4rem; margin-bottom: 1rem; box-shadow: var(--shadow-lg);
  background: radial-gradient(circle at 100% 0%, rgba(244, 194, 27, .3), transparent 42%), radial-gradient(circle at 60% 130%, rgba(200, 32, 47, .6), transparent 55%), linear-gradient(135deg, #1a1612, #0f0d0b); }
.tf-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.1; letter-spacing: -.03em; margin-bottom: .8rem; }
.tf-hero h1 em { font-style: normal; color: var(--gold); }
.tf-hero > div > p { color: #d8d1c5; font-size: 1.05rem; max-width: 600px; margin: 0 0 1.4rem; }
.tf-flag { width: 20px; height: 15px; border-radius: 2px; }
.tf-credit { font-size: .82rem !important; color: #a99f90 !important; margin: 1.2rem 0 0 !important; }
.tf-credit a { color: var(--gold); }
.tf-hero-panel { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tf-hero-panel div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 1rem; backdrop-filter: blur(4px); }
.tf-hero-panel strong { display: block; font-size: 1.6rem; color: var(--gold); letter-spacing: -.02em; }
.tf-hero-panel span { font-size: .82rem; color: #d0c8bb; }
.tf-nav { position: sticky; top: 72px; z-index: 20; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: .55rem; margin: 0 0 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tf-nav::-webkit-scrollbar { display: none; }
.tf-nav a { flex: none; padding: .5rem .9rem; border-radius: 10px; font-weight: 650; font-size: .88rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tf-nav a:hover { background: var(--surface-2); color: var(--text); }
.tf-nav a.is-current { background: var(--ink); color: var(--gold); }
.tf-sec { scroll-margin-top: 150px; padding: 2rem 0 1rem; border-bottom: 1px solid var(--line); }
.tf-sec:last-child { border-bottom: 0; }
.tf-sec-head { max-width: 780px; margin-bottom: 1.4rem; }
.tf-sec-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: .2rem 0 .5rem; letter-spacing: -.02em; }
.tf-sec-head p { color: var(--muted); font-size: 1.02rem; margin: 0; }
.tf-kicker { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.tf-src { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: .1rem .55rem; white-space: nowrap; vertical-align: 1px; }
.tf-src .ic { width: 12px; height: 12px; }
.tf-src:hover { color: var(--red); border-color: var(--red); }
.tf-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tf-big-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow-sm); }
.tf-big-step span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--gold); font-weight: 800; font-size: 1.1rem; margin-bottom: .8rem; }
.tf-big-step p { color: var(--muted); margin: 0; font-size: .93rem; }
.tf-callout { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; padding: 1.1rem 1.3rem; border-radius: var(--radius); background: var(--red-50); border: 1px solid color-mix(in srgb, var(--red) 25%, transparent); }
.tf-callout > div { flex: 1; }
.tf-callout-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; }
.tf-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tf-timeline li { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.tf-timeline h3 { margin: 0 0 .3rem; font-size: .98rem; }
.tf-timeline p { margin: 0; color: var(--muted); font-size: .9rem; }
.tf-dot { width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gold-50); color: var(--gold-600); border: 2px solid var(--gold); }
.tf-time { display: block; font-style: normal; font-size: .74rem; font-weight: 700; color: var(--ok); margin-top: .15rem; }
.tf-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tf-steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.tf-steps li { counter-increment: s; position: relative; padding: 0 0 1.25rem 3.4rem; }
.tf-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(200, 32, 47, .25); }
.tf-steps li::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.tf-steps li:last-child::after { display: none; }
.tf-steps h3 { margin: .3rem 0 .25rem; font-size: 1rem; }
.tf-steps p { margin: 0; color: var(--muted); font-size: .93rem; }
.tf-aside { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 150px; }
.tf-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.tf-box h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font-size: 1rem; }
.tf-box h3 .ic { color: var(--red); }
.tf-box ul { margin: 0; padding-left: 1.1rem; } .tf-box li { margin: .35rem 0; font-size: .92rem; }
.tf-box p { margin: .3rem 0 .6rem; }
.tf-box p a { display: inline-flex; align-items: center; gap: .35rem; }
.tf-box-soft { background: var(--surface-2); box-shadow: none; }
.tf-check { list-style: none; padding: 0 !important; }
.tf-check li { position: relative; padding-left: 1.7rem; }
.tf-check li::before { content: ""; position: absolute; left: 0; top: .15rem; width: 18px; height: 18px; border-radius: 5px; background: var(--ok-bg); border: 1.5px solid var(--ok); }
.tf-check li::after { content: ""; position: absolute; left: 6px; top: .35rem; width: 5px; height: 9px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tf-links { list-style: none; padding: 0 !important; }
.tf-links a { text-decoration: none; font-weight: 600; }
.tf-links a::after { content: " \2197"; font-size: .8em; }
.tf-warn { margin-top: 1rem; padding: 1.3rem; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.tf-warn h3 { display: flex; gap: .5rem; align-items: center; margin: 0 0 .9rem; color: var(--warn); }
.tf-warn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: .8rem; }
.tf-warn-grid div { background: var(--surface); border-radius: 12px; padding: .9rem; }
.tf-warn-grid strong { display: block; font-size: 1.35rem; color: var(--text); }
.tf-warn-grid span { font-size: .84rem; color: var(--muted); }
.tf-warn p { margin: 0; font-size: .92rem; }
.tf-sub { margin: 1.8rem 0 .8rem; font-size: 1.1rem; }
.tf-filter { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.tf-search { display: flex; align-items: center; gap: .5rem; flex: 1 1 280px; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 .8rem; margin: 0; font-weight: 400; color: var(--muted); }
.tf-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.tf-search input { border: 0 !important; box-shadow: none !important; padding: .65rem 0 !important; background: transparent !important; }
.tf-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tf-chip { font: inherit; font-size: .85rem; font-weight: 650; padding: .45rem .9rem; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; }
.tf-chip:hover { border-color: var(--muted); color: var(--text); }
.tf-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.tf-agencies { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.tf-agency { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.tf-agency:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tf-agency[hidden] { display: none; }
.tf-agency header { display: flex; gap: .8rem; align-items: center; margin-bottom: .7rem; }
.tf-agency h3 { margin: 0; font-size: .98rem; line-height: 1.25; }
.tf-ag-code { font-size: .72rem; font-weight: 800; color: var(--red); letter-spacing: .06em; }
.tf-ag-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tf-g-border { background: var(--red-50); color: var(--red); } .tf-g-business { background: var(--info-bg); color: var(--info); } .tf-g-commodity { background: var(--gold-50); color: var(--gold-600); }
.tf-agency > p { margin: 0 0 .6rem; color: var(--muted); font-size: .92rem; }
.tf-agency ul { margin: 0 0 .8rem; padding-left: 1.1rem; font-size: .88rem; } .tf-agency li { margin: .2rem 0; }
.tf-agency footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem .9rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .84rem; }
.tf-agency footer a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; font-weight: 600; }
.tf-agency footer .ic { width: 14px; height: 14px; }
.tf-none { text-align: center; color: var(--muted); padding: 2rem; }
.tf-agree { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tf-ag-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); border-top: 4px solid var(--gold); }
.tf-ag-card h3 { margin: .4rem 0 .4rem; font-size: 1rem; }
.tf-ag-card p { margin: 0 0 .7rem; color: var(--muted); font-size: .9rem; }
.tf-region { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-600); }
.tf-regions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.2rem 0 .6rem; font-weight: 600; font-size: .9rem; }
.tf-regions a { padding: .35rem .8rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.tf-regions a:hover { border-color: var(--red); color: var(--red); }
.tf-vm { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tf-vm div { padding: 1.3rem; border-radius: var(--radius); background: linear-gradient(135deg, #1a1612, #2a1512); color: #fff; }
.tf-vm span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--gold); }
.tf-vm p { margin: .4rem 0 0; font-size: 1.05rem; color: #eee6d8; }
.tf-functions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.tf-functions div { display: grid; grid-template-columns: 28px 1fr; gap: .1rem .6rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tf-functions .ic { grid-row: span 2; color: var(--red); width: 22px; height: 22px; margin-top: 2px; }
.tf-functions span { color: var(--muted); font-size: .86rem; }
.tf-values { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.2rem; }
.tf-values span { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: .3rem; }
.tf-values em { font-style: normal; font-size: .84rem; padding: .3rem .75rem; border-radius: 99px; background: var(--gold-50); color: var(--gold-600); font-weight: 650; }
.tf-contact { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 1rem; align-items: start; }
.tf-contact .table-wrap { margin: 0; }
.tf-disclaimer { margin-top: 1.5rem; }
@media (max-width: 1000px) {
  .tf-hero { grid-template-columns: 1fr; padding: 2rem 1.4rem; }
  .tf-three, .tf-timeline, .tf-functions { grid-template-columns: 1fr 1fr; }
  .tf-split, .tf-contact { grid-template-columns: minmax(0, 1fr); }
  .tf-aside { position: static; }
  .tf-warn-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tf-three, .tf-timeline, .tf-functions, .tf-vm, .tf-warn-grid { grid-template-columns: 1fr; }
  .tf-agencies { grid-template-columns: 1fr; }
  .tf-callout { flex-direction: column; align-items: flex-start; }
  .tf-nav { top: 64px; }
}

/* ---------------- Support tickets ---------------- */
.badge.tk-nocap { text-transform: none; }
.badge-gold { background: var(--gold-50); color: var(--warn); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.tk-crumb { margin: 0 0 .6rem; color: var(--muted); } .tk-crumb a { color: var(--muted); }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.tk-side .card h3 { display: flex; align-items: center; gap: .45rem; font-size: 1rem; margin: 0 0 .8rem; }
.tk-side .card h3 .ic { color: var(--red); }
.tk-tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: 1rem; scrollbar-width: thin; }
.tk-tabs a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .45rem .85rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .86rem; font-weight: 600; text-decoration: none; }
.tk-tabs a span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 .45rem; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-tabs a:hover { border-color: var(--line-2); }
.tk-tabs a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tk-tabs a.is-on span { background: rgba(255, 255, 255, .15); border-color: transparent; color: #fff; }
.tk-list { display: grid; gap: .6rem; }
.tk-item { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tk-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.tk-item.is-attn { border-left: 4px solid var(--gold); }
.tk-item-main { display: grid; gap: .25rem; min-width: 0; }
.tk-item-top { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.tk-item-subj { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-meta { display: flex; align-items: center; gap: .8rem; white-space: nowrap; }
.tk-item-meta .ic { width: 14px; height: 14px; margin-right: .25rem; }
.tk-item .tk-go { color: var(--muted); transition: transform .15s; } .tk-item:hover .tk-go { transform: translateX(3px); color: var(--red); }
.tk-empty { text-align: center; padding: 3rem 1.5rem; }
.tk-empty h2 { margin: .8rem 0 .4rem; }
.tk-empty p { max-width: 560px; margin: 0 auto 1.4rem; }
.tk-empty-ic { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: var(--red-50); color: var(--red); }
.tk-empty-ic .ic { width: 30px; height: 30px; }
.tk-targets { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: center; font-size: .86rem; color: var(--muted); }
.tk-targets li { display: flex; gap: .5rem; align-items: center; }
.tk-targets-col { flex-direction: column; margin: 0; gap: .55rem; }
.tk-targets-col .badge { min-width: 68px; justify-content: center; }
.tk-tips { padding-left: 1.1rem; margin: 0; display: grid; gap: .35rem; }
.tk-side-flow ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.tk-filelist:empty { display: none; }
/* Ticket header and progress */
.tk-head h1 { margin: .35rem 0 .2rem; font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: -.01em; overflow-wrap: anywhere; }
.tk-head p { margin: 0; }
.tk-head-meta { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.tk-head-meta .mono { font-weight: 700; color: var(--muted); margin-right: .2rem; }
.tk-steps { list-style: none; display: flex; padding: 0; margin: 1.3rem 0 1.4rem; counter-reset: s; }
.tk-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; position: relative; font-size: .8rem; font-weight: 600; color: var(--muted); text-align: center; }
.tk-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.tk-steps li:first-child::before { display: none; }
.tk-steps li.is-done::before, .tk-steps li.is-now::before { background: var(--ok); }
.tk-step-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 2px solid var(--line-2); font-weight: 800; color: var(--muted); }
.tk-step-dot .ic { width: 16px; height: 16px; }
.tk-steps li.is-done { color: var(--text); } .tk-steps li.is-done .tk-step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tk-steps li.is-now { color: var(--text); } .tk-steps li.is-now .tk-step-dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 14%, transparent); }
/* Thread */
.tk-thread { display: grid; gap: .9rem; margin-bottom: 1rem; }
.tk-day { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: .4rem 0 0; }
.tk-day::before, .tk-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tk-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .75rem; align-items: start; scroll-margin-top: 120px; }
.tk-av { width: 40px; height: 40px; }
.tk-msg.is-user .tk-av { background: linear-gradient(135deg, #4a4239, var(--ink)); }
.tk-msg.is-note .tk-av { background: linear-gradient(135deg, var(--gold), var(--gold-600)); color: var(--ink); }
.tk-av .ic { width: 20px; height: 20px; }
.tk-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--radius) var(--radius) var(--radius); padding: .85rem 1.1rem 1rem; box-shadow: var(--shadow-sm); }
.tk-msg.is-staff .tk-bubble { border-left: 3px solid var(--red); }
.tk-msg.is-note .tk-bubble { background: var(--gold-50); border-color: color-mix(in srgb, var(--gold) 50%, transparent); border-style: dashed; }
.tk-bubble header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.tk-bubble header time { margin-left: auto; }
.tk-tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: var(--red-50); color: var(--red); }
.tk-tag .ic { width: 12px; height: 12px; }
.tk-tag-note { background: var(--gold); color: var(--ink); }
.tk-tag-user { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tk-body { line-height: 1.6; overflow-wrap: anywhere; }
.tk-files { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tk-files a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .84rem; color: var(--text); text-decoration: none; max-width: 100%; }
.tk-files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-files a small { color: var(--muted); }
.tk-files a:hover { border-color: var(--red); } .tk-files .ic { color: var(--red); width: 16px; height: 16px; }
.tk-event { display: flex; align-items: center; gap: .5rem; padding-left: 52px; font-size: .84rem; color: var(--muted); scroll-margin-top: 120px; }
.tk-event .ic { width: 14px; height: 14px; color: var(--line-2); }
.tk-event span { color: var(--text); opacity: .8; }
.tk-event time { font-size: .76rem; }
/* Reply composer */
.tk-reply textarea { min-height: 120px; }
.tk-reply-bar { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; margin-top: .7rem; }
.tk-reply-bar .btn-primary { margin-left: auto; }
.tk-attach { cursor: pointer; margin: 0; font-weight: 600; }
.tk-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 600; }
.tk-after { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.tk-after select { width: auto; padding: .35rem .6rem; }
.tk-reply.is-note { background: var(--gold-50); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.tk-reply.is-note .tk-after { opacity: .4; pointer-events: none; }
.tk-closed { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface-2); }
.tk-closed > .ic { color: var(--muted); margin-top: 3px; } .tk-closed p { margin: .2rem 0 0; }
.tk-confirm { border: 2px solid var(--ok); background: color-mix(in srgb, var(--ok-bg) 60%, var(--surface)); }
.tk-confirm h2 { display: flex; gap: .5rem; align-items: center; font-size: 1.15rem; margin: 0 0 .3rem; color: var(--ok); }
.tk-confirm-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-top: .8rem; }
.tk-rate-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.tk-stars { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.tk-stars legend { width: 100%; margin-bottom: .2rem; font-weight: 600; float: left; }
.tk-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk-stars label { cursor: pointer; margin: 0; padding: 0 .1rem; color: var(--line-2); }
.tk-stars label .ic { width: 28px; height: 28px; transition: transform .1s, color .1s; }
.tk-stars label:hover .ic, .tk-stars label:hover ~ label .ic, .tk-stars input:checked ~ label .ic { color: var(--gold); }
.tk-stars label:hover .ic { transform: scale(1.12); }
.tk-stars input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.tk-rating { color: var(--gold); } .tk-rating .ic { width: 15px; height: 15px; }
/* Sidebar */
.tk-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem 1rem; margin: 0; font-size: .88rem; }
.tk-dl dt { color: var(--muted); } .tk-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.tk-late { color: var(--bad); font-weight: 700; }
.tk-cust { display: flex; gap: .7rem; align-items: center; margin: 0 0 .4rem; }
.tk-hist { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .6rem; }
/* Help desk queue */
.tk-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tk-stats a.stat { color: var(--text); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.tk-stats a.stat:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tk-stat-bad .n { color: var(--bad); }
.tk-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tk-filters input[type=text] { flex: 1 1 260px; width: auto; }
.tk-filters select { flex: 0 1 200px; width: auto; }
.tk-row-link { display: grid; gap: .1rem; color: var(--text); text-decoration: none; }
.tk-row-link:hover strong { color: var(--red); text-decoration: underline; }
.tk-row-late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
@media (max-width: 960px) { .tk-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .tk-item { padding: .9rem 1rem; } .tk-item-subj { white-space: normal; } .tk-item-meta .tk-go { display: none; }
  .tk-steps li { font-size: .7rem; } .tk-msg { grid-template-columns: 32px minmax(0, 1fr); gap: .5rem; } .tk-av { width: 32px; height: 32px; }
  .tk-event { padding-left: 40px; } .tk-reply-bar .btn-primary { width: 100%; margin-left: 0; }
}
@media (prefers-color-scheme: dark) { .tk-tabs a.is-on { background: var(--text); border-color: var(--text); color: var(--bg); } .tk-tabs a.is-on span { background: rgba(0,0,0,.15); color: var(--bg); } }
.tk-msg.is-flash .tk-bubble, .tk-event.is-flash { animation: tkflash 1.6s ease-out; }
@keyframes tkflash { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 70%, transparent); } to { box-shadow: var(--shadow-sm); } }

/* =====================================================================
   Header navigation v2 — segmented track, grouped admin menu
   ===================================================================== */
.header-inner { gap: 1rem; min-height: 76px; }
.primary-nav { display: flex; align-items: center; gap: .75rem; margin-left: auto; min-width: 0; }
.nav-track { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.nav-link { gap: .5rem; padding: .5rem .85rem; border-radius: 10px; font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: -.005em; }
.nav-link .ic { width: 17px; height: 17px; opacity: .85; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.is-active { background: var(--surface); color: var(--red); box-shadow: 0 1px 2px rgba(23, 20, 15, .08), 0 0 0 1px var(--line); }
.nav-link.is-active .ic { opacity: 1; }
.nav-link.is-active::after { display: none; }
/* Group dropdown */
.nav-group { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; margin: 0; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .chev { width: 14px; height: 14px; margin-left: -.15rem; }
.nav-group[open] > summary { background: var(--surface); color: var(--text); }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.nav-panel { position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%); width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .5rem; z-index: 60; animation: navpop .14s ease-out; }
.nav-panel::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.nav-panel-title { margin: .35rem .6rem .45rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.nav-panel-link { display: flex; gap: .75rem; align-items: center; padding: .55rem .6rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.nav-panel-link:hover { background: var(--surface-2); }
.nav-panel-link strong { display: block; font-size: .9rem; }
.nav-panel-link small { display: block; font-size: .76rem; color: var(--muted); margin-top: 1px; }
.nav-panel-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--red-50); color: var(--red); }
.nav-panel-link.is-active { background: var(--red-50); } .nav-panel-link.is-active strong { color: var(--red); }
.nav-panel-link.is-active .nav-panel-ic { background: var(--red); color: #fff; }
@keyframes navpop { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.nav-cta { margin-left: 0; }
.header-actions { gap: .35rem; padding-left: .9rem; }
@media (max-width: 1360px) { .is-auth .user-meta { display: none; } }
@media (max-width: 1180px) and (min-width: 861px) { .nav-link { padding: .5rem .65rem; } .nav-link .ic { display: none; } .nav-group > summary .ic:not(.chev) { display: none; } .nav-group > summary .chev { display: inline; } }
@media (max-width: 1000px) and (min-width: 861px) { .nav-link span { display: none; } .nav-link .ic { display: inline; } .nav-group > summary .chev { display: none; } .nav-group > summary .ic:not(.chev) { display: inline; } }
@media (max-width: 860px) {
  .primary-nav { display: none; flex-direction: column; gap: .6rem; align-items: stretch; }
  .primary-nav.is-open { display: flex; }
  .nav-track { flex-direction: column; align-items: stretch; background: none; border: 0; padding: 0; gap: .2rem; }
  .nav-link { padding: .8rem .9rem; font-size: .95rem; }
  .nav-link span { display: inline; }
  .nav-link.is-active { box-shadow: none; background: var(--red-50); }
  .nav-group > summary .chev { margin-left: auto; }
  .nav-panel { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: .1rem 0 .3rem 1rem; animation: none; background: none; }
  .nav-panel::before, .nav-panel-title { display: none; }
  .nav-panel-ic { width: 32px; height: 32px; }
}

/* =====================================================================
   Footer v2
   ===================================================================== */
.site-footer { position: relative; overflow: hidden; background:
  radial-gradient(900px 380px at 100% 0%, rgba(200, 32, 47, .18), transparent 60%),
  radial-gradient(700px 320px at 0% 100%, rgba(244, 194, 27, .08), transparent 60%), var(--night); color: #cfc7ba; margin-top: 0; }
.footer-stripe { height: 4px; }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; margin: 2.75rem 0 0; padding: 1.9rem 2.1rem; border-radius: 20px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.footer-cta > div:first-child { flex: 1 1 420px; }
.footer-eyebrow { margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.footer-cta h2 { margin: 0 0 .35rem; color: #fff; font-size: clamp(1.25rem, 2.3vw, 1.6rem); letter-spacing: -.02em; }
.footer-cta p { margin: 0; color: #b5ab9c; max-width: 600px; }
.footer-cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-cta .btn { padding: .72rem 1.15rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.3fr); gap: 2.5rem; padding: 3rem 0 2.5rem; }
.footer-logo { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; margin-bottom: 1rem; }
.footer-logo img { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.footer-logo > span { display: flex; flex-direction: column; line-height: 1.1; }
.footer-logo strong { color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.footer-logo strong span { color: #f15b67; }
.footer-logo small { color: #9b9284; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .2rem; }
.footer-brand > p { margin: 0 0 1.2rem; color: #a99f90; font-size: .9rem; line-height: 1.65; max-width: 380px; }
.footer-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.footer-trust li { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 99px; font-size: .74rem; font-weight: 600; color: #e1d9cc; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.footer-trust .ic { width: 13px; height: 13px; color: var(--gold); }
.footer-col h3 { margin: .35rem 0 1rem; color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: .55rem; }
.footer-col h3::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--red); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.footer-col ul a { position: relative; color: #c4bbad; text-decoration: none; font-size: .9rem; display: inline-flex; align-items: center; transition: color .15s, transform .15s; }
.footer-col ul a::after { content: "→"; margin-left: .35rem; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; color: var(--gold); }
.footer-col ul a:hover { color: #fff; }
.footer-col ul a:hover::after { opacity: 1; transform: none; }
.footer-contact { display: grid; gap: .6rem; align-content: start; }
.footer-contact h3 { margin-bottom: .4rem; }
.footer-contact-card { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); color: #e6dfd3; text-decoration: none; font-size: .88rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; transition: border-color .15s, background .15s; }
a.footer-contact-card:hover { border-color: rgba(244, 194, 27, .5); background: rgba(255, 255, 255, .07); }
.footer-contact-card small { display: block; font-size: .7rem; color: #9b9284; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: .1rem; }
.fc-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(244, 194, 27, .12); color: var(--gold); }
.fc-ic .ic { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: #8f8679; background: rgba(0, 0, 0, .18); }
.footer-bottom-inner { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.footer-copy { display: inline-flex; align-items: center; gap: .55rem; color: #b5ab9c; }
.footer-copy img { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.to-top { background: rgba(255, 255, 255, .04); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .footer-cta { padding: 1.4rem 1.2rem; margin-top: 2rem; } .footer-cta-actions, .footer-cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; padding-top: 2.25rem; } .footer-contact { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: .6rem; }
}
@media (max-width: 560px) {
  .utility-inner { min-height: 32px; } .utility-links { gap: .9rem; white-space: nowrap; } .utility-links a:first-child { display: none; }
}

/* ---------------- Internal messaging ---------------- */
.gov-warn { display: flex; gap: .35rem; align-items: flex-start; margin: .35rem 0 0; color: var(--bad); font-weight: 800; font-size: .8rem; line-height: 1.35; }
.gov-warn .ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.gov-warn[hidden] { display: none; }
td .gov-warn { max-width: 260px; }
.mx-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.mx-list li + li { border-top: 1px solid var(--line); }
.mx-item { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; color: var(--text); text-decoration: none; border-left: 3px solid transparent; transition: background .12s; }
.mx-item:hover { background: var(--surface-2); }
.mx-item.imp-important { border-left-color: var(--gold); } .mx-item.imp-urgent { border-left-color: var(--red); }
.mx-av img { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); }
.mx-main { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.mx-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .88rem; }
.mx-top strong { font-weight: 600; } .mx-top time { margin-left: auto; }
.mx-subj { display: flex; align-items: center; gap: .45rem; font-size: 1rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-item.is-new .mx-subj, .mx-item.is-new .mx-top strong { font-weight: 800; }
.mx-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-50); }
.mx-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-letter { padding: 0; overflow: hidden; }
.mx-flag { display: flex; gap: .45rem; align-items: center; padding: .55rem 1.4rem; font-size: .82rem; font-weight: 800; letter-spacing: .02em; background: var(--warn-bg); color: var(--warn); }
.mx-letter.imp-urgent .mx-flag { background: var(--red); color: #fff; }
.mx-letter-head { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem 1.4rem 1rem; border-bottom: 1px solid var(--line); }
.mx-letter-head img { width: 48px; height: 48px; flex: none; }
.mx-letter-head > div { flex: 1; min-width: 0; }
.mx-letter-head h1 { margin: 0 0 .25rem; font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.01em; overflow-wrap: anywhere; }
.mx-letter-head p { margin: 0; }
.mx-body { padding: 1.4rem 1.4rem 1.6rem; font-size: 1rem; line-height: 1.75; max-width: 75ch; overflow-wrap: anywhere; }
.mx-conv { margin-top: 1.5rem; }
.mx-conv-h { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: 1.05rem; margin: 0 0 1rem; }
.mx-conv-h .ic { color: var(--red); }
.mx-admin-conv h3 { display: flex; gap: .5rem; align-items: center; margin: 0 0 .2rem; } .mx-admin-conv h3 a { margin-left: auto; font-weight: 500; }
.mx-admin-conv .tk-thread { margin-top: 1rem; }
.mx-row-on td { background: var(--red-50); }
progress.mx-meter { -webkit-appearance: none; appearance: none; display: block; width: 100px; height: 6px; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: .3rem; }
progress.mx-meter::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress.mx-meter::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
progress.mx-meter::-moz-progress-bar { background: var(--ok); border-radius: 99px; }
progress.mx-meter-lg { width: 100%; height: 8px; margin: .2rem 0 1rem; }
.mx-count { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 .6rem; }
.mx-count strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.mx-count span { color: var(--muted); font-size: .9rem; }
/* Compose */
.stack-col { display: grid; gap: 1rem; min-width: 0; } .stack-col > .card { margin: 0; }
.mx-step { display: flex; gap: .6rem; align-items: center; margin: 0 0 1rem; font-size: 1.05rem; }
.mx-step span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-size: .8rem; }
.mx-aud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.mx-aud-opt { margin: 0; cursor: pointer; }
.mx-aud-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mx-aud-opt > span { display: grid; gap: .15rem; height: 100%; padding: .85rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .12s, box-shadow .12s, background .12s; }
.mx-aud-opt .ic { color: var(--muted); margin-bottom: .25rem; }
.mx-aud-opt strong { font-size: .92rem; } .mx-aud-opt small { color: var(--muted); font-weight: 400; font-size: .76rem; }
.mx-aud-opt:hover > span { border-color: var(--line-2); }
.mx-aud-opt input:checked + span { border-color: var(--red); background: var(--red-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 12%, transparent); }
.mx-aud-opt input:checked + span .ic { color: var(--red); }
.mx-aud-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.mx-panel[hidden] { display: none; }
.mx-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.mx-check { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; font-size: .88rem; cursor: pointer; }
.mx-check:hover { border-color: var(--line-2); }
.mx-check em { margin-left: auto; font-style: normal; font-size: .74rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 0 .45rem; border-radius: 99px; }
.mx-check:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.mx-usearch { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 .75rem; background: var(--surface); margin-bottom: .6rem; color: var(--muted); }
.mx-usearch:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.mx-usearch input { border: 0 !important; box-shadow: none !important; padding-left: 0; background: transparent; }
.mx-ulist { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.mx-urow { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .55rem .8rem; font-weight: 400; cursor: pointer; border-bottom: 1px solid var(--line); }
.mx-urow[hidden] { display: none; }
.mx-urow:last-of-type { border-bottom: 0; }
.mx-urow:hover { background: var(--surface-2); }
.mx-urow:has(input:checked) { background: var(--red-50); }
.mx-urow .avatar { width: 32px; height: 32px; font-size: .72rem; flex: none; }
.mx-urow > span:last-child { min-width: 0; } .mx-urow strong { display: block; font-size: .9rem; }
.mx-urow small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-none { padding: .8rem; margin: 0; }
.mx-imp { border: 0; padding: 0; margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.mx-imp legend { font-weight: 600; font-size: .86rem; margin-bottom: .4rem; padding: 0; width: 100%; }
.mx-pill { margin: 0; cursor: pointer; }
.mx-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mx-pill span { display: inline-block; padding: .4rem .95rem; border-radius: 99px; border: 1.5px solid var(--line); font-size: .86rem; font-weight: 600; }
.mx-pill input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.mx-pill.imp-important input:checked + span { border-color: var(--gold-600); background: var(--gold); color: var(--ink); }
.mx-pill.imp-urgent input:checked + span { border-color: var(--red); background: var(--red); color: #fff; }
.mx-pill input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.mx-summary { position: sticky; top: 96px; }
.mx-summary .tk-check { display: flex; margin: .5rem 0; }
.mx-send { width: 100%; margin-top: .6rem; }
@media (max-width: 720px) { .mx-aud { grid-template-columns: 1fr 1fr; } .mx-letter-head { flex-wrap: wrap; } .mx-arch { width: 100%; } }
@media (max-width: 960px) { .mx-summary { position: static; } }
@media (max-width: 560px) {
  .header-inner { gap: .5rem; } .header-actions { gap: .15rem; } .icon-btn { width: 38px; height: 38px; }
  .user-menu summary { padding: .2rem; gap: .2rem; } .user-menu .chev { display: none; }
}
@media (max-width: 420px) { .brand-text { display: none; } }
.table-wrap { position: relative; }
/* Government-email callout (speech bubble pointing at the email field) */
.gov-callout { position: relative; display: flex; gap: .7rem; align-items: flex-start; margin-top: .65rem; padding: .75rem .9rem; border-radius: 12px; background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--text); font-size: .82rem; line-height: 1.45; box-shadow: 0 4px 14px rgba(179, 20, 31, .08); animation: gcin .16s ease-out; }
.gov-callout[hidden] { display: none; }
.gov-callout::before { content: ""; position: absolute; top: -7px; left: 22px; width: 12px; height: 12px; background: var(--bad-bg); border-left: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-top: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); transform: rotate(45deg); }
.gov-callout > div { min-width: 0; }
.gov-callout strong { display: block; color: var(--bad); font-weight: 800; font-size: .84rem; margin-bottom: .1rem; }
.gov-callout span:not(.gc-ic) { display: block; color: color-mix(in srgb, var(--bad) 70%, var(--text)); font-weight: 500; }
.gov-callout code { font-family: var(--mono); font-size: .78rem; padding: .05rem .3rem; border-radius: 5px; background: rgba(255, 255, 255, .7); border: 1px solid color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); white-space: nowrap; }
.gc-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bad); color: #fff; }
.gc-ic .ic { width: 15px; height: 15px; }
.gov-callout-sm { display: inline-flex; margin-top: .45rem; padding: .45rem .65rem .45rem .5rem; gap: .5rem; align-items: center; border-radius: 10px; font-size: .76rem; box-shadow: none; animation: none; max-width: 260px; }
.gov-callout-sm::before { top: -6px; left: 14px; width: 10px; height: 10px; }
.gov-callout-sm .gc-ic { width: 22px; height: 22px; } .gov-callout-sm .gc-ic .ic { width: 12px; height: 12px; }
.gov-callout-sm strong { font-size: .78rem; margin: 0; }
@media (prefers-color-scheme: dark) { .gov-callout code { background: rgba(0, 0, 0, .25); } }
@keyframes gcin { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) { #em-gov { width: 470px; max-width: calc(100vw - 120px); position: relative; z-index: 2; } }
