/* ──────────────────────────────────────────────────────────────────────────
   Article styles for /guides and /compare. Loaded AFTER /tools/tools.css and
   only adds what long-form pages need that the calculators never did: prose
   rhythm, a lead answer box, comparison tables, and a sources list. Every
   color, radius and font comes from the tokens tools.css already declares,
   so a token change there carries through here with no edit.
   ────────────────────────────────────────────────────────────────────────── */

.article {
  max-width: 74ch;
  padding-bottom: 24px;
}

.article h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0.015em;
  margin: 8px 0 20px;
}

.article h1 span {
  color: var(--green);
}

.article h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.015em;
  margin: 56px 0 16px;
}

.article h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 28px 0 8px;
}

.article p,
.article li {
  color: var(--text-2);
  font-weight: 300;
  font-size: 1.04rem;
  line-height: 1.7;
}

.article p + p {
  margin-top: 14px;
}

.article strong {
  color: var(--text);
  font-weight: 500;
}

.article ul,
.article ol {
  margin: 12px 0 0 1.3em;
  display: grid;
  gap: 8px;
}

.article p a,
.article li a,
.article td a,
.sources a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border-strong);
  transition: color var(--dur-fast), text-decoration-color var(--dur-fast);
}

.article p a:hover,
.article li a:hover,
.article td a:hover,
.sources a:hover {
  color: var(--green);
  text-decoration-color: var(--green);
}

.byline {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The two sentence answer that sits above everything else. Written for the
   reader who leaves after one paragraph, and for search snippets. */
.answer {
  margin: 8px 0 8px;
  padding: 22px 24px;
  background: var(--green-bg);
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: var(--radius-lg);
}

.answer p {
  color: var(--text);
  font-weight: 400;
}

.answer .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}

/* A worked example or a template to copy. */
.box {
  margin: 20px 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.box pre {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text);
}

/* Comparison tables scroll sideways inside their own box on a phone rather
   than pushing the page wider than the screen. */
.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.5;
}

.compare-table thead th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.86rem;
}

.compare-table tbody th {
  color: var(--text);
  font-weight: 500;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}

.table-note {
  font-size: 0.82rem !important;
  color: var(--muted) !important;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.two-col .box {
  margin: 0;
}

.two-col h3 {
  margin-top: 0;
}

.sources {
  margin: 12px 0 0 1.3em;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding-bottom: 24px;
}

.article-faq {
  padding-top: 40px;
}
