/* Segment stylesheet: side-effect pattern (_effects_pattern.html) on /progress. Colours only via var(--gw-*) tokens.
   Shading uses the how-often ramp (--gw-freq-*), never --gw-sev-* (that scale means "how bad").
   Three cell kinds read apart without colour: no data = borderless quiet tint + dash; zero = white, solid outline + 0;
   logged with the effect = filled step 1-3 (step 3 flips to paper text). */

.ep-card{display:flex;flex-direction:column;gap:14px;min-width:0}
/* The finding leads: a step up in size and weight over the 13-15px body lines below it. */
.ep-lead{margin:0;font:700 18px/25px var(--gw-font-ui);color:var(--gw-ink);letter-spacing:-.005em;text-wrap:pretty}
.ep-calm{margin:0;font-size:15px;line-height:22px;color:var(--gw-muted)}

/* Grid: day header once, then each effect as a label line over a 7-column strip. */
.ep-grid{display:flex;flex-direction:column;gap:18px;min-width:0;container-type:inline-size}
.ep-cells{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;min-width:0}
.ep-heads{align-items:end;margin-bottom:-2px;padding-bottom:6px}
.ep-day{min-width:0;text-align:center;font:600 11px/13px var(--gw-font-ui);color:var(--gw-subtle);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:clip}
/* "Shot day" may wrap; all labels share one bottom edge, and a short accent tick marks the anchor column (not colour alone). */
.ep-day.is-shot{position:relative;overflow:visible;color:var(--gw-accent-ink);font-weight:700;white-space:normal;overflow-wrap:normal;hyphens:none}
.ep-day.is-shot::after{content:"";position:absolute;left:50%;bottom:-6px;width:16px;height:2px;margin-left:-8px;border-radius:1px;background:var(--gw-accent-ink)}
.ep-row{display:flex;flex-direction:column;gap:8px;min-width:0}
.ep-name{min-width:0;font:600 14px/20px var(--gw-font-ui);color:var(--gw-ink);overflow-wrap:normal;word-break:normal;hyphens:none}

.ep-cell{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;align-content:center;min-width:0;min-height:44px;padding:2px;overflow:hidden;border-radius:10px;font:700 13px/16px var(--gw-font-ui);font-variant-numeric:tabular-nums;background:var(--gw-surface);color:var(--gw-muted);box-shadow:inset 0 0 0 1px var(--gw-line)}
.ep-n{font-weight:700}
/* The cell the summary names: a ring around it (shape + its printed count, not colour alone). */
.ep-cell.is-peak{overflow:visible;outline:2px solid var(--gw-accent-ink);outline-offset:2px}
/* Denominator is lighter by weight, not opacity: dimmed ink fails AA on freq-2 (3.9:1) and freq-3 (2.4:1). */
.ep-d{font-weight:500}
.ep-l3 .ep-d{color:var(--gw-freq-3-fg-soft)}
/* No data: a near-invisible tint, no edge, so the filled cells lead. */
.ep-cell.is-none{background:var(--gw-freq-none);box-shadow:none;color:var(--gw-subtle);font-weight:400}
.ep-l1,.ep-sw.ep-l1{background:var(--gw-freq-1);color:var(--gw-freq-1-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-1-edge)}
.ep-l2,.ep-sw.ep-l2{background:var(--gw-freq-2);color:var(--gw-freq-2-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-2-edge)}
.ep-l3,.ep-sw.ep-l3{background:var(--gw-freq-3);color:var(--gw-freq-3-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-3-edge)}
.ep-sw.ep-l0{background:var(--gw-surface);box-shadow:inset 0 0 0 1px var(--gw-line)}
/* Narrow strip (phones, big text): count over "/logged", so nothing crosses a cell edge. */
@container (max-width: 360px){
  .ep-cell{flex-direction:column;align-items:center;flex-wrap:nowrap;gap:0}
  .ep-d{font-size:10px;line-height:12px}
}

/* Key: sits right under the grid (tight gap, hairline above), the ramp in four cell-like swatches, then the
   legend sentence; the "Not shown" note follows. */
.ep-key{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;margin-top:-4px;padding-top:12px;border-top:1px dashed var(--gw-line)}
.ep-ramp{display:inline-flex;flex:none;gap:4px}
.ep-key>.ep-fine{flex:1 1 14em}  /* enlarged text: the sentence drops under the swatches instead of a thin column */
.ep-sw{display:block;width:20px;height:20px;border-radius:6px}
.ep-fine{margin:0;font-size:13px;line-height:18px;color:var(--gw-muted);text-wrap:pretty}

/* Table twin: last child of the card, behind a hairline like "How these are counted". */
.ep-twin{margin:2px -16px -16px;border-top:1px solid var(--gw-line)}
.ep-twin>summary{list-style:none;display:flex;align-items:center;gap:12px;min-height:48px;padding:12px 16px;cursor:pointer;font-weight:700;font-size:15px;line-height:20px;color:var(--gw-accent-ink);border-radius:0 0 var(--gw-r-box) var(--gw-r-box)}
.ep-twin>summary::-webkit-details-marker{display:none}
.ep-twin>summary>span{flex:1;min-width:0}
.ep-twin>summary>.gw-icon{flex:none;width:20px;height:20px;color:var(--gw-subtle);transition:transform .24s var(--gw-ease)}
.ep-twin[open]>summary>.gw-icon{transform:rotate(180deg)}
.ep-twin>summary:focus-visible{outline:2px solid var(--gw-accent);outline-offset:-2px}
/* One rule weight throughout: 1px --gw-line under the header and between effects (separate borders, so the
   collapsed-border half-pixel split never renders some rules lighter than others). */
.ep-table{margin:0 16px 12px;width:calc(100% - 32px);font-size:14px;line-height:20px;border-collapse:separate;border-spacing:0}
.ep-table thead th{text-transform:none;letter-spacing:0;font:600 12px/16px var(--gw-font-ui);color:var(--gw-muted);vertical-align:bottom;padding-bottom:6px;border-bottom:1px solid var(--gw-line)}
.ep-table .ep-col-day{width:64px}
.ep-table th,.ep-table td{padding:10px 4px;border-top:0}
.ep-table td:last-child{white-space:nowrap;text-align:right}
.ep-table thead th:last-child{text-align:right}
.ep-table tr.ep-g1>*{border-top:1px solid var(--gw-line)}
.ep-table tbody>tr:first-child>*{border-top:0}
.ep-table tr.ep-gn>*{padding-top:2px}
.ep-table tr.ep-gn>th{font-size:0}  /* same effect as the row above: read aloud, not repeated on screen */
.ep-table tbody th{overflow-wrap:normal;hyphens:none}

/* Frequency list (pill users): one card, hairline rows, count on the right, a quiet proportion meter below. */
.ep-freq>li{min-height:52px;padding:12px 0}
.ep-freq .gw-rowlist-label{overflow-wrap:normal}
.ep-freq .gw-rowlist-meter{background:var(--gw-freq-0)}

/* Empty states: sand card, spot art, the copy and a way to /log. */
.ep-empty{display:flex;align-items:center;gap:16px;padding:20px 16px}
.ep-empty-art{flex:none;display:block;width:112px;height:auto}
.ep-empty-main{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.ep-empty-text{margin:0;font-size:15px;line-height:22px;color:var(--gw-muted);text-wrap:pretty}
.ep-link{display:inline-flex;align-items:center;gap:2px;min-height:44px;margin-bottom:-10px;font-weight:700;font-size:15px;line-height:20px;color:var(--gw-accent-ink);text-decoration:none}
.ep-link .gw-icon{width:18px;height:18px}
.ep-link:hover span,.ep-link:hover{text-decoration:underline;text-underline-offset:3px}
.ep-link:focus-visible{outline:2px solid var(--gw-accent);outline-offset:2px;border-radius:6px}
@media (max-width: 359px){.ep-empty{flex-direction:column;align-items:flex-start}}

/* Safety note: quiet caption under the card, not a second bordered box (By dose above already uses one). */
section.ep>.lp-notes{margin-top:4px;padding:0 4px;border:0;border-radius:0;background:transparent}
section.ep>.lp-notes .lp-note-safe{padding:0;font-size:13px;line-height:19px;color:var(--gw-muted)}
section.ep>.lp-notes .gw-icon{width:16px;height:16px;margin-top:2px}

@media (prefers-reduced-motion:reduce){.ep-twin>summary>.gw-icon{transition:none}}
@media print{
  .ep-cell,.ep-sw{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ep-twin>summary{display:none}
}
/* The fallback tile shares the sand of the card; lift it onto paper so it reads as a slot. */
.ep-empty .gw-spot-fb{background:var(--gw-surface);box-shadow:inset 0 0 0 1px var(--gw-line)}
