/* etfl design system — design_handoff_etfl_blog/README.md, recreated to spec.
   Two fixed brand accents; light/dark palettes; flat ruled layout: no radius,
   no shadows, 1px dividers only. */

:root {
  --accent-primary: #0000ff;
  /* the brand gold (#efbf04) is 1.66:1 against the light background — dark
     mode gets the true gold, light mode a deepened one that passes 4.5:1 */
  --accent-secondary: #8a6d00;
  /* blue for TEXT on the current background (pure #0000ff is unreadable on
     dark); underlines/rules keep --accent-primary in both modes */
  --accent-primary-soft: #0000ff;
  /* theme toggle shows the CURRENT mode */
  --icon-sun: block;
  --icon-moon: none;

  --bg: #fafaf8;
  --text: #161616;
  --body-text: #1e1e1c;
  --muted: #8a8a86;
  --muted-text: #4a4a46;
  --divider: rgba(22, 22, 22, 0.12);
  --divider-light: rgba(22, 22, 22, 0.08);
  --divider-faint: rgba(22, 22, 22, 0.1);
  --footer-text: #a3a39e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-secondary: #efbf04;
    --accent-primary-soft: #6e7fff;
    --icon-sun: none;
    --icon-moon: block;
    --bg: #131313;
    --text: #f3f3f1;
    --body-text: #e6e6e3;
    --muted: #8f8f8a;
    --muted-text: #b7b7b2;
    --divider: rgba(255, 255, 255, 0.14);
    --divider-light: rgba(255, 255, 255, 0.1);
    --divider-faint: rgba(255, 255, 255, 0.12);
    --footer-text: #6f6f6a;
  }
}

:root[data-theme="light"] {
  --accent-secondary: #8a6d00;
  --accent-primary-soft: #0000ff;
  --icon-sun: block;
  --icon-moon: none;
  --bg: #fafaf8;
  --text: #161616;
  --body-text: #1e1e1c;
  --muted: #8a8a86;
  --muted-text: #4a4a46;
  --divider: rgba(22, 22, 22, 0.12);
  --divider-light: rgba(22, 22, 22, 0.08);
  --divider-faint: rgba(22, 22, 22, 0.1);
  --footer-text: #a3a39e;
}

:root[data-theme="dark"] {
  --accent-secondary: #efbf04;
  --accent-primary-soft: #6e7fff;
  --icon-sun: none;
  --icon-moon: block;
  --bg: #131313;
  --text: #f3f3f1;
  --body-text: #e6e6e3;
  --muted: #8f8f8a;
  --muted-text: #b7b7b2;
  --divider: rgba(255, 255, 255, 0.14);
  --divider-light: rgba(255, 255, 255, 0.1);
  --divider-faint: rgba(255, 255, 255, 0.12);
  --footer-text: #6f6f6a;
}

* { box-sizing: border-box; }

/* keyboard focus: same thin square language as everything else */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible, th:focus-visible {
  outline: 1px solid var(--accent-primary-soft);
  outline-offset: 3px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s, color 0.15s;
}

a { color: inherit; text-decoration: none; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 100px;
}

/* header */
.wordmark-link { display: block; }
.wordmark-svg {
  display: block;
  height: 30px;
  width: auto;
  color: var(--text);
  margin-left: -4px; /* optically align the 'e' with the column edge (x=16 in the viewBox) */
}
.subtitle { font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: 0.02em; }

/* site nav — below the header rule, per the design */
.site-nav {
  display: flex;
  gap: 24px;
  align-items: baseline;
  margin-top: 24px;
  flex-wrap: wrap;
}
.nav-link {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent-primary); }
.nav-toggle { margin-left: auto; align-self: center; padding: 0; }
.nav-toggle svg { display: block; width: 15px; height: 15px; }
.nav-toggle .icon-sun { display: var(--icon-sun); }
.nav-toggle .icon-moon { display: var(--icon-moon); }

/* rules (dividers) */
.rule { height: 1px; }
.rule-header { background: var(--divider); margin: 32px 0 0; }
.rule-post { background: var(--divider); margin-bottom: 40px; }
.rule-footer { background: var(--divider-faint); margin-top: 88px; }

/* footer */
.footer {
  font-size: 11px;
  color: var(--footer-text);
  text-align: center;
  margin-top: 24px;
  letter-spacing: 0.04em;
}

/* filter tabs */
.tabs { display: flex; gap: 24px; margin: 32px 0 56px; flex-wrap: wrap; }
.tab {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent-primary); }

/* archive heading (category/tag) */
.archive-heading { font-size: 13px; color: var(--muted); margin: 32px 0 24px; }

/* feed rows */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--divider-light);
  cursor: pointer;
}
.type-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-secondary);
  margin-bottom: 10px;
}
.post-row .title {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.post-row:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-row .meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.post-row .excerpt { font-size: 15px; line-height: 1.55; color: var(--muted-text); }

/* post detail */
.post-view { margin-top: 44px; }
.post-view .post-title {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  margin: 14px 0 16px;
  color: var(--text);
}
.post-view .post-meta { font-size: 13px; color: var(--muted); margin-bottom: 44px; }
.post-view .post-meta a:hover { color: var(--text); }

/* post body — server-rendered markdown (+ raw WP tables) */
.post-body { font-size: 16px; line-height: 1.75; color: var(--body-text); }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 22px; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5 {
  color: var(--text);
  line-height: 1.3;
  margin: 36px 0 14px;
}
.post-body h1, .post-body h2 { font-size: 22px; font-weight: 600; }
.post-body h3 { font-size: 19px; font-weight: 600; }
.post-body h4 { font-size: 17px; font-weight: 600; }
.post-body h5 { font-size: 15px; font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 6px 0 22px;
}
.post-body figure { margin: 0 0 22px; }
.post-body figure img { margin: 0; }
.post-body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
}
.post-body a:hover { text-decoration-color: var(--accent-primary); }
.post-body em { color: var(--muted-text); }

/* tables: neutralize WP-era inline backgrounds, restyle in the design language */
.post-body table {
  background: none !important;
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 22px;
}
.post-body th, .post-body td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--divider-light);
  text-align: left;
  vertical-align: top;
}
.post-body thead th { border-bottom: 1px solid var(--divider); font-weight: 600; }
.post-body .has-text-align-center { text-align: center; }

/* a wide table scrolls sideways in place — keep a thin scrollbar visible as
   the affordance (macOS hides the default one) */
.post-body table { scrollbar-width: thin; scrollbar-color: var(--divider) transparent; }
.post-body table::-webkit-scrollbar { height: 4px; }
.post-body table::-webkit-scrollbar-thumb { background: var(--divider); }
.post-body table::-webkit-scrollbar-track { background: transparent; }

.post-body blockquote {
  margin: 0 0 22px;
  padding-left: 18px;
  border-left: 2px solid var(--divider);
  color: var(--muted-text);
}

/* power rankings */
.pr-delta { font-size: 11px; margin-left: 4px; }
.pr-up { color: var(--accent-secondary); }
.pr-down { color: var(--accent-primary-soft); }
.pr-archive-heading {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 56px 0 0;
}
#pr-table th { cursor: pointer; white-space: nowrap; }
#pr-table td { white-space: nowrap; }

/* hall of records */
.hof-category { margin-bottom: 40px; }
.hof-cat-name {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-secondary);
  margin-bottom: 12px;
}
.hof-tiers, .hof-champs {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body-text);
}
.hof-champs { list-style: none; padding-left: 0; }
.hof-section-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text);
  border-top: 1px solid var(--divider);
  padding-top: 32px;
  margin: 48px 0 28px;
}
.hof-tiers li, .hof-champs li { margin-bottom: 6px; }
.hof-context { color: var(--muted); }
.hof-season { color: var(--muted); margin-right: 6px; }
.hof-team { color: var(--muted); }
.hof-tally { font-size: 13px; color: var(--muted-text); margin-bottom: 6px; }
.hof-note { font-size: 12px; color: var(--muted); margin: 10px 0 14px; }

/* admin drafts */
.admin-row { cursor: default; }
.admin-actions { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.admin-btn {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted-text);
  background: none;
  border: 1px solid var(--divider);
  padding: 6px 14px;
  cursor: pointer;
}
.admin-btn:hover { color: var(--text); border-color: var(--text); }
.admin-publish:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.admin-discard:hover { color: #b00020; border-color: #b00020; }
.admin-back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.admin-back:hover { color: var(--text); }
.admin-edit-form { margin-top: 14px; }
.admin-title-input {
  width: 100%;
  font-family: inherit;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid var(--divider);
  padding: 4px 0 8px;
  outline: none;
}
.admin-title-input:focus { border-bottom-color: var(--accent-primary); }
.admin-body-input {
  width: 100%;
  margin-top: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--body-text);
  background: none;
  border: 1px solid var(--divider);
  padding: 12px;
  outline: none;
  resize: vertical;
}
.admin-body-input:focus { border-color: var(--accent-primary); }

/* admin analytics */
.an-active { color: var(--text); }
.an-summary { display: flex; gap: 48px; margin: 8px 0 40px; flex-wrap: wrap; }
.an-stat { display: flex; flex-direction: column; gap: 4px; }
.an-num { font-size: 34px; font-weight: 600; color: var(--text); line-height: 1; }
.an-label { font-size: 11px; letter-spacing: 0.14em; color: var(--muted); text-transform: lowercase; }
.an-empty { font-size: 15px; color: var(--muted); }
.post-body h3 + .an-table { margin-top: 0; }
.an-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 12px; }
.an-table th, .an-table td {
  text-align: left;
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--divider-light);
  white-space: nowrap;
}
.an-table th { font-weight: 600; color: var(--muted); font-size: 12px; }
.an-table td:not(:first-child), .an-table th:not(:first-child) { text-align: right; }
.an-table td a { text-decoration: none; color: var(--text); }
.an-table td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.an-barcell { width: 40%; padding-right: 0; }
.an-bar { height: 8px; background: var(--accent-primary); min-width: 1px; }

/* ask etfl */
.ask-form { display: flex; gap: 16px; align-items: baseline; margin-bottom: 40px; }
.ask-input {
  flex: 1;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid var(--divider);
  padding: 6px 0;
  outline: none;
  transition: border-color 0.15s;
}
.ask-input:focus { border-bottom-color: var(--accent-primary); }
.ask-input::placeholder { color: var(--muted); }
.ask-submit {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
}
.ask-submit:hover { color: var(--text); }
.ask-status { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.ask-answer { font-size: 16px; line-height: 1.75; color: var(--body-text); white-space: pre-wrap; }
.ask-sql { margin-top: 22px; }
.ask-sql summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.ask-sql pre {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-text);
  overflow-x: auto;
  margin: 12px 0 0;
}
.ask-recent { margin-top: 64px; }
.rule-recent { background: var(--divider); margin-bottom: 28px; }
.ask-recent-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ask-recent-list { list-style: none; margin: 0; padding: 0; }
.ask-recent-item { padding: 20px 0; }
.ask-recent-item + .ask-recent-item { border-top: 1px solid var(--divider-light); }
.ask-recent-q { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ask-recent-a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-text);
  white-space: pre-wrap;
}
