/* attestwire.com — system fonts, one accent colour, no external assets.
 *
 * The token structure mirrors apps/checker/public/styles.css so the two
 * properties feel related without being the same site. The accent is the
 * deliberate difference: the checker is blue (a neutral utility), the engine
 * brand is teal. Teal was picked over the default developer-tool indigo/blue
 * for exactly one reason — it is not the colour every other compliance vendor
 * uses, and it still clears WCAG AA as link text on both backgrounds
 * (#0b6b64 on #ffffff ≈ 5.1:1; #4fd6c6 on #0e1117 ≈ 10:1).
 */

:root {
  --accent: #0b6b64;
  --accent-hover: #085049;
  --accent-soft: #e2f2f0;

  --bg: #ffffff;
  --bg-alt: #f6f8f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --border-strong: #c9cfd8;

  --text: #14181f;
  --text-muted: #5b6572;

  --ok-bg: #e2f2f0;
  --ok-text: #0b6b64;
  --warn-bg: #fdf3e3;
  --warn-text: #7a4c06;

  --code-bg: #f6f8f8;

  --radius: 10px;
  --maxw: 760px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 14px rgba(16, 24, 40, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4fd6c6;
    --accent-hover: #7fe6da;
    --accent-soft: #102a28;

    --bg: #0e1117;
    --bg-alt: #141922;
    --surface: #161b24;
    --border: #262d39;
    --border-strong: #38414f;

    --text: #e8ecf2;
    --text-muted: #99a3b1;

    --ok-bg: #10302c;
    --ok-text: #6fdccd;
    --warn-bg: #33280f;
    --warn-text: #e7bd6a;

    --code-bg: #10141b;

    --shadow: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header / footer ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--accent);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 28px 0 48px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer a {
  color: var(--text-muted);
}

/* ---- typography ---- */

h1 {
  font-size: clamp(1.8rem, 4.6vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin: 40px 0 12px;
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.014em;
  margin: 48px 0 12px;
}

h3 {
  font-size: 1.05rem;
  margin: 26px 0 6px;
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--accent);
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.86rem;
}

.crumb {
  margin: 34px 0 0;
  font-size: 0.86rem;
}

.crumb a {
  text-decoration: none;
}

.next-steps {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

code,
.mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    monospace;
  font-size: 0.9em;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  /* Long identifiers must never widen the page. */
  overflow-wrap: anywhere;
}

.h1-code {
  font-size: 0.72em;
  vertical-align: 0.16em;
  padding: 2px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

/* ---- code blocks ---- */

figure.code {
  margin: 18px 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
}

figure.code figcaption {
  padding: 8px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

figure.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
}

figure.code code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.855rem;
  overflow-wrap: normal;
  white-space: pre;
}

/* ---- callouts ---- */

blockquote.official {
  margin: 18px 0 22px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
  color: var(--text);
}

blockquote.official p {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

blockquote.official footer {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.callout {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0 22px;
}

.callout p {
  margin: 0;
}

/* An unwritten rule page is a normal state, not a warning — so it gets the
   neutral surface rather than the amber one. */
.callout-quiet {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.callout a,
.callout code {
  color: inherit;
}

.callout code {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .callout code {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

/* ---- pills / status ---- */

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  vertical-align: 1px;
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: transparent;
}

.status-line {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: -4px 0 20px;
}

/* ---- forms ---- */

.search {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}

input[type='email'],
input[type='text'] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 13px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  transition: background 0.12s ease;
}

@media (prefers-color-scheme: dark) {
  button {
    color: #0e1117;
  }
}

button:hover {
  background: var(--accent-hover);
}

button[disabled] {
  opacity: 0.55;
  cursor: default;
}

.waitlist {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 14px;
  margin: 18px 0 8px;
}

.waitlist .muted {
  margin-bottom: 4px;
}

.status {
  min-height: 1.4em;
  color: var(--text-muted);
}

.status.ok {
  color: var(--ok-text);
  font-weight: 550;
}

.status.err {
  color: var(--warn-text);
}

/* ---- definition lists ---- */

.identity {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 14px 0 22px;
  font-size: 0.95rem;
}

.identity dt {
  color: var(--text-muted);
}

.identity dd {
  margin: 0;
}

@media (max-width: 540px) {
  .identity {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .identity dd {
    margin-bottom: 10px;
  }
}

/* ---- tools list ---- */

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

ul.tools li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
}

.tool-name {
  font-weight: 600;
}

.tool-desc {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---- tables ---- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--bg-alt);
  font-weight: 600;
}

tbody th {
  font-weight: 600;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

/* Prose cells must wrap; the scroll container is for the narrow ones. */
.wrap-cell {
  min-width: 18ch;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: none;
}

/* ---- misc ---- */

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

.hidden {
  display: none !important;
}

/* ---- proof block + rule-page footer ----
   Both are callouts that carry more than one paragraph, so they need the
   vertical rhythm .callout deliberately removes for its one-line case. */

.proof h2 {
  margin-top: 0;
}

.proof ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.proof li {
  margin-bottom: 8px;
}

.proof p:last-child,
.rule-footer p:last-child {
  margin-bottom: 0;
}

.rule-footer p {
  margin: 0 0 8px;
}
