/* Nobody Warned Me. The book's palette as whole fields of colour, one per section:
   coral (the cover), paper (reading), teal (the book), yellow (the sticky note, the toolkit), ink (the close).
   Two faces: Literata for headlines and reading, Source Sans 3 for the small practical bits.
   No labels above headings, no numbering, no hairlines: space and colour do that work. */
@font-face { font-family: Literata; src: url(/fonts/Literata.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: Literata; src: url(/fonts/Literata-Italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/fonts/SourceSans3.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --coral: #F26B4F; --coral-ink: #A8361F; --teal: #0D6670; --teal-deep: #0A4C54;
  --yellow: #FFD34E; --paper: #FFF8EE; --paper-2: #F7EBDB; --ink: #1C2F33; --ink-soft: #4A5C60;
  --serif: Literata, Georgia, serif; --sans: "Source Sans 3", system-ui, sans-serif;
  --gap: clamp(5rem, 11vw, 9rem);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.1875rem/1.6 var(--serif); }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-deep); text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }
.narrow { max-width: 44rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--yellow); color: var(--ink); padding: .5rem 1rem; z-index: 9; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Bar */
.bar { background: var(--paper); }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.wordmark { font: 800 1.3rem/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.bar nav { display: flex; gap: 1.6rem; font: 600 1.05rem var(--sans); }
.bar nav a { color: var(--ink); text-decoration: none; }
.bar nav a:hover { color: var(--teal); text-decoration: underline; }

/* Type: one very large size, one reading size, one small size */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.3rem, 5.5vw, 3.6rem); line-height: 1.02; margin: 0 0 1rem; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; margin: 3rem 0 .9rem; }
h3 { font-weight: 700; font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 .5rem; }
.lede { font-size: clamp(1.25rem, 2vw, 1.45rem); line-height: 1.45; color: var(--ink-soft); margin: 0 0 1.25rem; max-width: 38rem; }
.meta, .crumbs { font: 600 1rem var(--sans); color: var(--ink-soft); }
.crumbs { margin: 0 0 1.25rem; }
.crumbs a { color: var(--ink-soft); }
.page-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

/* Buttons: flat, square, one fill each */
.btn { display: inline-block; font: 700 1.1rem/1 var(--sans); padding: 1.05rem 1.5rem; background: var(--teal); color: var(--paper); text-decoration: none; border-radius: 2px; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { color: var(--paper); background: var(--teal-deep); transform: translateY(-2px); text-decoration: none; }
.btn-ink { background: var(--ink); }
.btn-ink:hover { background: #000; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #FFE07F; color: var(--ink); }
.btn-off { background: var(--paper-2); color: var(--ink-soft); cursor: default; }
.btn-off:hover { background: var(--paper-2); color: var(--ink-soft); transform: none; }
.text-link { font: 600 1.05rem var(--sans); color: inherit; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* Hero: the cover, opened up. Headline, one note, one button, the book. */
.hero { background: var(--coral); color: var(--paper); padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { color: var(--paper); font-size: clamp(3.4rem, 9vw, 7.5rem); line-height: .92; letter-spacing: -0.04em; margin: 0 0 2rem; max-width: 13ch; }
.note { display: inline-block; max-width: 26rem; background: var(--yellow); color: var(--ink); font: 700 clamp(1.25rem, 2vw, 1.5rem)/1.3 var(--sans); padding: 1.2rem 1.4rem 1.3rem; transform: rotate(-2deg); margin: 0 0 2.25rem; }
.object { box-shadow: 0 22px 40px -12px rgba(70, 20, 5, .45); }
.hero-cover { width: clamp(220px, 26vw, 330px); transform: rotate(2.5deg); }

/* Bands */
.band { padding: var(--gap) 0; }
.band-title { margin-top: 0; font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 16ch; }
.band-teal { background: var(--teal); color: var(--paper); }
.band-teal a { color: var(--paper); }
.band-yellow { background: var(--yellow); color: var(--ink); }
.band-yellow a { color: var(--ink); }
.band a.btn-ink, .band a.btn-ink:hover { color: var(--paper); }
.band a.btn-yellow, .band a.btn-yellow:hover { color: var(--ink); }

/* Topics on the home page: four columns of plain links, no boxes */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 2.25rem; margin-top: 2.5rem; }
.topic h3 { margin: 0 0 .9rem; font-size: 1.5rem; }
.topic h3 a { color: var(--coral-ink); text-decoration: none; }
.topic h3 a:hover { text-decoration: underline; }
.topic ul { list-style: none; padding: 0; margin: 0; }
.topic li { margin: 0 0 .85rem; font: 500 1.08rem/1.35 var(--sans); }
.topic li a { color: var(--ink); text-decoration-color: rgba(28, 47, 51, .35); }
.topic li a:hover { color: var(--teal); text-decoration-color: currentColor; }

/* Book band */
.buy-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.buy img { width: clamp(150px, 18vw, 220px); transform: rotate(-2deg); }
.buy h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 14ch; }
.buy p { font-size: 1.2rem; max-width: 34rem; margin: 0 0 1.75rem; }

/* Toolkit band */
.kit-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.kit h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 16ch; }
.kit p { font-size: 1.2rem; margin: 0 0 1.75rem; }
.kit-hero { padding: clamp(3rem, 7vw, 5rem) 0; }
.kit-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.price-line { font: 500 1.15rem/1.5 var(--sans); }
.price { font: 800 2.4rem/1 var(--serif); margin-right: .5rem; vertical-align: -0.12em; }
.kit-preview { margin-top: 3rem; margin-bottom: 1rem; }
.inside dt { font-weight: 700; margin-top: 1.1rem; }
.inside dd { margin: .2rem 0 0; color: var(--ink-soft); font-family: var(--sans); font-size: 1.1rem; }

/* Lists of guides: title over description, space between, no rules */
.entries { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.entries li { margin: 0 0 1.6rem; }
.entries a { display: block; text-decoration: none; color: var(--ink); }
.entries .e-title { display: block; font: 700 1.3rem/1.3 var(--serif); color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.entries a:hover .e-title { text-decoration-thickness: 2px; color: var(--teal-deep); }
.entries .e-desc { display: block; margin-top: .3rem; font: 400 1.08rem/1.45 var(--sans); color: var(--ink-soft); max-width: 40rem; }
.group { margin-top: 3rem; max-width: 52rem; margin-left: auto; margin-right: auto; }
.group h2 a { color: var(--ink); text-decoration: none; }
.group h2 a:hover { color: var(--teal); text-decoration: underline; }
.more-topics { margin-top: 3.5rem; margin-bottom: var(--gap); }
.more-topics h2 { font-size: 1.4rem; margin-bottom: .75rem; }
.more-topics p { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font: 600 1.15rem var(--sans); }

/* Guide */
.guide { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--gap); }
.prose p, .prose li { max-width: 40rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--coral-ink); }
.prose h2 { scroll-margin-top: 1rem; }
.prose table { border-collapse: collapse; width: 100%; font: 400 1.02rem/1.45 var(--sans); margin: 1.75rem 0; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; vertical-align: top; }
.prose th { font-weight: 700; background: var(--paper-2); }
.prose tr:nth-child(even) td { background: #FCF2E4; }
.prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--paper-2); color: var(--ink-soft); }

/* The one-minute version: the sticky note, the book's signature */
.short { background: var(--yellow); color: var(--ink); padding: 1.4rem 1.6rem .9rem; margin: 2rem 0 2.25rem; transform: rotate(-.6deg); font-family: var(--sans); font-size: 1.15rem; line-height: 1.5; }
.short-title, .toc-title { font: 800 1.25rem/1.2 var(--serif); margin: 0 0 .6rem; }
.short ul { padding-left: 1.2rem; margin: 0 0 .5rem; }
.short li { margin-bottom: .5rem; }
.toc { background: var(--paper-2); padding: 1.3rem 1.6rem 1rem; margin: 0 0 2.5rem; font-family: var(--sans); font-size: 1.08rem; }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .55rem; break-inside: avoid; }

/* Callouts: a field of tone with its name in plain words, like the book's boxes */
.box { margin: 1.75rem 0; padding: 1.15rem 1.4rem; background: var(--paper-2); font-family: var(--sans); font-size: 1.1rem; }
.box p { margin: .35rem 0; }
.box-label { font: 800 1.05rem/1.2 var(--serif); margin: 0 0 .35rem; color: var(--teal-deep); }
.box-say { background: #E3F0EE; }
.box-say p:not(.box-label) { font: 500 italic 1.22rem/1.45 var(--serif); }
.box-try { background: #FFF1C2; } .box-try .box-label { color: #7A5A00; }
.box-warn, .box-avoid { background: #FCE3DC; } .box-warn .box-label, .box-avoid .box-label { color: var(--coral-ink); }

.sources { margin-top: 3.5rem; font: 400 1rem/1.5 var(--sans); color: var(--ink-soft); }
.sources h2, .related h2 { font-size: 1.4rem; margin: 0 0 .75rem; color: var(--ink); }
.sources ul { padding-left: 1.1rem; }
.sources li { margin-bottom: .4rem; }
.related { margin-top: 3rem; }

/* Close */
.close { background: var(--ink); color: #DCE6E5; padding: clamp(3.5rem, 8vw, 6rem) 0 2.5rem; }
.close a { color: var(--paper); }
.close-lead { font: 700 clamp(1.4rem, 2.8vw, 2rem)/1.35 var(--serif); color: var(--paper); max-width: 46rem; margin: 0 0 3rem; letter-spacing: -0.01em; }
.close-lead a { color: var(--yellow); text-decoration-thickness: 2px; }
.close-row { display: flex; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; font: 400 1rem/1.5 var(--sans); }
.close-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; }
.close-fine { margin: 0; color: #A9BDBB; max-width: 28rem; }

/* Gentle entrance for the hero and bands; nothing moves for people who ask it not to */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .note, .hero .btn, .hero-cover { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .note { animation-delay: .08s; }
  .hero .btn { animation-delay: .16s; }
  .hero-cover { animation-name: rise-tilt; animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
  @keyframes rise-tilt { from { opacity: 0; transform: translateY(28px) rotate(5deg); } }
}

@media (max-width: 1000px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .kit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 1.125rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cover { display: none; }
  h1 { font-size: 2.05rem; }
  .hero h1 { font-size: 3.4rem; }
  .hero { padding: 2.5rem 0 3rem; }
  .topic-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .buy-grid { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
  .bar nav { gap: 1.1rem; }
}
