/* Tansy — tansytracker.com
   Colors are the app's asset-catalog tokens: warm paper and terracotta, no pink.
   Type is Atkinson Hyperlegible Next, built for low-vision legibility.
   Rules are in DESIGN.md: the page is the app's interface, enlarged. */

:root {
  --bg: #FBF6EF;
  --surface: #FFFFFF;
  --ink: #14120D;
  --ink-soft: #5C534B;
  --accent: #A04931;
  --accent-soft: #F3DCD0;
  --on-accent: #FFFFFF;
  --stroke: #9C8B7C;
  --hair: #E6DCD2;
  --bar: #D9B3A5;
  --w4: #BDB56E;
  --measure: 38rem;
  --wide: 72rem;
  --gap: 6rem;
  --r-cell: 12px;
  --r-ctl: 22px;
  --r-phone: 44px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1715;
    --surface: #272120;
    --ink: #F5EFE8;
    --ink-soft: #C9BFB5;
    --accent: #E08A6B;
    --accent-soft: #4A2F26;
    --on-accent: #1C1715;
    --stroke: #6E6158;
    --hair: #3A322E;
    --bar: #6B463A;
    --w4: #9D9C7B;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1875rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.small { font-size: 0.9375rem; color: var(--ink-soft); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 5; }

/* Header */

.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}
.brand img { border-radius: 9px; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; }
.site-header nav > a:not(.button) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; }
.site-header nav > a:not(.button):hover { text-decoration: underline; }

/* Buttons: pill, the app's filled accent */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
}
.button:hover { opacity: .88; }
.button-small { min-height: 2.75rem; padding: 0 1.15rem; font-size: 0.9375rem; }

main { overflow-wrap: break-word; }

/* Home. Rules are in DESIGN.md: the page is the app's interface, enlarged. */

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.soft { color: var(--ink-soft); }
.phone { margin: 0; width: min(100%, 20rem); padding: 9px; background: #14120D; border-radius: var(--r-phone); box-shadow: 0 30px 60px -30px rgba(28,23,21,.5); }
.phone img { border-radius: 35px; width: 100%; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; align-items: center; padding-top: 3rem; padding-bottom: var(--gap); }
.hero h1 { font-size: clamp(2.75rem, 6.4vw, 4.5rem); letter-spacing: -.04em; line-height: 1; margin-bottom: 1.5rem; max-width: 13ch; }
.hero .lede { font-size: 1.3125rem; color: var(--ink-soft); max-width: 33rem; margin-bottom: 2rem; }
.hero .act { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.hero .phone { justify-self: center; }

/* Try it */
.try { background: var(--surface); padding: var(--gap) 0; }
.try .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.home h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.try h2 { margin-bottom: .75rem; }
.try .intro { color: var(--ink-soft); max-width: 32rem; margin-bottom: 1.75rem; }
.tap { display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; max-width: 34rem; }
.flash {
  font: inherit; font-weight: 700; font-size: 1.25rem; color: var(--on-accent);
  flex: 1 1 14rem; min-height: 5rem; border-radius: var(--r-ctl); border: 0; background: var(--accent);
  display: flex; align-items: center; justify-content: center; gap: .7rem; cursor: pointer;
  transition: transform 180ms ease;
}
.flash::before { content: "+"; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; font-size: 1.25rem; line-height: 1; }
.flash:active { transform: scale(.97); }
.flash:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.count { margin: 0; min-width: 8rem; padding: 0 1.25rem; border: 2px solid var(--stroke); border-radius: var(--r-ctl); display: flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 600; }
.count strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.say { margin: 1.25rem 0 0; max-width: 34rem; min-height: 4.7em; }
.hours { margin: 0; padding: 1.5rem; background: var(--bg); border-radius: 28px; }
.hours h3 { font-size: 1.125rem; letter-spacing: 0; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hours h3 span { font-weight: 400; color: var(--ink-soft); font-size: 1rem; }
.bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 11rem; border-bottom: 1.5px solid var(--stroke); }
.bars i { height: calc(var(--n) * 9%); min-height: 0; background: var(--bar); border-radius: 3px 3px 0 0; transition: height 300ms ease, background-color 300ms ease; }
.bars i.hit { background: var(--accent); }
.axis { display: grid; grid-template-columns: repeat(4, 1fr); margin: .4rem 0 0; font-size: .875rem; color: var(--ink-soft); }
.hours .small { margin: 1rem 0 0; }

/* Feature rows */
.features { padding-top: var(--gap); }
.features > h2 { max-width: 20ch; margin-bottom: 4rem; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 4rem; align-items: center; padding-bottom: var(--gap); }
.row .phone { justify-self: center; width: min(100%, 17.5rem); }
.row.flip .phone { order: 2; }
.row h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 1rem; max-width: 18ch; }
.row p { max-width: 30rem; color: var(--ink-soft); }
.row .tag { display: inline-block; font-size: .9375rem; font-weight: 600; color: var(--ink); border: 1.5px solid var(--stroke); border-radius: 999px; padding: .15rem .8rem; margin: 0; }

/* Price */
.price { background: var(--accent-soft); padding: var(--gap) 0; }
.price h2 { margin-bottom: 2.5rem; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.plans > div { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.plans h3 { margin-bottom: .25rem; }
.plans ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.plans li { padding: .6rem 0; border-top: 1px solid var(--stroke); }
.plans .small { margin: 1rem 0 0; }

/* Conditions */
.cond { padding-top: var(--gap); padding-bottom: var(--gap); }
.cond h2 { margin-bottom: 1rem; }
.cond > p { color: var(--ink-soft); max-width: var(--measure); margin-bottom: 2rem; }
.cond ul { list-style: none; margin: 0; padding: 0; }
.guide-list { border-top: 1px solid var(--stroke); }
.guide-list li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: .25rem 2rem; align-items: baseline; padding: .9rem 0; border-bottom: 1px solid var(--hair); }
.guide-list a { font-weight: 600; font-size: 1.25rem; display: inline-flex; min-height: 2.75rem; align-items: center; }
.guide-list span { color: var(--ink-soft); }

/* FAQ */
.faq { padding-bottom: var(--gap); }
.faq h2 { margin-bottom: 1.5rem; }
.faq details { border-top: 1px solid var(--stroke); max-width: 46rem; }
.faq details:last-of-type { border-bottom: 1px solid var(--stroke); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.25rem; padding: 1.1rem 0; min-height: 2.75rem; }
.faq details p { color: var(--ink-soft); max-width: var(--measure); }

.close { background: var(--surface); padding: 5rem 0; }
.close h2 { max-width: 18ch; margin-bottom: 1.75rem; }
.home .site-footer { margin-top: 0; border-top: 0; }

/* Inner pages: one readable column */

.inner main { padding: 3.5rem 1.25rem 2rem; }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 1rem; }
.prose h1 + .small { margin-bottom: 2rem; }
.prose h1 + p:not(.small) { margin-top: 1.5rem; }
.prose h2 { font-size: 1.5rem; margin: 2.75rem 0 0.75rem; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 1.25rem; }
.prose li { position: relative; padding-left: 1.5rem; margin-bottom: 0.45rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 3px;
  background: var(--w4);
  border: 1.5px solid var(--stroke);
}

.cta {
  max-width: var(--measure);
  margin: 3rem auto 1rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--accent-soft);
  border-radius: 24px;
}
.cta img { border-radius: 15px; flex: none; }
.cta p { margin: 0 0 0.75rem; color: var(--ink-soft); }
.cta .cta-title { color: var(--ink); font-weight: 700; font-size: 1.25rem; margin-bottom: 0.25rem; }

/* Posts: way back, lead paragraph, one app line, related pages */

.crumb { margin: 0 0 1rem; font-size: 1rem; }
.crumb a { font-weight: 600; display: inline-flex; min-height: 2.75rem; align-items: center; }
.crumb a::before { content: "\2039"; margin-right: .4rem; }
.post .prose h1 + .small + p { font-size: 1.3125rem; line-height: 1.5; }
.strip {
  margin: 2.5rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 1rem;
}
.strip p { margin: 0; color: var(--ink-soft); max-width: 27rem; }
.strip a { font-weight: 600; white-space: nowrap; display: inline-flex; min-height: 2.75rem; align-items: center; }
.related { max-width: var(--measure); margin: 3.5rem auto 0; border-top: 3px solid var(--ink); padding-top: 1.1rem; }
.related h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { border-bottom: 1px solid var(--hair); }
.related a { font-weight: 600; display: flex; min-height: 3rem; align-items: center; padding: .4rem 0; }

/* Footer */

.site-footer {
  max-width: var(--wide);
  margin: 3rem auto 0;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--hair);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.site-footer a { color: var(--ink); font-size: 1rem; }

/* Phones */

@media (max-width: 860px) {
  :root { --gap: 3.5rem; }
  .hero, .try .wrap, .row, .plans { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding-top: 1.5rem; }
  .row.flip .phone { order: 0; }
  .row .phone, .hero .phone { justify-self: start; }
  .features > h2 { margin-bottom: 2.5rem; }
  .guide-list li { grid-template-columns: 1fr; }
  .say { min-height: 0; }
}
@media (max-width: 480px) {
  body { font-size: 1.125rem; }
  .hours { padding: 1.1rem .9rem; border-radius: 22px; }
  .bars { gap: 2px; }
  main .button { width: 100%; justify-content: center; }
  .cta .button { width: auto; }
  .cta { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .flash, .bars i { transition: none; }
}
