/* Doselane — "Tide": sand, ink, tide green and one sun yellow for the shot day. Serif titles.
   One stylesheet for the landing page, the legal pages and the Guides. System fonts only.
   Theme: data-theme on <html> ("light" | "dark"), set before paint from the saved choice or
   the system setting; the header toggle switches and remembers it. */
:root, :root[data-theme="light"] {
  --bg: #F3EDE2; --card: #FBF8F2; --border: #D9CFBD; --rule: #CBBFA9;
  --text: #1D2B36; --dim: #5C6670; --faint: #7D858C;
  --tide: #2F5D62; --tide-soft: #D7E1DC; --on-tide: #FBF8F2;
  --sun: #E9A23B; --sun-text: #9A5B07; --sun-soft: #F6E3C2;
  --placebo: #B9AE9B;
  --shadow: 0 18px 50px rgba(29, 43, 54, .14);
  --shadow-sm: 0 4px 14px rgba(29, 43, 54, .08);
  --measure: 700px; --wide: 1100px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1A21; --card: #18262F; --border: #2A3B47; --rule: #36495A;
    --text: #F3EDE2; --dim: #A9B6BE; --faint: #84939C;
    --tide: #8FB8B4; --tide-soft: #23383C; --on-tide: #0F1A21;
    --sun: #E9A23B; --sun-text: #F0B865; --sun-soft: #3A2C12;
    --placebo: #4E6170;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1A21; --card: #18262F; --border: #2A3B47; --rule: #36495A;
  --text: #F3EDE2; --dim: #A9B6BE; --faint: #84939C;
  --tide: #8FB8B4; --tide-soft: #23383C; --on-tide: #0F1A21;
  --sun: #E9A23B; --sun-text: #F0B865; --sun-soft: #3A2C12;
  --placebo: #4E6170;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.65; overflow-x: hidden; }
h1, h2, h3, .serif, .mark span, .ab-title { font-family: "New York", ui-serif, "Iowan Old Style", Georgia, serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tide); text-underline-offset: 2px; }
.narrow { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 9; }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- Header and footer ---------- */
.site-head { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); }
.site-head .wide { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 62px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.mark img { width: 30px; height: 30px; border-radius: 7px; }
.mark span { font-weight: 600; font-size: 19px; }
.site-nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.site-nav > a:not(.chip) { color: var(--dim); text-decoration: none; }
.site-nav > a:not(.chip):hover { color: var(--text); }
.chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.toggle { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.toggle:hover { color: var(--text); }
.toggle svg { width: 16px; height: 16px; }
.toggle .sun { display: none; }
:root[data-theme="dark"] .toggle .sun { display: block; }
:root[data-theme="dark"] .toggle .moon { display: none; }
.site-foot { margin-top: 72px; border-top: 1px solid var(--border); padding: 30px 0 56px; }
.site-foot .wide { display: flex; flex-wrap: wrap; gap: 14px 20px; justify-content: space-between; color: var(--dim); font-size: 14px; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot .tm { flex-basis: 100%; font-size: 13px; color: var(--faint); }

/* ---------- App Store button (kept for launch day; not used while the app is in review) ---------- */
.store { display: inline-flex; align-items: center; gap: 13px; padding: 12px 26px 12px 20px; border-radius: 16px; background: #FFFFFF; border: 1px solid rgba(29, 43, 54, .14); color: #1D2B36 !important; text-decoration: none; line-height: 1.1; box-shadow: 0 6px 20px rgba(29, 43, 54, .14); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; margin-top: -2px; }
.store span { display: flex; flex-direction: column; align-items: flex-start; }
.store b { font-size: 18px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; }
.store small { font-size: 12.5px; font-weight: 500; color: #5C6670; margin-top: 3px; white-space: nowrap; }

/* ---------- Email signup ---------- */
.signup { max-width: 480px; }
.signup .row { display: flex; gap: 8px; }
.signup label.lbl { display: block; font-weight: 650; font-size: 15px; margin-bottom: 8px; }
.signup input[type="email"] { flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--text); background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; }
.signup input[type="email"]::placeholder { color: var(--faint); }
.signup input[type="email"]:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: transparent; }
.signup button { font: inherit; font-weight: 650; font-size: 16px; border: 0; border-radius: 14px; padding: 12px 18px; background: var(--tide); color: var(--on-tide); cursor: pointer; white-space: nowrap; }
.signup button:hover { filter: brightness(1.08); }
.signup button[disabled] { opacity: .6; cursor: default; }
.signup .consent { font-size: 13.5px; line-height: 1.5; color: var(--dim); margin: 10px 0 0; }
.signup .msg { font-size: 15px; font-weight: 600; margin: 10px 0 0; min-height: 0; }
.signup .msg.ok { color: var(--tide); }
.signup .msg.err { color: var(--sun-text); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup.done .row, .signup.done .lbl { display: none; }

/* ---------- Landing ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tide); margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--sun-text); background: var(--sun-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); display: inline-block; }
.hero .wide { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 20px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); line-height: 1.05; letter-spacing: -.02em; font-weight: 600; margin-bottom: 18px; }
.hero .lead { font-size: 1.18rem; color: var(--dim); max-width: 32em; margin-bottom: 26px; }
.hero .meta { color: var(--dim); font-size: 14px; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .meta span { border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; }
.hero-phone { justify-self: center; width: min(310px, 78vw); }
.phone { border-radius: 42px; border: 8px solid #1D2B36; overflow: hidden; background: #1D2B36; box-shadow: var(--shadow); }
:root[data-theme="dark"] .phone { border-color: #05090C; background: #05090C; }
.phone img { width: 100%; }
.hero-phone figcaption, .shots figcaption { color: var(--faint); font-size: 13px; text-align: center; margin-top: 10px; }
.tide { display: block; width: 100%; height: 56px; margin: 0; }
.tide path { fill: none; stroke: var(--tide); stroke-width: 3; stroke-linecap: round; }
.tide path { vector-effect: non-scaling-stroke; }
.tide-wrap { position: relative; }
.tide-wrap .dot { position: absolute; left: 0; top: 33px; width: 14px; height: 14px; border-radius: 50%; background: var(--sun); }
.section { padding: 64px 0 8px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; margin-bottom: 10px; }
.section p.sub { color: var(--dim); max-width: 42em; margin-bottom: 26px; font-size: 1.06rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 20px 18px; }
.card .day { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sun-text); margin-bottom: 8px; }
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--dim); font-size: 15.5px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shots figure { margin: 0; }
.shots img { border-radius: 26px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.shots figcaption b { display: block; color: var(--text); font-size: 14.5px; font-weight: 650; }
.note-box { background: var(--tide-soft); border-radius: 14px; padding: 14px 18px; margin: 18px 0; }
.note-box p { margin: 0; }
.faq details { border-top: 1px solid var(--border); padding: 16px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--dim); margin-top: 8px; }
.band { margin-top: 72px; background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band .wide { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.band h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; line-height: 1.15; }
.band p { color: var(--dim); margin-top: 8px; }
.band + .site-foot, main:has(> .band:last-child) + .site-foot { margin-top: 0; }
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 0 0 20px; overflow: hidden; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.guide-card:hover { transform: translateY(-2px); border-color: var(--tide); }
.guide-card .thumb { display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; }
.guide-card .tag, .guide-card h3, .guide-card p { margin-left: 20px; margin-right: 20px; }
.guide-card .tag, .posts .tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--sun-text); }
.guide-card h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
.guide-card p { color: var(--dim); font-size: 15px; }
.more { margin-top: 20px; display: inline-block; font-weight: 650; text-decoration: none; }

/* ---------- Documents and articles ---------- */
.doc, .article { padding-top: 48px; }
.doc h1, .article h1 { font-size: clamp(2rem, 4.6vw, 2.75rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; margin-bottom: 14px; }
.updated, .byline { color: var(--dim); font-size: 14.5px; margin-bottom: 30px; }
.doc h2 { scroll-margin-top: 80px; font-size: 1.25rem; font-weight: 600; margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid var(--border); }
.article h2 { font-size: 1.5rem; font-weight: 600; margin: 44px 0 12px; scroll-margin-top: 80px; }
.article h3 { font-size: 1.12rem; font-weight: 600; margin: 26px 0 8px; }
.doc p, .article p { margin-bottom: 15px; }
p.lead { font-size: 1.16rem; margin-bottom: 24px; }
.article p.lead { font-size: 1.2rem; line-height: 1.55; }
.doc ul, .article ul, .article ol { margin: 0 0 16px 22px; }
.doc li, .article li { margin-bottom: 7px; }
strong { font-weight: 650; }
.nw { white-space: nowrap; }
.article table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.article th, .article td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.article th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 650; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px; margin: 10px 0 24px; }
.table-wrap tr:last-child td { border-bottom: 0; }
.hint { color: var(--dim); font-size: 14px; margin-top: -12px; }
.article td small { display: block; color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.callout { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--sun); border-radius: 14px; padding: 16px 18px; margin: 22px 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.example { background: var(--tide-soft); border-radius: 16px; padding: 18px 20px; margin: 22px 0; }
.example p:last-child { margin-bottom: 0; }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin: 0 0 30px; font-size: 15.5px; }
.toc strong { display: block; margin-bottom: 6px; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.toc ol { margin: 0 0 0 20px; }
.notice { color: var(--dim); font-size: 14.5px; border-left: 3px solid var(--sun); padding: 4px 0 4px 14px; margin: 28px 0 0; }
.sources { font-size: 14.5px; color: var(--dim); border-top: 1px solid var(--border); margin-top: 38px; padding-top: 18px; }
.sources ol { margin: 8px 0 0 20px; }
.sources li { margin-bottom: 6px; }
.crumbs { font-size: 14px; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--faint); }
.posts { list-style: none; margin: 8px 0 0; }
.posts li { border-top: 1px solid var(--border); padding: 22px 0; }
.posts li:last-child { border-bottom: 1px solid var(--border); }
.posts a { display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: start; text-decoration: none; color: var(--text); }
.posts a:hover h2 { color: var(--tide); }
.posts .thumb { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.posts .txt { display: block; }
.posts .tag { display: block; margin-bottom: 4px; }
.posts h2 { font-size: 1.28rem; font-weight: 600; margin: 0 0 4px; }
.posts p { color: var(--dim); font-size: 15.5px; margin: 0 0 6px; }
.posts time { display: block; color: var(--faint); font-size: 13.5px; }
.doc ul.posts { margin: 8px 0 0; }
.doc .posts li { margin-bottom: 0; }
.doc .posts h2 { border: 0; padding-top: 0; margin: 0 0 4px; }
.cover { aspect-ratio: 16 / 7; border-radius: 22px; overflow: hidden; margin: 6px 0 30px; box-shadow: var(--shadow-sm); }
.cover img, .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb svg, .cover svg { display: block; width: 100%; height: 100%; }
.credit { font-size: 12px; color: var(--faint); margin: -22px 0 26px; text-align: right; }
.fig { margin: 26px 0 30px; }
.fig svg { display: block; width: 100%; max-width: 560px; margin: 0 auto; height: auto; background: var(--card); border: 1px solid var(--border); border-radius: 18px; }
.fig text { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.fig figcaption { font-size: 14px; color: var(--dim); margin-top: 10px; text-align: center; line-height: 1.5; }
.fig.shot img { width: min(300px, 72%); margin: 0 auto; border-radius: 30px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.fig.photo img { width: 100%; border-radius: 18px; aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow-sm); }
.fig.photo figcaption .credit { display: block; margin: 4px 0 0; text-align: center; }
/* figure colour classes (tools/figs.py) */
.k-t { fill: var(--text); } .k-d { fill: var(--dim); } .k-f { fill: var(--faint); }
.k-tide { fill: var(--tide); } .k-sun { fill: var(--sun); } .k-st { fill: var(--sun-text); } .k-pl { fill: var(--placebo); }
.k-soft { fill: var(--tide-soft); } .k-sunsoft { fill: var(--sun-soft); } .k-card2 { fill: var(--bg); stroke: var(--border); }
.k-ln { stroke: var(--rule); fill: none; } .k-tl { stroke: var(--tide); fill: none; } .k-sl { stroke: var(--sun-text); fill: none; }
.k-on { fill: var(--on-tide); } .k-ink { fill: #1D2B36; }

/* ---------- End-of-guide box ---------- */
.app-box { position: relative; display: grid; grid-template-columns: 1fr 190px; gap: 26px; align-items: end; background: var(--card); border: 1px solid var(--border); border-radius: 26px; padding: 30px 0 0 30px; margin: 48px 0 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ab-text { padding-bottom: 30px; }
.ab-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--tide); margin: 0 0 14px; }
.ab-eyebrow img { width: 30px; height: 30px; border-radius: 8px; }
.ab-title { font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin: 0 0 10px; }
.ab-body { font-size: 15.5px; line-height: 1.6; color: var(--dim); margin: 0 0 18px; }
.ab-phone { position: relative; height: 300px; overflow: hidden; margin-right: 26px; }
.ab-phone img { width: 190px; border-radius: 28px 28px 0 0; border: 7px solid #1D2B36; border-bottom: 0; }
.ab-phone figcaption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 11.5px; color: #FBF8F2; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .shots figure { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .hero .wide { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .hero-phone { width: min(270px, 74vw); }
  .features, .guides-grid, .band .wide { grid-template-columns: 1fr; }
  .site-nav .hide-sm { display: none; }
}
@media (max-width: 620px) {
  .posts a { grid-template-columns: 96px 1fr; gap: 14px; }
  .posts .thumb { border-radius: 10px; }
  .cover { aspect-ratio: 16 / 9; border-radius: 16px; }
  .fig figcaption { font-size: 13px; }
  .app-box { grid-template-columns: 1fr; gap: 0; padding: 24px 20px 0; }
  .ab-text { padding-bottom: 22px; }
  .ab-phone { justify-self: center; height: 200px; margin: 0; }
  .ab-phone img { width: 180px; }
  .ab-title { font-size: 1.3rem; }
}
@media (max-width: 400px) { .site-nav a.nav-guides { display: none; } }
@media (max-width: 440px) {
  .signup .row { flex-direction: column; }
  .signup button { width: 100%; }
  .site-nav { gap: 10px; }
  .chip { padding: 7px 12px; }
  .shots { grid-template-columns: repeat(4, 76%); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .guide-card { transition: none; } }
