/* Shared stylesheet for the static guide pages. Mirrors the app's
   monochrome Vercel theme tokens (frontend/src/index.css); keep the two
   in step if the theme ever changes. System fonts only, no JS. */
:root {
  --background: oklch(0.99 0 0);
  --foreground: oklch(0 0 0);
  --card: oklch(1 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.44 0 0);
  --border: oklch(0.92 0 0);
  --radius: 0.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
}

.masthead-inner {
  margin: 0 auto;
  max-width: 56rem;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  text-decoration: none;
}

.wordmark span { color: var(--muted-foreground); }

.cta {
  display: inline-block;
  border-radius: var(--radius);
  background: var(--foreground);
  color: var(--background);
  padding: 0.5rem 1rem;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.cta:hover { opacity: 0.85; }

.article {
  margin: 0 auto;
  max-width: 68ch;
  padding: 2.5rem 1.5rem 5rem;
}

.crumbs {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.crumbs a { color: var(--muted-foreground); }
.crumbs a:hover { color: var(--foreground); }

h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.updated {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0 0 1.75rem;
}

.updated a { color: var(--muted-foreground); }
.updated a:hover { color: var(--foreground); }

/* Interactive pages (the deadline calculator) */
.tool {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.09);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.tool label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin: 0.75rem 0 0.25rem;
}

.tool input[type="date"] {
  font: inherit;
  font-size: 16px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  width: 100%;
  max-width: 18rem;
}

.tool .hint {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0.25rem 0 0;
}

.tool button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  margin-top: 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--foreground);
  color: var(--background);
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.tool button:hover { opacity: 0.85; }

.tool .results { margin-top: 1.25rem; }

.tool .warn {
  border-left: 3px solid var(--foreground);
  padding-left: 0.75rem;
  margin: 1rem 0 0;
}

.lede {
  font-size: 18px;
  color: var(--muted-foreground);
  margin: 0 0 2rem;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p, li { color: var(--foreground); }

a { color: var(--foreground); text-underline-offset: 3px; }

ul, ol { padding-left: 1.4rem; }

li { margin: 0.35rem 0; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 15px;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

th { background: var(--muted); font-weight: 600; }

.callout {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.09);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
}

.callout p { margin: 0 0 0.75rem; }

.sources {
  font-size: 14px;
  color: var(--muted-foreground);
}

.sources a { color: var(--muted-foreground); }
.sources a:hover { color: var(--foreground); }

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  margin: 0 auto;
  max-width: 56rem;
  padding: 2rem 1.5rem 3rem;
}

.footer-nav {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .footer-nav { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-nav h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 0.75rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.footer-nav li { margin: 0.45rem 0; }

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

.footer-nav a:hover { color: var(--foreground); }

.fineprint {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Guide index: group headings above the h3 cards */
.group-h {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 3rem 0 0.5rem;
}

.group-h + h3 { margin-top: 1rem; }
