/*
 * Alfa Editorial: modules.css
 * Features carried over from the classic theme:
 *   1. Game tiles (front-page block "Игри" and the hub on /igri/)
 *   2. /igri/: page head, game panels, and the classic games restyled through their --alfa-* variables
 *   3. /zachuvani/: saved stories (rows use .ed-river from archive.css)
 *   4. /our-authors/: authors
 * games.css is printed after this sheet, so the overrides below carry one more class.
 * Its block "04" sets key shapes and cell tints with !important; those are steered through variables
 * or painted over with pseudo-elements (see the Sudoku and Zborle sections), never with !important.
 */

/* ------------------------------------------------------------------ 1. Game tiles */

.ed-games__list,
.ed-igri-hub__list { margin: 0; padding: 0; list-style: none; }

/* Phones: a row with the plate as a small square at the right (like a thumb story).
   From 740px: a small picture story, the plate on top at 3:2. */
.ed-games__tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  grid-template-areas: "text plate";
  column-gap: var(--ed-s4);
  align-items: start;
  color: var(--ed-ink);
}
.ed-games__plate {
  grid-area: plate;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--ed-bg-2);
  color: var(--ed-ink);
  transition: background-color 0.15s var(--ed-ease);
}
.ed-games__art { width: 44px; height: 44px; }
.ed-games__paper { fill: var(--ed-bg); }
.ed-games__text { grid-area: text; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.ed-games__label {
  margin-bottom: 6px;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink-4);
}
.ed-games__name {
  font-family: var(--ed-head);
  font-size: var(--ed-fs-sm);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ed-ink);
  text-wrap: balance;
  transition: color 0.12s var(--ed-ease);
}
.ed-games__desc {
  margin-top: 6px;
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.4;
  color: var(--ed-ink-3);
  text-wrap: pretty;
}
.ed-games__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ed-s1) var(--ed-s4);
  margin-top: var(--ed-s2);
}
.ed-games__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink);
}
.ed-games__cta .ed-icon { position: relative; top: -0.5px; }

/* Hover: the name turns grey, the plate darkens a shade. Nothing moves. */
.ed-games__tile:hover .ed-games__name { color: var(--ed-ink-3); }
.ed-games__tile:hover .ed-games__plate { background: var(--ed-bg-3); }

.ed-games__badge {
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--ed-ink-4);
}
.ed-games__badge[data-status="active"],
.ed-games__badge[data-status="done"] { font-weight: 700; color: var(--ed-ink); }
.ed-games__badge[data-status="done"]::before { content: "✓ "; }

/* Front page: the block stays light, three thumb stories in a row. In the 290px columns of a tablet
   the plate is 80px, so the text column (about 200px) keeps the descriptions to two lines; the 120px
   plate waits for 1150px. */
@media (min-width: 740px) {
  .ed-games__tile { grid-template-columns: minmax(0, 1fr) 80px; }
  .ed-games__art { width: 40px; height: 40px; }
}
@media (min-width: 1150px) {
  .ed-games__tile { grid-template-columns: minmax(0, 1fr) 120px; column-gap: var(--ed-s5); }
  .ed-games__art { width: 52px; height: 52px; }
}
/* /igri/ hub: the games are the page, so each is a picture story with the plate on top at 3:2. */
@media (min-width: 740px) {
  .ed-igri-hub .ed-games__tile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "plate" "text";
    row-gap: var(--ed-s3);
  }
  .ed-igri-hub .ed-games__plate { aspect-ratio: 3 / 2; }
}

/* ------------------------------------------------------------------ 2. /igri/ */

/* The classic games read these variables (the classic style.css that defined them is not loaded here). */
.ed-igri.alfa-igri {
  --alfa-display: var(--ed-head);
  --alfa-text: var(--ed-serif);
  --alfa-label: var(--ed-sans);
  --alfa-ink: var(--ed-ink);
  --alfa-ink-soft: var(--ed-ink-2);
  --alfa-muted: var(--ed-ink-4);
  --alfa-faint: var(--ed-ink-4);
  --alfa-rule: var(--ed-line);
  --alfa-rule-strong: var(--ed-ink);
  --alfa-accent: var(--ed-ink);   /* links, focus, entered digits: ink (red is not for this) */
  --alfa-alert: var(--ed-red);    /* a wrong entry is a form error: the one place red belongs */
  --alfa-paper: var(--ed-bg);
  --alfa-paper-alt: var(--ed-bg-2);
  --alfa-ok: var(--ed-ok);        /* the letter-game colours stay: they are the game's language */
  --alfa-off: var(--ed-ink-4);
  --alfa-gutter: 0px;
  background: var(--ed-bg);
}

.ed-igri .alfa-igri-wrap { max-width: none; padding: 0 0 var(--ed-s4); }

/* Page head: like a section front. Title, one line of dek, then a row of links under a hairline. */
.ed-igri-intro {
  padding-top: var(--ed-s5);
  border-bottom: 1px solid var(--ed-ink);
}
.ed-igri-intro__title {
  font-size: clamp(2.5rem, 2.1rem + 1.1vw, 3rem);
}
.ed-igri-intro + .ed-empty { margin-top: var(--ed-block-gap); }
.ed-igri-intro__lead {
  max-width: var(--ed-measure);
  margin-top: var(--ed-s3);
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.5;
  color: var(--ed-ink-3);
  text-wrap: pretty;
}
.ed-igri-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--ed-s5);
  margin-top: var(--ed-s5);
  border-top: 1px solid var(--ed-line);
}
.ed-igri-nav__list {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--ed-s5);
  margin: 0;
  padding: 2px 0;
  list-style: none;
}
.ed-igri-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-ui);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ed-ink);
  white-space: nowrap;
  transition: color 0.12s var(--ed-ease);
}
.ed-igri-nav__link:hover { color: var(--ed-ink-3); }
/* The open game is marked in the row (games.js toggles [hidden] on the panels). */
.ed-igri:has([data-panel="memory"]:not([hidden])) .ed-igri-nav__link[data-open="memory"],
.ed-igri:has([data-panel="zborle"]:not([hidden])) .ed-igri-nav__link[data-open="zborle"],
.ed-igri:has([data-panel="sudoku"]:not([hidden])) .ed-igri-nav__link[data-open="sudoku"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
/* While a game is open the page is about the game: the dek steps aside. */
.ed-igri:has([data-panel]:not([hidden])) .ed-igri-intro__lead { display: none; }

.ed-igri-nav__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: var(--ed-s3) 0;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--ed-ink-4);
}
.ed-igri-nav__meta .alfa-games-count { font-weight: 700; color: var(--ed-ink); }

/* Hub: three equal picture stories, so ordinary headline size (21-23px, weight 500), not lead size. */
.ed-igri-hub { padding-top: var(--ed-s6); }
.ed-igri-hub .ed-games__name { font-size: var(--ed-fs-md); font-weight: 500; line-height: 1.2; }
@media (min-width: 740px) {
  .ed-igri-hub .ed-games__art { width: 88px; height: 88px; }
}

/* Game panel: a ruled section, no box */
.ed-igri .alfa-igra[data-panel] {
  --alfa-game-paper: var(--ed-bg);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}
.ed-igri .ed-igra-head {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: var(--ed-s2);
  padding: var(--ed-s4) 0 var(--ed-s5);
  border-bottom: 1px solid var(--ed-line);
  background: none;
}
.ed-igra-head__text { min-width: 0; }
.ed-igri .ed-igra-head__label {
  max-width: none;
  margin: 0 0 6px;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink-4);
}
.ed-igri .ed-igra-head__title {
  margin: 0;
  font-family: var(--ed-head);
  font-size: var(--ed-fs-lg);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.003em;
  color: var(--ed-ink);
}
.ed-igri .ed-igra-head__dek {
  max-width: var(--ed-measure);
  margin: 6px 0 0;
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.45;
  color: var(--ed-ink-3);
  text-wrap: pretty;
}
.ed-igri .ed-igra-head__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-top: calc(-1 * var(--ed-s2));
  white-space: nowrap;
}
.ed-igri .ed-igra-head__back:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 740px) {
  .ed-igri .ed-igra-head {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--ed-s6);
    padding: var(--ed-s6) 0 var(--ed-s5);
  }
  .ed-igri .ed-igra-head__back { margin-top: -10px; }
}

.ed-igri .alfa-igra-stage { padding: var(--ed-s5) 0 var(--ed-s4); }
@media (min-width: 740px) {
  .ed-igri .alfa-igra-stage { padding-top: var(--ed-s6); }
}

/* Score line and controls: one pattern for every game. The score at the left, the buttons at the
   right on one line (Zborle has no score, so its buttons sit alone at the right). The head's hairline
   above is the only rule: the strip is not boxed. On phones the buttons start at the left edge. */
.ed-igri .sud-top,
.ed-igri .zbo-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ed-s3) var(--ed-s4);
  min-height: 48px;
  margin-bottom: var(--ed-s5);
  padding-bottom: 0;
  border-bottom: 0;
}
.ed-igri .sud-top { justify-content: space-between; }
.ed-igri .zbo-tools { align-self: stretch; justify-content: flex-start; }
@media (min-width: 740px) {
  .ed-igri .zbo-tools { justify-content: flex-end; }
}
.ed-igri .alfa-hud-cell b {
  font-family: var(--ed-head);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}
.ed-igri .alfa-hud-cell i { font-size: 0.625rem; font-weight: 500; letter-spacing: 0.06em; color: var(--ed-ink-4); }

.ed-igri__btn { min-height: 40px; }
.ed-igri__btn[aria-pressed="true"],
.ed-igri__btn[aria-pressed="true"]:hover { border-color: var(--ed-ink); background: var(--ed-ink); color: #fff; }
@media (min-width: 1024px) {
  .ed-igri__btn { min-height: 34px; }
}

/* Sudoku tools: four square-cornered keys */
.ed-igri-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 8px 2px 7px;
  border: 1px solid var(--ed-line-2);
  border-radius: var(--ed-radius);
  background: var(--ed-bg);
  font-family: var(--ed-sans);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--ed-ink-2);
  transition: border-color 0.15s var(--ed-ease), background-color 0.15s var(--ed-ease);
}
.ed-igri-act span { font-size: 1.0625rem; font-weight: 400; line-height: 1; color: var(--ed-ink); }
/* games.js writes the notes state ("Вкл." / "Иск.") into this <em>; the key shows it only as its
   filled (aria-pressed) state, so all four keys share one layout and their icons line up. */
.ed-igri-act em { display: none; }
.ed-igri-act:hover { border-color: var(--ed-ink); }
.ed-igri-act[aria-pressed="true"] { border-color: var(--ed-ink); background: var(--ed-ink); color: #fff; }
.ed-igri-act[aria-pressed="true"] span { color: #fff; }
.ed-igri-act:disabled { opacity: 0.38; cursor: default; }
.ed-igri-act:disabled:hover { border-color: var(--ed-line-2); }

/* Boards are built by games.js after load: reserve their final size so nothing below them moves.
   The 720px and 1000px queries follow the breakpoints of games.css, which sizes these boards. */
.ed-igri .mem-board { aspect-ratio: 420 / 550; }
.ed-igri .zbo-board { min-height: 378px; }
.ed-igri .zbo-keys { min-height: 168px; }
.ed-igri .sud-pad { min-height: 181px; }
@media (max-width: 1000px) {
  .ed-igri .sud-pad { min-height: 0; aspect-ratio: 358 / 53; }
}
@media (max-width: 720px) {
  .ed-igri .zbo-board { min-height: 0; aspect-ratio: 330 / 402; }
  .ed-igri .zbo-keys { min-height: 156px; }
}
/* Phones: nine digits in one row would be 35px wide. Two rows instead, 5 + 4 with the four centred
   (a ten-track grid, each key two tracks wide), so every key is about 60 x 48px. */
@media (max-width: 739px) {
  .ed-igri .sud-pad {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
    min-height: 102px;
    aspect-ratio: auto;
  }
  .ed-igri .sud-pad .sud-key { grid-column: span 2; height: 48px; aspect-ratio: auto; }
  .ed-igri .sud-pad .sud-key:nth-child(6) { grid-column: 2 / span 2; }
}

/* Sudoku: entered digits in a softer ink than the given ones; keys in the house greys.
   games.css block 04 fixes the cell tints (blue), the key radius (12px) and the box rules with
   !important (its `.alfa-igri button { box-shadow: none !important }` even erases its own box rules,
   which are box-shadows). This sheet uses no !important, so it paints over them with pseudo-elements:
   each cell and key is its own stacking context, and a ::before at z-index -1 lies above the element's
   own background and border but under its digit. */
.ed-igri .sud-grid .sud-cell { --alfa-accent: var(--ed-ink-3); z-index: 0; }

/* The 3 x 3 box rules: 2px of ink over every third gap, as heavy as the outer frame. The line box
   reaches 1px past the cell on every side, so it covers the 1px grid gap and meets the next line. */
.ed-igri .sud-grid .sud-cell.is-br::after,
.ed-igri .sud-grid .sud-cell.is-bb::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  pointer-events: none;
}
.ed-igri .sud-grid .sud-cell.is-br::after { border-right: 2px solid var(--ed-ink); }
.ed-igri .sud-grid .sud-cell.is-bb::after { border-bottom: 2px solid var(--ed-ink); }

/* Tints in greys: the row, column and box of the chosen cell faint, the same digit a shade darker,
   the chosen cell darkest. A wrong entry keeps games.css's pale red (a form error). */
.ed-igri .sud-grid .sud-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ed-igri .sud-grid .sud-cell.is-peer::before { background: var(--ed-bg-2); }
.ed-igri .sud-grid .sud-cell.is-same::before { background: var(--ed-bg-3); }
.ed-igri .sud-grid .sud-cell.is-wrong::before { background: none; }
.ed-igri .sud-grid .sud-cell.is-active::before { background: color-mix(in srgb, var(--ed-ink) 17%, var(--ed-bg)); }
.ed-igri .sud-grid.is-paused .sud-cell::before { background: none; }
.ed-igri .sud-grid.is-paused::after { z-index: 3; background: rgba(247, 247, 245, 0.97); font-weight: 700; color: var(--ed-ink-4); }

/* Number pad: square-cornered keys (3px, like the tool keys beside them), drawn by ::before over the
   rounded 12px box of games.css; the focus ring is drawn on the same square. */
.ed-igri .sud-pad .sud-key { position: relative; z-index: 0; }
.ed-igri .sud-pad .sud-key::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid var(--ed-line-2);
  border-radius: var(--ed-radius);
  background: var(--ed-bg);
  pointer-events: none;
  transition: border-color 0.15s var(--ed-ease), background-color 0.15s var(--ed-ease);
}
.ed-igri .sud-pad .sud-key b { color: var(--ed-ink); }
.ed-igri .sud-pad .sud-key i { color: var(--ed-ink-4); }
.ed-igri .sud-pad .sud-key:hover::before { border-color: var(--ed-ink); background: var(--ed-bg-2); }
.ed-igri .sud-pad .sud-key.is-full:hover::before { border-color: var(--ed-line-2); background: var(--ed-bg); }
.ed-igri .sud-pad .sud-key:focus-visible { outline: 0; }
.ed-igri .sud-pad .sud-key:focus-visible::before { outline: 2px solid var(--ed-accent); outline-offset: 2px; }

/* Memory: square-cornered cards; face down a quiet plate, face up white, found pairs in ink. */
.ed-igri .mem-back,
.ed-igri .mem-front { border-radius: var(--ed-radius); }
.ed-igri .mem-back { background: var(--ed-bg-2); border-color: var(--ed-line-2); }
.ed-igri .mem-back::after { border-color: var(--ed-line-2); }
.ed-igri .mem-front { background: var(--ed-bg); border-color: var(--ed-ink); color: var(--ed-ink); }
.ed-igri .mem-card.is-done .mem-front { background: var(--ed-ink); border-color: var(--ed-ink); color: #fff; }
.ed-igri .mem-card:focus-visible { outline-color: var(--ed-accent); border-radius: var(--ed-radius); }

/* Zborle keyboard: square-cornered grey keys (3px) drawn by ::before over games.css's 5px #e4e4e1
   keys; after a guess the keys take the game's own colours. */
.ed-igri .zbo-keys .zbo-key { position: relative; z-index: 0; }
.ed-igri .zbo-keys .zbo-key::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--ed-radius);
  background: var(--ed-bg-3);
  pointer-events: none;
  transition: background-color 0.15s var(--ed-ease);
}
@media (hover: hover) {
  .ed-igri .zbo-keys .zbo-key:hover::before { background: color-mix(in srgb, var(--ed-ink) 15%, var(--ed-bg)); }
}
.ed-igri .zbo-keys .zbo-key.is-correct::before { background: var(--alfa-ok); }
.ed-igri .zbo-keys .zbo-key.is-present::before { background: var(--alfa-near); }
.ed-igri .zbo-keys .zbo-key.is-absent::before { background: var(--alfa-off); }
.ed-igri .zbo-keys .zbo-key:focus-visible { outline: 0; }
.ed-igri .zbo-keys .zbo-key:focus-visible::before { outline: 2px solid var(--ed-accent); outline-offset: 2px; }

/* Zborle: square tiles with the house hairline. */
.ed-igri .zbo-tile { border-color: var(--ed-line-2); border-radius: 0; }
.ed-igri .zbo-tile.is-filled { border-color: var(--ed-ink-4); }
.ed-igri .zbo-tile.is-correct,
.ed-igri .zbo-tile.is-present,
.ed-igri .zbo-tile.is-absent { border-color: transparent; }
.ed-igri .zbo-mini i { border-color: var(--ed-line-2); border-radius: 0; }
.ed-igri .zbo-mini i.is-correct,
.ed-igri .zbo-mini i.is-present,
.ed-igri .zbo-mini i.is-absent { border-color: transparent; }

/* Rules sheet, results, the share button and the toast */
.ed-igri .alfa-sheet { border-radius: var(--ed-radius); box-shadow: none; }
.ed-igri .alfa-sheet h3 { font-family: var(--ed-head); font-weight: 500; line-height: 1.15; }
.ed-igri .alfa-result { border: 0; border-top: 1px solid var(--ed-ink); border-radius: 0; background: none; }
.ed-igri .alfa-result h3 { font-family: var(--ed-head); font-weight: 700; }
.ed-igri .alfa-result-line i,
.ed-igri .zbo-bar-track i { border-radius: 0; }
.ed-igri [data-share] { --alfa-ok: var(--ed-ink); }
/* The game's messages show near the top of the window, just under the sticky bar (55px on phones,
   48px on desktop), so they never cover the Zborle keyboard or the Sudoku pad at the bottom. */
.ed-igri .alfa-toast { top: calc(var(--ed-top) + 72px); bottom: auto; border-radius: var(--ed-radius); font-weight: 700; }

.ed-igri .alfa-igri-note {
  margin-top: var(--ed-s8);
  padding-top: var(--ed-s4);
  border-top: 1px solid var(--ed-line);
  font-family: var(--ed-sans);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ed-ink-4);
}

/* ------------------------------------------------------------------ 3. /zachuvani/ and /our-authors/: page head */
/* Both pages use the full frame, so the title and its rule start at the edge of the header and /igri/;
   the reading width (945px) is kept by the content under the head, flush left. */
.ed-saved__bar,
.ed-saved__list,
.ed-saved__empty,
.ed-authors__list { max-width: 945px; }

.ed-saved__intro,
.ed-authors__intro {
  padding: var(--ed-s5) 0 var(--ed-s5);
  border-bottom: 1px solid var(--ed-ink);
}
.ed-saved__title,
.ed-authors__title {
  font-size: clamp(2.5rem, 2.1rem + 1.1vw, 3rem);
  text-wrap: balance;
}
.ed-saved__lead,
.ed-authors__lead {
  max-width: var(--ed-measure);
  margin-top: var(--ed-s3);
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.5;
  color: var(--ed-ink-3);
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ 3b. /zachuvani/ */

.ed-saved__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-s2) var(--ed-s4);
  padding: var(--ed-s2) 0;
}
.ed-saved__count {
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink);
}
.ed-saved__clear { min-height: 40px; }
@media (min-width: 1024px) {
  .ed-saved__clear { min-height: 32px; }
}

.ed-saved__list[hidden] + .ed-saved__empty { margin-top: 0; }
.ed-saved__date:empty { display: none; }
.ed-saved__media.is-broken { background: var(--ed-bg-3); }
.ed-saved__remove {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 2px;
  margin-bottom: -10px;
  font-family: var(--ed-sans);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ed-ink-4);
  text-decoration: underline;
  text-decoration-color: var(--ed-line-2);
  text-underline-offset: 3px;
  transition: color 0.12s var(--ed-ease);
}
.ed-saved__remove:hover { color: var(--ed-ink); text-decoration-color: currentColor; }

.ed-saved__empty { border-top: 0; text-align: left; }
.ed-saved__empty .ed-empty__title { text-wrap: balance; line-height: 1.3; }
.ed-saved__empty-icon { display: block; margin-bottom: var(--ed-s3); color: var(--ed-ink-4); }
.ed-saved__key { white-space: nowrap; }
.ed-saved__empty-text {
  max-width: var(--ed-measure);
  margin: 0 0 var(--ed-s5);
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.5;
  text-wrap: balance;
}
.ed-saved__home { min-height: 40px; }
.ed-saved__noscript { margin-top: var(--ed-block-gap); }

/* ------------------------------------------------------------------ 4. /our-authors/ */

.ed-authors__list { margin: 0; padding: 0; list-style: none; }
.ed-author {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--ed-s5);
  padding: var(--ed-s6) 0;
  border-bottom: 1px solid var(--ed-line);
}
.ed-author__id {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: var(--ed-s4);
  align-items: center;
  align-content: start;
}
.ed-author__avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--ed-line-2);
  border-radius: 50%;
  background: var(--ed-bg-2);
  font-family: var(--ed-head);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ed-ink);
}
.ed-author__who { min-width: 0; }
.ed-author__name {
  font-family: var(--ed-head);
  font-size: var(--ed-fs-md);
  font-weight: 500;
  line-height: 1.17;
  color: var(--ed-ink);
  text-wrap: balance;
}
.ed-author__name a { transition: color 0.12s var(--ed-ease); }
.ed-author__name a:hover { color: var(--ed-ink-3); }
.ed-author__count { margin-top: 4px; }
.ed-author__bio,
.ed-author__all { grid-column: 1 / -1; }
.ed-author__bio {
  max-width: var(--ed-measure);
  margin-top: var(--ed-s4);
  font-family: var(--ed-serif);
  font-size: var(--ed-fs-dek);
  line-height: 1.5;
  color: var(--ed-ink-3);
  text-wrap: pretty;
}
.ed-author__all {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 5px;
  min-height: 40px;
  margin-top: var(--ed-s2);
  margin-bottom: -10px;
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink);
}
.ed-author__all:hover { color: var(--ed-ink-3); }

.ed-author__work { min-width: 0; padding-top: var(--ed-s3); border-top: 1px solid var(--ed-ink); }
.ed-author__label {
  padding-bottom: var(--ed-s2);
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink);
}
.ed-author__latest { margin: 0; padding: 0; list-style: none; }
.ed-author__item {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: var(--ed-s3) 0;
  border-bottom: 1px solid var(--ed-line);
}
.ed-author__item:last-child { border-bottom: 0; }
.ed-author__headline {
  font-family: var(--ed-head);
  font-size: var(--ed-fs-xs);
  font-weight: 500;
  line-height: 1.22;
  color: var(--ed-ink);
  text-wrap: balance;
  transition: color 0.12s var(--ed-ease);
}
.ed-author__headline:hover { color: var(--ed-ink-3); }
.ed-author__date {
  font-family: var(--ed-sans);
  font-size: var(--ed-fs-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--ed-ink-4);
}

@media (min-width: 740px) {
  .ed-author__id { grid-template-columns: 72px minmax(0, 1fr); column-gap: var(--ed-s5); }
  .ed-author__avatar { width: 72px; height: 72px; font-size: 2rem; }
  .ed-author__item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: var(--ed-s4);
    align-items: baseline;
  }
  .ed-author__date { font-size: 0.75rem; letter-spacing: 0; text-transform: none; }
}
@media (min-width: 1024px) {
  /* Identity at the left (2 parts), the latest work at the right (3 parts), a column rule between. */
  .ed-author.has-latest {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: calc(2 * var(--ed-col-pad));
    padding: var(--ed-block-gap) 0;
  }
  .ed-author.has-latest .ed-author__work {
    position: relative;
  }
  .ed-author.has-latest .ed-author__work::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: calc(-1 * var(--ed-col-pad));
    border-left: 1px solid var(--ed-line-2);
  }
}

/* ------------------------------------------------------------------ 5. Washes and motion (platform pass)
   /zachuvani/ and /our-authors/ open on the same neutral paper wash as search and 404, fading to
   white under the head (border-image outset: full width, no sideways scroll). Author cards rise once
   as they enter (data-reveal, core.js); the avatar takes a quiet hover. */

.ed-saved,
.ed-authors {
  --pg-wash: color-mix(in srgb, var(--ed-ink) 3.5%, #fff);
  border-image: linear-gradient(180deg, var(--pg-wash) 0, var(--pg-wash) 90px, rgb(255 255 255 / 0) 360px) fill 0 // 0 100vmax;
}
.ed-author__avatar { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s var(--ed-ease); }
.ed-author__headline,
.ed-author__name a,
.ed-author__all { transition: color 0.15s var(--ed-ease); }
.ed-author__all svg { transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) and (pointer: fine) {
  .ed-author:hover .ed-author__avatar { transform: scale(1.05); }
  .ed-author__all:hover svg { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .ed-author__avatar, .ed-author__all svg { transition: none; }
  .ed-author:hover .ed-author__avatar, .ed-author__all:hover svg { transform: none; }
}
@media print {
  .ed-saved, .ed-authors { border-image: none; }
}

/* ------------------------------------------------------------------ 6. Final polish (owner, 2026-11-26)
   /zachuvani/ and /our-authors/: the paper wash in oklab, rows that answer the pointer (an underline
   that draws in, a picture that zooms 3 %), buttons that press, an empty state that offers the
   sections. 180 to 520ms on one easing; off for reduced motion. */

.ed-saved,
.ed-authors { --md-ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
@supports (color: oklch(from red l c h)) {
  .ed-saved,
  .ed-authors {
    --pg-wash: oklch(0.975 0.004 85);
    border-image: linear-gradient(180deg in oklab, var(--pg-wash) 0, var(--pg-wash) 100px, oklch(1 0 0 / 0) 420px) fill 0 // 0 100vmax;
  }
}

.ed-saved__headline a,
.ed-author__headline,
.ed-author__name a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.18s var(--md-ease), color 0.18s var(--md-ease);
}
.ed-saved__item:hover .ed-saved__headline a,
.ed-saved__headline a:focus-visible,
.ed-author__headline:hover,
.ed-author__headline:focus-visible,
.ed-author__name a:hover,
.ed-author__name a:focus-visible { background-size: 100% 1px; color: var(--ed-ink); }
.ed-saved__item .ed-river__media { overflow: hidden; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ed-saved__item .ed-river__media img { transition: transform 0.5s var(--md-ease), opacity 0.35s var(--md-ease); }
  .ed-saved__item:hover .ed-river__media img { transform: scale(1.03); }
}
.ed-saved__remove { min-height: 44px; }
.ed-saved__clear,
.ed-saved__home,
.ed-saved__remove { transition: color 0.18s var(--md-ease), background-color 0.18s var(--md-ease), border-color 0.18s var(--md-ease), transform 0.18s var(--md-ease); }
.ed-saved__clear:active,
.ed-saved__home:active { transform: scale(0.97); }
.ed-saved__home { min-height: 44px; }
.ed-saved__home svg { transition: transform 0.18s var(--md-ease); }
.ed-saved__home:hover svg { transform: translateX(3px); }

/* The empty state: a quiet panel on the paper wash, then the sections to start from. */
.ed-saved__empty {
  margin-top: var(--ed-block-gap);
  padding: var(--ed-s6) var(--ed-s5);
  border-radius: var(--ed-radius);
  background: linear-gradient(90deg, var(--pg-wash, #f7f7f5), rgb(255 255 255 / 0));
}
.ed-saved__empty-icon { color: var(--ed-accent); }
.ed-saved__empty .ed-sections { margin-top: var(--ed-s6); }

/* Authors: the whole card reads as one target under the pointer. */
.ed-author { transition: background-color 0.18s var(--md-ease); }
.ed-author__all { min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .ed-saved__headline a, .ed-author__headline, .ed-author__name a,
  .ed-saved__clear, .ed-saved__home, .ed-saved__remove, .ed-saved__home svg, .ed-author { transition: none; }
  .ed-saved__clear:active, .ed-saved__home:active, .ed-saved__home:hover svg { transform: none; }
}
@media print {
  .ed-saved__empty { background: none; }
}

/* ------------------------------------------------------------------ 7. Round 6 (2026-11-26)
   /our-authors/ with one account (the newsroom): the card spans the frame and its ten latest
   headlines run in two columns, so no third of the page stays empty. */
.ed-authors--single .ed-authors__list { max-width: none; }
@media (min-width: 1024px) {
  .ed-authors--single .ed-author.has-latest { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
  .ed-authors--single .ed-author__latest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: calc(2 * var(--ed-col-pad));
  }
  .ed-authors--single .ed-author__item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
/* /zachuvani/ (round 6): each row carries its section and, for recipes, time and level; «Отстрани» is
   a real 44px button; a removal can be undone for six seconds; the empty state shows the save button's
   own mark. */
.ed-saved__kicker { margin-bottom: 4px; }
.ed-saved__meta { margin-top: 6px; }
.ed-saved__remove {
  min-height: 44px;
  margin-top: var(--ed-s2);
  margin-bottom: 0;
  padding: 0 var(--ed-s3);
  border: 1px solid var(--ed-line-2);
  border-radius: var(--ed-radius);
  background: var(--ed-bg);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ed-ink-3);
  text-decoration: none;
}
.ed-saved__remove:hover { border-color: var(--ed-ink); color: var(--ed-ink); }
.ed-saved__remove:active { transform: translateY(1px); }
@media (min-width: 1024px) {
  .ed-saved__remove { min-height: 36px; }
}
/* «Отстрането · Врати» floats over the page where the site's toasts sit (base.css .ed-toast), so
   neither its arrival nor its timed exit moves the list or the footer (no layout shift). */
.ed-saved__undo {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 900;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-s2) var(--ed-s4);
  width: min(560px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: var(--ed-s2) var(--ed-s2) var(--ed-s2) var(--ed-s4);
  border-radius: var(--ed-radius);
  background: var(--ed-ink);
  color: #fff;
  font-family: var(--ed-sans);
  font-size: 0.875rem;
  line-height: 1.35;
}
.ed-saved__undo[hidden] { display: none; }
.ed-saved__undo-text { min-width: 0; flex: 1 1 14rem; }
.ed-saved__undo-btn { min-height: 40px; border-color: #fff; background: #fff; color: var(--ed-ink); }
.ed-saved__undo-btn:hover { background: var(--ed-bg-2); color: var(--ed-ink); }
@media (pointer: coarse) {
  .ed-saved__undo-btn { min-height: 44px; }
}
.ed-saved__key { font-weight: 600; }
.ed-saved__key-icon { display: inline-flex; vertical-align: -2px; margin-right: 3px; }
@media (prefers-reduced-motion: reduce) {
  .ed-saved__remove:active { transform: none; }
}