:root {
  --ink: #17211b;
  --muted: #5c6961;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --line: #dfe5de;
  --green: #12614b;
  --green-dark: #0b4636;
  --green-soft: #e8f2ed;
  --sand: #f2eee5;
  --amber: #a85d1a;
  --shadow: 0 18px 55px rgba(20, 45, 34, 0.08);
  --radius: 18px;
  --content: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }
button, input, textarea { font: inherit; }

:focus-visible {
  outline: 3px solid #e19a4b;
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 229, 222, 0.92);
  background: rgba(251, 252, 248, 0.94);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(calc(100% - 36px), var(--content));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px 10px 10px 3px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 620;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }

.container {
  width: min(calc(100% - 36px), var(--content));
  margin-inline: auto;
}

.narrow { width: min(calc(100% - 36px), 760px); margin-inline: auto; }

.eyebrow, .kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.55rem, 7vw, 5.7rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.2em; }

.hero {
  padding: clamp(74px, 12vw, 142px) 0 clamp(70px, 10vw, 116px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 20%, rgba(18, 97, 75, 0.12), transparent 26rem),
    linear-gradient(180deg, #fbfcf8 0%, #f6f8f3 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: clamp(50px, 10vw, 130px);
  align-items: end;
}

.hero h1 { max-width: 850px; margin-bottom: 24px; }
.hero-copy { max-width: 720px; color: #3e4b43; font-size: clamp(1.08rem, 2vw, 1.28rem); }
.hero-note {
  padding: 24px 0 2px;
  border-top: 1px solid #bfcac1;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-note strong { display: block; margin-bottom: 7px; color: var(--ink); }

.topic-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.topic-row span, .tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #cfd8d0;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: #46544b;
  font-size: 0.77rem;
  font-weight: 680;
  line-height: 1;
}

.section { padding: clamp(68px, 10vw, 116px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}
.section-heading h2 { max-width: 680px; margin-bottom: 0; }
.section-heading p { max-width: 400px; margin: 0; color: var(--muted); }

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

.article-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 33, 27, 0.02);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.article-card:hover { transform: translateY(-4px); border-color: #bac9be; box-shadow: var(--shadow); }
.article-card .card-number { color: #93a099; font-family: Georgia, serif; font-size: 1rem; }
.article-card h3 { margin: 44px 0 14px; font-size: 1.65rem; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card p { color: var(--muted); }
.article-card .card-meta { margin-top: auto; padding-top: 18px; color: var(--green); font-size: 0.82rem; font-weight: 700; }

.principles { background: var(--green-dark); color: #eff7f2; }
.principles .eyebrow { color: #a9d8c8; }
.principles h2 { color: #fff; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 46px; }
.principle { padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.22); }
.principle h3 { margin-bottom: 10px; color: #fff; }
.principle p { margin-bottom: 0; color: #cadbd3; font-size: 0.95rem; }

.page-hero { padding: clamp(64px, 10vw, 108px) 0 58px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; margin-bottom: 24px; font-size: clamp(2.5rem, 7vw, 4.8rem); }
.page-hero .lede { max-width: 760px; color: #425047; font-size: 1.18rem; }

.article-header { padding: clamp(60px, 9vw, 105px) 0 48px; }
.article-header h1 { max-width: 910px; margin-bottom: 25px; font-size: clamp(2.5rem, 7vw, 5rem); }
.article-header .dek { max-width: 760px; color: #46544b; font-size: 1.2rem; }
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.86rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 240px;
  gap: clamp(45px, 8vw, 110px);
  align-items: start;
  padding-bottom: 100px;
}

.article-body { font-size: 1.04rem; }
.article-body h2 { margin: 2.2em 0 0.55em; font-size: clamp(1.7rem, 4vw, 2.35rem); }
.article-body h3 { margin: 1.8em 0 0.45em; font-size: 1.35rem; }
.article-body ul, .article-body ol { margin: 0 0 1.5em; padding-left: 1.35em; }
.article-body li { margin-bottom: 0.65em; }
.article-body strong { color: #0e3f31; }
.article-body hr { margin: 46px 0; border: 0; border-top: 1px solid var(--line); }
.article-body blockquote {
  margin: 32px 0;
  padding: 22px 25px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  color: #2c4438;
}

.note, .disclosure-note {
  margin: 30px 0;
  padding: 21px 23px;
  border: 1px solid #cedbd1;
  border-radius: 12px;
  background: var(--green-soft);
  color: #30463b;
  font-size: 0.94rem;
}
.disclosure-note { border-color: #dfd6c3; background: var(--sand); }
.note p:last-child, .disclosure-note p:last-child { margin-bottom: 0; }

.table-wrap { margin: 28px 0 36px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f2f5f1; color: #35443b; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}
.product-link::after { content: "↗"; font-size: 0.9em; }

/* Credit estimator (article: browse-ai-credits-calculator) */
.calc {
  margin: 34px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 33, 27, 0.02);
  overflow: hidden;
}
.calc-inner { padding: clamp(18px, 4vw, 28px); }
.calc h3 { margin: 0 0 10px; font-size: 1.3rem; }
.calc-intro { margin: 0 0 22px; color: var(--muted); font-size: 0.88rem; }

.calc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 18px 22px;
}
.calc-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}
.calc-field input[type="number"] {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8d0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}
.calc-field input[type="number"]:disabled { background: #f2f4ef; color: var(--muted); }
.calc-help { margin: 6px 0 0; color: var(--muted); font-size: 0.79rem; line-height: 1.5; }

.calc-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.calc-quick-label { color: var(--muted); font-size: 0.79rem; font-weight: 700; }
.calc-chip {
  padding: 7px 11px;
  border: 1px solid #cfd8d0;
  border-radius: 999px;
  background: #fff;
  color: #46544b;
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
}
.calc-chip:hover { border-color: var(--green); color: var(--green); }

.calc-premium { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc-check { display: flex; align-items: center; gap: 9px; }
.calc-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.calc-check label { margin: 0; font-size: 0.9rem; font-weight: 700; }
.calc-premium-field { max-width: 320px; margin-top: 16px; }
.calc-premium-field[hidden] { display: none; }

.calc-results {
  padding: clamp(18px, 4vw, 28px);
  border-top: 1px solid var(--line);
  background: #f7faf7;
}
.calc .calc-results-title { margin: 0 0 16px; font-size: 1.15rem; }
.calc-empty { margin: 0; color: var(--muted); font-size: 0.92rem; }

.calc-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}
.calc-figure {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.calc-figure-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.calc-figure-unit { color: var(--muted); font-size: 0.82rem; }
.calc-figure-label {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.calc-verdict {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 12px;
  background: #fff;
  font-size: 0.94rem;
}
.calc-verdict p { margin: 0; }
.calc-verdict p + p { margin-top: 10px; }
.calc-verdict--free { border-color: #bcd8cb; border-left-color: var(--green); background: var(--green-soft); }
.calc-verdict--tight { border-color: #e3d3ba; border-left-color: var(--amber); background: #faf2e6; }
.calc-verdict--paid { border-color: #d6ddd6; border-left-color: #7d8b82; background: #f1f4f0; }
.calc-plan { color: #30463b; }
.calc-verdict .calc-plan-note { margin-top: 8px; color: var(--muted); font-size: 0.85rem; }

.calc-breakdown { margin-top: 18px; }
.calc-breakdown h4 {
  margin: 0 0 9px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.calc-breakdown ul { margin: 0; padding: 0; list-style: none; }
.calc-breakdown li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 14px;
  margin-bottom: 0;
  padding: 8px 0;
  border-bottom: 1px solid #e4eae3;
  font-size: 0.88rem;
}
.calc-breakdown li:last-child { border-bottom: 0; }
.calc-row-label { font-weight: 700; }
.calc-row-value { color: var(--muted); }

.calc-drivers { margin-top: 16px; }
.calc-drivers p {
  margin: 0 0 10px;
  color: #30463b;
  font-size: 0.88rem;
  line-height: 1.55;
}
.calc-drivers p:last-child { margin-bottom: 0; }

.calc-notes {
  padding: clamp(16px, 3.5vw, 22px) clamp(18px, 4vw, 28px);
  border-top: 1px solid var(--line);
  background: var(--sand);
}
.calc .calc-notes-title {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6b6250;
}
.calc-notes ul { margin: 0; padding-left: 1.15em; }
.calc-notes li { margin-bottom: 0.5em; color: #4c5548; font-size: 0.82rem; line-height: 1.55; }
.calc-notes li:last-child { margin-bottom: 0; }

.article-aside {
  position: sticky;
  top: 100px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}
.article-aside strong { display: block; margin-bottom: 10px; color: var(--ink); }
.article-aside a { display: block; margin: 7px 0; color: var(--muted); text-decoration: none; }
.article-aside a:hover { color: var(--green); }
.article-aside .aside-rule { margin: 22px 0; border-top: 1px solid var(--line); }

.policy-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 70px; padding: 70px 0 105px; }
.policy-grid aside { color: var(--muted); font-size: 0.92rem; }
.policy-content section + section { margin-top: 48px; padding-top: 42px; border-top: 1px solid var(--line); }
.policy-content h2 { margin-bottom: 16px; font-size: 2rem; }
.policy-content h3 { margin: 26px 0 8px; font-size: 1.28rem; }
.policy-content ul { padding-left: 1.3em; }
.policy-content li { margin-bottom: 0.65em; }

.contact-card {
  margin: 34px 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.contact-card h2 { font-size: 1.7rem; }

.site-footer { border-top: 1px solid var(--line); background: #f2f4ef; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 55px;
  padding: 58px 0 45px;
}
.footer-grid h2 { margin-bottom: 13px; font-size: 1.35rem; }
.footer-grid h3 { margin-bottom: 15px; font-family: inherit; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-grid p { max-width: 430px; color: var(--muted); font-size: 0.9rem; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #46544b; font-size: 0.9rem; text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.footer-bottom { padding: 18px 0 28px; border-top: 1px solid #d8ded7; color: #69756e; font-size: 0.78rem; }

@media (max-width: 860px) {
  .hero-grid, .article-layout, .policy-grid { grid-template-columns: 1fr; }
  .hero-note { max-width: 500px; }
  .article-grid, .principle-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .article-aside nav { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
  .article-aside .aside-rule { display: none; }
  .policy-grid { gap: 25px; }
}

@media (max-width: 680px) {
  .site-header { position: static; }
  .nav-shell { min-height: auto; padding: 17px 0; align-items: flex-start; flex-direction: column; gap: 14px; }
  .site-nav { width: 100%; gap: 0; justify-content: space-between; overflow-x: auto; }
  .site-nav a { padding: 7px 10px 7px 0; font-size: 0.84rem; white-space: nowrap; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .article-card h3 { margin-top: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .article-aside nav { grid-template-columns: 1fr; }
  .table-wrap { margin-inline: -18px; border-left: 0; border-right: 0; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
