/* raggedy-edge — field-journal theme.
   Palette tokens are GENERATED at build time from the shared PALETTES
   dict (tools/ghost-reskin/build_palettes.py) — one source of truth for
   injection CSS, site art, and this theme. Do not hand-edit the block
   between the PALETTES markers; run tools/build_theme.py. */

/* generated by tools/build_theme.py — do not hand-edit */
body.pal-navy{--paper:#f7f9fb;--ink:#16202e;--mut:#5a6a7c;--hair:#dfe6ee;--accent:#1e4e8c;--rule:#2563ab;--btn-fg:#ffffff}
body.pal-navy.scheme-dark{--paper:#0e1621;--ink:#dfe7f1;--mut:#8fa1b5;--hair:#263647;--accent:#7fb3ea;--rule:#2563ab;--btn-fg:#0e1621}
@media (prefers-color-scheme: dark){body.pal-navy.scheme-auto{--paper:#0e1621;--ink:#dfe7f1;--mut:#8fa1b5;--hair:#263647;--accent:#7fb3ea;--rule:#2563ab;--btn-fg:#0e1621}}
body.pal-sand{--paper:#faf7f0;--ink:#2a2318;--mut:#776b55;--hair:#e9e1d0;--accent:#8a6410;--rule:#c9a437;--btn-fg:#ffffff}
body.pal-sand.scheme-dark{--paper:#171310;--ink:#ede5d4;--mut:#a2957c;--hair:#332b1f;--accent:#d4a94c;--rule:#c9a437;--btn-fg:#171310}
@media (prefers-color-scheme: dark){body.pal-sand.scheme-auto{--paper:#171310;--ink:#ede5d4;--mut:#a2957c;--hair:#332b1f;--accent:#d4a94c;--rule:#c9a437;--btn-fg:#171310}}
body.pal-forest{--paper:#f6f9f6;--ink:#1a2a20;--mut:#5c7062;--hair:#dde8de;--accent:#1e6b45;--rule:#2e8b57;--btn-fg:#ffffff}
body.pal-forest.scheme-dark{--paper:#0f1913;--ink:#e0ebe2;--mut:#90a596;--hair:#263c2e;--accent:#6fce9e;--rule:#2e8b57;--btn-fg:#0f1913}
@media (prefers-color-scheme: dark){body.pal-forest.scheme-auto{--paper:#0f1913;--ink:#e0ebe2;--mut:#90a596;--hair:#263c2e;--accent:#6fce9e;--rule:#2e8b57;--btn-fg:#0f1913}}

/* ---- base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 19px/1.65 Georgia, 'Times New Roman', serif;
  overflow-x: clip;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: underline;
  text-decoration-color: var(--hair); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
.mono, .article-meta, .feed-date, .form-note, .foot-copy, .foot-nav,
.cover-kicker, .feed-title, figcaption {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.btn {
  display: inline-block; background: var(--accent); color: var(--btn-fg);
  border: 0; border-radius: 4px; padding: 12px 20px; cursor: pointer;
  font: 600 14px/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .04em; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

/* ---- masthead ------------------------------------------------------ */
.site-head { background: var(--paper); border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--hair); }
.head-in { max-width: 1120px; display: flex; align-items: center;
  gap: 1.4rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--ink); }
.mark { width: 30px; height: 30px; color: var(--ink); flex: 0 0 auto; }
.brand-name { font: 700 13px/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .2em; text-transform: uppercase; }
.site-nav { margin-left: auto; }
.site-nav .nav { list-style: none; display: flex; gap: 1.2rem;
  margin: 0; padding: 0; }
.site-nav .nav a { font: 600 11px/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mut);
  text-decoration: none; }
.site-nav .nav a:hover { color: var(--accent); }
.head-btn { padding: 10px 16px; }
.head-link { font: 600 11px/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mut);
  text-decoration: none; }

/* band masthead variant */
.mast-band .site-head { background: var(--accent); border-top: 0;
  border-bottom: 0; }
.mast-band .brand, .mast-band .mark { color: #fff; }
.mast-band .site-nav .nav a { color: rgba(255,255,255,.78); }
.mast-band .site-nav .nav a:hover { color: #fff; }
.mast-band .head-link { color: rgba(255,255,255,.85); }
.mast-band .head-btn { background: #fff; color: var(--accent); }
.mast-band .mark path[stroke="var(--accent)"] { stroke: #fff; }

/* ---- homepage cover ------------------------------------------------ */
.cover { padding: 4.2rem 0 3rem; border-bottom: 1px solid var(--hair); }
.cover-video { margin: 0 0 2rem; }
.cover-video video { width: 100%; height: auto; display: block;
  border: 1px solid var(--hair); border-radius: 5px; }
.cover-kicker { font-size: 11px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem; }
.cover-title { font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.15;
  letter-spacing: -.015em; font-weight: 600; margin: 0 0 1.6rem; }
.cover-form { display: flex; gap: 10px; max-width: 480px; }
.cover-email { flex: 1; border: 1px solid var(--hair);
  background: var(--paper); color: var(--ink); border-radius: 4px;
  padding: 11px 14px;
  font: 15px ui-monospace, 'SF Mono', Menlo, monospace; }
.cover-email:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form-note { font-size: 12px; color: var(--mut); margin: .7rem 0 0; }
.note-success, .note-error { display: none; }
.success .note-idle, .error .note-idle { display: none; }
.success .note-success { display: inline; color: var(--accent); }
.error .note-error { display: inline; }

/* ---- feed: the issue log ------------------------------------------- */
.feed { padding: 2.4rem 0 4rem; }
.feed-title { font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 1.2rem; }
.feed-row { display: flex; gap: 1.6rem; padding: 1.1rem 0;
  border-bottom: 1px solid var(--hair); align-items: baseline; }
.feed-date { flex: 0 0 110px; font-size: 12px; color: var(--mut); }
.feed-main { min-width: 0; }
.feed-post-title { margin: 0 0 .3rem; font-size: 1.2rem; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.3; }
.feed-post-title a { color: var(--ink); text-decoration: none; }
.feed-post-title a:hover { color: var(--accent); }
.feed-excerpt { margin: 0; font-size: .92rem; line-height: 1.55;
  color: var(--mut); }
@media (max-width: 600px) {
  .feed-row { flex-direction: column; gap: .3rem; }
  .feed-date { flex: none; }
}
.pagination { display: flex; justify-content: space-between;
  padding: 1.6rem 0; font: 600 12px/1 ui-monospace, 'SF Mono', Menlo,
  monospace; letter-spacing: .1em; text-transform: uppercase; }
.pagination .page-number { color: var(--mut); }

/* ---- article ------------------------------------------------------- */
.article { padding: 3.4rem 0 4rem; }
.article-head { margin-bottom: 2rem; }
.article-meta { font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mut); margin: 0 0 .7rem; }
.article-meta .sep { margin: 0 .35em; }
.article-tag { color: var(--mut); }
.article-title { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.12;
  letter-spacing: -.02em; font-weight: 600; margin: 0 0 .7rem; }
.article-excerpt { font-size: 1.15rem; line-height: 1.5; color: var(--mut);
  margin: 0; }
.article-feature { margin: 0 0 2rem; }
.article-feature img { width: 100%; height: auto; display: block;
  border-radius: 4px; }

/* ---- post content -------------------------------------------------- */
.gh-content > * + * { margin-top: 1.15em; }
.gh-content h2 { font-size: 1.45rem; letter-spacing: -.015em;
  font-weight: 600; margin-top: 2.1em; border-top: 1px solid var(--hair);
  padding-top: 1.3em; }
.gh-content h3 { font-size: 1.12rem; font-weight: 600; margin-top: 1.8em; }
.gh-content blockquote { border-left: 3px solid var(--rule);
  margin: 1.6em 0; padding: .1em 0 .1em 1.1em; font-style: normal; }
.gh-content hr { border: 0; height: 1px; background: var(--hair);
  width: 120px; margin: 2.4em auto; }
.gh-content img { max-width: 100%; height: auto; }
.gh-content figcaption { font-size: 12px; line-height: 1.6;
  color: var(--mut); text-align: center; margin-top: .6rem; }
.gh-content pre { background: var(--hair); border-radius: 4px;
  padding: 1em; overflow-x: auto; font-size: .82em; }
.gh-content table { border-collapse: collapse; width: 100%;
  font: 14px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; }
.gh-content table td, .gh-content table th {
  border: 0; border-bottom: 1px solid var(--hair); padding: 6px 10px 6px 0;
  text-align: left; vertical-align: top; }
/* kg card widths + let full-bleed HTML cards breathe */
.kg-width-wide { position: relative; width: min(1120px, 94vw);
  left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%;
  transform: translateX(-50%); }
main, .article, .gh-content { overflow: visible; }

/* ---- footer -------------------------------------------------------- */
.site-foot { border-top: 3px solid var(--rule); margin-top: 2rem; }
.foot-in { max-width: 1120px; display: flex; gap: 1.5rem; flex-wrap: wrap;
  justify-content: space-between; padding-top: 1.2rem;
  padding-bottom: 2.6rem; font-size: 11.5px; color: var(--mut); }
.foot-nav .nav { list-style: none; display: flex; gap: 1.1rem; margin: 0;
  padding: 0; }
.foot-nav a { color: var(--mut); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }

/* ---- pitch/join CTA furniture follows the theme palette ------------ */
/* (their inline colours remain as the email fallback) */
.gh-content .kg-btn { background: var(--accent) !important;
  color: var(--btn-fg) !important; }
.gh-content .kg-btn2 { border-color: var(--accent) !important;
  color: var(--accent) !important; }
.gh-content .kg-cta { border-left-color: var(--accent) !important; }

/* ---- pitch-post layout cards (kg-*) --------------------------------
   These rules deliberately live in the THEME, not in the posts: email
   clients that honour <style> (Apple Mail) were applying the column
   grid inside a 600px email container. Web-only enhancement: in email
   the same divs are plain blocks and linearize cleanly. */
.kg-split { display: grid; grid-template-columns: minmax(0,1fr)
  minmax(0,440px); gap: 28px; align-items: start;
  width: min(1120px, 94vw); position: relative; left: 50%;
  transform: translateX(-50%); margin: 1.4em 0; }
.kg-split p { margin: 0 0 1em; font-size: 16px; }
.kg-split figure { margin: 0; }
.kg-split img { width: 100%; height: auto; display: block;
  border: 1px solid var(--hair); border-radius: 4px; }
.kg-split figcaption { font-size: 13px; color: var(--mut);
  margin-top: 8px; }
.kg-tiers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px; width: min(960px, 94vw); position: relative; left: 50%;
  transform: translateX(-50%); }
.kg-strip { display: flex; gap: 14px; overflow-x: auto;
  width: min(1120px, 94vw); position: relative; left: 50%;
  transform: translateX(-50%); padding: 2px 0 10px; }
.kg-strip figure { flex: 0 0 auto; margin: 0; }
.kg-strip img { height: min(46vh, 360px); width: auto; display: block;
  border-radius: 3px; }
.kg-strip figcaption { font-size: 12px; color: var(--mut);
  margin-top: 6px; max-width: 360px; }
.kg-wmap { width: min(1120px, 94vw); position: relative; left: 50%;
  transform: translateX(-50%); margin: 1.5em 0; }
/* live SVG vs PNG fallback: the SVG wrapper ships inline-hidden
   (style="display:none") so EVERY email client shows only the PNG;
   the theme reveals the live version on the web */
.gh-content .kg-live { display: block !important; }
.gh-content .kg-wmap .kg-fb, .gh-content .kg-map .kg-fb { display: none; }
.kg-wmap svg, .kg-map svg { width: 100%; height: auto; display: block; }
.kg-zoom { overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--hair); border-radius: 4px; }
.kg-zoom svg { transition: transform .18s ease; }
/* district-map internals (classed shapes expect the host to paint) */
.kg-map .sea { fill: #bcd4e6; }
.kg-map .landmass { fill: #f1f3f4; stroke: #c6cfd4; stroke-width: .9; }
.kg-map .water { fill: #bcd4e6; stroke: none; }
.kg-map .adm { fill: none; stroke: #c6cfd4; stroke-width: .9; }
.kg-map .adm.t5 { fill: #c2401f; fill-opacity: .44; stroke: #c2401f;
  stroke-width: 1; }
.kg-map .adm.t4 { fill: #9c7426; fill-opacity: .36; stroke: #9c7426;
  stroke-width: 1; }
.kg-map .adm.t3 { fill: #9c7426; fill-opacity: .2; stroke: #9c7426; }
.kg-map .road { fill: none; stroke: #16222b; stroke-width: 1.4;
  opacity: .55; stroke-linejoin: round; stroke-linecap: round; }
.kg-map .pl { fill: #f1f3f4; stroke: #16222b; stroke-width: 1.6; }
.kg-map .pl.base { fill: #16222b; }
.kg-map .pl-lbl { font: 11.5px ui-monospace, Menlo, monospace;
  fill: #16222b; }
@media (max-width: 900px) {
  .kg-split, .kg-tiers, .kg-strip, .kg-wmap { width: 100%; left: auto;
    transform: none; }
  .kg-split, .kg-tiers { display: block; }
  .kg-tiers > div { margin: 0 0 14px; }
}
/* interaction hints (hover/scroll) are web-only: inline-hidden in the
   post so email never claims affordances it lacks */
.gh-content .kg-webonly { display: inline !important; }
.gh-content .kg-webonly-block { display: block !important;
  font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--mut); margin: 0 0 8px; }
