/* DexcomCoupons.com — site styles */

:root {
  --green: #58a618;
  --green-dark: #467f11;
  --green-deep: #31640a;
  --green-tint: #eef7e4;
  --green-tint-2: #f6fbf0;
  --ink: #1f2933;
  --muted: #55606b;
  --faint: #8a94a0;
  --border: #e3e8e1;
  --bg: #ffffff;
  --bg-alt: #f7faf4;
  --amber-tint: #fdf6e7;
  --amber-border: #f0dfb6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 41, 51, 0.06), 0 8px 24px rgba(31, 41, 51, 0.07);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-dark); }
a:hover { color: var(--green-deep); }

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }

p, ul, ol { margin: 0 0 1.1em; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 780px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo svg { flex: none; }
.logo .tld { color: var(--faint); font-weight: 600; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 8px 10px;
  border-radius: 8px;
}

.site-nav a:hover { color: var(--ink); background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--green-deep); }

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--green-dark); }

.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

.btn-ghost {
  background: transparent;
  color: var(--green-deep) !important;
  border: 2px solid var(--green);
}

.btn-ghost:hover { background: var(--green-tint); }

.site-nav .btn { padding: 9px 18px; margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    gap: 2px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 10px; font-size: 1rem; }
  .site-nav .btn { margin: 10px 0 0; text-align: center; }
}

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--green-tint-2) 0%, var(--green-tint) 60%, #e4f2d4 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 60px;
}

.hero h1 { max-width: 720px; }

.hero .lede {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 1.6em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-list li { display: flex; align-items: center; gap: 7px; }

.tick {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* ---------- page hero (interior pages) ---------- */

.page-hero {
  background: var(--green-tint-2);
  border-bottom: 1px solid var(--border);
  padding: 38px 0 34px;
}

.page-hero h1 { margin-bottom: 0.3em; }

.meta-line {
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--faint);
  margin: 0 0 14px;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- content blocks ---------- */

.section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title { margin-top: 0; }

.kicker {
  display: inline-block;
  color: var(--green-deep);
  background: var(--green-tint);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  margin: 28px 0 8px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.6em; }
.card .more { font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

.card .badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-deep);
  background: var(--green-tint);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 10px;
}

/* quick answer / callout boxes */

.answer-box {
  background: var(--green-tint);
  border: 1px solid #cfe6b4;
  border-left: 5px solid var(--green);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 26px 0;
}

.answer-box p:last-child { margin-bottom: 0; }
.answer-box strong { color: var(--green-deep); }

.note-box {
  background: var(--amber-tint);
  border: 1px solid var(--amber-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 0.97rem;
}

.note-box p:last-child { margin-bottom: 0; }

/* steps */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 30px 0 10px;
  display: grid;
  gap: 18px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 22px 20px 66px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 { margin: 0 0 4px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* tables */

.table-scroll { overflow-x: auto; margin: 26px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
  min-width: 560px;
}

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

th {
  background: var(--green-tint-2);
  color: var(--green-deep);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td { border-bottom: none; }
td strong { color: var(--ink); }

/* article layout */

.article { padding: 44px 0 20px; }
.article > .wrap { max-width: 780px; }

.article ul li, .article ol li { margin-bottom: 0.4em; }

.article .toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 8px 0 30px;
  font-size: 0.95rem;
}

.article .toc strong { display: block; margin-bottom: 6px; }
.article .toc ol { margin: 0; padding-left: 20px; }
.article .toc a { text-decoration: none; }
.article .toc a:hover { text-decoration: underline; }

/* FAQ */

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 20px;
  list-style: none;
  position: relative;
  padding-right: 44px;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--green);
  font-weight: 700;
}

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

.faq-item .faq-body { padding: 0 20px 16px; color: var(--muted); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* CTA band */

.cta-band {
  background: linear-gradient(135deg, var(--green-deep), var(--green-dark) 55%, var(--green));
  color: #fff;
  padding: 52px 0;
}

.cta-band h2 { margin-top: 0; color: #fff; }
.cta-band p { color: #e8f4da; max-width: 620px; }

.cta-band .btn {
  background: #fff;
  color: var(--green-deep) !important;
}

.cta-band .btn:hover { background: var(--green-tint); }

.cta-band .cta-note { font-size: 0.9rem; color: #cbe6ab; margin-top: 14px; }

/* ---------- footer ---------- */

.site-footer {
  background: #17211a;
  color: #b9c4bb;
  padding: 48px 0 30px;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 34px;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.site-footer a { color: #cfdccf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-legal {
  border-top: 1px solid #2c3a2f;
  padding-top: 22px;
  font-size: 0.83rem;
  color: #8d998f;
  line-height: 1.7;
}

.footer-legal p { margin-bottom: 0.8em; }

/* misc */

.updated-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--faint);
  font-weight: 600;
}

hr.soft {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus { left: 10px; top: 10px; }
