/* countpill.app: one family (Figtree), the app's teal (#007A6D), mint surfaces, orange only for an unsure ring.
   Mobile first; the counter is the first thing on the home page. */

:root {
  --bg: #ffffff;
  --ink: #12201d;
  --ink-2: #4f5f5b;
  --line: #dfe9e6;
  --mint: #eaf6f3;
  --mint-2: #d5ede7;
  --teal: #007a6d;
  --teal-hover: #00675c;
  --deep: #00463f;
  --on-teal: #ffffff;
  --ring: #e8842a;
  --radius: 16px;
  --measure: 66ch;
  --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1513;
    --ink: #eef4f2;
    --ink-2: #a5b4b0;
    --line: #22302c;
    --mint: #12211e;
    --mint-2: #1a2e2a;
    --teal: #2fc2ac;
    --teal-hover: #4fd3bf;
    --on-teal: #03201b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px;
}
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(32px, 6.4vw, 54px); }
h2 { font-size: clamp(25px, 3.6vw, 34px); }
h3 { font-size: 19px; font-weight: 700; margin-top: 1.4em; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.9em; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); margin-top: 14px; }
.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.hide-s { display: none; }
@media (min-width: 720px) { .hide-s { display: inline; } }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 600; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--teal); }
.top nav .pill { background: var(--teal); color: var(--on-teal); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.top nav .pill:hover { background: var(--teal-hover); color: var(--on-teal); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-hover); color: var(--on-teal); }
.btn-ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-light { background: #fff; color: #00463f; }
.btn-light:hover { background: #e8f7f3; color: #00463f; }

/* Hero with the counter */
.tool-hero { padding: 26px 0 36px; background: linear-gradient(180deg, var(--mint) 0%, var(--bg) 100%); }
.tool-hero h1 { max-width: 20ch; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 20px; }
.badges li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.badges li::before { content: "✓ "; color: var(--teal); font-weight: 800; }
.counter-mount { min-height: 320px; }
.noscript { padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius); }

/* The widget, in CountPill's colours and type. Pills only, so the category chips are hidden. */
.cm-counter {
  --cm-teal: #007a6d;
  --cm-teal-deep: #00463f;
  --cm-tint: #eaf6f3;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  .cm-counter { --cm-teal: #2fc2ac; --cm-tint: #12211e; }
}
.cm-counter .cm-chips-wrap { display: none; }

/* Page hero */
.page-hero { padding: 34px 0 10px; background: linear-gradient(180deg, var(--mint) 0%, var(--bg) 100%); }
.page-hero h1 { max-width: 24ch; }
.crumbs { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.byline { font-size: 14px; color: var(--ink-2); margin-top: 12px; }

/* Prose */
.prose-band { padding: 18px 0 40px; }
.prose > section, .prose > .calc { padding-top: 34px; }
.prose h2 { margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; max-width: var(--measure); margin: 10px 0 0; }
.prose li + li { margin-top: 7px; }
.prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p, .prose div + p { margin-top: 12px; }
.prose ol.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.prose ol.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 58px; background: var(--mint); border-radius: var(--radius); margin: 0; }
.prose ol.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 13px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: var(--on-teal); font-weight: 800; display: grid; place-items: center;
}
.formula { font-weight: 700; background: var(--mint); border-radius: 12px; padding: 12px 16px; display: inline-block; }

/* Cards */
.cards { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; background: var(--bg); transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--teal); color: var(--ink); transform: translateY(-2px); }
.card b { font-size: 18px; }
.card span { color: var(--ink-2); font-size: 15px; }
.card i { font-style: normal; color: var(--teal); font-weight: 700; margin-top: auto; }

/* Tables */
.table-scroll { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--mint); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

/* FAQ */
.faq-band { padding: 40px 0; background: var(--mint); }
.faq h2 { margin-bottom: 14px; }
.faq details { background: var(--bg); border-radius: 12px; margin-top: 10px; border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 15px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; color: var(--ink-2); }

/* App band */
.appband { background: linear-gradient(160deg, #007a6d 0%, #00463f 100%); color: #fff; padding: 48px 0; }
.appband h2 { color: #fff; max-width: 18ch; }
.appband-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 860px) { .appband-grid { grid-template-columns: 1.25fr 1fr; } }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; color: #bfe9e0; margin-bottom: 10px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.ticks li { padding-left: 28px; position: relative; color: #e2f5f1; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #7ee3cf; font-weight: 800; }
.ticks b { color: #fff; }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.fine-light { font-size: 14px; color: #bfe0d9; margin-top: 12px; }
.phones { display: flex; gap: 14px; justify-content: center; }
.phones img { width: min(46%, 230px); border-radius: 26px; border: 6px solid #0b0f0e; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.phones img + img { margin-top: 40px; }
.store {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid #333; min-height: 48px;
}
.store:hover { color: #fff; }
.store svg { width: 24px; height: 24px; fill: #fff; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; }
.store b { font-size: 18px; }

/* Days supply calculator */
.calc { margin-top: 6px; }
.calc-form { display: grid; gap: 12px; margin-top: 12px; max-width: 560px; }
@media (min-width: 560px) { .calc-form { grid-template-columns: 1fr 1fr; } }
.calc-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.calc-form input, .calc-form select {
  font-family: inherit; font-size: 18px; font-weight: 500; line-height: 1.2; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); min-height: 48px; width: 100%;
}
.calc-out { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius); background: var(--mint); max-width: 560px; }
.calc-big { font-size: 20px; }
.calc-big b { font-size: 46px; color: var(--teal); font-weight: 800; letter-spacing: -0.02em; }
.calc-note { color: var(--ink-2); font-size: 15px; }
.calc-hint { margin-top: 12px; }

/* Get, thanks and 404 pages */
.doc.get { padding: 56px 0 72px; text-align: center; }
.doc.get .wrap { display: flex; flex-direction: column; align-items: center; }
.get-icon { border-radius: 18px; margin-bottom: 18px; }
.doc.get .lead { margin-inline: auto; }
.get-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 15px; }
.foot-cols { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
.foot-cols div { display: flex; flex-direction: column; gap: 7px; }
.foot-cols b { margin-bottom: 4px; }
.foot-cols a { color: var(--ink-2); text-decoration: none; }
.foot-cols a:hover { color: var(--teal); }
.fine { color: var(--ink-2); font-size: 13px; margin-top: 18px; max-width: 80ch; }
.fine + .fine { margin-top: 6px; }
