/* ==========================================================================
   AQAI — institutional design system
   All colours, fonts, radii and background treatment are driven by the
   theme engine (CSS custom properties written by inc/bootstrap.php).
   ========================================================================== */

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--bg-strength, 22) / 100);
}

body[data-bg="plain"]::before { display: none; }

html[data-bg="pattern"] body::before { background-image: var(--pattern-image, none); background-size: var(--pattern-size, 32px 32px); }
html[data-bg="gradient"] body::before {
  background-image:
    radial-gradient(1100px 520px at 12% -10%, var(--brand-soft), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--bg)), var(--bg) 42%);
  opacity: 1;
}

#page, .site-header, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; }
svg { display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 .5em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.05rem); }
h3 { font-size: 1.16rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
li + li { margin-top: .4rem; }
strong { font-weight: 650; }
small { font-size: .82rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--brand-ink); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

code, kbd, .mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  background: var(--brand);
  color: var(--on-brand);
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- layout */
.container { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.container-wide { width: min(100% - 2.5rem, 1320px); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, 820px); margin-inline: auto; }

.section { padding: clamp(2.6rem, 1.6rem + 3vw, 4.2rem) 0; }
.section--tight { padding: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem) 0; }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section--soft { background: var(--surface-2); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.2rem; align-items: start; }

.stack > * + * { margin-top: 1rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono-sm { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; letter-spacing: .02em; }

/* --------------------------------------------------------------- eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .7rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
}
.section-head { margin-bottom: 1.9rem; max-width: 760px; }
.section-head h2 { margin-bottom: .6rem; }
.section-head p { color: var(--muted); margin: 0; max-width: 68ch; }
.section-head--row { display: flex; gap: 1.5rem; align-items: end; justify-content: space-between; max-width: none; flex-wrap: wrap; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  font-size: .74rem;
  letter-spacing: .015em;
}
.topbar .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
  padding-block: .25rem;
}
.topbar__left { display: flex; align-items: center; gap: .5rem; }
.topbar__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.topbar__right { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.topbar a { color: var(--topbar-text); text-decoration: none; opacity: .88; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar__sep { opacity: .35; }
.tb-btn {
  border: 1px solid color-mix(in srgb, var(--topbar-text) 32%, transparent);
  background: transparent;
  color: var(--topbar-text);
  font: inherit;
  padding: .1rem .4rem;
  border-radius: 2px;
  cursor: pointer;
}
.tb-btn:hover { background: color-mix(in srgb, var(--topbar-text) 14%, transparent); }

/* --------------------------------------------------------------- masthead */
.masthead {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.masthead::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -4px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 62%, var(--accent) 62%, var(--accent) 100%);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.05rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--header-text); }
.brand__mark {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 3px;
  background: var(--brand);
  color: var(--on-brand);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 22%, transparent);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
  border-radius: 2px;
}
.brand__mark span {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.brand__sub {
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
}
.brand__logo {
  height: 62px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
.brand--footer .brand__logo { height: 42px; max-width: 220px; }
.brand--modern .brand__name { font-family: var(--font-body); font-weight: 700; letter-spacing: .01em; }
.brand--modern .brand__sub { letter-spacing: .1em; }
.brand--compact .brand__name { font-size: 1.38rem; letter-spacing: .18em; }
.brand--compact .brand__sub { letter-spacing: .14em; }
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__sub { color: color-mix(in srgb, var(--footer-text) 78%, transparent); }

/* ------------------------------------------- small header marks (3-4 logos) */
.marks { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.marks__item { display: inline-flex; align-items: center; justify-content: center; }
.marks__item img { height: var(--mark-size, 32px); width: auto; max-width: 96px; object-fit: contain; display: block; }
.marks__item + .marks__item { border-left: 1px solid var(--line); padding-left: .55rem; }
.masthead__tools .marks { padding-right: .4rem; }
.topbar .marks__item img { height: 20px; max-width: 72px; }
.topbar .marks__item + .marks__item { border-left-color: color-mix(in srgb, var(--topbar-text) 32%, transparent); }
.marks-admin { display: grid; gap: .5rem; margin: .8rem 0; }
.marks-admin__row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: .8rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .6rem; }
.marks-admin__thumb { width: 54px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 3px; }
.marks-admin__thumb img { max-height: 32px; max-width: 48px; object-fit: contain; }
@media (max-width: 720px) {
  .marks--no-mobile { display: none; }
  .masthead__tools .marks { width: 100%; justify-content: flex-start; }
  .marks__item img { height: 26px; }
}

/* --------------------------------------------------------- document list */
.doclist { display: grid; gap: .7rem; }
.doc {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc:hover { border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); box-shadow: var(--shadow); }
.doc__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); border-radius: 3px;
  font-family: var(--font-body); font-size: .66rem; font-weight: 700; letter-spacing: .06em;
}
.doc__title { font-family: var(--font-heading); font-size: 1.02rem; font-weight: 600; margin: 0 0 .15rem; }
.doc__meta { font-size: .74rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.doc__desc { font-size: .86rem; color: var(--muted); margin: .3rem 0 0; max-width: 78ch; }
.doc__action { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .doc { grid-template-columns: 38px minmax(0, 1fr); }
  .doc__action { grid-column: 2; justify-content: flex-start; }
  .doc__icon { width: 38px; height: 38px; }
}
.masthead__tools { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }

.search-mini { display: flex; align-items: center; gap: .4rem; }
.search-mini input {
  width: 240px;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .86rem;
}
.search-mini input::placeholder { color: var(--muted); }

/* ------------------------------------------------------------------- nav */
.navbar {
  background: var(--brand);
  color: var(--on-brand);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 color-mix(in srgb, #000 18%, transparent);
}
.navbar__inner { display: flex; align-items: center; gap: .4rem; justify-content: space-between; }
.nav-list { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list > li { position: relative; margin: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .85rem .78rem;
  font-size: .855rem;
  font-weight: 600;
  letter-spacing: .012em;
  color: color-mix(in srgb, var(--on-brand) 88%, transparent);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  background: none;
  border-top: 0; border-inline: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--on-brand); background: color-mix(in srgb, #fff 9%, transparent); }
.nav-link[aria-current="page"] { color: var(--on-brand); border-bottom-color: var(--accent); background: color-mix(in srgb, #fff 7%, transparent); }
.nav-caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .8; }
.nav-drop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45);
  padding: .45rem;
  display: none;
  z-index: 70;
}
.nav-drop a {
  display: block;
  padding: .5rem .65rem;
  font-size: .84rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 2px;
}
.nav-drop a span { display: block; font-size: .72rem; color: var(--muted); }
.nav-drop a:hover { background: var(--surface-2); color: var(--brand-ink); }
li:hover > .nav-drop, li:focus-within > .nav-drop, .nav-drop.is-open { display: block; }
.nav-cta { display: flex; align-items: center; gap: .5rem; }
.nav-toggle {
  display: none;
  background: color-mix(in srgb, #fff 10%, transparent);
  border: 1px solid color-mix(in srgb, #fff 26%, transparent);
  color: var(--on-brand);
  border-radius: var(--radius-sm);
  padding: .45rem .6rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .nav-list { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .6rem; }
  .nav-list.is-open { display: flex; }
  .nav-list > li { border-top: 1px solid color-mix(in srgb, #fff 14%, transparent); }
  .nav-link { width: 100%; justify-content: space-between; padding: .8rem .2rem; border-bottom: 0; }
  .nav-drop { position: static; display: none; min-width: 0; border: 0; border-left: 2px solid var(--accent); box-shadow: none; background: color-mix(in srgb, #fff 6%, transparent); margin-bottom: .4rem; }
  .nav-drop a { color: var(--on-brand); }
  .nav-drop a span { color: color-mix(in srgb, var(--on-brand) 68%, transparent); }
  .nav-drop a:hover { background: color-mix(in srgb, #fff 10%, transparent); color: var(--on-brand); }
  .nav-toggle { display: inline-block; }
  .navbar__inner { flex-wrap: wrap; justify-content: space-between; padding-block: .55rem; }
  .nav-cta { display: none; }
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .62rem 1.05rem;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: var(--on-brand);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
}
.btn--primary:hover { background: var(--brand-dark); color: var(--on-brand); }
.btn--ghost {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  color: var(--brand-ink);
}
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn--accent { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 65%, #000); color: var(--on-accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 86%, #000); color: var(--on-accent); }
.btn--quiet { background: transparent; color: var(--link); padding-inline: .2rem; }
.btn--quiet:hover { color: var(--brand-ink); text-decoration: underline; }
.btn--sm { padding: .42rem .75rem; font-size: .8rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .65rem; }

/* -------------------------------------------------------------- breadcrumb */
.crumbs { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .78rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .6rem 0; color: var(--muted); }
.crumbs li { margin: 0; display: flex; align-items: center; gap: .4rem; }
.crumbs li + li::before { content: "/"; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- page head */
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.8rem, 1.2rem + 2vw, 3rem) 0 clamp(1.6rem, 1rem + 1.6vw, 2.4rem);
}
.page-head h1 { margin-bottom: .55rem; max-width: 30ch; }
.page-head .lede { color: var(--muted); font-size: 1.04rem; max-width: 70ch; margin: 0; }
.page-head__meta { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; margin-top: 1.2rem; font-size: .78rem; color: var(--muted); }
.page-head__meta strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------- hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--brand) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--brand) 8%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(105deg, rgba(0,0,0,.75), transparent 62%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(1.6rem, 1rem + 2.6vw, 3.4rem);
  padding: clamp(2.2rem, 1.4rem + 3vw, 4rem) 0;
  align-items: start;
}
.hero h1 { max-width: 20ch; margin-bottom: .8rem; }
.hero h1 em { font-style: normal; color: var(--brand-ink); display: block; }
.hero__lede { font-size: 1.05rem; color: var(--muted); max-width: 56ch; margin-bottom: 1.5rem; }
.hero__flags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.hero__note {
  margin-top: 1.5rem;
  padding: .75rem .9rem;
  background: var(--brand-soft);
  border-left: 3px solid var(--accent);
  font-size: .82rem;
  color: var(--text);
  max-width: 56ch;
}
.hero__note strong { color: var(--brand-ink); }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------- notice board */
.noticeboard {
  background: var(--brand-darker);
  color: color-mix(in srgb, var(--on-brand) 92%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.noticeboard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .7rem .95rem;
  background: color-mix(in srgb, #000 22%, var(--brand-darker));
  border-bottom: 2px solid var(--accent);
}
.noticeboard__head h2 {
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0;
  color: color-mix(in srgb, var(--on-brand) 95%, transparent);
  font-family: var(--font-body);
  font-weight: 700;
}
.live-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--on-brand) 72%, transparent); }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent); }
.noticeboard ol { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.noticeboard li { margin: 0; border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent); }
.noticeboard li:last-child { border-bottom: 0; }
.noticeboard a { display: block; padding: .72rem .95rem; color: inherit; text-decoration: none; }
.noticeboard a:hover { background: color-mix(in srgb, #fff 8%, transparent); }
.noticeboard time { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--on-brand) 62%, transparent); }
.noticeboard .nb-title { display: block; font-size: .9rem; font-weight: 600; line-height: 1.35; margin-top: .15rem; color: color-mix(in srgb, var(--on-brand) 97%, transparent); }
.noticeboard .nb-tag { display: inline-block; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; padding: .05rem .35rem; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: color-mix(in srgb, var(--accent) 92%, #fff); border-radius: 2px; margin-left: .4rem; vertical-align: 1px; }
.noticeboard__foot { padding: .6rem .95rem; background: color-mix(in srgb, #000 14%, var(--brand-darker)); font-size: .74rem; }
.noticeboard__foot a { color: color-mix(in srgb, var(--on-brand) 80%, transparent); }

/* ------------------------------------------------------------- quick links */
.quicklinks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); }
.quicklinks a {
  display: flex;
  gap: .8rem;
  padding: 1.15rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  border-right: 1px solid var(--line);
  transition: background .14s ease;
}
.quicklinks a:last-child { border-right: 0; }
.quicklinks a:hover { background: var(--brand-soft); }
.quicklinks a:hover .ql-title { color: var(--brand-ink); text-decoration: underline; }
.ql-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); border-radius: 3px; }
.ql-title { display: block; font-weight: 650; font-size: .92rem; line-height: 1.3; }
.ql-desc { display: block; font-size: .78rem; color: var(--muted); line-height: 1.45; margin-top: .2rem; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: relative;
}
.card--flush { padding: 0; overflow: hidden; }
.card--hover { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.card--hover:hover { border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--muted); font-size: .92rem; }
.card__foot { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }

.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-link:hover h3 { color: var(--brand-ink); text-decoration: underline; }

.svc-no {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 2px;
  padding: .1rem .4rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .16rem .5rem;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag--brand { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.tag--accent { background: color-mix(in srgb, var(--accent) 12%, transparent); color: color-mix(in srgb, var(--accent) 72%, #000); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
.tag--ok { background: #e7f5ec; color: #12603a; border-color: #b6e0c6; }
.tag--warn { background: #fdf3e2; color: #7a4c07; border-color: #efd5a8; }
.tag--stop { background: #fdeaea; color: #8a1c1c; border-color: #f0c2c2; }

/* ------------------------------------------------------------- dimension */
.dim {
  border-top: 2px solid var(--brand);
  background: var(--surface);
  padding: 1.1rem 1.15rem 1.2rem;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dim h3 { font-size: 1rem; margin-bottom: .3rem; }
.dim p { font-size: .86rem; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ steps */
.steps { counter-reset: step; display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: .8rem; }
.step { position: relative; padding: 0 0 1.6rem 2.2rem; }
.step:last-child { padding-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -15px;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--brand);
  color: var(--brand-ink);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: .78rem;
  font-weight: 700;
}
.step h3 { font-size: 1rem; margin-bottom: .2rem; }
.step p { font-size: .88rem; color: var(--muted); margin: 0; }
.step .step-meta { display: inline-block; margin-top: .35rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.stepgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stepgrid .step { padding: 1.1rem; border: 1px solid var(--line); border-top: 3px solid var(--brand); background: var(--surface); }
.stepgrid .step::before { position: static; margin-bottom: .7rem; }

/* --------------------------------------------------------------- metrics */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.metric { padding: 1.2rem 1.15rem; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric__value { font-family: var(--font-heading); font-size: 1.85rem; font-weight: 700; line-height: 1; color: var(--brand-ink); }
.metric__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-top: .45rem; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
table.data caption { text-align: left; padding: .8rem 1rem; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); }
table.data th, table.data td { text-align: left; padding: .7rem .95rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th {
  background: var(--surface-2);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
table.data td strong { font-weight: 650; }

/* -------------------------------------------------------------- accordion */
.acc { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.acc + .acc { margin-top: .6rem; }
.acc summary {
  cursor: pointer;
  padding: .9rem 1rem;
  font-weight: 600;
  font-size: .94rem;
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  justify-content: space-between;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--brand-ink);
  line-height: 1;
  margin-top: .1rem;
}
.acc[open] summary { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.acc[open] summary::after { content: "−"; }
.acc .acc-body { padding: .9rem 1rem 1.1rem; font-size: .9rem; color: var(--muted); }
.acc .acc-body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ forms */
.field { margin-bottom: 1.05rem; }
.field > label, .label { display: block; font-size: .82rem; font-weight: 650; margin-bottom: .3rem; color: var(--text); }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: .25rem; }
.field .err { font-size: .78rem; color: #a02525; margin-top: .25rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: .58rem .7rem;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 22%, var(--line));
  border-radius: var(--radius-sm);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
  outline: none;
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b33; }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: .3rem; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); padding: 1.1rem; margin: 0 0 1.2rem; border-radius: var(--radius); background: var(--surface); }
legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-ink); padding-inline: .35rem; }
.form-note { font-size: .8rem; color: var(--muted); background: var(--surface-2); border-left: 3px solid var(--line); padding: .7rem .85rem; }

/* ------------------------------------------------------------- callouts */
.note {
  display: flex;
  gap: .9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .88rem;
}
.note--accent { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.note--warn { border-left-color: #b8791b; background: #fdf7ec; color: #4d3a12; }
.note--stop { border-left-color: #a32828; background: #fdf1f1; color: #521717; }
.note__title { display: block; font-weight: 700; margin-bottom: .15rem; }
.note p { margin: 0; }

.status-banner {
  background: var(--brand-darker);
  color: color-mix(in srgb, var(--on-brand) 92%, transparent);
  padding: .8rem 0;
  font-size: .84rem;
}
.status-banner .container { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.status-banner strong { color: var(--on-brand); }
.status-banner a { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .22rem .55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 40%, #fff);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------- list rows */
.deflist { border-top: 1px solid var(--line); }
.deflist > div { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.deflist dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.deflist dd { margin: 0; font-size: .92rem; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin: 0 0 .55rem; font-size: .9rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42rem;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.checklist--warn li::before { border-color: var(--accent); }

/* ------------------------------------------------------------- page bits */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.2rem; align-items: start; }
.aside-panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 1.2rem; }
.aside-panel h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-body); font-weight: 700; color: var(--muted); padding-bottom: .6rem; border-bottom: 2px solid var(--brand); margin-bottom: .8rem; }
.aside-links { list-style: none; padding: 0; margin: 0; }
.aside-links li { margin: 0; border-bottom: 1px solid var(--line); }
.aside-links li:last-child { border-bottom: 0; }
.aside-links a { display: block; padding: .55rem 0; font-size: .88rem; text-decoration: none; color: var(--text); }
.aside-links a:hover { color: var(--brand-ink); text-decoration: underline; }
.aside-links a[aria-current="page"] { color: var(--brand-ink); font-weight: 650; }

.toc { font-size: .86rem; }
.toc ol { list-style: none; padding: 0; counter-reset: toc; }
.toc li { border-bottom: 1px solid var(--line); margin: 0; }
.toc a { display: block; padding: .48rem 0; text-decoration: none; color: var(--text); counter-increment: toc; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--accent); font-family: var(--font-heading); font-size: .78rem; }
.toc a:hover { color: var(--brand-ink); }

.prose { max-width: 74ch; }
.prose--wide { max-width: none; width: 100%; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.1rem; }

.draft-flag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a4c07;
  background: #fdf3e2;
  border: 1px solid #efd5a8;
  padding: .22rem .55rem;
  border-radius: 2px;
}

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 0; font-size: .87rem; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding: 2.6rem 0 2rem; }
.footer-brand .brand__mark { width: 44px; height: 44px; background: transparent; border: 1px solid color-mix(in srgb, var(--footer-text) 40%, transparent); color: var(--footer-text); }
.footer-brand .brand__name { color: #fff; font-size: 1.3rem; }
.footer-brand .brand__sub { color: color-mix(in srgb, var(--footer-text) 78%, transparent); }
.footer-brand p { color: color-mix(in srgb, var(--footer-text) 82%, transparent); font-size: .84rem; margin-top: .9rem; max-width: 34ch; }
.footer-col h3 { font-family: var(--font-body); font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; color: #fff; margin-bottom: .8rem; padding-bottom: .5rem; border-bottom: 1px solid color-mix(in srgb, var(--footer-text) 24%, transparent); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 .45rem; }
.footer-col li a { font-size: .85rem; }
.footer-contact li { display: grid; grid-template-columns: 18px 1fr; gap: .5rem; font-size: .83rem; line-height: 1.5; }
.footer-contact svg { margin-top: .2rem; opacity: .75; }
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--footer-text) 22%, transparent);
  padding: 1rem 0 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  font-size: .76rem;
  color: color-mix(in srgb, var(--footer-text) 80%, transparent);
}
.footer-bottom .links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.footer-disclaimer { font-size: .74rem; color: color-mix(in srgb, var(--footer-text) 72%, transparent); border-top: 1px solid color-mix(in srgb, var(--footer-text) 16%, transparent); padding: .9rem 0 0; margin-top: 1rem; max-width: 90ch; }

/* ==========================================================================
   THEME STUDIO
   ========================================================================== */

.theme-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem .9rem;
  border-radius: 999px;
  background: var(--brand-darker);
  color: var(--on-brand);
  border: 1px solid color-mix(in srgb, #fff 24%, transparent);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
}
.theme-launcher:hover { background: var(--brand-dark); }
.theme-launcher svg { width: 16px; height: 16px; }

.theme-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100vw);
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--line);
  z-index: 130;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .5);
}
.theme-drawer.is-open { transform: none; }
.theme-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 18, 28, .42);
  z-index: 125;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.theme-backdrop.is-open { opacity: 1; pointer-events: auto; }

.td-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .9rem 1rem;
  background: var(--brand-darker);
  color: var(--on-brand);
}
.td-head h2 { font-size: .95rem; margin: 0; color: var(--on-brand); font-family: var(--font-body); font-weight: 700; letter-spacing: .02em; }
.td-head p { margin: .1rem 0 0; font-size: .72rem; color: color-mix(in srgb, var(--on-brand) 76%, transparent); }
.td-close { background: transparent; border: 1px solid color-mix(in srgb, #fff 30%, transparent); color: var(--on-brand); width: 28px; height: 28px; border-radius: 3px; cursor: pointer; font-size: 1rem; line-height: 1; }
.td-close:hover { background: color-mix(in srgb, #fff 14%, transparent); }

.td-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.td-tab {
  flex: 1;
  padding: .6rem .4rem;
  font: inherit;
  font-size: .76rem;
  font-weight: 650;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
}
.td-tab[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand); background: var(--surface); }
.td-body { overflow-y: auto; padding: 1rem; flex: 1; }
.td-pane[hidden] { display: none; }

.preset-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.preset {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: .76rem;
  text-align: left;
  color: var(--text);
}
.preset:hover { border-color: var(--brand); }
.preset.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }
.preset__swatches { display: flex; flex: none; }
.preset__swatches span { width: 12px; height: 20px; border-radius: 1px; }
.preset__swatches span:first-child { border-radius: 2px 0 0 2px; }
.preset__swatches span:last-child { border-radius: 0 2px 2px 0; }

.token-row { display: grid; grid-template-columns: 1fr auto; gap: .55rem; align-items: center; padding: .38rem 0; border-bottom: 1px dashed var(--line); }
.token-row:last-child { border-bottom: 0; }
.token-row__label { font-size: .8rem; }
.token-row__label small { display: block; color: var(--muted); font-size: .68rem; }
.color-cell { display: flex; align-items: center; gap: .4rem; }
.color-cell input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}
.color-cell input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-cell input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }
.color-cell input[type="text"] { width: 84px; padding: .28rem .4rem; font-family: ui-monospace, Consolas, monospace; font-size: .74rem; text-transform: uppercase; }
.auto-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .18rem .35rem;
  border-radius: 2px;
  cursor: pointer;
}
.auto-btn.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }

.range-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; }
.range-row label { flex: 1; font-size: .8rem; }
.range-row input[type="range"] { flex: 1.2; accent-color: var(--brand); }
.range-row output { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; min-width: 42px; text-align: right; color: var(--muted); }

.td-foot { border-top: 1px solid var(--line); padding: .8rem 1rem; background: var(--surface-2); display: grid; gap: .5rem; }
.td-foot .row { display: flex; gap: .5rem; }
.td-foot .btn { flex: 1; }

/* contrast audit */
.audit { width: 100%; border-collapse: collapse; font-size: .76rem; }
.audit th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .3rem .2rem; }
.audit td { padding: .32rem .2rem; border-top: 1px solid var(--line); }
.audit .ratio { font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
.badge-pass { color: #12603a; background: #e7f5ec; border: 1px solid #b6e0c6; padding: .02rem .28rem; border-radius: 2px; font-size: .64rem; font-weight: 700; }
.badge-fail { color: #8a1c1c; background: #fdeaea; border: 1px solid #f0c2c2; padding: .02rem .28rem; border-radius: 2px; font-size: .64rem; font-weight: 700; }

/* background lab */
.lab { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.lab__head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: .78rem; }
.lab__head strong { font-size: .82rem; }
.lab__canvas { padding: 1.1rem; background: var(--lab-bg, var(--bg)); position: relative; }
.lab__canvas.is-pattern::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-image); background-size: var(--pattern-size, 32px 32px); opacity: calc(var(--lab-strength, 20) / 100); pointer-events: none; }
.lab__inner { position: relative; display: grid; gap: .8rem; }
.lab-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; font-size: .8rem; }
.lab-tile h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .5rem; }
.lab-mini-nav { display: flex; gap: .3rem; }
.lab-mini-nav span { font-size: .62rem; padding: .2rem .4rem; background: var(--brand-soft); color: var(--brand-ink); border-radius: 2px; }
.lab-swatches { display: flex; gap: .3rem; flex-wrap: wrap; }
.lab-swatches span { width: 34px; height: 24px; border: 1px solid var(--line); border-radius: 2px; }
.lab-input { border: 1px solid var(--line); border-radius: 2px; padding: .3rem .45rem; font-size: .72rem; color: var(--muted); background: var(--surface); }
.lab-tabs { display: flex; gap: .3rem; }
.lab-tabs .seg { font: inherit; font-size: .72rem; padding: .25rem .5rem; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 2px; cursor: pointer; }
.lab-tabs .seg.is-active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.studio-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.studio-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; overflow: hidden; }
.studio-panel__body { overflow-y: auto; padding: 1rem; }
.studio-preview { display: grid; gap: 1.2rem; }
.preview-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.preview-frame__bar { display: flex; align-items: center; gap: .4rem; padding: .45rem .6rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.preview-frame__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.preview-body { padding: 0; }

@media (max-width: 1080px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-panel { position: static; max-height: none; }
}

/* --------------------------------------------------------------- admin */
.admin-head { background: var(--brand-darker); color: var(--on-brand); padding: 1rem 0; }
.admin-head .container-wide { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.25rem; margin: 0; color: var(--on-brand); }
.admin-head p { margin: .15rem 0 0; font-size: .76rem; color: color-mix(in srgb, var(--on-brand) 76%, transparent); }
.admin-nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.admin-nav a { color: color-mix(in srgb, var(--on-brand) 84%, transparent); text-decoration: none; font-size: .82rem; padding: .4rem .7rem; border-radius: 2px; border: 1px solid transparent; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: color-mix(in srgb, #fff 12%, transparent); border-color: color-mix(in srgb, #fff 20%, transparent); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand); padding: 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.stat__n { font-family: var(--font-heading); font-size: 1.9rem; line-height: 1; color: var(--brand-ink); }
.stat__l { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .35rem; }
.login-wrap { max-width: 420px; margin: 3rem auto 4rem; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 1.6rem; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 .7rem 1rem; margin: 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .45rem; width: 8px; height: 8px; background: var(--brand); border-radius: 50%; }
.timeline time { display: block; font-size: .68rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

/* ---------------------------------------------------------- verification */
.verify-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.verify-card__head { padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--brand-soft); flex-wrap: wrap; }
.verify-card__head h2 { margin: 0; font-size: 1.1rem; }
.verify-body { padding: 1.15rem; }
.verify-stamp { border: 2px solid var(--brand); color: var(--brand-ink); padding: .5rem .8rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; transform: rotate(-3deg); }
.verify-stamp.is-stop { border-color: #a32828; color: #8a1c1c; }
.qr { width: 108px; height: 108px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; padding: 4px; }
.demo-flag { background: #fdf3e2; border: 1px solid #efd5a8; color: #7a4c07; padding: .6rem .8rem; border-radius: 3px; font-size: .8rem; font-weight: 600; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------- application steps */
.progress { display: flex; gap: .35rem; list-style: none; padding: 0; margin: 0 0 .45rem; counter-reset: p; }
.progress li { flex: 1; font-size: .72rem; color: var(--muted); border-top: 3px solid var(--line); padding-top: .45rem; letter-spacing: .02em; }
.progress li.is-active { border-top-color: var(--brand); color: var(--text); font-weight: 650; }
.progress li.is-done { border-top-color: var(--brand); color: var(--muted); }
[data-step][hidden] { display: none; }

/* ---------------------------------------------------------------- misc */
.divider-label { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.pagination { display: flex; gap: .3rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-block; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 2px; font-size: .82rem; text-decoration: none; color: var(--text); }
.pagination .is-current { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.ticker { background: var(--surface-2); border-block: 1px solid var(--line); padding: .5rem 0; font-size: .8rem; }
.ticker .container { display: flex; gap: .8rem; align-items: center; }
.ticker strong { color: var(--brand-ink); white-space: nowrap; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
  .grid-4, .quicklinks, .metrics, .footer-top, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quicklinks a { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .quicklinks a:nth-child(2n) { border-right: 0; }
  .metric:nth-child(2n) { border-right: 0; }
  .footer-top { gap: 1.6rem; }
  .deflist > div { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .grid-3, .stepgrid, .grid-sidebar, .split { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero__inner { padding-block: 2.2rem; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .brand__logo { height: 48px; max-width: 190px; }
  .topbar { font-size: .7rem; }
  .topbar__left { display: none; }
  .topbar .container-wide { justify-content: flex-end; min-height: 30px; }
  .topbar__right { gap: .25rem .4rem; justify-content: flex-end; }
  .noticeboard ol { max-height: none; }
  .grid-2, .grid-4, .quicklinks, .metrics, .footer-top, .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .quicklinks a { border-right: 0 !important; }
  .metric { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .search-mini { display: none; }
  .footer-top { padding: 1.8rem 0 1.2rem; }
  .masthead__inner { padding-block: .8rem; }
  .brand__name { font-size: 1.35rem; }
  .deflist > div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .page-head h1 { max-width: none; }
  .theme-launcher { bottom: 12px; right: 12px; padding: .5rem .7rem; font-size: .76rem; }
  .theme-drawer { width: 100vw; }
}

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

@media print {
  .topbar, .navbar, .theme-launcher, .theme-drawer, .theme-backdrop, .site-footer, .crumbs, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .card, .acc, .table-wrap { break-inside: avoid; }
}

/* OUR INSPIRATION SECTION */

#our-inspiration {
    width: 100% !important;
    padding: 50px 20px !important;
    background: #f4f7fc !important;
    box-sizing: border-box !important;
}

#our-inspiration * {
    box-sizing: border-box !important;
}

#our-inspiration .inspiration-wrapper {
    max-width: 1000px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

#our-inspiration .inspiration-heading {
    text-align: center !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #172e68 !important;
    margin: 0 0 12px !important;
}

#our-inspiration .inspiration-divider {
    width: 65px;
    height: 4px;
    background: #315fca;
    margin: 0 auto 35px;
    border-radius: 5px;
}

#our-inspiration .inspiration-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 35px !important;
    max-width: 650px !important;
    margin: 0 auto !important;
}

#our-inspiration .inspiration-item {
    width: 100% !important;
    text-align: center !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#our-inspiration .inspiration-photo {
    width: 100% !important;
    height: 260px !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 3px solid #e5e5e5 !important;
    border-bottom: 8px solid #203b80 !important;
    border-radius: 4px 4px 0 0 !important;
}

#our-inspiration .inspiration-photo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    margin: 0 auto !important;
}

#our-inspiration .inspiration-item h3 {
    font-size: 21px !important;
    color: #172e68 !important;
    font-weight: 700 !important;
    margin: 16px 0 10px !important;
    line-height: 1.5 !important;
}

#our-inspiration .inspiration-item p {
    font-size: 18px !important;
    color: #292929 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* MOBILE RESPONSIVE */

@media (max-width: 600px) {
    #our-inspiration {
        padding: 35px 12px !important;
    }

    #our-inspiration .inspiration-row {
        gap: 12px !important;
    }

    #our-inspiration .inspiration-photo {
        height: 180px !important;
    }

    #our-inspiration .inspiration-item h3 {
        font-size: 15px !important;
    }

    #our-inspiration .inspiration-item p {
        font-size: 13px !important;
    }

    #our-inspiration .inspiration-heading {
        font-size: 25px !important;
    }
}


/* ==========================================================
   AQAI ABOUT SECTION
   The section is rendered inside a CMS Rich Text block.
   Keep it inside the page container; do not use 100vw offsets.
   ========================================================== */

#aqai-about {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: clamp(2.5rem, 5vw, 4.75rem) clamp(1rem, 2.5vw, 2rem);
    box-sizing: border-box;
    overflow: visible;
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
    font-family: var(--font-body);
}

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

#aqai-about .aqai-about-container {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.5fr);
    align-items: stretch;
    gap: clamp(1.5rem, 3.5vw, 3.25rem);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

#aqai-about .aqai-about-left,
#aqai-about .aqai-about-right {
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* Full-height visual panel: starts beside the title and extends to the
   bottom of the complete right-hand content. */
#aqai-about .aqai-about-left {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-width: 0;
    padding-top: 50px;
}

#aqai-about .aqai-about-image {
    position: relative;
    flex: 1 1 auto;
    min-height: 620px;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 18px;
    background: #eaf2fb;
    box-shadow: 0 14px 36px rgba(20, 65, 130, 0.12);
}

#aqai-about .aqai-about-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-width: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center top;
}

#aqai-about .aqai-image-caption {
    flex: 0 0 auto;
}

#aqai-about .aqai-image-caption {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #173c7b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

#aqai-about .aqai-image-caption span {
    margin-right: 7px;
    color: #1671db;
}

#aqai-about .aqai-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding: 8px 15px;
    border-radius: 30px;
    background: #e7f0ff;
    color: #1456ad;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

#aqai-about .aqai-label-icon {
    font-size: 17px;
}

#aqai-about .aqai-about-right h2 {
    max-width: none;
    margin: 0 0 15px;
    color: #142b52;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
}

#aqai-about .aqai-about-right h2 span {
    color: #1766c7;
}

#aqai-about .aqai-heading-line {
    width: 72px;
    height: 5px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, #1766d1, #56aaff);
}

#aqai-about .aqai-intro {
    max-width: none;
    margin: 0 0 24px;
    color: #4b5870;
    font-size: 15px;
    line-height: 1.85;
    text-align: left;
}

#aqai-about .aqai-intro strong {
    color: #173d78;
}

#aqai-about .aqai-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

#aqai-about .aqai-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 16px 14px;
    border: 1px solid #e2ebf8;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(30, 70, 130, 0.045);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#aqai-about .aqai-feature:hover {
    transform: translateY(-2px);
    border-color: #a9c9f7;
    box-shadow: 0 8px 20px rgba(30, 80, 150, 0.09);
}

#aqai-about .aqai-feature-icon {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e9f2ff;
    color: #1766c7;
    font-size: 21px;
    font-weight: 800;
}

#aqai-about .aqai-feature > div:last-child {
    flex: 1;
    min-width: 0;
}

#aqai-about .aqai-feature h3 {
    margin: 0 0 7px;
    color: #173765;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

#aqai-about .aqai-feature p {
    margin: 0;
    color: #596579;
    font-size: 13px;
    line-height: 1.7;
}

#aqai-about .aqai-about-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding: 14px 15px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #173d78;
    font-size: 12px;
    font-weight: 700;
}

#aqai-about .aqai-about-footer > span:not(.aqai-footer-separator) {
    color: #1672d5;
    font-size: 15px;
}

#aqai-about .aqai-footer-separator {
    margin: 0 4px;
    color: #a6b7d0;
}

@media (max-width: 900px) {
    #aqai-about .aqai-about-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        max-width: 760px;
    }

    #aqai-about .aqai-about-left {
        display: flex;
        flex-direction: column;
        align-self: auto;
        width: 100%;
        max-width: 620px;
        margin-inline: auto;
        padding-top: 0;
    }

    #aqai-about .aqai-about-image {
        flex: 0 0 auto;
        min-height: 0;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    #aqai-about .aqai-about-image img {
        min-height: 0;
        object-fit: cover;
        object-position: center 20%;
    }

    #aqai-about .aqai-about-right h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
    }
}

@media (max-width: 600px) {
    #aqai-about {
        padding: 2rem 0.9rem;
    }

    #aqai-about .aqai-about-container {
        gap: 22px;
    }

    #aqai-about .aqai-about-image {
        min-height: 0;
        aspect-ratio: 4 / 5;
        border-radius: 13px;
    }

    #aqai-about .aqai-label {
        font-size: 10px;
        padding: 7px 12px;
    }

    #aqai-about .aqai-about-right h2 {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    #aqai-about .aqai-intro {
        font-size: 14px;
        line-height: 1.8;
    }

    #aqai-about .aqai-features {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    #aqai-about .aqai-feature {
        padding: 14px 12px;
    }

    #aqai-about .aqai-about-footer {
        gap: 6px;
        font-size: 11px;
    }
}


/* =========================================
   AQAI ABOUT PAGE HEADER
   LEFT CONTENT + RIGHT IMAGE
========================================= */

.aqai-about-head {
    padding: 65px 0 !important;
    background: linear-gradient(135deg, #f4f8ff, #ffffff) !important;
}

.aqai-about-head > .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr) !important;
    gap: 55px !important;
    align-items: center !important;
}

.aqai-about-head__content {
    min-width: 0;
}

.aqai-about-head__label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1672bd;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.aqai-about-head__line {
    width: 28px;
    height: 2px;
    background: #1681ce;
}

.aqai-about-head h1 {
    color: #152f59;
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.15;
    margin: 0 0 20px;
    max-width: none;
}

.aqai-about-head h1 span {
    color: #1768c5;
}

.aqai-about-head .lede {
    max-width: 650px;
    font-size: 18px;
    line-height: 1.75;
    color: #334b70;
    margin-bottom: 17px;
}

.aqai-about-head__description {
    color: #64748b;
    font-size: 15px;
    line-height: 1.9;
    margin: 0;
}

.aqai-about-head__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.aqai-meta-item {
    padding: 15px;
    border: 1px solid #e1eafa;
    border-radius: 12px;
    background: #fff;
}

.aqai-meta-item__label {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 800;
    color: #7b8ba5;
    margin-bottom: 8px;
}

.aqai-meta-item strong {
    display: block;
    color: #173b70;
    font-size: 13px;
    line-height: 1.5;
}

.aqai-about-head__notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    margin-top: 20px;
    border-radius: 12px;
    background: #eaf3ff;
    color: #31557f;
    font-size: 13px;
    line-height: 1.7;
}

.aqai-about-head__notice-icon {
    color: #1672ce;
    font-size: 19px;
    font-weight: 800;
}

/* RIGHT IMAGE */

.aqai-about-head__visual {
    width: 100%;
    min-width: 0;
}

.aqai-about-head__image {
    width: 100%;
    height: 440px;
    overflow: hidden;
    border-radius: 20px;
    background: #eaf2fc;
    box-shadow: 0 18px 45px rgba(27, 68, 125, .13);
}

.aqai-about-head__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.aqai-about-head__image-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 15px;
    padding: 14px;
    border-radius: 11px;
    background: #eaf2ff;
    color: #174b91;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.aqai-about-head__image-caption span {
    color: #1674d5;
    font-size: 17px;
}

/* TABLET */

@media(max-width: 900px) {
    .aqai-about-head > .container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .aqai-about-head__visual {
        max-width: 650px;
        margin: 0 auto;
    }

    .aqai-about-head__image {
        height: 380px;
    }
}

/* MOBILE */

@media(max-width: 600px) {
    .aqai-about-head {
        padding: 35px 0 !important;
    }

    .aqai-about-head > .container {
        gap: 25px !important;
    }

    .aqai-about-head h1 {
        font-size: 36px;
    }

    .aqai-about-head .lede {
        font-size: 15px;
    }

    .aqai-about-head__description {
        font-size: 14px;
    }

    .aqai-about-head__meta {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .aqai-meta-item {
        padding: 12px;
    }

    .aqai-about-head__image {
        height: 300px;
        border-radius: 14px;
    }
}

/* AQAI About Image - Show Full Image Without Cropping */

.aqai-about-head__image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    background: #f0f6ff !important;
    border-radius: 20px !important;
}

.aqai-about-head__image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Keep image caption aligned */
.aqai-about-head__image-caption {
    width: 100%;
    margin-top: 15px;
}

@media(max-width: 600px) {
    .aqai-about-head__image {
        border-radius: 14px !important;
    }
}
/* AQAI Header Partner Logos - Bigger & Responsive */

.marks {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.marks__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.marks__item img {
    height: 48px !important;
    width: auto !important;
    max-width: 125px !important;
    object-fit: contain !important;
    display: block;
}

.marks__item + .marks__item {
    border-left: 1px solid var(--line);
    padding-left: 12px;
}

/* Topbar logos */
.topbar .marks__item img {
    height: 26px !important;
    max-width: 90px !important;
}

/* Mobile Responsive */
@media (max-width: 720px) {
    .masthead__tools .marks {
        width: 100%;
        flex-basis: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .marks__item {
        min-height: 40px;
    }

    .marks__item img {
        height: 36px !important;
        max-width: 100px !important;
    }

    .marks__item + .marks__item {
        padding-left: 8px;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .marks__item img {
        height: 32px !important;
        max-width: 85px !important;
    }
}
.pdf-showcase-section {
  padding: 56px 20px;
  background-color: #f8fafc;
  color: #0f172a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.pdf-container {
  max-width: 1280px;
  margin: 0 auto;
}

.pdf-header {
  margin-bottom: 28px;
}

.pdf-header h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}

.pdf-header p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.pdf-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}

.pdf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.pdf-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.pdf-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
}

.pdf-viewer-frame {
  position: relative;
  width: 100%;
  height: 460px;
  background: #eef2f6;
}

.pdf-embed {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(15, 23, 42, 0.09);
  pointer-events: none;
  white-space: nowrap;
}

.pdf-fallback {
  padding: 24px;
  text-align: center;
  color: #475569;
  font-size: 14px;
}

@media print {
  #pdf-preview-section {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .pdf-showcase-section {
    padding: 40px 14px;
  }

  .pdf-header h2 {
    font-size: 22px;
  }

  .pdf-viewer-frame {
    height: 380px;
  }
}.vault-page {
  --bg-paper: #faf8f5;
  --ink-dark: #131b2e;
  --ink-muted: #526071;
  --accent-amber: #d97706;
  --accent-amber-soft: #fef3c7;
  --line-soft: #e6e1d8;

  background: var(--bg-paper);
  color: var(--ink-dark);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.vault-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Hero */
.vault-hero {
  background: var(--ink-dark);
  color: #ffffff;
  padding: 58px 0 52px;
  border-bottom: 4px solid var(--accent-amber);
}

.vault-hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.vault-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
  padding: 5px 11px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.vault-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.vault-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 620px;
}

.vault-quick-strip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
}

.vault-strip-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 10px;
  font-weight: 700;
}

.vault-pill-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.vault-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.vault-pill:hover {
  border-color: #fbbf24;
  color: #fbbf24;
}

.vault-pill.is-active {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #ffffff;
}

/* Stage Section */
.vault-stage-section {
  padding: 40px 0 16px;
}

.vault-stage-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(19, 27, 46, 0.07);
}

.vault-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #fffdf9;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.vault-stage-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.vault-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-amber);
}

.vault-mode-chip {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent-amber-soft);
  color: #92400e;
  padding: 4px 10px;
  border-radius: 999px;
}

.vault-stage-viewer {
  position: relative;
  height: 540px;
  background: #f1efe9;
}

.vault-embed {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.vault-stamp {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: rgba(19, 27, 46, 0.1);
  pointer-events: none;
  white-space: nowrap;
}

.vault-stamp-sm {
  font-size: 20px;
  letter-spacing: 2.5px;
}

.vault-stamp-lg {
  font-size: 44px;
}

/* Shelf Grid */
.vault-shelf-section {
  padding: 36px 0 72px;
}

.vault-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.vault-shelf-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.vault-shelf-head p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.vault-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.vault-item {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vault-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-amber);
  box-shadow: 0 14px 30px rgba(19, 27, 46, 0.08);
}

.vault-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vault-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-amber);
}

.vault-lock {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  background: #f3f4f6;
  padding: 3px 9px;
  border-radius: 999px;
}

.vault-item-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.vault-item-mini {
  position: relative;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ece8df;
  background: #f8f7f4;
}

.vault-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.vault-btn-primary,
.vault-btn-solid,
.vault-btn-ghost {
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.vault-btn-primary,
.vault-btn-solid {
  border: none;
  background: var(--ink-dark);
  color: #ffffff;
}

.vault-btn-primary:hover,
.vault-btn-solid:hover {
  background: var(--accent-amber);
}

.vault-btn-ghost {
  border: 1px solid var(--line-soft);
  background: #faf8f5;
  color: var(--ink-dark);
}

.vault-btn-ghost:hover {
  border-color: var(--ink-dark);
}

/* Modal */
.vault-modal[hidden] {
  display: none;
}

.vault-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.vault-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.8);
}

.vault-modal-box {
  position: relative;
  z-index: 2;
  width: min(1140px, 96vw);
  height: min(90vh, 920px);
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vault-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--ink-dark);
  color: #ffffff;
}

.vault-modal-title {
  margin: 0;
  font-size: 18px;
}

.vault-modal-sub {
  font-size: 12px;
  color: #cbd5e1;
}

.vault-close {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.vault-modal-stage {
  position: relative;
  flex: 1;
  background: #f8fafc;
}

.vault-modal-iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media print {
  .vault-page {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .vault-hero-grid {
    grid-template-columns: 1fr;
  }
  .vault-stage-viewer {
    height: 420px;
  }
}

@media (max-width: 600px) {
  .vault-item-actions {
    grid-template-columns: 1fr;
  }
  .vault-stage-viewer {
    height: 340px;
  }
}
.vault-modal[hidden] {
  display: none !important;
}

.vault-item-mini {
  position: relative;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ece8df;
  background: #f8f7f4;
}

.vault-mini-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.vault-mini-hint {
  background: rgba(19, 27, 46, 0.85);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}