:root {
  --ink: #0a0a0a; --panel: #111; --line: #2a2a2a; --paper: #f4f1ea; --muted: #9a9a9a; --red: #e3261a;
  --measure: 62ch;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--paper); font: 15px/1.5 "IBM Plex Mono", ui-monospace, monospace; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
b { font-weight: 500; }
h1, h2, h3 { font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; margin: 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.wordmark { font-family: Anton, Impact, sans-serif; font-size: 1.15rem; line-height: 0.95; letter-spacing: 0.02em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.wordmark .x { color: var(--red); }
/* Site nav: the WordPress header menu on noharbourforgenocide.com, reproduced to its computed styles:
   Fjalla One 17px, 0.85px tracking, uppercase, #f4f2e6, 25px gaps, 12px stroke chevron, red submenu with black text. */
.sitenav { display: flex; align-items: center; gap: 0 25px; flex: 0 0 auto; font-family: "Fjalla One", Anton, Impact, sans-serif; font-size: 17px; font-weight: 400; letter-spacing: 0.85px; text-transform: uppercase; line-height: 1.9; color: #f4f2e6; }
.sitenav > a, .sitenav summary { color: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none; display: inline-flex; align-items: center; }
.sitenav summary::-webkit-details-marker { display: none; }
.sitenav summary::after { content: ""; width: 12px; height: 12px; margin-left: 4.25px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M1.5 4L6 8L10.5 4' stroke='%23f4f2e6' stroke-width='1.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.sitenav > a:hover, .sitenav summary:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.sitenav > a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.sitenav .sub { position: relative; }
.sitenav .sub > div { position: absolute; top: 100%; left: 0; z-index: 1200; display: flex; flex-direction: column; background: #fb0207; color: #010000; border: 1px solid rgba(0, 0, 0, 0.15); }
.sitenav .sub > div a { color: inherit; text-decoration: none; white-space: nowrap; padding: 8.5px 17px; }
.sitenav .sub > div a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 820px) {
  .sitenav { font-size: 15px; gap: 0 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; max-width: 100vw; }
  .sitenav::-webkit-scrollbar { display: none; }
  .sitenav .sub > div { position: fixed; left: 0; right: 0; top: auto; }
}

.jump { display: flex; gap: 1.25rem; font-size: 0.8rem; flex-wrap: wrap; justify-content: flex-end; }
.jump a { color: var(--muted); text-decoration: none; }
.jump a:hover { color: var(--paper); }


/* Hero: the poster, in live type. The red box is the only colour on the page besides the X marks. */
.hero { padding: clamp(1.5rem, 5vw, 4rem) 1rem clamp(1.5rem, 4vw, 3rem); max-width: 1100px; }
/* The date is the point of the page, so it gets the display face, in red, above the headline. */
.date { margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.date .day { font-family: Anton, Impact, sans-serif; font-size: clamp(1.7rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--red); }
.date .day[lang="ar"] { font-family: "Noto Kufi Arabic", sans-serif; font-weight: 700; letter-spacing: 0; }
.headline { font-size: clamp(2.6rem, 9.5vw, 7.5rem); line-height: 1; max-width: 15ch; min-height: 3.1em; }
/* The red box hugs the capitals like the poster. Anton's caps are 0.867em tall; an inline block
   with line-height 1.05em centres the font box so ~0.09em of red shows above and below the caps,
   the two words never split, and the baseline stays with the rest of the line. */
.headline mark { display: inline-block; background: var(--red); color: var(--paper); white-space: nowrap; line-height: 1.05; padding: 0 0.28em; margin: 0 0.02em; vertical-align: baseline; }
/* Arabic: bold Kufi, read right to left, ragged left, sitting on the same left column as the Latin lines.
   Kufi has no cap height; glyphs sit either side of the baseline, so the box takes the font's own line. */
.headline[lang="ar"] { font-family: "Noto Kufi Arabic", sans-serif; font-weight: 700; font-size: clamp(2.2rem, 7.5vw, 6rem); direction: rtl; text-align: right; letter-spacing: 0; line-height: 1.25; }
.headline[lang="ar"] mark { line-height: 1.06; padding: 0 0.2em 0.14em; vertical-align: baseline; }
.headline.swap { animation: swap 0.5s ease-out; }
@keyframes swap { from { opacity: 0; transform: translateY(0.1em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .headline.swap { animation: none; } }
.langs { margin: 1.6rem 0 0; color: var(--muted); font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.langs button { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.langs button[aria-current="true"] { color: var(--paper); text-decoration: underline; text-underline-offset: 0.25em; }
.lede { max-width: var(--measure); margin: 1.75rem 0 0; font-size: 1rem; }
.lede p { margin: 0 0 0.8rem; }
.demands { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.demands li { margin: 0.2rem 0; }
.demands li::marker { color: var(--red); }

.find { margin-top: 1.75rem; max-width: 34rem; }
.find label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.35rem; }
.find input { width: 100%; background: var(--panel); border: 1px solid var(--paper); color: var(--paper); font: inherit; font-size: 1.05rem; padding: 0.7rem 0.9rem; }
.find input::placeholder { color: var(--muted); }
/* Search results sit right under the box: the port, what we know, and a way onto the map. */
.results { margin-top: 0.6rem; display: grid; gap: 0.5rem; }
.result { border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--panel); padding: 0.8rem 1rem; }
.result h3 { font-size: 1.5rem; line-height: 1; }
.result h3 span { font: 0.8rem/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 0.5rem; }
.result p { margin: 0.45rem 0 0; font-size: 0.9rem; }
.result.none { border-left-color: var(--muted); }
.result.none h3 { font-size: 1.15rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline; }
.result-actions button { background: var(--red); border: 0; color: #fff; font: inherit; font-size: 0.85rem; padding: 0.4rem 0.7rem; cursor: pointer; }
.results .more { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* Why this port: the factsheet text, folded by default so the list stays scannable. */
.why { margin-top: 0.4rem; font-size: 0.85rem; }
.why summary { cursor: pointer; color: var(--paper); border-bottom: 1px solid var(--line); display: inline; }
.why[open] summary { border-bottom-color: var(--red); }
.why p { margin: 0.45rem 0 0; color: var(--paper); max-width: var(--measure); }
.why .k { color: var(--muted); }
.why .src { color: var(--muted); font-size: 0.78rem; }
.why .news { margin: 0.3rem 0 0; padding-left: 1.1rem; max-width: var(--measure); }
.why .news li { display: list-item; margin: 0.2rem 0; padding: 0; border: 0; }
.why .src a { color: var(--muted); }

/* The press conference strip: one line, red rule, impossible to miss between hero and map. */
.press-strip { border-top: 3px solid var(--red); background: var(--panel); padding: 0.9rem 1rem; }
.press-strip p { margin: 0; max-width: 1100px; font-size: 0.95rem; }
.press-strip b { color: var(--red); font-weight: 500; }

.map-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
#map { height: min(64vh, 620px); min-height: 360px; background: #0b0f14; }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { background: rgba(10,10,10,0.8) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-control-zoom a { background: var(--panel) !important; color: var(--paper) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--paper); border-radius: 0; box-shadow: 0 0 0 1px var(--line); }
.leaflet-popup-content { margin: 0.8rem 1rem; font: 0.85rem/1.45 "IBM Plex Mono", ui-monospace, monospace; }
.leaflet-popup-content h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.leaflet-popup-content p { margin: 0.25rem 0; }
.leaflet-popup-close-button { color: var(--paper) !important; }
.map-note { max-width: 1100px; margin: 0; padding: 0.6rem 1rem; font-size: 0.78rem; color: var(--muted); }

/* The X, same as the map site. */
.xm { --x: var(--red); --s: 16px; position: relative; display: block; width: var(--s); height: var(--s); }
.xm::before, .xm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 140%; height: max(3px, calc(var(--s) / 5)); background: var(--x); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 1px var(--ink); }
.xm::after { transform: translate(-50%, -50%) rotate(-45deg); }
.xm.city { --x: #f08a82; }
.leaflet-marker-icon.is-active .xm { transform: scale(1.4); }
.leaflet-marker-icon.is-dim { opacity: 0.25; }

.list { padding: clamp(1.5rem, 4vw, 3rem) 1rem; max-width: 1100px; }
.list h2, .support h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; }
.list-intro { max-width: var(--measure); color: var(--muted); margin: 0.75rem 0 1.5rem; }
.passes { max-width: var(--measure); margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.passes h3 { font-size: 1.35rem; line-height: 1.1; }
.passes p { margin: 0.6rem 0 0; }
/* Countries fold: a summary line each, so you reach yours without scrolling past the rest. */
.country { border-top: 1px solid var(--line); padding: 0 0 0.5rem; }
.country > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 1rem; padding: 0.9rem 0 0.7rem; }
.country > summary::-webkit-details-marker { display: none; }
.country > summary::before { content: "+"; font-family: Anton, Impact, sans-serif; color: var(--red); font-size: 1.35rem; line-height: 1; width: 1rem; }
.country[open] > summary::before { content: "\2013"; }
.country h3 { font-size: 1.35rem; line-height: 1.1; }
.country .count { color: var(--muted); font-size: 0.8rem; margin-left: auto; }
.country[open] .ports { margin-left: 2rem; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.list-tools label { font-size: 0.8rem; color: var(--muted); }
.list-tools select { background: var(--panel); border: 1px solid var(--paper); color: var(--paper); font: inherit; padding: 0.45rem 0.7rem; min-width: 14rem; }
.tell { margin-top: 2rem; border: 1px solid var(--paper); border-left: 3px solid var(--red); padding: 1rem 1.2rem; max-width: var(--measure); }
.tell h3 { font-size: 1.35rem; line-height: 1.1; }
.tell p { margin: 0.5rem 0 0; }
.tell-addr { font-size: 0.85rem; color: var(--muted); }
.tell-addr a { color: var(--paper); }
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; padding: 0.55rem 0.9rem; font-size: 0.9rem; }
.btn:hover { background: #c41f14; }
.ports { list-style: none; margin: 0; padding: 0; }
.ports li { display: grid; grid-template-columns: 1.1rem 1fr auto; gap: 0.75rem; align-items: start; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.ports li .xm { margin-top: 0.3rem; }
.ports li:last-child { border-bottom: 0; }
.ports .xm { --s: 11px; align-self: center; }
.ports .name { font-weight: 500; }
.ports .meta { color: var(--muted); font-size: 0.85rem; }
.ports .meta a { color: var(--paper); }
.ports .act { font-size: 0.78rem; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ports .act:hover { color: var(--paper); border-color: var(--paper); }
.ports li.hit { background: #161616; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.ports li.miss, .country.miss { display: none; }
.list .empty { color: var(--muted); }

.support { border-top: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 3rem) 1rem; max-width: 1100px; }
.ways { margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: way; display: grid; gap: 1.25rem; }
.ways li { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 0.25rem 2rem; }
.ways h3 { font-size: 1.35rem; line-height: 1.1; }
.ways p { margin: 0 0 0.5rem; max-width: var(--measure); grid-column: 2; }
.ways li > p:first-of-type { grid-row: 1; }
.posters, .docs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; }
.docs a { border: 1px solid var(--paper); padding: 0.3rem 0.6rem; text-decoration: none; font-size: 0.85rem; }
.docs a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.posters a { border: 1px solid var(--paper); padding: 0.3rem 0.6rem; text-decoration: none; font-size: 0.85rem; }
.posters a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.support-intro { max-width: var(--measure); margin: 0.75rem 0 0; }

/* Templates page */
.tpl-page { padding: clamp(1.5rem, 4vw, 3rem) 1rem; max-width: 1100px; }
.tpl-page h1 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1; }
.lede-short { max-width: var(--measure); margin: 1rem 0 2rem; }
.tpl { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.tpl h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1; }
.tpl .how { max-width: var(--measure); color: var(--muted); margin: 0.6rem 0 0.8rem; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin: 0; padding: 0.7rem 0; background: var(--ink); border-top: 1px solid var(--line); }
.tpl.in-view .tpl-actions { position: sticky; bottom: 0; z-index: 5; }
.tpl-blank { font-size: 0.8rem; color: var(--muted); margin: 0.4rem 0 0; }
.tpl-blank a { color: var(--muted); }
.tpl-actions button { background: var(--red); border: 0; color: #fff; font: inherit; font-size: 0.9rem; padding: 0.5rem 0.8rem; cursor: pointer; }
/* Template editor: fields on the left fill the blanks in the text on the right; the text stays editable. */
.editor { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 1.5rem; align-items: start; margin: 1rem 0; }
.side { position: sticky; top: 1rem; }
.fields { display: grid; gap: 0.7rem; }
.field { display: grid; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.field input, .field textarea, .field select { background: var(--panel); border: 1px solid var(--line); color: var(--paper); font: inherit; font-size: 0.9rem; padding: 0.45rem 0.6rem; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--paper); outline: none; }
.field textarea { resize: vertical; min-height: 4.5rem; }
.field.check { grid-template-columns: auto 1fr; align-items: start; gap: 0.5rem; color: var(--paper); }
.field.check input { width: auto; margin-top: 0.2rem; accent-color: var(--red); }
.field-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: -0.2rem 0 0.2rem; }
.field-hint a { color: var(--paper); }
.jump .back { color: var(--paper); }
.paper { min-width: 0; }
.left { color: var(--red); }
.left.done { color: #7fcf84; }
.doc { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--red); padding: 1rem 1.2rem; max-width: 80ch; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.doc:focus { outline: 1px solid var(--paper); }
.doc p { margin: 0 0 0.9rem; }
.doc p:last-child { margin-bottom: 0; }
.doc b { font-weight: 700; color: #fff; }
.lede-short b, .how b { color: var(--paper); }
.slot { background: #2a1a18; color: #f5b8b2; border-bottom: 1px dashed var(--red); padding: 0 0.15em; cursor: pointer; }
.slot.filled { background: #1c2a1c; color: var(--paper); border-bottom-color: #4caf50; }
.tpl-actions .ghost { background: none; border: 1px solid var(--paper); color: var(--paper); }
.tpl-actions .ghost:hover { background: var(--paper); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--paper); color: var(--ink); padding: 0.6rem 1rem; font-size: 0.85rem; z-index: 50; max-width: calc(100% - 2rem); }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; max-width: 46rem; margin: 0 0 1rem; }
.choose a { display: grid; gap: 0.2rem; border: 1px solid var(--paper); border-left: 4px solid var(--red); padding: 0.9rem 1rem; text-decoration: none; color: var(--paper); }
.choose a:hover { background: var(--paper); color: var(--ink); }
.choose b { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 1.35rem; letter-spacing: 0.01em; text-transform: uppercase; line-height: 1; }
.choose span { font-size: 0.8rem; color: inherit; opacity: 0.8; }
.lede-note { font-size: 0.8rem; color: var(--muted); margin: 0 0 1.5rem; }
.step { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.6rem; }
.step b { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--red); color: #fff; font-weight: 500; margin-right: 0.35rem; }
.tpl-actions .step { margin: 0 0.3rem 0 0; }
@media (max-width: 899px) { .tpl-actions button { font-size: 0.85rem; padding: 0.45rem 0.7rem; } .tpl-actions .step b { width: 1.3rem; height: 1.3rem; } }
.tpl-foot { color: var(--muted); margin-top: 2rem; max-width: var(--measure); }

.foot { border-top: 1px solid var(--line); padding: 1.25rem 1rem 2.5rem; font-size: 0.8rem; color: var(--muted); max-width: 1100px; }
.foot p { margin: 0.3rem 0; }

@media (max-width: 720px) {
  /* The top bar stays put on phones: wordmark above, the jump links as one scrolling row below.
     Otherwise the links vanish on the first scroll and the page is a long list with no way around it. */
  .top { position: sticky; top: 0; z-index: 1100; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0.45rem; padding: 0.5rem 1rem 0.55rem; }
  .wordmark { font-size: 1rem; }
  .jump { flex-wrap: nowrap; justify-content: flex-start; gap: 1.1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
  .jump::-webkit-scrollbar { display: none; }
  .jump a { white-space: nowrap; flex: 0 0 auto; }
  [id] { scroll-margin-top: 5.5rem; }
  .ways li { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .side { position: static; }
  .choose { grid-template-columns: 1fr; }
  .country[open] .ports { margin-left: 0; }
  .ways p { grid-column: 1; }
  .ports li { grid-template-columns: 1.1rem 1fr; }
  .ports .act { grid-column: 2; justify-self: start; }
  .headline { min-height: 0; }
}
