/* Thrive SOPs — ultra-minimal, content-first. System font, one column, light/dark. */
:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --accent: #0071e3;
  --sidebar: 300px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1d1f; --fg: #f5f5f7; --muted: #a1a1a6; --line: #333336; --accent: #2997ff; }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout: a slim nav rail + a single reading column. */
.layout { display: flex; min-height: 100vh; }
nav {
  width: var(--sidebar); flex: 0 0 var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 32px 20px 64px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
nav .brand { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; display: block; margin-bottom: 4px; }
nav .sub { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
nav input {
  width: 100%; padding: 8px 12px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--fg);
  font-size: 14px; outline: none;
}
nav input:focus { border-color: var(--accent); }
nav ul { list-style: none; margin: 0; padding: 0; }
nav li a {
  display: block; padding: 6px 10px; border-radius: 8px; color: var(--fg);
  font-size: 14px; line-height: 1.35;
}
nav li a:hover { background: var(--line); text-decoration: none; }
nav li a.active { background: var(--accent); color: #fff; }

main { flex: 1 1 auto; display: flex; justify-content: center; padding: 56px 32px 120px; }
article { width: 100%; max-width: 720px; }
article .eyebrow { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
article h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 600; }
article .lede { color: var(--muted); font-size: 19px; line-height: 1.5; margin: 0 0 36px; }
article h2 { font-size: 26px; letter-spacing: -0.01em; margin: 44px 0 14px; font-weight: 600; }
article h3 { font-size: 20px; margin: 32px 0 10px; font-weight: 600; }
article p, article li { font-size: 17px; }
article ul, article ol { padding-left: 22px; }
article li { margin: 4px 0; }
article code {
  font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--line); padding: 1px 6px; border-radius: 5px;
}
article pre { background: var(--line); padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
article pre code { background: none; padding: 0; }
article table { border-collapse: collapse; width: 100%; margin: 20px 0; font-size: 15px; }
article th, article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
article th { background: var(--line); font-weight: 600; }
article blockquote { margin: 18px 0; padding: 2px 18px; border-left: 3px solid var(--line); color: var(--muted); }
article hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* Home index cards */
.index-grid { display: grid; gap: 2px; }
.index-grid a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.index-grid a:hover { text-decoration: none; }
.index-grid .t { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.index-grid .d { color: var(--muted); font-size: 14px; margin-top: 3px; }

/* Department chips (sidebar) */
nav #depts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
nav #depts a.dept {
  display: inline-block; padding: 5px 10px; border-radius: 999px;
  background: var(--line); color: var(--fg); font-size: 12px; line-height: 1.3;
}
nav #depts a.dept:hover { text-decoration: none; background: var(--accent); color: #fff; }
nav #depts a.dept.active { background: var(--accent); color: #fff; }
nav li.dept-head {
  padding: 14px 10px 4px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
nav li.dept-head:first-child { padding-top: 2px; }

/* Home: overview callout + department cards */
.callout {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  margin: 0 0 28px; font-size: 15px; line-height: 1.5;
}
.callout a { font-weight: 500; white-space: nowrap; }
.dept-card { margin: 0 0 32px; }
.dept-card h3 {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; }
.tiles a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.tiles a:hover { text-decoration: none; }
.tiles a:hover .t { color: var(--accent); }
.tiles .t { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.tiles .d { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }

/* Overview page: same reading column as a skill */
article .body { font-size: 17px; }
article .body p { margin: 14px 0; }
article .body em { color: var(--muted); font-size: 14px; }

.state { color: var(--muted); padding: 8px 0; font-size: 15px; }

/* Phone */
@media (max-width: 760px) {
  :root { --sidebar: 100%; }
  .layout { flex-direction: column; }
  nav { position: static; height: auto; width: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  main { padding: 32px 16px 80px; }
  article h1 { font-size: 32px; }
}
