/* dctools.dev — styles extracted from the Claude Design source (design/dctools.dev.dc.html) */

/* ---------- tokens ---------- */
/* Colors resolve via light-dark(); browser floor: Chrome/Edge 123, Firefox 120,
   Safari 17.5. Manual toggle just forces color-scheme via [data-theme]. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f8f6, #0f1117);
  --surface: light-dark(#ffffff, #151823);
  --text: light-dark(#1e2433, #e6e8ee);
  --muted: light-dark(#5b6172, #9aa1b2);
  --faint: light-dark(#6a7083, #8890a3);
  --border: light-dark(#e0e6e1, #242938);
  --border-strong: light-dark(#cbd4cd, #323848);
  --accent: light-dark(#15803d, #4cc38a);
  /* accent for TEXT sitting on --accent-soft (AA-safe in both themes) */
  --accent-ink: light-dark(#146b35, #4cc38a);
  --accent-on: light-dark(#ffffff, #0c1512);
  --accent-soft: light-dark(#e7f3ea, #16211c);
  --green: light-dark(#16a34a, #34c26a);
  --code-bg: light-dark(#14161f, #0a0c12);
  --code-text: light-dark(#d7dae3, #cdd1dc);
  --code-border: light-dark(#14161f, #242938);
  /* terminal blocks are dark in both themes — fixed syntax colors */
  --code-dim: #7e8699;
  --code-cmd: #4cc38a;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-on); }

h1, h2, h3, blockquote, .problem-lead, .oss-lead {
  font-family: var(--font-serif);
}
.mono { font-family: var(--font-mono); }

.container { max-width: 1060px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 24px;
  top: -48px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 14px;
}
.skip-link:focus-visible { top: 12px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin: 0 0 14px;
}

/* ---------- header ---------- */
.site-header {
  padding-top: 26px;
  padding-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.brand-sub {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.glyph { width: 11px; height: 11px; background: var(--accent); display: inline-block; margin-top: 3px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 14px; }
.nav-link { color: var(--muted); white-space: nowrap; padding: 12px; margin: -12px; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.theme-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  padding: 14px;
  margin: -14px -14px -14px -2px;
  line-height: 1;
}
.theme-toggle:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    radial-gradient(900px 480px at 8% -12%, var(--accent-soft), transparent 68%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  background-position: center top;
}
.hero-inner {
  padding-top: 96px;
  padding-bottom: 88px;
  background: linear-gradient(to bottom, transparent, var(--bg) 82%);
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  max-width: 17ch;
  text-wrap: pretty;
}
.lede { font-size: 18px; color: var(--muted); max-width: 56ch; margin: 0 0 36px; text-wrap: pretty; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.terminal {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 16px 22px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--code-text);
  box-sizing: border-box;
  min-width: min(280px, 100%);
  max-width: 100%;
  overflow-x: auto;
}
.terminal > div { white-space: nowrap; }
.prompt { color: var(--code-dim); user-select: none; }
.hero-cta { display: flex; align-items: center; gap: 14px; font-size: 14.5px; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-on);
  padding: 11px 20px;
  border-radius: 7px;
  font-size: 14.5px;
  font-weight: 600;
}
.btn-primary:hover { color: var(--accent-on); text-decoration: none; filter: brightness(1.08); }
.link-quiet { color: var(--muted); }
.link-quiet:hover { color: var(--text); }

/* ---------- problem ---------- */
.problem { border-bottom: 1px solid var(--border); }
.problem-grid {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 48px;
  align-items: start;
}
.problem-lead { font-size: 23px; line-height: 1.45; margin: 0 0 16px; text-wrap: pretty; }
.problem-copy { color: var(--muted); margin: 0; max-width: 52ch; text-wrap: pretty; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
.compare-col { padding: 18px 20px; }
.compare-col-bad { border-right: 1px solid var(--border); }
.compare-col-good { background: var(--accent-soft); }
.compare-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 10px;
}
.compare-label-good { color: var(--accent-ink); }
.compare ul { margin: 0; padding: 0 0 0 16px; display: grid; gap: 7px; }
.compare-col-bad ul { color: var(--muted); }

/* ---------- what it saves ---------- */
.saves { border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.saves-grid {
  padding-top: 30px;
  padding-bottom: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px 40px;
}
.saves-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 6px;
}
.saves p { margin: 0; font-size: 14px; color: var(--muted); text-wrap: pretty; }

/* ---------- tools grid ---------- */
.tools { border-bottom: 1px solid var(--border); }
.tools-inner { padding-top: 72px; padding-bottom: 72px; }
.tools-inner > .eyebrow { margin-bottom: 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.tool-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 26px 22px;
  background: var(--surface);
  color: var(--text);
}
.tool-card:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); }
.tool-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.tool-name { font-family: var(--font-mono); font-size: 22px; font-weight: 600; margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-live { background: var(--accent-soft); }
.pill-dev { background: var(--bg); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-faint { background: var(--faint); }
.tool-fullname {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.tool-desc { margin: 0 0 18px; color: var(--muted); text-wrap: pretty; flex: 1; }
.tool-link { font-size: 14px; color: var(--accent); font-weight: 550; margin-top: auto; }
.tool-card-ghost {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.tool-card-ghost span { font-size: 13px; color: var(--faint); text-align: center; max-width: 30ch; }

/* ---------- section shells (dct / dcg / philosophy) ---------- */
.dct { border-bottom: 1px solid var(--border); }
.dcg { border-bottom: 1px solid var(--border); background: var(--surface); }
.philosophy { border-bottom: 1px solid var(--border); }
.section-inner { padding-top: 80px; padding-bottom: 80px; }
.section-title {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: pretty;
}
.dct .section-title { max-width: 24ch; }
.dcg .section-title { max-width: 26ch; }
.section-sub { color: var(--muted); max-width: 62ch; margin: 0 0 44px; text-wrap: pretty; }
.dcg .section-sub { margin-bottom: 40px; }

/* ---------- dct in depth ---------- */
.dct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px;
  align-items: start;
  margin-bottom: 52px;
}
.session-demo {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 10px;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--code-text);
  overflow-x: auto;
}
.cmd { color: var(--code-cmd); }
.dim { color: var(--code-dim); }
.session-rule { border-top: 1px solid #2a2f3f; margin: 10px 0; height: 0; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; }
.feature-list li {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  font-size: 14.5px;
}
.feature-list li:last-child { border-bottom: 1px solid var(--border); }
.feature-name { font-weight: 600; }
.feature-desc { color: var(--muted); }
.stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.shot { margin: 0; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}
.shot figcaption { font-size: 12.5px; color: var(--faint); margin-top: 10px; }
/* theme-aware screenshot swap (display can't use light-dark(), hence selectors) */
.shot img.shot-dark { display: none; }
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}

/* ---------- dcg teaser ---------- */
.dcg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 40px; align-items: start; }
.graph-demo {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 10px;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--code-text);
  overflow-x: auto;
}
.quotes { display: grid; gap: 26px; }
.quote { margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); font-size: 20px; line-height: 1.5; }
.dcg-note { font-size: 14px; color: var(--muted); }
.dcg-note .mono { font-size: 13px; }

/* ---------- philosophy ---------- */
.philosophy .eyebrow { margin-bottom: 32px; }
.tenet {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.tenet-last { border-bottom: 1px solid var(--border); }
.tenet h3 { font-size: 21px; font-weight: 500; margin: 0; }
.tenet p { margin: 0; color: var(--muted); max-width: 60ch; text-wrap: pretty; }

/* ---------- open source ---------- */
.oss { border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.oss-inner {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px 48px;
  align-items: start;
}
.oss .eyebrow { color: var(--accent-ink); }
.oss-lead { font-size: 23px; line-height: 1.45; margin: 0; text-wrap: pretty; }
.oss-copy { margin: 0 0 14px; color: var(--muted); max-width: 60ch; text-wrap: pretty; }
.oss-link { font-size: 14px; font-weight: 550; color: var(--accent-ink); }

/* ---------- footer ---------- */
.site-footer {
  padding-top: 36px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .glyph { width: 10px; height: 10px; margin-top: 0; }
.footer-links { display: flex; align-items: center; gap: 22px; }
.footer-links a { padding: 12px 8px; margin: -12px -8px; }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .tenet { grid-template-columns: 1fr; gap: 8px; }
  .compare { grid-template-columns: 1fr; }
  .compare-col-bad { border-right: none; border-bottom: 1px solid var(--border); }
  .feature-list li { grid-template-columns: 1fr; gap: 4px; }
}
