/* Shared styles for the small pages: privacy, terms, 404. Same tokens as the home page (DESIGN.md). */
:root {
  --sky: #7CC4EE; --ink: #111111; --red: #D62B1F; --yellow: #FFD500; --white: #FFFFFF;
  --line: 3px solid var(--ink);
  --gutter: clamp(20px, 4.5vw, 64px);
  --out: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--ink) var(--sky); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--sky); color: var(--ink); font-family: 'Rubik', system-ui, sans-serif; font-size: 18px; line-height: 1.6; accent-color: var(--red); -webkit-text-size-adjust: 100%; }
::selection { background: var(--red); color: var(--white); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, p, ul { margin: 0; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 12px 18px; background: var(--yellow); border: var(--line); font-weight: 700; }
.skip:focus { top: 12px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 24px; }
.nav .name { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 22px; text-decoration: none; }
.nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 0; list-style: none; font-size: 17px; font-weight: 500; }
.nav ul a { display: inline-block; padding: 12px 0; }

main { flex-grow: 1; padding-top: 32px; }
.studs { height: 13px; background: repeating-linear-gradient(90deg, var(--ink) 0 3px, var(--c) 3px 27px, var(--ink) 27px 30px, transparent 30px 46px); box-shadow: inset 0 3px 0 var(--ink); -webkit-mask: repeating-linear-gradient(90deg, #000 0 30px, transparent 30px 46px); mask: repeating-linear-gradient(90deg, #000 0 30px, transparent 30px 46px); }

/* Reading sheet: privacy and terms */
.sheet { max-width: 860px; }
.sheet .studs { max-width: 368px; }
.sheet-head { padding: 28px clamp(20px, 4vw, 40px); border: var(--line); background: var(--yellow); }
.sheet-head h1 { font-weight: 800; font-size: clamp(38px, 5vw, 60px); line-height: 1.02; letter-spacing: -.025em; }
.sheet-head p { margin-top: 10px; font-size: 17px; font-weight: 500; }
.sheet-body { padding: 8px clamp(20px, 4vw, 40px) 40px; border: var(--line); border-top: 0; background: var(--white); }
.sheet-body h2 { margin-top: 40px; font-weight: 800; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.sheet-body p, .sheet-body ul { margin-top: 14px; max-width: 68ch; }
.sheet-body .short { margin-top: 32px; font-size: 20px; line-height: 1.55; }
.sheet-body ul { padding-left: 0; list-style: none; }
.sheet-body li { position: relative; padding-left: 26px; }
.sheet-body li + li { margin-top: 10px; }
.sheet-body li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; background: var(--red); border: 2px solid var(--ink); }
.sheet-body strong { font-weight: 700; }

/* Blog post: same reading sheet, plus figures, tables and callouts */
.post { max-width: 960px; }
.post .sheet-head { padding-top: clamp(32px, 5vw, 56px); padding-bottom: 8px; border-bottom: 0; background: var(--white); }
.post .sheet-head h1 { font-size: clamp(40px, 5.4vw, 64px); }
.post .sheet-head .subtitle { margin-top: 14px; max-width: 34em; font-size: clamp(19px, 2vw, 22px); line-height: 1.4; font-weight: 500; }
.post .sheet-head .byline { margin-top: 16px; font-size: 15px; font-weight: 500; }
.post .sheet-body { padding-top: 0; }
.post .sheet-body > p:first-of-type { font-size: 20px; line-height: 1.55; }
.post .sheet-body h3 { margin-top: 32px; font-weight: 800; font-size: 21px; line-height: 1.2; }
.post .sheet-body p, .post .sheet-body ul, .post .sheet-body ol { max-width: 70ch; }
.post .sheet-body ol { margin-top: 14px; padding-left: 26px; }
.post a { text-decoration-thickness: 2px; }
.post figure { margin: 32px 0 8px; }
.post figure img { display: block; width: 100%; height: auto; border: var(--line); }
.post figcaption { margin-top: 10px; font-size: 16px; line-height: 1.45; font-weight: 500; }
.post figure.cover { margin: 0 calc(-1 * clamp(20px, 4vw, 40px)) 32px; }
.post figure.cover img { border: 0; border-bottom: var(--line); }
.table-scroll { margin-top: 24px; overflow-x: auto; border: var(--line); -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.table-scroll th, .table-scroll td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--ink); }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll th { background: var(--yellow); font-weight: 700; }
.table-scroll td + td, .table-scroll th + th { border-left: 2px solid var(--ink); }
.callout { margin: 32px 0 0; padding: 22px 26px; border: var(--line); background: var(--ink); color: var(--white); }
.callout p { margin-top: 10px; }
.callout p.callout-title { margin-top: 0; color: var(--yellow); font-weight: 800; font-size: 22px; }
.post-more { max-width: 960px; margin-top: 28px; font-size: 17px; font-weight: 500; }

/* Posts list */
.posts { list-style: none; padding: 0; margin: 0; }
.sheet-body .posts li { padding-left: 0; }
.sheet-body .posts li::before { content: none; }
.posts li + li { border-top: 2px solid var(--ink); }
.post-card { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 20px 28px; padding: 24px 0; text-decoration: none; }
.post-card img { width: 100%; height: auto; border: var(--line); }
.post-card h2 { margin-top: 0; }
.post-card:hover h2 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.post-card .meta { margin-top: 10px; font-size: 16px; }

/* 404 */
.lost { min-height: 56vh; display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; padding-top: 32px; padding-bottom: 24px; }
.lost-copy { flex: 1 1 420px; min-width: 0; }
.lost-copy .code { font-weight: 800; font-size: 22px; }
.lost-copy h1 { margin-top: 12px; max-width: 12em; font-weight: 800; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.lost-copy p.say { margin-top: 24px; max-width: 30em; font-size: 21px; line-height: 1.45; }
.ways { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; padding: 0; list-style: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px; border: var(--line); border-radius: 8px; background: var(--yellow); color: var(--ink); font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer; transition: transform .12s var(--out), box-shadow .12s var(--out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(17, 17, 17, .22); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.plain { background: var(--white); }
.gap { flex: 0 1 368px; min-width: 0; margin-inline: auto; }
.gap .studs { width: 100%; }
.gap > div:not(.studs) { height: 72px; border: var(--line); background: var(--white); }
.gap > div:not(.studs) + div { border-top: 0; }
.gap > div.r { background: var(--red); }
.gap > div.y { background: var(--yellow); }
.gap > div.hole { background: transparent; border: 3px dashed var(--ink); border-top: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; }
.gap > div.hole + div { border-top: var(--line); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 72px; margin-bottom: 40px; padding-top: 24px; border-top: var(--line); font-size: 16px; }
.foot a { display: inline-block; padding: 12px 0; }
.foot a + a { margin-left: 20px; }

@media (max-width: 760px) {
  main { padding-top: 16px; }
  .ways .btn { flex: 1 1 100%; }
  .lost { min-height: 0; }
  .sheet .studs { max-width: 306px; }
  .gap { flex-basis: 306px; max-width: 306px; margin-inline: 0; }
  .gap > div:not(.studs) { height: 56px; }
  .foot { margin-top: 56px; }
  .post .sheet-body > p:first-of-type { font-size: 19px; }
  .post-card { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Short read / Full version switch under a post's byline */
.versions { display: inline-flex; flex-wrap: wrap; margin-top: 18px; border: var(--line); }
.versions a { padding: 8px 16px; font-size: 15px; font-weight: 700; text-decoration: none; background: var(--white); }
.versions a + a { border-left: var(--line); }
.versions a span { font-weight: 500; }
.versions a[aria-current] { background: var(--ink); color: var(--white); }
.versions a:not([aria-current]):hover { background: var(--yellow); }
