/* tribecreek.com -- one stylesheet for the whole static site (built by tools/build.py).
   Readers skew 55+, so: large type, high contrast, generous tap targets, nothing that moves. */
:root {
  --bg: #fbf8f2; --surface: #ffffff; --surface-2: #f2ece1; --border: #ddd3c2;
  --text: #1f1a14; --text-muted: #5b5146; --accent: #a3271d; --accent-hover: #7f1d15; --accent-wash: #f6e4e0;
  --shadow: 0 1px 3px rgba(31, 26, 20, .08);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f; --surface: #211d17; --surface-2: #2a251d; --border: #3d362b;
    --text: #f1ebe0; --text-muted: #c2b6a4; --accent: #f08a7a; --accent-hover: #f7b1a5; --accent-wash: #3a221d;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 19px/1.65 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 9; }

/* header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { font: 700 26px/1 var(--serif); color: var(--text); text-decoration: none; letter-spacing: .2px; }
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.yt-btn { display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 6px; font-size: 17px; }
.yt-btn:hover { background: var(--accent-hover); }
@media (prefers-color-scheme: dark) { .yt-btn { color: #17140f !important; } }

/* type */
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; }
h1 { font-size: 38px; margin: 28px 0 12px; }
h2 { font-size: 28px; margin: 40px 0 10px; }
h3 { font-size: 22px; margin: 28px 0 8px; }
h4 { font-size: 19px; margin: 22px 0 6px; }
.lede { font-size: 21px; color: var(--text-muted); margin-top: 0; }
.meta { color: var(--text-muted); font-size: 16px; margin: 0 0 18px; }
.crumbs { font-size: 16px; color: var(--text-muted); margin-top: 22px; }
.crumbs a { color: var(--text-muted); }
@media (max-width: 600px) { body { font-size: 18px; } h1 { font-size: 30px; } h2 { font-size: 24px; } }

/* article body (Markdown output keeps WordPress block class names) */
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 6px 0; }
.article figure { margin: 22px 0; overflow-x: auto; }
.article table { border-collapse: collapse; width: 100%; font-size: 17px; background: var(--surface); }
.article td, .article th { border: 1px solid var(--border); padding: 9px 12px; vertical-align: top; text-align: left; }
.article tr td:first-child { font-weight: 600; background: var(--surface-2); }
.article tr:has(> td:nth-child(2):last-child) > td:first-child { width: 32%; }  /* two-column spec tables only */
@media (max-width: 600px) { .article table { font-size: 15px; } .article td, .article th { padding: 7px 8px; } }
.article thead td, .article th { background: var(--surface-2); font-weight: 700; }
.article iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.article blockquote { margin: 20px 0; padding: 4px 18px; border-left: 4px solid var(--accent); background: var(--surface); }

/* video (lite embed: thumbnail until clicked) */
.video { margin: 24px 0; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.yt button { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; background: #c4302b; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.yt .play::after { content: ""; position: absolute; left: 31px; top: 15px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt button:focus-visible { outline: 4px solid var(--accent); outline-offset: -4px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: 16px; color: var(--text-muted); margin-top: 8px; }

/* boxes */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px 22px; margin: 30px 0; box-shadow: var(--shadow); }
.box h2, .box h3 { margin-top: 4px; }
.box ul { margin: 8px 0 4px; padding-left: 1.2em; }
.small { font-size: 15px; color: var(--text-muted); }
.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0; }
.series-nav a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.series-nav a:hover { border-color: var(--accent); }
.series-nav small { display: block; color: var(--text-muted); font-size: 15px; }
.series-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .series-nav { grid-template-columns: 1fr; } .series-nav .next { grid-column: 1; } }

/* cards / lists */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 16px 0 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card a.cover { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.card a.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card a.cover .badge { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff; font-size: 14px; padding: 2px 7px; border-radius: 4px; }
.card .body { padding: 12px 16px 16px; }
.card h3 { font-size: 20px; margin: 0 0 6px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; font-size: 16px; color: var(--text-muted); }
.card .links { margin-top: 10px; font-size: 16px; }
.list { list-style: none; padding: 0; margin: 10px 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li a { font-weight: 600; }
.list li span { display: block; color: var(--text-muted); font-size: 16px; }
.series-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 42px; }
.series-head h2 { margin: 0; }
.series-head span { color: var(--text-muted); }

/* home */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-top: 30px; padding-bottom: 34px; }
.hero h1 { margin-top: 0; font-size: 40px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero h1 { font-size: 32px; } }
.finder { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-top: 18px; }
.finder label { display: block; font-weight: 700; margin-bottom: 8px; }
.finder .row { display: flex; gap: 10px; flex-wrap: wrap; }
.finder select { font: inherit; font-size: 18px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); min-width: 0; flex: 1 1 200px; }
.finder button { font: inherit; font-weight: 700; padding: 9px 18px; border: 0; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; }
@media (prefers-color-scheme: dark) { .finder button { color: #17140f; } }
.brand-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.brand-tiles a { display: block; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--text); }
.brand-tiles a strong { font-family: var(--serif); font-size: 22px; display: block; }
.brand-tiles a span { color: var(--text-muted); font-size: 16px; }
@media (max-width: 760px) { .brand-tiles { grid-template-columns: 1fr; } }

/* footer */
.site-foot { margin-top: 60px; background: var(--surface); border-top: 1px solid var(--border); padding: 26px 0 34px; font-size: 16px; color: var(--text-muted); }
.site-foot a { color: var(--text-muted); }
.site-foot p { margin: 6px 0; }
