/* css/base.css: Zeys tokens, fonts and shared components, in the colours of the Zeys mark (the voxel Zeus): royal
   blue glass panels with azure and cyan edges, white text, white-blue cards for full menus, gold for the one primary
   action (as the laurel and the meander on his robe), cyan for confirms. (Token names are kept from the first palette: --terracotta is
   the azure accent, --bronze the silver, --wine the royal blue, --laurel the cyan, --papyrus the white-blue card.) Meander, egg-and-dart and wave borders are
   drawn here as inline SVG (no image requests). Palette: ZEYS.md section 1. */

@font-face { font-family: 'Cinzel'; src: url('/fonts/Cinzel-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/Cinzel-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/Cinzel-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  /* the palette (ZEYS.md) */
  --ink: #0B2A6E;
  --ink-2: #1F4796;
  --ink-3: #4F72B8;
  --papyrus: #EEF5FF;
  --papyrus-2: #D6E6FF;
  --papyrus-3: #A9C8F5;
  --marble: #FFFFFF;
  --marble-2: #DCE8FA;
  --bronze: #D9E7FA;
  --bronze-hi: #FFFFFF;
  --bronze-lo: #6F94CF;
  --terracotta: #0A8CF5;
  --terracotta-hi: #5CC8FF;
  --terracotta-lo: #0057C2;
  --aegean: #2154D6;
  --aegean-hi: #0A8CF5;
  --olive: #5E8A72;
  --olive-lo: #3E6452;
  --laurel: #12A5D8;
  --laurel-hi: #4CC7F2;
  --laurel-lo: #0A6E9C;
  --wine: #2154D6;
  --wine-hi: #3F78F0;
  --wine-lo: #0F3DA8;
  /* goods */
  --wheat: #E2B44B;
  --oil: #B9A23A;
  --honey: #E0A030;
  --fig: #6B3A5A;
  --vase: #C2562C;
  /* gold: coins, the bolt of the mark, a few highlights on the blue */
  --gold: #EEC470;
  --gold-hi: #F8DE9C;
  --gold-lo: #B8862E;
  /* black glaze: panels over the 3D (translucent) and on the page (solid) */
  --glaze: rgba(17, 60, 168, .86);
  --glaze-2: rgba(14, 50, 146, .95);
  --glaze-solid: #0F3DA8;
  --on-glaze: #FFFFFF;
  --on-glaze-2: #C4DBFF;
  --good: #12A5D8;
  --bad: #D6453D;

  /* the older token names, mapped onto the Zeys palette so nothing in the client goes unstyled while it is
     renamed (new code: use the names above) */
  --parchment: var(--papyrus);
  --parchment-2: var(--papyrus-2);
  --parchment-3: var(--papyrus-3);
  --brass: var(--bronze);
  --brass-hi: var(--bronze-hi);
  --brass-lo: var(--bronze-lo);
  --sea: #1B4FC4;
  --sea-deep: var(--glaze-solid);
  --sea-night: #0A2A78;
  --foam: var(--on-glaze);
  --azulejo: var(--aegean);
  --wax: var(--wine);
  --wax-hi: var(--wine-hi);
  --wax-lo: var(--wine-lo);
  --glass: var(--glaze);
  --glass-2: var(--glaze-2);

  --display: 'Cinzel', 'Trajan Pro', 'Iowan Old Style', Palatino, Georgia, serif;
  --flourish: 'Cinzel', 'Iowan Old Style', Palatino, Georgia, serif;
  --ui: 'Alegreya Sans', 'Gill Sans', 'Segoe UI', system-ui, sans-serif;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgba(242, 244, 248, .6) inset, 0 10px 28px -12px rgba(16, 23, 32, .55);
  /* the rim of a glaze panel: a terracotta line inside, a dark bronze line outside */
  --rim: 0 0 0 1.5px var(--terracotta), 0 0 0 3px rgba(9, 14, 19, .7), 0 0 0 4px rgba(46, 92, 156, .75);
  --rim-soft: 0 0 0 1px rgba(44, 116, 194, .85), 0 0 0 2.5px rgba(9, 14, 19, .55), 0 0 0 3.5px rgba(46, 92, 156, .55);

  /* the borders, as inline SVG tiles (stroke colours baked in; one tile each) */
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16'%3E%3Cpath d='M0 15H20M0 1H20M15 15V4H4V12H12V7H8V9' fill='none' stroke='%232C74C2' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  --meander-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16'%3E%3Cpath d='M0 15H20M0 1H20M15 15V4H4V12H12V7H8V9' fill='none' stroke='%23101720' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  --meander-bronze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16'%3E%3Cpath d='M0 15H20M0 1H20M15 15V4H4V12H12V7H8V9' fill='none' stroke='%235A8ED9' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
  --eggdart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 .75H16' stroke='%232C74C2' stroke-width='1.5'/%3E%3Cpath d='M8 2.6C11.6 2.6 12.4 6 12.4 7.4 12.4 9.6 10.4 11.2 8 11.2S3.6 9.6 3.6 7.4C3.6 6 4.4 2.6 8 2.6Z' fill='%232C74C2'/%3E%3Cpath d='M0 2V9.6M0 9.6L-1.6 7.2M0 9.6L1.6 7.2M16 2V9.6M16 9.6L14.4 7.2M16 9.6L17.6 7.2' stroke='%232C74C2' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 12.5C6 12.5 7 4 12.5 4 16.5 4 17.4 9.2 13.6 9.6 11 9.9 10.8 7.4 12.8 7.1M14 12.5H28' fill='none' stroke='%232C74C2' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--papyrus);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--aegean); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--bronze-hi); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.ico { flex: none; }

/* --- textures --------------------------------------------------------------------------------------------------- */
/* papyrus: warm gradients, the crossed strips of the sheet (fine horizontal and vertical fibres) and a faint grain */
.parchment, .papyrus {
  background-color: var(--papyrus);
  background-image:
    radial-gradient(120% 80% at 20% 0%, rgba(244, 246, 249, .7), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(46, 92, 156, .16), transparent 70%),
    repeating-linear-gradient(0deg, rgba(50, 84, 132, .028) 0 1px, transparent 1px 5px, rgba(50, 84, 132, .02) 5px 6px, transparent 6px 13px),
    repeating-linear-gradient(90deg, rgba(50, 84, 132, .016) 0 1px, transparent 1px 9px, rgba(50, 84, 132, .012) 9px 11px, transparent 11px 23px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .26 0 0 0 0 .14 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* black glaze on the page (solid): the ground of a red-figure vase, with a faint sheen */
.glaze-solid {
  background-color: var(--glaze-solid);
  background-image: radial-gradient(120% 90% at 30% 0%, rgba(24, 53, 92, .28), transparent 60%), radial-gradient(80% 60% at 90% 100%, rgba(44, 116, 194, .1), transparent 70%);
  color: var(--on-glaze);
}
/* .rhumbs (kept name): a faint meander frame inside a card */
.rhumbs { position: relative; isolation: isolate; }
.rhumbs::before {
  content: ''; position: absolute; inset: 7px; z-index: -1; pointer-events: none; opacity: var(--rhumb-op, .22);
  background: var(--meander-ink) top left / 20px 16px repeat-x, var(--meander-ink) bottom left / 20px 16px repeat-x;
}
/* border bands: put one on any block (height comes from the tile) */
.meander { height: 16px; background: var(--meander) left center / 20px 16px repeat-x; }
.meander.ink { background-image: var(--meander-ink); }
.meander.bronze { background-image: var(--meander-bronze); }
.eggdart { height: 12px; background: var(--eggdart) left top / 16px 12px repeat-x; }
.wave-band { height: 14px; background: var(--wave) left center / 28px 14px repeat-x; }

/* --- buttons ---------------------------------------------------------------------------------------------------- */
.btn {
  --b: var(--bronze); --bh: var(--bronze-hi); --bl: var(--bronze-lo); --t: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.25em; border: 0; border-radius: 999px;
  font-family: var(--ui); font-weight: 800; font-size: 1rem; letter-spacing: .02em; text-decoration: none;
  color: var(--t);
  background: linear-gradient(180deg, var(--bh), var(--b) 58%, var(--bl));
  box-shadow: 0 1px 0 rgba(222, 228, 238, .65) inset, 0 -2px 0 rgba(0, 0, 0, .2) inset, 0 6px 14px -6px rgba(16, 23, 32, .65);
  transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { filter: grayscale(.7) opacity(.6); cursor: not-allowed; transform: none; }
/* the deep-red seal: the one primary action on a screen (class name .wax) */
.btn.wax, .btn.seal {
  --t: #0B2A6E; text-shadow: 0 1px 0 rgba(255, 246, 220, .6);
  background: linear-gradient(180deg, #FCE7AE, var(--gold) 55%, #CF9F45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -2px 0 rgba(140, 95, 36, .35), 0 0 0 1px rgba(140, 95, 36, .55), 0 6px 16px -6px rgba(8, 30, 90, .7);
}
/* laurel green: confirm, claim, done */
.btn.laurel, .btn.ok {
  --t: #E8EBF2; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  background: linear-gradient(180deg, var(--laurel-hi), var(--laurel) 58%, var(--laurel-lo));
  box-shadow: inset 0 0 0 1.5px rgba(90, 142, 217, .5), 0 -2px 0 rgba(0, 0, 0, .2) inset, 0 6px 14px -6px rgba(16, 23, 32, .6);
}
.btn.terra { --b: var(--terracotta); --bh: var(--terracotta-hi); --bl: var(--terracotta-lo); --t: #EDF1F6; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; color: inherit; text-shadow: none; }
/* black glaze buttons over the 3D (class name .sea): terracotta rim, bronze icon */
.btn.sea, .btn.glaze {
  --t: var(--bronze-hi);
  background: radial-gradient(120% 120% at 35% 25%, #1E2C3E, var(--glaze-solid) 70%);
  box-shadow: inset 0 0 0 1.5px var(--terracotta), inset 0 0 0 3px rgba(9, 14, 19, .6), 0 0 0 1px rgba(46, 92, 156, .7), 0 6px 14px -6px rgba(0, 0, 0, .75);
}
.btn.sea:hover, .btn.glaze:hover { --t: #93B8EE; filter: none; background: radial-gradient(120% 120% at 35% 25%, #203754, #131C26 70%); }
.btn.sm { min-height: 40px; padding: .3em .95em; font-size: .92rem; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 44px; }
.btn.icon.sm { width: 40px; }

/* --- cards ------------------------------------------------------------------------------------------------------ */
.card { position: relative; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
/* a papyrus card's frame: an ink rule, a papyrus gap, a thin terracotta rule */
.framed { box-shadow: var(--shadow), inset 0 0 0 1px rgba(16, 23, 32, .55), inset 0 0 0 5px var(--papyrus), inset 0 0 0 6px rgba(44, 116, 194, .55); }
/* black glaze panel (class name .glass) */
.glass, .glaze {
  background: var(--glaze); color: var(--on-glaze);
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--rim), 0 12px 30px -14px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(219, 226, 236, .06);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.chip {
  display: inline-flex; align-items: center; gap: .35em; padding: .15em .7em; border-radius: 999px;
  font-size: .82rem; font-weight: 800; letter-spacing: .04em;
  background: rgba(16, 23, 32, .08); color: var(--ink-2);
}
.chip.open { background: var(--bronze-hi); color: var(--ink); box-shadow: inset 0 0 0 1px var(--bronze-lo); }
.chip.live { background: var(--laurel); color: #E8EBF2; box-shadow: inset 0 0 0 1px rgba(90, 142, 217, .55); }
.kicker { font-family: var(--display); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .9rem; color: var(--terracotta-lo); }
.flourish { font-family: var(--flourish); font-weight: 400; letter-spacing: .03em; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: .04em; line-height: 1.08; }

/* bronze ring: round instruments (the minimap shield, the day dial) */
.ring {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #98BAEE, var(--bronze) 46%, var(--bronze-lo) 100%);
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 8px 18px -8px rgba(0, 0, 0, .75), inset 0 1px 1px rgba(229, 233, 241, .7), inset 0 0 0 5px rgba(24, 53, 92, .35);
}
.ring > * { border-radius: 50%; }

.tag-good { color: var(--good); }
.tag-bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- the road map (js/site/chart.js) ---------------------------------------------------------------------------- */
.sc-land { fill: #C4CFE1; }
.sc-isle { fill: #BBC7DB; }
.sc-hatch { stroke: var(--bronze-lo); stroke-width: .5; opacity: .5; }
.sc-sea { fill: #DAE1EC; }
.sc-wave { fill: none; stroke: var(--terracotta); stroke-width: 1.1; stroke-linecap: round; }
.sc-coast { fill: none; stroke: var(--bronze-lo); stroke-width: 1.3; stroke-linejoin: round; }
.sc-peak { fill: none; stroke: var(--bronze-lo); stroke-width: 1.2; stroke-linejoin: round; opacity: .7; }
.sc-note { font-family: var(--ui); font-size: 11px; font-weight: 700; letter-spacing: .06em; fill: var(--ink-3); text-transform: uppercase; }
.sc-title { font-family: var(--display); font-size: 15px; letter-spacing: .14em; fill: rgba(24, 53, 92, .7); text-transform: uppercase; }
.sc-leg { fill: none; stroke: var(--terracotta); stroke-width: 2.2; stroke-dasharray: 7 5; stroke-linecap: round; }
.sc-leg.on { stroke: var(--wine); stroke-width: 3.4; stroke-dasharray: 9 6; }
.sc-leg.off { opacity: .32; }
.sc-leg.shut { stroke: #416DAB; opacity: .5; stroke-dasharray: 2 6; }
.sc-port circle { fill: var(--terracotta); stroke: var(--papyrus); stroke-width: 2.2; }
.sc-port .sc-ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.sc-port.walk circle:not(.sc-ring) { fill: var(--ink); stroke: var(--bronze-hi); }
.sc-port text { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .06em; fill: var(--ink); paint-order: stroke; stroke: rgba(212, 220, 233, .85); stroke-width: 3px; }
.sc-port.shut circle { fill: var(--papyrus); stroke: #416DAB; stroke-dasharray: 3 3; }
.sc-port.shut text { fill: #325484; font-size: 14px; font-weight: 600; }
.sc-port[role='button']:hover circle:not(.sc-ring), .sc-port[role='button']:focus-visible circle:not(.sc-ring) { fill: var(--wine); }
.sc-min { font-family: var(--ui); font-size: 12.5px; font-weight: 800; fill: var(--terracotta-lo); paint-order: stroke; stroke: rgba(212, 220, 233, .9); stroke-width: 3px; }
.sc-wagon rect { fill: var(--bronze); stroke: var(--ink); stroke-width: 1.4; }
.sc-wagon path { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.sc-wagon .sc-wheel { fill: var(--papyrus); stroke: var(--ink); stroke-width: 1.6; }
.sc-port text .sc-sub { font-family: var(--ui); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
