/* ─── Matematiikka page overrides ─── */
.container {
  max-width: 800px;
}

header {
  padding: 3rem 0 2.5rem;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.15;
}

.subtitle {
  margin-top: 0.75rem;
}

.header-stripe {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--orange-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--orange); }
.back-link svg { width: 16px; height: 16px; }

/* ─── Content sections ─── */
.content-section {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.5rem;
  border-top: 4px solid var(--orange);
}

.section-header .icon {
  width: 18px;
  height: 18px;
  color: var(--orange);
  opacity: 1;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.section-body {
  padding: 1.5rem;
  border-top: 2px solid var(--border);
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h3 {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--orange);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h3:first-child { margin-top: 0; }

p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

strong { color: var(--text); font-weight: 600; }

/* ─── Concept cards ─── */
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .concept-grid { grid-template-columns: 1fr; }
}

.concept-card {
  padding: 1rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 0;
}

.concept-card .concept-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.concept-card p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* ─── Formula blocks ─── */
.formula {
  background: var(--bg);
  border: 2px solid var(--border);
  border-left: 5px solid var(--orange);
  border-radius: 0;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.7;
  overflow-x: auto;
}

.formula .comment {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ─── Example blocks ─── */
.example {
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.25rem;
  margin: 0.8rem 0;
}

.example-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.example-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}
.example-table td {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.example-table td:first-child {
  color: var(--text-secondary);
  width: 45%;
}
.example-table td:last-child {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 500;
}

.example-calc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.9;
}
.example-calc .result {
  color: var(--orange);
  font-weight: 700;
}
.example-calc .negative { color: var(--red); }
.example-calc .positive { color: var(--green); }

.example-verdict {
  margin-top: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
}
.example-verdict.negative {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}
.example-verdict.positive {
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
}

/* ─── Info list ─── */
.info-list {
  list-style: none;
  margin: 0.5rem 0;
}
.info-list li {
  padding: 0.5rem 0 0.5rem 1.2rem;
  position: relative;
  font-size: 0.84rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; }
.info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 0;
}

/* ─── Verdict table ─── */
.verdict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0.5rem 0;
}
.verdict-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.verdict-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.verdict-table td:last-child { font-weight: 500; }
.verdict-table .v-positive { color: var(--green); }
.verdict-table .v-neutral { color: var(--orange); }
.verdict-table .v-negative { color: var(--red); }

/* ─── Footer override ─── */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
}
footer p {
  line-height: 1.6;
}
