/* Αρχική: the stories of a day, the topics of a day and the quick access. */

/* The stories of a day. */
.home-day { --card-gap: var(--space-3); }
.home-date { font-size: var(--text-caption); font-weight: 600; text-transform: capitalize; white-space: nowrap; color: var(--ink); }
.home-topic-label { color: var(--text-secondary); }
.home-day-story { margin: 0; font: 600 22px/1.25 var(--font-heading); letter-spacing: -0.01em; color: var(--ink); }
.home-day-meta { margin: 0; font-size: var(--text-small); color: var(--text-secondary); }
.home-day-meta .entity-link { font-weight: 600; color: var(--text-primary); }
.home-block { display: grid; gap: 6px; }

/* The horizontal bar of the outlets, and under it a line that names the part under the mouse. */
.home-stack-wrap { display: grid; gap: var(--space-3); }
.home-stack { display: flex; gap: 2px; width: 100%; height: 28px; }
.home-stack-part { display: block; min-width: 5px; border-radius: 4px; outline: none; transition: opacity var(--motion-base) var(--ease-out); }
a.home-stack-part { cursor: pointer; }
.home-stack.has-hover .home-stack-part:not(.is-on) { opacity: 0.35; }
.home-stack-part:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.home-stack-panel { display: grid; align-content: start; gap: 2px; min-height: 52px; }
.home-stack-panel p { margin: 0; }
.home-stack-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.home-stack-total { font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--strong); font-variant-numeric: tabular-nums; }
.home-stack-name { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.home-stack-cap { font-size: var(--text-caption); color: var(--text-secondary); }

/* The list of the stories of the day: a row picks the story, and its button opens its page. */
.home-stories { margin: 0; padding: var(--space-2) 0 0; list-style: none; display: grid; align-content: start; gap: 4px; border-top: 1px solid var(--border); max-height: 330px; overflow-y: auto; scrollbar-width: thin; }
.home-stories li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); border-radius: 8px; }
.home-stories li.is-current { background: var(--card-tint); }
.home-story-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-3); min-width: 0; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-primary); font: inherit; font-size: var(--text-small); line-height: 1.35; text-align: left; cursor: pointer; }
.home-story-pick:hover .home-story-name { color: var(--accent); }
.home-story-pick[aria-pressed="true"] .home-story-name { font-weight: 600; color: var(--ink); }
.home-story-pick .muted-text { font-size: var(--text-caption); font-variant-numeric: tabular-nums; }
.home-story-go { margin-right: 6px; white-space: nowrap; text-decoration: none; }
@media (max-width: 719px) {
      }

/* The quick access: four tiles in a 2×2 grid, the name and the line, the arrow on the right. */
.home-links { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.home-links li { border: 1px solid var(--border); border-radius: 10px; }
.home-links li:hover { border-color: var(--ink); }
.home-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); height: 100%; padding: 12px 14px; color: var(--text-primary); text-decoration: none; }
.home-links a:hover strong, .home-links a:focus-visible strong { color: var(--accent); }
.home-links a:hover .icon { transform: translateX(2px); }
.home-links .icon { color: var(--text-secondary); transition: transform var(--motion-base) var(--ease-out); }
.home-link-main { display: grid; gap: 2px; min-width: 0; }
.home-link-main strong { font-size: var(--text-small); font-weight: 600; }
.home-link-main .muted-text { font-size: var(--text-caption); }

@media (max-width: 1279px) { .home-grid > .c-5, .home-grid > .c-7 { grid-column: span 12; } }
@media (max-width: 519px) {
  .home-story-go { font-size: 0; gap: 0; padding: 0 8px; }
}

.home-share { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.home-arrow { font-size: max(10px, var(--text-min)); line-height: 1; cursor: help; }
.home-arrow.is-up { color: var(--emph-more); }
.home-arrow.is-down { color: var(--emph-less); }
.home-quick .home-links { grid-auto-rows: 88px; }
.home-quick .home-links a { padding: 12px 16px; }
.home-quick .home-link-main { gap: 3px; }
.home-quick .home-link-main strong { font-size: 16px; }
.home-quick .home-link-main .muted-text { font-size: var(--text-small); }
.home-topics-wrap { grid-template-columns: auto minmax(0, 380px); justify-content: center; gap: var(--space-6); align-items: center; padding: var(--space-2) 0; }
.home-donut { width: 220px; height: 220px; }
.home-donut .slice { cursor: default; outline: none; transition: opacity var(--motion-base) var(--ease-out); }
.home-donut .slice.is-dim { opacity: 0.3; }
.home-donut .slice:focus-visible { stroke: var(--ink); stroke-width: 2; }
.dash .chart .donut-cap { fill: var(--text-secondary); font-size: max(12px, var(--text-min)); }
.home-topic-side { display: grid; gap: var(--space-2); min-width: 0; }
.home-topic-legend, .home-topic-more .rows { gap: 0; }
.home-topic-row { padding: 4px 8px; border-radius: 6px; }
.home-topic-legend .home-topic-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
.home-topic-row.is-on { background: var(--card-tint); }
.home-topic-more summary { cursor: pointer; font-size: var(--text-small); font-weight: 600; color: var(--text-primary); }
.home-topic-more[open] summary { margin-bottom: var(--space-2); }
.home-topic-more .home-topic-row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 719px) { .home-topics-wrap { grid-template-columns: minmax(0, 1fr); } .home-donut { justify-self: center; } }

/* A new day or a new story comes in with a short fade and a small rise. The frame of the card and its title stay. */
.dcard.is-swap:not(.is-swap-story) > :not(.dcard-head), .dcard.is-swap:not(.is-swap-story) .home-date { animation: m-rise var(--motion-base) var(--ease-out) both; }
.dcard.is-swap-story > :is(.home-day-story, .home-day-meta, .home-block) { animation: m-rise var(--motion-base) var(--ease-out) both; }
.dcard.is-swap-story li.is-current { animation: m-fade var(--motion-base) var(--ease-out) both; }
.dcard.is-swap .home-day-meta { animation-delay: var(--motion-stagger); }
.dcard.is-swap .home-block { animation-delay: calc(2 * var(--motion-stagger)); }
.dcard.is-swap .home-stories { animation-delay: calc(3 * var(--motion-stagger)); }

/* The hero: the first screen of Αρχική. The title, a line about the site, the large search, the topics to search for and the size of the data,
   over a faint silhouette of the articles per day. It runs the full width of the page; the news starts under it. */
:root:has(.content.is-home) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { :root:has(.content.is-home) { scroll-behavior: auto; } }
.home-hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center;
  min-height: min(calc(100svh - var(--navbar-height)), 780px); margin: 0 calc(-1 * var(--space-5));
  padding: clamp(48px, 9vh, 104px) var(--space-5) 104px; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(1100px 520px at 50% -12%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface-page);
}
/* The moving field fills the hero (hero-field.js). A soft shade keeps the text in the middle readable. */
.home-hero-field { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.home-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(ellipse 44% 48% at 50% 50%, color-mix(in srgb, var(--surface-page) 92%, transparent) 62%, transparent 100%); }
.home-hero-caption { position: absolute; left: var(--space-5); bottom: var(--space-5); margin: 0; padding: 2px var(--space-2); border-radius: 4px; background: var(--surface-page); font: var(--text-caption)/18px var(--font-mono, monospace); color: var(--text-primary); transition: opacity var(--motion-slow) var(--ease-out); }
.home-hero-caption.is-empty { opacity: 0; }
.home-hero-inner { display: grid; justify-items: center; gap: var(--space-5); width: 100%; max-width: 1200px; margin: 0 auto; text-align: center; }

/* The masthead: one line in capitals, the "/" a light stroke a little taller than the letters.
   On each visit the name rises in, the "/" draws from the top, then the line after it rises in. Only opacity, transform and clip-path move. */
.home-mast-block { display: grid; justify-items: center; gap: var(--space-3); }
.home-mast { margin: 0; font: 600 var(--text-caption)/18px var(--font-mono, monospace); letter-spacing: 0.12em; color: var(--text-secondary); }
.home-headline { max-width: 18em; margin: 0; font: 600 clamp(30px, 4vw, 52px)/1.12 var(--font-heading); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.mast-part { display: inline-block; }
.mast-slash { display: inline-block; margin: 0 0.28em; font-weight: 600; scale: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  .mast-part { animation: mast-rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .mast-name { animation-delay: 150ms; }
  .mast-slash { animation: mast-draw 600ms cubic-bezier(0.65, 0, 0.35, 1) 700ms both; }
  .mast-tail { animation-delay: 1100ms; }
}
@keyframes mast-rise { from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes mast-draw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* The large search: a pill the width of the column. It opens the panel of the global search over it (shell.js, hero). */
.home-hero-search { width: 100%; max-width: 720px; margin-top: var(--space-2); }
.home-hero .global-search.is-hero { display: block; width: 100%; margin: 0; }
.home-hero .global-search.is-hero .search-button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-width: 0; height: 52px; padding: 0 6px 0 20px;
  border: 1px solid var(--border); border-radius: var(--pill, 999px); background: var(--surface-raised); color: var(--text-secondary);
  font: 16px var(--font-text); box-shadow: 0 1px 0 color-mix(in srgb, var(--shade) 3%, transparent), 0 18px 40px -22px color-mix(in srgb, var(--shade) 35%, transparent);
  transition: border-color var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}
.home-hero .global-search.is-hero .search-button:hover, .home-hero .global-search.is-hero .search-button:focus-visible { border-color: var(--ink); box-shadow: 0 1px 0 color-mix(in srgb, var(--shade) 3%, transparent), 0 22px 48px -20px color-mix(in srgb, var(--shade) 42%, transparent); }
.home-hero .is-hero .search-button-icon { width: 20px; height: 20px; color: var(--ink); }
.home-hero .is-hero .search-button-label { display: block; flex: 1; min-width: 0; padding: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.home-hero .is-hero .global-search-key { display: inline-block; flex: none; }
.search-hero-go { display: inline-flex; align-items: center; flex: none; height: 40px; padding: 0 20px; border-radius: var(--pill, 999px); background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 600; }
/* The open panel keeps the shape of the field: round, with a tall field row. */
.search-panel.is-hero { border-radius: 28px; }
.search-panel.is-hero .search-field { min-height: 52px; padding-left: 20px; }
.search-panel.is-hero .global-search-icon { width: 22px; height: 22px; color: var(--ink); }
.search-panel.is-hero .global-search-input { font-size: 16px; }

/* The topics of the last day: a chip opens the search with the topic in the field. */
.home-hero-try { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); }
.home-hero-try-label { margin-right: var(--space-1); font-size: var(--text-small); color: var(--text-secondary); }
.home-chip { min-height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--pill, 999px); background: color-mix(in srgb, var(--surface-raised) 70%, transparent); color: var(--text-primary); font: max(13px, var(--text-min)) var(--font-text); cursor: pointer; transition: border-color var(--motion-base) var(--ease-out), color var(--motion-base) var(--ease-out); }
.home-chip:hover, .home-chip:focus-visible { border-color: var(--ink); color: var(--ink); }

/* The size of the data: four numbers in a row with thin rules between them, the period under them. */
.home-hero .home-hero-stats { display: grid; justify-items: center; gap: var(--space-2); margin-top: var(--space-5); padding: 0; border: 0; border-radius: 0; background: none; }
.home-hero-stats dl { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; }
.home-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 clamp(16px, 3vw, 36px); }
.home-hero-stat + .home-hero-stat { border-left: 1px solid var(--border); }
.home-hero-stat dd { order: -1; margin: 0; }
.home-hero .home-hero-stat .kpi-value { font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.home-hero-stat dt { font-size: var(--text-caption); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.home-hero-period { margin: 0; font-size: var(--text-caption); color: var(--text-secondary); }

/* The way down to the news: a quiet link at the bottom of the hero, its arrow nods. */
.home-hero-more { position: absolute; left: 50%; bottom: var(--space-5); display: inline-flex; flex-direction: column; align-items: center; gap: 2px; transform: translateX(-50%); font-size: var(--text-caption); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.home-hero-more:hover { color: var(--accent); }
.home-hero-more .icon { animation: home-nod 1.8s var(--ease-out) infinite; }
@keyframes home-nod { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .home-hero-more .icon { animation: none; } }

/* Under the hero the page is a centered column: on a wide screen the news keeps a margin on both sides, the hero alone runs the full width. */
.content.is-home > :not(.home-hero) { box-sizing: border-box; width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: clamp(0px, calc(4vw - 16px), 48px); }

@media (max-width: 1023px) {
  .home-hero { margin: 0 calc(-1 * var(--space-4)); padding: 40px var(--space-4) 88px; min-height: 0; }
  .home-hero .is-hero .global-search-key { display: none; }
  .home-hero-field { opacity: 0.4; }
  .home-hero-caption { display: none; }
}
@media (max-width: 719px) {
  .home-hero-inner { gap: var(--space-4); }
  .home-hero .global-search.is-hero .search-button { height: 48px; padding: 0 5px 0 16px; font-size: 16px; }
  .search-hero-go { height: 38px; padding: 0 16px; font-size: 14px; }
  .home-hero-stats dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-4); width: 100%; }
  .home-hero-stat:nth-child(odd) { border-left: 0; }
}
@media (max-width: 419px) {
  .search-hero-go { display: none; }
  .home-hero-try-label { flex-basis: 100%; margin: 0; }
}

.home-grid { scroll-margin-top: calc(var(--navbar-height) + var(--space-4)); margin-top: var(--space-6); }

/* The hero in the type and colors of the tabs: the title, the line under it, the fields, the chips and the stat cards of the pages. */
.home-mast { font: 400 var(--text-small)/20px var(--font-text); letter-spacing: 0; color: var(--text-primary); }
.mast-slash { margin: 0 0.3em; font-weight: 400; scale: 1; color: var(--text-secondary); }
.home-headline { max-width: none; font: 700 24px/32px var(--font-heading); letter-spacing: -0.6px; color: var(--ink); }
.home-mast-block { gap: var(--space-1); }
.home-mast-block .home-headline { order: -1; }
.home-hero-caption { font: 400 var(--text-caption)/18px var(--font-text); color: var(--text-secondary); }
.home-hero .global-search.is-hero .search-button { height: 44px; padding: 0 4px 0 var(--space-3); border-radius: 8px; box-shadow: none; font: 400 var(--text-small) var(--font-text); }
.home-hero .global-search.is-hero .search-button:hover, .home-hero .global-search.is-hero .search-button:focus-visible { border-color: var(--rule); box-shadow: none; }
.home-hero .is-hero .search-button-icon { width: 18px; height: 18px; color: var(--text-secondary); }
.search-hero-go { height: 34px; padding: 0 var(--space-3); border-radius: 6px; font-size: var(--text-small); font-weight: 500; }
.search-panel.is-hero { border-radius: 10px; }
.home-hero-try-label { font-size: var(--text-caption); }
.home-chip { min-height: 28px; padding: 0 var(--space-3); border-radius: 6px; background: var(--surface-raised); font-size: var(--text-caption); font-weight: 400; }
.home-chip:hover, .home-chip:focus-visible { border-color: var(--rule); }
.home-hero .home-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-items: stretch; gap: var(--space-4); width: 100%; max-width: 960px; margin-top: var(--space-2); text-align: left; }
.home-hero-period { margin-top: calc(-1 * var(--space-2)); }
.home-hero-more { padding: 2px var(--space-2); border-radius: 4px; background: var(--surface-page); font-size: var(--text-caption); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
@media (max-width: 719px) { .home-hero .home-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The chart of the days stays readable when one day is picked: the bars only step back a little. */
.home-daily .bar-chart .bar-col.is-muted { opacity: 0.75; }
/* The topics of the day lead the page: a large donut. */
@media (min-width: 720px) { .home-topics .home-donut { width: 300px; height: 300px; } }
