:root{box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

/* Built on the NurtureLog Design System: colours, type, spacing, radius and shadows are its tokens (ds/tokens.css),
   components and their classes come from ds/bundle.css and ds/bundle.js.
   Layout concept: the home page is one day in the log, hour by hour. Each section is stamped with its time and
   wears the theme or category wash of that hour: Nightlight at 03:12 and 22:00, Day in between. */
:root { --gut: clamp(16px, 4vw, 40px); --max: 1160px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; }
a { color: var(--tide); }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* type, from tokens.json: display / title-lg / title-md in Fraunces SOFT 100; the rest in Lexend */
.t-display, .t-title, .t-title-md { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 500; margin: 0; text-wrap: balance; }
.t-display { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.1; letter-spacing: -0.01em; }
.t-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; }
.t-title-md { font-size: 20px; line-height: 26px; }
.t-headline { font-size: 17px; line-height: 24px; font-weight: 500; }
.t-body-lg { font-size: 16px; line-height: 24px; color: var(--ink-muted); max-width: 36em; }
.t-metric-lg { font-size: 30px; line-height: 36px; font-weight: 400; font-variant-numeric: tabular-nums; }
.t-caption { font-size: 12.5px; line-height: 18px; color: var(--ink-muted); }
p { margin: 0; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; flex-wrap: wrap; padding-block: var(--space-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex-shrink: 0; }
.brand .w { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 500; font-size: 22px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { white-space: nowrap; text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); padding: 8px 14px; border-radius: var(--radius-pill); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--tide-soft); color: var(--tide-strong); }
@media (max-width: 760px) { .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; } .top .nl-btn { margin-left: auto; } }

/* home: hour entries */
.hour { padding-block: clamp(48px, 8vw, 96px); background: var(--surface); color: var(--ink); }
.hour.raised { background: var(--surface-raised); }
.hour.wash { background: var(--cat-soft); }
.hour .wrap { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--space-6) var(--space-8); }
.stamp { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.stamp .t-metric-lg { color: var(--cat, var(--tide)); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8) 48px; align-items: center; }
.copy-col { display: flex; flex-direction: column; gap: var(--space-4); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); max-width: 36em; }
.points li { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: var(--space-3); font-size: 15px; line-height: 22px; }
.points li .nl-icon { color: var(--cat, var(--tide)); margin-top: 1px; }
.stores { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stores .nl-btn { flex-direction: column; align-items: flex-start; gap: 0; min-height: 56px; padding: 6px var(--space-5); line-height: 18px; }
.stores .nl-btn small { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.visual { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.phone-zoom { zoom: .82; display: flex; justify-content: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.sources { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); border-top: 1px solid var(--line); padding-top: var(--space-4); grid-column: 2; }
.sources div { display: flex; flex-direction: column; gap: 4px; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--space-5); }
.island { min-width: 0; }
@media (max-width: 900px) { .entry { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .hour .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } .stamp { flex-direction: row; align-items: baseline; gap: var(--space-3); } .sources { grid-column: 1; } .phone-zoom { zoom: .9; } .grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 400px) { .phone-zoom { zoom: .84; } }

/* motion, following the design system: quiet, 150–250ms ease-out, nothing that spins or bounces */
.hourclock { font-size: 12.5px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); transition: opacity .15s ease-out, transform .15s ease-out; }
.hourclock.is-turning { opacity: 0; transform: translateY(-3px); }
.hour .visual { transition: transform .25s ease-out; }
.hour:not(.is-seen) .visual { transform: translateY(8px); }
.hero-logo { animation: none; }
@media (prefers-reduced-motion: reduce) { .hourclock, .hour .visual { transition: none; } .hour:not(.is-seen) .visual { transform: none; } }
@media (max-width: 760px) { .hourclock { display: none; } }

/* inner pages */
.page-head { padding-block: clamp(40px, 6vw, 72px) var(--space-6); border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.page-head .wrap { display: flex; flex-direction: column; gap: var(--space-3); }
.body { padding-block: var(--space-8) 80px; }
.cols { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 48px; }
.toc { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.toc a { text-decoration: none; color: var(--ink-muted); font-size: 14px; line-height: 20px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-md); }
.toc a:hover { background: var(--surface-sunken); color: var(--ink); }
@media (max-width: 820px) { .cols { grid-template-columns: minmax(0,1fr); gap: var(--space-5); } .toc { position: static; flex-direction: row; flex-wrap: wrap; } }
.prose { max-width: 68ch; }
.prose .t-body-lg { color: var(--ink); max-width: none; }
.prose h2 { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 500; font-size: 26px; line-height: 32px; margin: 40px 0 12px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; line-height: 24px; font-weight: 500; margin: 20px 0 6px; }
.prose p, .prose li { font-size: 16px; line-height: 24px; }
.prose p + p { margin-top: var(--space-3); }
.prose ul { padding-left: 20px; display: grid; gap: 6px; margin: var(--space-3) 0; }
.prose strong { font-weight: 500; }
.prose code, .mono { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-weight: 500; }
.legal-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; font-size: 12.5px; color: var(--ink-muted); }
.draft { display: inline-flex; padding: 4px 8px; border-radius: var(--radius-pill); background: var(--attention-soft); color: var(--attention); font-weight: 500; }
details.q { border-top: 1px solid var(--line); }
details.q:last-of-type { border-bottom: 1px solid var(--line); }
details.q summary { list-style: none; cursor: pointer; padding: var(--space-4) 40px var(--space-4) 0; position: relative; font-size: 17px; line-height: 24px; font-weight: 500; min-height: var(--size-touch); }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: ""; position: absolute; right: 8px; top: 22px; width: 10px; height: 10px; border-right: 2px solid var(--tide); border-bottom: 2px solid var(--tide); transform: rotate(45deg); transition: transform .2s; }
details.q[open] summary::after { transform: rotate(-135deg); top: 27px; }
details.q .a { padding: 0 0 var(--space-5); color: var(--ink-muted); display: grid; gap: var(--space-3); }
.emerg { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.emerg div { background: var(--urgent-soft); color: var(--ink); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: 4px; }
.emerg b { font-size: 30px; line-height: 36px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--urgent); }
.emerg span { font-size: 13px; line-height: 18px; }
@media (max-width: 720px) { .emerg { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.fgroup { padding-block: var(--space-8); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 260px minmax(0,1fr); gap: var(--space-6) 40px; }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup .gd { color: var(--ink-muted); margin-top: var(--space-2); }
.flist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-5) 40px; }
.fitem { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
@media (max-width: 820px) { .fgroup { grid-template-columns: minmax(0,1fr); } .flist { grid-template-columns: minmax(0,1fr); } }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 56px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0,1fr); gap: var(--space-8); } }
.tablewrap { overflow-x: auto; }
.copyrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.copyrow code { font-family: var(--font-sans); flex: 1 1 200px; min-width: 0; font-size: 17px; font-weight: 500; user-select: all; overflow-wrap: anywhere; }

/* footer, in the Nightlight theme */
.foot { background: var(--surface); color: var(--ink); padding-block: 56px 40px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0,1.3fr) repeat(3, minmax(0,1fr)); gap: var(--space-8); }
.foot ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); font-size: 14.5px; }
.foot a:not(.nl-btn) { color: var(--ink); text-decoration: none; }
a.nl-btn { text-decoration: none; }
.foot a:hover { color: var(--tide); }
.foot-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); justify-content: space-between; }
@media (max-width: 820px) { .foot .wrap { grid-template-columns: repeat(2, minmax(0,1fr)); } .foot .wrap > div:first-child { grid-column: 1 / -1; } }

/* skip link: hidden until focused */
a.sr:focus { position: fixed; left: 16px; top: 12px; z-index: 50; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--tide); color: var(--on-tide); text-decoration: none; }

/* official store badges, shown as "coming soon" until the app is live */
.badges { display: flex; flex-direction: column; gap: var(--space-2); }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.store-badge { display: inline-flex; border-radius: 9px; }
.store-badge img { display: block; height: 45px; width: auto; }
