/* ---------- Hansa: European investors and allocators ----------
   The North Sea under an overcast sky for the chart, cream paper for the charter, brick for the accents and oak for the
   quieter marks. Headings in Hedvig Letters Serif, a crisp Swedish serif; text in Schibsted Grotesk, drawn for a Norwegian
   publisher. Hedvig has no italic, so nothing set in the display face is slanted. */
body[data-platform="hansa"] {
  --sea: #1F2D2B; --sea-deep: #162220; --sea-raise: #2B3C39;
  --sea-ink: #EEE8DC; --sea-ink-2: #B5C0BA; --sea-ink-3: #93A19A; --sea-rule: rgba(238, 232, 220, .14);
  --wind-1: #D27C5F; --wind-2: #9DBDB1; --wind-3: #C9A26B; --gold-ink: #E39579; --teal-ink-sea: #A8D0C3;
  --vellum: #EEEADF; --vellum-2: #E4DFD2; --vellum-3: #D8D1C0;
  --ink: #1D2624; --ink-2: #46514D; --ink-3: #58625E; --gilt: #93402A; --teal-ink: #2B5F55; --wax: #8A3722;
  --rule: rgba(29, 38, 36, .18); --rule-strong: rgba(29, 38, 36, .52);
  --plate-dark: #1B2927; --plate-light: #EFE8D7;
  --display: "Hedvig Letters Serif", "Iowan Old Style", Georgia, serif;
  --body: "Schibsted Grotesk", "DM Sans", system-ui, sans-serif;
  --hz-rgb-cream: 238, 232, 220; --hz-rgb-brick: 214, 128, 99; --hz-rgb-glass: 157, 189, 177; --hz-rgb-oak: 201, 162, 107;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-platform="hansa"] { --vellum: #1B1A17; --vellum-2: #23211D; --vellum-3: #2E2B26; --ink: #ECE6DA; --ink-2: #C2BCB0; --ink-3: #A39E94; --gilt: #E59B7F; --teal-ink: #A8D0C3; --wax: #E0866A; --rule: rgba(236, 230, 218, .16); --rule-strong: rgba(236, 230, 218, .5); --plate-light: #DED6C4; }
}
:root[data-theme="dark"] body[data-platform="hansa"] { --vellum: #1B1A17; --vellum-2: #23211D; --vellum-3: #2E2B26; --ink: #ECE6DA; --ink-2: #C2BCB0; --ink-3: #A39E94; --gilt: #E59B7F; --teal-ink: #A8D0C3; --wax: #E0866A; --rule: rgba(236, 230, 218, .16); --rule-strong: rgba(236, 230, 218, .5); --plate-light: #DED6C4; }

/* Type */
body[data-platform="hansa"] .motto { font-style: normal; letter-spacing: -.018em; }
body[data-platform="hansa"] h1, body[data-platform="hansa"] h2 { font-weight: 400; letter-spacing: -.018em; line-height: 1.04; }
body[data-platform="hansa"] h3 { font-weight: 400; letter-spacing: -.01em; }
body[data-platform="hansa"] .statement { letter-spacing: -.016em; line-height: 1.14; }
body[data-platform="hansa"] .brand-name { letter-spacing: -.01em; }
body[data-platform="hansa"] .prose strong { font-weight: 500; }
body[data-platform="hansa"] .hero-sub .cartouche h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); max-width: 14ch; }
body[data-platform="hansa"] .prose p, body[data-platform="hansa"] .lede, body[data-platform="hansa"] .entry p, body[data-platform="hansa"] .hz-text { text-wrap: pretty; }
body[data-platform="hansa"] .entry { align-content: start; }

/* The hero: a harbor chart behind a cartouche set in its open water */
.hero canvas.hansa-hero { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
body[data-platform="hansa"] .cartouche { background: linear-gradient(180deg, rgba(19, 30, 28, .82), rgba(19, 30, 28, .7));
  border-color: rgba(227, 149, 121, .5); outline-color: rgba(238, 232, 220, .16); }
body[data-platform="hansa"] .cartouche::before, body[data-platform="hansa"] .cartouche::after { border-color: var(--gold-ink); }
body[data-platform="hansa"] .hero .plate .plate-frame { outline-color: rgba(238, 232, 220, .28); }
body[data-platform="hansa"] .plate-toggle { background: rgba(19, 30, 28, .74); }
body[data-platform="hansa"] .nav .nav-cta:hover, body[data-platform="hansa"] .nav .nav-cta[aria-current="page"], body[data-platform="hansa"] .btn-gold:hover { background: #ECAA91; }
body[data-platform="hansa"] .legend i { height: 1.5px; }

/* Plates: gray-green and cream, the color of northern light */
body[data-platform="hansa"] .plate-frame img { filter: grayscale(1) contrast(1.1) brightness(1.04); }
body[data-platform="hansa"] .plate.ratio-port .plate-frame { aspect-ratio: 4 / 5; }

/* Sea bands carry a row of stepped brick gables, drawn as an elevation */
body[data-platform="hansa"] .band.sea::before { transform: none; opacity: .075; background: url(../img/hansa-gables.svg) 0 0 / 104px 149px repeat;
  -webkit-mask-image: radial-gradient(72% 95% at 92% 50%, #000, transparent 72%); mask-image: radial-gradient(72% 95% at 92% 50%, #000, transparent 72%); }

/* Section I: the miniature sits beside the text at its own proportions */
body[data-platform="hansa"] .station .plate:not([class*="ratio-"]) { max-width: 460px; justify-self: center; width: 100%; }

/* ---------- The chart of the League ---------- */
.hz-chart { margin: clamp(40px, 6vw, 72px) 0 0; display: grid; gap: clamp(18px, 2.4vw, 26px); }
.hz-map { position: relative; }
.hz-map svg { width: 100%; height: auto; display: block; overflow: hidden; border: 1px solid var(--sea-rule); }
.hz-map .sea-bg { fill: color-mix(in srgb, var(--sea-deep) 72%, var(--sea)); }
.hz-map .grat { fill: none; stroke: var(--sea-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hz-map .land { fill: color-mix(in srgb, var(--sea-raise) 94%, var(--sea-ink)); stroke: color-mix(in srgb, var(--sea-ink) 42%, transparent); stroke-width: .8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hz-map .lake { fill: color-mix(in srgb, var(--sea-deep) 72%, var(--sea)); stroke: color-mix(in srgb, var(--wind-2) 40%, transparent); stroke-width: .6; vector-effect: non-scaling-stroke; }
.hz-map .river { fill: none; stroke: color-mix(in srgb, var(--wind-2) 55%, transparent); stroke-width: .9; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hz-map .sea-lab { font-family: var(--chart); font-style: italic; fill: color-mix(in srgb, var(--wind-2) 80%, transparent); letter-spacing: .08em; }
.hz-map .lane { fill: none; stroke: var(--wind-1); stroke-width: 1.3; stroke-dasharray: 6 5; stroke-linecap: round; opacity: .55; vector-effect: non-scaling-stroke; transition: opacity .45s, stroke-width .45s; }
.hz-map .lane.by-land { stroke-dasharray: 1.5 4.5; }
.hz-map svg.l-law .lane { opacity: .22; }
.hz-map svg.l-kontore .lane { opacity: .95; stroke-width: 1.8; }
.hz-map .tie { stroke: var(--wind-3); stroke-width: 1.1; fill: none; opacity: 0; vector-effect: non-scaling-stroke; transition: opacity .3s; }
.hz-map svg.l-law .tie { opacity: .8; }
.hz-map .pl { opacity: 0; pointer-events: none; transition: opacity .45s; }
.hz-map .pl.on { opacity: 1; pointer-events: auto; cursor: pointer; }
.hz-map .pl.ref { opacity: .7; pointer-events: none; }
.hz-map .pl .hit { fill: transparent; }
.hz-map .pl .ring { fill: none; stroke: var(--gold-ink); stroke-width: 1.4; opacity: 0; vector-effect: non-scaling-stroke; transition: opacity .25s; }
.hz-map .pl .dot { fill: var(--sea); stroke: var(--sea-ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: fill .25s; }
.hz-map svg.l-law .pl .dot { stroke: var(--wind-3); }
.hz-map .pl.kontor .dot { fill: var(--wind-1); stroke: var(--sea-ink); }
.hz-map .pl[data-k="luebeck"] .dot { fill: var(--sea-ink); }
.hz-map .pl.sel .dot, .hz-map .pl:hover .dot { fill: var(--gold-ink); stroke: var(--gold-ink); }
.hz-map .pl.sel .ring { opacity: .9; }
.hz-map .pl .lab { font-family: var(--chart); font-style: italic; fill: var(--sea-ink-2); paint-order: stroke; stroke: color-mix(in srgb, var(--sea-deep) 70%, var(--sea)); stroke-width: 3.5px; stroke-linejoin: round; transition: fill .25s; }
.hz-map .pl .lab .yr { font-family: var(--chart-sc); font-style: normal; fill: var(--wind-3); }
.hz-map .pl.sel .lab, .hz-map .pl:hover .lab { fill: var(--sea-ink); }
.hz-map .pl.minor:not(.sel) .lab, .hz-map .pl.minor:not(.sel) .lead { display: none; }
.hz-map .pl .lead { stroke: color-mix(in srgb, var(--sea-ink) 45%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }

.hz-ctl { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 22px clamp(28px, 4vw, 56px); align-items: start; }
.hz-pick { display: grid; gap: 16px; justify-items: start; }
.hz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 2px; }
.hz-list button { all: unset; box-sizing: border-box; display: inline-flex; align-items: baseline; gap: 7px; padding: 7px 11px; border-radius: 999px; border: 1px solid transparent; font: 400 .92rem/1.2 var(--body); color: var(--sea-ink-2); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.hz-list button:hover { border-color: var(--sea-rule); color: var(--sea-ink); }
.hz-list button:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 1px; }
.hz-list button[aria-pressed="true"] { background: var(--sea-ink); color: var(--sea-deep); }
.hz-list .yr { font: .82rem var(--chart-sc); color: var(--wind-3); letter-spacing: .02em; }
.hz-list button[aria-pressed="true"] .yr { color: #93402A; }
.hz-readout { border-left: 1.5px solid var(--wind-1); padding: 2px 0 4px 22px; min-height: 9.5em; display: grid; align-content: start; gap: 10px; }
.hz-head { font: 400 1.6rem/1.15 var(--display); color: var(--sea-ink); letter-spacing: -.01em; }
.hz-head small { display: block; margin-top: 6px; font: italic 1.02rem/1.3 var(--chart); color: var(--sea-ink-3); letter-spacing: 0; }
.hz-text { color: var(--sea-ink-2); max-width: 54ch; font-size: 1rem; }
.hz-chart > figcaption.sources { margin-top: 0; max-width: 92ch; }
@media (max-width: 760px) {
  .hz-ctl { grid-template-columns: minmax(0, 1fr); }
  .hz-readout { order: 2; min-height: 8.5em; padding-left: 16px; }
  .hz-pick { order: 1; }
  .hz-list button { padding: 8px 10px; font-size: .9rem; }
  .hz-map .pl .lab { stroke-width: 3px; }
}
