/*
Theme Name: Ware Family Log
Theme URI: https://iamware.net/
Author: MetaJarvis
Author URI: https://iamware.net/
Description: The Ware Family Log as it was — warm paper, Fraunces headlines, and the two-log front page — rebuilt as a WordPress theme. The front page is the curated landing page (masthead, stats, the two log gates, the entry feed, and the lower panels); entries use the same date-rail card as the old static site. The /house/ and /health/ links still point at the static pages served alongside WordPress.
Version: 1.0.0
License: Private — built for iamware.net
Text Domain: ware-family-log
*/

:root {
  color-scheme: light dark;
  --bg: #f6f1e4;
  --bg-raise: #fffdf6;
  --bg-sink: #efe7d3;
  --ink: #26231b;
  --ink-soft: #5d5643;
  --ink-faint: #8a8069;
  --line: #d9cdae;
  --line-strong: #b8a888;
  --red: #a03a24;
  --red-soft: #f3ddd2;
  --slate: #33566b;
  --slate-soft: #dbe5ea;
  --olive: #5c6b34;
  --gold: #9c7222;
  --shadow: 0 1px 2px rgba(64, 50, 20, .07), 0 10px 30px -18px rgba(64, 50, 20, .35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --bg-raise: #201d16;
    --bg-sink: #1b1913;
    --ink: #ece4cf;
    --ink-soft: #b6ab90;
    --ink-faint: #857c64;
    --line: #37321f;
    --line-strong: #57503a;
    --red: #e08a6d;
    --red-soft: #3a241b;
    --slate: #8fb4c9;
    --slate-soft: #22333d;
    --olive: #aebd7f;
    --gold: #d3a952;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -18px rgba(0,0,0,.7);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px 72px; }
.serif { font-family: "Fraunces", Georgia, serif; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ---------- top strip ---------- */
.topstrip {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
  padding: 12px 0 10px; border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink-soft); text-transform: uppercase;
}
.topstrip b { color: var(--ink); font-weight: 600; }
.topstrip .dotsep::before { content: "·"; margin: 0 8px; color: var(--ink-faint); }
.topstrip a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.topstrip a:hover { color: var(--red); text-decoration-color: var(--red); }

/* ---------- masthead ---------- */
.masthead { padding: 44px 0 8px; display: grid; grid-template-columns: 1.65fr 1fr; gap: 42px; align-items: end; }
.masthead h1 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: clamp(2.7rem, 6.2vw, 4.4rem); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 18px;
}
.masthead h1 em { font-style: italic; color: var(--red); }
.lede { font-size: 1.13rem; line-height: 1.65; color: var(--ink-soft); margin: 0; max-width: 34em; }
.lede strong { color: var(--ink); font-weight: 600; }
.about-box {
  border-top: 3px solid var(--ink); padding-top: 14px;
  font-size: .95rem; color: var(--ink-soft);
}
.about-box p { margin: 0 0 10px; }
.about-box .sig { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; }

.stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  margin: 36px 0 0;
}
.stat { padding: 16px 14px 14px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat .n { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.9rem; line-height: 1; display: block; }
.stat .l { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); display: block; margin-top: 7px; }

/* ---------- section gates ---------- */
.gates { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 40px 0 8px; }
.gate {
  background: var(--bg-raise); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.gate figure { margin: 0; aspect-ratio: 16 / 8.2; overflow: hidden; }
.gate figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gate .gate-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gate .gate-kicker { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.gate .gate-kicker .pip { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.gate.it .pip { background: var(--slate); } .gate.it .gate-kicker { color: var(--slate); }
.gate.family .pip { background: var(--red); } .gate.family .gate-kicker { color: var(--red); }
.gate h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 2rem; margin: 0; line-height: 1.1; }
.gate h2 a { color: inherit; text-decoration: none; }
.gate h2 a:hover { color: var(--red); }
.gate p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.gate .gate-meta { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-faint); margin-top: auto; padding-top: 6px; }
.gate .gate-meta a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.gate .gate-meta a:hover { color: var(--red); text-decoration-color: var(--red); }
/* Theme note: the old gate "button" is a link to the category archive in WordPress. */
.gate .gate-btn {
  margin-top: 12px; align-self: flex-start; cursor: pointer; display: inline-block;
  font: 600 .95rem "Public Sans", sans-serif; color: var(--bg-raise); text-decoration: none;
  background: var(--ink); border: 1px solid var(--ink); padding: 11px 20px; border-radius: 3px;
  transition: background .15s ease, transform .15s ease;
}
.gate .gate-btn:hover { background: var(--red); border-color: var(--red); color: var(--bg-raise); }
.gate .gate-btn:active { transform: translateY(1px); }

/* ---------- feed controls ---------- */
.feed-head { margin: 64px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; }
.feed-head h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 2.1rem; margin: 0; }
.feed-head .count { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 18px 0 6px; }
.tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; }
/* Theme note: tabs are links to the front page / category archives in WordPress. */
.tabs a {
  border: 0; background: transparent; cursor: pointer; text-decoration: none;
  font: 600 .92rem "Public Sans", sans-serif; color: var(--ink-soft); padding: 10px 18px;
}
.tabs a + a { border-left: 1px solid var(--line); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.searchbox { flex: 1; min-width: 210px; max-width: 340px; position: relative; }
.searchbox input {
  width: 100%; font: 400 .95rem "Public Sans", sans-serif; color: var(--ink);
  background: var(--bg-raise); border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 10px 12px 10px 36px;
}
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--ink-faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
/* Theme note: chips are links to tag archives in WordPress. */
.chip {
  cursor: pointer; border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink-soft); border-radius: 999px; padding: 5px 13px; text-decoration: none;
  font: 500 .82rem "IBM Plex Mono", monospace;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-current="page"] { color: #1c130d; } }

/* ---------- entries ---------- */
.entries { margin-top: 18px; border-top: 1px solid var(--line-strong); }
.entry { display: grid; grid-template-columns: 118px 1fr; gap: 26px; padding: 30px 0 28px; border-bottom: 1px solid var(--line); }
.entry .rail { font-family: "IBM Plex Mono", monospace; }
.entry .rail .d { font-size: 1.55rem; font-weight: 600; line-height: 1; display: block; }
.entry .rail .my { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-top: 6px; }
.entry .rail .yr { font-size: 12px; color: var(--ink-faint); display: block; margin-top: 2px; }
.entry .sec-tag {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
}
.entry .sec-tag .pip { width: 8px; height: 8px; border-radius: 50%; }
.entry.it .sec-tag { color: var(--slate); } .entry.it .sec-tag .pip { background: var(--slate); }
.entry.family .sec-tag { color: var(--red); } .entry.family .sec-tag .pip { background: var(--red); }
.entry h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.62rem; line-height: 1.18; margin: 0 0 9px; }
.entry h3 a { color: inherit; text-decoration: none; }
.entry h3 a:hover { color: var(--red); }
.entry .excerpt { margin: 0; color: var(--ink-soft); max-width: 44em; }
.entry .body { display: none; margin-top: 14px; max-width: 44em; }
.entry.open .body { display: block; }
.entry .body p { margin: 0 0 12px; color: var(--ink); }
/* Theme note: post content can carry other subheads besides Field notes; keep them in the Fraunces voice. */
.entry .body h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.3rem; margin: 20px 0 8px; line-height: 1.25; }
.entry .notes {
  margin: 16px 0 4px; background: var(--bg-sink); border: 1px solid var(--line);
  padding: 14px 18px 12px;
}
.entry .notes h4 { margin: 0 0 8px; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.entry .notes ul { margin: 0; padding: 0; list-style: none; }
.entry .notes li { font-family: "IBM Plex Mono", monospace; font-size: .86rem; padding: 3px 0 3px 18px; position: relative; color: var(--ink); }
.entry .notes li::before { content: "—"; position: absolute; left: 0; color: var(--ink-faint); }
.entry .source-link { margin: 14px 0 2px; }
.entry .source-link a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.entry .source-link a:hover { text-decoration-color: var(--red); }
.entry .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
/* Theme note: entry tags are links to tag archives in WordPress. */
.entry .tags a {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); border-radius: 999px; padding: 3px 11px; text-decoration: none;
  font: 500 .78rem "IBM Plex Mono", monospace;
}
.entry .tags a:hover { border-color: var(--ink); color: var(--ink); }
.entry .readbtn {
  appearance: none; background: none; border: 0; cursor: pointer; padding: 0; margin-top: 14px;
  font: 600 .92rem "Public Sans", sans-serif; color: var(--red);
  display: inline-flex; align-items: center; gap: 7px;
}
.entry .readbtn .chev { transition: transform .18s ease; display: inline-block; }
.entry.open .readbtn .chev { transform: rotate(90deg); }
/* Theme note: the single-post back link lives outside the entry card, so it gets its own rule. */
.backlink { display: inline-block; margin: 26px 0 4px; font: 600 .92rem "Public Sans", sans-serif; color: var(--red); text-decoration: none; }
.backlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.empty {
  padding: 44px 0; text-align: center; color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace; font-size: .95rem;
}

/* ---------- lower panels ---------- */
.panels { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 34px; margin-top: 66px; }
.panel h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.45rem; margin: 0 0 6px;
  padding-bottom: 10px; border-bottom: 3px solid var(--ink);
}
.panel .sub { color: var(--ink-soft); font-size: .92rem; margin: 0 0 14px; }
dl.stack { margin: 0; }
dl.stack div { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
dl.stack dt { font-family: "IBM Plex Mono", monospace; font-size: .85rem; font-weight: 600; padding-top: 2px; }
dl.stack dd { margin: 0; font-size: .93rem; color: var(--ink-soft); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
ul.plain li b { color: var(--ink); font-weight: 600; }
ul.plain li .when { font-family: "IBM Plex Mono", monospace; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); display: block; margin-bottom: 2px; }

/* ---------- footer ---------- */
footer { margin-top: 72px; border-top: 1px solid var(--line-strong); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between; }
footer p { margin: 0; font-size: .9rem; color: var(--ink-soft); max-width: 36em; }
footer .fmono { font-family: "IBM Plex Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr; gap: 26px; padding-top: 32px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: none; padding-left: 0; }
  .panels { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .gates { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; padding-left: 0; }
  .entry { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .entry .rail { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .entry .rail .d { font-size: 1.2rem; }
  .entry .rail .my, .entry .rail .yr { margin-top: 0; }
  .entry .sec-tag { margin-top: 0; margin-left: auto; }
  dl.stack div { grid-template-columns: 1fr; gap: 2px; }
}
