/* Scholarship Helper (fictional demo). No external fonts or CDNs: Fredoka is self-hosted
   under the SIL Open Font License (fonts/Fredoka-OFL.txt); body text uses the system stack. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/fredoka.woff2") format("woff2");
}

:root {
  --ink: #24307a;
  --ink-deep: #172057;
  --ink-soft: #e8ebf8;
  --paper: #f3f5fb;
  --panel: #ffffff;
  --text: #1b2042;
  --muted: #555c7d;
  --line: #d6dcef;
  --margin: #d9485f;
  --marigold: #f4b223;
  --marigold-ink: #6b4500;
  --marigold-bg: #fff3d6;
  --leaf: #17704a;
  --leaf-bg: #e3f3ea;
  --rose-bg: #fde8ec;
  --font-display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(23, 32, 87, 0.06), 0 8px 24px -16px rgba(23, 32, 87, 0.35);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink-deep);
  margin: 0;
}
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-deep); }

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ------------------------------------------------------------ demo banner */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 7px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #2a1c00;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 10px, transparent 10px 20px),
    var(--marigold);
  border-bottom: 1px solid #d9971a;
}

/* ------------------------------------------------------------ header */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-deep);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink-deep); border-bottom-color: var(--marigold); }

/* ------------------------------------------------------------ hero */
.hero { padding: 56px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 17ch;
  text-wrap: balance;
  margin-bottom: 18px;
}
.hero-lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.hero-steps li {
  counter-increment: step;
  position: relative;
  padding: 2px 0 2px 56px;
  color: var(--muted);
  min-height: 42px;
}
.hero-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink-deep);
  background: var(--marigold);
}
.step-title { display: block; color: var(--text); font-weight: 650; }

/* ------------------------------------------------------------ buttons and fields */
.button, .button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
.button-quiet { background: var(--panel); color: var(--ink); }
.button-quiet:hover { background: var(--ink-soft); color: var(--ink-deep); border-color: var(--ink-deep); }
.button:disabled, .button-quiet:disabled { opacity: 0.55; cursor: not-allowed; }
.button-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.button-link:hover { color: var(--margin); }

.field { display: grid; gap: 5px; }
.field-label { font-weight: 600; font-size: 0.95rem; }
.field-hint { font-size: 0.85rem; color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="search"], input[type="url"], select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid #b9c1de;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
}
select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible { border-color: var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--margin); background-color: #fff7f8; }

.toggle, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.toggle input, .radio input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.form-status { margin: 10px 0 0; font-size: 0.95rem; min-height: 1.4em; }
.form-status[data-tone="error"] { color: #a3243a; font-weight: 600; }
.form-status[data-tone="ok"] { color: var(--leaf); font-weight: 600; }

.empty { color: var(--muted); font-size: 0.95rem; margin: 8px 0 0; }

/* ------------------------------------------------------------ workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding-bottom: 56px;
}
.workspace-main { display: grid; gap: 28px; min-width: 0; }
.workspace-side { display: grid; gap: 20px; position: sticky; top: 52px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.panel-intro { color: var(--muted); max-width: 70ch; }

/* profile */
.meter { display: flex; align-items: center; gap: 10px; }
.meter progress {
  width: 120px;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: var(--ink-soft);
  overflow: hidden;
}
.meter progress::-webkit-progress-bar { background: var(--ink-soft); border-radius: 99px; }
.meter progress::-webkit-progress-value { background: var(--leaf); border-radius: 99px; }
.meter progress::-moz-progress-bar { background: var(--leaf); border-radius: 99px; }
.meter-text { font-size: 0.9rem; color: var(--muted); }

.profile-form { display: grid; gap: 18px; }
.profile-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px 18px;
}
.profile-group legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-deep);
  padding: 0;
  margin-bottom: 10px;
}
.legend-note { font-family: var(--font-body); font-weight: 400; font-size: 0.9rem; color: var(--muted); }
.profile-private {
  background: var(--ink-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}
.profile-private legend { float: left; width: 100%; margin-bottom: 4px; }
.private-note { grid-column: 1 / -1; font-size: 0.9rem; color: var(--muted); margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* finder */
.finder-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 12px 16px;
  align-items: end;
  margin: 6px 0 22px;
}
.finder-form .toggle { grid-column: 1 / -1; }

.scheme-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

/* The memorable bit: each scheme is a notebook page with a red margin line, and the
   result is an ink stamp. */
.scheme {
  position: relative;
  padding: 20px 22px 18px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(to right, transparent 38px, var(--margin) 38px, var(--margin) 40px, transparent 40px),
    #fff;
  background-repeat: no-repeat;
}
.scheme::before {
  /* punched holes */
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 1px 2px rgba(23, 32, 87, 0.25), 0 44px 0 var(--paper);
}
.scheme h3 { font-size: 1.2rem; padding-right: 150px; margin-bottom: 2px; }
.scheme-provider { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.scheme-summary { max-width: 62ch; }
.scheme-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.scheme-facts dt { color: var(--muted); }
.scheme-facts dd { margin: 0; font-weight: 600; }
.scheme-why { margin: 4px 0 14px; font-size: 0.95rem; }
.scheme-why summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.scheme-why ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.check { padding-left: 26px; position: relative; }
.check::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}
.check-pass::before { content: "✓"; background: var(--leaf); }
.check-fail::before { content: "✕"; background: var(--margin); }
.check-missing::before { content: "?"; background: #b07a00; }

.stamp {
  position: absolute;
  top: 16px;
  right: 18px;
  margin: 0;
  padding: 4px 12px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transform: rotate(-5deg);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 0 0 3.5px currentColor;
}
.scheme-eligible .stamp { color: var(--leaf); }
.scheme-need_info .stamp { color: #9a6400; transform: rotate(3deg); }
.scheme-not_eligible .stamp { color: #8b8fa8; transform: rotate(-2deg); }
.scheme-not_eligible { background-color: #fbfbfd; }
.scheme-not_eligible h3 { color: #4a4f6d; }

/* side panels */
.side-panel { padding: 22px; }
.side-panel h2 { font-size: 1.3rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.count-badge {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  background: var(--marigold);
  color: #2a1c00;
}
.shortlist-list, .checklist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shortlist-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-left: 4px solid var(--line);
  background: var(--paper);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.shortlist-item.scheme-eligible { border-left-color: var(--leaf); }
.shortlist-item.scheme-need_info { border-left-color: var(--marigold); }
.shortlist-item.scheme-not_eligible { border-left-color: #a8abbf; }
.shortlist-name { font-weight: 650; line-height: 1.3; }
.shortlist-meta { font-size: 0.88rem; color: var(--muted); }
.shortlist-item .button-link { justify-self: start; font-size: 0.88rem; }

#checklist-status { margin-bottom: 12px; }
.checklist-list { margin-bottom: 14px; }
.checklist-item label { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; cursor: pointer; }
.checklist-item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--leaf); grid-row: span 2; }
.checklist-doc { font-weight: 600; line-height: 1.35; }
.checklist-for { font-size: 0.85rem; color: var(--muted); }
.checklist-item.is-done .checklist-doc { text-decoration: line-through; text-decoration-color: var(--leaf); color: var(--muted); }
#checklist-build { width: 100%; }

.callback-panel { border-top: 4px solid var(--margin); }
.demo-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: #8a1f33;
  background: var(--rose-bg);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 14px;
}
.callback-form { display: grid; gap: 12px; }
.callback-form .button { width: 100%; }
.callback-receipt { background: var(--leaf-bg); border-radius: var(--radius-md); padding: 14px 16px; }
.receipt-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--leaf); margin-bottom: 4px; }
.receipt-ref strong { font-size: 1.1rem; letter-spacing: 0.04em; }

/* ------------------------------------------------------------ assistant */
.assistant {
  background: var(--ink-deep);
  color: #e9ecfb;
  padding: 56px 0 64px;
}
.assistant h2 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.assistant-intro { max-width: 760px; margin-bottom: 24px; }
.assistant-intro p { color: #d2d7f3; }
.assistant-note { font-size: 0.92rem; }
#assistant-status {
  display: inline-block;
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  margin: 0;
}
#assistant-status[data-tone="ok"] { background: rgba(73, 199, 133, 0.2); }
#assistant-status[data-tone="warn"], #assistant-status[data-tone="error"] { background: rgba(244, 178, 35, 0.25); }

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.assistant-side { display: grid; gap: 18px; }
.side-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.side-block h3 { color: #fff; margin-bottom: 10px; }
.side-note { font-size: 0.88rem; color: #c3c9ec; }
.sample-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sample {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font: 0.92rem/1.4 var(--font-body);
  cursor: pointer;
}
.sample:hover { background: rgba(244, 178, 35, 0.18); border-color: var(--marigold); }

.trust-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 460px; overflow: auto; }
.trust-entry {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border-left: 5px solid #8b8fa8;
  font-size: 0.9rem;
}
.trust-entry p { margin: 0 0 4px; }
.trust-entry-head { display: flex; justify-content: space-between; gap: 8px; }
.trust-status { font-weight: 700; }
.trust-entry time { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.trust-target { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; overflow-wrap: anywhere; color: var(--muted); }
.trust-entry details summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.trust-entry ol { margin: 6px 0 0; padding-left: 20px; }
.trust-entry .step.is-fail { color: #a3243a; }
.status-endorsed { border-left-color: var(--leaf); }
.status-endorsed .trust-status { color: var(--leaf); }
.trust-entry.is-blocked { border-left-color: var(--margin); background: #fff7f8; }
.trust-entry.is-blocked .trust-status { color: #a3243a; }
.status-unendorsed, .status-untrusted-issuer, .status-expired, .status-unverifiable, .status-pinned-mismatch { border-left-color: var(--marigold); }

/* ------------------------------------------------------------ trust settings */
.trust-section { padding: 64px 0; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.trust-copy h2 { font-size: 2rem; margin-bottom: 14px; }
.trust-copy p { max-width: 58ch; }
.trust-panel h3 { margin-bottom: 6px; }
.anchor-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.anchor {
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  position: relative;
}
.anchor::before {
  /* an abstract seal, not an emblem */
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px double var(--ink);
  background: radial-gradient(circle, var(--marigold) 0 4px, transparent 5px);
}
.anchor.is-local::before { border-color: var(--leaf); }
.anchor-name { font-weight: 650; }
.anchor-origin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.anchor-scopes { font-size: 0.88rem; color: var(--muted); }
.anchor .button-link { justify-self: start; }
.anchor-add { margin: 6px 0 18px; }
.anchor-add summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.anchor-form { display: grid; gap: 12px; margin-top: 12px; }
.anchor-form .button-quiet { justify-self: start; }
.policy { border: 0; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.policy legend { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink-deep); padding: 16px 0 6px; }
.radio span strong { display: block; }
.radio span { color: var(--muted); font-size: 0.93rem; }
.radio span strong { color: var(--text); font-size: 1rem; }

/* ------------------------------------------------------------ sources and footer */
.sources { padding-bottom: 64px; }
.sources h2 { margin-bottom: 10px; }
.partner-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.partner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: grid;
  gap: 4px;
}
.partner a { font-weight: 650; }
.partner span { color: var(--muted); font-size: 0.93rem; }
.partner-caution { border-style: dashed; border-color: #e3a3ae; }

.site-footer { background: #10173f; color: #c6cbea; padding: 40px 0; font-size: 0.93rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* ------------------------------------------------------------ assistant runtime
   (from the agentify-website template, set to this site's palette) */
#agent-app {
  --ns-font: var(--font-body);
  --ns-bg: #ffffff;
  --ns-fg: #1b2042;
  --ns-primary: #24307a;
  --ns-accent: #172057;
  --ns-border: #d6dcef;
  --ns-panelbg: #ffffff;
  --ns-msgbg: #eef1fa;
  --ns-muted: #555c7d;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-width: 0;
}
.assistant-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-top: 12px;
}
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 640px; }
#agent-app .ns-chat { background: var(--ns-bg); }
#agent-app input[type="checkbox"],
#agent-app input[type="radio"] { width: auto; min-height: 0; }
#agent-app input, #agent-app select { min-height: 0; }
#agent-app .ns-header { flex-wrap: wrap; }
#agent-app .ns-settings-body label { margin: 4px 0; font-weight: 400; }
#agent-app .ns-w-label { font-family: inherit; }
#agent-app .ns-widget label { margin: 0; }
#agent-app .ns-w-radio label,
#agent-app .ns-w-multi label,
#agent-app .ns-w-toggle { font-weight: 400; }
#agent-app .ns-w-toggle { font-size: 13px; }
#agent-app button { margin: 0; }
#agent-app .ns-w-choice { color: var(--ns-fg); }
#agent-app .ns-devtoggle:not(.on):hover,
#agent-app .ns-modal-close:hover { background: transparent; }
#agent-app .ns-w-choice:disabled:hover { background: #fafbfc; }
#agent-app .ns-consent { background: #fffbeb; }
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }
#agent-app .ns-msg { overflow-wrap: break-word; }
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }
#agent-app h1, #agent-app h2, #agent-app h3 { color: inherit; }

/* Confirmation dialogs (site.js and the runtime add them to <body>). */
body > dialog h2 { margin: 0 0 12px; font: 600 1.35em var(--font-display); color: var(--ink-deep); }
body > dialog button { margin-right: 8px; }
.assistant-review {
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  border: 0;
  border-top: 6px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px;
  font: 16px/1.5 var(--font-body);
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(16, 23, 63, 0.55);
}
.assistant-review.is-irreversible { border-top-color: var(--margin); }
.assistant-review::backdrop { background: rgba(16, 23, 63, 0.55); }
.assistant-review dl {
  display: grid;
  grid-template-columns: fit-content(40%) 1fr;
  gap: 6px 16px;
  margin: 14px 0;
  padding: 14px 16px;
  background: var(--paper);
  border-radius: var(--radius-md);
}
.assistant-review dt { font-weight: 600; color: var(--muted); }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.assistant-review details { margin: 12px 0 18px; font-size: 0.9rem; }
.assistant-review summary { cursor: pointer; color: var(--ink); }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f6f7fb; padding: 10px; border-radius: var(--radius-sm); }
.assistant-review-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.assistant-review-buttons button {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: 600 1rem var(--font-body);
  cursor: pointer;
  margin: 0;
}
.assistant-review.is-irreversible .assistant-review-buttons button:first-child { background: #a3243a; border-color: #a3243a; }
.assistant-review .assistant-decline,
.assistant-review.is-irreversible .assistant-review-buttons .assistant-decline { background: transparent; color: var(--ink); border-color: var(--ink); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .workspace { grid-template-columns: 1fr; }
  .workspace-side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .assistant-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 28px; }
  .hero-grid, .trust-grid, .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .panel { padding: 18px; }
  .finder-form { grid-template-columns: 1fr; }
  .scheme { padding: 56px 16px 16px 50px; }
  .scheme h3 { padding-right: 0; }
  .stamp { left: 50px; right: auto; top: 14px; }
  .assistant-panels { grid-template-columns: 1fr; }
  #agent-app { padding: 10px; }
  #agent-app.ns-composed-app [data-ns-slot="chat"] { height: 560px; }
  .site-nav { gap: 2px 14px; font-size: 0.95rem; }
  .assistant-review dl { grid-template-columns: 1fr; gap: 0; }
  .assistant-review dd { margin-bottom: 8px; }
}
