/* =========================================================================
   Dadgogo — a drawing sheet.
   Palette taken from land-use plan keys; the title block is the signature.
   ========================================================================= */

:root {
  --paper:       #F4F6F3;
  --paper-2:     #FFFFFF;
  --ink:         #12171C;
  --ink-2:       #5C6670;
  --ink-3:       #889299;
  --rule:        #D8DDDE;
  --rule-strong: #A9B3B6;
  --cyan:        #0B6E8C;
  --cyan-deep:   #084F65;
  --amber:       #E4A11B;

  --display: "IBM Plex Sans Condensed", "Helvetica Neue", Arial, sans-serif;
  --body:    "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 1.5rem;
  --measure: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "liga" 1;
}

/* Faint drafting grid, kept nearly invisible. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(11,110,140,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,110,140,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100; font-family: var(--display);
}
.skip:focus { left: .5rem; top: .5rem; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- the sheet */

.sheet {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
  background: var(--paper);
}

@media (min-width: 920px) {
  .sheet {
    margin: 1.75rem auto;
    padding: 0 3rem 4rem;
    border: 1px solid var(--rule-strong);
  }
  /* corner ticks, as on a plotted sheet */
  .sheet::before, .sheet::after {
    content: "";
    position: absolute;
    width: 14px; height: 14px;
    border: 1px solid var(--rule-strong);
  }
  .sheet::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
  .sheet::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 2rem 0 1rem;
  border-bottom: 2px solid var(--ink);
}

.mark {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: .7rem;
}
/* The mark is cartoon line art and the rest of the page is drafting-precise.
   Keeping it small and monochrome is what lets the two sit together. */
.mark-logo {
  width: 48px;
  height: auto;
  flex: 0 0 48px;
  display: block;
}
.mark-text { display: block; }
.mark-name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}
.mark-sub {
  display: block;
  margin-top: .35rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.nav-link {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: .55rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--hatch, var(--ink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav-link:hover::after,
.nav-link.is-current::after { transform: scaleX(1); }
.nav-link.is-current { color: var(--ink); }

/* ------------------------------------------------- title block (signature) */

.titleblock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
}
.tb-cell {
  padding: .6rem .75rem .7rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.titleblock dt {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 .3rem;
}
.titleblock dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.titleblock dd a { text-decoration: none; }
.titleblock dd a:hover { text-decoration: underline; }

.titleblock--footer { margin-top: 3.5rem; }

/* ------------------------------------------------------------------- hero */

.hero {
  display: grid;
  gap: 2.5rem;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.35fr 1fr; gap: 3.5rem; align-items: start; }
}

.hero-name {
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .9rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding-bottom: .8rem;
  border-bottom: 3px solid var(--cyan);
}
.hero-name span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero-thesis {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.hero-thesis em {
  font-style: normal;
  color: var(--cyan);
}
.hero-lede {
  margin: 0;
  max-width: 46ch;
  font-size: 1.1rem;
  color: var(--ink-2);
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-more { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.hero-more a {
  font-family: var(--display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero-more a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* -------------------------------------------------------------- the legend */

.legend { padding: 2.75rem 0 1rem; }
.legend-title, .strip-title {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 1.25rem;
}
.legend-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 700px) {
  .legend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .legend-grid { grid-template-columns: repeat(4, 1fr); }
}
.legend-item {
  display: block;
  background: var(--paper-2);
  padding: 1.15rem 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: background .18s ease;
}
.legend-item:hover { background: #FBFCFB; }
.legend-key {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .55rem;
}
.legend-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.legend-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-2);
}
.legend-blurb {
  margin: 0;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.swatch {
  display: inline-block;
  width: 15px; height: 15px;
  flex: 0 0 15px;
  background: var(--hatch, var(--ink));
  border: 1px solid rgba(0,0,0,.28);
}

/* -------------------------------------------------------------- post rows */

.strip { padding: 3rem 0 0; }

.rows { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .row { grid-template-columns: 150px 1fr; gap: 0 2.5rem; }
}

.row-gutter {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding-top: .25rem;
}
@media (min-width: 760px) {
  .row-gutter { display: block; }
  .row-gutter .swatch { margin-bottom: .5rem; }
}
.row-section {
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: block;
}
.row-section:hover { color: var(--cyan); }
.row-sheet {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-2);
  margin-top: .15rem;
}

.row-title {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { color: var(--cyan); text-decoration: underline; text-decoration-thickness: 2px; }

.row-excerpt {
  margin: 0 0 .55rem;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: .98rem;
}
.row-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.row-flag {
  border: 1px solid var(--amber);
  color: #8a5f00;
  background: rgba(228,161,27,.12);
  padding: .1rem .4rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .62rem;
}

/* ----------------------------------------------------------- section pages */

.page-head {
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--ink);
}
.page-eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 .9rem;
}
.page-title {
  margin: 0 0 .75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.page-lede {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}

/* -------------------------------------------------------------- article */

.article { padding: 2.5rem 0 0; }

.article-head { max-width: var(--measure); margin: 0 auto 2rem; }
.article-title {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.article-standfirst {
  margin: 0 0 1.75rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.article-cover { margin: 0 0 2rem; }
.article-cover img { display: block; width: 100%; border: 1px solid var(--rule-strong); }

.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.008em;
  margin-top: 2.4em;
  margin-bottom: .6em;
}
.prose h2 { font-size: 1.65rem; padding-top: .8em; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 1.28rem; }
.prose h4 { font-size: 1.08rem; text-transform: uppercase; letter-spacing: .08em; }
.prose p { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  margin-left: 0; margin-right: 0;
  padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--cyan);
  color: var(--ink-2);
  font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .8em; }
.prose pre {
  background: #10161B;
  color: #E4EAEE;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.55;
}
.prose code {
  font-family: var(--mono);
  font-size: .88em;
  background: rgba(11,110,140,.09);
  padding: .1em .3em;
}
.prose pre code { background: none; padding: 0; font-size: 1em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose img { border: 1px solid var(--rule-strong); display: block; }
.prose figcaption, .prose .caption {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--ink-2);
  margin-top: .5rem;
}

.tool-cta {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tool-cta p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.tool-cta strong { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--ink); }
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: .8rem 1.4rem;
  border: 1px solid var(--ink);
  transition: background .16s ease, color .16s ease;
}
.btn:hover { background: var(--cyan); border-color: var(--cyan); color: #fff; }

.article-foot {
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}
.neighbours {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) { .neighbours { grid-template-columns: 1fr 1fr; } }
.neighbour {
  display: block;
  border: 1px solid var(--rule);
  padding: .9rem 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--paper-2);
}
.neighbour:hover { border-color: var(--cyan); }
.neighbour span {
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: .3rem;
}
.neighbour strong { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.neighbour--next { text-align: right; }

/* ------------------------------------------------------------------- ads
   The reserved height is the important part: the box holds its space before
   the ad arrives, so nothing below it jumps. That protects Core Web Vitals,
   which protects ranking, which is worth more than the unit itself.        */

.ad-slot {
  max-width: var(--measure);
  margin: 2.75rem auto;
  min-height: var(--ad-reserve, 250px);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
}
.ad-slot .adsbygoogle { display: block; width: 100%; }

.ad-label {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* The list ad sits in the post stream, so it uses the row rhythm. */
.ad-slot--list {
  max-width: none;
  margin: 0;
  padding: 1.5rem 0;
  border-top: 0;
  border-bottom: 1px solid var(--rule);
  min-height: var(--ad-reserve, 250px);
}

/* Above the body text: no top rule, it already sits under the title block. */
.ad-slot--top { margin-top: 2rem; border-top: 0; padding-top: 0; }

@media (max-width: 600px) {
  .ad-slot { margin: 2rem auto; }
}

/* ------------------------------------------------------------------ pager */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 0;
}
.pager-link {
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.pager-link.is-off { color: var(--rule-strong); }
.pager-count { font-family: var(--mono); font-size: .68rem; color: var(--ink-2); letter-spacing: .1em; }

/* --------------------------------------------------------------- colophon */

.colophon { padding-top: 1rem; }
.colophon-nav {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.5rem;
}
.colophon-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.colophon-nav a:hover { color: var(--cyan); }
.colophon-fine {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ empty */

.empty {
  border: 1px dashed var(--rule-strong);
  background: var(--paper-2);
  padding: 2.5rem;
  text-align: center;
  margin-top: 2rem;
}
.empty h2 { font-family: var(--display); margin: 0 0 .5rem; font-size: 1.2rem; }
.empty p { margin: 0; color: var(--ink-2); font-size: .95rem; }

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

/* ------------------------------------------------- the register (pillar) ---
   A plain table on purpose. It is the page meant to be linked and quoted, so
   it has to survive being read by a search engine, a screen reader, and
   someone copying it into a spreadsheet.                                    */

.register-wrap {
  margin: 0 0 3rem;
  overflow-x: auto;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
}
.register {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.register-caption {
  caption-side: top;
  text-align: left;
  padding: .9rem 1rem;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-strong);
}
.register th, .register td {
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.register thead th {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}
.register tbody tr:last-child th,
.register tbody tr:last-child td { border-bottom: 0; }
.register tbody tr:hover { background: #FBFCFB; }
.register-city {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
}
.register-region { color: var(--ink-2); white-space: nowrap; }
.register-bets { min-width: 16rem; }
.register-go a {
  font-family: var(--display);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.strip-title--spaced { margin-top: 1rem; }

/* ------------------------------------------------------ related articles */

.related {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 700px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related a {
  display: block;
  background: var(--paper-2);
  padding: .9rem 1rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.related a:hover { background: #FBFCFB; }
.related strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .25rem;
}
.related span { font-size: .85rem; color: var(--ink-2); line-height: 1.4; }

@media (max-width: 520px) {
  .mark-logo { width: 38px; flex-basis: 38px; }
  .mark-name { font-size: 1.35rem; }
}
