/* Transforming Talk web app: the iPhone version of the client app. Brand tokens match the website and the Android app. */
@font-face { font-family: "Young Serif"; src: url("fonts/young_serif_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1F3A47; --soft-ink: #2F5365; --text: #2C4350; --orange: #B94E12; --bright: #E8772E;
  --sky: #DCEBF0; --sky-deep: #BCD6DF; --mist: #F3F8F9; --white: #FFFFFF; --help: #A3302A; --leaf: #4E8A4A;
  --muted: #5B7380; --line: #D3E2E8;
  --radius: 22px; --pad: 20px;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--mist); color: var(--text); font: 400 17px/1.55 "Figtree", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; color: var(--ink); line-height: 1.2; margin: 0; }
a { color: var(--orange); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; padding: calc(var(--top) + 12px) var(--pad) 12px; background: var(--white); border-bottom: 1px solid var(--line); }
.bar img { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); }
.bar .names { flex: 1; min-width: 0; }
.bar .names strong { display: block; font: 400 21px/1.15 "Young Serif", Georgia, serif; color: var(--ink); }
.bar .names span { display: block; font-size: 14px; color: var(--soft-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .act { border: 0; background: none; color: var(--orange); font-weight: 600; font-size: 17px; padding: 10px 4px; }

main { padding: 0 var(--pad) calc(var(--bottom) + 28px); max-width: 640px; margin: 0 auto; }
.view { padding-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Home ---------- */
.welcome { position: relative; margin: 0 calc(var(--pad) * -1); padding: 64px var(--pad) 120px; background: linear-gradient(#F3F8F9, #DCEBF0); overflow: hidden; }
.welcome h1 { font-size: 40px; }
.welcome p { margin: 10px 0 0; font-size: 19px; color: var(--soft-ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.section-head h2 { font-size: 24px; }
.link-btn { border: 0; background: none; color: var(--orange); font-weight: 600; padding: 6px 0; text-decoration: none; text-align: left; }

.card { position: relative; display: block; width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; color: inherit; text-decoration: none; }
.card.feature { border-left: 6px solid var(--orange); }
.card h3 { font-size: 22px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--text); }
.card .open { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--orange); font-weight: 600; }
.card .open::after { content: "\2192"; font-size: 20px; line-height: 1; }

.article-card { padding: 0; overflow: hidden; }
.article-card img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--sky); }
.article-card .body { padding: 18px 22px 20px; }
.date { font-size: 15px; font-weight: 600; color: var(--soft-ink); }
.article-card h3 { margin: 4px 0 6px; font-size: 24px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.install { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px; }
.install h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.install ol { margin: 6px 0 0; padding-left: 22px; }
.install .x { float: right; border: 0; background: none; color: #fff; font-size: 26px; line-height: 1; padding: 0 0 6px 10px; }
.share-ico { display: inline-block; width: 16px; height: 18px; vertical-align: -3px; }

/* ---------- Buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--orange); color: #fff; font-weight: 600; font-size: 17px; text-decoration: none; width: 100%; }
.btn.ghost { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn:disabled { opacity: .45; }
.btn.help { background: transparent; color: var(--help); border: 2px solid var(--help); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.note { font-size: 15px; color: var(--muted); }
.lead { font-size: 18px; margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Toolkit ---------- */
.group h2 { font-size: 24px; margin-top: 10px; }
.group > p { margin: 4px 0 12px; }
.tool { display: flex; align-items: center; gap: 16px; }
.tool .txt { flex: 1; min-width: 0; }
.tool .txt strong { display: block; font-size: 19px; color: var(--ink); font-weight: 600; }
.tool .txt span { color: var(--text); font-size: 16px; }
.tool .min { font-size: 15px; font-weight: 600; color: var(--soft-ink); white-space: nowrap; }
.tile { flex: none; width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center; }
.tile svg { width: 46px; height: 46px; }
.tile.calm { background: linear-gradient(135deg, #DCEBF0, #BCD6DF); }
.tile.ground { background: linear-gradient(135deg, #E6F1DF, #C9E2B3); }
.tile.distract { background: linear-gradient(135deg, #FCE9D9, #F3B98F); }
.tool-head { display: flex; align-items: center; gap: 14px; }
.tool-head h1 { flex: 1; font-size: 30px; }
.voice-btn { border: 0; background: none; padding: 8px; color: var(--orange); }
.voice-btn svg { width: 30px; height: 30px; display: block; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 28px; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stage { position: relative; width: 240px; height: 240px; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage .label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.stage .label b { font: 400 24px/1.2 "Young Serif", Georgia, serif; color: var(--ink); }
.stage .label i { font-style: normal; font-size: 36px; font-weight: 600; color: var(--orange); }
.stage.light .label b, .stage.light .label i { color: #fff; }
.big-num { font: 600 64px/1 "Figtree", sans-serif; color: var(--orange); }
.prompt { font-size: 21px; line-height: 1.45; text-align: center; color: var(--ink); min-height: 120px; display: flex; align-items: center; justify-content: center; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--sky-deep); }
.dots i.on { background: var(--orange); }
.taps { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.taps button { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--sky-deep); background: transparent; color: #fff; font-weight: 700; }
.taps button.on { background: var(--leaf); border-color: var(--leaf); }
.swatch { width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--line); }
.picture { width: 100%; height: 130px; border-radius: 24px; overflow: hidden; }
.picture svg { width: 100%; height: 100%; display: block; }

/* ---------- Help now sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 200; background: rgba(20, 39, 47, .45); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-width: 640px; margin: 0 auto; background: var(--white); border-radius: 26px 26px 0 0; padding: 22px var(--pad) calc(var(--bottom) + 22px); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow: auto; }
.sheet h2 { font-size: 26px; }
.line { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; text-decoration: none; color: inherit; }
.line div { flex: 1; }
.line strong { display: block; font-size: 18px; color: var(--ink); }
.line span { font-size: 15px; color: var(--muted); }
.line em { font-style: normal; background: var(--orange); color: #fff; font-weight: 600; border-radius: 999px; padding: 10px 14px; white-space: nowrap; }
.line em.red { background: var(--help); }

/* ---------- Trigger capture ---------- */
.progress { height: 6px; border-radius: 3px; background: var(--sky); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--orange); }
.q { font-size: 26px; }
textarea, input[type=text], input[type=password], input[type=time], select { width: 100%; border: 1px solid var(--sky-deep); border-radius: 16px; padding: 14px 16px; background: var(--white); font-size: 17px; }
textarea { resize: vertical; min-height: 140px; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--bright); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--sky-deep); background: var(--white); border-radius: 999px; padding: 9px 16px; font-size: 16px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--orange); }
.strength { display: flex; justify-content: space-between; align-items: baseline; }
.strength b { font-size: 22px; color: var(--orange); }
.foot { position: sticky; bottom: 0; background: var(--mist); padding: 12px 0 calc(var(--bottom) + 12px); border-top: 1px solid var(--line); margin: 8px calc(var(--pad) * -1) 0; padding-left: var(--pad); padding-right: var(--pad); }
.review h3 { font-family: "Figtree", sans-serif; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; }
.review h3 span { color: var(--orange); }
.review p { margin: 6px 0 0; white-space: pre-wrap; }
.note-item { display: flex; gap: 14px; align-items: center; }
.note-item .txt { flex: 1; min-width: 0; }
.badge { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-weight: 600; }
.summary { background: var(--sky); border: 0; }
.summary ul { margin: 6px 0 0; padding-left: 20px; }
.sec h3 { font-family: "Figtree", sans-serif; font-weight: 600; font-size: 16px; color: var(--soft-ink); margin-top: 14px; }
.sec p { margin: 4px 0 0; white-space: pre-wrap; }

/* ---------- Articles ---------- */
.article h1 { font-size: 30px; }
.article .hero { width: calc(100% + var(--pad) * 2); margin: 0 calc(var(--pad) * -1); display: block; aspect-ratio: 2 / 1; object-fit: cover; }
.prose { font-size: 18px; line-height: 1.65; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose h2 { font-size: 24px; margin: 26px 0 8px; }
.prose h3 { font-size: 20px; margin: 22px 0 6px; }
.prose blockquote { margin: 18px 0; padding-left: 16px; border-left: 4px solid var(--bright); color: var(--soft-ink); }
.prose figure { margin: 18px 0; }

/* ---------- Documents ---------- */
.doc { display: flex; align-items: center; gap: 14px; }
.doc .pdf { flex: none; width: 44px; height: 54px; border-radius: 8px; background: var(--sky); color: var(--orange); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.doc .txt { flex: 1; }
.doc .txt strong { display: block; color: var(--ink); font-size: 18px; font-weight: 600; }
.msg { border-radius: 16px; padding: 12px 16px; background: #FBEBEB; color: var(--help); }
.msg.ok { background: #E5F4E4; color: #2E6B2B; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); }
label.check { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
label.check input { width: 24px; height: 24px; accent-color: var(--orange); margin: 0; }
input[type=url] { width: 100%; border: 1px solid var(--sky-deep); border-radius: 16px; padding: 14px 16px; background: var(--white); font-size: 17px; }

/* The website's seasonal animation sits above the page: keep it off the other screens. */
body:not(.on-home) .tt-season-canvas, body:not(.on-home) .tt-season-hide, body:not(.on-home) .tto-hide { display: none !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
