/* alobonus.net — weekly value roundup desk, Ghent
   Paper / ink / one red. Tickets, not cards. */

:root {
  --paper: #FCFBF8;
  --ink: #1A1526;
  --ink-muted: #5B5568;
  --red: #C0392B;
  --red-deep: #9E2C21;
  --rule: #DED9CF;
  --tint: #F3EFE6;
  --focus: #1A1526;

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Overpass Mono", "SFMono-Regular", Consolas, monospace;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --col-left: minmax(13rem, 18rem);
  --wrap: 76rem;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.75rem, 6vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-size: var(--step-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); line-height: 1.02; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; }

p, ul, ol, dl { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--red-deep); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

code, kbd, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

strong { font-weight: 600; }
small { font-size: var(--step--1); }

.muted { color: var(--ink-muted); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
  border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 2px solid var(--ink);
}

.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1;
}
.wordmark:hover { color: var(--ink); }
.wordmark svg { width: 1.1em; height: 1.1em; align-self: center; }
.wordmark .tld { color: var(--red); }

.masthead nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 0.25rem 1.5rem;
  flex-wrap: wrap;
  max-width: none;
}
.masthead nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover,
.masthead nav a[aria-current="page"] { border-bottom-color: var(--red); }

.masthead .dateline {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  flex-basis: 100%;
  margin-top: -0.4rem;
}

@media (min-width: 60rem) {
  .masthead .dateline { flex-basis: auto; margin-top: 0; order: 2; }
  .masthead nav { order: 3; }
}

/* ---------- Ticket perforation (section separator) ---------- */

.tear {
  position: relative;
  background: var(--tint);
  height: 2.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.tear::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 2px dashed var(--rule);
}
.tear .notch {
  position: absolute;
  top: 50%;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--rule);
  transform: translateY(-50%);
}
.tear .notch:first-of-type { left: -0.9rem; }
.tear .notch:last-of-type { right: -0.9rem; }
.tear .tag {
  position: relative;
  margin-inline: auto;
  padding: 0 0.75rem;
  background: var(--tint);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* ---------- Editorial two-column section ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem var(--gutter);
}
@media (min-width: 52rem) {
  .two-col { grid-template-columns: var(--col-left) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 5rem); }
  .two-col > .desk { position: sticky; top: 1.5rem; align-self: start; }
}

.desk h2 { margin-bottom: 0.5rem; }
.desk .note {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  max-width: 28ch;
  line-height: 1.5;
}
.desk .note::before {
  content: "";
  display: block;
  width: 2.5rem;
  border-top: 3px solid var(--red);
  margin: 0.75rem 0;
}

.copy > * + * { margin-top: 1.1em; }
.copy h3 { margin-top: 2.2rem; }
.copy h3:first-child { margin-top: 0; }
.copy ul, .copy ol { padding-left: 1.25rem; }
.copy li + li { margin-top: 0.4em; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 56ch;
}

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .two-col { align-items: start; }
@media (min-width: 52rem) {
  .hero .two-col { grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr); }
  .hero .two-col > .desk { position: static; }
}
.hero h1 { max-width: 14ch; margin-bottom: 1.25rem; }
.hero h1 em { font-style: italic; color: inherit; }
.hero .lede { margin-bottom: 1.5rem; }
.hero .from {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* ---------- The subscribe ticket ---------- */

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}
.ticket__main { padding: 1.5rem 1.5rem 1.6rem; }
.ticket__stub {
  position: relative;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--red);
  color: var(--paper);
  border-top: 2px dashed rgba(252, 251, 248, 0.6);
}
/* notches on the perforation */
.ticket__stub::before,
.ticket__stub::after {
  content: "";
  position: absolute;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  top: -0.8rem;
  transform: translateY(-1px);
}
.ticket__stub::before { left: -0.8rem; }
.ticket__stub::after { right: -0.8rem; }

@media (min-width: 30rem) {
  .ticket { grid-template-columns: minmax(0, 1fr) 9.5rem; }
  .ticket__stub {
    border-top: 0;
    border-left: 2px dashed rgba(252, 251, 248, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .ticket__stub::before,
  .ticket__stub::after {
    left: -0.8rem; right: auto;
    transform: translateX(-1px);
  }
  .ticket__stub::before { top: -0.8rem; }
  .ticket__stub::after { top: auto; bottom: -0.8rem; }
}

.ticket__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  margin: 0 0 0.25rem;
}
.ticket__meta {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin: 0 0 1.1rem;
}
.ticket__meta span + span::before { content: " / "; color: var(--rule); }

.ticket form { display: grid; gap: 0.6rem; }
.ticket label { font-weight: 600; font-size: var(--step--1); }
.ticket input[type="email"] {
  font: inherit;
  font-family: var(--font-mono);
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
.ticket input[type="email"]::placeholder { color: #6E6880; }
.ticket .fine {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin: 0.35rem 0 0;
  line-height: 1.45;
}
.ticket .error {
  color: var(--red-deep);
  font-size: var(--step--1);
  font-weight: 600;
  margin: 0;
}
.ticket .error:empty { display: none; }

.ticket__stub .mono { display: block; font-size: var(--step--1); opacity: 0.92; }
.ticket__stub .stub-issue {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  display: block;
  margin: 0.35rem 0 0.75rem;
}
@media (min-width: 30rem) {
  .ticket__stub .stub-issue { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0.5rem 0; align-self: flex-start; }
}

.ticket__done { padding: 1.5rem; display: none; }
.ticket[data-state="done"] .ticket__main { display: none; }
.ticket[data-state="done"] .ticket__done { display: block; }
.ticket__done h3 { margin-bottom: 0.35rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--paper { background: var(--paper); color: var(--red); border-color: var(--paper); }
.btn--paper:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Issue anatomy (what arrives) ---------- */

.anatomy {
  list-style: none;
  padding: 0; margin: 0;
  max-width: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.anatomy li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
@media (min-width: 40rem) {
  .anatomy li { grid-template-columns: 12rem minmax(0, 1fr); }
}
.anatomy .k {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.2;
}
.anatomy .v { color: var(--ink); max-width: 52ch; }
.anatomy .v .mono { color: var(--ink-muted); display: block; margin-top: 0.25rem; font-size: var(--step--1); }

/* ---------- Method (a real sequence) ---------- */

.method {
  list-style: none;
  counter-reset: step;
  padding: 0; margin: 0;
  max-width: none;
}
.method li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  margin: 0;
  max-width: 60ch;
}
.method li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.1rem;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-1);
  display: grid;
  place-items: center;
  line-height: 1;
}
.method li::after {
  content: "";
  position: absolute;
  left: calc(1.125rem - 1px);
  top: 2.5rem; bottom: 0.1rem;
  border-left: 2px dashed var(--rule);
}
.method li:last-child::after { display: none; }
.method li:last-child { padding-bottom: 0; }
.method h3 { font-size: var(--step-1); margin-bottom: 0.25rem; }

/* ---------- Desk (people) ---------- */

.people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  list-style: none;
  padding: 0; margin: 0;
  max-width: none;
}
@media (min-width: 40rem) { .people { grid-template-columns: 1fr 1fr; } }
.person { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start; }
.person .mark {
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1;
}
.person .mark.red { background: var(--red); color: var(--paper); border-color: var(--red); }
.person h3 { font-size: var(--step-1); margin-bottom: 0.15rem; }
.person .role { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-muted); margin-bottom: 0.5rem; }

/* ---------- Sending, plainly (compliance) ---------- */

.plain {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) { .plain { grid-template-columns: 1fr 1fr; } }
.plain > li {
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
@media (min-width: 40rem) {
  .plain > li:nth-child(odd) { border-right: 1px solid var(--rule); }
  .plain > li:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 39.99rem) { .plain > li:last-child { border-bottom: 0; } }
.plain h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }
.plain p { max-width: 40ch; }
.plain address { font-style: normal; font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.6; }

/* ---------- FAQ accordion ---------- */

.faq { max-width: none; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red); }
.faq summary .plus {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  flex: none;
}
.faq summary .plus::before,
.faq summary .plus::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease;
}
.faq summary .plus::before { width: 0.9rem; height: 2px; }
.faq summary .plus::after { width: 2px; height: 0.9rem; }
.faq details[open] summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq .answer { padding: 0 3rem 1.25rem 0; max-width: 60ch; }
.faq .answer > * + * { margin-top: 0.75em; }

/* ---------- Roundup (issue) page ---------- */

.issue-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; }
.issue-head .stamp {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.issue-head .stamp span + span::before { content: " / "; color: var(--rule); }
.issue-head h1 { max-width: 18ch; font-size: clamp(2.25rem, 5vw, 3.5rem); }

.pick { max-width: none; }
.pick + .pick { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--rule); }
.pick .kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--red);
  margin-bottom: 0.5rem;
}
.pick h2 { font-size: var(--step-2); max-width: 26ch; }
.pick p { max-width: 60ch; }

.code-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  max-width: 34rem;
}
@media (min-width: 30rem) { .code-line { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.code-line .lbl { font-size: var(--step--1); color: var(--ink-muted); display: block; margin-bottom: 0.15rem; }
.code-line code {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.code-line .btn { white-space: nowrap; }
.code-line .btn[data-copied="true"] { background: var(--red); border-color: var(--red); }

.pick .actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1.25rem; }
.pick .actions .mono { color: var(--ink-muted); font-size: var(--step--1); }

.passed { border-left: 3px solid var(--red); padding-left: 1.25rem; }

/* ---------- Legal pages ---------- */

.legal .copy h2 { font-size: var(--step-2); margin-top: 2.5rem; }
.legal .copy h2:first-child { margin-top: 0; }
.page-title { font-size: var(--step-3); }
.legal .updated { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-muted); }

/* ---------- 404 ---------- */

.lost { padding: clamp(4rem, 12vw, 9rem) 0; }
.lost .big {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 14rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--red);
  margin: 0 0 1rem;
}
.lost .actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 1.5rem; }

/* ---------- Footer ---------- */

.footer {
  border-top: 2px solid var(--ink);
  background: var(--tint);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  font-size: var(--step--1);
}
.footer .cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem var(--gutter);
}
@media (min-width: 48rem) { .footer .cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } }
.footer .wordmark { font-size: var(--step-1); margin-bottom: 0.75rem; gap: 0; }
.footer p { max-width: 52ch; }
.footer address { font-style: normal; font-family: var(--font-mono); line-height: 1.6; margin-top: 1rem; }
.footer a { color: var(--ink); }
.footer a:hover { color: var(--red); }
.footer h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--step-1); margin-bottom: 0.6rem; }
.footer ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.footer li + li { margin-top: 0.4rem; }
.footer .bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}
