/* =========================================================
   Neptunium – design system (φωτεινό)
   Τεχνικό σχέδιο ναυπηγού σε ψυχρό λευκό. Δύο σημασιολογικά χρώματα:
   Cherenkov (μπλε) = πυρηνικό, Bunker (κεχριμπάρι) = ορυκτό καύσιμο.
   Η μόνη «τολμηρή» στιγμή: ο ζωντανός πυρήνας αντιδραστήρα στην αρχική.
   ========================================================= */


:root {
  --sea: #f3f6f9;        /* φόντο σελίδας */
  --hull: #ffffff;       /* επιφάνειες */
  --hull-2: #f7f9fb;     /* πεδία */
  --line: #d6e0e8;
  --line-soft: #e6edf2;
  --ink: #0c2233;
  --ink-2: #405668;
  --ink-3: #5e7385;
  --cherenkov: #0a74b0;  /* πυρηνικό: κείμενο, links, κουμπιά */
  --glow: #35c6f2;       /* πυρηνικό: φως, animation */
  --glow-soft: #e3f6fd;
  --bunker: #b86e0b;
  --danger: #c0392b;
  --grid-line: rgb(10 116 176 / .07);
  --tenant: var(--cherenkov);

  --serif: Arial, 'Helvetica Neue', Helvetica, sans-serif;  /* τίτλοι */
  --sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);

  --r-s: 6px;
  --r-m: 10px;
  --gap: 1.5rem;
  --measure: 68ch;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--sea);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--sans);
  font-feature-settings: 'tnum' 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cherenkov); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font: 700 var(--step-3)/1.12 var(--serif); letter-spacing: -0.02em; }
h2 { font-size: var(--step-1); }
p { margin: 0; }
code { font-size: .9em; background: var(--line-soft); padding: .1em .35em; border-radius: 4px; }

:focus-visible { outline: 2px solid var(--cherenkov); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--ink); color: #fff; padding: .5rem 1rem; }

.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }
.inline { display: inline; }

/* ---------- Κουμπιά ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.15rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 var(--step-0)/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--cherenkov); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 6px 18px -8px rgb(10 116 176 / .7); }
.btn-primary:hover { background: #08608f; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink-3); background: var(--hull); }
.btn-quiet { background: var(--hull); }
.btn-sm { min-height: 36px; padding: .4rem .9rem; font-size: var(--step--1); }
.btn:disabled { opacity: .7; cursor: default; }
button.link { background: none; border: 0; padding: 0; color: var(--cherenkov); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button.link.danger { color: var(--danger); }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  background: rgb(255 255 255 / .86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font: 700 1.375rem/1 var(--serif); letter-spacing: -0.02em; }
.wordmark-mark { width: 30px; height: 30px; }
.wordmark-lg { font-size: 2rem; }
.wordmark-lg .wordmark-mark { width: 40px; height: 40px; }

.toolnav { overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.toolnav::-webkit-scrollbar { display: none; }
.toolnav ul { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.toolnav a {
  display: block; padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .9375rem;
}
.toolnav a:hover { color: var(--ink); background: var(--line-soft); }
.toolnav a[aria-current="page"] { color: #fff; background: var(--ink); }
.toolnav a.is-soon { color: var(--ink-3); }

.masthead-end { display: flex; align-items: center; gap: 1rem; font-size: .9375rem; }
.masthead-end a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.masthead-end a:not(.btn):hover { color: var(--ink); }
.who { color: var(--ink-3); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .masthead { grid-template-columns: 1fr auto; row-gap: .5rem; }
  .toolnav { grid-column: 1 / -1; grid-row: 2; }
  .who { display: none; }
}

/* ---------- Colophon ---------- */
.colophon {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between;
  padding: 2rem clamp(1rem, 3vw, 2rem); margin-top: 4rem;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--step--1);
}
.colophon p:first-child { max-width: var(--measure); }

/* ---------- Αρχική ---------- */
.hero {
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 3vw, 2rem) clamp(2.5rem, 5vw, 4rem);
  max-width: 1200px; margin: 0 auto;
}
.hero-title {
  font: 700 var(--step-4)/1.08 var(--serif); letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 1.25rem;
  font: 400 var(--step-2)/1.3 var(--serif);
  color: var(--cherenkov); letter-spacing: -0.01em;
  max-width: 34ch;
}
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }

.toolshelf { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.toolshelf h2 { font-size: var(--step-0); color: var(--ink-2); font-weight: 500; margin-bottom: 1rem; }
.toolshelf-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}
.shelf-item { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.shelf-item a {
  display: grid; grid-template-rows: auto 1fr auto; gap: .5rem; height: 100%;
  padding: 1.25rem 1.25rem 1rem; background: rgb(255 255 255 / .6);
  color: var(--ink); text-decoration: none;
}
.shelf-item a:hover { background: var(--glow-soft); }
.shelf-name { font: 700 var(--step-1)/1.2 var(--serif); letter-spacing: -0.01em; }
.shelf-desc { color: var(--ink-2); font-size: .9375rem; line-height: 1.45; }
.shelf-state { font-size: var(--step--1); color: var(--ink-3); }
.shelf-item.is-ready .shelf-state { color: var(--cherenkov); font-weight: 600; }
.shelf-item.is-ready a { background: var(--hull); box-shadow: inset 3px 0 0 var(--glow); }
.shelf-item.is-soon .shelf-name { color: var(--ink-2); }

/* ---------- Σελίδες απλές ---------- */
.page-narrow { max-width: 640px; margin: 0 auto; padding: 5rem 1.25rem; }
.page-narrow > * + * { margin-top: 1.25rem; }
.page-wide { max-width: 1100px; margin: 0 auto; padding: 3rem clamp(1rem, 3vw, 2rem); }
.page-wide > * + * { margin-top: 1.5rem; }
.status-code { font: 700 4rem/1 var(--serif); color: var(--ink-3); }
.debug { white-space: pre-wrap; background: var(--hull); padding: 1rem; border-radius: var(--r-s); font-size: var(--step--1); }

.alert { border-left: 3px solid var(--danger); background: #fdf0ee; padding: .75rem 1rem; border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--ink); }
.notice { border-left: 3px solid var(--cherenkov); background: var(--glow-soft); padding: .75rem 1rem; border-radius: 0 var(--r-s) var(--r-s) 0; }

/* ---------- Φόρμες ---------- */
.field { display: grid; gap: .35rem; }
.field > span:first-child { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.field small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: .55rem .75rem;
  background: var(--hull-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-s);
  font: 400 var(--step-0)/1.3 var(--sans);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cherenkov); outline-offset: 0; border-color: transparent; }
input[aria-invalid] { border-color: var(--danger); }
textarea.code { font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.num-wrap { position: relative; display: block; }
.num-wrap input { padding-right: 4.5rem; text-align: right; }
.num-wrap .unit { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .8125rem; pointer-events: none; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; min-height: 0; margin-top: .2rem; accent-color: var(--cherenkov); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Σύνδεση ---------- */
.bare main { display: grid; place-items: center; padding: 2rem 1rem; min-height: 100vh; }
.signin { width: min(420px, 100%); }
.signin > * + * { margin-top: 1.25rem; }
.signin h1 { margin-top: 2.5rem; }
.signin .btn { width: 100%; }

/* =========================================================
   Εργαλεία
   ========================================================= */
.tool { max-width: 1320px; margin: 0 auto; padding: 2.5rem clamp(1rem, 3vw, 2rem) 0; }
.tool-head { max-width: 900px; }
.tool-head > * + * { margin-top: .9rem; }
.tool-head h1 { font-size: var(--step-4); line-height: 1.08; text-wrap: balance; }

.tool-grid {
  display: grid; gap: 2rem; margin-top: 2.5rem;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 980px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }

.controls {
  position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto;
  padding: 1.25rem; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
@media (max-width: 980px) {
  .controls { position: static; max-height: none; order: 2; }
  .results { order: 1; }
}
.controls fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .85rem; }
.controls legend { font-weight: 650; font-size: .9375rem; margin-bottom: .85rem; color: var(--ink); }
.controls .fs-nuclear legend { color: var(--cherenkov); }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }

/* Η ετυμηγορία: το ένα «τολμηρό» στοιχείο της σελίδας */
.verdict { padding: .25rem 0 .5rem; }
.verdict-main {
  font: 700 clamp(1.5rem, 1.05rem + 1.4vw, 2.2rem)/1.2 var(--serif); letter-spacing: -0.02em;
  max-width: 30ch; text-wrap: balance;
}
.verdict.is-win .verdict-main { color: var(--cherenkov); }
.verdict-sub { margin-top: .75rem; font-size: var(--step-1); color: var(--ink-2); max-width: 52ch; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.kpi { background: var(--hull); padding: 1rem 1.1rem; display: grid; gap: .5rem; align-content: start; }
.kpi dt { font-size: .8125rem; color: var(--ink-2); line-height: 1.35; }
.kpi dd { margin: 0; display: grid; gap: .15rem; }
.kpi-value { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.kpi-note { font-size: .8125rem; color: var(--ink-3); }

.panel { margin: 0; padding: 1.25rem; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 1px 2px rgb(12 34 51 / .04); }
.panel figcaption, .panel > h2 { margin-bottom: 1rem; }
.panel figcaption p { margin-top: .35rem; max-width: 70ch; }

.chart, .winmap { position: relative; }
.chart-svg, .winmap-svg { width: 100%; height: auto; }
.chart-svg text, .winmap-svg text { font-family: Arial, sans-serif; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis, .winmap-svg .axis { fill: var(--ink-3); font-size: 12px; }
.winmap-svg .axis-title { fill: var(--ink-2); font-size: 12.5px; }
.chart-svg .label { fill: var(--ink); font-size: 14px; font-weight: 500; }
.chart-svg .is-nuclear .label { fill: var(--cherenkov); font-weight: 650; }
.chart-svg .value { fill: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.chart-svg .row-hl { fill: var(--glow-soft); }
.chart-svg .gap { fill: var(--hull); }
.chart-svg .seg { cursor: default; }
.chart-svg .seg:hover { opacity: .85; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: .75rem 0 0; padding: 0; list-style: none; font-size: .875rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }

.winmap-svg .cell:hover { stroke: var(--ink); stroke-width: 1.5; }
.winmap-svg .breakeven { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; }
.winmap-svg .you-ring { animation: ping 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { 0% { stroke-opacity: 1; } 70%, 100% { stroke-opacity: .35; } }
.winmap-svg .you-ring { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.winmap-svg .you-dot { fill: var(--ink); }
.winmap-svg .you-label { fill: var(--ink); font-size: 13px; font-weight: 650; paint-order: stroke; stroke: #fff; stroke-width: 4px; }

.tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  display: grid; gap: .15rem; padding: .5rem .7rem; min-width: 160px;
  background: var(--ink); border: 0; border-radius: var(--r-s);
  font-size: .8125rem; color: #c9d6e0; box-shadow: 0 10px 28px -6px rgb(12 34 51 / .45);
}
.tip strong { color: #fff; }
.tip[hidden] { display: none; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: .6rem .7rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th { color: var(--ink-2); font-weight: 500; font-size: .8125rem; vertical-align: bottom; white-space: normal; }
table.data tbody th, table.data thead th:first-child { text-align: left; font-weight: 600; }
table.data .strong { font-weight: 700; color: var(--ink); }
table.data tr.is-nuclear th { color: var(--cherenkov); }
table.data tr.is-nuclear { background: var(--glow-soft); }
.page-wide table.data th, .page-wide table.data td { text-align: left; }

.method { margin-top: 1rem; color: var(--ink-2); font-size: .9rem; }
.method summary, .provenance summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.method p { margin-top: .5rem; max-width: 75ch; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.scenarios ul { list-style: none; margin: 0; padding: 0; }
.scenarios li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.scenarios li:last-child { border-bottom: 0; }
.sc-name { font-weight: 600; margin-right: auto; }

.provenance { font-size: .875rem; color: var(--ink-3); }
.provenance ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.provenance li + li { margin-top: .25rem; }

/* ---------- Dialog ---------- */
.dialog {
  width: min(440px, calc(100vw - 2rem)); padding: 1.5rem;
  background: var(--hull); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-m);
}
.dialog::backdrop { background: rgb(12 34 51 / .45); backdrop-filter: blur(3px); }
.dialog h2 { font: 700 var(--step-1)/1.2 var(--serif); }
[data-save-result] { word-break: break-all; color: var(--cherenkov); }

/* ---------- Admin ---------- */
.admin-form textarea[name=data] { min-height: 420px; }

/* ---------- Προσβασιμότητα / εκτύπωση ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .chart-svg .seg { stroke: CanvasText; }
}
@media print {
  :root { --sea: #fff; }
  .reactor, .hero-grid::before { display: none; }
  .masthead, .controls, .actions, .scenarios, .colophon { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .panel { break-inside: avoid; }
}

/* =========================================================
   Hero με ζωντανό πυρήνα αντιδραστήρα
   ========================================================= */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
  padding-top: clamp(2rem, 5vw, 4.5rem);
  position: relative;
}
.hero::before {
  /* απαλό φως Cherenkov πίσω από τον πυρήνα */
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  right: -10%; top: -5%; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgb(53 198 242 / .18), rgb(53 198 242 / 0));
}
.hero-copy { min-width: 0; }
.hero-title { max-width: 20ch; font-size: clamp(2rem, 1.1rem + 2.3vw, 3.1rem); }
.hero-sub { color: var(--cherenkov); }

.reactor { margin: 0; position: relative; min-width: 0; }
.reactor canvas { width: 100%; display: block; touch-action: pan-y; cursor: crosshair; }
.reactor-readout {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem;
  margin-top: .25rem; font-size: .8125rem; color: var(--ink-3);
}
.ro { display: inline-flex; gap: .5rem; align-items: baseline; }
.ro-value { color: var(--ink); font-weight: 650; font-size: .9375rem; min-width: 3.5ch; }
.ro-hint { flex-basis: 100%; text-align: center; color: var(--ink-3); font-size: .78rem; }

.hero-copy { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .reactor { max-width: 520px; width: 100%; margin: 0 auto; order: -1; }
}

/* Μικρός πυρήνας στην κεφαλίδα των εργαλείων */
.tool-head.has-core { position: relative; max-width: none; padding-right: 260px; min-height: 200px; }
.tool-head.has-core > :not(.reactor-mini) { max-width: 900px; }
.reactor-mini { position: absolute; right: 0; top: -1.5rem; width: 240px; }
.reactor-mini canvas { cursor: crosshair; }
@media (max-width: 900px) {
  .tool-head.has-core { padding-right: 0; min-height: 0; }
  .reactor-mini { display: none; }
}

/* Είσοδος του γραφήματος μόνο στην πρώτη εμφάνιση */
.chart-svg.is-intro .seg { animation: grow .9s cubic-bezier(.2,.7,.2,1) both; transform-box: fill-box; transform-origin: left center; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Installer */
.install { width: min(520px, 100%); }
.install fieldset { border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.25rem; background: var(--hull); }
.install legend { font-weight: 700; padding: 0 .4rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .9rem; }
.checks .ok span { color: #1f8f78; font-weight: 700; }
.checks .bad { color: var(--danger); font-weight: 700; }

/* =========================================================
   Αγώνας
   ========================================================= */
.race-grid {
  display: grid; gap: 1.5rem; margin-top: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
}
@media (max-width: 980px) { .race-grid { grid-template-columns: minmax(0, 1fr); } }

.race-stage {
  position: relative; aspect-ratio: 4 / 3; min-height: 360px;
  background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m);
  overflow: hidden;
  background-image: radial-gradient(circle at 50% 55%, var(--glow-soft), rgba(255,255,255,0) 70%);
}
.race-stage canvas { display: block; }

.race-day {
  position: absolute; left: 1.25rem; top: 1rem;
  display: grid; line-height: 1;
}
.race-day span { font-size: .8125rem; color: var(--ink-3); }
.race-day strong { font-size: 2.6rem; letter-spacing: -0.03em; margin-top: .2rem; font-variant-numeric: tabular-nums; }

.race-toast {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  max-width: min(90%, 560px); padding: .65rem 1rem;
  background: var(--ink); color: #fff; border-radius: 999px; font-size: .9rem; text-align: center;
  box-shadow: 0 10px 30px -10px rgb(12 34 51 / .6);
  animation: toast-in .4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.race-result {
  position: absolute; inset: auto 1rem 1rem 1rem;
  padding: 1.25rem 1.4rem; border-radius: var(--r-m);
  background: rgb(255 255 255 / .94); backdrop-filter: blur(6px);
  border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgb(12 34 51 / .45);
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.race-result-title { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; color: var(--cherenkov); }
.race-result ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--ink-2); }
.race-result li + li { margin-top: .2rem; }
.race-next { margin-top: .6rem; font-size: .8125rem; color: var(--ink-3); }

.race-side { display: grid; gap: 1rem; }
.ship-card { padding: 1rem 1.1rem; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m); }
.ship-card header { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.ship-card h2 { font-size: 1rem; }
.ship-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ship-card.is-conv .ship-dot { background: #b86e0b; }
.ship-card.is-nuc .ship-dot { background: var(--cherenkov); box-shadow: 0 0 0 4px rgb(53 198 242 / .25); }
.ship-state { margin-left: auto; font-size: .8125rem; color: var(--ink-3); }
.ship-card.is-done .ship-state { color: var(--ink); font-weight: 700; }
.ship-progress { height: 6px; margin: .75rem 0; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.ship-progress span { display: block; height: 100%; transform-origin: left; transform: scaleX(0); border-radius: inherit; }
.is-conv .ship-progress span { background: #b5730f; }
.is-nuc .ship-progress span { background: linear-gradient(90deg, var(--cherenkov), var(--glow)); }
.ship-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; margin: 0; }
.ship-stats dt { font-size: .75rem; color: var(--ink-3); }
.ship-stats dd { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.race-controls { display: grid; gap: 1rem; padding: 1rem 1.1rem; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m); }
.race-controls input[type=range] { padding: 0; min-height: 0; height: 28px; background: none; border: 0; accent-color: var(--cherenkov); }
.race-controls .btn { width: 100%; }

/* =========================================================
   Kiosk: μεγάλη οθόνη στο περίπτερο
   ========================================================= */
body.kiosk { overflow: hidden; }
body.kiosk.cursor-hidden, body.kiosk.cursor-hidden * { cursor: none !important; }
body.kiosk main { height: 100vh; }
.tool-race.is-kiosk { max-width: none; height: 100vh; padding: 1.5vw 2vw; display: grid; grid-template-rows: auto 1fr; gap: 1.2vw; }
.kiosk-head { display: flex; align-items: center; gap: 2vw; }
.kiosk-head .wordmark { font-size: 1.6vw; }
.kiosk-head .wordmark-mark { width: 2.4vw; height: 2.4vw; }
.kiosk-head h1 { font-size: 2.6vw; letter-spacing: -0.025em; }
.is-kiosk .race-grid { margin: 0; height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr) 27vw; }
.is-kiosk .race-stage { aspect-ratio: auto; height: 100%; min-height: 0; }
.is-kiosk .race-day strong { font-size: 4.2vw; }
.is-kiosk .race-day span { font-size: 1vw; }
.is-kiosk .race-side { align-content: start; gap: 1vw; }
.is-kiosk .ship-card { padding: 1.1vw 1.2vw; }
.is-kiosk .ship-card h2 { font-size: 1.25vw; }
.is-kiosk .ship-state { font-size: .9vw; }
.is-kiosk .ship-stats dt { font-size: .85vw; }
.is-kiosk .ship-stats dd { font-size: 1.7vw; }
.is-kiosk .race-result-title { font-size: 2.4vw; }
.is-kiosk .race-result ul { font-size: 1.2vw; }
.is-kiosk .race-toast { font-size: 1.1vw; }
.kiosk-qr { display: flex; gap: 1vw; align-items: center; padding: 1vw; background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-m); }
.kiosk-qr img { width: 8.5vw; height: 8.5vw; flex: none; }
.kiosk-qr-title { font-weight: 700; font-size: 1.3vw; }
.kiosk-qr .muted { font-size: .95vw; margin-top: .3vw; }
.kiosk-url { font-weight: 700; color: var(--cherenkov); font-size: 1vw; margin-top: .4vw; }

/* =========================================================
   Πρόστιμα
   ========================================================= */
.check-hint { display: block; color: var(--ink-3); font-size: .78rem; margin-top: .15rem; }
.controls .check { font-size: .9rem; color: var(--ink); }
input:disabled { opacity: .5; }
.chart-svg .zero-nuc { stroke: var(--cherenkov); stroke-width: 2.5; }
.chart-svg .zero-label { fill: var(--cherenkov); font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.chart-svg.is-intro-v .seg { animation: grow-v .8s cubic-bezier(.2,.7,.2,1) both; transform-box: fill-box; transform-origin: bottom; }
@keyframes grow-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.inline-h { display: inline; font-size: var(--step-1); }
details > summary { cursor: pointer; }

.cii-strip { display: grid; gap: 4px; overflow-x: auto; }
.cii-row { display: grid; grid-template-columns: 7.5rem repeat(16, minmax(26px, 1fr)); gap: 4px; align-items: center; }
.cii-label { font-size: .85rem; font-weight: 600; }
.cii-cell { display: grid; place-items: center; height: 30px; border-radius: 4px; font-weight: 700; font-size: .85rem; }
.cii-year { font-size: .72rem; color: var(--ink-3); text-align: center; }
/* Βαθμοί CII: πράσινο→κόκκινο, με το γράμμα πάντα ορατό (όχι μόνο χρώμα) */
.cii-A { background: #d7efe6; color: #0e5a48; }
.cii-B { background: #e3f1d6; color: #3b5e16; }
.cii-C { background: #f6edcc; color: #6b5300; }
.cii-D { background: #f8dcc6; color: #8a3a06; }
.cii-E { background: #f5cfd2; color: #8f1d2a; }

/* =========================================================
   Μετασκευή
   ========================================================= */
.verdict.is-fail .verdict-main { color: var(--danger); }
.state { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: 1rem; }
.state-ok { background: #d7efe6; color: #0e5a48; }
.state-warn { background: #f6edcc; color: #6b5300; }
.state-fail { background: #f5cfd2; color: #8f1d2a; }
.kpi .state { margin-top: .1rem; justify-self: start; }

.retro-pair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; }
@media (max-width: 1100px) { .retro-pair { grid-template-columns: minmax(0, 1fr); } }

.profile-svg, .trans-svg { width: 100%; height: auto; display: block; font-family: Arial, sans-serif; }
.profile-svg .sea { fill: #e3f1f8; }
.profile-svg .waterline { stroke: #7fb6d3; stroke-width: 1.5; stroke-dasharray: 8 6; }
.profile-svg .hull, .trans-svg .hull { fill: #ffffff; stroke: var(--ink); stroke-width: 1.6; }
.profile-svg .bay { fill: #dfe8ef; stroke: #9cb2c3; stroke-width: 1; }
.profile-svg .tier { stroke: #b7c7d4; stroke-width: .8; }
.profile-svg .tier-lost { stroke: #e7a9a1; }
.profile-svg .bay-lost { stroke: #c0392b; }
.profile-svg .hold { fill: #eef3f7; stroke: #c3d2de; stroke-width: 1; stroke-dasharray: 3 3; }
.profile-svg .hold-lost { stroke: #c0392b; stroke-dasharray: none; }
.profile-svg .engine-room { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 5 4; }
.profile-svg .deckhouse { fill: #ffffff; stroke: var(--ink); stroke-width: 1.3; }
.profile-svg .window { fill: #b9d3e4; }
.profile-svg .reactor-comp { fill: rgb(53 198 242 / .10); stroke: var(--cherenkov); stroke-width: 2; }
.profile-svg .core-vessel { fill: #ffffff; stroke: var(--cherenkov); stroke-width: 2; }
.lbl { font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.lbl-muted { fill: var(--ink-3); }
.lbl-lost { fill: #a3271b; font-weight: 700; }
.lbl-reactor { fill: var(--cherenkov); font-weight: 700; font-size: 14px; }
.lbl-zone { fill: #8a5a0b; font-size: 11px; font-weight: 700; }
.core-pulse { animation: core-pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes core-pulse { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.05); } }
.trans-svg .core-ok { fill: rgb(53 198 242 / .25); stroke: var(--cherenkov); stroke-width: 2.5; }
.trans-svg .core-bad { fill: rgb(192 57 43 / .18); stroke: var(--danger); stroke-width: 2.5; }
.core-pulse-soft { animation: core-soft 2.4s ease-in-out infinite; }
@keyframes core-soft { 50% { fill: rgb(53 198 242 / .45); } }
.trans-svg .zone { stroke: none; }
.dim line { stroke: var(--ink-2); stroke-width: 1.2; }

.chart-svg .be-line { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 4; }
.chart-svg .crosshair { stroke: var(--ink-3); stroke-width: 1; }
.swatch-line { width: 22px; height: 0; border-top: 3px solid currentColor; border-radius: 0; }
.swatch-line.is-dashed { border-top-style: dashed; }

/* =========================================================
   Simulator επενδυτών
   ========================================================= */
.field-range > span { display: flex; justify-content: space-between; gap: .5rem; }
.field-range output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.field-range input[type=range] { padding: 0; min-height: 0; height: 26px; background: none; border: 0; accent-color: var(--cherenkov); }
.chart-svg .zero { stroke: var(--ink-2); stroke-width: 1.4; }
.chart-svg .covenant { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart-svg .dscr-ok { fill: #1f8f78; }
.chart-svg .dscr-warn { fill: #b5730f; }
.chart-svg .dscr-bad { fill: #c0392b; }

@media (min-width: 1100px) { .tool-investors .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* =========================================================
   Χάρτης λιμανιών
   ========================================================= */
.route-list { display: grid; gap: .4rem; }
.route-opt { display: flex; gap: .6rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--hull-2); cursor: pointer; font-size: .9375rem; }
.route-opt:hover { border-color: var(--ink-3); }
.route-opt input { width: 16px; height: 16px; min-height: 0; accent-color: var(--cherenkov); flex: none; }
.route-opt:has(input:checked) { border-color: var(--cherenkov); background: var(--glow-soft); font-weight: 600; }
.status-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.status-legend li { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; }
.status-legend small { display: block; color: var(--ink-3); font-size: .78rem; margin-top: .1rem; }
.st-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .75rem; }
.status-legend .st-dot { width: 14px; height: 14px; margin-top: .2rem; }
.st-framework { background: #1F8F78; }
.st-conditions { background: #2F6FD0; }
.st-bilateral { background: #B5730F; }
.st-banned { background: #C0392B; }
.state-framework { background: #d7efe6; color: #0e5a48; }
.state-conditions { background: #dfe8f8; color: #1d4a8f; }
.state-bilateral { background: #f6edcc; color: #6b5300; }
.state-banned { background: #f5cfd2; color: #8f1d2a; }
.kpi-banned { color: #a3271b; }
.kpi-bilateral { color: #8a5a0b; }
.kpi-framework { color: #0e6b57; }

.route-map { position: relative; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line); }
.route-map canvas { display: block; }

.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; counter-reset: stop; }
.stop { padding: .9rem 1rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-s); background: var(--hull); transition: box-shadow .3s; }
.stop:focus { outline: none; }
.stop.is-flash { box-shadow: 0 0 0 3px rgb(53 198 242 / .5); }
.st-border-framework { border-left-color: #1F8F78; }
.st-border-conditions { border-left-color: #2F6FD0; }
.st-border-bilateral { border-left-color: #B5730F; }
.st-border-banned { border-left-color: #C0392B; }
.stop-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .45rem; }
.stop-head h3 { font-size: 1.05rem; }
.stop-meta { color: var(--ink-3); font-size: .85rem; }
.stop-head .state { margin-left: auto; font-size: .8rem; font-weight: 600; }
.stop p { color: var(--ink-2); max-width: 80ch; }
.stop p + p { margin-top: .4rem; }
.checklist { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .5rem; color: var(--ink-2); }
.checklist a { white-space: nowrap; }

/* =========================================================
   3D πλοίο
   ========================================================= */
.panel-3d { padding: 0; overflow: hidden; }
.panel-3d figcaption { padding: .6rem 1rem; border-top: 1px solid var(--line); }
.stage3d {
  position: relative; height: clamp(320px, 52vw, 560px);
  background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #eaf2f7 70%);
}
.stage3d canvas { display: block; cursor: grab; touch-action: none; }
.stage3d canvas:active { cursor: grabbing; }
.stage3d-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.fuel-swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.fs-vlsfo { background: #B5730F; }
.fs-lng { background: #8A63D2; }
.fs-methanol { background: #1F8F78; }
.fs-ammonia { background: #C2427A; }
.fs-nuclear { background: #0A74B0; box-shadow: 0 0 0 3px rgb(53 198 242 / .3); }
