/* The Signal — weekly feed page (dimsylaisolutions.com/signal/). Layers on style.css: same tokens,
   same doc shell as the legal pages, plus the issue + tile grammar. Tiles are native <details>
   elements — click-to-open, keyboard accessible, and fully readable with JS disabled. Color is
   starlight only: severity dots reuse the stellar tints, "we patched" entries take Scout's green. */

/* The hub's content column (1040px, see index.html .wrap) rather than the 720px legal-page measure: CJ
   reads at reduced browser zoom, so the feed fills the page like the product panels do. Prose inside a
   tile keeps its own 64ch/60ch measure for readability. */
.sig-wrap { max-width: 1040px; padding-left: 26px; padding-right: 26px; }
main.doc { padding: 48px 0 110px; }

/* ---- page head ---- */
.sig-head { padding: 6px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 38px; }
.sig-kicker { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: .74rem; }
.sig-star { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--star-g); box-shadow: 0 0 14px var(--star-g); }
.sig .doc h1, .sig h1 { font-size: clamp(2.7rem, 7.5vw, 4.6rem); letter-spacing: -0.035em; line-height: .98; margin: 0; font-variation-settings: "wght" 820, "wdth" 125; }
.sig-dek { margin: 20px 0 0; max-width: 52ch; color: var(--ink-2); font-size: clamp(1.08rem, 2.2vw, 1.28rem); line-height: 1.6; text-wrap: pretty; }
.sig-meta { margin: 24px 0 0; font-size: .74rem; }
.sig-meta a, .sig .doc .sig-meta a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.sig-meta a:hover, .sig .doc .sig-meta a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---- an issue ---- */
.issue { margin: 0; }
.issue-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.issue-date, .doc .issue-date { margin: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .76rem; letter-spacing: .14em; font-variation-settings: "wght" 600, "wdth" 78; }
.issue-date .st, .empty-k .st { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--star-g); box-shadow: 0 0 10px var(--star-g); }
.issue-meta .rule { flex: 1; min-width: 40px; height: 1px; background: var(--line); }
.issue-count { font-size: .74rem; }
.issue-lede { margin: 0 0 28px; padding: 2px 0 2px 20px; border-left: 2px solid var(--line-2); color: var(--ink);
  font-variation-settings: "wght" 470, "wdth" 104; font-size: clamp(1.12rem, 2.4vw, 1.36rem); line-height: 1.5; letter-spacing: -0.01em; text-wrap: pretty; }
.issue-none { color: var(--ink-3); }

/* ---- tiles ---- */
.tiles { border-top: 1px solid var(--line); }
.tile { border-bottom: 1px solid var(--line); }
.tile > summary {
  list-style: none; cursor: pointer; display: grid; align-items: center; column-gap: 16px;
  grid-template-columns: 16px minmax(0, 1fr) auto 22px; grid-template-areas: "dot title chip x";
  padding: 20px 2px 20px 0; color: var(--ink); transition: color .2s;
}
.tile > summary::-webkit-details-marker { display: none; }
.tile > summary::marker { content: ""; }
.tile > summary:hover .tile-title { color: #fff; }
.tile > summary:focus-visible { outline: 2px solid var(--star-o); outline-offset: 3px; border-radius: 4px; }
.dot { grid-area: dot; width: 9px; height: 9px; border-radius: 50%; justify-self: center; }
.dot.sev-critical { background: var(--star-m); box-shadow: 0 0 12px var(--star-m); }
.dot.sev-high { background: var(--star-g); box-shadow: 0 0 12px var(--star-g); }
.dot.sev-medium { background: var(--star-o); box-shadow: 0 0 10px var(--star-o); }
.dot.sev-low { background: var(--ink-3); }
.dot.sev-patched { background: var(--scout); box-shadow: 0 0 12px var(--scout); }
.dot.sev-none { background: transparent; }
.tile-title { grid-area: title; font-variation-settings: "wght" 620, "wdth" 104; font-size: clamp(1.06rem, 2.1vw, 1.24rem); line-height: 1.32; letter-spacing: -0.012em; transition: color .2s; text-wrap: pretty; }
.chip { grid-area: chip; font-variation-settings: "wght" 600, "wdth" 76; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; white-space: nowrap; line-height: 1.4; }
.tile-patched .chip { color: var(--scout); border-color: rgba(51,240,160,.3); }
.tile-x { grid-area: x; width: 22px; text-align: center; color: var(--ink-3); font-size: 1.45rem; line-height: 1;
  font-variation-settings: "wght" 300, "wdth" 100; transition: transform .35s var(--ease), color .2s; }
.tile[open] > summary .tile-x, .fold[open] > summary .tile-x { transform: rotate(45deg); color: var(--ink); }
.tile > summary:hover .tile-x { color: var(--ink); }
.tile-body { padding: 0 0 28px 32px; }
.tile-summary, .doc .tile-summary { margin: 0 0 18px; color: var(--ink-2); font-size: 1.04rem; line-height: 1.7; max-width: 64ch; }
.tile-lines { margin: 0; display: grid; gap: 12px; }
.tile-lines > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.tile-lines dt { margin: 0; font-size: .72rem; }
.tile-lines dd { margin: 0; color: var(--ink-2); max-width: 60ch; line-height: 1.65; }
.tile-foot { margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; font-size: .92rem; color: var(--ink-2); }
.tile-foot .k { font-variation-settings: "wght" 600, "wdth" 78; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.tile-foot a, .doc .tile-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.tile-foot a:hover, .doc .tile-foot a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.doc .tile-body code { font-size: .88em; }

/* ---- earlier issues ---- */
.earlier { margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--line-2); }
/* the hub's section-label grammar (index.html .lbl): condensed index · normal-width label · hairline */
.earlier-t, .doc .earlier-t { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; font-size: 1rem; letter-spacing: 0; font-variation-settings: "wght" 600, "wdth" 100; color: var(--ink-2); }
.earlier-n { font-variation-settings: "wght" 600, "wdth" 74; font-size: .74rem; letter-spacing: .16em; color: var(--ink-3); text-transform: uppercase; }
.earlier-l { font-variation-settings: "wght" 600, "wdth" 100; font-size: .82rem; letter-spacing: .02em; color: var(--ink-2); }
.earlier-rule { flex: 1; height: 1px; background: var(--line); align-self: center; }
.fold { border-bottom: 1px solid var(--line); }
.fold > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 22px; grid-template-areas: "head x"; column-gap: 16px; align-items: center; padding: 20px 2px 20px 0; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::marker { content: ""; }
.fold > summary:focus-visible { outline: 2px solid var(--star-o); outline-offset: 3px; border-radius: 4px; }
.fold > summary:hover .fold-date { color: var(--ink); }
.fold-head { grid-area: head; display: block; min-width: 0; }
.fold-date { display: block; color: var(--ink-2); font-size: .76rem; transition: color .2s; }
.fold-intro { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; color: var(--ink-2); line-height: 1.55; }
.fold[open] > summary .fold-intro { display: none; }
.fold > .issue { padding: 4px 0 28px; }

/* ---- empty state (no approved issue yet) ---- */
.empty { border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 5vw, 46px); background: linear-gradient(180deg, rgba(20,20,20,.6), rgba(8,8,8,.6)); }
.empty-k { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.empty h2, .doc .empty h2 { margin: 0 0 12px; color: var(--ink); font-variation-settings: "wght" 700, "wdth" 110; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.empty p { max-width: 58ch; }
.empty-foot { margin: 22px 0 0; }
.empty-foot a, .doc .empty-foot a { color: var(--ink-2); text-decoration-color: var(--line-2); }

/* ---- utilities ---- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nb { white-space: nowrap; }

@media (max-width: 640px) {
  main.doc { padding: 34px 0 90px; }
  .tile > summary { grid-template-columns: 14px minmax(0, 1fr) 22px; grid-template-areas: "dot title x" ". chip ."; row-gap: 10px; column-gap: 14px; padding: 18px 0; }
  .chip { justify-self: start; }
  .tile-body { padding-left: 0; }
  .tile-lines > div { grid-template-columns: 1fr; gap: 4px; }
  .issue-meta .rule { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .tile[open] > .tile-body, .fold[open] > .issue { animation: sig-in .45s var(--ease); }
  @keyframes sig-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
