/* Answers pages only. Loaded after base.css, which holds the tokens,
   reset and base type. */

body {
  background: linear-gradient(var(--bg), var(--bg-mid));
  min-height: 100vh;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.answer-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.whale-home img {
  width: 3.5rem;
  height: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.whale-home:hover img { opacity: 1; }

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

.breadcrumb a { color: var(--accent); text-decoration: none; }

.breadcrumb a:hover { text-decoration: underline; }

h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.answer {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.answer > :last-child,
.answer li:last-child { margin-bottom: 0; }

h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 2.5rem 0 0.75rem;
}

p { margin-bottom: 1rem; }

ul, ol { margin: 0 0 1rem 1.25rem; }

li { margin-bottom: 0.4rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

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

th { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; color: var(--muted); }

/* A plain fold: a small mono summary line with a caret. Used by the calculator
   and the website planner. */

.fold-plain > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fold-plain > summary::-webkit-details-marker { display: none; }

.fold-plain > summary::after {
  content: "\25BE";
  color: var(--accent2);
  transition: transform 0.15s ease;
}

.fold-plain[open] > summary::after { transform: rotate(180deg); }

.fold-plain > summary:hover { color: var(--text); }

.cta {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 1.5rem;
  margin-top: 3rem;
}

.cta a {
  font-family: var(--mono);
  /* The <wbr /> after the @ is the intended break; this only catches a
     viewport too narrow for "cyberspaceroad.com" on a line of its own. */
  overflow-wrap: break-word;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
}

footer a { color: var(--muted); }

.more-answers {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
}

.more-answers h2 { margin-top: 0; }

.more-answers ul { list-style: none; margin-left: 0; }

.more-answers li { margin-bottom: 0.75rem; }

.home-return {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 3.5rem;
  padding: 1.5rem 1rem;
  text-decoration: none;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.home-return:hover { opacity: 1; }

.home-return img { width: 6rem; height: auto; }

.home-return-title {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1.1;
}

.home-return-sub {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}

.last-checked {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Reference pages carry a wider table than the 46rem column holds on a
   phone. The table scrolls inside its own box; the page never does. */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.table-scroll table {
  min-width: 34rem;
  margin-bottom: 0;
}

/* The chart on the carbon programme page. Inline SVG rather than an image
   file: a few kB, sharp at any size, and it takes the page's own tokens. */
.chart {
  margin: 0 0 2rem;
}

.chart svg,
.chart img {
  width: 100%;
  height: auto;
  display: block;
}

.chart text {
  font-family: var(--mono);
}

.chart-title {
  font-size: 18px;
  letter-spacing: 0.02em;
  fill: var(--text);
}

.chart figcaption {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 0.75rem;
}

.chart-credit {
  display: block;
  text-align: right;
  font-size: 0.72rem;
  margin-top: 0.5rem;
}

.chart-grid { stroke: var(--border); stroke-width: 1; }

.chart-axis { stroke: rgba(255,255,255,0.18); stroke-width: 1; }

.chart-ref {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 2 4;
  fill: none;
}

.chart-mean {
  stroke: var(--accent2);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  fill: none;
  stroke-linejoin: round;
}

.chart-median {
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linejoin: round;
}

.chart-dot-mean { fill: var(--accent2); }

.chart-dot-median { fill: var(--accent); }

.chart-tick { font-size: 14px; fill: var(--muted); }

.chart-ref-label { font-size: 15px; fill: var(--muted); }

.chart-value { font-size: 15px; fill: var(--text); }

.chart-year { font-size: 16px; fill: var(--text); }

.chart-n { font-size: 13px; fill: var(--muted); }

.chart-key { font-size: 15px; fill: var(--text); }

/* The roadmap diagram on the net zero roadmap page. Shares .chart for the
   figure, sizing and caption; these classes are the boxes and arrows. */
.diagram-box {
  fill: var(--panel);
  stroke: var(--border);
  stroke-width: 1;
}

.diagram-num {
  font-size: 12px;
  fill: var(--accent);
}

.diagram-label {
  font-size: 17px;
  fill: var(--text);
}

.diagram-detail {
  font-size: 13px;
  fill: var(--muted);
}

.diagram-arrow {
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
}

.diagram-head { fill: var(--accent); }

.diagram-loop {
  font-size: 13px;
  fill: var(--muted);
}

/* A photograph rather than a drawing. Shares .chart-credit for the
   attribution line; the caption sits under a full-column image. */
.photo {
  margin: 0 0 2rem;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.photo figcaption {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 0.75rem;
}
