/* SvgCAD site — one stylesheet. Every colour comes from tokens.css; none is named here.
 * No framework, no reset library: the rules below are the whole reset.
 * Order: base · layout · header/footer · type · figures · components · pages · motion.
 */

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
/* A visible focus ring in every browser, including ones without :focus-visible - the ring
   is applied on plain :focus and only withdrawn where the browser can tell the focus came
   from a pointer. A keyboard user always sees it; a mouse user never does. */
:focus { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* a keyboard user's first stop */
.skip {
  position: absolute; left: var(--s-4); top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s-3) var(--s-5); font-family: var(--mono); font-size: var(--t-mono);
  transition: top .12s ease;
}
.skip:focus { top: var(--s-4); }

/* -------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: var(--s-9); }
.band--tight { padding-block: var(--s-7); }
.band + .band { border-top: 1px solid var(--rule-soft); }

/* text beside a figure: the figure is always the larger half */
.split {
  display: grid; gap: var(--s-6) var(--s-7); align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--s-7) var(--s-8); align-items: center; }
  /* flipping puts the figure first - so the columns flip with it, and the figure keeps
     the larger half either way */
  .split--flip { grid-template-columns: 7fr 5fr; }
  .split--flip > *:first-child { order: 2; }
}
.cols { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 700px)  { .cols--2, .cols--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .cols--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cols--4 { grid-template-columns: repeat(4, 1fr); } }

/* ------------------------------------------------------- header/footer */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-head .wrap {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: 4.25rem; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 1.6rem;
  letter-spacing: .02em; color: var(--ink); text-decoration: none; line-height: 1;
  margin-right: var(--s-2);
}
.wordmark:hover { color: var(--accent); }
.site-nav { display: flex; gap: var(--s-5); flex-wrap: wrap; flex: 1 1 auto; }
.site-nav a {
  font-family: var(--mono); font-size: var(--t-mono); color: var(--ink-2);
  text-decoration: none; letter-spacing: .02em; padding-block: var(--s-2);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.gate { display: flex; align-items: center; gap: var(--s-4); }

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  padding-block: var(--s-7) var(--s-6);
  font-size: var(--t-small);
}
.site-foot h2 {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  margin-bottom: var(--s-3);
}
.site-foot a { color: var(--ink-2); text-decoration: none; display: block; padding-block: 3px; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.foot-note {
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--rule);
  color: var(--ink-3); font-family: var(--mono); font-size: var(--t-mono);
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6);
}

/* ---------------------------------------------------------------- type */

.eyebrow {
  font-family: var(--mono); font-size: var(--t-micro); font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
}
/* the mark after an eyebrow is the source of the claim, not decoration:
   §4 is FEATURES.md section 4, R-016 is the roadmap item */
.eyebrow .src { color: var(--ink-3); font-weight: 400; letter-spacing: .12em; }
.eyebrow::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--rule); min-width: var(--s-6);
}

h1, .h1 { font-family: var(--display); font-weight: 600; line-height: var(--lh-head);
          font-size: var(--t-h1); letter-spacing: -.005em; text-wrap: balance; }
.hero h1 { font-size: var(--t-hero); line-height: var(--lh-tight); }
h2, .h2 { font-family: var(--display); font-weight: 600; line-height: var(--lh-head);
          font-size: var(--t-h2); letter-spacing: -.005em; text-wrap: balance; }
h3, .h3 { font-family: var(--body); font-weight: 600; font-size: var(--t-h3);
          line-height: 1.25; letter-spacing: -.01em; }

.lede { font-size: var(--t-lede); color: var(--ink-2); max-width: var(--measure); }
p { max-width: var(--measure); }
p + p, .lede + p, h2 + p, h3 + p, h1 + p { margin-top: var(--s-4); }
h2 + .lede, h1 + .lede { margin-top: var(--s-5); }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); }
.prose ul { margin-top: var(--s-4); }

.list { display: grid; gap: var(--s-4); max-width: var(--measure); }
.lede + .list, p + .list, h2 + .list, h3 + .list { margin-top: var(--s-5); }
.list li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: baseline; }
.list li::before {
  content: "—"; color: var(--ink-3); font-family: var(--mono); font-size: var(--t-mono);
}
.list--tick li::before { content: "✓"; color: var(--accent); }

/* figures in prose */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- figures */

figure { margin: 0; }
.fig {
  border: 1px solid var(--rule);
  background: var(--figure);
}
.fig > img {
  display: block; width: 100%; height: auto;
  background: var(--figure);
}
/* the caption is a title block: what it is on the left, which view on the right */
.fig figcaption {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--figure-rule);
  background: var(--figure);
  font-family: var(--mono); font-size: var(--t-mono); line-height: 1.45;
  color: #9AA3B0;
}
.fig figcaption b { color: #D8DCE4; font-weight: 500; }
.fig figcaption .view { color: #79828E; }
.fig--wide { grid-column: 1 / -1; }

/* ---------------------------------------------------------- components */

.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: .04em;
  padding: 0.7rem 1.25rem; border: 1px solid transparent; line-height: 1.3;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost { color: var(--ink-2); border-color: var(--rule); background: transparent; }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn--plain { color: var(--ink-2); padding-inline: 0; border: 0; }
.btn--plain:hover { color: var(--accent); }
.btn--lg { font-size: var(--t-small); padding: 0.85rem 1.6rem; }

/* the one tag that says a thing is not built yet */
.tag {
  display: inline-block; font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid currentColor; line-height: 1.5;
  color: var(--signal); background: var(--signal-bg);
  vertical-align: 0.12em; white-space: nowrap;
}
.tag--today { color: var(--accent); background: var(--accent-bg); }

.card {
  border: 1px solid var(--rule); background: var(--surface);
  padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3);
}
.card h3 { margin-bottom: var(--s-1); }
.card p { color: var(--ink-2); font-size: var(--t-small); }
.card .k {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}

.callout {
  border-left: 3px solid var(--accent); background: var(--surface);
  padding: var(--s-5); max-width: var(--measure);
}
.callout--signal { border-left-color: var(--signal); }

/* a plain data table: pricing allowances, roadmap, contrast results */
.table-scroll { overflow-x: auto; margin-top: var(--s-6); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: var(--t-small); }
caption { text-align: left; color: var(--ink-3); font-family: var(--mono);
          font-size: var(--t-mono); padding-bottom: var(--s-3); }
th, td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0;
         border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  border-bottom: 1px solid var(--rule);
}
tbody th { font-weight: 600; }
td.yes, td.no { font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.no { color: var(--ink-3); }

/* ------------------------------------------------------------ the hero */

.hero { padding-block: var(--s-8) var(--s-7); }
.hero .split { align-items: center; }
.hero .lede { margin-top: var(--s-5); }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center;
  margin-top: var(--s-6);
}
.hero-actions .note {
  font-family: var(--mono); font-size: var(--t-mono); color: var(--ink-3);
  flex-basis: 100%; margin: 0;
}

/* ---------------------------------------------------------- the gate */

.form { display: grid; gap: var(--s-5); max-width: 34rem; }
.lede + .form, p + .form { margin-top: var(--s-6); }
#formResult { margin-top: var(--s-6); }
#formResult h3 { margin-bottom: var(--s-3); }
.field { display: grid; gap: var(--s-2); }
.field label { font-family: var(--mono); font-size: var(--t-mono); color: var(--ink-2); }
.field .hint { font-size: var(--t-small); color: var(--ink-3); }
input, select, textarea {
  font: inherit; font-size: var(--t-small); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  padding: 0.65rem 0.75rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 7rem; resize: vertical; }
.form .btn { justify-self: start; }
.req { color: var(--accent); }

/* ------------------------------------------------------------- pricing */

.tier { display: flex; flex-direction: column; gap: var(--s-4); height: 100%; }
.tier .price {
  font-family: var(--mono); font-size: var(--t-mono); color: var(--ink-3);
  padding-block: var(--s-2); border-block: 1px solid var(--rule-soft);
}
.tier ul { display: grid; gap: var(--s-2); font-size: var(--t-small); color: var(--ink-2); }
.tier .btn { margin-top: auto; }

/* ------------------------------------------------------------- roadmap */

.stage { display: grid; gap: var(--s-4); }
.stage .item {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s-4);
  padding-block: var(--s-4); border-top: 1px solid var(--rule-soft);
}
.stage .item .id {
  font-family: var(--mono); font-size: var(--t-mono); color: var(--accent);
}
.stage .item p { color: var(--ink-2); font-size: var(--t-small); margin-top: var(--s-2); }
@media (max-width: 600px) { .stage .item { grid-template-columns: 1fr; gap: var(--s-1); } }

/* Two spacing utilities. These were inline style attributes until the CSP caught them:
   `style-src 'self'` forbids an inline style just as it forbids an inline script, so the
   spacing was silently not applying. Loosening the policy would have been the wrong fix. */
.mt-6 { margin-top: var(--s-6); }
.mt-4 { margin-top: var(--s-4); }

/* -------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
