/* Tidepath tool pages. Loaded after site.css; every colour is a token from the home page. */
.tp-tools .top{padding-bottom:0}
.tp-tools .nav a[aria-current]{background:var(--bg);color:var(--ink)}
.col{max-width:792px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.col.wide{max-width:1064px}
.col>*{min-width:0}

/* title block: short on a phone, so the tool starts on the first screen */
.thead{padding-block:18px 12px}
.thead .kicker{margin-bottom:6px;font-size:14px}
.thead .kicker a{color:inherit;text-underline-offset:3px}
.thead h1{font-size:clamp(31px,4.6vw,50px);line-height:1.02;letter-spacing:-.015em;max-width:18ch}
.thead .lede{margin-top:12px}
.thead.hub h1{max-width:20ch}
.tsec{padding-block:18px}
.tsec.tight{padding-block:0 10px}
@media (min-width:900px){.thead{padding-block:34px 22px}.thead .kicker{font-size:15px;margin-bottom:12px}.tsec{padding-block:30px}.tsec.tight{padding-block:0 18px}}

/* the tool card */
.tcard{background:var(--surface);border-radius:26px;box-shadow:var(--shadow);padding:12px 12px 16px;display:grid;gap:10px}
.tcard>*{min-width:0}
@media (min-width:700px){.tcard{border-radius:32px;padding:28px 28px 26px;gap:16px}}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;background:var(--bg);border-radius:18px;padding:4px}
.seg button{font:600 14px/1.15 var(--sans);border:0;border-radius:14px;min-height:44px;padding:4px 4px;background:transparent;color:var(--ink-2);cursor:pointer;-webkit-tap-highlight-color:transparent}
.seg button small{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-top:2px}
.seg button[aria-pressed="true"]{background:var(--btn);color:var(--on-btn)}
.seg button[aria-pressed="true"] small{color:inherit;opacity:.82}
.seg.two button{min-height:52px;font-size:15.5px}
@media (min-width:700px){.seg button{font-size:15px}.seg.two button{font-size:17px;min-height:60px}.seg button small{font-size:13px}}

.lv-read{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;padding:2px 4px 0}
.lv-read b{font:400 34px/1 var(--serif);color:var(--ink);font-variant-numeric:tabular-nums}
.lv-read span{font-size:14px;font-weight:600;color:var(--muted)}
@media (min-width:700px){.lv-read b{font-size:46px}.lv-read span{font-size:15px}}

/* the chart: one series, so no legend; text wears text tokens, the mark wears teal */
#lvSvg{display:block;width:100%;touch-action:pan-y;cursor:ew-resize;user-select:none;-webkit-user-select:none;border-radius:12px}
#lvSvg .g{stroke:var(--line);stroke-width:1}
#lvSvg .g.base{stroke:var(--muted);stroke-opacity:.55}
#lvSvg .ax{font:500 11.5px var(--sans);fill:var(--muted)}
#lvSvg .area,.hubcard .area{fill:var(--teal);fill-opacity:.13}
#lvSvg .curve,.hubcard .curve{fill:none;stroke:var(--teal);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
#lvSvg .cross{stroke:var(--ink);stroke-width:1;stroke-opacity:.35}
#lvSvg .dot{fill:var(--teal);stroke:var(--surface);stroke-width:2.5}
@media (min-width:700px){#lvSvg .ax{font-size:13px}}
.cap{padding:0 4px}
.result{font-size:16.5px;line-height:1.5;color:var(--ink);background:var(--promo);border-radius:18px;padding:14px 16px;text-wrap:pretty}
@media (min-width:700px){.result{font-size:18px;padding:18px 22px}}

details.tnums{border-top:1px solid var(--line);padding:2px 4px 0}
details.tnums summary,.q summary{cursor:pointer;font-weight:600;font-size:15px;color:var(--ink);min-height:44px;display:flex;align-items:center;gap:8px;list-style:none;-webkit-tap-highlight-color:transparent}
details.tnums summary::-webkit-details-marker,.q summary::-webkit-details-marker{display:none}
details.tnums summary::after,.q summary::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s;margin:-4px 0 0 2px}
details.tnums[open] summary::after,.q details[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.tnums table{width:100%;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums;margin:2px 0 6px}
.tnums th{text-align:left;font-weight:600;color:var(--muted);font-size:13px;padding:6px 8px 6px 0}
.tnums td{padding:8px 8px 8px 0;border-top:1px solid var(--line);color:var(--ink)}

/* calendar tool */
.lab2{font-size:13px;font-weight:600;color:var(--muted);padding:2px 4px 0;margin-bottom:-4px}
.seg.days7{gap:2px}
.seg.days7 button{font-size:13.5px;padding:0}
.fields{display:grid;grid-template-columns:minmax(142px,.7fr) 1fr;gap:8px}
.fields label{display:grid;gap:4px;font-size:13px;font-weight:600;color:var(--muted);padding-left:4px;min-width:0}
.fields input{font:500 16px/1.2 var(--sans);color:var(--ink);background:var(--bg);border:0;border-radius:14px;min-height:48px;padding:0 12px;margin-left:-4px;min-width:0;width:calc(100% + 4px);-webkit-appearance:none;appearance:none}
.fields input:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.cal-say{font:400 21px/1.15 var(--serif);color:var(--ink);padding:2px 4px 0;display:block}
@media (min-width:700px){.cal-say{font-size:30px}}
.grid7{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;font-size:13.5px;font-weight:500;text-align:center;font-variant-numeric:tabular-nums}
.grid7 span{height:30px;display:grid;place-items:center;border-radius:11px;color:var(--ink-2)}
.grid7 .dow{height:20px;font-size:11.5px;font-weight:600;color:var(--muted)}
.grid7 .past{color:var(--muted);opacity:.55}
.grid7 .today{box-shadow:inset 0 0 0 1.5px var(--line)}
.grid7 .shot{background:var(--teal);color:var(--on-teal);font-weight:700;box-shadow:none}
@media (min-width:700px){.grid7 span{height:40px;font-size:15px}}
.btn.wide{width:100%;min-height:54px;font-size:17px}
.note{font-size:15px;line-height:1.5;color:var(--ink);background:var(--promo);border-radius:16px;padding:12px 14px}
.note b{display:block}
.note.quiet b{display:inline}
.calbtns{display:grid;gap:10px}
.calbtns .fine.cap{margin:0 0 6px}
.btn.alt{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--muted)}

/* the invite, after the result */
.invite{background:var(--promo);border-radius:26px;padding:26px 14px 22px;text-align:center}
.invite h2{font-size:clamp(28px,4vw,42px);line-height:1.05;margin:0 auto 10px;max-width:18ch}
.invite>p{font-size:16.5px;line-height:1.5;color:var(--ink);max-width:46ch;margin:0 auto 16px;text-wrap:pretty}
.invite .fine{font-size:14px;margin:12px auto 0;color:var(--ink-2)}
.invite .fine a{font-weight:600;white-space:nowrap;text-underline-offset:3px}
.invite .signup{box-shadow:var(--shadow)}
@media (max-width:440px){.invite .signup .btn{padding:0 14px}.invite .signup input{padding-left:14px}}
@media (min-width:700px){.invite{border-radius:32px;padding:44px 32px 36px}}

/* reading sections */
.prose h2,.faq h2{font-size:clamp(30px,4vw,44px);line-height:1.05;margin-bottom:14px}
.prose h3{font:700 16px/1.3 var(--sans);color:var(--ink);margin:22px 0 8px}
.prose p,.prose li{font-size:17px;line-height:1.6;color:var(--ink-2)}
.prose p+p{margin-top:12px}
.prose ul{margin:0;padding-left:20px}
.prose li{padding:3px 0}
.srcs{list-style:none;padding:0!important}
.srcs li{padding:9px 0!important;border-top:1px solid var(--line);font-size:15.5px!important;line-height:1.4!important}
.srcs a{font-weight:600;text-underline-offset:3px}
.srcs span{display:block;font-size:13.5px;color:var(--muted)}
.reviewed{font-size:14px!important;color:var(--muted)!important;margin-top:14px!important}
.pending{display:inline-block;font-size:12px;font-weight:600;color:var(--gold);box-shadow:inset 0 0 0 1px currentColor;border-radius:999px;padding:1px 9px;margin-left:6px;white-space:nowrap}

.q{background:var(--surface);border-radius:22px;box-shadow:var(--shadow);padding:20px 18px 6px;margin-top:10px;scroll-margin-top:12px}
.q h3{font-size:25px;line-height:1.12;margin-bottom:10px}
.q .a{font-size:17px;line-height:1.55;color:var(--ink);text-wrap:pretty}
.q details{margin-top:10px;border-top:1px solid var(--line)}
.q summary{font-size:14.5px;color:var(--ink-2)}
.q details p{font-size:16px;line-height:1.6;color:var(--ink-2);padding-bottom:12px}
.q a{text-underline-offset:3px}
.faq .end{margin-top:18px}
@media (min-width:700px){.q{padding:28px 30px 10px;border-radius:26px}.q h3{font-size:30px}.q .a{font-size:18px}.q details p{font-size:16.5px}}

/* the other tool, and the hub */
.next{display:grid;gap:2px;background:var(--surface);border-radius:22px;box-shadow:var(--shadow);padding:18px 20px;text-decoration:none;color:var(--ink-2)}
.next span{font-size:13px;font-weight:600;color:var(--teal)}
.next b{font:400 28px/1.1 var(--serif);color:var(--ink)}
.next em{font-style:normal;font-size:15.5px}
.hubgrid{display:grid;gap:12px}
@media (min-width:760px){.hubgrid{grid-template-columns:1fr 1fr;gap:20px}}
.hubcard{display:flex;flex-direction:column;gap:10px;background:var(--surface);border-radius:26px;box-shadow:var(--shadow);padding:18px 18px 12px;text-decoration:none;color:var(--ink-2);min-width:0;transition:transform .25s,box-shadow .25s}
.hubcard:hover{transform:translateY(-3px);box-shadow:0 0 0 2px var(--teal-2),var(--shadow)}
.hubcard svg,.hubcard .mini{background:var(--bg);border-radius:18px;height:124px;width:100%;padding:12px 14px;box-sizing:border-box}
.hubcard .mini{align-content:center}
.hubcard .mini span{height:26px;font-size:12.5px}.hubcard .mini .dow{height:16px;font-size:11px}
.hubcard h2{font-size:32px;line-height:1.05;margin-top:4px}
.hubcard p{font-size:16.5px;line-height:1.5;flex:1}
@media (min-width:760px){.hubcard{padding:28px 28px 20px;border-radius:32px}.hubcard svg,.hubcard .mini{height:170px}.hubcard h2{font-size:40px}.hubcard .mini span{height:34px}}
@media (prefers-reduced-motion:reduce){.hubcard,details summary::after{transition:none}}

/* ---------- more tools: shared bits ---------- */
.more-h{font-size:clamp(26px,3.4vw,36px);line-height:1.05;margin-bottom:12px}
.nexts{display:grid;gap:10px}
@media (min-width:700px){.nexts{grid-template-columns:repeat(3,1fr)}}
.result.hint{background:var(--bg);color:var(--ink-2)}
.fields.one{grid-template-columns:1fr}

/* ---------- reconstitution calculator ---------- */
.rows{display:grid;gap:6px}
.row{display:grid;grid-template-columns:1fr 84px 104px;align-items:center;gap:8px;min-height:50px;padding-left:6px}
.row label,.row .rl{font-size:15px;font-weight:600;color:var(--ink-2);line-height:1.2}
.row label small{display:block;font-size:12.5px;font-weight:500;color:var(--muted);margin-top:2px}
.rnote{margin:-2px 0 6px}
#rcLimit{margin:10px 0 0}
.row input{font:500 17px/1.2 var(--sans);color:var(--ink);background:var(--bg);border:0;border-radius:14px;height:46px;padding:0 12px;min-width:0;width:100%;text-align:right;-webkit-appearance:none;appearance:none}
.row input:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.row .unit{font-size:14px;font-weight:600;color:var(--muted);padding-left:6px}
.row .seg.three{grid-column:2/4;justify-self:stretch}
.row.r3{grid-template-columns:auto 1fr auto}
.row.r3 .seg{grid-column:auto}
.seg.four{grid-template-columns:1.6fr 1fr 1fr 1fr;grid-auto-flow:row}
.seg.four button{font-size:13.5px;padding:0 2px}
.flags li.lines{color:var(--ink-2)}
.seg.mini{border-radius:14px;padding:3px;gap:2px}
.seg.mini button{min-height:40px;border-radius:11px;font-size:14px}
.answer{display:grid;gap:10px;border-top:1px solid var(--line);padding-top:10px}
.lv-read.draw{align-items:baseline;gap:8px}
.lv-read.draw b{font-size:44px;color:var(--teal)}
#rcSvg{display:block;width:100%}
#rcSvg .ax,.syr .ax{font:500 11.5px var(--sans);fill:var(--muted)}
#rcSvg .mark{font:700 13px var(--sans);fill:var(--ink)}
.needle{stroke:var(--muted);stroke-width:1.5;stroke-linecap:round}
.hub{fill:var(--muted);fill-opacity:.55}
.barrel{fill:var(--bg);stroke:var(--line);stroke-width:1.5}
.hubcard .barrel{fill:var(--surface)}
.fill{fill:var(--teal);fill-opacity:.22}
.stop{fill:var(--teal)}
.fill.over{fill:var(--coral)}.stop.over{fill:var(--coral)}
.rod{stroke:var(--muted);stroke-width:3;stroke-opacity:.5}
.tick{stroke:var(--ink-2);stroke-width:1;stroke-opacity:.6}
.stats3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 4px}
.stats3 b{display:block;font:700 15.5px/1.2 var(--sans);color:var(--ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.stats3 span{font-size:12.5px;color:var(--muted)}
.flags{list-style:none;margin:0;padding:0 4px;display:grid;gap:4px;font-size:14.5px;color:var(--muted)}
.flags:empty{display:none}
.flags li.bad,.flags li.warn{font-weight:600;padding-left:22px;position:relative}
.flags li.bad{color:var(--coral)}.flags li.warn{color:var(--gold)}
.flags li.bad::before,.flags li.warn::before{content:"!";position:absolute;left:0;top:1px;width:16px;height:16px;border-radius:50%;box-shadow:inset 0 0 0 1.5px currentColor;font-size:11px;line-height:16px;text-align:center}
@media (min-width:700px){.row{grid-template-columns:1fr 120px 120px;min-height:56px}.row label,.row .rl{font-size:16.5px}.stats3 b{font-size:18px}.lv-read.draw b{font-size:56px}}

/* ---------- missed-dose helper ---------- */
.seg.grid2{grid-auto-flow:row;grid-template-columns:1fr 1fr}
.seg.grid2 button{font-size:15.5px;min-height:46px}
.seg.grid2 .span2{grid-column:1/3;font-size:14.5px}
@media (min-width:700px){.seg.grid2{grid-template-columns:repeat(4,1fr)}.seg.grid2 .span2{grid-column:1/5}}
#mdOut{display:grid;gap:10px}
.dates{background:var(--promo);border-radius:18px;padding:14px 16px;font-size:16.5px;line-height:1.5;color:var(--ink)}
.dates p+p{margin-top:6px}
.dates p:first-child{font-weight:600}
.quote{margin:0;border-radius:18px;box-shadow:inset 0 0 0 1px var(--line);padding:14px 16px}
.quote figcaption{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px}
.quote blockquote,.labels blockquote{margin:0;font-size:16.5px;line-height:1.55;color:var(--ink-2)}
.quote blockquote span.on{background:var(--promo);color:var(--ink);font-weight:600;border-radius:6px;padding:1px 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.quote .fine{margin-top:8px}
.result b{display:block;margin-bottom:4px}.result p+p{margin-top:8px}
.labels .lrow{border-top:1px solid var(--line);padding:14px 0 12px}
.labels .lrow h3{font:400 26px/1.1 var(--serif);margin:0 0 6px}
.labels .lrow .fine{margin-top:6px;font-size:14px!important}
.labels blockquote{border-left:3px solid var(--teal-2);padding-left:12px}
@media (min-width:700px){.dates{font-size:18px;padding:18px 22px}.quote{padding:18px 22px}}

/* hub pictures */
.hubcard .pic{background:var(--bg);border-radius:18px;height:124px;padding:14px;display:flex;flex-wrap:wrap;gap:6px;align-content:center;box-sizing:border-box}
.quotepic span{font-size:12.5px;font-weight:600;color:var(--ink-2);background:var(--surface);border-radius:999px;padding:5px 10px}
.quotepic span:nth-child(2){background:var(--btn);color:var(--on-btn)}
.quotepic i{flex-basis:100%;font:400 22px/1.2 var(--serif);font-style:normal;color:var(--ink);margin-top:6px}
@media (min-width:760px){.hubcard .pic{height:170px;padding:22px}.quotepic i{font-size:28px}}

/* privacy policy */
.short{background:var(--promo);border-radius:20px;padding:20px 22px}
.short h2{font-size:clamp(26px,3vw,34px);margin-bottom:10px}
.prose h2+h3{margin-top:6px}
.prose ul+p,.prose p+ul,.prose ul+h3,.prose p+h2,.prose ul+h2{margin-top:14px}
.prose h2:not(:first-child){margin-top:34px}
.prose li+li{margin-top:6px}
mark.todo{background:#FFE7A8;color:var(--ink);border-radius:4px;padding:0 4px}
