/*
  χωρίς μεσίτη — components
  Semantic tokens only (see tokens.css). No borders: tone, shadow, whitespace.
*/

/* ── Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Type ───────────────────────────────────────── */
.display {
  font-size: var(--text-display);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.h1 { font-size: var(--text-2xl); font-weight: var(--weight-medium); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.h2 { font-size: var(--text-xl);  font-weight: var(--weight-medium); line-height: var(--leading-tight); }
.h3 { font-size: var(--text-lg);  font-weight: var(--weight-medium); }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); }
.muted { color: var(--color-text-muted); }
.small { font-size: var(--text-sm); }
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-brand);
}
.text-brand { color: var(--color-brand); }

/* ── Button ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium);
  padding: var(--space-3) var(--space-5);
  border: 0; border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none;
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn-primary { background: var(--color-brand); color: var(--color-text-on-brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-brand-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--color-surface-sunken); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-surface-strong); }
.btn-ghost { background: transparent; color: var(--color-brand); }
.btn-ghost:hover { background: var(--color-surface-sunken); }

/* ── Card ───────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.card-sunken { background: var(--color-surface-sunken); box-shadow: none; }
.card-brand { background: var(--color-brand); color: var(--color-text-on-brand); box-shadow: var(--shadow-md); }

/* ── Stat ───────────────────────────────────────── */
.stat-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand-strong);
  margin-bottom: var(--space-2);
}
.stat-label { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ── Badge ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1); white-space: nowrap;
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken); color: var(--color-text-muted);
}
.badge-brand   { background: var(--color-brand-soft);   color: var(--color-brand-strong); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-soft);  color: var(--color-danger); }

/* ── Step marker ────────────────────────────────── */
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: var(--color-brand); color: var(--color-text-on-brand);
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
}

/* ── Comparison bar ─────────────────────────────── */
.bar-row { display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: var(--space-4); }
.bar-row + .bar-row { margin-top: var(--space-3); }
.bar {
  display: flex; align-items: center;
  height: 48px; padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-lg); font-weight: var(--weight-semibold);
}
.bar-muted { background: var(--color-surface-strong); color: var(--color-text); }
.bar-brand { background: var(--color-brand); color: var(--color-text-on-brand); }

/* ── Tabs (underline is the one allowed line) ───── */
.tabs { display: flex; gap: var(--space-5); }
.tab {
  background: none; border: 0; font: inherit; cursor: pointer;
  padding: var(--space-2) 0;
  color: var(--color-text-subtle);
  box-shadow: inset 0 -2px 0 transparent;
}
.tab[aria-selected="true"] { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-text); }

/* ── Input ──────────────────────────────────────── */
.field { display: grid; gap: var(--space-2); }
.label { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.input {
  font: inherit; color: var(--color-text);
  background: var(--color-surface-sunken);
  border: 0; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.input::placeholder { color: var(--color-text-subtle); }
.input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--color-brand); background: var(--color-surface-strong); }

/* ── Table ──────────────────────────────────────── */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.table th {
  text-align: left; font-weight: var(--weight-medium); color: var(--color-text-muted);
  background: var(--color-surface-sunken);
  padding: var(--space-4) var(--space-5);
}
.table th:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.table th:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.table td { padding: var(--space-4) var(--space-5); }
.table tbody tr:nth-child(even) td { background: var(--color-bg); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .gap { color: var(--color-brand-strong); font-weight: var(--weight-semibold); }
.table tfoot td { font-weight: var(--weight-semibold); background: var(--color-surface-sunken); }
.table tfoot td:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.table tfoot td:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ── Receipt (paper with torn edge) ─────────────── */
.receipt {
  position: relative;
  background: var(--color-surface);
  padding: var(--space-6) var(--space-6) calc(var(--space-9) + var(--space-2));
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  --tear: 10px;
  -webkit-mask: radial-gradient(var(--tear) at 50% 100%, transparent 98%, #000) 50% 100% / calc(var(--tear) * 2) 100% repeat-x;
          mask: radial-gradient(var(--tear) at 50% 100%, transparent 98%, #000) 50% 100% / calc(var(--tear) * 2) 100% repeat-x;
}
.receipt-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-5); }
.receipt-line { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.receipt-rule { height: 2px; margin-block: var(--space-3); background: repeating-linear-gradient(90deg, var(--color-surface-strong) 0 6px, transparent 6px 12px); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.receipt-total .amount { position: relative; }
.receipt-total .amount::after {
  content: ""; position: absolute; left: -6%; right: -6%; top: 52%;
  height: 3px; border-radius: var(--radius-pill); background: var(--color-danger);
  transform-origin: left; transform: scaleX(var(--strike, 1));
  transition: transform 700ms var(--ease) 400ms;
}
.stamp {
  position: absolute; right: var(--space-5); bottom: var(--space-5);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-success); color: var(--color-text-on-brand);
  font-weight: var(--weight-semibold); font-size: var(--text-lg); line-height: 1.2;
  box-shadow: var(--shadow-md);
  transform: rotate(-8deg) scale(var(--stamp, 1));
  opacity: var(--stamp, 1);
  transition: transform 450ms cubic-bezier(0.3, 1.6, 0.5, 1) 1000ms, opacity 200ms ease 1000ms;
}
.stamp small { display: block; font-size: var(--text-xs); font-weight: var(--weight-medium); opacity: 0.85; }

/* ── Pictogram row ──────────────────────────────── */
.picto { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.picto svg { width: 30px; height: 30px; fill: var(--color-surface-strong); transition: fill 300ms var(--ease); }
.picto svg.on { fill: var(--color-brand); }
.picto-partial { position: relative; width: 30px; height: 30px; }
.picto-partial svg { position: absolute; inset: 0; }
.picto-partial .clip { position: absolute; inset: 0; overflow: hidden; width: var(--part, 40%); }

/* ── Range slider ───────────────────────────────── */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: var(--radius-pill);
  background: linear-gradient(var(--color-brand), var(--color-brand)) 0 / var(--fill, 30%) 100% no-repeat, var(--color-surface-strong);
  cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--color-surface); box-shadow: var(--shadow-md), inset 0 0 0 8px var(--color-brand); }
.range::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--color-surface); box-shadow: var(--shadow-md), inset 0 0 0 8px var(--color-brand); }

/* ── Timeline ───────────────────────────────────── */
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.timeline::before, .timeline::after {
  content: ""; position: absolute; top: 27px; left: 28px; right: calc((100% - 2 * var(--space-5)) / 3 - 29px); height: 4px; border-radius: var(--radius-pill);
  background: var(--color-surface-strong);
}
.timeline::after { background: var(--color-brand); transform-origin: left; transform: scaleX(var(--progress, 1)); transition: transform 1400ms var(--ease) 200ms; }
.milestone { position: relative; z-index: 1; }
.milestone-icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--color-brand); color: var(--color-text-on-brand); box-shadow: 0 0 0 8px var(--color-bg), var(--shadow-md);
  margin-bottom: var(--space-4);
}
.milestone-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.milestone .eyebrow { display: block; margin-bottom: var(--space-1); }

/* ── Waffle (100 cells = 100%) ──────────────────── */
.waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; width: 100%; max-width: 320px; }
.waffle i {
  aspect-ratio: 1; border-radius: 4px; background: var(--color-text-muted);
  transition: transform 400ms var(--ease), opacity 400ms var(--ease);
  transition-delay: calc(var(--i, 0) * 9ms);
}
.waffle i.owner { background: var(--color-success); }
.waffle i.both  { background: var(--color-warning); }
.js .reveal:not(.in) .waffle i { transform: scale(0.2); opacity: 0; }

.legend { display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.legend span { display: flex; align-items: center; gap: var(--space-2); }
.legend b { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--color-text-muted); }
.legend b.owner { background: var(--color-success); }
.legend b.both  { background: var(--color-warning); }
.legend em { font-style: normal; font-weight: var(--weight-semibold); margin-left: auto; }

/* ── Growing bar (animates to its inline width) ──── */
.grow { transition: width 1100ms var(--ease) 150ms; }
.js .reveal:not(.in) .grow { width: 0 !important; }

/* ── Dot timeline (one dot per advertiser, stacked when close in time) ── */
.dotline { position: relative; height: 150px; margin-top: var(--space-5); }
.dotline::before { content: ""; position: absolute; left: 0; right: 0; bottom: 26px; height: 3px; border-radius: var(--radius-pill); background: var(--color-surface-strong); }
.dotline i {
  position: absolute; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--color-text-muted);
  transition: transform 350ms var(--ease), opacity 350ms var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms + 200ms);
}
.dotline i.private { width: 18px; height: 18px; margin-left: 0; background: var(--color-success); box-shadow: 0 0 0 4px var(--color-surface); }
.dotline .ticks { position: absolute; left: 0; right: 0; bottom: 0; font-size: var(--text-xs); color: var(--color-text-subtle); }
.dotline .ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.dotline .ticks span:first-child { transform: none; }
.js .reveal:not(.in) .dotline i { transform: scale(0); opacity: 0; }
.legend.inline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.legend b.dot { border-radius: 50%; }

/* ── Shock band: one huge, sourced number ─────────── */
.shock { text-align: center; padding: var(--space-8) var(--space-6); border-radius: var(--radius-lg); background: var(--color-brand-strong); color: var(--color-text-on-brand); box-shadow: var(--shadow-lg); }
.shock .eyebrow { color: var(--color-text-on-brand); opacity: 0.75; }
.shock-number { display: block; margin: var(--space-4) 0; font-size: var(--text-hero-number); font-weight: var(--weight-semibold); line-height: 1; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.shock p { max-width: 38rem; margin: 0 auto; font-size: var(--text-lg); }
.shock small { display: block; max-width: 38rem; margin: var(--space-4) auto 0; font-size: var(--text-xs); opacity: 0.75; }

/* ── Form bits ──────────────────────────────────── */
textarea.input { min-height: 140px; resize: vertical; }
fieldset.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.chips legend { width: 100%; margin-bottom: var(--space-2); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); background: var(--color-surface-sunken); font-size: var(--text-sm); cursor: pointer; transition: background var(--duration) var(--ease), color var(--duration) var(--ease); }
.chip input:checked + span { background: var(--color-brand); color: var(--color-text-on-brand); }
.chip input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { font-size: var(--text-sm); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-sunken); }
.form-status:empty { display: none; }
.form-status[data-state="ok"] { background: var(--color-success-soft); color: var(--color-success); }
.form-status[data-state="error"] { background: var(--color-danger-soft); color: var(--color-danger); }
.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; }

/* ── Motion: reveal on scroll (only when JS marks the page) ── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0ms !important; transition-delay: 0ms !important; }
}

/* ── Layout helpers ─────────────────────────────── */
.stack   { display: grid; gap: var(--space-4); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.section { padding-block: var(--space-8); }
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .table th, .table td { padding: var(--space-3); }
  .section { padding-block: var(--space-7); }
  .card { padding: var(--space-5); }
  .bar-row { grid-template-columns: 5.5rem 1fr; }
  .timeline { grid-template-columns: 1fr; gap: var(--space-6); }
  .timeline::before, .timeline::after { top: 28px; bottom: 28px; left: 27px; right: auto; width: 4px; height: auto; }
  .timeline::after { transform-origin: top; transform: scaleY(var(--progress, 1)); }
  .milestone { display: grid; grid-template-columns: 58px 1fr; column-gap: var(--space-4); }
  .milestone-icon { grid-row: span 3; margin-bottom: 0; }
}
