@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --ground: #F6F3EA; --ink: #1E2A22; --muted: #4F574F; --line: #DDD6C4;
  --green: #2F6B45; --green-dark: #1F4A30; --tint: #E3EFE6;
  --warn-bg: #FBE9E4; --warn-ink: #7A2E22;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.5; }
.wrap { max-width: 480px; margin: 0 auto; padding: 28px 20px 40px; }
.brand { font-size: 13px; letter-spacing: 0.06em; font-weight: 700; color: var(--green); margin-bottom: 8px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 30px; line-height: 1.15; margin: 0 0 16px; }
p { margin: 0 0 14px; }
a { color: var(--green); font-weight: 700; }
a:hover { color: var(--green-dark); }
.card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 0 0 16px; }
label { font-weight: 700; }
input[type=email], input[type=text] { min-height: 52px; padding: 0 14px; border: 2px solid #D8D2C2; border-radius: 12px; font: inherit; font-size: 18px; background: #fff; color: var(--ink); }
input:focus { outline: 3px solid var(--tint); border-color: var(--green); }
#code { letter-spacing: 0.3em; font-size: 24px; text-align: center; }
button { min-height: 56px; border: 0; border-radius: 14px; background: var(--green); color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
button:hover { background: var(--green-dark); }
button.secondary { background: #fff; color: var(--green); border: 2px solid var(--green); width: 100%; }
.notice { background: var(--tint); color: var(--green-dark); padding: 12px 14px; border-radius: 12px; }
.error { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.small { font-size: 15px; color: var(--muted); }
.emergency { margin-top: 28px; font-size: 14px; color: var(--warn-ink); background: var(--warn-bg); padding: 12px 14px; border-radius: 12px; }
h2 { font-size: 20px; margin: 0 0 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
input[type=date] { min-height: 52px; padding: 0 14px; border: 2px solid #D8D2C2; border-radius: 12px; font: inherit; font-size: 18px; background: #fff; color: var(--ink); }
.cert { background: var(--green-dark); color: var(--ground); border-radius: 20px; padding: 20px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.cert p { margin: 0; }
.cert-top { display: flex; justify-content: space-between; align-items: baseline; }
.cert-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: #CFE6D6; }
.cert-state { font-size: 14px; font-weight: 700; }
.cert-big { font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; line-height: 1.2; }
.cert-sub { font-size: 14px; color: #CFE6D6; }
.cert-open { font-weight: 700; }
.cert-button { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; background: var(--ground); color: var(--green-dark); text-decoration: none; font-size: 17px; }
.cert-button:hover { color: var(--green-dark); background: #fff; }
.back { margin: 0 0 8px; font-size: 15px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 14px; background: var(--green); color: #fff; text-decoration: none; font-size: 18px; margin: 0 0 16px; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.big { min-height: 64px; font-size: 20px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground); text-decoration: none; color: var(--ink); font-size: 15px; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.tabs a { flex: 1; text-align: center; padding: 10px 4px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; }
.tabs a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.tools { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.tool { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.journal-form { display: flex; flex-direction: column; gap: 0; }
.journal-form .card label:not(.chip):not(.face):not(.pct) { margin-top: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { position: relative; }
.chip input, .face input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span, .chiplink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid #D8D2C2; background: #fff; font-weight: 700; cursor: pointer; color: var(--ink); text-decoration: none; }
.chip input:checked + span, .chiplink[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span, .face input:focus-visible + span { outline: 3px solid #9FC7AE; outline-offset: 2px; }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.face span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; border: 2px solid #D8D2C2; background: var(--ground); cursor: pointer; }
.face svg { width: 40px; height: 40px; }
.face small { font-size: 12px; }
.face input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.label { font-weight: 700; margin: 6px 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pct { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.pct input, textarea { min-height: 48px; padding: 0 12px; border: 2px solid #D8D2C2; border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: var(--ink); }
textarea { padding: 10px 12px; resize: vertical; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; color: var(--green); min-height: 44px; display: flex; align-items: center; }
details .two { margin-top: 8px; }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.result { border-radius: 18px; padding: 18px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.result p { margin: 0; }
.result.good { background: var(--tint); color: var(--green-dark); }
.result.notquite { background: #FBF1DC; color: #5E4411; }
.result .btn { margin: 0; }
.entries { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.entry div { display: flex; flex-direction: column; }
.entry .del { grid-column: 1 / -1; }
button.link { min-height: 32px; background: none; color: var(--muted); font-size: 14px; font-weight: 400; text-decoration: underline; padding: 0; width: auto; }
button.link:hover { background: none; color: var(--warn-ink); }
.pill { font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #EFEBDF; color: var(--muted); white-space: nowrap; }
.pill.up, .pill.more { background: var(--tint); color: var(--green-dark); }
.pill.down, .pill.less { background: #F3E7C2; color: #6B5A1E; }
.rank { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; }
svg.bar { width: 100%; height: 16px; display: block; }
svg.pair { width: 100%; height: 30px; display: block; }
svg.line { width: 100%; height: auto; display: block; }
.insight { background: var(--tint); color: var(--green-dark); border-radius: 18px; padding: 16px 18px; margin: 0 0 16px; }
.insight p { margin: 0; font-size: 18px; }
.insight .label { font-size: 13px; letter-spacing: 0.05em; margin-bottom: 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid #EFEBDF; }
.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin: 0 6px 3px 0; vertical-align: middle; }
.key.before { background: #B7791F; }
.key.after { background: #2F6B45; height: 12px; margin-left: 10px; }
.key.other { background: #C9C2AE; height: 12px; margin-left: 10px; }
.bill { background: var(--green-dark); color: var(--ground); border-radius: 18px; padding: 18px; margin: 0 0 16px; }
.bill h2 { font-family: Georgia, "Times New Roman", serif; }
.bill a { color: #CFE6D6; }
.notme { margin-top: -10px; }
.due { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.due > div:last-child { display: flex; flex-direction: column; }
.cal { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; flex-shrink: 0; border-radius: 14px; background: #F3E7C2; color: #6B5A1E; }
.cal span { font-size: 12px; font-weight: 700; }
.cal strong { font-size: 22px; line-height: 1; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: #2F6B45; }
.card > a:not(.btn):not(.tool) { display: inline-block; margin: 0 0 10px; }
.card .tool + .tool { margin-top: 8px; }
.price { font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 600; color: var(--green-dark); margin: -6px 0 14px; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid #EFEBDF; }
.plan .btn { margin: 6px 0 0; }
.day { margin: 0 0 10px; }
.day .choices { margin-bottom: 4px; }
.card ul { margin: 0 0 10px; padding-left: 20px; }
.appt { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; margin: 0 0 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.appt-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.appt .two { margin-top: 6px; }
.btn.small-btn { min-height: 46px; font-size: 16px; margin: 0; }
.btn.outline { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn.outline:hover { background: var(--tint); color: var(--green-dark); }
button.danger { background: #A33A2A; width: 100%; margin-bottom: 10px; }
button.danger:hover { background: #7A2E22; }
.warnbox { border-color: #F0C8BE; }
.two .btn { margin: 0; }
.lost { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FBF1DC; color: #5E4411; }
.lost a { color: #5E4411; }
.conds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cond { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 6px 8px; border-radius: 14px; background: var(--tint); color: var(--green-dark); text-decoration: none; font-size: 16px; }
.cond:hover { background: #CFE6D6; color: var(--green-dark); }
.more { font-size: 15px; }
.guide .gitem { border-top: 1px solid #EFEBDF; }
.guide .gitem summary { min-height: 52px; gap: 8px; flex-wrap: wrap; color: var(--ink); }
.guide .gitem summary::marker { color: var(--green); }
.guide .gitem p { margin: 0 0 10px; }
.guide .gitem .careful { font-size: 15px; background: #FBF1DC; color: #5E4411; padding: 8px 12px; border-radius: 10px; }
.guide .gitem:target, .guide .gitem[open] { background: #FAFAF6; }
.glink { color: var(--ink); text-decoration: underline; text-decoration-color: #9FC7AE; text-underline-offset: 3px; }
.brand-logo { display: inline-block; margin: 0 0 14px; }
.brand-logo img { display: block; max-height: 56px; max-width: 240px; width: auto; height: auto; }
.sumcard p { margin: 0 0 10px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.journal-form + .tool, h1 + .tool { margin-bottom: 12px; }
.checkin .faces { margin-bottom: 6px; }
.checkin.done p { margin-bottom: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.pain { background: #A33A2A; } .dot.sleep { background: #2F6B45; } .dot.mood { background: #B7791F; }
/* ---------- Tab bar ---------- */
/* Main menu: a solid green bar so it's easy to find; the current section is a light pill. */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 4px; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: var(--green-dark); box-shadow: 0 -4px 16px rgba(31, 74, 48, 0.25); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; border-radius: 14px; color: #E3EFE6; text-decoration: none; font-size: 12.5px; font-weight: 700; line-height: 1.1; text-align: center; }
.tabbar a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.tabbar a[aria-current] { background: var(--ground); color: var(--green-dark); }
.tabbar a:focus-visible { outline: 3px solid #9FC7AE; outline-offset: 2px; }
.tabbar .ti { font-size: 24px; }
.wrap.withtabs { padding-bottom: 120px; }
@media (min-width: 720px) {
  .tabbar { top: 0; bottom: auto; justify-content: center; padding: 8px 12px; box-shadow: 0 4px 16px rgba(31, 74, 48, 0.25); }
  .tabbar a { flex: 0 1 130px; flex-direction: row; gap: 8px; min-height: 48px; font-size: 15px; }
  .tabbar .ti { font-size: 20px; }
  .wrap.withtabs { padding-top: 84px; padding-bottom: 40px; }
}
/* ---------- Hubs ---------- */
.nextup { background: var(--green-dark); color: var(--ground); border-radius: 20px; padding: 20px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.nextup p { margin: 0; }
.hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.hubtile { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 90px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hubtile .ti { font-size: 22px; }
.hubtile strong { font-size: 16px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.two .btn { margin: 0; }
.card > span, .card > strong { display: block; }
.tool.row { justify-content: space-between; }
.tool.soon { color: var(--muted); background: #FAF8F2; }
details.fold > summary { font-size: 18px; font-weight: 700; color: var(--ink); }
details.fold[open] > summary { margin-bottom: 10px; }
.select { min-height: 52px; padding: 0 12px; border: 2px solid #D8D2C2; border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: var(--ink); }
.scroll { overflow-x: auto; }
.rt { width: 100%; border-collapse: collapse; font-size: 14px; }
.rt th, .rt td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #EFEBDF; white-space: nowrap; }
.rt th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.thread { gap: 10px; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; }
.bubble p { margin: 4px 0 0; }
.bubble.mine { align-self: flex-end; background: var(--tint); }
.bubble.theirs { align-self: flex-start; background: #F3F0E6; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #F3E7C2; color: #6B5A1E; font-size: 13px; }
.stack textarea { padding: 10px 12px; }
.guide .gitem .tool { margin: 6px 0 10px; }
.qa-intro { margin-bottom: 4px; }
.safe { background: #FBF1DC; border-color: #EBD9A8; color: #5E4411; }
.safe h2 { color: #5E4411; }
.safe li { margin-bottom: 6px; }
.safe a { color: #5E4411; font-weight: 700; }
.card.thread, .past .thread { display: flex; flex-direction: column; gap: 10px; }
.past .thread { margin-top: 10px; }
.pill.new { font-size: 12px; padding: 2px 8px; background: var(--green); color: #fff; }
[hidden] { display: none !important; }
.pk-login { display: flex; flex-direction: column; gap: 10px; margin: 0 0 6px; }
.pk-login #pk-login { background: var(--green-dark); }
.or { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; color: var(--muted); font-size: 15px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #EFEBDF; }
.pk-row:first-of-type { border-top: 0; }
.pk-row div { display: flex; flex-direction: column; }
.pk-row form { margin: 0; }
.link-btn { min-height: 44px; padding: 0 6px; background: none; color: var(--green); font-size: 16px; text-decoration: underline; }
.link-btn:hover { background: none; color: var(--green-dark); }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 6px; }
.tip { background: var(--tint); border-color: #CFE6D6; }
.tip form { margin: 0; align-self: center; }
.safety h2 { display: flex; gap: 8px; align-items: center; }
.safety ul { margin: 0 0 10px; padding-left: 20px; }
.safety li { margin-bottom: 6px; }
.safety p:last-child, .safety .tools:last-child { margin-bottom: 0; }
.safe > a { display: block; margin: 0 0 6px; }
.contact .btn { margin: 0; }
.fold .tool.row { margin: 0 0 8px; }
.copyright { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
/* ---------- Line icons ---------- */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.tabbar .ti { display: flex; }
.tabbar .ti .ic { width: 26px; height: 26px; stroke-width: 2; }
.lbl { display: inline-flex; align-items: center; gap: 12px; }
.lbl .ic { color: var(--green); width: 22px; height: 22px; }
.hubtile .ti { display: flex; color: var(--green); }
.hubtile .ti .ic { width: 28px; height: 28px; }
.btn .ic { margin-right: 8px; }
.safety h2 .ic { color: var(--green); width: 26px; height: 26px; }
@media (min-width: 720px) { .tabbar .ti .ic { width: 22px; height: 22px; } }
