:root {
  --ink: hsl(var(--foreground)); --ink-soft: hsl(var(--muted-foreground));
  --paper: hsl(var(--background)); --surface: hsl(var(--card)); --surface-soft: hsl(var(--muted) / .5);
  --line: hsl(var(--border)); --line-strong: hsl(var(--input));
  --forest: hsl(var(--primary)); --forest-2: hsl(var(--accent-foreground));
  --mint: hsl(var(--accent)); --lime: hsl(var(--accent));
  --amber: hsl(var(--warning)); --amber-bg: hsl(var(--warning) / .12);
  --red: hsl(var(--destructive)); --red-bg: hsl(var(--destructive) / .1);
  --shadow: 0 10px 28px hsl(var(--foreground) / .07);
  --sidebar: 236px; --font: var(--font-sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--font); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 3.3vw, 3.8rem); line-height: 1.02; letter-spacing: -.055em; }
h2 { font-size: 1.3rem; letter-spacing: -.025em; }
h3 { font-size: 1.02rem; }
p { color: var(--ink-soft); line-height: 1.65; }
code, pre { font-family: var(--font-mono, "SFMono-Regular", Consolas, monospace); font-size: .82em; }
pre { overflow: auto; padding: 14px; color: hsl(var(--ipos-code-foreground)); background: hsl(var(--ipos-code-background)); border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; color: hsl(var(--primary-foreground)); background: var(--forest); border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; color: hsl(var(--primary-foreground) / .92); background: hsl(var(--primary)); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--forest); background: var(--lime); font-weight: 850; font-size: 1.1rem; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .08em; }
.brand small { margin-top: 2px; color: hsl(var(--primary-foreground) / .72); font-size: .63rem; }
.nav-stack { display: grid; gap: 6px; margin-top: 52px; }
.nav-stack a { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 11px; color: hsl(var(--primary-foreground) / .74); text-decoration: none; font-size: .91rem; font-weight: 650; }
.nav-stack a span { width: 20px; color: hsl(var(--primary-foreground) / .6); font-size: 1.1rem; text-align: center; }
.nav-stack a:hover, .nav-stack a.active { color: hsl(var(--primary-foreground)); background: hsl(var(--primary-foreground) / .09); }
.nav-stack a.active span { color: var(--lime); }
.sidebar-user { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; margin-top: auto; padding: 13px 6px 0; border-top: 1px solid hsl(var(--primary-foreground) / .12); }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; white-space: nowrap; }
.sidebar-user small { margin-top: 2px; color: hsl(var(--primary-foreground) / .7); font-size: .68rem; text-transform: uppercase; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--forest); background: var(--mint); font-weight: 800; }
.icon-button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; color: inherit; background: transparent; cursor: pointer; font-size: 1.25rem; }
.icon-button:hover { background: hsl(var(--primary-foreground) / .1); }
.main-column { min-width: 0; padding: 42px clamp(24px, 4vw, 64px) 80px; }
.topbar { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 30px; }
.topbar h1 { margin-bottom: 9px; }
.topbar p:last-child { margin-bottom: 0; }
.muted, .form-note, small { color: var(--ink-soft); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; text-decoration: none; font-size: .87rem; font-weight: 750; transition: transform .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: hsl(var(--primary-foreground)); background: var(--forest); }
.button-primary:hover { background: var(--forest-2); }
.button-secondary { color: var(--forest); background: var(--surface); border-color: var(--line-strong); }
.button-danger { color: var(--red); background: var(--red-bg); border-color: hsl(var(--destructive) / .3); }
.button-small { min-height: 32px; padding: 5px 9px; font-size: .74rem; }
.button-wide { width: 100%; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: hsl(var(--card) / .7); }
.metric > span, .metric small { display: block; }
.metric > span { margin-bottom: 9px; color: var(--ink-soft); font-size: .76rem; font-weight: 700; }
.metric strong { display: block; margin-bottom: 6px; font-size: 2.1rem; letter-spacing: -.05em; }
.metric small { font-size: .72rem; }
.metric-inline { font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
.panel { padding: clamp(20px, 2.3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel + .panel { margin-top: 18px; }
.panel-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 22px; }
.panel-heading h2 { margin-bottom: 7px; }
.panel-heading p { margin-bottom: 0; font-size: .9rem; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel > .panel-heading { padding: 25px 28px 4px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { color: var(--ink-soft); background: var(--surface-soft); font-size: .67rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
th, td { padding: 15px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
td small { display: block; margin-top: 5px; font-size: .7rem; }
.table-title { font-weight: 760; text-decoration: none; }
.table-open-mobile { display: none; }
.arrow-link { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border-radius: 9px; color: var(--forest); background: var(--mint); text-decoration: none; font-weight: 800; }
.state { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.state-neutral { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
.state-ok { color: hsl(var(--success)); background: hsl(var(--success) / .1); }
.state-warn { color: hsl(var(--warning)); background: var(--amber-bg); }
.empty { display: grid; justify-items: center; padding: clamp(44px, 8vw, 90px) 20px; text-align: center; }
.empty h2 { margin-bottom: 8px; }
.empty p { max-width: 500px; margin-bottom: 0; }
label { display: grid; gap: 7px; color: hsl(var(--foreground)); font-size: .78rem; font-weight: 750; }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: hsl(var(--card)); }
textarea { resize: vertical; line-height: 1.55; }
.form-stack { display: grid; gap: 16px; }
.form-stack.compact { gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid h3, .form-grid .span-2 { grid-column: 1 / -1; }
.section-form { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.inline-form { display: flex; gap: 6px; }
.checkbox-row { display: flex; grid-column: auto; gap: 9px; align-items: center; }
.checkbox-row input { width: 18px; min-height: 18px; }
.danger-zone { border-color: hsl(var(--ipos-danger-border)); background: hsl(var(--ipos-danger-surface)); }
.dialog { width: min(680px, calc(100vw - 28px)); max-height: 90vh; padding: 26px; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 35px 100px hsl(var(--foreground) / .28); }
.dialog::backdrop { background: hsl(var(--foreground) / .62); backdrop-filter: blur(5px); }
.dialog-heading, .dialog-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dialog-actions { justify-content: flex-end; margin-top: 8px; }
.package-hero { margin: -42px calc(clamp(24px,4vw,64px) * -1) 26px; padding: 34px clamp(24px,4vw,64px) 0; border-bottom: 1px solid var(--line); background: hsl(var(--card) / .58); }
.breadcrumb { display: flex; gap: 9px; align-items: center; margin-bottom: 28px; color: var(--ink-soft); font-size: .75rem; }
.hero-row { display: flex; justify-content: space-between; gap: 32px; align-items: start; }
.hero-row h1 { max-width: 920px; margin-bottom: 8px; font-size: clamp(2rem, 4vw, 4.3rem); }
.kk-title { margin-bottom: 0; font-size: 1.02rem; }
.hero-state { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 28px; }
.tabs { display: flex; gap: 25px; margin-top: 36px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 0 0 15px; border-bottom: 3px solid transparent; color: var(--ink-soft); text-decoration: none; font-size: .82rem; font-weight: 740; white-space: nowrap; }
.tabs a.active { border-color: var(--forest); color: var(--forest); }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 18px; }
.content-grid .panel { min-width: 0; margin: 0; }
.content-grid h2 { overflow-wrap: anywhere; }
.prose, .article-copy { color: var(--ink); font-size: 1rem; line-height: 1.8; white-space: pre-wrap; }
.facts { display: grid; gap: 12px; margin: 18px 0; }
.facts div { display: grid; grid-template-columns: minmax(90px, .8fr) 1.2fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); font-size: .68rem; text-transform: uppercase; }
.facts dd { margin: 0; overflow-wrap: anywhere; font-size: .77rem; font-weight: 700; text-align: right; }
.facts-list { display: grid; gap: 12px; margin: 18px 0; }
.facts-list > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--ink-soft); font-size: .68rem; text-transform: uppercase; }
.facts-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .77rem; font-weight: 700; text-align: right; }
.facts.horizontal { display: flex; gap: 26px; }
.facts.horizontal div { display: block; border: 0; }
.facts.horizontal dd { margin-top: 5px; text-align: left; }
details { margin-top: 18px; }
summary { color: var(--forest-2); cursor: pointer; font-size: .75rem; font-weight: 750; }
.blocker-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.blocker-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); color: hsl(var(--ipos-warning-foreground)); background: hsl(var(--ipos-warning-surface)); }
.blocker-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: hsl(var(--warning) / .28); font-weight: 900; }
.blocker-text { min-width: 0; line-height: 1.35; font-weight: 700; }
.success-note { padding: 16px; border-radius: var(--radius); color: hsl(var(--success)); background: hsl(var(--success) / .1); }
.card-list { display: grid; gap: 12px; }
.source-card, .output-card { display: flex; justify-content: space-between; gap: 28px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.source-card h3, .output-card h3 { margin: 10px 0 6px; }
.source-card a { color: var(--forest-2); font-size: .78rem; font-weight: 730; }
.graph-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.graph-list article { display: flex; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.graph-list small, .graph-list strong { display: block; }
.graph-dot { width: 12px; height: 12px; flex: 0 0 auto; border: 3px solid var(--mint); border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.service-card { display: flex; flex-direction: column; min-height: 330px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.service-card p { font-size: .78rem; line-height: 1.55; }
.service-card form { margin-top: auto; }
.service-top, .delivery-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.service-index { color: hsl(var(--muted-foreground) / .7); font-family: monospace; font-size: .72rem; }
.decision-list, .delivery-timeline { display: grid; gap: 12px; }
.decision-list article { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 13px; }
.decision-list h3 { margin-bottom: 5px; text-transform: capitalize; }
.delivery-timeline article { display: grid; grid-template-columns: 20px 1fr; gap: 14px; }
.delivery-timeline article > div { padding: 0 0 24px 16px; border-left: 1px solid var(--line); }
.timeline-dot { position: relative; left: 14px; z-index: 1; width: 13px; height: 13px; margin-top: 5px; border: 3px solid hsl(var(--card)); border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.timeline-dot.complete { background: var(--forest-2); box-shadow: 0 0 0 1px var(--forest-2); }
.danger-text { color: var(--red); }
.search-box { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: hsl(var(--card)); }
.search-box input { border: 0; font-size: 1.1rem; }
.search-results { display: grid; }
.search-results a { display: grid; grid-template-columns: 100px 1fr auto; gap: 18px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-results h2 { margin-bottom: 4px; }
.search-results p { margin-bottom: 3px; }
.narrow-page { width: min(580px, 100%); margin: 5vh auto; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: .82rem; }
.alert-danger { color: var(--red); background: var(--red-bg); }
.mobile-nav { display: none; }
.auth-body { min-height: 100vh; background: var(--surface); }
.auth-layout { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(30px, 6vw, 85px); color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); }
.auth-story > * { position: relative; z-index: 1; }
.brand-light { color: hsl(var(--primary-foreground)); }
.auth-story h1 { max-width: 720px; margin: 20px 0; font-size: clamp(2.6rem, 5.2vw, 6.5rem); }
.auth-story p { max-width: 620px; color: hsl(var(--primary-foreground) / .78); font-size: 1rem; }
.auth-foot { margin: 0; font-size: .72rem !important; letter-spacing: .08em; text-transform: uppercase; }
.auth-panel { display: grid; place-items: center; padding: 30px; background: hsl(var(--background)); }
.auth-card { display: grid; gap: 18px; width: min(430px, 100%); padding: clamp(25px, 4vw, 45px); border: 1px solid var(--line); border-radius: 24px; background: hsl(var(--card)); box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: 8px; font-size: 2rem; }
.auth-card .form-note { margin: 0; font-size: .69rem; text-align: center; }
.public-body { background: hsl(var(--background)); }
.public-header { display: flex; justify-content: space-between; align-items: center; min-height: 92px; padding: 18px clamp(22px, 6vw, 90px); border-bottom: 1px solid var(--line); background: hsl(var(--background) / .9); }
.public-header nav { display: flex; gap: 22px; align-items: center; font-size: .82rem; font-weight: 700; }
.publication-feed { padding: clamp(50px, 8vw, 110px) clamp(22px, 7vw, 110px); }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-title h2 { margin: 0; font-size: 1.8rem; }
.section-title span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); font-weight: 800; }
.publication-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.publication-list article { min-height: 350px; border: 1px solid var(--line); border-radius: 20px; background: hsl(var(--card)); transition: transform .2s, box-shadow .2s; }
.publication-list article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.publication-list a { display: flex; flex-direction: column; height: 100%; padding: 25px; text-decoration: none; }
.publication-list h2 { margin: 25px 0 12px; font-size: 1.7rem; line-height: 1.15; }
.publication-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--ink-soft); font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.read-more { margin-top: auto; color: var(--forest-2); font-size: .8rem; font-weight: 800; }
.public-empty { max-width: 800px; padding: 60px 0; }
.public-empty h2 { font-size: 2.5rem; }
.public-article { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: clamp(70px, 10vw, 140px) 0; }
.public-article > header h1 { margin: 32px 0 20px; font-size: clamp(3rem, 7vw, 7rem); }
.lead { font-size: 1.3rem; }
.verification-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; min-width: 0; margin: 40px 0 70px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.verification-strip > div, .verification-strip > span { min-width: 0; padding: 16px; background: hsl(var(--card)); }
.verification-strip dt { margin-bottom: 7px; color: var(--ink-soft); font-size: .62rem; text-transform: uppercase; }
.verification-strip dd { min-width: 0; margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.verification-strip small, .verification-strip strong, .verification-strip code { display: block; }
.verification-strip code { overflow-wrap: anywhere; word-break: break-word; }
.verification-strip small { margin-bottom: 7px; font-size: .62rem; text-transform: uppercase; }
.article-language { position: relative; padding: 0 clamp(0px, 5vw, 70px) 70px; }
.language-label { position: absolute; left: 0; top: 6px; color: var(--forest-2); font-size: .68rem; font-weight: 850; }
.article-copy { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.85; }
.correction-box { display: flex; justify-content: space-between; gap: 30px; align-items: center; margin-top: 30px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: hsl(var(--success) / .1); }
.history-page { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: 90px 0; }
.history-page > h1 { max-width: 800px; margin: 20px 0 55px; }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--forest-2); font-weight: 700; }
.history-list article { display: grid; grid-template-columns: 50px 1fr; gap: 24px; padding: 25px 0; border-top: 1px solid var(--line); }
.revision-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: hsl(var(--primary-foreground)); background: var(--forest); font-weight: 800; }
.history-list code { overflow-wrap: anywhere; }
.public-footer { display: flex; justify-content: space-between; gap: 30px; padding: 55px clamp(22px, 7vw, 110px); color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); }
.public-footer p { margin: 8px 0 0; color: hsl(var(--primary-foreground) / .74); }
.error-page { display: grid; justify-items: start; min-height: 60vh; padding: clamp(80px, 14vw, 190px) clamp(22px, 10vw, 160px); }
.error-page > span { color: var(--forest-2); font-size: .8rem; font-weight: 900; letter-spacing: .2em; }
.error-page h1 { margin: 25px 0 15px; }
@media (max-width: 1180px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-column { padding: 26px 18px 94px; }
  .mobile-nav { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; display: flex; justify-content: space-around; min-height: 62px; padding: 8px; border-radius: 18px; color: hsl(var(--primary-foreground)); background: hsl(var(--primary) / .96); box-shadow: 0 15px 45px hsl(var(--foreground) / .24); }
  .mobile-nav a { display: grid; justify-items: center; gap: 3px; min-width: 70px; color: hsl(var(--primary-foreground) / .75); text-decoration: none; font-size: .64rem; }
  .mobile-nav span { color: var(--lime); font-size: 1.1rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid .metric:last-child { grid-column: 1/-1; }
  .package-hero { margin: -26px -18px 20px; padding: 25px 18px 0; }
  .hero-row { display: block; }
  .hero-state { justify-content: flex-start; padding-top: 12px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 42vh; padding: 30px; }
  .auth-story h1 { font-size: clamp(2.5rem, 10vw, 4.5rem); }
  .auth-foot { display: none; }
  .auth-panel { padding: 20px; }
  .public-header { min-height: 76px; }
  .public-header nav > a:first-child { display: none; }
  .verification-strip { grid-template-columns: 1fr; }
  .correction-box { display: grid; }
}
@media (max-width: 560px) {
  h1 { font-size: 2.25rem; }
  .topbar { display: grid; align-items: start; }
  .topbar .button { width: 100%; }
  .metric-grid, .service-grid, .graph-list, .publication-list { grid-template-columns: 1fr; }
  .metric-grid .metric:last-child { grid-column: auto; }
  .panel { padding: 18px; border-radius: 14px; }
  .panel-heading { display: grid; gap: 10px; }
  .source-card, .output-card { display: grid; align-items: start; }
  .facts-list > div { grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); }
  .facts-list dd { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .decision-list article { grid-template-columns: 1fr; }
  .search-results a { grid-template-columns: 1fr auto; }
  .search-results .state { grid-column: 1/-1; width: fit-content; }
  .public-header .brand small { display: none; }
  .public-header .button { min-height: 36px; padding: 7px 10px; font-size: .72rem; }
  .publication-feed { padding-left: 18px; padding-right: 18px; }
  .table-open-mobile { display: inline-block; margin-top: 10px; color: hsl(var(--primary)); font-size: .72rem; font-weight: 700; }
  .public-article { width: min(100% - 28px, 920px); }
  .article-language { padding-left: 0; }
  .language-label { position: static; display: inline-block; margin-bottom: 20px; }
  .public-footer { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* AVDS IPOS institutional surface: compact, evidence-first and action-first. */
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 3.1vw, 3.45rem); line-height: 1.1; }
.section-meta { margin: 0 0 8px; color: var(--ink-soft); font-size: .72rem; font-weight: 650; line-height: 1.35; }
.eyebrow { color: var(--ink-soft); font-size: .72rem; font-weight: 650; letter-spacing: 0; text-transform: none; }
.workspace-body { background: hsl(var(--background)); }
.sidebar { padding: 20px 14px; color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); border-right: 1px solid hsl(var(--primary) / .85); }
.brand { gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: var(--radius); color: hsl(var(--primary)); background: hsl(var(--primary-foreground)); font-size: .74rem; letter-spacing: .04em; }
.brand small { color: hsl(var(--primary-foreground) / .72); font-size: .66rem; }
.nav-stack { gap: 2px; margin-top: 42px; }
.nav-stack a { gap: 10px; padding: 10px 11px; border-radius: var(--radius); color: hsl(var(--primary-foreground) / .74); font-weight: 600; }
.nav-stack a span { width: 20px; color: inherit; font-family: ui-monospace, monospace; font-size: .68rem; text-align: left; }
.nav-stack a:hover, .nav-stack a.active { color: hsl(var(--primary-foreground)); background: hsl(var(--primary-foreground) / .14); }
.nav-stack a.active { box-shadow: inset 2px 0 0 hsl(var(--primary-foreground)); }
.nav-stack a.active span { color: inherit; }
.sidebar-user { border-top-color: hsl(var(--primary-foreground) / .25); }
.sidebar-user small { color: hsl(var(--primary-foreground) / .7); }
.avatar { border-radius: var(--radius); color: hsl(var(--primary)); background: hsl(var(--primary-foreground)); }
.main-column { max-width: 1680px; padding-top: 34px; }
.topbar { align-items: flex-start; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin-bottom: 8px; }
.topbar p:last-child { max-width: 660px; }
.button { min-height: 40px; border-radius: var(--radius); box-shadow: none; transition: background .16s, border-color .16s, color .16s; }
.button:hover { transform: none; }
.button-primary { background: hsl(var(--primary)); }
.button-primary:hover { background: hsl(var(--primary) / .88); }
.button-secondary { color: hsl(var(--foreground)); background: hsl(var(--card)); border-color: hsl(var(--border)); }
.button-secondary:hover { background: hsl(var(--muted)); }
.metric-grid { gap: 0; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.metric { padding: 17px 20px; border: 0; border-radius: 0; background: var(--surface); }
.metric + .metric { border-left: 1px solid var(--line); }
.metric > span { margin-bottom: 5px; font-weight: 600; }
.metric strong { margin-bottom: 2px; font-family: var(--font-display); font-size: 1.75rem; }
.panel { border-radius: var(--radius); box-shadow: none; }
.table-panel > .panel-heading { padding: 22px 24px 10px; }
th { background: hsl(var(--muted) / .6); font-size: .68rem; letter-spacing: .035em; }
th, td { padding: 14px 16px; }
tbody tr:hover { background: hsl(var(--accent) / .35); }
.state { padding: 4px 7px; border: 1px solid transparent; border-radius: var(--radius); font-size: .67rem; letter-spacing: 0; text-transform: none; }
.state-neutral { color: hsl(var(--foreground)); background: hsl(var(--muted)); border-color: hsl(var(--border)); }
.state-ok { color: hsl(var(--success)); background: hsl(var(--success) / .1); border-color: hsl(var(--success) / .24); }
.state-warn { color: hsl(var(--warning)); background: hsl(var(--warning) / .1); border-color: hsl(var(--warning) / .25); }
.arrow-link { border-radius: var(--radius); color: hsl(var(--primary)); background: hsl(var(--accent)); }
.package-hero { padding-top: 30px; background: hsl(var(--card) / .65); }
.breadcrumb { margin-bottom: 18px; }
.hero-row h1 { font-size: clamp(2rem, 3.6vw, 3.8rem); }
.hero-state { padding-top: 18px; }
.tabs { gap: 20px; margin-top: 28px; }
.tabs a { border-width: 2px; font-weight: 650; }
.tabs a.active { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.content-grid { gap: 14px; }
.next-action { border-left: 3px solid hsl(var(--primary)); }
.source-card, .output-card { padding: 17px 18px; border-radius: var(--radius); background: hsl(var(--card)); }
.source-card h3, .output-card h3 { margin-top: 9px; }
.service-grid { gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.service-card { min-height: 272px; border: 0; border-radius: 0; background: var(--surface); }
.service-card + .service-card { border-left: 1px solid var(--line); }
.graph-list article, .decision-list article { border-radius: var(--radius); }
.public-body { background: hsl(var(--background)); }
.public-header { min-height: 78px; background: hsl(var(--background) / .96); }
.public-header .brand small { color: var(--ink-soft); }
.public-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; padding: clamp(48px, 8vw, 108px) clamp(22px, 9vw, 150px) 42px; border-bottom: 1px solid var(--line); background: hsl(var(--card)); }
.public-intro h1 { max-width: 700px; margin-bottom: 15px; font-size: clamp(2.5rem, 6vw, 6rem); }
.public-intro p:last-child { max-width: 600px; margin-bottom: 0; font-size: 1.02rem; }
.public-intro dl { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 0; min-width: min(100%, 320px); margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.public-intro dl div { padding: 14px 16px; background: hsl(var(--background)); }
.public-intro dl div + div { border-left: 1px solid var(--line); }
.public-intro dt { color: var(--ink-soft); font-size: .7rem; }
.public-intro dd { margin: 5px 0 0; font-size: .9rem; font-weight: 650; }
.publication-feed { padding-top: 38px; }
.section-title { margin-bottom: 18px; }
.section-title span { width: auto; height: auto; border-radius: 0; color: var(--ink-soft); background: transparent; font-size: .76rem; font-weight: 600; }
.publication-list { display: block; border-top: 1px solid var(--line); }
.publication-list article { min-height: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.publication-list article:hover { transform: none; box-shadow: none; background: hsl(var(--accent) / .26); }
.publication-list a { min-height: 0; padding: 22px 0 24px; }
.publication-list h2 { margin: 18px 0 9px; font-family: var(--font-display); font-size: 1.45rem; }
.read-more { color: hsl(var(--primary)); }
.public-empty { max-width: 720px; padding: 34px 0; }
.public-empty h2 { font-size: 1.8rem; }
.public-footer { color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); }
.public-footer p { color: hsl(var(--primary-foreground) / .74); }
.auth-story { background: hsl(var(--primary)); }
.auth-story h1 { max-width: 650px; font-size: clamp(2.35rem, 4.5vw, 5.25rem); }
.auth-story p { color: hsl(var(--primary-foreground) / .78); }
.auth-story .section-meta { color: hsl(var(--primary-foreground) / .72); }
.auth-panel { background: hsl(var(--background)); }
.auth-card { border-radius: var(--radius); box-shadow: var(--shadow); }
.article-copy { font-family: var(--font-serif); }
@media (max-width: 1180px) { .service-card:nth-child(odd) { border-left: 0; } .service-card { border-bottom: 1px solid var(--line); } }
@media (max-width: 820px) {
  .mobile-nav { left: 0; right: 0; bottom: 0; border-radius: 0; background: hsl(var(--primary)); box-shadow: 0 -5px 18px hsl(var(--foreground) / .12); }
  .mobile-nav a { color: hsl(var(--primary-foreground) / .75); font-size: .66rem; }
  .mobile-nav span { color: inherit; font-family: ui-monospace, monospace; font-size: .67rem; }
  .metric + .metric { border-left: 1px solid var(--line); }
  .public-intro { grid-template-columns: 1fr; gap: 24px; padding-bottom: 30px; }
  .public-intro dl { width: 100%; }
}
@media (max-width: 560px) {
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line); }
  .service-grid { border-radius: var(--radius); }
  .service-card + .service-card { border-left: 0; border-top: 1px solid var(--line); }
  .public-intro h1 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
}
