:root {
  --bg: #0a0a0a; --panel: #151515; --panel-2: #1d1d1d; --line: #2b2b2b;
  --text: #f2f2f2; --muted: #9a9a9a; --accent: #ffffff;
  --GREEN: #1f9d55; --YELLOW: #f2c200; --ORANGE: #f07c00; --RED: #d62828; --NONE: #555;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12.5px; }

.site-header { align-items: flex-end !important;
  position: sticky; top: 0; z-index: 10; background: #000;
  border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { --lw: 72px; display: block; width: var(--lw); height: calc((var(--lw) - 6px) * 0.50267 + 6px); background: #fff url("img/sti-logo-hires.png") no-repeat center / contain; background-origin: content-box; background-clip: padding-box; border-radius: 6px; padding: 3px; flex: none; }
.brand-text h1 { font-size: 16px; margin: 0; line-height: 1.2; letter-spacing: .2px; }
.tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.install-btn { background: #fff; color: #000; border: 0; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px; flex: none; }

main { max-width: 860px; margin: 0 auto; padding: 14px; }
section { margin-bottom: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
h2 { font-size: 18px; margin: 0; }

.board { display: grid; gap: 10px; grid-template-columns: 1fr; }
.tile {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  background: var(--panel); border: 1px solid var(--line); border-left: 8px solid var(--NONE);
  border-radius: var(--radius); padding: 12px 14px;
}
.tile h3 { margin: 0; font-size: 15px; }
.tile .meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.tile.lvl-GREEN { border-left-color: var(--GREEN); } .tile.lvl-YELLOW { border-left-color: var(--YELLOW); }
.tile.lvl-ORANGE { border-left-color: var(--ORANGE); } .tile.lvl-RED { border-left-color: var(--RED); }

.badge {
  display: inline-block; font-weight: 800; font-size: 12.5px; letter-spacing: .8px;
  padding: 4px 10px; border-radius: 999px; background: var(--NONE); color: #fff; white-space: nowrap;
}
.badge.lvl-GREEN { background: var(--GREEN); } .badge.lvl-YELLOW { background: var(--YELLOW); color: #111; }
.badge.lvl-ORANGE { background: var(--ORANGE); color: #111; } .badge.lvl-RED { background: var(--RED); }
.tile .badge { font-size: 14px; padding: 6px 14px; }
/* Level trend vs the previous level: up = red-ish, down = green-ish, steady = subtle grey. */
.lvl-box { display: flex; align-items: center; gap: 6px; justify-self: end; }
.trend { font-size: 15px; line-height: 1; font-weight: 800; min-width: 1em; text-align: center; }
.trend-up { color: #ff6b6b; } .trend-down { color: #3fd27f; } .trend-steady { color: #b0b0b0; font-size: 14px; }
.trend-rising { color: #ff9f43; } .trend-easing { color: #4fc3f7; }
.tile .trend-cap { grid-column: 1 / -1; justify-self: end; font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

.legend { display: flex; gap: 14px; list-style: none; padding: 0; margin: 10px 0 0; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--NONE); }
.dot.lvl-GREEN { background: var(--GREEN); } .dot.lvl-YELLOW { background: var(--YELLOW); }
.dot.lvl-ORANGE { background: var(--ORANGE); } .dot.lvl-RED { background: var(--RED); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 11px; font-size: 13px;
}
.filters button[aria-selected="true"] { background: #fff; color: #000; border-color: #fff; font-weight: 700; }

.cards { display: grid; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.card-head .zulu { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 13.5px; }
.card-head .zulu .seg { white-space: nowrap; }
.card-body { padding: 12px 14px 6px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.card-body.missing { color: var(--muted); font-style: italic; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px; }
.chip { font-size: 11.5px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.chip.warn { border-color: #6b5200; color: #ffd24d; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px 12px; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.links a { font-size: 13px; text-decoration: none; border: 1px solid #444; border-radius: 8px; padding: 5px 9px; }
.tag { font-weight: 800; font-size: 13px; color: #fff; }
.deeper { text-align: center; margin: 16px 0 0; font-size: 14px; }
.deeper a { color: var(--muted); }
.articles-teaser { text-align: left; margin: 12px 0 0; }
.articles-teaser a { color: var(--text, #eee); text-decoration: underline; text-underline-offset: 2px; }

.contact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.person { margin: 8px 0 14px; color: #ddd; }
.contact-btns { display: grid; gap: 10px; }
.btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700;
  padding: 14px; border-radius: 12px; border: 1px solid #555; color: #fff; background: var(--panel-2);
}
.btn-primary { background: #fff; color: #000; border-color: #fff; }
.follow-h { font-size: 14px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { text-decoration: none; padding: 8px 12px; border: 1px solid #444; border-radius: 10px; font-size: 14px; }
.social a.social-new { border-color: #c9a227; box-shadow: 0 0 0 1px rgba(201,162,39,.35); }
.badge-new {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: #c9a227; color: #111; vertical-align: middle;
}

.disclaimer { max-width: 860px; margin: 0 auto; padding: 4px 14px 28px; font-size: 12.5px; color: #bbb; border-top: 1px solid var(--line); }

@media (min-width: 720px) {
  .board { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); } /* 4 monitors: 2 x 2 */
  .contact-btns { grid-template-columns: 1fr 1fr; }
  .brand-text h1 { font-size: 20px; }
  .logo { --lw: 96px; }
}

/* "Turn on alerts" (notifications via ntfy) */
.head-actions { display: flex; gap: 6px; flex: none; }
.install-btn.alt { background: var(--panel-2); color: #fff; border: 1px solid #555; }
.notify { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; scroll-margin-top: 110px; }
.notify-cta { display: grid; gap: 10px; }
.notify-cta p { margin: 4px 0 0; }
.notify-btn { width: 100%; font-size: 16px; cursor: pointer; }
.notify-panel { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.watch-picks { border: 0; padding: 0; margin: 10px 0; }
.watch-picks legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.watch-picks p { margin: 6px 0 0; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: #fff; flex: none; }
.platform-tabs { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.platform-tabs button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.platform-tabs button[aria-selected="true"] { background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.steps { margin: 8px 0; padding-left: 22px; font-size: 14.5px; }
.steps li { margin: 6px 0; }
.topic-rows { display: grid; gap: 8px; margin-top: 8px; }
.topic-row { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.topic-name { display: grid; gap: 2px; min-width: 0; }
.topic-label { font-weight: 700; font-size: 14px; }
.topic-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #ddd; word-break: break-all; -webkit-user-select: all; user-select: all; }
.topic-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { display: inline-block; background: transparent; color: #fff; border: 1px solid #555; border-radius: 8px; padding: 7px 11px; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.mini.primary { background: #fff; color: #000; border-color: #fff; }
.notify-help { margin-top: 10px; }
.notify-help summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.notify-help ul { padding-left: 18px; color: #ccc; }
.notify-help li { margin: 6px 0; }
@media (min-width: 720px) {
  .notify-cta { grid-template-columns: 1fr auto; align-items: center; }
  .notify-btn { width: auto; padding: 12px 22px; }
  .toggles { grid-template-columns: repeat(4, 1fr); }
  .topic-row { grid-template-columns: 1fr auto; align-items: center; }
}

/* Reader-side share buttons: small, secondary */
.share { display: flex; gap: 6px; margin-left: auto; }
.btn.btn-share { display: inline-block; padding: 5px 10px; font-size: 12.5px; font-weight: 600; border-radius: 8px; border-color: #444; color: #ddd; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn.btn-share:hover, .btn.btn-share:focus-visible { border-color: #888; color: #fff; }

/* ---- Redesign: tappable watch tiles + watch / archive views ---- */
.tap-hint { width: 100%; margin: 0; }
.board { gap: 12px; }
@media (min-width: 720px) { .board { grid-template-columns: 1fr 1fr; } }
.tile-btn { text-decoration: none; color: var(--text); padding: 18px 16px; border-left-width: 12px; min-height: 120px;
  cursor: pointer; transition: transform .08s ease, background .15s ease; -webkit-tap-highlight-color: transparent; }
.tile-btn:hover { background: var(--panel-2); } .tile-btn:active { transform: scale(.985); }
.tile-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tile-btn h3 { font-size: 18px; }
.tile-btn .badge { font-size: 16px; padding: 8px 16px; }
.tile-btn.lvl-GREEN { background: linear-gradient(90deg, rgba(31,157,85,.22), var(--panel) 70%); }
.tile-btn.lvl-YELLOW { background: linear-gradient(90deg, rgba(242,194,0,.20), var(--panel) 70%); }
.tile-btn.lvl-ORANGE { background: linear-gradient(90deg, rgba(240,124,0,.22), var(--panel) 70%); }
.tile-btn.lvl-RED { background: linear-gradient(90deg, rgba(214,40,40,.26), var(--panel) 70%); }
.tile-cta { grid-column: 1 / -1; font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.notify.off-home { display: none; }
.crumbs { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.crumbs a { text-decoration: none; font-weight: 700; padding: 6px 0; }
.watch-banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line); border-left: 12px solid var(--NONE); border-radius: var(--radius); padding: 14px 16px; }
.watch-banner h2 { font-size: 20px; }
.watch-banner .meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.watch-banner .trend-cap { grid-column: 1 / -1; justify-self: end; font-size: 12px; font-weight: 700; }
.watch-banner.lvl-GREEN { border-left-color: var(--GREEN); } .watch-banner.lvl-YELLOW { border-left-color: var(--YELLOW); }
.watch-banner.lvl-ORANGE { border-left-color: var(--ORANGE); } .watch-banner.lvl-RED { border-left-color: var(--RED); }
.card-lead { border-color: #555; }
.card-lead .card-body { font-size: 16px; }
.lead-tag { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 6px 14px 0; color: var(--muted); background: var(--panel-2); }
.sub-h { font-size: 14px; color: var(--muted); margin: 8px 0 0; text-transform: uppercase; letter-spacing: .8px; }
.arch-group { margin-bottom: 18px; }
.arch-watch { font-size: 16px; margin: 14px 0 6px; }
.arch-day { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px; letter-spacing: .6px; }
.card-compact { margin-bottom: 8px; }
.card-compact > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.card-compact > summary::-webkit-details-marker { display: none; }
.card-compact > summary::before { content: '\25B8'; margin-right: 6px; color: var(--muted); }
.card-compact[open] > summary::before { content: '\25BE'; }
.card-compact[open] > summary { border-bottom: 1px solid var(--line); }
#filters { width: 100%; }

/* Closed watches */
.closed-banner{background:#3a3f47;color:#fff;border-radius:10px;padding:10px 12px;margin:0 0 10px;font-weight:600;font-size:.95rem}
.closed-group{margin-bottom:18px}
.closed-item{display:flex;flex-direction:column;gap:4px;padding:12px 14px;margin:8px 0;border-radius:12px;border:1px solid rgba(127,127,127,.35);border-left-width:6px;text-decoration:none;color:inherit;background:rgba(127,127,127,.08)}
.closed-item.lvl-GREEN{border-left-color:#2e9e4f}.closed-item.lvl-YELLOW{border-left-color:#e0b000}.closed-item.lvl-ORANGE{border-left-color:#e06a00}.closed-item.lvl-RED{border-left-color:#c62828}
.closed-name{font-weight:700;font-size:1.05rem}
.closed-meta{font-size:.88rem;opacity:.85;display:flex;align-items:center;gap:6px;flex-wrap:wrap}

/* Front-page quick share (secondary) */
.tile-wrap { position: relative; display: grid; }
.tile-wrap > .tile-btn { padding-bottom: 44px; }
.qshare { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tile-wrap > .qshare { position: absolute; right: 12px; bottom: 10px; justify-content: flex-end; }
.qs-menu { display: flex; gap: 6px; } .qs-menu[hidden] { display: none; }
.share-summary { margin: 0 0 10px; }
.qshare-big .qs-btn { padding: 7px 14px; font-size: 13.5px; }

/* ---- Compact phone board (preview 2026-10-13): all watch tiles on one screen ---- */
@media (max-width: 719px) {
  .site-header { padding: calc(6px + env(safe-area-inset-top)) 10px 6px; }
  .logo { --lw: 52px; }
  .brand-text h1 { font-size: 14px; }
  .tagline { font-size: 11px; letter-spacing: .8px; }
  main { padding: 8px 10px; }
  #homeView { margin-bottom: 14px; }
  #homeView .section-head { margin-bottom: 6px; gap: 2px 8px; }
  #homeView h2 { font-size: 16px; }
  .tap-hint { font-size: 12px; }
  .board { gap: 6px; }
  .tile-wrap > .tile-btn {
    grid-template-columns: minmax(0,1fr) auto; gap: 2px 6px; align-items: center;
    padding: 7px 40px 7px 10px; min-height: 0; border-left-width: 6px; border-radius: 10px;
  }
  .tile-btn h3 { font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-btn .badge { font-size: 12px; padding: 3px 8px; letter-spacing: .5px; }
  .tile-btn .trend { font-size: 13px; }
  .lvl-box { gap: 4px; }
  .tile-btn .trend-cap { display: none; }  /* arrow stays; caption shown when expanded */
  .tile-btn .meta { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-btn .tile-cta { display: none; }
  .tile-wrap > .qshare { display: none; }
  .tile-more {
    position: absolute; top: 0; right: 0; bottom: 0; width: 38px; z-index: 2;
    background: transparent; border: 0; border-left: 1px solid var(--line); color: var(--muted);
    font-size: 18px; font-weight: 800; cursor: pointer; border-radius: 0 10px 10px 0;
  }
  .tile-more:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
  .tile-wrap.open > .tile-btn { padding-bottom: 42px; }
  .tile-wrap.open .tile-btn .meta { white-space: normal; }
  .tile-wrap.open .tile-btn .trend-cap, .tile-wrap.open .tile-btn .tile-cta { display: block; }
  .tile-wrap.open > .qshare { display: flex; }
  .tile-wrap.open > .tile-more { bottom: auto; height: 38px; color: #fff; }
  .legend { margin-top: 6px; gap: 10px; }
}
@media (min-width: 720px) { .tile-more { display: none; } }
/* NEW tag: 12 h after post time until the card is opened on this device */
.new-tag { display: inline-block; flex: none; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #d32f2f; color: #fff;
  font: 800 10.5px/1.5 system-ui, sans-serif; letter-spacing: .6px; vertical-align: middle; white-space: nowrap; }
.card-head .new-tag { margin-left: auto; }

/* v30: motto/ethos footer line */
footer .motto{margin:10px 0 4px;font-size:.9em;line-height:1.4;opacity:.9}
footer .motto strong{color:#fff;font-weight:600}
footer .motto em{font-style:italic;opacity:.85}
/* R-067 (RC 2026-10-21): in-app Sources view */
.btn.btn-sources { display: inline-block; padding: 5px 10px; font-size: 12.5px; font-weight: 600; border-radius: 8px; border-color: #444; color: #ddd; background: transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn.btn-sources:hover, .btn.btn-sources:focus-visible { border-color: #888; color: #fff; }
.src-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.src-box { background: #161616; color: #eee; border: 1px solid #333; border-radius: 12px; max-width: 520px; width: 100%; max-height: 82vh; overflow: auto; padding: 16px 18px; }
.src-box h2 { margin: 0 0 4px; font-size: 18px; }
.src-list { margin: 12px 0; padding-left: 20px; line-height: 1.5; font-size: 14.5px; }
.src-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.src-links a { color: #9cf; }
.src-close { cursor: pointer; font-family: inherit; }

/* App-wide Share STI Alerts button */
.share-app-btn { cursor: pointer; font-family: inherit; }
.install-btn.share-app-btn { background: var(--panel-2); color: #fff; border: 1px solid #888; }
.btn.share-app-btn { font-size: 16px; font-weight: 700; }
/* 2026-10-22: header share button aligned with tagline, more breathing room */
.site-header { padding-bottom: 14px; }
.head-actions { align-self: flex-end; margin-left: 16px; }
.install-btn.share-app-btn { padding: 8px 16px; }
#shareAppBtn { position: relative; top: 8px; }
