/* Two By Four Theory — colours and type follow the build-plan PDF (tools/plans/plan.css). */
:root {
  --ink: #14100c;
  --yellow: #ffd640;
  --amber: #f2b632;
  --cream: #fbf6ea;
  --panel: #f6f1e4;
  --rule: #d9d2c3;
  --soft: #5b554c;
  --green: #3f7d2e;
  --red: #b42f17;
  --heavy: "Arial Black", "Arial Bold", "Helvetica Neue", Arial, system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --max: 1120px;
  --shadow: 4px 4px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--heavy); font-weight: 900; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow > * { max-width: 760px; }

/* wordmark: TWO BY [FOUR] THEORY */
.wm { font-family: var(--heavy); font-weight: 900; font-size: 15px; letter-spacing: 0.06em; text-decoration: none; white-space: nowrap; }
.wm b { background: var(--yellow); padding: 1px 5px; margin: 0 1px; }

/* header */
.top { border-bottom: 3px solid var(--ink); background: var(--cream); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.top-link { font-weight: 600; font-size: 14px; text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 1px; white-space: nowrap; }
.top-link:hover { border-color: var(--ink); }
.top-link .short { display: none; }
@media (max-width: 420px) {
  .top-link .long { display: none; }
  .top-link .short { display: inline; }
  .wm { font-size: 14px; }
  .facts .v { font-size: 16px; }
  .facts li { padding: 10px 10px 12px; }
}

/* hero */
.hero { padding: 28px 0 36px; }
.hero-in { display: grid; gap: 28px; align-items: center; }
.eyebrow { margin: 0 0 12px; font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
h1 { font-size: clamp(34px, 10.2vw, 66px); }
.hl { display: inline-block; white-space: nowrap; background: var(--yellow); line-height: 1.05; padding: 0.05em 0.16em 0.09em; margin: 0.1em 0 0 -0.16em; }
.lede { font-size: 18px; margin: 18px 0 22px; max-width: 34em; }

.signup label[for="email"] { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.row { display: flex; flex-direction: column; gap: 10px; }
input[type="email"] {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 14px; border: 2px solid var(--ink); border-radius: 0;
  background: #fff; color: var(--ink); min-height: 54px; appearance: none;
}
input[type="email"]::placeholder { color: #8b8478; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--heavy); font-weight: 900;
  font-size: 17px; letter-spacing: 0.01em; color: var(--ink); background: var(--yellow); border: 2px solid var(--ink);
  box-shadow: var(--shadow); padding: 14px 22px; min-height: 54px; cursor: pointer; text-decoration: none; border-radius: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button:hover, .btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
button:active, .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
button:disabled { opacity: 0.7; cursor: progress; }
.fine { font-size: 14px; color: var(--soft); margin: 12px 0 0; max-width: 36em; }
.status { min-height: 1.4em; margin: 8px 0 0; font-weight: 600; font-size: 15px; }
.status.err { color: var(--red); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done { border: 2px solid var(--ink); background: #fff; padding: 18px; box-shadow: var(--shadow); max-width: 520px; }
.done-h { font-family: var(--heavy); font-weight: 900; font-size: 22px; margin: 0 0 14px; }
.btn-big { flex-direction: column; gap: 2px; width: 100%; padding: 14px 18px; font-size: 19px; }
.btn-big .sub { font-family: var(--body); font-weight: 600; font-size: 13px; }

.hero-cover { margin: 0; justify-self: center; width: min(78%, 340px); }
.hero-cover img { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); transform: rotate(1.5deg); background: #fff; }

.facts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.facts li { padding: 14px 14px 16px; border-left: 3px solid var(--yellow); margin: 10px 0 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.facts .k { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #d8d0bf; font-weight: 700; }
.facts .v { font-family: var(--heavy); font-weight: 900; font-size: 18px; line-height: 1.15; }
.facts .n { font-size: 13px; color: #d8d0bf; }

/* tape-measure divider */
.tape {
  height: 26px; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); background-color: var(--yellow);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 12px);
  background-size: 100% 13px, 100% 7px; background-repeat: no-repeat; background-position: 0 0, 0 0;
}

/* sections */
section.inside, section.videos, section.next, section.faq { padding: 48px 0; }
section.videos { background: var(--panel); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
h2 { font-size: clamp(28px, 7vw, 44px); }
.sec-lede { margin: 10px 0 26px; color: var(--soft); max-width: 40em; }

.pages { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 8px 18px 4px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: thin; }
.pg { margin: 0; scroll-snap-align: start; }
.pg img { border: 2px solid var(--ink); box-shadow: var(--shadow); background: #fff; }
.pg figcaption { margin-top: 14px; font-size: 15px; }
.pg figcaption b { display: block; font-family: var(--heavy); font-weight: 900; font-size: 16px; }

.also { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.also li { padding-left: 28px; position: relative; }
.also li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 16px; height: 16px; background: var(--yellow); border: 2px solid var(--ink); }

.note { margin-top: 34px; background: #eef3e6; border-left: 6px solid var(--green); padding: 18px 18px 18px 20px; }
.note h3 { font-size: 18px; margin-bottom: 8px; }
.note p { margin: 0; font-size: 16px; }

.shorts { list-style: none; padding: 4px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter)); display: grid; grid-auto-flow: column; grid-auto-columns: 44%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shorts li { scroll-snap-align: start; }
.shorts a { display: block; text-decoration: none; position: relative; }
.shorts img { border: 2px solid var(--ink); box-shadow: var(--shadow); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; background: #ddd; }
.shorts .t { display: block; margin-top: 12px; font-weight: 700; font-size: 14px; line-height: 1.3; }
.shorts a:hover .t { text-decoration: underline; }
.shorts .tag { position: absolute; top: 8px; left: 8px; background: var(--yellow); border: 2px solid var(--ink); font-family: var(--heavy); font-weight: 900;
  font-size: 12px; padding: 2px 7px; text-transform: uppercase; letter-spacing: 0.06em; }

.coming { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.coming li { display: flex; align-items: baseline; gap: 14px; padding: 14px 2px; border-bottom: 2px solid var(--ink); font-family: var(--heavy); font-weight: 900; font-size: 20px; }
.coming .num { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); min-width: 58px; }
.coming .when { margin-left: auto; font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--yellow); padding: 2px 8px; border: 2px solid var(--ink); }
.again { margin: 30px 0 0; }

.faq details { border-bottom: 2px solid var(--ink); }
.faq details:first-of-type { border-top: 2px solid var(--ink); margin-top: 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--heavy); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; max-width: 40em; }

.foot { background: var(--ink); color: #e9e2d2; padding: 36px 0 44px; font-size: 14px; }
.foot .wm b { color: var(--ink); }
.foot-in p { margin: 0 0 12px; max-width: 46em; }
.foot a { color: #fff; }
.wm-sm { font-size: 14px; color: #fff; margin-bottom: 16px !important; }

/* plain pages returned by the API (no-JS fallback, expired links) */
.plain { padding-top: 64px; padding-bottom: 64px; max-width: 640px; }
.plain h1 { font-size: 36px; margin-bottom: 16px; }

@media (min-width: 640px) {
  .row { flex-direction: row; }
  .row input { flex: 1; }
  .row button { flex: none; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .pages { grid-auto-columns: 42%; }
  .shorts { grid-auto-columns: 28%; }
  .also { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}

@media (min-width: 960px) {
  .hero { padding: 56px 0 48px; }
  .hero-in { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .hero-cover { width: 100%; max-width: 400px; }
  .lede { font-size: 20px; }
  .pages { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .shorts { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; }
  section.inside, section.videos, section.next, section.faq { padding: 72px 0; }
  .coming li { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .btn { transition: none; }
}
