/* 111 Questions website. Tokens come from the 111 Questions design system (tokens.json v1). */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-Italic-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo-Italic-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --paper: #ffffff;
  --ink: #111827;
  --night: #111111;
  --blue: #0077bc;
  --green: #00865a;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --accent-game-design: #b08d57;
  --accent-fitness-racing: #e72125;
  --accent-digital-nomads: #c2410c;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 4px; --radius-md: 8px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --duration-press: 160ms;

  --gutter: var(--space-4);
  --section: var(--space-7);
  --accent: var(--blue);          /* each book page overrides this */
  --hairline: rgba(17, 24, 39, 0.16);
}
@media (min-width: 760px) {
  :root { --gutter: var(--space-5); --section: var(--space-8); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 18px; line-height: 1.6; font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--radius-sm); }
.on-dark :focus-visible, .band :focus-visible { outline-color: var(--paper); }

h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 48px); line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 4vw, 32px); line-height: 1.15; font-weight: 700; }
h3 { font-size: 24px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 var(--space-4); }
.display { font-size: clamp(44px, 8vw, 72px); line-height: 0.95; font-weight: 900; letter-spacing: -0.02em; }
.lede { font-size: 20px; line-height: 1.5; }
.small { font-size: 15px; line-height: 1.5; }
.label {
  font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 var(--space-2);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.wide { max-width: 880px; }
.section { padding: var(--section) 0; }
.section > .wrap > h2 { margin-bottom: var(--space-5); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); background: var(--paper); padding: var(--space-2) var(--space-4); z-index: 10; }

/* The blue band from the top of every cover, used as the site header. */
.band {
  position: sticky; top: 0; z-index: 30;
  background-color: var(--blue); color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120' viewBox='0 0 220 120'%3E%3Cg fill='%23fff' fill-opacity='.08' font-family='Georgia,serif' font-weight='700'%3E%3Ctext x='14' y='46' font-size='44' transform='rotate(-12 14 46)'%3E?%3C/text%3E%3Ctext x='92' y='104' font-size='30' transform='rotate(9 92 104)'%3E?%3C/text%3E%3Ctext x='150' y='52' font-size='52' transform='rotate(14 150 52)'%3E?%3C/text%3E%3Ctext x='196' y='112' font-size='24' transform='rotate(-8 196 112)'%3E?%3C/text%3E%3C/g%3E%3C/svg%3E");
}
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 72px; flex-wrap: wrap; padding-top: var(--space-2); padding-bottom: var(--space-2); }
.wordmark { font-family: var(--font-display); font-weight: 900; font-size: 28px; letter-spacing: -0.02em; line-height: 1; color: var(--paper); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: 0 calc(var(--space-3) * -1); }
.nav a { color: var(--paper); font-size: 16px; font-weight: 600; text-decoration: none; padding: 0 var(--space-3); min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-sm); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Phones: the sticky header shares rows between the wordmark and the nav links so it stays about 100px tall. */
@media (max-width: 640px) {
  html { scroll-padding-top: 116px; }
  .band .wrap { min-height: 0; gap: 0 var(--space-1); justify-content: flex-start; padding-top: var(--space-1); padding-bottom: var(--space-1); }
  .nav { display: contents; }
  .wordmark { font-size: 24px; margin-right: var(--space-2); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.25; font-weight: 600;
  border: 2px solid transparent; border-radius: var(--radius-md);
  text-decoration: none; cursor: pointer;
  transition: transform var(--duration-press) var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: var(--paper); }
.btn-green { background: var(--green); color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--paper); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-lg { min-height: 56px; font-size: 18px; padding: var(--space-4) var(--space-6); }
/* A Kindle button before the book is on sale: visible, labeled, not clickable. */
.btn[aria-disabled="true"] {
  background: transparent; color: inherit; border: 2px dashed var(--accent);
  cursor: default; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #00669f; }
  .btn-green:hover { background: #00724c; }
  .btn-accent:hover { filter: brightness(0.92); }
  .btn-ghost:hover { background: rgba(127, 127, 127, 0.16); }
  .nav a:hover { background: rgba(255, 255, 255, 0.16); }
}
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
.cta-note { font-size: 15px; margin: var(--space-3) 0 0; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--paper);
}
.tag-soon { background: transparent; color: inherit; border: 1px solid currentColor; }

/* Home hero */
.hero { padding: var(--section) 0; }
.hero h1 { max-width: none; }
@media (min-width: 900px) { .hero h1 { font-size: 64px; } }

/* The reframe: the question you ask next to the better question. */
.reframe-intro { margin: var(--space-6) 0 0; font-size: 20px; font-weight: 600; }
.reframe { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
@media (min-width: 760px) { .reframe { grid-template-columns: 1fr auto 1fr; gap: var(--space-5); align-items: stretch; } .reframe .reframe-arrow { align-self: center; width: 148px; height: 64px; padding: 0 22px 0 0; clip-path: polygon(0 22%, 70% 22%, 70% 0, 100% 50%, 70% 100%, 70% 78%, 0 78%); } }
.reframe-note { margin: var(--space-5) 0 0; font-size: clamp(18px, 2.7vw, 32.5px); line-height: 1.3; font-weight: 600; }
.reframe-card { border-radius: var(--radius-md); padding: var(--space-5); }
.reframe-card p { margin: 0; }
.reframe-q { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; }
.reframe-ask { border: 1px solid var(--hairline); }
.reframe-better { background: var(--green); color: var(--paper); }
/* "becomes" sits on an arrow: pointing down when the cards stack, right when they sit in a row. */
.reframe-arrow { margin: 0; justify-self: center; display: flex; align-items: center; justify-content: center; background: var(--blue); color: var(--paper); font-weight: 700; font-size: 16px;
  width: 176px; height: 76px; padding-bottom: 20px; clip-path: polygon(22% 0, 78% 0, 78% 62%, 100% 62%, 50% 100%, 0 62%, 22% 62%); }

/* Dark ground, for a book whose cover is black. */
.on-dark { background: var(--night); color: var(--paper); }
.on-dark a:not(.btn) { color: var(--paper); }

/* Book feature (home) and book hero (book page) share this grid. */
.book-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 760px) { .book-grid { grid-template-columns: minmax(220px, 340px) 1fr; gap: var(--space-8); } }
.book-grid.flip > .cover-shot { order: -1; }
@media (min-width: 760px) { .book-grid.flip { grid-template-columns: 1fr minmax(240px, 380px); } .book-grid.flip > .cover-shot { order: 2; } }
.cover-shot { margin: 0; max-width: 340px; width: 100%; justify-self: center; }
.cover-shot img { width: 100%; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 24px 48px rgba(0, 0, 0, 0.35); }
.about-topic { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 24px; line-height: 1.2; margin: 0 0 var(--space-1); }
.subtitle { font-size: 20px; line-height: 1.4; font-weight: 700; margin: var(--space-4) 0 var(--space-4); max-width: 26em; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); padding: 0; margin: var(--space-5) 0 0; font-size: 15px; font-weight: 600; }
.facts li::before { content: "?"; font-family: var(--font-display); font-weight: 900; color: var(--accent); margin-right: var(--space-2); }

/* Coming-soon covers drawn in CSS from the cover rules: blue band, topic, accent stripe, quarter-circle badge. */
.shelf { display: grid; gap: var(--space-6); margin-top: var(--space-7); }
@media (min-width: 760px) { .shelf { grid-template-columns: 1fr 1fr; } }
.soon { display: grid; grid-template-columns: 128px 1fr; gap: var(--space-5); align-items: start; border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: var(--space-5); }
.soon h3 { margin: var(--space-2) 0; }
.soon p { margin: 0; font-size: 16px; }
.mini-cover { position: relative; width: 128px; aspect-ratio: 1600 / 2560; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-sm); overflow: hidden; }
.mini-cover .mc-band { background: var(--blue); color: var(--paper); height: 19%; padding: 7px 8px 0; font-family: var(--font-display); font-weight: 900; font-size: 13px; line-height: 1; }
.mini-cover .mc-band i { display: block; font-weight: 400; font-size: 9px; margin-top: 3px; }
.mini-cover .mc-topic { padding: 8px; font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 0.9; letter-spacing: -0.02em; }
.mini-cover .mc-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 5%; background: var(--accent); }
.mini-cover .mc-badge { position: absolute; right: -40px; bottom: -40px; width: 80px; height: 80px; border-radius: 50%; background: var(--accent); }
.mini-cover .mc-badge::after { content: "?"; position: absolute; left: 16px; top: 4px; color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; }

/* Format list */
.format { display: grid; gap: var(--space-6); list-style: none; padding: 0; margin: 0; counter-reset: fmt; }
@media (min-width: 760px) { .format { grid-template-columns: 1fr 1fr; gap: var(--space-7) var(--space-8); } }
.format li { border-top: 4px solid var(--blue); padding-top: var(--space-4); }
.format li:nth-child(even) { border-top-color: var(--green); }
.format h3 { margin-bottom: var(--space-2); }
.format p { margin: 0; }

.tint { background: #f3f6f9; }

/* Suggestion form */
.form { display: grid; gap: var(--space-5); max-width: 560px; }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 600; font-size: 16px; }
.field .help { font-size: 15px; margin: 0; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid #6b7280; border-radius: var(--radius-sm);
  padding: var(--space-3); min-height: 48px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; margin: 0; min-height: 1.6em; }
.form-status[data-state="ok"] { color: var(--green); }
.form-status[data-state="error"] { color: var(--danger); }

/* Book page */
.inside { display: grid; gap: var(--space-5); list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .inside { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-8); } }
.inside li { padding-left: var(--space-5); border-left: 4px solid var(--accent); }
.inside strong { display: block; font-family: var(--font-display); font-size: 20px; line-height: 1.25; font-weight: 700; margin-bottom: var(--space-1); }

.sample { border: 1px solid var(--hairline); border-top: 8px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-5); background: var(--paper); }
@media (min-width: 760px) { .sample { padding: var(--space-7); } }
.sample h3 { font-size: clamp(24px, 4vw, 32px); margin-bottom: var(--space-4); }
.sample .better { background: #f3f6f9; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); }
.sample .next { border-top: 1px solid var(--hairline); margin-top: var(--space-5); padding-top: var(--space-4); font-size: 16px; }
.sample .next p { margin: 0 0 var(--space-2); }
.sample .sources { font-size: 15px; margin: var(--space-4) 0 0; }

.chapters { display: grid; gap: var(--space-2); }
.chapters details { border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.chapters summary {
  cursor: pointer; list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4);
  align-items: center; padding: var(--space-3) var(--space-4); min-height: 56px;
}
.chapters summary::-webkit-details-marker { display: none; }
.chapters .ch-num { font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--accent); min-width: 1.4em; }
.chapters .ch-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.25; }
.chapters .ch-count { font-size: 15px; font-weight: 600; white-space: nowrap; }
.chapters .ch-count::after { content: " +"; font-weight: 700; }
.chapters details[open] .ch-count::after { content: " -"; }
.chapters ol { margin: 0; padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 2.6em); font-size: 16px; }
.chapters li { margin-bottom: var(--space-1); }
@media (hover: hover) and (pointer: fine) { .chapters summary:hover { background: #f3f6f9; } }

.closing { text-align: center; }
.closing .cta-row { justify-content: center; }
.closing .cover-shot { max-width: 180px; margin: 0 auto var(--space-5); }
.disclaimer { font-size: 15px; font-style: italic; max-width: 46em; margin: var(--space-6) 0 0; opacity: 0.85; }

.footer { background: var(--night); color: var(--paper); padding: var(--space-7) 0; font-size: 15px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.footer .wrap { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.footer a { color: var(--paper); }
.footer p { margin: 0 0 var(--space-2); max-width: 44em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.footer li a { display: inline-flex; min-height: 44px; align-items: center; }

@media (max-width: 520px) {
  .soon { grid-template-columns: 96px 1fr; gap: var(--space-4); padding: var(--space-4); }
  .soon h3 { font-size: 20px; }
  .mini-cover { width: 96px; }
  .mini-cover .mc-band { font-size: 10px; padding: 5px 6px 0; }
  .mini-cover .mc-band i { font-size: 7px; }
  .mini-cover .mc-topic { font-size: 16px; padding: 6px; }
}

/* Coming-soon cards with real covers */
.soon-cover { width: 128px; height: auto; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--hairline); }
@media (max-width: 520px) { .soon-cover { width: 96px; } }

/* Books menu in the header */
.menu { position: relative; display: inline-flex; }
.menu-btn {
  font: inherit; font-size: 16px; font-weight: 600; color: var(--paper); background: transparent; border: 0; cursor: pointer;
  padding: 0 var(--space-3); min-height: 44px; display: inline-flex; align-items: center; gap: var(--space-2); border-radius: var(--radius-sm);
}
.menu-btn::after { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; }
.menu-list {
  position: absolute; top: 100%; left: 0; z-index: 20; min-width: 260px; margin: 0; padding: var(--space-2); list-style: none;
  background: var(--paper); color: var(--ink); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--hairline), 0 16px 32px rgba(0, 0, 0, 0.2);
  opacity: 0; visibility: hidden; transform: scale(0.95); transform-origin: top left;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s linear 150ms;
}
.menu.open .menu-list, .menu:focus-within .menu-list {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s;
}
.menu-list a, .menu-list span { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.nav .menu-list a { color: var(--blue); min-height: 44px; align-items: flex-start; }
.menu-list span { color: var(--ink); opacity: 0.75; }
.menu-list small { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) {
  .menu:hover .menu-list { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s; }
  .menu-btn:hover { background: rgba(255, 255, 255, 0.16); }
  .nav .menu-list a:hover { background: #f3f6f9; }
}
@media (prefers-reduced-motion: reduce) { .menu-list { transform: none; } }

/* Process page */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--space-5); }
.steps li { counter-increment: step; position: relative; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-8) + var(--space-4)); }
.steps li::before { content: counter(step); position: absolute; left: var(--space-5); top: var(--space-4); font-family: var(--font-display); font-weight: 900; font-size: 48px; line-height: 1; color: var(--blue); }
.steps li:nth-child(even)::before { color: var(--green); }
.steps h3 { margin-bottom: var(--space-2); }
.steps .gate { font-size: 16px; margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--hairline); }
@media (max-width: 520px) { .steps li { padding: var(--space-4); padding-top: calc(var(--space-8) + var(--space-2)); } .steps li::before { left: var(--space-4); } }
.plain { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: grid; gap: var(--space-4); }
.plain li { padding-left: var(--space-5); border-left: 4px solid var(--green); }
