/* =========================================================
   CONTENT PAGES
   Guides, calculators, app pages and legal pages.
   Loaded after styles.css, which supplies the header,
   footer and base reset.
   ========================================================= */

:root {
  --ink: #172018;
  --muted: #55604f;
  --line: #d8ddd5;
  --paper: #ffffff;
  --tint: #eef1ea;
  --link: #2f6a3a;
  --teal: #236a63;
  --teal-dark: #174a45;
  --amber: #f2b33d;
  --amber-soft: #fdf1d8;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 96px;

  font-size: 17px;
  line-height: 1.7;
}

.page.narrow {
  max-width: 820px;
}

.page h1,
.page h2,
.page h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.page h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}

.page h2 {
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.2;
  margin: 48px 0 14px;
}

.page h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 28px 0 10px;
}

.page p {
  margin: 0 0 18px;
}

.page ul,
.page ol {
  padding-left: 26px;
  margin: 0 0 22px;
}

.page li {
  margin: 7px 0;
}

.page a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 45px 0;
}

.page p,
.page li,
.page a,
.page td,
.page th {
  overflow-wrap: break-word;
}

.page .lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 680px;
}

.page .meta {
  color: var(--muted);
  margin: -8px 0 36px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
}

.page .breadcrumb a {
  color: var(--muted);
}

/* ---------- tables ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.page th,
.page td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.page tr:last-child td {
  border-bottom: 0;
}

.page th {
  font-weight: 600;
  background: var(--tint);
}

.data-table td,
.data-table th {
  white-space: nowrap;
}

.data-table td:first-child {
  font-weight: 600;
}

.note {
  font-size: 15px;
  color: var(--muted);
}

/* ---------- cards ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin: 0 0 22px;
}

.card > :last-child {
  margin-bottom: 0;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 18px;
  margin: 0 0 22px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid-2 .card,
.grid-3 .card {
  margin: 0;
}

.card h3 {
  margin-top: 0;
}

.callout {
  background: var(--amber-soft);
  border-left: 4px solid var(--amber);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin: 0 0 22px;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---------- app promo ---------- */

.app-cta {
  display: flex;
  align-items: center;
  gap: 20px;

  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  color: #fff;

  border-radius: 22px;
  padding: 24px;
  margin: 40px 0;
}

.app-cta img.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  flex: none;
}

.app-cta h2,
.app-cta h3 {
  color: #fff;
  margin: 0 0 6px;
  font-size: 22px;
}

.app-cta p {
  margin: 0 0 12px;
  color: #d9ece9;
}

.app-cta .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.play-badge img {
  height: 54px;
  width: auto;
  margin: -8px;
}

.soon {
  font-size: 14px;
  color: #d9ece9;
}

/* ---------- buttons and forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 44px;
  padding: 0 18px;

  border: 1px solid var(--ink);
  border-radius: 999px;

  background: var(--ink);
  color: #fff;

  font: 600 15px/1 "DM Sans", sans-serif;
  cursor: pointer;
}

.page a.btn {
  color: #fff;
  text-decoration: none;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.page a.btn.ghost {
  color: var(--ink);
}

.btn:focus-visible,
.calc input:focus-visible,
.calc select:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- calculator ---------- */

.calc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  margin: 28px 0;
}

.calc-mode {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--tint);
  margin: 0 0 18px;
}

.calc-mode label {
  position: relative;
}

.calc-mode input {
  position: absolute;
  opacity: 0;
}

.calc-mode span {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.calc-mode input:checked + span {
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(23, 32, 24, 0.15);
}

.calc-mode input:focus-visible + span {
  outline: 3px solid var(--amber);
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calc label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.calc select,
.calc input[type="date"],
.calc input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfa;
  color: var(--ink);
  font: 500 16px "DM Sans", sans-serif;
}

.calc-result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.result-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin: 0 0 6px;
}

.result-hero .label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.result-hero .date {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.result-sub {
  color: var(--muted);
  margin: 0 0 18px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--tint);
  overflow: hidden;
  margin: 0 0 22px;
}

.progress > div {
  height: 100%;
  background: var(--amber);
  border-radius: 999px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}

.page .timeline li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline .day {
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
}

.timeline .what small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.timeline .when {
  text-align: right;
  white-space: nowrap;
  font-size: 15px;
}

.timeline li.past {
  opacity: 0.55;
}

.timeline li.today .when {
  font-weight: 700;
}

.targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.target {
  background: var(--tint);
  border-radius: 14px;
  padding: 14px;
}

.target .k {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.target .v {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-status {
  font-size: 14px;
  color: var(--muted);
  min-height: 1.4em;
  margin: 10px 0 0;
}

/* ---------- landing page ---------- */

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.app-hero .app-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 0 18px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.shots img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(23, 32, 24, 0.15);
}

.hero-shot img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(23, 32, 24, 0.2);
}

.link-list {
  list-style: none;
  padding: 0;
}

.page .link-list li {
  margin: 0 0 10px;
}

/* ---------- candling illustrations ---------- */

.egg-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}

.egg-row figure {
  margin: 0;
  background: #1d1f1c;
  color: #f5f1e6;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.egg-row svg {
  width: 100%;
  max-width: 110px;
  height: auto;
  margin: 0 auto 8px;
}

.egg-row figcaption {
  font-size: 14px;
  line-height: 1.4;
}

.egg-row figcaption strong {
  display: block;
  color: var(--amber);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .page {
    padding: 32px 16px 72px;
    font-size: 16px;
  }

  .calc {
    padding: 18px;
  }

  .calc-fields,
  .grid-2,
  .grid-3,
  .app-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .targets {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page .timeline li {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .timeline .when {
    grid-column: 2;
    text-align: left;
    white-space: normal;
    color: var(--muted);
  }

  .app-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- print (charts and calculator results) ---------- */

@media print {
  .site-header,
  .footer,
  .app-cta,
  .no-print,
  .calc-actions,
  .calc-mode,
  .breadcrumb {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .page {
    padding: 0;
    max-width: none;
    font-size: 12pt;
  }

  .page h1 {
    font-size: 26pt;
  }

  .table-wrap,
  .calc,
  .card {
    border-color: #999;
    break-inside: avoid;
  }

  .data-table td,
  .data-table th {
    padding: 6px 8px;
  }
}

/* Reserve the header's height until site-chrome.js fills it in. */
#site-header {
  height: 82px;
}

/* Anchored headings (privacy-policy.html#endly) clear the sticky header. */
.page [id] {
  scroll-margin-top: 96px;
}

/* ---------- store badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.app-store-badge img {
  height: 40px;
  width: auto;
}

/* App Store badges ship hidden until each iOS app is live:
   set the link's href and remove its `hidden` attribute. */
.app-store-badge[hidden] {
  display: none !important;
}

.app-hero .soon {
  color: var(--muted);
}

.page .app-cta .cta-link {
  color: #fff;
}

/* ---------- apps hub and related apps ---------- */

.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.page .chip-nav a {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.page .chip-nav a:hover {
  border-color: var(--teal);
}

.app-category h2 {
  margin-bottom: 4px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 14px 0 22px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.page .app-tile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  margin: 0 0 10px;
}

.app-tile-link img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex: none;
}

.page .app-tile h3 {
  margin: 0;
  font-size: 20px;
}

.app-tile-sub {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.page .app-tile p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.page .app-tile .app-tile-actions {
  margin: auto 0 0;
  font-weight: 600;
}

/* ---------- stopwatch game ---------- */

.stopwatch {
  text-align: center;
}

.sw-display {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(64px, 16vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 12px;
}

.page .sw-result {
  min-height: 1.7em;
  color: var(--muted);
}

.sw-btn {
  min-width: 200px;
  min-height: 56px;
  font-size: 18px;
  margin: 0 0 24px;
  touch-action: manipulation;
}

/* ---------- click track ---------- */

.beat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.beat {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint);
  border: 2px solid var(--line);
  transition: background 0.05s;
}

.beat.a1 { border-color: var(--teal); }
.beat.a2 { border-color: var(--teal-dark); border-width: 4px; }
.beat.on { background: var(--amber); }
