/* ══════════════════════════════════════════════════════════════════════════
   MilanoRAD Store — the identity, on top of the shared base (site.css).

   Deliberately NOT the Pharos look. Pharos is a drafting table: Archivo,
   vermilion marks, zero radius, 2px rules. MilanoRAD is the reading room:
   cobalt on ink-blue, Space Grotesk headings over Inter, soft 8px corners,
   hairline rules. Same tokens, so every base component follows without a
   rewrite; the few rules below are where the base's geometry has to give.
   ══════════════════════════════════════════════════════════════════════ */

/* Self-hosted fonts: the Google Fonts stylesheet was ~74% of a first view's
   bytes and a render-blocking third-party request, and two origins the CSP
   had to allow. Latin subset only, the same unicode-range Google serves, one
   static woff2 per weight the rules below use; other weights fall back to
   the nearest (or a synthesised bold), as they did with the hosted sheet.
   Root-relative URLs, as in the head: the 404 page is served under the URL
   that failed. Licences: ../fonts/LICENSES.md. */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/space-grotesk-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/space-grotesk-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/space-grotesk-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/inter-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/inter-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/inter-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper:        #f5f7fb;
  --paper-sunk:   #eceff6;
  --surface:      #ffffff;
  --ink:          #0f1626;
  --ink-2:        #4d5668;
  --ink-3:        #5f6980;   /* 4.8:1 on the sunk band: it colours 11px labels and hashes */
  --rule:         #0f1626;
  --rule-soft:    #d3d8e4;
  --rule-ctl:     #7c8597;   /* control boundaries: 3:1+ on the white field (1.4.11) */
  --rule-hair:    #e2e6ef;
  --accent:       #1a56db;
  --accent-ink:   #ffffff;
  --accent-wash:  #e9f0ff;
  --ok:           #157a5a;
  --warn:         #a35f00;
  --plate:        #ffffff;
  --plate-grid:   #eaeef6;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 8px;
  --radius-sm: 5px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #0b1020;
    --paper-sunk:  #070b17;
    --surface:     #121a2e;
    --ink:         #e9edf7;
    --ink-2:       #aab3c8;
    --ink-3:       #7c869c;
    --rule:        #e9edf7;
    --rule-soft:   #2a3450;
    --rule-ctl:    #6b7590;
    --rule-hair:   #1d2540;
    --accent:      #6b96ff;
    --accent-ink:  #061033;
    --accent-wash: #16224a;
    --ok:          #5ccf9f;
    --warn:        #e2a94d;
    --plate:       #0f1628;
    --plate-grid:  #1b2440;
  }
}

:root[data-theme="dark"] {
  --paper:       #0b1020;
  --paper-sunk:  #070b17;
  --surface:     #121a2e;
  --ink:         #e9edf7;
  --ink-2:       #aab3c8;
  --ink-3:       #7c869c;
  --rule:        #e9edf7;
  --rule-soft:   #2a3450;
  --rule-ctl:    #6b7590;
  --rule-hair:   #1d2540;
  --accent:      #6b96ff;
  --accent-ink:  #061033;
  --accent-wash: #16224a;
  --ok:          #5ccf9f;
  --warn:        #e2a94d;
  --plate:       #0f1628;
  --plate-grid:  #1b2440;
}
/* a forced theme pins UA chrome (selects, scrollbars) to it, whatever the OS says */
:root[data-theme="dark"]  { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ── geometry: the base draws in 2px rules and square corners ─────────── */
body { font-family: var(--font-body); }
h1, h2, h3, h4, .thesis, .brand__name, .btn { font-family: var(--font-display); }
h1, h2 { letter-spacing: -0.03em; font-weight: 700; }
h1 { font-weight: 700; }

.masthead { border-bottom: 1px solid var(--rule-hair); }
.band { border-top: 1px solid var(--rule-hair); }
.cta { border-top: 0; background: linear-gradient(135deg, #0f1626, #17306b); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.72); }

.btn { border-radius: var(--radius); border-width: 1.5px; font-weight: 600; letter-spacing: 0; }
.btn:hover { background: var(--accent-wash); color: var(--ink); border-color: var(--accent); }
.btn--primary { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, black); border-color: transparent; color: var(--accent-ink); }
.cta .btn { border-color: rgba(255,255,255,.6); color: #fff; }
.cta .btn:hover { background: #fff; color: var(--ink, #0f1626); }
.cta .btn--primary { background: var(--accent); border-color: transparent; color: #fff; }

.navtoggle, .themebtn { border-radius: var(--radius-sm); }
.nav a:not(.btn)[aria-current="page"], .nav a:not(.btn):hover { border-bottom-color: var(--accent); }
/* The base collapses the bar at 1240px for the wider Pharos nav; this one is
   ~550px, so it stays a row down to 861px and undoes each collapsed rule. */
@media (min-width: 861px) and (max-width: 1240px) {
  .navtoggle { display: none; }
  .nav, .nav[data-open="true"] {
    display: flex; position: static; top: auto;
    flex-direction: row; align-items: center; gap: var(--s5); margin-inline-start: auto;
    background: transparent; border-bottom: 0; padding: 0;
    max-height: none; overflow-y: visible;
  }
  .nav a:not(.btn) { padding-block: 4px; border-bottom: 2px solid transparent; }
  .nav .btn { margin-top: 0; }
}

.plate, .panel, .note, .keybox, .field input, .field select, .field textarea, .choice, .msg {
  border-radius: var(--radius);
}
.plate { border: 1px solid var(--rule-hair); box-shadow: 0 10px 30px -18px rgba(15, 22, 38, .35); }
.plate__head { border-bottom: 1px solid var(--rule-hair); }
.panel { border-top: 1px solid var(--rule-hair); }
.field input, .field select, .field textarea { border: 1.5px solid var(--rule-ctl); background: var(--surface); }
/* border + inset = a 2px accent ring, as the base draws; the wash halo was invisible (1.1:1) */
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: inset 0 0 0 .5px var(--accent); }
.note { border-inline-start-width: 3px; }
.tablewrap { border-top: 1px solid var(--rule-hair); }
.kv > div, .seq > li, .specstrip > div { border-color: var(--rule-hair); }
.eyebrow { letter-spacing: 0.1em; }
.thesis { letter-spacing: -0.03em; }
.brand__name { font-weight: 700; }
.brand__name span { font-weight: 500; color: var(--ink-3); }

/* ══════════════════════════════════════════════════════════════════════════
   Store components — additions on top of the base stylesheet (site.css).
   Product cards, the download table, the edition grid, the order and key
   panels. Same tokens as the identity block above; no new colours.
   ══════════════════════════════════════════════════════════════════════ */

/* ── product cards ───────────────────────────────────────────────────── */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); }
@media (max-width: 900px) { .products { grid-template-columns: 1fr; } }
.product {
  display: flex; flex-direction: column; gap: var(--s5);
  border: 1px solid var(--rule-hair); border-radius: var(--radius); padding: var(--s6);
  background: var(--surface);
  box-shadow: 0 14px 34px -24px rgba(15, 22, 38, .4);
}
.product__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); }
.product__head h2, .product__head h3 { margin: 0; }
/* Heading levels follow the outline, sizes follow the component: these pin
   each slot to what its old level rendered at (base h3 / h4), so a heading
   promoted to sit right under the page h1 (the order card, the activate
   page's Install ID halves, the hero steps) or h4→h3 in the lists changes
   nothing on screen. */
.product__head h2, .split h2 { font-size: clamp(19px, 2vw, 22px); font-weight: 800; letter-spacing: -0.01em; }
[lang="el"] .product__head h2, [lang="el"] .split h2 { font-weight: 700; }   /* the base folds Greek headings to 700 */
.seq h2, .seq h3, .kv h3, .timeline h3 { font-size: 16px; font-weight: 700; letter-spacing: 0; margin: 0 0 6px; }
.seq h2, .seq h3 { margin-bottom: 4px; }
.total { font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.product__ver { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.product p { color: var(--ink-2); font-size: 15px; margin: 0; }
.product__btns { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: auto; }
.product__btns .btn { padding: 11px 16px; }
.product__meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ── download table ──────────────────────────────────────────────────── */
.dl { width: 100%; border-collapse: collapse; }
.dl th, .dl td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule-hair); vertical-align: top; font-size: 15px; }
.dl th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.dl td.sha { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); word-break: break-all; max-width: 26ch; }
.dl td:last-child { text-align: right; white-space: nowrap; }
.dl .btn { padding: 9px 14px; font-size: 13px; }

/* ── editions ────────────────────────────────────────────────────────── */
.editions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 980px) { .editions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .editions { grid-template-columns: 1fr; } }
.edition {
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s6) var(--s5);
  border: 1px solid var(--rule-hair); border-radius: var(--radius); background: var(--surface);
}
.edition[data-recommended="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.edition[data-recommended="true"] { position: relative; }
.edition__badge {
  position: absolute; top: -1px; left: var(--s5); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 3px 8px;
}
.edition h3 { margin: 0; padding-top: 10px; }
.edition__price { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 1; }
.edition__price small { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; color: var(--ink-3); margin-left: 6px; }
.edition__price.quote { font-size: 20px; color: var(--ink-2); }
.edition ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.edition ul li { padding-inline-start: 20px; position: relative; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.edition ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 2px; background: var(--accent); }
.edition .btn { align-self: flex-start; margin-top: auto; }

/* ── key / order panels ──────────────────────────────────────────────── */
.keybox {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
  word-break: break-all; background: var(--paper-sunk);
  border: 1px solid var(--rule-soft); padding: var(--s4) var(--s5);
  user-select: all;
}
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status[data-s="paid"]::before, .status[data-s="issued"]::before { background: var(--ok); }
.status[data-s="awaiting_payment"]::before, .status[data-s="requested"]::before { background: var(--warn); }
.status[data-s="cancelled"]::before { background: var(--accent); }

.msg { font-size: 15px; padding: var(--s4) var(--s5); border-inline-start: 2px solid var(--rule-soft); background: var(--surface); }
.msg[data-kind="ok"] { border-inline-start-color: var(--ok); }
.msg[data-kind="bad"] { border-inline-start-color: var(--accent); background: var(--accent-wash); }
.msg:empty { display: none; }

/* radio rows on the buy form */
.choices { display: grid; gap: var(--s3); }
.choice {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s3); align-items: start;
  border: 1px solid var(--rule-ctl); padding: var(--s4); cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--rule); border-width: 2px; padding: calc(var(--s4) - 1px); }
.choice input { margin: 3px 0 0; accent-color: var(--accent); }
.choice strong { display: block; font-size: 15px; }
.choice span { font-size: 14px; color: var(--ink-2); }
.choice[data-off="true"] { opacity: .45; cursor: not-allowed; }

/* the escalation timeline on the FAQ */
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 780px) { .timeline { grid-template-columns: 1fr; } }
.timeline > div { padding: var(--s5); border: 1px solid var(--rule-hair); border-radius: var(--radius); background: var(--surface); }
.timeline .when { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.timeline p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

code { font-family: var(--font-mono); font-size: .92em; background: var(--paper-sunk); padding: 1px 5px; }
