/* 702Greens Operations · components shared by both looks: brand tokens, reason chips, Waste, Guide, Welcome.
   Always loaded. The new look's restyle of older screens lives in design.css, which people can switch off. */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --brand: #144444; --brand-deep: #0A2A2A; --brand-hover: #1B5656;
  --accent: #A4CD3A; --accent-hover: #B8DB55; --accent-soft: #EEF5DC;
  --bg: #FAFAFA; --bg-alt: #F5F5F7; --surface: #FFFFFF; --border: #E8E8E8; --hairline: rgba(10, 42, 42, .07);
  --text: #1D1D1F; --text-2: #6E6E73; --text-3: #86868B;
  --ok: #1E7F3C; --ok-soft: #EAF7EE; --warn: #9A5B00; --warn-soft: #FFF4E0; --error: #C4161C; --error-soft: #FFEDEE; --info: #0A5CC2; --info-soft: #EAF2FF;
  --r-input: 12px; --r-card: 20px; --r-hero: 24px; --r-pill: 100px;
  --shadow-1: 0 1px 2px rgba(10, 42, 42, .04), 0 1px 1px rgba(10, 42, 42, .02);
  --shadow-2: 0 14px 34px rgba(10, 42, 42, .08), 0 2px 6px rgba(10, 42, 42, .04);
  --shadow-3: 0 30px 80px rgba(10, 42, 42, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

.nav-glyph { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Choice chips: reasons, stages, conditions. */
.choice-chips { min-width: 0; margin: 8px 0 14px; padding: 0; border: 0; }
.choice-chips > legend { margin-bottom: 10px; padding: 0; }
.choice-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; top: 50%; left: 18px; width: 1px; height: 1px; margin: 0; opacity: 0; }
.choice-chips .chip > span { display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding: 0 16px; color: var(--text); border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.25; text-transform: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.choice-chips .chip > span:hover { border-color: var(--brand); }
.choice-chips .chip > input:checked + span { color: #fff; border-color: var(--brand); background: var(--brand); }
.choice-chips .chip > input:focus-visible + span { box-shadow: 0 0 0 4px rgba(20, 68, 68, .15); }
.choice-chips .chip-quiet > span { color: var(--text-2); border-style: dashed; }
.choice-chips { grid-column: 1 / -1; }
.choice-list { border-color: var(--border); border-radius: var(--r-card); }
.choice-row + .choice-row { border-color: var(--border); }

/* ── Design system blocks (new screens) ─────────────────────────────────── */
.ds { display: grid; gap: 16px; }
.ds-eyebrow { margin: 0 0 8px; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ds-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ds-title { margin: 0; color: var(--brand); font-size: clamp(28px, 6vw, 40px); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; }
.ds-dot { color: var(--accent); }
.ds-sub { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.ds-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1.5px solid transparent; border-radius: var(--r-pill); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease); }
.ds-button-primary { color: var(--brand); border-color: var(--accent); background: var(--accent); }
.ds-button-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.ds-button-dark { color: #fff; border-color: var(--brand); background: var(--brand); }
.ds-button-dark:hover { background: var(--brand-deep); }
.ds-button-outline { color: var(--brand); border-color: var(--brand); background: transparent; }
.ds-text-button { padding: 8px 0; color: var(--brand); border: 0; background: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ds-segment { display: inline-flex; width: fit-content; max-width: 100%; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: #EEEEF0; }
.ds-segment button { min-height: 36px; padding: 0 16px; color: var(--text-2); border: 0; border-radius: var(--r-pill); background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.ds-segment button[aria-selected="true"] { color: var(--brand); background: var(--surface); box-shadow: 0 1px 3px rgba(10, 42, 42, .12), 0 1px 1px rgba(10, 42, 42, .04); }
.ds-card { padding: 22px; }
.ds-card-title { margin: 0 0 14px; font-size: 13px; color: var(--text-3); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ds-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-stat { padding: 20px 20px 18px; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); }
.ds-stat-value { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--brand); }
.ds-stat-value span { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ds-stat-value small { color: var(--text-2); font-size: 15px; font-weight: 500; }
.ds-stat-caption { margin: 10px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.ds-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ds-columns > .ds-card:only-child { grid-column: 1 / -1; }
.ds-bars { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ds-bar-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.ds-bar-head span { color: var(--text); }
.ds-bar-head b { color: var(--text-2); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ds-bar { height: 6px; overflow: hidden; border-radius: 3px; background: #F0F0F2; }
.ds-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--brand); transition: width .6s var(--ease); }
.ds-entries { display: grid; margin: 0; padding: 0; list-style: none; }
.ds-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 0; }
.ds-entry + .ds-entry { border-top: 1px solid var(--border); }
.ds-entry-main { min-width: 0; }
.ds-entry-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.ds-entry-title b { color: var(--text); font-size: 15px; font-weight: 600; }
.ds-entry-title span { color: var(--brand); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-entry-meta { margin: 2px 0 0; color: var(--text); font-size: 14px; }
.ds-entry-meta em { color: var(--text-3); font-style: normal; }
.ds-entry-sub { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.ds-entry-note { margin: 6px 0 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.ds-footnote { margin: 12px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.ds-empty { padding: 36px 24px; text-align: center; }
.ds-empty p { margin: 0 auto; max-width: 42ch; color: var(--text-2); }
.ds-empty .ds-empty-title { margin-bottom: 6px; color: var(--brand); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.ds-quiet { background: var(--bg-alt); box-shadow: none; }
.ds-quiet > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.ds-quiet > summary::-webkit-details-marker { display: none; }
.ds-quiet > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg); transition: transform .2s var(--ease); }
.ds-quiet[open] > summary::after { transform: rotate(-135deg); }
.ds-quiet > summary b { display: block; color: var(--brand); font-weight: 600; }
.ds-quiet > summary small { color: var(--text-2); font-size: 13px; }
.ds-attention { border-color: rgba(154, 91, 0, .14); background: var(--warn-soft); box-shadow: none; }
.ds-attention .ds-card-title { color: var(--warn); }
.ds-attention p { margin: 0 0 12px; color: var(--text); }
.ds-mini-list { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.ds-mini-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; }
.ds-mini-list small { grid-column: 1 / -1; color: var(--text-2); }
@media (max-width: 767px) {
  .ds-head { align-items: flex-start; flex-direction: column; }
  .ds-head .ds-button { width: 100%; }
  .ds-stats { grid-template-columns: 1fr; }
  .ds-stat { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 16px 18px; }
  .ds-stat-caption { margin: 0; }
  .ds-stat-value span { font-size: 32px; }
  .ds-columns { grid-template-columns: 1fr; }
  .ds-card { padding: 18px; }
  .ds-segment { width: 100%; }
  .ds-segment button { flex: 1 1 0; padding: 0 8px; }
}

/* ── Guide and welcome ──────────────────────────────────────────────────── */
.guide-hero { padding: 8px 0 4px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide-card { display: grid; gap: 6px; align-content: start; min-height: 132px; padding: 20px; color: inherit; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); text-align: left; font: inherit; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.guide-card .guide-number { color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.guide-card b { color: var(--brand); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.guide-card span:last-child { color: var(--text-2); font-size: 14px; line-height: 1.45; }
@media (hover: hover) { .guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); } }
.guide-detail { display: grid; gap: 18px; max-width: 720px; }
.guide-detail > .more-back { justify-self: start; }
@media (max-width: 767px) { .guide-card { min-height: 0; padding: 18px; } }
.guide-where { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-size: 13px; }
.guide-where span { padding: 4px 10px; color: var(--brand); border-radius: var(--r-pill); background: var(--bg-alt); font-weight: 600; }
.guide-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.guide-steps li { position: relative; padding: 16px 0 16px 48px; counter-increment: step; }
.guide-steps li + li { border-top: 1px solid var(--border); }
.guide-steps li::before { content: counter(step); position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 30px; height: 30px; color: var(--brand); border-radius: 50%; background: var(--accent-soft); font-size: 13px; font-weight: 700; }
.guide-steps b { display: block; color: var(--text); font-size: 16px; font-weight: 600; }
.guide-steps p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.guide-press { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; color: var(--brand); border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.guide-good { padding: 18px 20px; border-radius: var(--r-card); background: var(--accent-soft); }
.guide-good b { color: var(--brand); }
.guide-good p { margin: 4px 0 0; color: var(--brand); }
.guide-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.guide-help-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--text-2); border: 0; border-radius: 50%; background: var(--bg-alt); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.guide-help-button:hover { color: var(--brand); }

.welcome { width: min(440px, calc(100% - 24px)); padding: 0; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-3); }
.welcome-inner { display: grid; gap: 22px; padding: 36px 28px 28px; }
.welcome-mark { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.welcome-slide { display: grid; gap: 12px; min-height: 248px; align-content: start; }
.welcome-slide h2 { margin: 0; color: var(--brand); font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.welcome-slide p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.welcome-slide ul { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--text); font-size: 15px; }
.welcome-slide li { display: flex; gap: 10px; }
.welcome-slide li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--accent); }
.welcome-dots { display: flex; gap: 6px; }
.welcome-dots i { width: 6px; height: 6px; border-radius: 3px; background: #D1D1D6; transition: width .25s var(--ease), background-color .25s var(--ease); }
.welcome-dots i.on { width: 20px; background: var(--brand); }
.welcome-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 767px) {
  dialog.welcome { width: 100%; max-width: 100%; margin: auto auto 0; border-radius: 28px 28px 0 0; }
  .welcome-inner { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@keyframes ds-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ds-fade { from { opacity: 0; } to { opacity: 1; } }

/* App usage */
.usage-hours { display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); align-items: end; gap: 4px; height: 132px; padding-top: 8px; }
.usage-hours > span { display: grid; grid-template-rows: 1fr auto; align-items: end; height: 100%; min-width: 0; }
.usage-hours i { display: block; width: 100%; height: 0; min-height: 2px; border-radius: 4px 4px 2px 2px; background: var(--brand); transition: height .6s var(--ease); }
.usage-hours small { height: 16px; margin-top: 6px; color: var(--text-3); font-size: 10px; text-align: center; white-space: nowrap; }
.usage-quality li .ds-footnote { margin-top: 6px; }

/* Experiments (Grow → Experiments) */
.experiments-host { margin-top: 8px; }
.xp-list { display: grid; gap: 12px; }
.xp-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; padding: 14px; color: inherit; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); font: inherit; text-align: left; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
@media (hover: hover) { .xp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); } }
.xp-thumb { display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 14px; background: var(--bg-alt); }
.xp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xp-thumb-initial { color: var(--brand); font-size: 24px; font-weight: 600; }
.xp-thumb-video { position: relative; display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); }
.xp-thumb-video::after { content: ""; position: absolute; top: 8px; left: 11px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #fff; }
.xp-card-body { display: grid; gap: 3px; min-width: 0; }
.xp-kind { color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.xp-card-body b { color: var(--brand); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.xp-change { display: -webkit-box; overflow: hidden; color: var(--text-2); font-size: 14px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.xp-meta { color: var(--text-3); font-size: 13px; }
.xp-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xp-text { margin: 0; color: var(--text); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.xp-sub-title { margin-top: 18px; }
.xp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xp-section-head .ds-card-title { margin-bottom: 8px; }
.xp-role { padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.xp-role.test { color: #fff; background: var(--brand); }
.xp-role.normal { color: var(--text-2); background: var(--bg-alt); }
.xp-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.xp-metric { display: grid; align-content: start; gap: 4px; padding: 14px; border-radius: 16px; background: var(--bg-alt); }
.xp-metric span { color: var(--text-2); font-size: 12px; font-weight: 600; }
.xp-metric b { color: var(--brand); font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.xp-metric small { color: var(--text-3); font-size: 12px; }
.xp-metric em { font-size: 13px; font-style: normal; font-weight: 700; }
.xp-metric em.up { color: var(--ok); }
.xp-metric em.down { color: var(--error); }
.xp-entries { display: grid; gap: 0; }
.xp-entry { padding: 14px 0; }
.xp-entry + .xp-entry { border-top: 1px solid var(--border); }
.xp-entry header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.xp-entry header b { color: var(--text); font-size: 14px; }
.xp-entry header span { color: var(--text-3); font-size: 13px; }
.xp-entry header .ds-text-button { margin-left: auto; padding: 0; }
.xp-entry p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.xp-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.xp-media img, .xp-media video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--bg-alt); }
.xp-decision .xp-outcome { margin: 0 0 6px; color: var(--brand); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.xp-decision.keep { background: var(--accent-soft); box-shadow: none; }
.xp-decision.drop { background: var(--bg-alt); box-shadow: none; }
.xp-decide-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xp-manage { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.xp-files { display: grid; gap: 8px; margin-top: 8px; }
.xp-file-button { justify-self: start; }
.xp-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.xp-preview { display: grid; gap: 4px; margin: 0; }
.xp-preview img, .xp-preview .xp-thumb-video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg-alt); }
.xp-preview .xp-thumb-video { width: 100%; height: auto; border-radius: 10px; }
.xp-preview figcaption { overflow: hidden; color: var(--text-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.xp-link-list { display: grid; gap: 4px; }
.xp-link-row { display: grid; gap: 8px; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--border); }
.xp-link-row legend { display: grid; float: left; width: 100%; padding: 0; text-transform: none; letter-spacing: 0; }
.xp-link-row legend b { color: var(--text); font-size: 15px; }
.xp-link-row legend span { color: var(--text-3); font-size: 13px; }
.xp-link-row > div { display: flex; flex-wrap: wrap; gap: 6px; clear: both; }
.xp-photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.xp-photo-pick { position: relative; display: block; cursor: pointer; }
.xp-photo-pick img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid transparent; border-radius: 12px; }
.xp-photo-pick input { position: absolute; top: 6px; left: 6px; }
.xp-photo-pick input:checked + img { border-color: var(--brand); }
@media (max-width: 767px) {
  .xp-card { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .xp-thumb { width: 60px; height: 60px; }
  .xp-results { grid-template-columns: 1fr; }
  .xp-metric { grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 12px 14px; }
  .xp-metric em { justify-self: end; }
  .xp-head-actions { width: 100%; }
  .xp-head-actions .ds-button { flex: 1 1 auto; }
}
.xp-list-head .ds-title { font-size: clamp(24px, 5vw, 32px); }
.xp-detail > .more-back { justify-self: start; }
.xp-media:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 400px; }
.xp-media > :only-child img, .xp-media > video:only-child { aspect-ratio: 4 / 3; }
.xp-entry header .ds-text-button, .xp-manage [data-xp-archive] { color: var(--text-3); font-weight: 600; letter-spacing: .04em; }
.choice-chips > .xp-photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.choice-chips.xp-link-row { margin: 0; }
.xp-link-row .chip > span { min-height: 34px; padding: 0 14px; font-size: 13px; }
/* Experiment forms: each label sits with its own field, with clear air above it. */
.xp-dialog #xpDialogBody { display: grid; gap: 22px; align-content: start; }
.xp-dialog #xpDialogBody > * { margin: 0; }
.xp-dialog #xpDialogBody .inventory-field { gap: 8px; }
.xp-dialog [data-xp-keep]:not([hidden]) { display: grid; gap: 22px; }
.xp-dialog [data-xp-keep] > * { margin: 0; }
.xp-nowrap { white-space: nowrap; }
/* Guide video links: the Drive tip, and each pasted link checked as it is typed. */
.video-link-help { margin: 0 0 8px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.video-link-status { margin: 8px 0 0; font-size: 13px; font-weight: 600; line-height: 1.45; }
.video-link-status:empty { display: none; }
.video-link-status.is-ok { color: var(--ok); }
.video-link-status.is-error { color: var(--error); }
#editSopVideos[aria-invalid="true"] { border-color: var(--error); }
/* Guide editor on phones: × closes, so Cancel steps aside; the two choices share a row and Save takes the full width. */
@media (max-width: 760px) {
  #sopEditorDialog .editor-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  #sopEditorDialog .editor-actions .editor-save-note { grid-column: 1 / -1; }
  #sopEditorDialog .editor-actions [data-close="sopEditorDialog"], #sopEditorDialog .editor-actions .button[hidden] { display: none; }
  #sopEditorDialog .editor-actions .button { width: 100%; min-width: 0; white-space: nowrap; }
  #sopEditorDialog .editor-actions #saveSopDraftButton,
  #sopEditorDialog .editor-actions:has(#requestSopReviewButton[hidden]) #deleteSopEditorButton,
  #sopEditorDialog .editor-actions:has(#deleteSopEditorButton[hidden]) #requestSopReviewButton { grid-column: 1 / -1; }
}
/* Videos from the video service: a calm dark frame that says what is happening until the player is ready. */
.stream-player { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #0f1d1c; }
.stream-player.is-portrait { width: min(100%, 360px); margin-inline: auto; }
.stream-player iframe, .sop-video .stream-player iframe { display: block; width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; background: transparent; }
.stream-status { margin: 0; padding: 18px; color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.5; text-align: center; }
.xp-stream { max-width: 520px; margin-top: 10px; }
.media-stream-thumb { position: relative; display: block; width: 100%; height: 100%; background: #0f1d1c; }
.media-stream-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-play { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .92); }
.media-play::after { content: ''; position: absolute; top: 10px; left: 13px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #144444; }
/* "So far" holds three short numbers: on phones they sit side by side. */
@media (max-width: 767px) {
  .xp-results.xp-sofar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .xp-sofar .xp-metric { grid-template-columns: 1fr; align-content: space-between; padding: 12px; }
}
/* Who watched (managers): four numbers, one quiet line chart, then the people. */
.stream-block { display: grid; gap: 10px; }
.stream-stats { border-top: 1px solid var(--hairline); padding-top: 8px; }
.stream-stats > summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.stream-stats-body { display: grid; gap: 14px; margin-top: 12px; }
.stream-stats-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stream-stat { display: grid; align-content: space-between; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg-alt); }
.stream-stat span { color: var(--text-2); font-size: 12px; font-weight: 600; }
.stream-stat b { color: var(--brand); font-size: 20px; font-weight: 600; }
.stream-stats-note { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.stream-curve { display: grid; gap: 6px; margin: 0; }
.stream-curve-title { color: var(--text); font-size: 13px; font-weight: 700; }
.stream-curve-box { position: relative; width: 100%; height: 168px; border-radius: 8px; outline-offset: 2px; touch-action: pan-y; }
.stream-curve-box:focus-visible { outline: 2px solid var(--brand); }
.stream-curve-box svg { display: block; overflow: visible; }
.stream-curve-box .grid { stroke: var(--border); stroke-width: 1; }
.stream-curve-box .tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.stream-curve-box .area { fill: var(--brand); fill-opacity: .1; stroke: none; }
.stream-curve-box .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.stream-curve-box .end { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.stream-curve-box .end-label { fill: var(--text); font-size: 12px; font-weight: 700; }
.stream-curve-box .cross { stroke: var(--text-3); stroke-width: 1; }
.stream-curve-tip { position: absolute; top: 0; width: 150px; padding: 6px 8px; border-radius: 8px; background: var(--surface); box-shadow: 0 4px 16px rgba(10, 42, 42, .12); color: var(--text-2); font-size: 12px; pointer-events: none; }
.stream-curve-tip b { color: var(--text); font-size: 13px; }
.stream-curve-table > summary { cursor: pointer; color: var(--text-2); font-size: 12px; }
.stream-people { width: 100%; border-collapse: collapse; font-size: 13px; }
.stream-people th { padding: 6px 8px 6px 0; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.stream-people td { padding: 8px 8px 8px 0; color: var(--text); border-bottom: 1px solid var(--hairline); }
.stream-people .num { font-variant-numeric: tabular-nums; }
