/* ==========================================================================
   rssnews.io workspace shell
   Workspace redesign, phase 1 (2026-10-31): app bar, left rail, right rail,
   breakpoints, phone bottom nav. Brief: REDESIGN-BRIEF-2026-10-31-workspace.md
   §3, §7, §9, §11. Mockup: mockups/workspace-2026-10-31.webp.

   Loaded last, after editorial.css, by index.html only. Colours, type and
   radii come from the editorial.css tokens; this file adds layout tokens and
   the eight section colours. Where custom.css fights the shell it is
   outranked here (an id or a second class), not edited.

   Breakpoints
     < 768       phone: no rails, compact app bar, bottom nav
     768-1199    main column + the left rail as a drawer (toggle in the app bar)
     1200-1439   three columns, adaptive widths
     >= 1440     full workspace: left 216, right 280, main 660-890
   ========================================================================== */

:root {
  --appbar-h: 64px;
  --bottomnav-h: 56px;
  /* The container stops at 1480px: with a 216px and a 280px rail the main
     column then stays at 848-888px from 1440px up (brief: ~660-850). */
  --ws-max: 1480px;
  --ws-gap: clamp(16px, 1.5vw, 24px);
  --ws-left: clamp(200px, 15vw, 216px);
  --ws-right: clamp(260px, 19.5vw, 280px);

  /* Section colours: small dots only (Τα θέματά μου). Decorative: the label
     beside each dot carries the meaning. Red stays the signal colour. */
  --sec-politics: #C8622E;
  --sec-greece: #2F6FD6;
  --sec-sports: #2E9461;
  --sec-world: #1F4E8C;
  --sec-lifestyle: #C2558F;
  --sec-business: #C9921A;
  --sec-tech: #6E56CF;
  --sec-education: #138A8A;
}
:root.dark {
  --sec-politics: #E58A5C;
  --sec-greece: #6EA0F0;
  --sec-sports: #5CC08D;
  --sec-world: #7FA6DE;
  --sec-lifestyle: #E487B8;
  --sec-business: #E5B84E;
  --sec-tech: #A493F0;
  --sec-education: #4FC2C2;
}
@media (max-width: 767px) {
  :root { --appbar-h: 56px; }
}

/* custom.css sets every p/li/span/div to 1rem/1.6. Inside the shell's own
   parts they follow their parent instead (same specificity, loaded later). */
:where(.ws-appbar, .ws-rail, .ws-feedbar, .ws-bottomnav) :is(p, li, span, div) {
  font-size: inherit;
  line-height: inherit;
}

/* The hidden attribute must win over the display rules below */
.ws-appbar [hidden],
.ws-rail [hidden],
.ws-rail[hidden],
.ws-bottomnav [hidden],
.ws-rail-backdrop[hidden],
#mobile-bottom-sheet [hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Focus: one visible ring on every shell control ----- */
:where(.ws-appbar, .ws-rail, .ws-feedbar, .ws-bottomnav, #right-sidebar) :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip-to-content { background: var(--fill); color: #fff; border-radius: 0 0 var(--r-ui) var(--r-ui); }
.skip-to-content:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ==========================================================================
   App bar
   ========================================================================== */
.ws-appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--appbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.ws-appbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  height: 100%;
  max-width: var(--ws-max);
  margin: 0 auto;
  padding: 0 var(--ws-gap);
}
/* From 1200px the wordmark sits over the left rail and the search over the
   main column */
@media (min-width: 1200px) {
  .ws-appbar-inner {
    grid-template-columns: var(--ws-left) minmax(0, 1fr) auto;
    column-gap: var(--ws-gap);
  }
}
.ws-appbar-start {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.ws-brand {
  margin: 0;
  font: 700 22px/1 var(--font-headline);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ws-wordmark,
.ws-wordmark:hover {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.ws-wordmark-dot { color: var(--signal); }
.ws-wordmark:focus-visible { border-radius: var(--r-ui); }

/* Search: the one bordered control in the bar */
.ws-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: center;
  width: 100%;
  max-width: 560px;
}
/* app.js hides this wrapper (.hidden, display:none !important in custom.css)
   on the weather and traffic views: keep its space so the bar does not
   rearrange */
.ws-search.hidden { display: flex !important; visibility: hidden; }
.ws-search-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
}
.ws-search-input,
.dark .ws-search-input {
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 72px 0 40px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.2 var(--font-ui);
  box-shadow: none;
}
.ws-search-input::placeholder { color: var(--muted); opacity: 1; }
.ws-search-input:focus,
.dark .ws-search-input:focus {
  border-color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ws-search-clear {
  position: absolute;
  right: 36px;
  display: none; /* shown by the inline script while the field has text */
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ui);
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.ws-search-clear:hover { background: var(--hover); color: var(--ink); }
.ws-search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.ws-kbd {
  position: absolute;
  right: 10px;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font: 500 12px/1 var(--font-ui);
  pointer-events: none;
}
/* The hint is only true while "/" would move focus here */
.ws-search-input:focus ~ .ws-kbd,
.ws-search-input:not(:placeholder-shown) ~ .ws-kbd { display: none; }
.ws-search-input:focus ~ .ws-search-clear,
.ws-search-input:not(:placeholder-shown) ~ .ws-search-clear { right: 4px; }

/* Right-hand actions */
.ws-appbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.ws-iconbtn,
.ws-appbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-ui);
  background: none;
  color: var(--ink);
  font: 500 14px/1 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}
.ws-iconbtn { padding: 0; width: 40px; }
.ws-iconbtn i,
.ws-appbar-btn i { width: 16px; font-size: 16px; text-align: center; color: inherit; }
.ws-iconbtn:hover,
.ws-appbar-btn:hover { background: var(--hover); }
/* Labels from 1200px; below that the buttons carry aria-labels */
.ws-appbar-label { display: none; }
@media (min-width: 1200px) {
  .ws-appbar-label { display: inline; }
  .ws-appbar-btn { padding: 0 12px; }
}

.ws-rail-toggle { display: none; }
.ws-only-mobile { display: none; }
@media (min-width: 768px) and (max-width: 1199px) {
  .ws-rail-toggle { display: inline-flex; margin-left: -8px; }
}
@media (max-width: 767px) {
  .ws-appbar-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 0 12px 0 16px; }
  .ws-search,
  .ws-search.hidden { display: none !important; }
  .ws-only-mobile { display: inline-flex; }
  .ws-hide-mobile { display: none; }
  .ws-brand { font-size: 21px; }
  .ws-iconbtn,
  .ws-appbar-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
}
@media (max-width: 359px) {
  .ws-appbar-inner { padding: 0 8px 0 12px; }
  .ws-brand { font-size: 19px; }
  .ws-iconbtn,
  .ws-appbar-btn { width: 40px; min-width: 40px; }
}

/* ==========================================================================
   Shell grid
   ========================================================================== */
.ws-shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--ws-max);
  /* The footer starts below the fold: the feed arriving after load must not
     push it down inside the viewport (that was nearly all the CLS on phones
     and tablets) */
  min-height: calc(100vh - var(--appbar-h));
  min-height: calc(100svh - var(--appbar-h));
  margin: 0 auto;
  padding: var(--ws-gap) var(--ws-gap) 40px;
}
.ws-main { min-width: 0; }
.ws-main:focus { outline: none; }
@media (min-width: 1200px) {
  .ws-shell {
    display: grid;
    grid-template-columns: var(--ws-left) minmax(0, 1fr) var(--ws-right);
    column-gap: var(--ws-gap);
    align-items: start;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .ws-main { max-width: 880px; margin: 0 auto; }
}
@media (max-width: 767px) {
  .ws-shell { padding: 0 0 calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px)); }
}

/* The main column is one surface on the canvas (mockup), not a card per row */
#content-container {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  overflow: clip;
}
@media (max-width: 767px) {
  #content-container { border: 0; border-radius: 0; }
}
/* custom.css: weather and traffic views paint their own panels inside */
#content-container > .px-2 { padding-top: 16px; }

/* ==========================================================================
   Left rail
   ========================================================================== */
.ws-rail { display: none; }
.ws-rail-backdrop { display: none; }

@media (min-width: 1200px) {
  .ws-rail {
    display: block;
    position: sticky;
    top: calc(var(--appbar-h) + var(--ws-gap));
    max-height: calc(100vh - var(--appbar-h) - var(--ws-gap));
    max-height: calc(100dvh - var(--appbar-h) - var(--ws-gap));
    overflow-y: auto;
    padding: 0 4px 24px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--rule-strong) transparent;
  }
}

/* 768-1199: a drawer under the app bar. Closed it is hidden from the
   tab order and from screen readers (visibility), open it takes focus. */
@media (min-width: 768px) and (max-width: 1199px) {
  .ws-rail {
    display: block;
    position: fixed;
    top: var(--appbar-h);
    bottom: 0;
    left: 0;
    z-index: 45;
    width: 288px;
    max-width: 85vw;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 12px 32px;
    background: var(--surface);
    border-right: 1px solid var(--rule);
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .ws-rail.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease;
  }
  .ws-rail-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: var(--appbar-h) 0 0 0;
    z-index: 44;
    background: rgba(15, 20, 26, 0.32);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ws-rail,
  .ws-rail.is-open { transition: none; }
}

/* A hairline between groups; the sections group comes first. Hidden groups
   are display:none, so they leave no divider behind. */
.ws-rail-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.ws-rail-group.ws-rail-first { margin-top: 0; padding-top: 0; border-top: 0; }
.ws-rail-heading {
  margin: 0 0 6px;
  padding: 0 12px;
  font: 600 13px/1.3 var(--font-ui);
  color: var(--muted);
}

/* custom.css made .nav-menu a horizontal scroller (the old section bar) */
#ws-rail .nav-menu {
  display: block;
  gap: 0;
  padding: 0;
  overflow: visible;
}

/* One row style for sections, tools and my topics. Not pills: the active one
   gets a tint, weight and a 2px signal bar. #ws-rail outranks custom.css's
   .category-btn colours (each section had its own filled active colour). */
#ws-rail .ws-navitem,
.dark #ws-rail .ws-navitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-ui);
  background: transparent;
  color: var(--ink);
  font: 400 15px/1.3 var(--font-ui);
  text-align: left;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  /* custom.css gives .category-btn "transition: all", which also animated the
     inherited visibility: the drawer's buttons stayed unfocusable for a frame */
  transition: background-color 0.15s ease, color 0.15s ease;
}
#ws-rail .ws-navitem + .ws-navitem { margin-top: 2px; }
#ws-rail .ws-navitem > i:first-child {
  flex: none;
  width: 18px;
  font-size: 15px;
  text-align: center;
  color: var(--muted);
}
#ws-rail .ws-navitem > span { min-width: 0; }
#ws-rail .ws-navitem:hover,
.dark #ws-rail .ws-navitem:hover { background: var(--hover); color: var(--ink); }
#ws-rail .ws-navitem:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
#ws-rail .ws-navitem.active,
.dark #ws-rail .ws-navitem.active,
#ws-rail .ws-navitem.active:hover,
.dark #ws-rail .ws-navitem.active:hover,
#ws-rail .ws-tool[aria-current="true"],
.dark #ws-rail .ws-tool[aria-current="true"] {
  background: var(--nav-active);
  color: var(--ink);
  font-weight: 600;
}
#ws-rail .ws-tool[aria-current="true"]::before,
#ws-rail .ws-navitem.active::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--signal);
}
#ws-rail .ws-navitem.active > i:first-child,
#ws-rail .ws-tool[aria-current="true"] > i:first-child { color: var(--ink); }
/* Τι έχασες, Καιρός, Κίνηση are views, not sections: app.js leaves the last
   section .active behind them, js/shell.js sets data-ws-view */
#ws-rail:is([data-ws-view="recap"], [data-ws-view="weather"], [data-ws-view="traffic"]) .nav-menu .ws-navitem.active,
.dark #ws-rail:is([data-ws-view="recap"], [data-ws-view="weather"], [data-ws-view="traffic"]) .nav-menu .ws-navitem.active {
  background: transparent;
  font-weight: 400;
}
#ws-rail:is([data-ws-view="recap"], [data-ws-view="weather"], [data-ws-view="traffic"]) .nav-menu .ws-navitem.active::before { display: none; }
#ws-rail:is([data-ws-view="recap"], [data-ws-view="weather"], [data-ws-view="traffic"]) .nav-menu .ws-navitem.active > i:first-child { color: var(--muted); }
/* Η ροή μου: a personal feed, not a section; a hairline sets it apart */
#ws-rail #my-feed-btn { margin-bottom: 6px; }
#ws-rail #my-feed-btn::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: -4px;
  left: 12px;
  height: 1px;
  background: var(--rule);
}
#ws-rail #my-feed-btn.active::after { display: none; }
@media (pointer: coarse) {
  #ws-rail .ws-navitem { min-height: 44px; }
}

/* Τα θέματά μου / Οι πηγές μου */
.ws-rail-list { margin: 0; padding: 0; list-style: none; }
.ws-dot {
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--muted);
}
.ws-dot[data-sec="politics"] { background: var(--sec-politics); }
.ws-dot[data-sec="greece"] { background: var(--sec-greece); }
.ws-dot[data-sec="sports"] { background: var(--sec-sports); }
.ws-dot[data-sec="world"] { background: var(--sec-world); }
.ws-dot[data-sec="lifestyle"] { background: var(--sec-lifestyle); }
.ws-dot[data-sec="business"] { background: var(--sec-business); }
.ws-dot[data-sec="tech"] { background: var(--sec-tech); }
.ws-dot[data-sec="education"] { background: var(--sec-education); }
.ws-source {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 4px 12px;
  font: 400 13.5px/1.3 var(--font-ui);
  color: var(--muted);
  cursor: default;
}
.ws-rail-note {
  padding: 4px 12px;
  font: 400 14px/1.4 var(--font-ui);
  color: var(--muted);
}
.ws-source-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-fav {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--rule);
  color: var(--ink);
  font: 600 11px/1 var(--font-ui);
}
.ws-fav img { display: block; width: 18px; height: 18px; object-fit: contain; background: var(--fav-plate); }
.ws-rail-more {
  margin: 2px 0 0;
  padding: 0 12px;
  font: 400 13px/1.4 var(--font-ui);
  color: var(--muted);
}
.ws-rail-edit { margin-top: 6px; padding: 0 12px; }
.ws-rail-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font: 500 13px/1.3 var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.ws-rail-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) {
  .ws-rail-link { min-height: 44px; }
}

/* Εργαλεία: quieter than the sections */
#ws-rail .ws-tool { font-size: 14px; color: var(--ink); }
#ws-rail .ws-tool > i:first-child { font-size: 14px; }

/* Ώρα στον κόσμο */
.ws-clocks { margin-top: 2px; }
.ws-clocks > summary { list-style: none; }
.ws-clocks > summary::-webkit-details-marker { display: none; }
.ws-clocks .ws-chevron {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.ws-clocks[open] .ws-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .ws-clocks .ws-chevron { transition: none; }
}
.ws-clocks-body { padding: 10px 8px 4px; }
#header-clock-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 6px;
}
#header-clock-row .header-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}
#header-clock-row .header-clock-canvas { width: 40px; height: 40px; }
#header-clock-row .header-clock-label,
.dark #header-clock-row .header-clock-label {
  margin: 0;
  max-width: 100%;
  font: 400 12px/1.25 var(--font-ui);
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  overflow-wrap: anywhere;
  color: var(--muted);
}

/* ==========================================================================
   Right rail (1200px and up)
   custom.css makes .right-sidebar a fixed off-canvas panel up to 1280px and
   hides it on phones; editorial.css hides it below 1281px unless .open.
   The id outranks both.
   ========================================================================== */
#right-sidebar.right-sidebar { display: none; }
@media (min-width: 1200px) {
  #right-sidebar.right-sidebar,
  .dark #right-sidebar.right-sidebar {
    position: sticky;
    top: calc(var(--appbar-h) + var(--ws-gap));
    right: auto;
    left: auto;
    z-index: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: auto;
    height: auto;
    max-height: calc(100vh - var(--appbar-h) - var(--ws-gap));
    max-height: calc(100dvh - var(--appbar-h) - var(--ws-gap));
    margin: 0;
    padding: 0 0 24px;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
  }
}

/* Panels: surface, hairline, 10px radius. Also the ροή box under the feed. */
#right-sidebar .side-section,
.dark #right-sidebar .side-section,
#roe-slot-feed .roe-box {
  margin: 0;
  padding: 16px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
}
#right-sidebar .side-section h2,
#roe-slot-feed .roe-box h2 {
  margin: 0 0 10px;
  font: 700 16px/1.3 var(--font-headline);
  color: var(--ink);
}
#right-sidebar .side-section p,
#roe-slot-feed .roe-box p { font-size: 14px; line-height: 1.5; }
#right-sidebar .facts-numbers { gap: 12px; margin-bottom: 12px; }
#right-sidebar .facts-num { font: 700 26px/1.1 var(--font-headline); }
#right-sidebar .facts-label { font-size: 13px; }
#right-sidebar .single-title { font: 500 15px/1.35 var(--font-headline); }
#right-sidebar .single-item { padding: 10px 0; }
.roe-box { padding-right: 44px; }
#right-sidebar .roe-close,
#roe-slot-feed .roe-close { top: 8px; right: 8px; }
.roe-box .side-btn { border-radius: var(--r-ui); }
#roe-slot-feed .roe-box { margin: 32px 0 8px; }
/* An empty slot must not add a second gap between the right rail's panels */
#roe-slot-side:empty,
#roe-slot-side:not(:has(.roe-box:not(.hidden))) { display: none; }

/* The 7-day numbers strip above the feed is for screens without the right rail */
@media (min-width: 1200px) {
  #facts-strip.facts-strip { display: none !important; }
}
@media (max-width: 1199px) {
  #facts-strip.facts-strip:not([hidden]) {
    display: block;
    margin: 20px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--rule);
    font: 400 14px/1.5 var(--font-ui);
    color: var(--muted);
  }
  #facts-strip strong { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
}

/* ==========================================================================
   Feed bar: the source filter, moved from the masthead
   ========================================================================== */
.ws-feedbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 16px 24px 0;
  background: var(--surface);
}
/* No source filter on the weather, traffic and recap views, nor on Θέματα,
   Πηγές and Αποθηκευμένα (the inline script in index.html sets data-ws-view
   for those before the first paint; js/shell.js keeps it current) */
:root:is([data-ws-view="weather"], [data-ws-view="traffic"], [data-ws-view="recap"], [data-ws-view="topics"], [data-ws-view="sources"], [data-ws-view="saved"]) #ws-feedbar { display: none; }
.ws-feedbar .source-filter-dropdown { z-index: auto; }
#source-filter-btn.source-filter-btn,
.dark #source-filter-btn.source-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: var(--r-ui);
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/1 var(--font-ui);
  box-shadow: none;
}
#source-filter-btn.source-filter-btn:hover { background: var(--hover); border-color: var(--ink); }
#source-filter-btn.source-filter-btn:focus { box-shadow: none; }
#source-filter-btn.source-filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#source-filter-btn i:first-child { color: var(--muted); font-size: 14px; }
/* custom.css hides the label below 769px; the button is only shown from 768px */
#source-filter-btn .source-filter-label { display: inline; font-size: inherit; line-height: inherit; }
#source-filter-btn .source-filter-badge,
.dark #source-filter-btn .source-filter-badge {
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--rule);
  color: var(--ink);
  font: 600 12px/1 var(--font-ui);
}
/* A filter is on: the badge is the signal (white on --fill 4.8:1) */
#source-filter-btn .source-filter-badge.has-filter,
.dark #source-filter-btn .source-filter-badge.has-filter { background: var(--fill); color: #fff; }
#source-filter-btn .source-filter-chevron { color: var(--muted); }
.ws-feedbar .active-filters { flex: 1 1 auto; min-width: 0; }
.ws-feedbar .active-filter-chip,
.dark .ws-feedbar .active-filter-chip {
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ui);
  background: var(--surface);
  color: var(--ink);
  font: 500 13px/1.3 var(--font-ui);
}
.ws-feedbar .active-filter-chip span { font-size: inherit; line-height: inherit; }
.ws-feedbar .clear-all-filters { border-radius: var(--r-ui); }
.ws-feedbar .active-filter-chip button { position: relative; width: 24px; height: 24px; }
/* Scrolling inside the source list must not scroll the page under it */
.source-filter-list { overscroll-behavior: contain; }
@media (max-width: 767px) {
  .ws-feedbar { padding: 12px 16px 0; }
  /* Phones: the chips only; an outlet is picked on the Πηγές view */
  .ws-feedbar .source-filter-dropdown { display: none; }
  .ws-feedbar:has(.active-filters:empty) { display: none; }
}

/* ==========================================================================
   Main column: what sits in it now, restyled only to fit (phase 2 rebuilds
   the rows and the featured area). Sizes follow brief §9.2 for a sans face.
   ========================================================================== */
.article-title,
.dark .article-title { font: 600 17px/1.35 var(--font-headline); letter-spacing: 0; }
.article-desc,
.dark .article-desc { font-size: 14px; line-height: 1.55; }
.lead-title { font: 700 28px/1.2 var(--font-headline); letter-spacing: -0.01em; }
.lead-also-title { font: 600 19px/1.3 var(--font-headline); }
.lead-outlet-title { font: 500 16px/1.4 var(--font-headline); }
.lead-also-more .lead-outlet-title { font-size: 15px; }
.lead { border-bottom: 1px solid var(--rule); }
.feed-head h2 { font: 700 19px/1.3 var(--font-headline); }
.story-group-item-title,
.dark .story-group-item-title { font: 400 14px/1.45 var(--font-headline); }
.mobile-sheet-title,
.dark .mobile-sheet-title { font: 700 18px/1.2 var(--font-headline); }
.new-content-popup-title { font: 700 16px/1.3 var(--font-headline); }
@media (max-width: 767px) {
  .article-title,
  .dark .article-title { font-size: 16px; }
  .lead-title { font-size: 24px; line-height: 1.22; }
}

/* The new-articles bell sits under the app bar, clear of the right rail's
   scrollbar */
@media (min-width: 769px) {
  .new-content-badge { top: calc(var(--appbar-h) + var(--ws-stick-bar) + 12px); right: calc(var(--ws-gap) + 4px); }
}

/* The slide-over reader panel is retired (phase 4): the reading view below */

/* ==========================================================================
   Footer
   ========================================================================== */
.site-foot-inner { max-width: var(--ws-max); padding: 0 var(--ws-gap); }
.site-foot-brand { font: 700 16px/1.2 var(--font-headline); }
/* editorial.css pads the footer for a bottom bar up to 1023px; it is phone-only now */
@media (min-width: 768px) {
  .site-foot,
  .dark .site-foot { padding-bottom: 40px; }
}

/* ==========================================================================
   Phone bottom nav (< 768px): Αρχική, Θέματα, Πηγές, (Αποθηκευμένα), Μενού
   custom.css shows .mobile-bottom-bar with !important up to 1023px.
   ========================================================================== */
@media (min-width: 768px) {
  .ws-bottomnav.mobile-bottom-bar { display: none !important; }
}
.ws-bottomnav.mobile-bottom-bar,
.dark .ws-bottomnav.mobile-bottom-bar {
  min-height: var(--bottomnav-h);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  box-shadow: none;
}
.ws-bottomnav .mobile-bottom-bar-item,
.dark .ws-bottomnav .mobile-bottom-bar-item {
  position: relative;
  /* Sized by the labels, the rest shared: "Αποθηκευμένα" is whole at 360px
     (equal fifths cut it to "Αποθηκευμέ…") */
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: var(--bottomnav-h);
  padding: 6px 2px;
  border: 0;
  border-right: 0;
  background: none;
  color: var(--muted);
  font: 500 12px/1.2 var(--font-ui);
}
.ws-bottomnav .mobile-bottom-bar-item i { font-size: 18px; color: inherit; }
.ws-bottomnav .mobile-bottom-bar-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: inherit;
}
.ws-bottomnav .mobile-bottom-bar-item:hover,
.dark .ws-bottomnav .mobile-bottom-bar-item:hover { background: var(--hover); color: var(--ink); }
/* The open sheet or menu is marked with ink and the signal bar */
.ws-bottomnav .mobile-bottom-bar-item[aria-expanded="true"],
.ws-bottomnav .mobile-bottom-bar-item[aria-current="page"] { color: var(--ink); }
.ws-bottomnav .mobile-bottom-bar-item[aria-expanded="true"]::before,
.ws-bottomnav .mobile-bottom-bar-item[aria-current="page"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--signal);
}
.ws-bottomnav .mobile-bottom-bar-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ----- Phone sheet: two modes (mobile-menu.js sets data-mode) ----- */
#mobile-bottom-sheet .mobile-sheet-container,
.dark #mobile-bottom-sheet .mobile-sheet-container {
  height: auto;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  border-radius: var(--r-panel) var(--r-panel) 0 0;
  background: var(--surface);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#mobile-bottom-sheet .mobile-sheet-content { overflow-y: auto; overscroll-behavior: contain; }
/* The three modes. Μενού: Η ροή μου, Αποθηκευμένα and the tools. Κατηγορίες
   ("topics", back on 2026-11-26, after a section bar across the top of the feed
   was tried for a day and taken out): Η ροή μου and the eight sections, with
   the tools and the search field out of the way. Αναζήτηση: the field alone. */
#mobile-bottom-sheet[data-mode="menu"] .mobile-sheet-search,
#mobile-bottom-sheet[data-mode="topics"] .mobile-sheet-search,
#mobile-bottom-sheet[data-mode="menu"] .smart-category-nav,
#mobile-bottom-sheet[data-mode="topics"] .quick-actions,
#mobile-bottom-sheet[data-mode="search"] .mobile-sheet-content { display: none; }
#mobile-bottom-sheet[data-mode="menu"] .quick-actions { margin-top: 0; padding-top: 0; border-top: 0; }
#mobile-bottom-sheet[data-mode="search"] .mobile-sheet-search { border-bottom: 0; padding-bottom: 20px; }
/* 16px stops iOS Safari zooming the page on focus */
#mobile-bottom-sheet .simple-search-input { font-size: 16px; }

/* Η ροή μου, above the sections in the Κατηγορίες sheet */
.ws-sheet-myfeed {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0 0 4px;
  padding: 0 4px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  font: 600 17px/1.2 var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.ws-sheet-myfeed i { width: 16px; font-size: 15px; text-align: center; color: var(--muted); }
.ws-sheet-myfeed span { font-size: inherit; line-height: inherit; }
.ws-sheet-myfeed:hover { background: var(--hover); }
.ws-sheet-myfeed.active { color: var(--red); }
.ws-sheet-myfeed:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Sections in the sheet: the rail's active style (tint, weight, bar) */
#mobile-bottom-sheet .category-nav-item.active,
.dark #mobile-bottom-sheet .category-nav-item.active { position: relative; background: var(--nav-active); }
#mobile-bottom-sheet .category-nav-item.active .category-name,
.dark #mobile-bottom-sheet .category-nav-item.active .category-name {
  color: var(--ink);
  text-decoration: none;
}
#mobile-bottom-sheet .category-nav-item.active::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--signal);
}
#mobile-bottom-sheet .category-nav-item { padding: 0 12px; }

/* The phone toast from mobile-menu.js, above the bottom nav */
.ws-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 2100;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: var(--r-ui);
  background: var(--ink);
  color: var(--surface);
  font: 500 14px/1.4 var(--font-ui);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.ws-toast.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ws-toast { transition: none; }
}

/* ==========================================================================
   No horizontal overflow at 320-390px: long unbroken strings wrap
   ========================================================================== */
@media (max-width: 767px) {
  .article-title,
  .article-desc { overflow-wrap: anywhere; }
}

/* ==========================================================================
   Review fixes (2026-10-31)
   ========================================================================== */

/* ----- The app-bar search field stays displayed from 768px -----
   The traffic view sets display:none inline on #search-input (and .hidden,
   which custom.css makes display:none !important) and nothing restores it.
   While a view hides the field, its wrapper is visibility:hidden instead. */
@media (min-width: 768px) {
  #search-input.ws-search-input { display: block !important; }
}

/* ----- Sticky chrome: app bar, feed bar, breaking-news strip -----
   From 768px in windows at least 700px tall the source filter bar sticks
   under the app bar (as it did in the masthead) and the strip under it.
   Phones and short windows keep only the app bar sticky: at 320x256 the
   three bars covered most of the screen. --ws-stick-* feed the strip's
   offset, scroll-padding and the new-articles bell. */
:root {
  --feedbar-h: 56px;
  --ws-stick-bar: 0px;
  --ws-stick-banner: 0px;
}
@media (min-width: 768px) and (min-height: 700px) {
  /* Static: views without the feed bar change the two rules that use it
     (below), never the variable on :root. A custom property changed on the
     root restyles every element of the page, on every view switch and every
     article opened or closed (8-16 ms per switch measured, 2026-10-31). */
  :root { --ws-stick-bar: var(--feedbar-h); }
  :root:has(#alert-banner:not(.hidden)) { --ws-stick-banner: 48px; }
  .ws-feedbar {
    position: sticky;
    top: var(--appbar-h);
    z-index: 30;
    flex-wrap: nowrap;
    height: var(--feedbar-h);
    padding: 0 24px;
    border-bottom: 1px solid var(--rule);
  }
  /* One line, so the bar keeps its height: the chips scroll sideways */
  .ws-feedbar .active-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ws-feedbar .active-filters::-webkit-scrollbar { display: none; }
  .ws-feedbar .active-filter-chip { flex: none; }
  /* custom.css: top 4rem from 1024px, 3.5rem below (8px under the 64px bar) */
  #content-container > .alert-banner { top: calc(var(--appbar-h) + var(--ws-stick-bar)); }
  :root:is([data-ws-view="weather"], [data-ws-view="traffic"], [data-ws-view="recap"], [data-ws-view="topics"], [data-ws-view="sources"], [data-ws-view="saved"]) #content-container > .alert-banner { top: var(--appbar-h); }
  html:is([data-ws-view="weather"], [data-ws-view="traffic"], [data-ws-view="recap"], [data-ws-view="topics"], [data-ws-view="sources"], [data-ws-view="saved"], [data-ws-article]) {
    scroll-padding-top: calc(var(--appbar-h) + var(--ws-stick-banner) + 12px);
  }
}
@media (max-width: 767px), (max-height: 699px) {
  #content-container > .alert-banner { position: relative; top: auto; }
}
/* Focus moved by Tab is scrolled clear of the sticky and fixed bars
   (WCAG 2.2, 2.4.11) */
html { scroll-padding-top: calc(var(--appbar-h) + var(--ws-stick-bar) + var(--ws-stick-banner) + 12px); }
@media (max-width: 767px) {
  html { scroll-padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + 12px); }
}

/* ----- Theme toggle: one icon, one label; pressed is a state ----- */
#theme-toggle-btn[aria-pressed="true"],
#theme-toggle-btn[aria-pressed="true"]:hover {
  background: var(--hover);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

/* ----- Bottom nav: while a sheet is open, its button is the marked one ----- */
.ws-bottomnav:has([aria-expanded="true"]) .mobile-bottom-bar-item[aria-current="page"] { color: var(--muted); }
.ws-bottomnav:has([aria-expanded="true"]) .mobile-bottom-bar-item[aria-current="page"]::before { display: none; }

/* ----- Phones: 44px targets ----- */
@media (max-width: 767px) {
  .ws-feedbar .active-filters { gap: 4px 12px; }
  /* The chip's ✕ is a 44px button; negative margins keep the chip's look */
  .ws-feedbar .active-filter-chip button {
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px -6px;
  }
  .ws-feedbar .clear-all-filters,
  .search-results-header .clear-search-btn,
  #clear-search-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
  }
  .site-foot-links a,
  .site-foot-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ----- Windows High Contrast / forced colours: the current item is more
   than a weight change ----- */
@media (forced-colors: active) {
  #ws-rail .ws-navitem[aria-current="true"],
  #mobile-bottom-sheet .category-nav-item[aria-current="true"],
  .ws-sheet-myfeed[aria-current="true"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
  #ws-rail .ws-navitem.active::before,
  #ws-rail .ws-tool[aria-current="true"]::before,
  #mobile-bottom-sheet .category-nav-item.active::before,
  .ws-bottomnav .mobile-bottom-bar-item[aria-expanded="true"]::before,
  .ws-bottomnav .mobile-bottom-bar-item[aria-current="page"]::before {
    forced-color-adjust: none;
    background: Highlight;
  }
  #theme-toggle-btn[aria-pressed="true"] { outline: 2px solid Highlight; }
  .ws-dot { forced-color-adjust: none; border: 1px solid CanvasText; }
}

/* ==========================================================================
   Phase 2 (2026-10-31): the workspace views (app.js workspace block).
   Tabs, the featured area's reserved height, the feed head with the
   Ομαδοποιημένα / Όλα τα άρθρα control, the new-publications pill, load
   more, loading / empty / error states, the ?time= notice. Rows are
   feed.css (js/rows.js); the featured area's inside is featured.css.
   ========================================================================== */

/* custom.css gives #article-list (and others) a display that would beat
   the hidden attribute */
.ws-content [hidden],
#article-list[hidden],
#right-sidebar [hidden] { display: none !important; }

/* ----- Tabs: Για εσένα, Τελευταία (links, aria-current="page") ----- */
.ws-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-ui) var(--r-ui) 0 0;
  color: var(--muted);
  font: 600 15px/1.2 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
}
.ws-tab:hover { color: var(--ink); background: var(--hover); }
.ws-tab[aria-current="page"] { color: var(--accent); }
.ws-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--fill);
}
.ws-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Four tabs (Για εσένα, Τελευταία, Θέματα, Πηγές) fit a 360px phone */
@media (max-width: 399px) {
  .ws-tab { padding: 0 10px; }
}

/* ----- Featured: featured.css reserves its height and draws the
   placeholder while it is empty (js/featured.js) ----- */

/* ----- Feed head ----- */
.ws-feed { position: relative; }
.ws-feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.ws-feed-heading { flex: 1 1 240px; min-width: 0; }
.ws-feed-title,
.dark .ws-feed-title { margin: 0; font: 700 19px/1.3 var(--font-headline); color: var(--ink); }
/* One reserved line: search scope and count, what Η ροή μου holds, the
   partial note. Text arriving later moves nothing. */
.ws-feed-sub {
  margin: 2px 0 0;
  min-height: 20px;
  font: 400 13px/20px var(--font-ui);
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .ws-feed[data-kind="search"] .ws-feed-sub { min-height: 40px; }
}

/* Ομαδοποιημένα / Όλα τα άρθρα: a two-button group, aria-pressed */
.ws-seg {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ui);
  background: var(--surface);
}
.ws-seg-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--font-ui);
  cursor: pointer;
}
.ws-seg-btn:hover { color: var(--ink); background: var(--hover); }
.ws-seg-btn[aria-pressed="true"],
.ws-seg-btn[aria-pressed="true"]:hover { background: var(--ink); color: var(--surface); }
.ws-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .ws-seg-btn { min-height: 40px; } }
@media (forced-colors: active) {
  .ws-seg-btn[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}

.ws-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font: 600 14px/1 var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ws-linkbtn:hover { color: var(--accent-hover); }
.ws-linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ws-myfeed-edit,
.ws-myfeed-save { min-height: 36px; }
/* Η ροή μου's actions: Αποθήκευση (a shared ροή only) and Αλλαγή ροής, on
   a line of their own, so the second one appearing moves nothing. With both
   hidden the wrapper takes no room in the head */
.ws-myfeed-actions { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.ws-myfeed-actions:not(:has(> :not([hidden]))) { display: none; }
/* The message box takes focus after a retry; the ring shows where it went */
.ws-feed-msg:focus { outline: none; }
.ws-feed-msg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-ui); }
/* "Περισσότερες δημοσιεύσεις" stays focusable while it loads (aria-disabled) */
.ws-load-more[aria-disabled="true"] { cursor: progress; color: var(--muted); }

/* ----- New publications: a pill over the feed, never in its flow ----- */
.ws-pill-slot {
  position: sticky;
  top: calc(var(--appbar-h) + var(--ws-stick-bar) + var(--ws-stick-banner) + 8px);
  z-index: 25;
  display: flex;
  justify-content: center;
  height: 0;
}
.ws-new-pill {
  position: absolute;
  top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: #fff;
  font: 600 14px/1 var(--font-ui);
  white-space: nowrap;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.ws-new-pill:hover { background: var(--fill-hover); }
.ws-new-pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ----- The list, its states, load more ----- */
/* Side padding is the rows' own (feed.css .ws-rows) */
.ws-feed-list { list-style: none; }
#ws-feed-list .kb-focused { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* The feed holds the page from the first paint: a short list (a source
   filter, a quiet section) that grows page by page, or settles shorter than
   the skeleton, never moves what is under it while that is in view */
#ws-feed { min-height: calc(100vh - var(--appbar-h)); }
.ws-feed-msg { padding: 24px 0 8px; }
/* While loading the skeleton holds the page: the footer stays below the fold */
.ws-feed-msg.is-loading { min-height: 100vh; padding-top: 4px; }
.ws-skel-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.ws-skel-row span {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: var(--rule);
}
.ws-skel-row span:nth-child(1) { grid-row: span 2; width: 40px; }
.ws-skel-row span:nth-child(2) { height: 16px; width: 88%; }
.ws-skel-row span:nth-child(3) { width: 45%; }
@media (prefers-reduced-motion: no-preference) {
  .ws-skel-row span { animation: ws-skel 1.4s ease-in-out infinite; }
}
@keyframes ws-skel { 50% { opacity: 0.45; } }

.ws-msg-title,
.dark .ws-msg-title { margin: 0 0 6px; font: 700 17px/1.35 var(--font-headline); color: var(--ink); }
.ws-msg-text { max-width: 60ch; margin: 0 0 14px; font: 400 15px/1.55 var(--font-ui); color: var(--muted); }
.ws-msg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-btn,
.ws-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ui);
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1 var(--font-ui);
  cursor: pointer;
}
.ws-btn:hover,
.ws-load-more:hover { background: var(--hover); border-color: var(--ink); }
.ws-btn-primary,
.ws-btn-primary:hover { background: var(--fill); border-color: var(--fill); color: #fff; }
.ws-btn-primary:hover { background: var(--fill-hover); }
.ws-btn:focus-visible,
.ws-load-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ws-load-more[aria-busy="true"] { cursor: progress; color: var(--muted); }
.ws-more { display: flex; justify-content: center; padding: 20px 0 8px; }

/* ----- ?time=N notice ----- */
.ws-time-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 16px;
  padding: 4px 6px 4px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-ui);
  background: var(--paper);
  font: 400 14px/1.4 var(--font-ui);
  color: var(--ink);
}
.ws-time-filter.hidden { display: none; }

/* ----- The "Τι έχασα;" strip sits under the feed head now ----- */
#ws-feed .missed-strip { margin: 8px 0 16px; }

/* ==========================================================================
   Phases 3-4 (2026-10-31): Θέματα, Πηγές, Αποθηκευμένα and the reading view
   ========================================================================== */

/* Θέματα and Πηγές (js/explore.js draws in it): the pane holds the page while
   its data loads, so the footer stays below the fold */
.ws-explore { min-height: 100vh; }

/* Αποθηκευμένα: the feed's head and list styles; the note under the title */
.ws-saved .ws-feed-sub { max-width: 60ch; }
#ws-saved-empty { padding-top: 8px; }

/* The app bar's Αποθηκευμένα while that view is on screen */
.ws-appbar-btn[aria-current="page"] { color: var(--accent); }

/* ----- The reading view (?a=<id>) -----
   <html data-ws-article> is set before the first paint for a landing ?a=
   link (index.html, <head>) and by app.js while an article is open. The view
   it was opened from stays in the page, hidden here, so Back finds it as it
   was (scroll, loaded pages, open groups). #ws-reader sits beside
   #content-container in <main> (js/reader-view.js: no overflow ancestor,
   its phone bar is sticky). */
.ws-reader { display: none; }
html[data-ws-article] .ws-reader {
  display: block;
  /* The footer stays below the fold while the article resolves */
  min-height: calc(100vh - var(--appbar-h));
}
/* content-visibility, not display:none: the feed under the article keeps
   its layout (its rows are not laid out again on Back, and the scroll
   position is restored onto the same boxes). Its contents are skipped:
   not painted, not focusable, not in the accessibility tree; the container
   itself takes no space while the article shows. */
html[data-ws-article] #content-container { content-visibility: hidden; }

/* Until the article is resolved (a landing ?a= link) */
.ws-reader-boot {
  display: grid;
  gap: 14px;
  max-width: 70ch;
  margin: 0 auto;
  padding: 8px 0;
}
.ws-reader-boot span {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: var(--rule);
}
.ws-reader-boot span:nth-child(1) { width: 30%; height: 12px; }
.ws-reader-boot span:nth-child(2) { width: 92%; height: 30px; }
.ws-reader-boot span:nth-child(3) { width: 70%; height: 30px; }
.ws-reader-boot span:nth-child(4) { width: 45%; }
.ws-reader-boot span:nth-child(5) { width: 100%; height: 160px; }
@media (prefers-reduced-motion: no-preference) {
  .ws-reader-boot span { animation: ws-skel 1.4s ease-in-out infinite; }
}

/* While reading, the article's h1 is the first heading of the main column:
   the view's sr-only h2 stays the main landmark's name, out of the outline */
html[data-ws-article] #ws-main-heading { display: none; }

/* A change just made, with a way back (app.js showUndo): fixed, so it moves
   nothing; above the phone bottom nav */
.ws-undo {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px 12px;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-panel, 10px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  font: 400 14px/1.45 var(--font-ui);
}
.ws-undo[hidden] { display: none; }
.ws-undo-text { margin: 0; flex: 1 1 auto; min-width: 0; }
.ws-undo-btn { flex: none; min-height: 40px; }
.ws-undo-close {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-ui);
  background: none;
  color: var(--muted);
}
.ws-undo-close:hover { background: var(--hover); color: var(--ink); }
.ws-undo-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 767px) {
  .ws-undo {
    bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
  }
}
