/* ---------------------------------------------------------------------------
   Shared stylesheet. Identical on every site; the brand colors are injected
   as --brand / --brand-dark / --accent from site.php.

   This file is the STRUCTURE. Each site's personality -- fonts, hero
   treatment, textures, motifs -- lives in its own assets/css/theme.css,
   which ships from sites/<domain>/ and loads after this file.
   Prefer editing a theme.css over editing this file.
   --------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --line: #e4e4e7;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --radius: 10px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;

  /* Theme hooks. A theme.css overrides these rather than restating rules. */
  --brand-contrast: #fff;          /* text that sits on --brand */
  --hero-bg: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  --hero-ink: #fff;
  --header-bg: var(--bg);
  --footer-bg: var(--brand-dark);
  --logo-height: 44px;
  --head-transform: none;
  --head-spacing: normal;
  --head-weight: 700;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em;
  font-weight: var(--head-weight);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
}
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p, ul, ol { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 20px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* ---- Header ------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--header-bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; }
.brand-logo { max-height: var(--logo-height); width: auto; }

.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--brand); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
              background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 10px 0; }
  .header-inner { position: relative; }
}

/* ---- Hero and bands ----------------------------------------------------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink); padding: 84px 20px; text-align: center;
  position: relative; overflow: hidden;
}
.hero h1 { margin-bottom: .3em; }
.hero > .wrap { position: relative; z-index: 1; }
.lede { font-size: 1.2rem; opacity: .95; max-width: 46ch; margin-inline: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.band { background: var(--bg-soft); padding: 56px 20px; text-align: center; border-top: 1px solid var(--line); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--brand); color: var(--brand-contrast); text-decoration: none;
  padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: .98rem;
  border: 2px solid var(--brand); transition: .15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-contrast); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-light { background: var(--brand); }

/* ---- Cards -------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg); }
.card h2 { font-size: 1.25rem; }
.card p:last-child { margin-bottom: 0; }

.section-title { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 4px; }

/* ---- Prose (about pages, blog posts) ------------------------------------ */
.prose { max-width: 72ch; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose blockquote {
  margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
}
.prose pre {
  background: #1e1e24; color: #eaeaea; padding: 16px; border-radius: var(--radius);
  overflow-x: auto; font-size: .9rem;
}
.prose code { background: var(--bg-soft); padding: 2px 5px; border-radius: 4px; font-size: .92em; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* ---- Blog --------------------------------------------------------------- */
.post-list { display: grid; gap: 36px; }
.post-item { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.post-item:last-child { border-bottom: 0; }
.post-item h2, .post-item h3 { margin-bottom: .2em; }
.post-item a { text-decoration: none; }
.post-item a:hover { text-decoration: underline; }
.post-thumb { border-radius: var(--radius); margin-bottom: 14px; }
.post-hero { border-radius: var(--radius); margin: 1.2em 0 2em; width: 100%; }
.meta { color: var(--ink-soft); font-size: .9rem; }
.draft { background: var(--accent); color: #1a1a1a; font-size: .7rem; padding: 2px 7px;
         border-radius: 4px; vertical-align: middle; text-transform: uppercase; letter-spacing: .05em; }
.tags { margin-top: 2em; }
.tag { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line);
       border-radius: 999px; padding: 3px 12px; font-size: .82rem; margin-right: 6px; color: var(--ink-soft); }

/* ---- Forms -------------------------------------------------------------- */
.gform { margin: 2em 0; }
.gform iframe { width: 100%; border: 0; }
.notice { background: #fff8e1; border: 1px solid var(--accent); padding: 14px 18px; border-radius: var(--radius); }
/* Honeypot (guard_form_stamp() / lt_guard_fields()): parked off-screen, never
   display:none (some bots skip those). Shared here so every site hides it. */
.hp-wrap { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,.85); margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-block: 44px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .35em; font-size: .95rem; }
.footer-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: #fff; }
.social { list-style: none; margin: 0 0 10px; padding: 0; display: flex; gap: 16px; }
/* Privacy / your-data, same shape as .social but quieter: these are the links
   people go looking for deliberately, not ones we want to shout. */
.footer-links { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; }
.copyright, .footer-note, .footer-credit { font-size: .85rem; opacity: .75; }

/* Visually hidden but available to screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---- Focus ------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- /editor (blog admin; active only when site.php lists editors) ------ */
.adm-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.adm-me { color: var(--ink-soft); font-size: .92rem; }
.adm-inline { display: inline; }
.adm-crumbs { margin-bottom: 1.4em; }
.adm-h2 { margin-top: .4em; }
.adm-quiet { margin-left: 14px; }
.adm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 1.2em 0; }

.adm-form { max-width: 640px; }
.adm-row { margin: 0 0 16px; }
.adm-row label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem; }
.adm-row .meta { font-weight: 400; }
.adm-form input[type="text"], .adm-form input[type="password"], .adm-form input[type="date"],
.adm-form textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px;
}
.adm-form textarea { resize: vertical; line-height: 1.5; }
.adm-form input:focus-visible, .adm-form textarea:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.adm-2col { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .adm-2col { grid-template-columns: 1fr 1fr; } }
.adm-check label { font-weight: 600; }
.adm-check input { margin-right: 8px; }
.adm-login { max-width: 380px; }

.adm-editwrap { display: grid; gap: 34px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .adm-editwrap { grid-template-columns: minmax(0, 640px) 260px; } }
.adm-cheat {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); padding: 16px 18px; font-size: .9rem;
}
.adm-cheat h3 { margin-bottom: .4em; }
.adm-cheat dl { margin: 0 0 1em; }
.adm-cheat dt { font-family: ui-monospace, Consolas, monospace; font-size: .84em; margin-top: .6em; }
.adm-cheat dd { margin: 0; color: var(--ink-soft); }

.adm-preview {
  border: 2px dashed var(--accent); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 2em; background: var(--bg);
}

.adm-alert-ok, .adm-alert-err { padding: 14px 18px; border-radius: var(--radius); }
.adm-alert-ok  { border: 1px solid var(--accent); background: var(--bg-soft); }
.adm-alert-err { border: 1px solid var(--brand);  background: var(--bg-soft); }

.adm-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.adm-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.adm-table th, .adm-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.adm-table thead th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-mono { font-family: ui-monospace, Consolas, monospace; font-size: .88em; white-space: nowrap; }
.adm-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; }
.adm-pill-live  { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--accent); }
.adm-pill-draft { background: var(--bg-soft); color: var(--ink-soft); border: 1px dashed var(--line); }

.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 2px;
}
.linklike:hover { color: var(--brand-dark); }
.adm-danger { color: var(--brand); }
.adm-removeform { margin-top: 2.5em; }
.adm-ghost { color: var(--ink); border-color: var(--ink-soft); background: transparent; }
.adm-ghost:hover { background: var(--bg-soft); border-color: var(--ink); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Events + calendar ----------------------------------------------------
   Structure only, as everywhere else in this file. A site that wants its
   calendar to look different overrides these in its own theme.css.          */

.btn-lg { font-size: 1.05rem; padding: 14px 26px; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-quiet {
  background: transparent; color: var(--brand); border-color: var(--brand);
}
.btn-quiet:hover { background: var(--brand); color: var(--brand-contrast); }

/* The subscribe block. First thing on the page on purpose: one tap here and
   the visitor never needs the page again. */
.cal-subscribe {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin: 28px 0 40px;
}
.cal-subscribe-h { margin-top: 0; }
.cal-subscribe-main { margin: 16px 0 8px; }
.cal-hint { color: var(--ink-soft); font-size: .88rem; margin: 8px 0 0; }

.cal-more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.cal-more summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.cal-more-body { padding-top: 10px; }
.cal-url-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-url {
  flex: 1 1 320px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--bg);
}

.cal-picker { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.cal-picker-h { margin: 0 0 10px; font-weight: 600; }
.cal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cal-list li {
  display: flex; align-items: center; gap: 8px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.cal-list li.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-list a { text-decoration: none; }
.cal-list .cal-sub {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: 8px;
}
.cal-list .cal-sub:hover { color: var(--brand); }

/* Event listing */
.ev-month {
  border-bottom: 2px solid var(--accent); display: inline-block;
  padding-bottom: 4px; margin-top: 36px;
}
.ev-group { display: grid; gap: 4px; }
.ev-item {
  display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line);
}
.ev-item.is-cancelled .ev-body h3 a { text-decoration: line-through; opacity: .65; }
.ev-date {
  flex: 0 0 62px; text-align: center; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 0; height: fit-content;
}
.ev-dow {
  display: block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--brand); font-weight: 700;
}
.ev-day { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.ev-body { min-width: 0; }
.ev-body h3 { margin: 0 0 4px; font-size: 1.15rem; }
.ev-body p { margin: 4px 0; }
.ev-cal { color: var(--brand); }
.ev-flag {
  background: var(--ink-soft); color: #fff; font-size: .68rem; padding: 2px 8px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
  vertical-align: middle;
}
.ev-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ev-when { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.ev-repeat {
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: var(--accent); color: #1a1a1a; padding: 2px 9px; border-radius: 999px;
  margin-left: 8px; vertical-align: middle;
}
.ev-where { margin-top: 0; }
.ev-past { list-style: none; padding: 0; }
.ev-past li { padding: 6px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 560px) {
  .ev-item { gap: 12px; }
  .ev-date { flex-basis: 52px; }
  .ev-day { font-size: 1.35rem; }
}

/* Events editor extras (the shared .adm-* rules cover the rest). */
.ev-fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 18px 0;
}
.ev-fieldset legend { font-weight: 600; padding: 0 6px; }
.ev-sites { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 8px; }
.ev-siteopt { display: flex; align-items: center; gap: 7px; }
.ev-siteopt input { margin: 0; }

/* ---- Account and general forms --------------------------------------------
   The shared form look. Until now the only form styling in this file was
   .adm-* (the editors) and the LT theme's .lt-form; account pages are shared
   across sites, so they need classes that live here. Deliberately close to
   .adm-* so the two never look like different websites.                     */

.form { max-width: 640px; }
.form-narrow { max-width: 420px; }
.form-row { margin: 0 0 18px; }
.form-row > label, .form legend {
  display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem;
}
.form-row .meta { display: block; font-weight: 400; margin-top: 4px; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"],
.form input[type="password"], .form input[type="number"], .form input[type="date"],
.form select, .form textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.form fieldset {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.form .check { display: block; font-weight: 400; margin: 10px 0; }
.form .check input { margin-right: 9px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.4em 0 0; }
.form-aside { margin-top: 2em; max-width: 46ch; }
.req { color: var(--brand); }

/* The six-digit code box. Big, widely spaced and numeric: this is the one
   field in the whole site people type from a phone while reading another
   screen, often without their glasses. */
.code-input {
  font-size: 1.7rem; letter-spacing: .34em; text-align: center;
  font-variant-numeric: tabular-nums; max-width: 8em; padding: 12px !important;
}

/* Consent boxes: the sentence sits with its checkbox, never in a footnote,
   because the sentence is what the consent record names. */
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.consent-row input { margin-top: .3em; }
.consent-text { display: block; margin-top: 2px; }

.alert { padding: 14px 18px; border-radius: var(--radius); }
.alert-ok  { background: #eef7ec; border: 1px solid #4c9a41; }
.alert-err { background: #fdeeee; border: 1px solid var(--brand); }

.acct-lists { list-style: none; padding: 0; max-width: 560px; }
.acct-lists li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.acct-list-name { font-weight: 600; }
.nav-account a { font-weight: 600; }
