/* OSPAIC: the Issue direction.
   Ochre ground, black ink, the year on saltbush grey-green, black foot. The calendar rail runs down the
   left; the mark sits at its head. Piazzolla for text, Commissioner for the apparatus. */
:root {
  --paper: #e3804f;
  --ink: #000;
  --saltbush: #a9bcb0;
  --coral: #ff7a5c;
  --rule: rgba(0,0,0,0.28);
  --faint: rgba(0,0,0,0.32);
  --dim: rgba(0,0,0,0.62);
  --text: "Piazzolla", "Iowan Old Style", Georgia, serif;
  --sans: "Commissioner", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --railw: 13rem;
  --inset: clamp(1rem, 3vw, 3rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: #fff; }
a:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
p { margin: 0; }
p + p { margin-top: 1em; }
cite { font-style: italic; }
.line { display: block; white-space: pre; }

.frame { display: grid; grid-template-columns: var(--railw) minmax(0, 1fr); }

/* ---------- Calendar rail ---------- */
.rail {
  position: sticky; top: 0;
  height: 100svh;
  padding: 1.25rem 0 1.5rem var(--gutter);
  display: flex; flex-direction: column;
  font-family: var(--sans);
}
.mark { display: block; width: 6rem; margin-bottom: 1.5rem; }
.mark img, .mark svg { display: block; width: 100%; height: auto; }
.weeks { position: relative; flex: 1; min-height: 0; }
.wk { position: absolute; left: 0; width: 0.75rem; height: 1px; background: var(--faint); }
.wk.month { width: 1.4rem; background: var(--dim); }
.wk.month.quiet .m { opacity: 0; }
.wk.hidden { display: none; }
.wk .m { position: absolute; left: 1.9rem; top: 0; transform: translateY(-50%); transition: opacity 120ms; font-size: 0.7rem; color: var(--dim); letter-spacing: 0.06em; white-space: nowrap; }
.wk.mile { width: 2.4rem; height: 2px; background: var(--ink); }
.wk.mile .l { position: absolute; left: 2.9rem; top: 0; transform: translateY(calc(-50% + var(--dy, 0px))); font-size: 0.8rem; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--dim); }
.wk.mile .l small { display: block; font-size: 0.7rem; font-weight: 400; }
.wk.mile.on .l, .wk.mile:hover .l { color: var(--ink); }
/* Short rails: drop the date line, then show labels only for the lit or hovered milestone. */
.rail.compact .wk.mile .l small { display: none; }
.rail.minimal .wk.mile .l { opacity: 0; transition: opacity 120ms; }
.rail.minimal .wk.mile.on .l, .rail.minimal .wk.mile:hover .l { opacity: 1; }
.rail.minimal .wk.mile:hover .l { background: var(--paper); padding: 0 0.3rem; margin-left: -0.3rem; }
.wk.mile.on { background: #fff; }
.wk.mile.on .l { color: #fff; }
.today { position: absolute; left: -0.4rem; width: 3.2rem; height: 2px; background: #fff; }
.today .l { position: absolute; left: 3.6rem; top: 0; transform: translateY(calc(-50% + var(--dy, 0px))); font-size: 0.75rem; color: #fff; font-weight: 600; white-space: nowrap; }
.wk[title]:hover { background: #fff; }

/* ---------- Page ---------- */
main { min-width: 0; padding: 0 var(--gutter) 0 var(--inset); }
.top { display: flex; justify-content: flex-end; gap: 0.3rem 1.6rem; flex-wrap: wrap; padding: 1.55rem 0 0; font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.top a { text-decoration: none; }
.top a:hover, .top a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ink); }

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(2.5rem, 6vh, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.lead img { display: block; width: 100%; height: auto; }
.titlepage { text-align: center; }
.fit { margin: 0; font-weight: 800; font-variation-settings: "opsz" 30; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; }
.editors-line { margin-top: 1.5rem; font-style: italic; font-size: 1.2rem; }
.editors-line a { text-decoration: none; }
.editors-line a:hover { text-decoration: underline; }
.titlepage hr { width: 60%; margin: 1.5rem auto; border: 0; border-top: 1px solid var(--ink); }
.lede { font-size: 1.15rem; max-width: 30rem; margin: 0 auto; }
.due { margin-top: 1.5rem; font-weight: 500; color: #fff; }
.due a { text-decoration-color: #fff; }
.clock { margin-top: 0.6rem; font-family: var(--sans); font-size: 0.85rem; color: var(--dim); font-variant-numeric: tabular-nums; }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2rem, 5vh, 3.5rem) 0;
  border-bottom: 1px solid var(--rule);
}
.features article + article { border-left: 1px solid var(--rule); padding-left: clamp(1.5rem, 3vw, 3rem); }
.features h2 { margin: 0 0 0.6rem; font-family: var(--sans); font-weight: 700; font-size: 0.9rem; color: #fff; }
.features p { font-size: 1.05rem; }
.features .big { font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.6rem; line-height: 1.15; }
.features a.more { display: inline-block; margin-top: 0.8rem; font-family: var(--sans); font-size: 0.9rem; }

.matter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(2rem, 5vh, 3.5rem) 0;
}
h2.head { margin: 0 0 1rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.9rem; line-height: 1.1; }
.matter section + section { margin-top: 2.5rem; }
.matter .scope { font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.75rem; color: #fff; }
.priorities { margin: 1rem 0 0; padding-left: 1.4em; }
.priorities li + li { margin-top: 0.5em; }

/* The year, in order, on saltbush */
.year {
  margin: 0 calc(var(--gutter) * -1) 0 calc(var(--inset) * -1);
  padding: 0 var(--gutter) 0 var(--inset);
  background: var(--saltbush);
  color: var(--ink);
}
.year a { text-decoration-color: rgba(0,0,0,0.5); }
.year a:hover { text-decoration-color: #fff; }
.when { padding: clamp(2rem, 5vh, 3.5rem) 0; border-bottom: 1px solid rgba(0,0,0,0.25); scroll-margin-top: 10vh; }
.when:last-child { border-bottom: 0; }
.when h2 { margin: 0; font-weight: 800; font-variation-settings: "opsz" 30; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.05; }
.when h2 small { display: block; font-family: var(--sans); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.when .text { max-width: 36rem; margin-top: 1.25rem; }
.button { display: inline-block; margin-top: 1.25rem; padding: 0.55rem 0.95rem; border: 1px solid var(--ink); text-decoration: none; font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.button:hover { background: var(--ink); color: #fff; }

/* Inner pages */
.page { padding: clamp(2rem, 5vh, 3.5rem) 0 clamp(3rem, 6vh, 5rem); max-width: 44rem; }
.page h1 { margin: 0 0 1.5rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; }
.page h2 { margin: 2.5rem 0 0.75rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.6rem; line-height: 1.15; }
.page .standfirst { font-size: 1.25rem; max-width: 36rem; }
.page .standfirst + * { margin-top: 1.5rem; }
.page .rule-out { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 3px solid var(--ink); font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.35rem; line-height: 1.2; }
.page ul, .page ol { padding-left: 1.4rem; }
.page ol li { padding-left: 0.3rem; }
.page li + li { margin-top: 0.4rem; }
.dates { margin: 1.5rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 2rem; font-family: var(--sans); font-size: 0.95rem; }
.dates dt { font-weight: 700; }
.dates dd { margin: 0; }

/* FAQ: the question box, then the questions people have asked */
.ask { margin: 0 0 2.5rem; padding: 1.5rem; border: 1px solid var(--ink); max-width: 36rem; }
.ask h2 { margin: 0 0 0.75rem; }
.ask label { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.9rem; margin: 0.9rem 0 0.3rem; }
.ask input, .ask textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--ink); background: rgba(255,255,255,0.55); color: var(--ink); font: inherit; font-size: 1rem; }
.ask textarea { min-height: 6.5rem; resize: vertical; }
.ask input:focus, .ask textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.ask .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ask button { margin-top: 1.1rem; padding: 0.6rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.ask button:hover { background: #fff; color: var(--ink); }
.ask .status { margin-top: 0.9rem; font-family: var(--sans); font-size: 0.9rem; }
.ask .status:empty { display: none; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.25rem; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.95rem; font-family: var(--sans); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.25rem; max-width: 38rem; }
@media (max-width: 560px) { .ask .row { grid-template-columns: 1fr; } }

/* Submission form */
.form { display: grid; gap: 1.5rem; max-width: 40rem; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.form legend { margin-bottom: 0.5rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.5rem; }
.field { display: grid; gap: 0.3rem; }
.field label, .check span { font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.field .hint { font-family: var(--sans); font-size: 0.85rem; color: var(--dim); margin: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--ink); background: rgba(255,255,255,0.55); color: var(--ink); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.field input[type="file"] { font: inherit; font-family: var(--sans); font-size: 0.95rem; }
.field [aria-invalid="true"] { border-color: #7a0f00; box-shadow: inset 0 0 0 1px #7a0f00; }
.field-error { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 0.85rem; }
.check + .field-error { margin-left: calc(1.1rem + 0.75rem + 6px); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--ink); }
.check span { font-family: var(--text); font-weight: 400; font-size: 1rem; }
.form .button, .form button.button { display: inline-block; padding: 0.6rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; cursor: pointer; margin-top: 0; }
.form .button:hover { background: #fff; color: var(--ink); }
.form .button[disabled] { opacity: 0.5; cursor: not-allowed; }
.status { margin: 0 0 1.5rem; padding: 0.9rem 1.1rem; border: 1px solid var(--ink); font-family: var(--sans); font-size: 0.95rem; max-width: 40rem; }
.status.error { background: rgba(0,0,0,0.08); }
.status.ok { background: rgba(255,255,255,0.45); }
.status:empty { display: none; }
.form .status { margin: 0; }
/* Submission received */
.receipt { margin: 1.5rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--ink); background: rgba(255,255,255,0.45); max-width: 40rem; }
.receipt p { margin: 0; }
.receipt p + p { margin-top: 0.75rem; }
.receipt .ref { font-family: var(--sans); font-weight: 700; letter-spacing: 0.03em; }
.before { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); max-width: 40rem; }
.before h2 { margin: 0 0 0.75rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.3rem; }
.before dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; font-size: 1rem; }
.before dt { font-family: var(--sans); font-weight: 700; font-size: 0.9rem; padding-top: 0.15rem; }
.before dd { margin: 0; }

/* Editorial board */
.board { margin: 1.5rem 0 0; padding: 0; list-style: none; columns: 2; column-gap: 3rem; max-width: 52rem; }
.board li { break-inside: avoid; padding: 0.45rem 0; border-top: 1px solid var(--rule); }
.board a { text-decoration-color: rgba(0,0,0,0.5); font-weight: 500; }
.board a:hover { text-decoration-color: #fff; }
.board .aff { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--dim); }
@media (max-width: 700px) { .board { columns: 1; } }

/* Editors page */
.people { padding: clamp(2rem, 5vh, 3.5rem) 0 clamp(3rem, 6vh, 5rem); max-width: 44rem; }
.people h1 { margin: 0 0 2rem; font-weight: 800; font-variation-settings: "opsz" 30; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; }
.people article + article { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.people h2 { margin: 0; font-weight: 800; font-variation-settings: "opsz" 30; font-size: 1.6rem; line-height: 1.15; }
.people .role { font-family: var(--sans); font-size: 0.9rem; color: #fff; margin: 0.2rem 0 0.9rem; }

footer {
  margin: 0 calc(var(--gutter) * -1) 0 calc(var(--inset) * -1);
  padding: 2rem var(--gutter) 2.5rem var(--inset);
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 0.9rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
footer .mark { width: 3.6rem; margin: 0; }
footer .foot-text { display: flex; flex-direction: column; gap: 0.25rem; }
footer a { text-decoration-color: rgba(255,255,255,0.6); }

/* ---------- Editing ---------- */
.editbar {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  display: flex; gap: 0.4rem;
  font-family: var(--sans); font-size: 0.85rem;
}
.editbar button { font: inherit; font-weight: 600; padding: 0.55rem 0.9rem; border: 1px solid #000; background: #fff; color: #000; cursor: pointer; }
.editbar button:hover:not(:disabled) { background: #000; color: #fff; }
.editbar button:disabled { opacity: 0.45; cursor: default; }
.editbar button.primary { background: #000; color: #fff; }
.editbar button.primary:hover:not(:disabled) { background: #fff; color: #000; }
.editbar button.primary.dirty { background: var(--coral); border-color: var(--coral); color: #000; }
.editbar button.primary.dirty:hover { background: #000; color: #fff; }
.editbar .msg { align-self: center; padding: 0 0.4rem; color: #000; }
body.editing [data-edit] { outline: 1px dashed rgba(0,0,0,0.6); outline-offset: 4px; cursor: text; }
body.editing [data-edit]:focus { outline: 2px solid #000; background: rgba(255,255,255,0.18); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .lead, .matter { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: minmax(0, 1fr); gap: 1.5rem 0; }
  .features article + article { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
}
@media (max-width: 860px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .rail { height: auto; padding: 0.9rem var(--gutter) 0.6rem; background: var(--paper); z-index: 5; flex-direction: row; align-items: center; gap: 1rem; border-bottom: 1px solid var(--rule); }
  .mark { margin: 0; width: 2.8rem; }
  .weeks { height: 2.2rem; }
  .wk { top: auto; bottom: 0; height: 0.5rem; width: 1px; }
  .wk.month { height: 0.9rem; width: 1px; }
  .wk .m { display: none; }
  .wk.mile { height: 1.4rem; width: 2px; }
  .wk.mile .l { display: none; }
  .today { top: auto; bottom: 0; height: 1.8rem; width: 2px; left: 0; }
  .today .l { display: none; }
  main { padding-left: var(--gutter); }
  .year, footer { margin-left: calc(var(--gutter) * -1); padding-left: var(--gutter); }
  .top { justify-content: flex-start; padding-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
