/* BHRC Research Documents — refined institutional edition
   World: BHRC / bangkokhealth.com — Prompt display, BDMS blue, the site's own 3D illustrations. */

:root {
  --navy-950: #061430;
  --navy-900: #0a1f47;
  --navy-800: #102b5e;
  --blue: #0147a3;
  --blue-400: #4f8be0;
  --blue-100: #dde8f8;
  --blue-50: #eff4fc;
  --gold: #c9a45c;
  --gold-soft: #ead9b4;
  --ink: #142033;
  --ink-2: #4a576b;
  --ink-3: #6f7b8e;
  --line: #e3e8ef;
  --line-2: #eef1f6;
  --paper: #ffffff;
  --canvas: #f6f8fb;
  --plate: #f3f3f3; /* matches the illustration backgrounds */
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 31, 71, .06), 0 2px 8px -2px rgba(10, 31, 71, .08);
  --shadow-md: 0 2px 4px rgba(10, 31, 71, .04), 0 14px 32px -12px rgba(10, 31, 71, .22);
  --shadow-lg: 0 4px 10px rgba(6, 20, 48, .08), 0 30px 60px -20px rgba(6, 20, 48, .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1200px;
  --display: "Prompt", "IBM Plex Sans Thai", system-ui, sans-serif;
  --text: "IBM Plex Sans Thai", "Prompt", system-ui, sans-serif;
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); font-family: var(--text); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
::selection { background: var(--blue-100); color: var(--navy-900); }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d3e1; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.sr-only { 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(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(16, 43, 94, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; font-family: var(--display); }
.nav a { position: relative; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .96rem; padding: 10px 16px; border-radius: 10px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--navy-900); background: var(--canvas); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--blue); }
.nav .nav-cta { margin-left: 10px; background: var(--navy-900); color: #fff; padding: 10px 18px; }
.nav .nav-cta:hover { background: var(--blue); color: #fff; }
.nav .nav-cta[aria-current="page"] { color: #fff; }
.nav .nav-cta[aria-current="page"]::after { display: none; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { display: block; }

/* ---------- Shared dark band ---------- */
.band { position: relative; color: #fff; background:
    radial-gradient(900px 480px at 85% -10%, rgba(79, 139, 224, .35), transparent 60%),
    radial-gradient(700px 400px at -10% 120%, rgba(1, 71, 163, .55), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%); overflow: hidden; isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  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: 56px 56px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); }

/* ---------- Home hero ---------- */
.hero { padding: 88px 0 150px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.12; font-weight: 600; letter-spacing: -.015em; }
.hero h1 em { font-style: normal; color: var(--gold-soft); }
.hero .lead { margin: 22px 0 0; max-width: 46ch; color: #c3d3ec; font-size: 1.12rem; font-weight: 300; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; font-size: 1rem; text-decoration: none; padding: 14px 22px; border-radius: 12px; transition: background .25s, color .25s, transform .25s var(--ease), box-shadow .25s; }
.btn-light { background: #fff; color: var(--navy-900); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.btn-light:hover { transform: translateY(-2px); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.stats { display: flex; gap: 40px; margin: 48px 0 0; padding: 26px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.stats div { display: flex; flex-direction: column; }
.stats dt { order: 2; color: #9fb4d6; font-size: .88rem; }
.stats dd { order: 1; margin: 0; font-family: var(--display); font-size: 2rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }

.collage { position: relative; aspect-ratio: 1 / .92; }
.collage figure { position: absolute; margin: 0; background: var(--plate); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .6); }
.collage figure img { width: 100%; height: 100%; object-fit: cover; }
.collage .c1 { width: 56%; left: 0; top: 10%; z-index: 2; }
.collage .c2 { width: 46%; right: 0; top: 0; z-index: 1; }
.collage .c3 { width: 50%; right: 6%; bottom: 0; z-index: 3; }
.collage figcaption { position: absolute; left: 14px; bottom: 12px; font-family: var(--display); font-size: .78rem; font-weight: 500; color: var(--navy-900); background: rgba(255, 255, 255, .92); padding: 4px 10px; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .collage figure { animation: rise 1.1s var(--ease) both; }
  .collage .c2 { animation-delay: .12s; }
  .collage .c3 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
}

/* ---------- Portals ---------- */
.portals { position: relative; z-index: 2; margin-top: -92px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portal { display: flex; flex-direction: column; background: var(--paper); border-radius: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-md); border: 1px solid var(--line-2); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.portal:hover { transform: translateY(-6px); box-shadow: 0 4px 10px rgba(10, 31, 71, .06), 0 28px 48px -18px rgba(10, 31, 71, .35); }
.portal .art { background: var(--plate); aspect-ratio: 16 / 10; overflow: hidden; }
.portal .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transition: transform .6s var(--ease); }
.portal:hover .art img { transform: scale(1.05); }
.portal .body { padding: 24px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.portal h2 { margin: 0 0 6px; font-size: 1.4rem; font-weight: 600; color: var(--navy-900); letter-spacing: -.005em; }
.portal .sub { margin: 0; color: var(--ink-2); font-size: .96rem; line-height: 1.6; }
.portal .meta { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.portal .sub + .meta { border-top: 1px solid var(--line-2); margin-top: 22px; }
.portal .meta .num { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.portal .meta .go { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); transition: background .25s, color .25s, transform .35s var(--ease); }
.portal:hover .meta .go { background: var(--blue); color: #fff; transform: translateX(3px); }

/* ---------- Home search ---------- */
.home-search { margin: 88px auto 96px; max-width: 920px; text-align: center; }
.home-search h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; margin: 0; color: var(--navy-900); letter-spacing: -.01em; }
.home-search > p { margin: 8px 0 26px; color: var(--ink-2); }
.home-search .search input { padding-top: 18px; padding-bottom: 18px; font-size: 1.05rem; border-radius: 16px; box-shadow: var(--shadow-sm); }
.home-search .results { text-align: left; margin-top: 18px; }
.home-search .results .result-count { margin: 0 0 10px; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.quick button { font: inherit; font-size: .86rem; color: var(--ink-2); background: var(--canvas); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.quick button:hover { color: var(--blue); border-color: var(--blue-100); background: var(--blue-50); }

/* ---------- Page banner ---------- */
.banner { padding: 56px 0 0; }
.banner .wrap { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: end; }
.crumbs { font-size: .86rem; color: #9fb4d6; margin-bottom: 14px; }
.crumbs a { color: #c3d3ec; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.banner h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.banner .lead { margin: 14px 0 0; max-width: 60ch; color: #c3d3ec; font-size: 1.05rem; font-weight: 300; }
.banner .contact { margin: 24px 0 48px; display: flex; align-items: center; gap: 14px; font-size: .92rem; color: #dbe6f6; }
.banner .contact .ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.banner .contact a { color: #fff; }
.banner .art { align-self: end; background: var(--plate); border-radius: 22px 22px 0 0; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .5); border-bottom: 0; aspect-ratio: 1 / .8; }
.banner .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* ---------- IRB about tiles ---------- */
.about { padding: 48px 0 8px; }
.about-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.about h2 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--navy-900); }
.about-head p { margin: 0; color: var(--ink-3); font-size: .9rem; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.tile img { aspect-ratio: 5 / 3; width: 100%; height: auto; object-fit: cover; object-position: 80% center; }
.tile span { padding: 12px 14px 14px; font-family: var(--display); font-size: .9rem; font-weight: 500; line-height: 1.4; color: var(--navy-900); }

/* ---------- Toolbar / search ---------- */
.toolbar-wrap { position: sticky; top: 78px; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px 0; }
.search { position: relative; flex: 1 1 340px; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; font: inherit; font-size: 1rem; padding: 13px 16px 13px 48px; border: 1px solid #d3dbe6; border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.search input::placeholder { color: #7d889a; }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1, 71, 163, .12); }
.search kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 .75rem var(--text); color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: var(--canvas); pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.seg { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.chip { font: 500 .9rem var(--display); border: 0; background: transparent; color: var(--ink-2); padding: 8px 16px; border-radius: 9px; cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--navy-900); }
.chip[aria-pressed="true"] { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.result-count { color: var(--ink-3); font-size: .88rem; margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- Layout with TOC ---------- */
.layout { display: grid; grid-template-columns: 272px 1fr; gap: 56px; padding: 40px 0 96px; align-items: start; }
.layout > *, .doc > *, .registry > *, .banner .wrap > * { min-width: 0; }
.toc { position: sticky; top: 170px; }
.toc h2 { font-size: .78rem; font-weight: 600; color: var(--ink-3); margin: 0 0 12px; letter-spacing: .08em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.35; transition: background .2s, color .2s; }
.toc a img { width: 28px; height: 28px; }
.toc a:hover { background: var(--canvas); color: var(--navy-900); }
.toc a.active { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.toc .n { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .8rem; }

/* ---------- Sections & document rows ---------- */
.doc-section { margin-bottom: 56px; }
.doc-section > header { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; margin-bottom: 14px; }
.doc-section > header img { width: 52px; height: 52px; filter: drop-shadow(0 8px 14px rgba(10, 31, 71, .18)); }
.doc-section h2 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--navy-900); line-height: 1.3; letter-spacing: -.005em; }
.doc-section .count { color: var(--ink-3); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--canvas); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; }
.doc-section .note { margin: -4px 0 14px 68px; color: var(--ink-2); font-size: .9rem; }
.docs { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.doc { display: grid; grid-template-columns: 30px 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-2); transition: background .2s; }
.doc:first-child { border-top: 0; }
.doc:hover { background: #fafbfd; }
.doc .ficon { width: 30px; height: 36px; }
.doc .label { color: var(--ink); line-height: 1.55; overflow-wrap: anywhere; font-size: .97rem; }
.doc .label mark { background: #fff0b8; color: inherit; border-radius: 3px; padding: 0 2px; }
.doc .ctx { font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.doc .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-dl { display: inline-flex; align-items: center; gap: 7px; font: 500 .85rem var(--display); padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--navy-900); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn-dl svg { color: var(--blue); transition: color .2s, transform .3s var(--ease); }
.btn-dl:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-dl:hover svg { color: #fff; transform: translateY(1px); }
.btn-dl .t { font-size: .72rem; color: var(--ink-3); font-weight: 400; }
.btn-dl:hover .t { color: #b7c6de; }
.empty { padding: 56px 24px; text-align: center; color: var(--ink-2); background: var(--canvas); border-radius: var(--radius); border: 1px dashed #d3dbe6; }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }

/* ---------- Registry ---------- */
.registry { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; padding: 64px 0 104px; align-items: start; }
.registry h2 { font-size: 1.6rem; font-weight: 600; color: var(--navy-900); margin: 0 0 10px; letter-spacing: -.01em; }
.registry > div > p { color: var(--ink-2); max-width: 58ch; margin: 0; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .no { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-900); color: #fff; font-family: var(--display); font-weight: 500; }
.steps strong { display: block; color: var(--navy-900); font-family: var(--display); font-weight: 500; font-size: 1.05rem; margin-bottom: 2px; }
.steps span { color: var(--ink-2); font-size: .95rem; }
.login-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); }
.login-card .art { background: var(--plate); aspect-ratio: 16 / 10; }
.login-card .art img { width: 100%; height: 100%; object-fit: cover; }
.login-card .inner { padding: 28px 30px 30px; }
.login-card h3 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 600; color: var(--navy-900); }
.login-card p { margin: 0 0 22px; font-size: .95rem; color: var(--ink-2); }
.btn-primary { display: flex; justify-content: center; align-items: center; gap: 10px; background: var(--navy-900); color: #fff; text-decoration: none; font-family: var(--display); font-weight: 500; padding: 15px 22px; border-radius: 12px; transition: background .25s, transform .25s var(--ease), box-shadow .25s; }
.btn-primary:hover { background: var(--blue); transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(1, 71, 163, .7); }
.login-card .url { margin: 12px 0 0; text-align: center; font-size: .82rem; color: var(--ink-3); }
.related { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h4 { margin: 0 0 6px; font: 600 .78rem var(--display); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.related a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; text-decoration: none; font-size: .94rem; color: var(--navy-900); border-bottom: 1px solid var(--line-2); }
.related a:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { color: #b6c6df; font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 36px; }
.site-footer .fbrand img { height: 44px; width: auto; background: #fff; padding: 6px 12px; border-radius: 10px; margin-bottom: 16px; }
.site-footer h2 { color: #fff; font-size: .82rem; font-weight: 600; margin: 0 0 12px; letter-spacing: .1em; text-transform: uppercase; }
.site-footer p { margin: 0 0 6px; max-width: 40ch; }
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.site-footer a:hover { border-color: var(--gold); }
.site-footer .copy { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; margin-top: 8px; color: #8399bb; font-size: .84rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; }
  .collage { max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .toc { position: static; }
  .toc h2 { display: none; }
  .toc ol { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .toc a { display: flex; gap: 8px; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px; }
  .toc a img { width: 24px; height: 24px; }
  .toc .n { display: none; }
  .portals { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .registry { grid-template-columns: 1fr; gap: 40px; }
  .banner .wrap { grid-template-columns: 1fr; }
  .banner .art { display: none; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 18px 18px; box-shadow: var(--shadow-md); }
  .nav.open { display: flex; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .brand img { height: 38px; }
  .hero { padding: 56px 0 120px; }
  .stats { gap: 24px; }
  .stats dd { font-size: 1.6rem; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .toolbar-wrap { position: static; }
  .search kbd { display: none; }
  .doc { grid-template-columns: 26px 1fr; gap: 12px; padding: 14px; }
  .doc .ficon { width: 26px; height: 31px; }
  .doc .actions { grid-column: 2; justify-content: flex-start; }
  .doc-section > header { grid-template-columns: 44px 1fr; }
  .doc-section > header img { width: 44px; height: 44px; }
  .doc-section .count { display: none; }
  .doc-section .note { margin-left: 0; }
  .banner .contact { margin-bottom: 36px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   Landing page v3
   ========================================================= */
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--blue); transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(1, 71, 163, .7); }
.btn-dark svg { transition: transform .35s var(--ease); }
.btn-dark:hover svg { transform: translateX(3px); }

.lp-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f3f7fd 0%, #ffffff 100%); padding: 72px 0 40px; isolation: isolate; }
.lp-glow { position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%; z-index: -1; background:
  radial-gradient(closest-side at 60% 40%, rgba(79, 139, 224, .22), transparent),
  radial-gradient(closest-side at 30% 70%, rgba(201, 164, 92, .14), transparent); }
.lp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: radial-gradient(rgba(10, 31, 71, .09) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 40%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 75%); }
.lp-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.lp-hero h1 { margin: 0; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; color: var(--navy-900); }
.lp-hero h1 span { white-space: nowrap; display: inline-block; background: linear-gradient(transparent 62%, var(--gold-soft) 62%, var(--gold-soft) 90%, transparent 90%); padding: 0 .08em; }
.lp-hero .lead { margin: 20px 0 0; max-width: 48ch; color: var(--ink-2); font-size: 1.12rem; font-weight: 300; }
.lp-search { margin-top: 32px; max-width: 580px; }
.lp-search .search input { padding: 19px 20px 19px 52px; font-size: 1.06rem; border-radius: 16px; border-color: #cfd9e6; box-shadow: 0 1px 2px rgba(10,31,71,.05), 0 18px 40px -22px rgba(10,31,71,.35); }
.lp-search .search svg { left: 20px; color: var(--blue); }
.lp-search .quick { justify-content: flex-start; align-items: center; margin-top: 14px; }
.lp-search .quick span { font-size: .84rem; color: var(--ink-3); margin-right: 4px; }
.lp-search .quick button { background: #fff; }
.lp-stats { display: flex; gap: 0; margin: 40px 0 0; }
.lp-stats div { padding: 0 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.lp-stats div:first-child { padding-left: 0; border-left: 0; }
.lp-stats dd { margin: 0; font-family: var(--display); font-size: 2.1rem; font-weight: 600; color: var(--navy-900); line-height: 1.1; font-variant-numeric: tabular-nums; }
.lp-stats dt { color: var(--ink-3); font-size: .86rem; }

.lp-stage { position: relative; aspect-ratio: 1 / .95; }
.lp-stage .orbit { position: absolute; inset: 8% 6%; border-radius: 50%; border: 1px dashed rgba(1, 71, 163, .22); }
.lp-stage .orbit::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #ffffff 0%, #e7effb 70%); box-shadow: inset 0 0 0 1px rgba(1, 71, 163, .08); }
.lp-stage figure { position: absolute; margin: 0; border-radius: 26px; overflow: hidden; background: var(--plate); box-shadow: 0 2px 6px rgba(10,31,71,.06), 0 30px 60px -24px rgba(10,31,71,.45); border: 4px solid #fff; }
.lp-stage figure img { width: 100%; height: 100%; object-fit: cover; }
.lp-stage .s1 { width: 50%; aspect-ratio: 1; left: 25%; top: 18%; z-index: 3; }
.lp-stage .s2 { width: 36%; aspect-ratio: 1; left: 0; top: 4%; z-index: 2; transform: rotate(-6deg); }
.lp-stage .s3 { width: 38%; aspect-ratio: 1; right: 0; bottom: 6%; z-index: 4; transform: rotate(5deg); }
.lp-stage .badge { position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 16px 10px 12px; font-size: .88rem; color: var(--ink-2); box-shadow: 0 2px 4px rgba(10,31,71,.06), 0 16px 30px -14px rgba(10,31,71,.35); }
.lp-stage .badge b { font-family: var(--display); color: var(--navy-900); font-weight: 600; }
.lp-stage .b1 { right: 4%; top: 12%; }
.lp-stage .b2 { left: 2%; bottom: 14%; }
@media (prefers-reduced-motion: no-preference) {
  .lp-stage figure, .lp-stage .badge { animation: stage-in 1.2s var(--ease) both; }
  .lp-stage .s2 { animation-delay: .1s; --r: -6deg; }
  .lp-stage .s3 { animation-delay: .2s; --r: 5deg; }
  .lp-stage .badge { animation-delay: .45s; }
  .lp-stage .b2 { animation-delay: .55s; }
  @keyframes stage-in { from { opacity: 0; translate: 0 30px; filter: blur(8px); } to { opacity: 1; translate: 0 0; filter: none; } }
  .lp-stage .s1 { animation: stage-in 1.2s var(--ease) both, float 7s ease-in-out 1.2s infinite; }
  @keyframes float { 50% { translate: 0 -10px; } }
}
.lp-results { max-width: 980px; margin: 8px auto 0; }
.lp-results:empty { display: none; }

.lp-head { max-width: 760px; margin: 0 0 48px; }
.lp-head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; font-weight: 600; letter-spacing: -.015em; color: var(--navy-900); }
.lp-head p { margin: 12px 0 0; color: var(--ink-2); font-size: 1.05rem; }
.lp-head.light h2 { color: #fff; }
.lp-head.light p { color: #b9cae4; }

.lp-features { padding: 96px 0 56px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature.flip .feature-art { order: 2; }
.feature-art { position: relative; border-radius: 28px; background: var(--plate); overflow: hidden; aspect-ratio: 5 / 4; box-shadow: var(--shadow-md); }
.feature-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(10,31,71,.05); pointer-events: none; }
.feature-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.feature:hover .feature-art img { transform: scale(1.03); }
.feature-name { margin: 0 0 8px; font-family: var(--display); font-size: .9rem; font-weight: 500; color: var(--blue); }
.feature h3 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -.015em; color: var(--navy-900); line-height: 1.2; }
.feature-desc { margin: 14px 0 22px; color: var(--ink-2); font-size: 1.02rem; max-width: 52ch; }
.cats { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); }
.cats li a { display: grid; grid-template-columns: 32px 1fr auto 18px; gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .96rem; line-height: 1.4; transition: background .2s, padding .3s var(--ease); }
.cats li a:hover { background: var(--canvas); padding-left: 10px; color: var(--blue); }
.cats img { width: 32px; height: 32px; }
.cats .n { color: var(--ink-3); font-size: .84rem; font-variant-numeric: tabular-nums; }
.cats svg { color: var(--ink-3); }
.ticks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: center; color: var(--ink); }
.ticks svg { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--blue-50); color: var(--blue); }

.lp-journey { padding: 96px 0 104px; }
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: j; position: relative; }
.journey::before { content: ""; position: absolute; left: 6%; right: 6%; top: 58px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.3) 10%, rgba(255,255,255,.3) 90%, transparent); }
.journey a { position: relative; display: flex; flex-direction: column; height: 100%; padding: 28px 22px 26px; border-radius: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); color: #fff; text-decoration: none; transition: background .3s, transform .4s var(--ease), border-color .3s; }
.journey a:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .22); transform: translateY(-4px); }
.journey img { width: 56px; height: 56px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .35)); }
.journey .step-no { position: absolute; top: 26px; right: 22px; font-family: var(--display); font-size: .82rem; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.journey strong { margin-top: 20px; font-family: var(--display); font-size: 1.08rem; font-weight: 500; line-height: 1.35; }
.journey .step-desc { margin-top: 6px; color: #b9cae4; font-size: .9rem; line-height: 1.55; }

.lp-contact { padding: 96px 0 104px; background: var(--canvas); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { display: grid; grid-template-columns: 48px 1fr; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-sm); }
.contact-card img { width: 48px; height: 48px; }
.contact-card h3 { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--navy-900); }
.contact-card p { margin: 2px 0 14px; color: var(--ink-3); font-size: .92rem; }
.contact-card a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--navy-900); text-decoration: none; border-top: 1px solid var(--line-2); font-size: .98rem; overflow-wrap: anywhere; }
.contact-card a svg { color: var(--blue); flex: none; }
.contact-card a:hover { color: var(--blue); }

@media (max-width: 1080px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-stage { max-width: 520px; width: 100%; margin: 8px auto 0; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .journey::before { display: none; }
  .feature { gap: 40px; }
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-art { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .lp-hero { padding: 44px 0 24px; }
  .lp-stats div { padding: 0 16px; }
  .lp-stats dd { font-size: 1.6rem; }
  .lp-search .quick span { width: 100%; }
  .lp-features, .lp-journey, .lp-contact { padding: 64px 0; }
  .journey { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; padding: 24px; }
  .lp-stage .badge { font-size: .8rem; padding: 8px 12px 8px 10px; }
}

/* ---------- Logo (full name) ---------- */
.brand img { height: 54px; width: auto; }
.site-footer .fbrand img { height: 56px; padding: 8px 14px; }
@media (max-width: 720px) { .brand img { height: 34px; } }

/* ---------- Preview bar ---------- */
.preview-bar { position: sticky; top: 0; z-index: 60; background: #fff4d6; color: #6b4b00; border-bottom: 1px solid #f0d58c; text-align: center; font-size: .9rem; padding: 8px 16px; }
.preview-bar a { color: #6b4b00; font-weight: 600; margin-left: 8px; }

/* =========================================================
   Admin
   ========================================================= */
.ad-top { padding: 40px 0 0; }
.ad-top-grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ad-top h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--navy-900); font-weight: 600; letter-spacing: -.01em; }
.ad-top p { margin: 6px 0 0; color: var(--ink-2); max-width: 64ch; }
.ad-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-btn { display: inline-flex; align-items: center; gap: 8px; font: 500 .95rem var(--display); padding: 11px 18px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--navy-900); cursor: pointer; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.ad-btn:hover:not(:disabled) { border-color: #c3cede; box-shadow: var(--shadow-sm); }
.ad-btn.primary { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.ad-btn.primary:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); }
.ad-btn:disabled { opacity: .45; cursor: not-allowed; }
.ad-status { margin-top: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; background: var(--canvas); border: 1px solid var(--line); }
.ad-state { font: 500 .9rem var(--display); padding: 4px 12px; border-radius: 999px; }
.ad-state.ok { background: #e3f5ea; color: #17643a; }
.ad-state.warn { background: #fff4d6; color: #6b4b00; }
.ad-state.bad { background: #fde6e4; color: #a12a1f; }
#ad-stats { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
#ad-problems { width: 100%; margin: 0; padding-left: 20px; color: #a12a1f; font-size: .88rem; }
#ad-problems:empty { display: none; }
.ad-done { margin-top: 16px; padding: 18px 20px; border-radius: 14px; background: #eef6ff; border: 1px solid var(--blue-100); color: var(--navy-900); font-size: .94rem; }
.ad-done ol { margin: 8px 0 0; padding-left: 20px; }
.ad-done code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .86em; }
.ad-bar { position: sticky; top: 78px; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-top: 28px; }
.ad-bar .wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.ad-tabs { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.ad-tab { font: 500 .92rem var(--display); border: 0; background: transparent; color: var(--ink-2); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.ad-tab[aria-selected="true"] { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.ad-bar .search { flex: 1 1 260px; }
#ad-list { padding: 24px 0 96px; display: grid; gap: 14px; }
.ad-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.ad-sec-head { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; }
.ad-toggle { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--canvas); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.ad-toggle svg { transition: transform .25s var(--ease); }
.ad-sec.open .ad-toggle svg { transform: rotate(90deg); }
.ad-sec-title { font: 600 1.08rem var(--display); color: var(--navy-900); border: 1px solid transparent; border-radius: 9px; padding: 7px 10px; background: transparent; min-width: 0; width: 100%; }
.ad-sec-title:hover, .ad-sec-title:focus { border-color: var(--line); background: #fff; outline: none; }
.ad-count { color: var(--ink-3); font-size: .85rem; white-space: nowrap; }
.ad-sec-body { display: none; padding: 0 18px 18px 62px; }
.ad-sec.open .ad-sec-body { display: block; }
.ad-note { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; font-size: .85rem; color: var(--ink-3); }
.ad-note span { white-space: nowrap; }
.ad-items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.ad-item { padding: 14px; border-top: 1px solid var(--line-2); }
.ad-item:first-child { border-top: 0; }
.ad-item:focus-within { background: #fafcff; }
.ad-item-head { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; }
.ad-num { font: 500 .8rem var(--display); color: var(--ink-3); padding-top: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.ad-links { margin: 8px 0 0 38px; display: grid; gap: 8px; }
.ad-link { display: grid; grid-template-columns: 116px 1fr 92px 34px 34px; gap: 8px; align-items: center; }
#ad-list input, #ad-list select, #ad-list textarea { font: inherit; font-size: .93rem; color: var(--ink); border: 1px solid #d3dbe6; border-radius: 9px; padding: 8px 10px; background: #fff; min-width: 0; width: 100%; }
#ad-list textarea { resize: none; overflow: hidden; line-height: 1.5; }
#ad-list input:focus, #ad-list select:focus, #ad-list textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 71, 163, .12); }
#ad-list .ad-sec-title { border-color: transparent; font-size: 1.08rem; }
.ad-tools { display: flex; gap: 4px; }
.ad-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; text-decoration: none; }
.ad-icon:hover:not(:disabled) { background: var(--canvas); color: var(--navy-900); border-color: var(--line); }
.ad-icon.danger:hover { background: #fde6e4; color: #a12a1f; border-color: #f6c6c1; }
.ad-icon:disabled { opacity: .3; cursor: default; }
.ad-add-link { justify-self: start; display: inline-flex; gap: 6px; align-items: center; font: 500 .85rem var(--display); color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.ad-add { margin-top: 12px; width: 100%; display: flex; justify-content: center; gap: 8px; align-items: center; font: 500 .92rem var(--display); color: var(--blue); background: var(--blue-50); border: 1px dashed #b9cdeb; border-radius: 12px; padding: 12px; cursor: pointer; }
.ad-add:hover { background: #e4eefb; }
.ad-add-sec { margin: 0 0 96px; }
@media (max-width: 720px) {
  .ad-bar { position: static; }
  .ad-sec-head { grid-template-columns: 36px 1fr; }
  .ad-sec-head .ad-count { display: none; }
  .ad-sec-head .ad-tools { grid-column: 2; }
  .ad-sec-body { padding: 0 12px 14px; }
  .ad-item-head { grid-template-columns: 1fr; }
  .ad-num { display: none; }
  .ad-links { margin-left: 0; }
  .ad-link { grid-template-columns: 1fr 1fr 34px 34px; }
  .ad-link input[data-f="href"] { grid-column: 1 / -1; grid-row: 1; }
}

/* ---------- Admin password gate ---------- */
body.ad-locked main, body.ad-locked .site-footer, body.ad-locked .site-header { display: none; }
.ad-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #f3f7fd, #fff); }
.ad-gate-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 36px 32px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.ad-gate-card img { height: 40px; width: auto; align-self: flex-start; margin-bottom: 28px; }
.ad-gate-card h1 { margin: 0; font-size: 1.4rem; color: var(--navy-900); font-weight: 600; }
.ad-gate-card > p { margin: 4px 0 22px; color: var(--ink-3); font-size: .92rem; }
.ad-gate-card label { font: 500 .9rem var(--display); color: var(--ink); margin-bottom: 6px; }
.ad-gate-card input { font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #d3dbe6; border-radius: 11px; }
.ad-gate-card input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1, 71, 163, .12); }
.ad-pw-err { min-height: 1.4em; margin: 8px 0 10px; color: #a12a1f; font-size: .88rem; }
.ad-gate-card .ad-btn { justify-content: center; padding: 13px; }
.ad-gate-card a { margin-top: 16px; text-align: center; font-size: .9rem; color: var(--ink-3); }
.banner .lead .nowrap { white-space: nowrap; }
@media (max-width: 720px) { .banner .lead .nowrap { white-space: normal; } }
.site-footer .copy { justify-content: center; text-align: center; }
/* Header: keep menu labels on one line; switch to the menu button before it gets crowded */
.nav a { white-space: nowrap; }
@media (max-width: 1100px) {
  .site-header .wrap { position: relative; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 18px; box-shadow: var(--shadow-md); }
  .nav.open { display: flex; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { background: var(--blue-50); }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
}
/* Footer: everything centered */
.site-footer .wrap { text-align: center; }
.site-footer .fbrand img { margin-left: auto; margin-right: auto; }
.site-footer p { margin-left: auto; margin-right: auto; }
/* Registry login card: icon header instead of a second copy of the banner image */
.login-head { display: flex; align-items: center; gap: 18px; padding: 28px 30px; color: #fff; background:
  radial-gradient(420px 200px at 100% 0%, rgba(79, 139, 224, .45), transparent 70%),
  linear-gradient(150deg, var(--navy-800), var(--navy-950)); }
.login-head img { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
.login-head h3 { margin: 0; font-size: 1.35rem; font-weight: 600; color: #fff; }
.login-head p { margin: 2px 0 0; color: #b9cae4; font-size: .95rem; }
/* Header logo −10% (54px → 49px, mobile 34px → 31px) */
.brand img { height: 49px; }
@media (max-width: 720px) { .brand img { height: 31px; } }

/* ---------- Landing: YouTube videos ---------- */
.lp-videos { padding: 96px 0 104px; background: var(--canvas); border-top: 1px solid var(--line); }
.vd-head { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.vd-head > div:first-child { max-width: 640px; }
.vd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-yt { background: #e62117; color: #fff; }
.btn-yt:hover { background: #c4150c; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--navy-900); border: 1px solid var(--line); }
.btn-outline:hover { border-color: #c3cede; box-shadow: var(--shadow-sm); }
.vd-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.vd-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--navy-950); box-shadow: 0 2px 6px rgba(10,31,71,.08), 0 30px 60px -28px rgba(10,31,71,.55); }
.vd-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-now { display: flex; gap: 12px; align-items: baseline; margin-top: 16px; }
.vd-live { flex: none; font: 600 .78rem var(--display); color: #fff; background: #e62117; padding: 3px 10px; border-radius: 999px; }
.vd-live.alt { background: var(--navy-900); }
#vd-caption { font-family: var(--display); font-weight: 500; color: var(--navy-900); line-height: 1.45; }
.vd-side h3 { margin: 0 0 12px; font-size: .82rem; font-weight: 600; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.vd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 540px; overflow-y: auto; padding-right: 4px; }
.vd-item { width: 100%; display: grid; grid-template-columns: 148px 1fr; gap: 14px; align-items: start; text-align: left; padding: 8px; border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); transition: background .2s, border-color .2s; }
.vd-item:hover { background: #fff; border-color: var(--line); }
.vd-item[aria-current="true"] { background: #fff; border-color: var(--blue-100); box-shadow: var(--shadow-sm); }
.vd-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #dfe5ee; }
.vd-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.vd-item:hover .vd-thumb img { transform: scale(1.05); }
.vd-thumb .dur { position: absolute; right: 6px; bottom: 6px; font: 500 .72rem var(--text); color: #fff; background: rgba(6, 20, 48, .82); padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.vd-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(6, 20, 48, .25); color: #fff; }
.vd-item:hover .play, .vd-item[aria-current="true"] .play { opacity: 1; }
.vd-title { font-size: .92rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vd-series { display: block; font-size: .76rem; color: var(--blue); font-family: var(--display); font-weight: 500; margin-bottom: 2px; }
@media (max-width: 960px) {
  .vd-grid { grid-template-columns: 1fr; }
  .vd-list { max-height: none; overflow: visible; grid-template-columns: repeat(2, 1fr); }
  .vd-item { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .lp-videos { padding: 64px 0; }
  .vd-list { grid-template-columns: 1fr; }
  .vd-item { grid-template-columns: 132px 1fr; }
  .vd-frame { border-radius: 16px; }
}
/* Video list: show 4 clips, no inner scroll */
.vd-list { max-height: none; overflow: visible; padding-right: 0; }
/* videos now sit between the journey band and contact: keep them visually apart */
.lp-videos { background: #fff; border-top: 0; }
/* Footer: copyright line only */
.site-footer .wrap { display: block; padding-top: 28px; padding-bottom: 28px; }
.site-footer .copy { border-top: 0; padding-top: 0; margin-top: 0; }
/* Landing: tighter spacing between sections */
.lp-hero { padding: 64px 0 16px; }
.lp-features { padding: 56px 0 32px; }
.feature { padding: 36px 0; }
.lp-journey, .lp-videos, .lp-contact { padding: 64px 0 72px; }
.lp-head { margin-bottom: 32px; }
@media (max-width: 720px) {
  .lp-hero { padding: 40px 0 8px; }
  .lp-features { padding: 40px 0 16px; }
  .feature { padding: 28px 0; }
  .lp-journey, .lp-videos, .lp-contact { padding: 44px 0 48px; }
  .lp-head { margin-bottom: 24px; }
}
/* Tighter spacing on inner pages (IRB, BHRC Document, Registry, Admin) */
.banner { padding-top: 44px; }
.banner .contact { margin: 20px 0 36px; }
.about { padding: 32px 0 4px; }
.about-head { margin-bottom: 14px; }
.toolbar { padding-top: 12px; padding-bottom: 12px; }
.layout { padding-top: 28px; padding-bottom: 64px; gap: 48px; }
.doc-section { margin-bottom: 40px; }
.doc-section > header { margin-bottom: 12px; }
.registry { padding-top: 44px; padding-bottom: 64px; gap: 48px; }
.steps { margin-top: 20px; }
.steps li { padding: 16px 0; }
.home-search { margin: 56px auto 64px; }
.ad-top { padding-top: 28px; }
.ad-status { margin-top: 18px; }
.ad-bar { margin-top: 20px; }
#ad-list { padding-top: 18px; padding-bottom: 48px; }
.ad-add-sec { margin-bottom: 64px; }
@media (max-width: 720px) {
  .banner { padding-top: 32px; }
  .banner .contact { margin-bottom: 28px; }
  .about { padding-top: 24px; }
  .layout { padding-top: 16px; padding-bottom: 48px; }
  .doc-section { margin-bottom: 32px; }
  .registry { padding-top: 32px; padding-bottom: 48px; gap: 32px; }
}
/* Admin: IRB tile link editor */
.ad-tiles-help { margin: 0 0 14px; color: var(--ink-2); font-size: .92rem; }
.ad-tiles-editor .ad-items { background: #fff; }
.ad-tile-row { display: grid; grid-template-columns: 100px 1fr auto; gap: 14px; align-items: center; }
.ad-tile-row img { width: 100px; height: 60px; object-fit: cover; object-position: 80% center; border-radius: 10px; border: 1px solid var(--line); }
.ad-tile-fields { display: grid; grid-template-columns: 1fr 1.4fr 200px; gap: 8px; }
@media (max-width: 860px) {
  .ad-tile-row { grid-template-columns: 72px 1fr; }
  .ad-tile-row img { width: 72px; height: 44px; }
  .ad-tile-row .ad-tools { grid-column: 2; }
  .ad-tile-fields { grid-template-columns: 1fr; }
}
