/* Normal mode (docs/SCWUB_SIMPLE_MODE.md; "simple" in code): fewer things on screen, larger type, one obvious action per
   page, and never a sideways scroll: tables have fixed column widths and long addresses wrap. Colours come from
   palette.css only. */

/* the header's Simple | Advanced switch */
.mode-switch { display:inline-flex; border:1px solid var(--on-header-muted); border-radius:999px; overflow:hidden; }
.mode-switch button { background:transparent; color:var(--on-header); padding:4px 12px; font-size:12px; font-weight:600; border-radius:0; }
.mode-switch button[aria-pressed="true"] { background:var(--on-header); color:var(--header); }
.mode-switch button:focus-visible { outline:2px solid var(--on-header); outline-offset:-3px; }

.simple-detour { background:var(--sunken); border:1px solid var(--line); border-radius:8px; padding:8px 12px; font-size:14px; margin:0 0 16px; }

.simple { font-size:15px; overflow-wrap:anywhere; }
.simple h1 { font-size:28px; margin:0 0 6px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.simple .s-crumb { font-size:14px; margin:0 0 14px; color:var(--muted); }
.simple .s-sub { color:var(--muted); margin:0 0 6px; }
.simple .s-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.s-scan-pick { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 0; }
.s-scan-pick label { display:inline; flex-direction:row; font-weight:700; }
.s-scan-pick select { width:auto; min-width:0; }
.simple .s-past { background:var(--sunken); border:1px solid var(--line); border-left:4px solid var(--muted); border-radius:8px; padding:10px 14px; margin:0 0 18px; }
.simple .s-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.simple .s-button { background:var(--secondary); color:var(--text); }  /* a link that looks like a secondary button (forms.css) */
.simple .s-button:hover { background:var(--line); }
.simple .s-empty { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:22px; font-size:16px; }
.simple .s-good { border-color:var(--ok); }
.simple .s-note { color:var(--muted); font-size:14px; margin-top:24px; }
.simple .s-h2.s-settings-head { font-size:22px; margin:44px 0 6px; padding-top:22px; border-top:1px solid var(--line); }
.simple .s-settings > h2:first-of-type { margin-top:8px; }
.simple .s-progress { color:var(--active); font-weight:600; margin:4px 0 0; }

/* add a website */
.s-add { display:flex; flex-wrap:wrap; align-items:center; gap:10px; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:16px 18px; margin:16px 0 22px; }
.s-add label { font-weight:700; }
.s-add input { flex:1 1 260px; }

/* tables: fixed layout, so content wraps inside its column instead of widening the page */
.s-table { width:100%; table-layout:fixed; background:var(--panel); border:1px solid var(--line); border-radius:10px; border-collapse:separate; border-spacing:0; overflow:hidden; }
.s-table td, .s-table th { overflow-wrap:anywhere; word-break:normal; }
.s-problems .c-level { width:150px; } .s-problems .c-num { width:80px; } .s-problems .c-since { width:170px; }
.s-pages .c-num { width:120px; }
.s-fixed .c-name { width:36%; } .s-fixed .c-num { width:130px; }
.s-sites .c-when { width:130px; } .s-sites .c-num { width:110px; } .s-sites .c-change { width:170px; } .s-sites .c-act { width:130px; }
/* Between the card layout (640px) and about 900px those widths add up to more than the screen: share it out instead. */
@media (min-width:640.02px) and (max-width:900px) { .s-sites .c-when { width:15%; } .s-sites .c-num { width:13%; } .s-sites .c-change { width:17%; } .s-sites .c-act { width:136px; }
  .s-sites th, .s-sites td { padding-left:10px; padding-right:10px; } .s-sites th { overflow-wrap:normal; } .s-sites th.num { white-space:normal; } }
.s-where .c-page { width:28%; } .s-where.with-target .c-page { width:22%; } .s-where .c-target { width:28%; }
.s-where .c-since { width:130px; } .s-where .c-act { width:130px; }
.s-table th { font-size:13px; color:var(--muted); font-weight:600; background:var(--sunken); }
.s-table td, .s-table th { padding:12px 14px; }
.s-table tbody tr:last-child td { border-bottom:0; }
.s-table tbody tr:hover td { background:color-mix(in srgb, var(--panel) 80%, var(--line-strong)); }
.s-table .num { text-align:right; white-space:nowrap; }
.s-table .s-act { text-align:right; }
.s-site, .s-problem { font-weight:700; font-size:16px; }
.s-host { color:var(--muted); font-size:13px; }
.s-count { font-weight:700; font-size:17px; color:var(--text); text-decoration:none; }
.s-count.s-fix { color:var(--attention-text); }
.s-count.s-check { color:var(--warn-text); }
.s-fixed-link { color:var(--ok-text); } .s-new-link { color:var(--new-text); }

/* the summary tiles on a site */
.s-tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin:0 0 18px; }
.s-tile { display:flex; flex-direction:column; gap:2px; background:var(--sunken); border:1px solid var(--line); border-left-width:5px; border-radius:10px; padding:14px 16px; color:var(--text); text-decoration:none; }
.s-tile:hover { border-color:var(--line-strong); }
.s-tile.on { outline:2px solid var(--focus); outline-offset:-2px; }
.s-tile .n { font-size:32px; font-weight:800; line-height:1.1; }
.s-tile .l { color:var(--muted); font-size:14px; }
.s-tile-fix { border-left-color:var(--high); } .s-tile-fix .n { color:var(--attention-text); }
.s-tile-check { border-left-color:var(--low); } .s-tile-check .n { color:var(--warn-text); }
.s-tile-minor { border-left-color:var(--info); }
.s-tile-new { border-left-color:var(--new); } .s-tile-new .n { color:var(--new-text); }
.s-tile-ok { border-left-color:var(--ok); } .s-tile-ok .n { color:var(--ok-text); }

.s-tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin:0 0 14px; }
.s-tabs .tab { font-size:15px; margin-bottom:-1px; }
.s-chips { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.s-chip { padding:5px 14px; border-radius:999px; border:1px solid var(--line); color:var(--soft); text-decoration:none; font-size:14px; }
.s-chip:hover { border-color:var(--line-strong); }
.s-chip.on { background:var(--header); border-color:var(--header); color:var(--on-header); font-weight:700; }

/* priority and change labels */
.s-level { display:inline-block; padding:3px 10px; border-radius:999px; font-size:13px; font-weight:700; white-space:nowrap; color:var(--on-fill); vertical-align:middle; }
.s-level.s-needs_attention { background:var(--fill-attention); }
.s-level.s-review { background:var(--fill-review); }
.s-level.s-informational { background:var(--fill-quiet); color:var(--text); }
.s-level.s-coverage_warning { background:var(--fill-neutral); }
.simple .s-notchecked { margin:-6px 0 16px; }
.s-ok-text { color:var(--ok-text); }
.s-since { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; background:var(--sunken); color:var(--soft); }
.s-since.s-new, .s-since.s-came-back { background:color-mix(in srgb, var(--new) 30%, var(--sunken)); color:var(--new-text); }
.s-since.s-ok { background:color-mix(in srgb, var(--ok) 25%, var(--sunken)); color:var(--ok-text); }

/* one problem */
.s-explain { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px; margin:0 0 8px; }
.s-explain > div { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px 18px; }
.s-explain h2 { font-size:15px; margin:0 0 6px; color:var(--muted); }
.s-explain p { margin:0; line-height:1.5; }
.s-options { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px 18px; margin:0 0 8px; }
.s-options h2 { font-size:15px; margin:0 0 6px; color:var(--muted); }
.s-options ol { margin:0; padding-left:22px; line-height:1.5; } .s-options li + li { margin-top:6px; }
.simple .s-h2 { font-size:18px; margin:24px 0 10px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.s-quote { color:var(--muted); font-style:italic; font-size:14px; margin-top:4px; }
.s-target { font-size:14px; }
.s-ext { text-decoration:none; margin-left:4px; }
.s-link-button { background:transparent; color:var(--accent); padding:0; font-weight:400; text-decoration:underline; }
.s-act form { display:inline; }
.s-more { margin-left:12px; font-size:14px; white-space:nowrap; }

/* On a phone: one card per page the phone check opened */
.s-phones { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px; }
.s-phone { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px; }
.s-phone.has-problems { border-color:var(--high); }
.s-phone img { display:block; width:100%; height:auto; max-height:460px; object-fit:cover; object-position:top; border-radius:6px; background:var(--shot-bg); }
.s-phone-url { font-weight:700; margin:10px 0 6px; }
.s-phone-problems { margin:0; padding-left:0; list-style:none; }
.s-phone-problems li { margin:6px 0; }
.s-pager { display:flex; gap:16px; align-items:center; margin:14px 0; }
.s-search { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:0 0 14px; }
.s-search input { flex:0 1 320px; }
.s-section { margin-bottom:8px; }
.s-result-line { font-size:16px; margin:6px 0 14px; }
.s-hit { margin:0 0 12px; }
.s-hit-url { font-weight:700; margin:0 0 6px; }
.s-where-label { color:var(--muted); font-size:13px; }
.simple mark, .s-searchbox mark { background:var(--low); color:var(--on-badge); border-radius:3px; padding:0 2px; }
.s-searchbox .s-sub { color:var(--muted); margin:0 0 6px; }
.s-searchbox { overflow-wrap:anywhere; }
.s-repeated { background:var(--sunken); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.s-repeated h3, .s-own-heading { font-size:16px; margin:0 0 6px; }
.s-own-heading { margin:16px 0 8px; }
.s-only-repeated { margin:0 0 0 2px; font-size:14px; }
.s-list { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px 18px 12px 36px; margin:0; }
.s-list li { margin:6px 0; }
/* whole words, the scan before, watch words, every site (docs/SCWUB_WATCH_WORDS_AND_CHECKS.md) */
.s-check-label { display:inline-flex; flex-direction:row; gap:6px; align-items:center; font-weight:400; white-space:nowrap; }
.s-previous { margin:-8px 0 14px; color:var(--muted); }
.s-previous .s-down { color:var(--ok-text); }
.s-previous .s-up { color:var(--high-text); }
.s-watch-this { margin:0 0 14px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.s-watch { margin-top:22px; padding-top:14px; border-top:1px solid var(--line); }
.s-watch h3 { font-size:16px; margin:0 0 6px; }
.s-watch-list { list-style:none; padding:0; margin:0 0 12px; }
.s-watch-list li { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:6px 0; }
.s-watch-word { font-weight:700; }
.s-all-table td, .s-all-table th { overflow-wrap:anywhere; }

/* the Download menu */
.s-menu { position:relative; }
.s-menu summary { list-style:none; cursor:pointer; padding:9px 16px; border-radius:6px; background:var(--secondary); color:var(--text); font-weight:700; }
.s-menu summary::-webkit-details-marker { display:none; }
.s-menu summary::after { content:" ▾"; }
.s-menu-list { position:absolute; right:0; top:calc(100% + 6px); z-index:5; min-width:260px; display:flex; flex-direction:column; background:var(--sunken); border:1px solid var(--line-strong); border-radius:8px; box-shadow:0 8px 24px var(--shadow); padding:6px; }
.s-menu-list a, .s-menu-list button { display:block; text-align:left; padding:9px 12px; border-radius:6px; text-decoration:none; color:var(--text); background:transparent; font:inherit; font-weight:600; }
.s-menu-list a:hover, .s-menu-list a:focus-visible, .s-menu-list button:hover, .s-menu-list button:focus-visible { background:var(--panel); }
.s-menu-list span { display:block; font-weight:400; font-size:12px; color:var(--muted); }
.s-menu-list hr { border:0; border-top:1px solid var(--line); margin:6px 4px; }
.s-copy-status { margin:6px 0 0; font-weight:600; color:var(--ok-text); }
.s-copy-status.failed { color:var(--high-text); }

@media (max-width:640px) {
  /* tables become one card per row, each value with its column name */
  .s-table thead { display:none; }
  .s-table, .s-table tbody, .s-table tr, .s-table td { display:block; width:100%; box-sizing:border-box; }
  .s-table tr { border-bottom:1px solid var(--line); padding:8px 0; }
  .s-table tbody tr:last-child { border-bottom:0; }
  .s-table td { border:0; padding:4px 14px; }
  .s-table td[data-label]::before { content:attr(data-label) ": "; color:var(--muted); font-size:13px; }
  .s-table .num, .s-table .s-act { text-align:left; }
  .simple h1 { font-size:22px; }
  .s-menu-list { right:auto; left:0; }
  .s-tiles { grid-template-columns:repeat(2, 1fr); }
  .s-tile .n { font-size:26px; }
}

/* Graphs of a site over its scans (ui/trends.py, _graphs.html), in both modes. The series keep the colours the tiles use.
   Each graph is drawn at three sizes so its text stays readable; one is shown. */
.t-charts { margin:0 0 18px; }
.t-chart { background:var(--sunken); border:1px solid var(--line); border-radius:10px; padding:14px 16px 8px; margin:0 0 14px; }
.t-chart h3 { margin:0; font-size:16px; color:var(--text); }
.t-chart p { margin:2px 0 6px; font-size:13px; color:var(--muted); }
.t-legend { display:flex; flex-wrap:wrap; gap:4px 14px; list-style:none; margin:0 0 4px; padding:0; font-size:13px; color:var(--muted); }
.t-legend li { display:inline-flex; align-items:center; gap:6px; }
.t-svg { display:none; width:100%; height:auto; overflow:visible; }
.t-svg text { font-size:12px; fill:var(--muted); pointer-events:none; }
.t-svg .t-end { fill:var(--text); font-size:13px; }
.t-grid { stroke:var(--line); stroke-width:1; }
.t-mark { stroke:var(--line-strong); stroke-width:1; pointer-events:none; }
.t-line { fill:none; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; pointer-events:none; }
.t-dot { stroke:var(--sunken); stroke-width:2; pointer-events:none; }
.t-bar { pointer-events:none; }
.t-col rect { fill:transparent; }
.t-col line { stroke:var(--muted); stroke-width:1; visibility:hidden; pointer-events:none; }
.t-col.on rect { fill:color-mix(in srgb, var(--text) 8%, transparent); }
.t-col:hover rect { fill:color-mix(in srgb, var(--text) 10%, transparent); }
.t-col:hover line, .t-col:focus line { visibility:visible; }
.t-col:focus { outline:none; }
.t-col:focus-visible rect { fill:color-mix(in srgb, var(--text) 10%, transparent); stroke:var(--focus); stroke-width:2; }
.t-line.t-high { stroke:var(--high); } .t-line.t-low { stroke:var(--low); } .t-line.t-info { stroke:var(--info); } .t-line.t-pages { stroke:var(--accent); }
.t-dot.t-high { fill:var(--high); } .t-dot.t-low { fill:var(--low); } .t-dot.t-info { fill:var(--info); } .t-dot.t-pages { fill:var(--accent); }
.t-bar.t-new { fill:var(--new); } .t-bar.t-ok { fill:var(--ok); }
.t-key { display:inline-block; flex:none; width:14px; height:2px; border-radius:1px; vertical-align:middle; margin-right:6px; }
.t-key.t-high { background:var(--high); } .t-key.t-low { background:var(--low); } .t-key.t-info { background:var(--info); }
.t-key.t-pages { background:var(--accent); } .t-key.t-new { background:var(--new); } .t-key.t-ok { background:var(--ok); }
.t-legend .t-key.t-new, .t-legend .t-key.t-ok { width:12px; height:12px; border-radius:3px; }
.t-legend .t-key { margin-right:0; }
.t-tip { position:fixed; z-index:50; pointer-events:none; background:var(--panel); border:1px solid var(--line-strong); border-radius:8px; padding:8px 12px; font-size:13px; color:var(--muted); box-shadow:0 4px 14px var(--shadow); max-width:280px; }
.t-tip strong { color:var(--text-strong); }
.t-tip-when { color:var(--text); font-weight:600; margin-bottom:4px; }
.t-tip-note { margin-top:4px; }
.t-note { font-size:13px; color:var(--muted); margin:0 0 12px; }
.t-numbers { margin:0 0 18px; }
.t-numbers summary { cursor:pointer; font-weight:600; }
.t-table { margin-top:8px; font-size:14px; }
.t-table .c-level { width:16%; } .t-table .c-num { width:9%; }
.t-table td, .t-table th { padding:10px 6px; }
.t-table th { font-size:12px; padding-inline:4px; }
.t-table th.num { white-space:normal; }
.t-table td.num { font-variant-numeric:tabular-nums; }
@media (min-width:1000px) { .t-wide { display:block; } }
@media (min-width:600px) and (max-width:999.98px) { .t-mid { display:block; } }
@media (max-width:599.98px) { .t-narrow { display:block; } }

/* What's in the stored data (docs/SCWUB_WEBSITE_DATA.md): shared by both modes. */
.i-h { font-size:17px; margin:26px 0 8px; }
.i-sub { color:var(--muted); font-size:14px; margin:0 0 10px; }
.i-summary { margin:14px 0; }
.i-empty { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:18px; font-size:15px; }
.i-good { border-color:var(--ok); }
.i-note { background:var(--sunken); border:1px solid var(--line); border-radius:8px; padding:10px 14px; font-size:14px; margin:10px 0; }
.i-download { font-size:14px; margin-left:auto; }
.i-list, .i-edits { list-style:none; margin:0; padding:0; background:var(--panel); border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.i-list li, .i-edits li { padding:10px 14px; border-bottom:1px solid var(--line); }
.i-list li:last-child, .i-edits li:last-child { border-bottom:0; }
.i-pair { margin-top:6px; font-size:14px; }
.i-pair-label { display:inline-block; min-width:96px; color:var(--muted); font-size:13px; }
.i-diff { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:6px 16px; overflow-wrap:anywhere; }
.i-diff p { margin:12px 0; }
.i-edits del, .i-list del, .i-diff del, .i-sub del { color:var(--attention-text); text-decoration:line-through; }
.i-edits ins, .i-list ins, .i-diff ins, .i-sub ins { color:var(--ok-text); text-decoration:underline; }
.i-table .c-name { width:28%; } .i-table .c-page { width:auto; } .i-table .c-level { width:21%; } .i-table .c-num { width:15%; }
.i-table .num { white-space:normal; }
.i-table .s-level { display:inline-block; white-space:normal; line-height:1.25; }
.i-pages { margin-top:6px; font-size:14px; }
.i-pages summary { cursor:pointer; color:var(--muted); }
.i-pages ul { margin:6px 0 0; padding-left:18px; }
.i-phones { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:16px; margin-top:14px; }
.i-phone-pair { margin:0; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px; overflow-wrap:anywhere; }
.i-phone-pair figcaption { margin-bottom:8px; font-size:14px; }
.i-phone-shots { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.i-phone-shots .i-sub { margin:0 0 4px; }
.i-phone-shots img { display:block; width:100%; height:auto; max-height:460px; object-fit:cover; object-position:top; border-radius:6px; background:var(--shot-bg); }
@media (max-width:400px) { .i-phones { grid-template-columns:minmax(0, 1fr); } }
