/* Conference Proceedings — brand: #2A4685 (navy) and #E7E7E7 (silver grey) */
:root {
  --brand: #2A4685;
  --brand-dark: #1d3263;
  --brand-deep: #14234a;
  --brand-light: #e9eef8;
  --silver: #E7E7E7;
  --silver-2: #f4f4f4;
  --ink: #1c2333;
  --ink-2: #4a5468;
  --ink-3: #6b7489;
  --line: #dcdfe5;
  --paper: #ffffff;
  --gold: #b08a3e;
  --ok: #1f7a4d; --ok-bg: #e6f4ec;
  --warn: #8a5a00; --warn-bg: #fdf3dc;
  --bad: #a12b2b; --bad-bg: #fbe9e9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,35,74,.06), 0 6px 24px rgba(20,35,74,.07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--brand-deep); line-height: 1.25; margin: 1.4em 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-top: 0; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, pre { font-family: var(--mono); font-size: .88em; }
pre { background: var(--silver-2); padding: 1rem; border-radius: 8px; overflow: auto; border: 1px solid var(--line); }
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-2 { margin-top: 2rem; } .mb-2 { margin-bottom: 2rem; }
:focus-visible { outline: 3px solid #7fa0e0; outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.25rem; border-radius: 8px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 4px 14px rgba(42,70,133,.3); }
.btn-ghost { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: var(--brand-light); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--silver); color: var(--brand-deep); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #861f1f; color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------- Public header ---------- */
.topbar { background: var(--brand-deep); color: #cfd8ee; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--brand-deep); }
.brand img { height: 48px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.18rem; letter-spacing: .01em; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav > ul { list-style: none; display: flex; gap: .1rem; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a, .nav button.navtoggle { display: block; padding: .55rem .75rem; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .94rem; border-radius: 6px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav a:hover, .nav button.navtoggle:hover, .nav li.open > button { background: var(--silver-2); color: var(--brand); }
.nav .sub { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 260px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .4rem; list-style: none; margin: 0; }
.nav li.open > .sub, .nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { font-weight: 400; padding: .5rem .7rem; }
.nav .cta { margin-left: .5rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; cursor: pointer; }
@media (max-width: 1060px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 1rem; max-height: 80vh; overflow: auto; }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav .sub { position: static; box-shadow: none; border: 0; padding-left: 1rem; display: block; }
  .nav .cta { margin: .5rem 0 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,.12), transparent 60%), linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 62%, #3a5aa3 100%); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; padding: 5.5rem 0 5rem; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: .6rem; }
.hero h1 em { font-style: normal; color: #cfdcff; }
.hero .lead { font-size: 1.18rem; color: #dbe3f5; max-width: 40em; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 700; color: var(--gold); margin-bottom: 1rem; }
.hero .eyebrow { color: #e8d4a6; }
.hero .actions { margin-top: 2rem; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 1.8rem; backdrop-filter: blur(4px); }
.hero-card img { display: block; width: 120px; margin: 0 auto 1rem; filter: drop-shadow(0 8px 20px rgba(0,0,0,.25)); }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li { padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.14); display: flex; gap: .6rem; font-size: .95rem; color: #e6ecfa; }
.hero-card li:last-child { border: 0; }
.hero-card li::before { content: "✓"; color: #9fd0b5; font-weight: 700; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; padding: 3.5rem 0; } .hero-card { display: none; } }

.page-hero { background: linear-gradient(180deg, var(--silver-2), #fff); border-bottom: 1px solid var(--line); padding: 3rem 0 2.2rem; }
.page-hero h1 { margin-bottom: .4rem; }
.page-hero .lead { color: var(--ink-2); font-size: 1.12rem; max-width: 46em; margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: .9rem; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span.sep { margin: 0 .4rem; opacity: .5; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--silver-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 0; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 1px 2px rgba(20,35,74,.04); }
.card h3 { margin-top: 0; }
.card.hover { transition: transform .15s, box-shadow .15s; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.icon-badge { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; font-weight: 700; font-family: var(--serif); font-size: 1.1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.feature { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; border-top: 3px solid var(--brand); }
.feature h3 { margin-top: 0; font-size: 1.1rem; }
.feature p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--brand); line-height: 1.1; }
.stat span { color: var(--ink-3); font-size: .9rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.2rem 1.2rem 1.2rem; position: relative; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--serif); font-size: 1.6rem; color: var(--brand); font-weight: 700; display: block; margin-bottom: .3rem; }
.steps li strong { display: block; color: var(--brand-deep); }
.process-list { counter-reset: p; list-style: none; padding: 0; }
.process-list li { counter-increment: p; position: relative; padding: 0 0 1.4rem 3.4rem; border-left: 2px solid var(--silver); margin-left: 1.1rem; }
.process-list li::before { content: counter(p); position: absolute; left: -1.15rem; top: -.15rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.process-list li:last-child { border-color: transparent; }
.cta-band { background: linear-gradient(120deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff; border-radius: 16px; padding: 2.6rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { color: #d6def2; margin: 0; }
.cta-inline { margin: 2rem 0 0; padding: 1.5rem; background: var(--brand-light); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Prose (CMS content) ---------- */
.prose { max-width: 48rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { border-left: 4px solid var(--brand); margin: 1.5rem 0; padding: .4rem 1.2rem; color: var(--ink-2); background: var(--silver-2); }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.prose details { border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: .7rem; background: #fff; }
.prose details summary { cursor: pointer; font-weight: 600; color: var(--brand-deep); }
.prose details[open] summary { margin-bottom: .5rem; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .layout-side { grid-template-columns: 1fr; } }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: var(--silver-2); position: sticky; top: 100px; }
.side-box h3 { margin-top: 0; font-size: 1.05rem; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li a { display: block; padding: .35rem 0; text-decoration: none; }

/* ---------- Repository ---------- */
.pub-card { display: grid; grid-template-columns: 110px 1fr; gap: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; background: #fff; }
.pub-cover { width: 110px; aspect-ratio: 3/4; border-radius: 6px; background: linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: .7rem; font-family: var(--serif); font-size: .7rem; overflow: hidden; box-shadow: 0 6px 16px rgba(20,35,74,.2); }
.pub-cover img { width: 100%; height: 100%; object-fit: cover; }
.pub-cover.has-img { padding: 0; }
.pub-cover b { font-size: .78rem; line-height: 1.25; }
.pub-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.pub-card h3 a { text-decoration: none; color: var(--brand-deep); }
.pub-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.meta-line { color: var(--ink-3); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.article-item { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.article-item h3 { margin: 0 0 .25rem; font-size: 1.08rem; font-family: var(--serif); }
.article-item h3 a { text-decoration: none; color: var(--brand-deep); }
.article-item h3 a:hover { text-decoration: underline; color: var(--brand); }
.authors { color: var(--ink-2); font-size: .93rem; }
.tag { display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: var(--silver-2); border: 1px solid var(--line); font-size: .76rem; color: var(--ink-2); }
.tag.blue { background: var(--brand-light); border-color: #c8d4ef; color: var(--brand-dark); }
.doi-link { font-family: var(--mono); font-size: .85rem; }
.article-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.article-authors { margin: .8rem 0; font-size: 1rem; }
.article-authors sup { color: var(--brand); }
.affils { font-size: .88rem; color: var(--ink-2); padding-left: 1rem; }
.abstract { background: var(--silver-2); border-left: 4px solid var(--brand); padding: 1.2rem 1.4rem; border-radius: 0 8px 8px 0; }
.kv { display: grid; grid-template-columns: 9.5rem 1fr; gap: .4rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.cite-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.cite-tabs button { border: 1px solid var(--line); background: #fff; padding: .35rem .7rem; border-radius: 6px; cursor: pointer; font-size: .84rem; }
.cite-tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.cite-box { background: var(--silver-2); border: 1px solid var(--line); padding: 1rem; border-radius: 8px; font-size: .9rem; word-break: break-word; }
.cite-box [data-cite] { white-space: pre-wrap; }
.searchbar { display: flex; gap: .5rem; }
.searchbar input { flex: 1; }
.facet-list { columns: 2; column-gap: 2rem; list-style: none; padding: 0; }
.facet-list li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px dotted var(--line); display: flex; justify-content: space-between; gap: 1rem; }
@media (max-width: 640px) { .facet-list { columns: 1; } .pub-card { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; color: var(--ink); }
label .req { color: var(--bad); }
.hint { font-size: .8rem; color: var(--ink-3); font-weight: 400; margin-top: .25rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid #c9ced8; border-radius: 8px; font: inherit; font-size: .95rem; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,70,133,.15); outline: none; }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font-size: .88rem; max-width: 100%; }
.is-invalid { border-color: var(--bad) !important; }
.field-error { color: var(--bad); font-size: .82rem; margin-top: .25rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem 1rem; }
.checks label { font-weight: 400; display: flex; gap: .5rem; align-items: center; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; margin: 0; }
.checks label:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin: 0 0 1.5rem; background: #fff; }
legend { font-family: var(--serif); font-weight: 700; color: var(--brand-deep); padding: 0 .5rem; font-size: 1.1rem; }
.hp { position: absolute; left: -9999px; }

/* ---------- Alerts / badges ---------- */
.alert { padding: .85rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; font-size: .94rem; }
.alert-success { background: var(--ok-bg); border-color: #b9dfc8; color: var(--ok); }
.alert-error { background: var(--bad-bg); border-color: #efc2c2; color: var(--bad); }
.alert-warn { background: var(--warn-bg); border-color: #f0d9a3; color: var(--warn); }
.alert-info { background: var(--brand-light); border-color: #c8d4ef; color: var(--brand-dark); }
.badge { display: inline-block; padding: .16rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge-success { background: var(--ok-bg); color: var(--ok); border-color: #b9dfc8; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #f0d9a3; }
.badge-danger { background: var(--bad-bg); color: var(--bad); border-color: #efc2c2; }
.badge-neutral { background: var(--silver-2); color: var(--ink-2); border-color: var(--line); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.data th { text-align: left; background: var(--silver-2); font-weight: 600; color: var(--ink-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: .65rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .65rem .8rem; border-bottom: 1px solid #eceef2; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fafbfd; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data input, table.data select, table.data textarea { padding: .4rem .5rem; font-size: .88rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: #b9c4de; margin-top: 4rem; font-size: .92rem; }
.site-footer .container { padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #dbe3f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .82rem; }

/* ---------- App (admin / committee) ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: #f6f7f9; }
.sidebar { background: var(--brand-deep); color: #c3cde6; padding: 1.2rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: .3rem .4rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 1rem; }
.sidebar .brand img { height: 38px; }
.sidebar .brand-name { color: #fff; font-size: 1rem; }
.sidebar .brand-sub { color: #9fb0d6; }
.sidebar h6 { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: #8496c2; margin: 1.3rem .6rem .45rem; }
.sidebar a { display: flex; justify-content: space-between; align-items: center; color: #dbe3f5; text-decoration: none; padding: .5rem .65rem; border-radius: 7px; font-size: .9rem; }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #9fb8f0; }
.sidebar .count { background: #c9a254; color: #1b1b1b; border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; font-weight: 700; }
.main { min-width: 0; }
.appbar { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.6rem; position: sticky; top: 0; z-index: 20; }
.appbar form.search { flex: 1; max-width: 420px; }
.appbar .who { display: flex; align-items: center; gap: .9rem; font-size: .88rem; }
.content { padding: 1.8rem 1.6rem 3rem; max-width: 1400px; }
.content h1 { font-size: 1.65rem; margin-bottom: .2rem; }
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-title p { margin: .2rem 0 0; color: var(--ink-3); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.4rem; }
.panel-head { padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.08rem; }
.panel-body { padding: 1.2rem; }
.panel-body > :last-child { margin-bottom: 0; }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); display: block; transition: box-shadow .15s, border-color .15s; }
.tile:hover { border-color: #b9c6e4; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.85rem; font-family: var(--serif); color: var(--brand); line-height: 1.15; }
.tile span { font-size: .84rem; color: var(--ink-2); }
.tile-group-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin: 0 0 .6rem; font-weight: 700; }
.subnav { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.subnav a { padding: .6rem .9rem; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .92rem; font-weight: 500; }
.subnav a.active, .subnav a:hover { color: var(--brand); border-color: var(--brand); }
.progress { height: 10px; background: var(--silver); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #4f72c4); }
.stage-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.stage-list li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; padding: .5rem .7rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.stage-list li .no { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--silver); font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.stage-list li.done .no { background: var(--ok); color: #fff; }
.stage-list li.current { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(42,70,133,.12); }
.stage-list li.current .no { background: var(--brand); color: #fff; }
.thread { display: grid; gap: .9rem; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; background: #fff; max-width: 85%; }
.msg.mine { margin-left: auto; background: var(--brand-light); border-color: #c8d4ef; }
.msg.system { max-width: 100%; background: var(--silver-2); font-size: .9rem; }
.msg .meta { font-size: .78rem; color: var(--ink-3); margin-bottom: .35rem; display: flex; justify-content: space-between; gap: 1rem; }
.msg .body { white-space: pre-wrap; }
.empty { text-align: center; color: var(--ink-3); padding: 2rem 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.inline-form { display: inline; }
.dl { display: grid; grid-template-columns: 12rem 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; } .dl dt { margin-top: .5rem; } }
.pagination { display: flex; gap: .3rem; margin: 1.4rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-size: .88rem; background: #fff; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.menu-toggle-app { display: none; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 60; }
  .sidebar.open { transform: none; }
  .menu-toggle-app { display: inline-flex; }
}
.editor-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; border: 1px solid #c9ced8; border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--silver-2); }
.editor-toolbar button { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: .25rem .55rem; cursor: pointer; font-size: .85rem; }
.editor-area { min-height: 380px; border: 1px solid #c9ced8; border-radius: 0 0 8px 8px; padding: 1rem 1.2rem; background: #fff; overflow: auto; }
.editor-area:focus { outline: none; border-color: var(--brand); }
textarea.code { font-family: var(--mono); font-size: .85rem; min-height: 380px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(140deg, var(--brand-deep), var(--brand)); padding: 2rem 1rem; }
.auth-card { background: #fff; border-radius: 16px; padding: 2.4rem; width: min(440px, 100%); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.auth-card .brand { justify-content: center; margin-bottom: 1.6rem; }
.auth-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 1.2rem; }
.auth-card .form-row { margin-bottom: 1rem; }
.auth-card .btn { width: 100%; justify-content: center; }
.notice-strip { background: var(--brand-light); border: 1px solid #c8d4ef; border-radius: 10px; padding: 1rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.steps-mini { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.steps-mini li { font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; background: var(--silver); color: var(--ink-2); }
.steps-mini li.done { background: var(--ok-bg); color: var(--ok); }
.steps-mini li.now { background: var(--brand); color: #fff; }
@media print { .site-header, .site-footer, .topbar, .sidebar, .appbar, .no-print { display: none !important; } .app { display: block; } }

@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Long words / email addresses never overflow their boxes */
.side-box, .card, .panel, .site-footer, .dl dd, .kv dd { overflow-wrap: anywhere; min-width: 0; }
.layout-side > * { min-width: 0; }

/* FAQ accordions */
.prose details > summary { list-style: none; position: relative; padding-right: 2rem; }
.prose details > summary::-webkit-details-marker { display: none; }
.prose details > summary::after { content: "+"; position: absolute; right: .2rem; top: -.1rem; font-size: 1.3rem; color: var(--brand); font-weight: 400; }
.prose details[open] > summary::after { content: "−"; }
.editor-area details { border: 1px dashed #b9c6e4; border-radius: 8px; padding: .6rem .9rem; margin-bottom: .6rem; }
.editor-area summary { font-weight: 600; color: var(--brand-deep); }
