/* Quiet Hours · free guides. Self-contained; same tokens and header as the kit pages (kits/kit.css). */

:root {
  --night: #0B1020; --night-2: #131A2E; --night-ink: #ECE6D8; --night-soft: #A9B0C4;
  --paper: #F6F1E7; --paper-2: #EDE6D8; --card: #FBF8F2;
  --ink: #1B2233; --soft: #4B5266; --line: rgba(27,34,51,.12);
  --amber: #E0A341; --amber-hi: #ECB45A; --amber-deep: #8F5A0E;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem); --max: 72rem; --bar-h: 4rem;
  --r-sm: 8px; --r: 14px; --r-lg: 22px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --shadow-card: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px -18px rgba(27,34,51,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1.25rem); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
::selection { background: #F4DFB8; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .7rem 1.35rem; border-radius: 999px; border: 0;
  background: var(--amber); color: var(--ink); font: 600 .95rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(224,163,65,.7), inset 0 1px 0 rgba(255,255,255,.35); transition: background-color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: var(--amber-hi); }
.btn:active { transform: scale(.97); }

/* ---------- header (as on the kit pages) ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h); color: var(--night-ink);
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); }
.bar::before { content: ""; position: absolute; inset: 0 0 -1.5rem; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,16,32,.85), transparent); transition: opacity .3s var(--ease); }
.bar.is-solid { background: rgba(246,241,231,.94); color: var(--ink); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar.is-solid::before { opacity: 0; }
.bar__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 600 1.15rem/1 var(--serif); text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; }
.brand .mark-dark, .bar.is-solid .brand .mark-light { display: none; }
.bar.is-solid .brand .mark-dark { display: block; }
.bar nav { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.6rem); font-size: .9rem; white-space: nowrap; }
.bar nav a:not(.btn) { text-decoration: none; opacity: .8; }
.bar nav a:not(.btn):hover { opacity: 1; }
.bar .btn { min-height: 2.35rem; padding: .5rem 1.05rem; font-size: .85rem; box-shadow: none; }
@media (max-width: 430px) {
  .bar__in { gap: .5rem; } .bar nav { gap: .7rem; font-size: .85rem; }
  .brand { gap: .45rem; font-size: 1.05rem; } .brand img { width: 24px; height: 24px; }
  .bar .btn { padding: .5rem .8rem; font-size: .8rem; }
  .bar nav .hide-sm { display: none; }
}
@media (max-width: 350px) { .bar nav a:not(.btn) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--night-ink);
  padding: calc(var(--bar-h) + clamp(2.25rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; opacity: .5; }
.hero__bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11,16,32,.97) 0%, rgba(11,16,32,.88) 48%, rgba(11,16,32,.45) 100%), linear-gradient(to top, rgba(11,16,32,.92), transparent 45%); }
/* article hero sits on the same grid as the article below it, so the title lines up with the text */
.hero:not(.hero--index) .hero__in { display: grid; grid-template-columns: minmax(0, 46rem); justify-content: center; gap: 0 3.5rem; }
.hero:not(.hero--index) .hero__in > * { grid-column: 1; }
@media (min-width: 1100px) {
  .hero:not(.hero--index) .hero__in { grid-template-columns: 14rem minmax(0, 44rem); }
  .hero:not(.hero--index) .hero__in > * { grid-column: 2; }
}
.crumbs { display: flex; gap: .55rem; align-items: center; font: 500 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: 1.1rem; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs span { opacity: .5; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; max-width: 18ch; }
.hero--index h1 { max-width: none; }
.hero__lede { margin-top: 1.1rem; font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.5; color: #D5D8E2; max-width: 38rem; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin-top: 1.6rem; font-size: .85rem; color: var(--night-soft); }
.hero__meta span { padding: .35rem .75rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(236,230,216,.2); }
.print { font: 500 .85rem/1 var(--sans); color: var(--night-ink); background: transparent; border: 0; padding: .45rem .8rem; border-radius: 999px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(236,230,216,.45); }
.print:hover { background: rgba(236,230,216,.1); }

/* ---------- article layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 46rem); justify-content: center; gap: 0 3.5rem; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.toc { margin-bottom: 2rem; padding: 1rem 1.2rem; border-radius: var(--r); background: var(--paper-2); font-size: .92rem; }
.toc p { font: 600 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: .6rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.toc a { display: block; padding: .28rem 0; text-decoration: none; color: var(--soft); line-height: 1.35; }
.toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1100px) {
  .layout { grid-template-columns: 14rem minmax(0, 44rem); }
  .toc { position: sticky; top: calc(var(--bar-h) + 1.5rem); align-self: start; margin: .4rem 0 0; padding: 0 0 0 1rem; background: none; border-radius: 0; border-left: 1px solid var(--line); }
}

.prose > p { color: #2C3348; margin: 0 0 1.15rem; }
.prose > p:first-child { font-size: 1.22rem; line-height: 1.55; color: var(--ink); }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.85rem); line-height: 1.2; margin: 2.8rem 0 .9rem; }
.prose a { color: var(--amber-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a.btn { color: var(--ink); text-decoration: none; }
.prose ul:not(.checks) { margin: 0 0 1.15rem; padding-left: 1.2rem; }
.prose ul:not(.checks) li { margin: .45rem 0; color: #2C3348; }
.prose ul:not(.checks) li::marker { color: var(--amber); }
.prose strong { color: var(--ink); }
.small { font-size: .9rem; color: var(--soft) !important; margin-top: 2.5rem !important; }

/* tick-box lists: they look and work like the worksheet */
.checks { list-style: none; margin: 1.2rem 0 1.6rem; padding: .3rem 1.1rem; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line); counter-reset: n; }
.checks li { border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks label { display: grid; grid-template-columns: 1.5rem 1fr; gap: .8rem; align-items: start; padding: .85rem 0; cursor: pointer; color: #2C3348; }
.checks input { appearance: none; -webkit-appearance: none; width: 1.3rem; height: 1.3rem; margin: .2rem 0 0; border-radius: 6px; background: #fff;
  box-shadow: inset 0 0 0 1.5px #B9B2A2; cursor: pointer; display: grid; place-content: center; transition: background-color .15s var(--ease), box-shadow .15s var(--ease); }
.checks input::after { content: ""; width: .7rem; height: .4rem; border: solid var(--night); border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .15s var(--ease); }
.checks input:checked { background: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.checks input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.checks input:checked + span { color: var(--soft); }
ul.checks { column-gap: 2rem; }
@media (min-width: 620px) { ul.checks { columns: 2; padding-block: .6rem; } ul.checks li { break-inside: avoid; border-bottom: 0; } ul.checks label { padding: .4rem 0; } }

/* notes and "say this" cards */
.note { margin: 1.6rem 0; padding: 1.05rem 1.2rem; border-radius: var(--r); background: var(--paper-2); color: #2C3348; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.say { position: relative; margin: 1.6rem 0; padding: 1.15rem 1.3rem 1.2rem 1.5rem; border-radius: 4px var(--r) var(--r) var(--r); background: var(--night); color: var(--night-ink); }
.say::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; background: var(--amber); }
.say__k { display: block; font: 600 .72rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--amber); margin-bottom: .55rem; }
.say p { font: 400 1.18rem/1.5 var(--serif); letter-spacing: -.01em; color: var(--night-ink); }

/* kit cards */
.mid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; margin: 2.6rem 0 0; padding: 1rem 1.2rem;
  border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(143,90,14,.35); background: rgba(224,163,65,.1); font-size: .96rem; }
.mid p { color: #2C3348; flex: 1 1 18rem; }
.mid a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--amber-deep); text-decoration: none; white-space: nowrap; }
.mid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mid svg, .gcard__go svg { width: 1em; height: 1em; }
.cta { display: grid; grid-template-columns: 150px 1fr; gap: 1.6rem; align-items: center; margin: 3rem 0 0; padding: 1.6rem; border-radius: var(--r-lg); background: var(--night); color: var(--night-ink); }
.cta img { width: 150px; border-radius: 8px; box-shadow: 0 18px 36px -16px rgba(0,0,0,.7); }
.cta h2 { margin: .35rem 0 .55rem; font-size: 1.45rem; line-height: 1.2; color: var(--night-ink); }
.cta p { color: #C9CEDC; font-size: .96rem; margin: 0 0 1rem; }
.cta__k { font: 600 .72rem/1 var(--sans) !important; letter-spacing: .09em; text-transform: uppercase; color: var(--amber) !important; margin: 0 !important; }
.cta__a { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.1rem; margin: 0 !important; }
.cta__alt { color: var(--amber) !important; font-size: .9rem; }
@media (max-width: 560px) { .cta { grid-template-columns: 1fr; padding: 1.25rem; } .cta img { width: 110px; } }

.sources { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .92rem; }
.sources h2 { font: 600 1rem/1.3 var(--sans); letter-spacing: 0; margin: 0 0 .4rem; }
.sources p { color: var(--soft); margin: 0 0 .6rem; }
.sources ul { margin: 0; padding-left: 1.1rem; } .sources li { margin: .35rem 0; color: var(--soft); }

/* ---------- guide cards (index + "more guides") ---------- */
.gcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.gcard { display: flex; flex-direction: column; gap: .55rem; height: 100%; padding: 1.4rem 1.4rem 1.25rem; border-radius: var(--r-lg); background: var(--card); text-decoration: none;
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.gcard__k { font: 600 .72rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); }
.gcard strong { font: 500 1.4rem/1.2 var(--serif); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.gcard__d { color: var(--soft); font-size: .96rem; line-height: 1.55; }
.gcard__go { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .7rem; font: 600 .9rem/1 var(--sans); color: var(--amber-deep); }
.gcard__go svg { transition: transform .25s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .gcard:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 40px -22px rgba(27,34,51,.45), inset 0 0 0 1px rgba(143,90,14,.35); }
  .gcard:hover .gcard__go svg { transform: translateX(3px); }
}
.more { background: var(--paper-2); padding-block: clamp(2.5rem, 6vw, 4rem); }
.more h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.index { padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.index__h { font: 600 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 1rem; }
.strip { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.4rem; align-items: center; margin-top: 2.5rem; padding: 1.3rem 1.5rem; border-radius: var(--r-lg); background: var(--night); color: var(--night-ink); }
.strip img { width: 84px; border-radius: 6px; }
.strip p { color: #C9CEDC; font-size: .95rem; }
.strip__t { font: 500 1.3rem/1.25 var(--serif) !important; color: var(--night-ink) !important; margin: .35rem 0 .3rem !important; }
@media (max-width: 700px) { .strip { grid-template-columns: 64px 1fr; } .strip img { width: 64px; } .strip .btn { grid-column: 1 / -1; } }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--night-soft); font-size: .85rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.foot a { text-decoration: none; } .foot a:hover { color: var(--night-ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* ---------- print: the guide as a clean checklist ---------- */
@media print {
  .bar, .toc, .mid, .cta, .more, .foot, .print, .hero__bg, .qh-consent { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap { padding-inline: 0; max-width: none; }
  .hero:not(.hero--index) .hero__in { display: block; }
  .prose::after { content: "From quiethoursbooks.com/guides"; display: block; margin-top: 1.5rem; font-size: 9pt; color: #555; }
  .hero { background: none; color: #000; padding: .5rem 0 1rem; }
  .hero h1 { font-size: 24pt; max-width: none; } .hero__lede, .hero__meta, .crumbs { color: #333; }
  .hero__meta span { box-shadow: none; padding: 0 .8rem 0 0; }
  .layout { display: block; padding: 0; }
  .say { background: none; color: #000; box-shadow: inset 0 0 0 1px #999; } .say p { color: #000; } .say__k { color: #555; }
  .checks { box-shadow: inset 0 0 0 1px #999; background: none; } .checks input { box-shadow: inset 0 0 0 1.5px #555; }
  .note { background: none; box-shadow: inset 0 0 0 1px #999; }
  h2, .say, .checks li { break-inside: avoid; } h2 { break-after: avoid; }
}
