@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #14213d;
  --accent: #e8543d;
  --accent-dark: #d0432e;
  --muted: #5b6472;
  --paper: #fafaf9;
  --dot: #ded6c9;
  --line: #e6e2dc;
  --panel: #f3f0eb;
  --navy-line: #2b3a57;
  --navy-panel: #1b2942;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Hanken Grotesk', system-ui, sans-serif; font-weight: 600; line-height: 1.08; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 10; }
.skip-link:focus { left: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.01em; }
.logo-llm { color: var(--accent); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(20,33,61,.04), 0 14px 34px -22px rgba(20,33,61,.18); }
.rule { border-top: 1px solid var(--line); }
.sec { padding-top: 60px; padding-bottom: 60px; }
.sched { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.mono { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; padding: 14px 22px; border-radius: 10px; background: var(--accent); color: #fff; border: 1px solid var(--accent); cursor: pointer; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.note { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: #a59a86; text-transform: uppercase; }

/* header */
.topbar { height: 3px; background: var(--accent); }
header.site { border-bottom: 1px solid var(--line); }
.hdrinner { min-height: 74px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hdrinner .logo { font-size: 21px; }
nav.primary { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
nav.primary a { padding: 8px 14px; border-radius: 8px; }
nav.primary a.current { color: var(--accent); background: #fbe8e4; }
nav.primary a.verify-link { color: var(--muted); border: 1px solid var(--line); }

/* jump nav */
.jumpnav { border-bottom: 1px solid var(--line); background: var(--panel); }
.jumpnav .wrap { height: 46px; display: flex; align-items: center; gap: 22px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); overflow-x: auto; }
.jumpnav a { color: var(--muted); white-space: nowrap; }

/* placeholders that remain (rare) */
.ph { background: var(--panel); border: 1px dashed #cfc7b9; color: #8a8378; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; text-align: center; }

/* before/after */
.artifact-grid, .artifact-col { min-width: 0; }
.artifact-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); min-width: 0; }
.artifact-pair figure { margin: 0; background: #fff; min-width: 0; }
.artifact-pair img { width: 100%; height: 210px; object-fit: cover; }
.artifact-pair .output { padding: 14px; height: 210px; overflow: auto; background: #fffaf8; min-width: 0; }
.artifact-pair figcaption { padding: 8px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8378; background: #fff; border-top: 1px solid var(--line); }
table.extract { border-collapse: collapse; font-size: 10px; width: 100%; table-layout: fixed; }
table.extract th, table.extract td { border: 1px solid var(--line); padding: 3px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.extract th { background: var(--panel); font-weight: 700; font-size: 9.5px; letter-spacing: 0.03em; text-transform: uppercase; color: #8a8378; }

/* faq */
details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.faq summary { font-family: 'Space Grotesk'; font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .sign { color: var(--accent); flex: none; }
details.faq p { margin-top: 12px; font-size: 15px; max-width: 66ch; }

/* footer */
footer.site { background: var(--panel); border-top: 1px solid var(--line); }
.footer-grid { padding-top: 54px; padding-bottom: 34px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; font-size: 14px; font-weight: 500; }
.footer-col .kicker { color: #8a8378; margin-bottom: 2px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 8px; }

/* obfuscated email (FR39) */
.email-reveal { font-size: 15px; color: var(--accent); }

@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  section.sec { padding-top: 40px; padding-bottom: 40px; }
  h1 { font-size: 32px !important; }
  h2 { font-size: 24px !important; }
  p, h1, h2, h3, h4 { max-width: 100% !important; overflow-wrap: break-word; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns:170px 1fr 130px"],
  [style*="grid-template-columns:220px 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .artifact-pair { grid-template-columns: 1fr; }
  .hdrinner { justify-content: center; text-align: center; }
  nav.primary { justify-content: center; width: 100%; }
}
