/* Page styles. Colour tokens, header, navigation, footer and the theme toggle live in /css/site.css. */

* {
  box-sizing: border-box;
  }

html {
scroll-behavior: smooth;
}

body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-body);
-webkit-font-smoothing: antialiased;
line-height: 1.6;
}

a {
color: var(--blue);
text-decoration: none;
}

a:hover {
text-decoration: underline;
text-decoration-color: var(--lime);
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}

:focus-visible {
outline: 2px solid var(--blue);
outline-offset: 3px;
}

/* --------------------------------
Layout
-------------------------------- */

.wrap {
max-width: 1180px;
margin: 0 auto;
padding: 16px 24px 60px;
}

main {
max-width: 900px;
margin: 0 auto;
}

/* --------------------------------
Hero
-------------------------------- */

.page-hero {
padding: 52px 0 42px;
border-bottom: 1px solid var(--line);
}

.eyebrow {
margin: 0 0 12px;

font-family: var(--font-mono);
font-size: 11px;
font-weight: 500;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--gold);
}

.page-hero h1 {
max-width: 850px;
margin: 0 0 18px;

font-family: var(--font-display);
font-size: clamp(34px, 5vw, 52px);
font-weight: 700;
line-height: 1.08;
letter-spacing: -0.02em;
color: var(--navy);
}

.page-hero .lead {
max-width: 680px;
margin: 0;

color: var(--muted);
font-size: 17px;
line-height: 1.65;
}

/* --------------------------------
Content
-------------------------------- */

.content {
padding: 42px 0;
}

.content section {
margin-bottom: 42px;
}

.content h2 {
margin: 0 0 12px;

font-family: var(--font-display);
font-size: 25px;
font-weight: 600;
line-height: 1.2;
color: var(--navy);
}

.content h3 {
margin: 28px 0 8px;

font-family: var(--font-display);
font-size: 18px;
font-weight: 600;
color: var(--navy);
}

.content p {
max-width: 72ch;
margin: 0 0 15px;

color: var(--text);
font-size: 15px;
line-height: 1.75;
}

.content ul,
.content ol {
max-width: 72ch;
margin: 14px 0 18px;
padding-left: 22px;
}

.content li {
margin-bottom: 8px;
padding-left: 4px;
color: var(--text);
line-height: 1.65;
}

/* --------------------------------
Panels
-------------------------------- */

.panel {
margin: 24px 0;
padding: 24px;

background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius-md);
}

.panel h2,
.panel h3 {
margin-top: 0;
}

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

/* --------------------------------
Feature Grid
-------------------------------- */

.feature-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;

margin: 24px 0;
}

.feature {
padding: 20px;

background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius-md);
}

.feature-number {
margin-bottom: 10px;

font-family: var(--font-mono);
font-size: 11px;
color: var(--gold);
letter-spacing: 0.05em;
}

.feature h3 {
margin: 0 0 7px;

font-family: var(--font-display);
font-size: 17px;
color: var(--navy);
}

.feature p {
margin: 0;
font-size: 13.5px;
line-height: 1.6;
color: var(--muted);
}

/* --------------------------------
Calculation / Formula
-------------------------------- */

.formula {
margin: 28px 0;
padding: 22px;

background: var(--navy);
border-radius: var(--radius-md);

color: #FFFFFF;
font-family: var(--font-mono);
font-size: 14px;
line-height: 1.8;
text-align: center;
}

.formula strong {
font-weight: 600;
}

/* --------------------------------
Tables
-------------------------------- */

.table-wrap {
overflow-x: auto;
margin: 24px 0;
border: 1px solid var(--line);
border-radius: var(--radius-md);
background: var(--panel);
}

table {
width: 100%;
border-collapse: collapse;
min-width: 540px;
}

th,
td {
padding: 13px 16px;
border-bottom: 1px solid var(--line);
text-align: left;
font-size: 13.5px;
}

th {
background: var(--panel-2);

font-family: var(--font-display);
font-weight: 600;
color: var(--navy);
}

td {
color: var(--text);
}

tr:last-child td {
border-bottom: none;
}

.total-row td {
font-weight: 600;
color: var(--navy);
}

.number {
font-family: var(--font-mono);
text-align: right;
}

/* --------------------------------
Highlight
-------------------------------- */

.highlight {
padding: 22px 24px;

background: var(--gold-dim);
border-left: 4px solid var(--gold);
border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight p {
margin: 0;
}

.highlight strong {
color: var(--navy);
}

/* --------------------------------
Blue CTA
-------------------------------- */

.cta {
margin: 46px 0 20px;
padding: 32px;

background: var(--blue-dim);
border: 1px solid var(--line);
border-radius: var(--radius-md);
}

.cta h2 {
margin: 0 0 10px;
}

.cta p {
color: var(--muted);
}

.button {
display: inline-flex;
align-items: center;
justify-content: center;

margin-top: 8px;
padding: 11px 17px;

background: var(--lime);
border-radius: var(--radius-sm);

color: var(--lime-ink);
font-size: 13px;
font-weight: 600;
}

.button:hover {
text-decoration: none;
filter: brightness(1.08);
}

/* --------------------------------
Small labels
-------------------------------- */

.tag {
display: inline-block;

padding: 4px 8px;

background: var(--panel-2);
border: 1px solid var(--line);
border-radius: 999px;

font-family: var(--font-mono);
font-size: 10.5px;
color: var(--muted);
}

/* --------------------------------
Responsive
-------------------------------- */

@media (max-width: 800px) {

.page-hero {
padding: 38px 0 32px;
}

.page-hero h1 {
font-size: 36px;
}

.feature-grid {
grid-template-columns: 1fr;
}

}

@media (max-width: 520px) {

.wrap {
padding-left: 18px;
padding-right: 18px;
}

.page-hero h1 {
font-size: 31px;
}

.page-hero .lead {
font-size: 15px;
}

.content {
padding: 32px 0;
}

.content h2 {
font-size: 22px;
}

.panel,
.cta {
padding: 20px;
}

}

/* --------------------------------
Additions: current-page nav state, hero button, tables
-------------------------------- */

.page-hero .button {
margin-top: 24px;
}

.panel .tag {
margin-right: 6px;
}

.content th.number {
font-family: var(--font-display);
}

/* --------------------------------
Dark theme adjustments (tokens are defined in site.css)
-------------------------------- */

:root[data-theme="dark"] .formula {
background: var(--panel-2);
border: 1px solid var(--line);
color: var(--text);
}

/* .button is lime with near-black text in both themes (see site.css) */
