/* Doctoral Edge Services: styles shared by every page.
   Colours are tokens: light values first, dark values follow the visitor's device setting.
   To change the brand colour, edit --accent (light) and --accent (dark) below. */

:root {
  --bg: #F3F1F2; --surface: #FFFFFF; --surface-2: #F8F6F7;
  --ink: #1F1A1E; --ink-2: #4F474D; --muted: #675E64;
  --line: #E3DDE1; --line-strong: #CBC2C8;
  --accent: #8A1F3B; --accent-ink: #FFFFFF; --accent-soft: #F7E9EE;
  --gold: #8F6B22; --gold-ink: #7A5A1B;
  --good: #1D7547; --good-soft: #E5F3EA; --warn: #8A5700; --warn-soft: #FBF0DC; --bad: #B42318; --bad-soft: #FCEBE9;
  --next-ink: #6B4F12; --next-soft: #F5EDDB; --plan-ink: #574F55; --plan-soft: #EFEBED;
  --desk: #E9E5E7; --paper: #FFFFFF; --paper-ink: #151215; --paper-line: #CFC8CC; --paper-muted: #5C565A;
  --footer-bg: #1F1A1E; --footer-ink: #F1ECEF; --footer-muted: #BDB3B9;
  --shadow: 0 1px 2px rgba(31, 26, 30, .06), 0 10px 28px rgba(31, 26, 30, .08);
  --shadow-lg: 0 1px 2px rgba(31, 26, 30, .06), 0 18px 40px rgba(31, 26, 30, .10);
  --f-display: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141113; --surface: #1C181B; --surface-2: #231E22;
    --ink: #EEE7EB; --ink-2: #CFC6CC; --muted: #ABA0A7;
    --line: #352E33; --line-strong: #4D4449;
    --accent: #E88BA5; --accent-ink: #26111B; --accent-soft: #3B202B;
    --gold: #D9B66C; --gold-ink: #D9B66C;
    --good: #6FCB98; --good-soft: #15301F; --warn: #E8B65E; --warn-soft: #33270F; --bad: #F48A7E; --bad-soft: #3B1A17;
    --next-ink: #E8C77A; --next-soft: #33270F; --plan-ink: #C9BFC5; --plan-soft: #2A2428;
    --desk: #0F0D0E; --paper: #FBFAF7; --paper-ink: #151215; --paper-line: #CFC8CC; --paper-muted: #5C565A;
    --footer-bg: #0C0A0B; --footer-ink: #EEE7EB; --footer-muted: #ABA0A7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .4);
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 16px; line-height: 1.55;
}
body > main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container {
  width: 100%; max-width: var(--container, 1200px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; flex: none; background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1;
}
.brand-mark::before { content: "D"; } /* the first letter of the site name */
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 21px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; padding-block: 8px; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.header-cta { margin-left: auto; }
@media (max-width: 760px) {
  .site-nav { order: 3; flex-basis: 100%; gap: 0 18px; }
}
@media (max-width: 560px) {
  .header-cta { display: none; } /* the same button is the first thing on the page below */
}

/* ---------- buttons, chips, labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn-md { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.btn-lg { min-height: 52px; padding: 0 24px; border-radius: 12px; font-size: 17px; }
.btn.primary.btn-md, .btn.primary.btn-lg { font-weight: 600; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.chip { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.chip.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 500; }

/* ---------- home: hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: 64px 56px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: grid; gap: 20px; }
.hero h1 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.01em; }
.lead { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.small-print { margin: 0; font-size: 14px; color: var(--muted); }
.hero-visual { flex: 1 1 400px; min-width: 0; }
.hero-card {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 22px; display: grid; gap: 14px;
}
.hero-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.hero-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.hero-num { font-family: var(--f-display); font-weight: 600; font-size: clamp(54px, 7vw, 72px); line-height: 1; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.hero-unit { font-size: 18px; }
.hero-line { margin: 0; color: var(--muted); font-size: 15px; }
.file-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.file-sheet {
  width: 52px; height: 70px; flex: none; background: var(--paper); border: 1px solid var(--paper-line); border-radius: 3px;
  padding: 8px 7px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 2px 6px rgba(31, 26, 30, .08);
}
.file-sheet span { display: block; height: 3px; border-radius: 2px; background: var(--paper-line); }
.file-sheet span:first-child { height: 4px; width: 70%; background: var(--paper-ink); }
.file-sheet span:nth-child(3) { width: 85%; } .file-sheet span:nth-child(4) { width: 92%; }
.file-sheet span:nth-child(5) { width: 60%; background: #8A1F3B; } .file-sheet span:nth-child(6) { width: 80%; }
.file-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.file-meta { font-size: 13px; color: var(--muted); }

/* ---------- home: sections ---------- */
.section { padding-block: 64px; }
.section-tight { padding-top: 24px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; max-width: 700px; margin-bottom: 28px; }
.section-head h2, .section h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; }
.section-head p { margin: 0; color: var(--ink-2); font-size: 17px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tool-card.is-live { border: 2px solid var(--accent); padding: 21px; }
.tool-card h3 { margin: 0; font-size: 19px; font-weight: 600; }
.tool-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.tool-card.is-live .tool-icon { background: var(--accent-soft); color: var(--accent); }
.tool-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-link { margin-top: auto; padding-top: 4px; font-weight: 600; font-size: 15px; }
.tool-note { font-size: 13.5px; color: var(--muted); }
.status { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status.live { background: var(--good-soft); color: var(--good); }
.status.next { background: var(--next-soft); color: var(--next-ink); }
.status.planned { background: var(--plan-soft); color: var(--plan-ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 28px; }
.steps li { display: grid; gap: 10px; align-content: start; }
.step-num { font-family: var(--f-display); font-weight: 600; font-size: 44px; line-height: 1; color: var(--accent); }
.steps h3 { margin: 0; font-size: 19px; font-weight: 600; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 24px; }
.point { display: flex; gap: 12px; align-items: flex-start; }
.point svg { flex: none; width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.point h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.point p { margin: 0; color: var(--ink-2); font-size: 15px; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding-block: 14px; list-style-position: outside; }
.faq details[open] summary { padding-bottom: 6px; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

/* ---------- legal and info pages ---------- */
.prose { max-width: 760px; padding-block: 48px 72px; }
.prose h1 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; }
.prose .updated { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.prose h2 { margin: 32px 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.25; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.prose strong { color: var(--ink); }
.contact-list { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 10px 24px; margin: 0 0 12px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 520px) { .contact-list { grid-template-columns: minmax(0, 1fr); gap: 2px; } .contact-list dd { margin-bottom: 10px; } }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 16px 0; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; padding-block: 40px 32px; }
.footer-about { display: grid; gap: 8px; max-width: 520px; }
.footer-brand { font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.footer-about p { margin: 0; font-size: 14px; color: var(--footer-muted); }
.footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 24px; font-size: 14px; }
.footer-links a { color: var(--footer-ink); }
.copyright { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--footer-muted); }

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