/* AccessRadar microsite.
   Quiet, editorial layout. Light theme only.
   Typography: Adobe Source Serif 4 (headings) + Source Sans 3 (body),
   self-hosted — one foundry pair, no system-font mix. */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg:          #fafaf8;
  --bg-raised:   #ffffff;
  --border:      #e4e1d8;
  --border-strong: #c5c0b4;
  --text:        #141311;
  --muted:       #4a463e;
  /* AccessRadar brand */
  --brand-blue:  #236BB4;
  --brand-mid:   #6C70CD;
  --brand-violet:#A96BCE;
  --brand-gradient: linear-gradient(135deg, #236BB4 0%, #6C70CD 65%, #A96BCE 100%);
  --btn-gradient: linear-gradient(135deg, #236BB4 0%, #6569CB 65%, #9B53C6 100%);
  --accent:      #6569CB;
  --accent-text: #6569CB;
  --accent-soft: rgba(101, 105, 203, .10);
  --warn-bg:     #f5ecda;
  --warn-text:   #5c4518;
  --warn-border: #d4bf8a;
  --ok:          #1a5c3c;
  --logo-filter: none;
  --maxw:        720px;
  --maxw-wide:   880px;
  --serif:       "Source Serif 4", Georgia, serif;
  --sans:        "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:        ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --transition:  .15s ease;
}


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

html {
  font-family: var(--sans);
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -.005em;
}

img, svg { max-width: 100%; }

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute; left: .75rem; top: -3rem; z-index: 10;
  background: var(--bg-raised); color: var(--text);
  padding: .5rem .75rem; border: 1px solid var(--border);
}
.skip-link:focus { top: .75rem; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap-wide { max-width: var(--maxw-wide); }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 2rem;
  max-width: var(--maxw-wide);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.brand-by {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  line-height: 1.2;
  letter-spacing: .01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.1rem;
  list-style: none;
}
.nav a {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  padding: .15rem 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav a:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.nav a[aria-current="page"] {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}

/* ── Layout ──────────────────────────────────────────────── */
main { flex: 1; padding: 3rem 0 4rem; }
section { margin-top: 3.5rem; }
section:first-child { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.45rem, 3vw, 1.75rem); margin-bottom: .85rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }

p, ul, ol, dl { margin-bottom: 1rem; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: .35rem; }
li > ul, li > ol { margin-top: .3rem; margin-bottom: .3rem; }

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  line-height: 1.55;
}
.muted { color: var(--muted); }
.mt-sm { margin-top: 1rem; }
.small { font-size: .8125rem; line-height: 1.5; }

code {
  font-family: var(--mono);
  font-size: .84em;
  background: var(--accent-soft);
  padding: .08em .32em;
  border-radius: 3px;
  word-break: break-word;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: .5rem 0 0; }
.eyebrow {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: .4rem; }
.hero .subtitle {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.25rem;
  letter-spacing: -.01em;
}
.hero .lead { margin-bottom: 1.75rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.15rem;
  font-size: .9rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-text);
  border-radius: 2px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-primary {
  background: var(--btn-gradient);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Highlights (no cards) ───────────────────────────────── */
.grid {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}
@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-3 > * {
    border-right: 1px solid var(--border);
  }
  .grid-3 > *:last-child { border-right: 0; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 > * {
    border-right: 1px solid var(--border);
  }
  .grid-2 > *:last-child { border-right: 0; }
}

.card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem 0;
  box-shadow: none;
}
@media (min-width: 720px) {
  .grid-3 .card,
  .grid-2 .card {
    padding: 1.5rem 1.25rem;
    border-bottom: 0;
  }
  .grid-3 .card:first-child,
  .grid-2 .card:first-child { padding-left: 0; }
  .grid-3 .card:last-child,
  .grid-2 .card:last-child { padding-right: 0; }
}
.card h3 { margin-top: 0; font-size: 1.1rem; margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card .tag {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .65rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  margin: 1.25rem 0;
  background: transparent;
  border-radius: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 480px;
}
th, td {
  text-align: left;
  padding: .7rem 0;
  padding-right: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  background: transparent;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: .85rem;
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 400; }
td.num, th.num { text-align: right; white-space: nowrap; padding-right: 0; }
.table-wrap caption {
  text-align: left;
  padding: .85rem 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.yes { color: var(--ok); font-weight: 400; }
.no { color: var(--muted); }

/* ── Callouts and badges ─────────────────────────────────── */
.callout {
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem 0;
  background: transparent;
  margin: 1.25rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-warn {
  border-color: var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  padding: 1rem 1.1rem;
}
.callout-warn a { color: inherit; }

.tc {
  display: inline;
  font-size: .78em;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--warn-text);
  background: transparent;
  border: 0;
  padding: 0;
  font-style: italic;
}

.edition {
  display: inline;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  vertical-align: baseline;
}
.edition-adv { color: var(--muted); }
.edition-adv::before { content: "· "; }

/* ── Docs / prose layout ─────────────────────────────────── */
.page-head { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.page-head h1 { margin-bottom: .5rem; }
.page-head .lead { margin-bottom: 0; }
.updated { font-size: .8125rem; color: var(--muted); margin-top: .85rem; }

.docs {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--maxw-wide);
  margin: 0 auto;
}
@media (min-width: 900px) {
  .docs { grid-template-columns: 180px minmax(0, 1fr); gap: 3.5rem; }
  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
  }
}
.toc { font-size: .8125rem; }
.toc-title {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .65rem;
}
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: .28rem 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 0;
}
.toc a:hover { color: var(--text); }
@media (max-width: 899px) {
  .toc {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .toc ol { columns: 2; column-gap: 1.5rem; }
}

.prose { max-width: 38rem; }
.prose section { margin-top: 2.75rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.prose section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 { padding-top: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: .9rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted);
}

details {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  margin-bottom: 0;
}
details:first-of-type { border-top: 1px solid var(--border); }
summary {
  cursor: pointer;
  padding: .9rem 0;
  font-weight: 400;
  font-family: var(--serif);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 400;
}
details[open] summary::after { content: "–"; }
details[open] summary { border-bottom: 0; }
details > :not(summary) { margin-left: 0; margin-right: 0; }
details > :nth-child(2) { margin-top: 0; }
details > :last-child { margin-bottom: 1rem; color: var(--muted); }

dl.defs dt { font-weight: 600; margin-top: .85rem; font-family: var(--serif); }
dl.defs dd { margin: 0 0 .5rem; color: var(--muted); }

/* ── Diagram (security page) ─────────────────────────────── */
.diagram { margin: 1.25rem 0 1.5rem; }
.diagram svg { display: block; width: 100%; height: auto; max-width: 560px; margin: 0 auto; }
.d-boundary { fill: var(--accent-soft); stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 5 4; }
.d-box { fill: var(--bg-raised); stroke: var(--border-strong); stroke-width: 1.25; }
.d-box-main { fill: var(--bg-raised); stroke: var(--text); stroke-width: 1.75; }
.d-none { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 4; }
.d-line { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.d-arrow { fill: var(--muted); }
.d-text { fill: var(--text); font: 600 13px "Source Sans 3", sans-serif; }
.d-sub { fill: var(--muted); font: 400 11px "Source Sans 3", sans-serif; }
.d-label { fill: var(--muted); font: 600 11px "Source Sans 3", sans-serif; letter-spacing: .04em; text-transform: uppercase; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  font-size: .8125rem;
  color: var(--muted);
}
.site-footer .wrap { max-width: var(--maxw-wide); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr; gap: 3rem; }
}
.site-footer h2 {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .65rem;
  color: var(--muted);
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.site-footer a:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.site-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.15rem;
  margin-bottom: 0;
}
.site-footer li { margin: 0; }
.site-footer address { font-style: normal; margin-bottom: .75rem; line-height: 1.6; }
.footer-logo {
  display: block;
  width: 110px;
  height: auto;
  max-width: 40%;
  filter: var(--logo-filter);
  margin-bottom: 1rem;
}
.legal-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  max-width: 40rem;
}
