:root {
  --ink: #111827;
  --ink-2: #1f2937;
  --muted: #6b7280;
  --soft: #9ca3af;
  --line: #e5e7eb;
  --paper: #f8fafc;
  --card: #ffffff;
  --accent: #0f766e;
  --accent-2: #115e59;
  --warm: #c2410c;
  --chip: #ecfdf5;
  --radius: 16px;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", "DM Sans", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 118, 110, 0.1), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(194, 65, 12, 0.06), transparent 50%),
    var(--paper);
  line-height: 1.55;
}

a {
  color: var(--accent-2);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand small {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

/* Hero */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hero {
  margin-bottom: 36px;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 14ch;
}

.lead {
  margin: 0 0 22px;
  max-width: 38em;
  font-size: 1.08rem;
  color: var(--ink-2);
}

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

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding-inline: 10px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Official-style App Store badge (TanPilot pattern) */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px 8px 12px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
  transition: background 0.15s ease, transform 0.15s ease;
}

.appstore:hover {
  background: #111;
  color: #fff;
}

.appstore__icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.appstore__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.appstore__small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

.appstore__big {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Sections */
.section {
  margin: 40px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-head p,
.hint {
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

/* Widget / planner card — TanPilot style */
.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 18px;
  margin: 28px 0;
}

.widget--compact {
  padding: 14px;
  margin: 22px 0;
}

.widget-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.widget-top h2 {
  margin: 0;
  font-size: 1.15rem;
}

.widget--compact .widget-top h2 {
  font-size: 1.05rem;
}

.badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--accent-2);
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 9px;
}

.widget-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .widget-grid.split {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }

  .widget--compact .widget-grid.split {
    grid-template-columns: 1fr 220px;
    gap: 12px;
  }
}

.chart-box {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, #eef2f7 1px, transparent 1px) 0 0 / 22px 22px,
    #fcfdff;
  padding: 10px;
  position: relative;
}

.widget--compact .chart-box {
  min-height: 200px;
  padding: 8px;
  border-radius: 12px;
}

.chart-box canvas {
  max-width: 100%;
  height: auto;
}

.chart-fallback {
  display: block;
  width: min(100%, 200px);
  height: auto;
}

.chart-box.js-ready .chart-fallback {
  display: none;
}

.chart-box:not(.js-ready) canvas {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rows {
  display: grid;
  gap: 8px;
}

.widget--compact .rows {
  gap: 6px;
}

.row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 36px;
  gap: 6px;
  align-items: center;
}

.row input {
  width: 100%;
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr 0.7fr 36px;
  }
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}

.btn-icon {
  appearance: none;
  width: 36px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.btn-icon:hover {
  color: var(--ink);
  border-color: #cbd5e1;
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.widget--compact .legend {
  margin-top: 8px;
  font-size: 0.82rem;
}

.widget--compact .legend th,
.widget--compact .legend td {
  padding: 5px 2px;
}

.widget--compact .toolbar {
  margin-top: 8px;
}

.widget--compact .hint {
  display: none;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.widget--compact input[type="text"],
.widget--compact input[type="number"] {
  padding: 9px 10px;
  font-size: 0.95rem;
}

input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.28);
  outline-offset: 1px;
  border-color: var(--accent);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.meta {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.legend {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legend th,
.legend td {
  text-align: left;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}

.legend th {
  color: var(--soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legend td:last-child,
.legend th:last-child {
  text-align: right;
}

.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Feature cards */
.feature-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Directory / popular links */
.dir-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .dir-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dir-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dir-link:hover {
  border-color: #99f6e4;
  background: #fff;
}

.dir-link strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.dir-link span {
  color: var(--muted);
  font-size: 0.88rem;
}

.dir-link .arrow {
  color: var(--soft);
  font-size: 1.1rem;
}

/* Bands / chart types */
.bands {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
}

@media (min-width: 640px) {
  .bands {
    grid-template-columns: repeat(5, 1fr);
  }
}

.band {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.band strong {
  display: block;
  font-size: 0.95rem;
}

.band span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.band-copy {
  display: grid;
  gap: 10px;
}

.band-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.band-copy strong {
  color: var(--ink);
}

/* Hub link cloud */
.hub-grid {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hub-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid transparent;
}

.hub-link:hover {
  border-color: var(--line);
  background: #fff;
}

/* Insight chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.chip b {
  color: var(--accent-2);
  font-weight: 700;
}

/* Caution / before you start */
.callouts {
  display: grid;
  gap: 10px;
}

.callout {
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 0 12px 12px 0;
  padding: 12px 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Content blocks */
.prose p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.prose-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 700px) {
  .prose-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.prose-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.prose-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--soft);
  font-weight: 500;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.footer-meta {
  display: grid;
  gap: 6px;
  max-width: 42rem;
}

.author-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--soft);
}

.author-note a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.store-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--soft);
}


/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: -12px 0 28px;
  font-size: 0.82rem;
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--accent-2);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.crumb-sep {
  color: var(--soft);
}

/* GEO answer blocks */
.answer-block .quick-answer {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.lead-sm {
  color: var(--muted);
  max-width: 40rem;
}

/* Comparison tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table th {
  background: #f1f5f9;
  font-weight: 650;
}
.compare-table tr:last-child td {
  border-bottom: 0;
}

.glossary-list {
  display: grid;
  gap: 16px;
}
.glossary-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.glossary-item:last-child {
  border-bottom: 0;
}
.glossary-item h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.15rem;
}
.glossary-item p {
  margin: 0;
  color: var(--ink-2);
}

.cta-band {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
