/* The trading desk's own pages: the About page and the Options page's marks. Forms, tables, sentences and charts
   come from /ui.css (App page components). */

/* ------------------------------------------------ About this demo (about.html) */
.about {
  max-width: 980px;
  padding-bottom: 32px;
  font-size: var(--text-panel);
  line-height: 1.65;
  color: var(--text-color);
}

.about section {
  margin-top: 40px;
  scroll-margin-top: 16px;
}

.about h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about h3 {
  margin: 0 0 6px;
  font-size: var(--text-lead);
  font-weight: 600;
}

.about h3.sub { margin-top: 28px; }

.about p {
  max-width: 78ch;
  margin: 0 0 12px;
  color: var(--text-muted);
}

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

.about a { color: var(--accent); }

.about-lede {
  font-size: var(--text-lead);
  line-height: 1.6;
}

.about-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.about-toc a {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.about-toc a:hover { color: var(--text-color); border-color: var(--border-strong); text-decoration: none; }

.about-table { margin: 6px 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.about-table { table-layout: fixed; }
.about-table th,
.about-table td { width: 50%; height: auto; padding: 9px 16px; white-space: normal; }
.about-table td { vertical-align: top; color: var(--text-muted); }
.about-table td:first-child { color: var(--text-color); }

.idea {
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.idea .n,
.flow-steps b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-right: 8px;
  padding: 0 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--kind-task) 14%, transparent);
  color: var(--kind-task);
  font-size: var(--text-xs);
  font-weight: 600;
}

.flow-steps {
  display: grid;
  gap: 8px;
  max-width: 78ch;
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.flow-steps b { min-width: 0; margin-right: 10px; }

/* the tasks diagram: colours from the theme */
.about-figure {
  margin: 8px 0 20px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.about-figure svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--font-sans); }
.about-figure figcaption { margin-top: 10px; font-size: var(--text-sm); color: var(--text-subtle); }
.about-figure .col-title text { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; fill: var(--text-subtle); }
.about-figure .node rect { fill: var(--surface); stroke: var(--border-strong); }
.about-figure .node text { font-size: 13px; font-weight: 600; fill: var(--text-color); }
.about-figure .node text.s { font-size: 11px; font-weight: 400; fill: var(--text-muted); }
.about-figure .node.src rect { fill: color-mix(in srgb, var(--kind-ingested) 14%, var(--surface)); stroke: var(--kind-ingested); stroke-opacity: 0.6; }
.about-figure .node.task rect { fill: color-mix(in srgb, var(--kind-task) 14%, var(--surface)); stroke: var(--kind-task); stroke-opacity: 0.6; }
.about-figure .node.task.private rect { stroke-dasharray: 4 3; }
.about-figure .node.out rect { fill: color-mix(in srgb, var(--kind-computed) 14%, var(--surface)); stroke: var(--kind-computed); stroke-opacity: 0.6; }
.about-figure .node.out.warn rect { fill: var(--warning-bg); stroke: var(--amber); }
.about-figure a .node:hover rect { stroke-opacity: 1; stroke-width: 1.5; }
.about-figure .edge path { fill: none; stroke: var(--border-strong); stroke-width: 1.3; }
.about-figure .edge.strong path { stroke: var(--kind-task); stroke-opacity: 0.7; }
.about-figure .edge.out path { stroke: var(--accent); stroke-opacity: 0.45; }
.about-figure .ah { fill: var(--text-subtle); }
.about-figure .edge-label { font-size: 11px; font-style: italic; fill: var(--text-muted); }

.task-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 12px;
}

@media (max-width: 600px) { .task-cards { grid-template-columns: 1fr; } }

.task-card {
  margin: 0 !important;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.task-card h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.task-card h3 a { color: var(--text-color); text-decoration: none; }
.task-card h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.task-card h3 span { font-size: var(--text-xs); font-weight: 400; color: var(--text-subtle); }

.task-card dl,
.points {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
}

.task-card dt { font-size: var(--text-xs); font-weight: 600; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.task-card dd { margin: 0; color: var(--text-muted); font-size: var(--text-base); }

.points { max-width: 90ch; gap: 12px 20px; }
.points dt { font-weight: 600; color: var(--text-color); }
.points dd { margin: 0; color: var(--text-muted); }

@media (max-width: 700px) {
  .points { grid-template-columns: 1fr; gap: 4px; }
  .points dd { margin-bottom: 10px; }
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.benefits > div {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.benefits p { margin: 0; font-size: var(--text-base); }

.tour,
.caveats {
  display: grid;
  gap: 10px;
  max-width: 82ch;
  margin: 0;
  padding-left: 22px;
  color: var(--text-muted);
}

.tour li::marker { color: var(--kind-task); font-weight: 600; }

/* Options page: inline SVG charts in the kinds' colours (quotes ingested, fits computed), state only for checks */
.options-select { width: auto; min-width: 150px; margin-left: auto; }
.options-body { padding: 4px 16px 16px; }
.options-pad { padding: 0 16px; }
.options-explain { margin: 8px 0 6px; color: var(--text-muted); max-width: 90ch; font-size: var(--text-base); line-height: 1.55; }
.options-explain b { color: var(--text-color); font-weight: 600; }
.options-sentence { margin: 8px 0 10px; color: var(--text-color); max-width: 90ch; }
.options-sentence b { color: var(--text-color); font-weight: 600; font-variant-numeric: tabular-nums; }
.opt-mark { fill: var(--kind-ingested); stroke: var(--surface); stroke-width: 2; }
.opt-band { stroke: var(--kind-ingested); stroke-opacity: 0.35; stroke-width: 6; stroke-linecap: round; }
.opt-fit { fill: none; stroke: var(--kind-computed); stroke-width: 2; stroke-linejoin: round; }
.opt-atm { fill: var(--kind-computed); stroke: var(--surface); stroke-width: 2; }
.opt-forward, .opt-dvol { stroke: var(--text-subtle); stroke-width: 1; stroke-dasharray: 4 4; }
.page-chart-key.mark { width: 8px; height: 8px; border-radius: 50%; background: var(--kind-ingested); }
.page-chart-key.band { width: 6px; height: 12px; border-radius: 3px; background: var(--kind-ingested); opacity: 0.35; }
.page-chart-key.forward, .page-chart-key.dvol { background: none; border-top: 1px dashed var(--text-subtle); }
.options-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: var(--text-base); color: var(--text-muted); }
@media (max-width: 760px) { .options-select { margin-left: 0; width: 100%; } }

/* the stochastic-volatility line on the Options page: the two methods side by side, stacked on a phone */
.sv-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.sv-columns h3 { margin: 10px 0 2px; font-size: var(--text-base); font-weight: 600; color: var(--text-color); }
@media (max-width: 700px) { .sv-columns { grid-template-columns: 1fr; } }

/* the last ten minutes of the stochastic-volatility line: exact solid, network dotted; the check's gap against its
   bands; the two coins' surface gaps in neutral ink told apart by dash and label. Lines are steps: a value holds
   until the next arrives. */
.sv-chart-gap { margin-top: 14px; }
.opt-exact { fill: none; stroke: var(--kind-computed); stroke-width: 2; stroke-linejoin: round; }
.opt-network { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; stroke-linejoin: round; }
.opt-exact.es, .opt-network.es { stroke-opacity: 0.45; }
.opt-gap { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-linejoin: round; }
.opt-tol { fill: var(--text-subtle); fill-opacity: 0.1; }
.opt-zero { stroke: var(--border-strong); stroke-width: 1; }
.opt-se { fill: none; stroke: var(--text-subtle); stroke-width: 1; stroke-dasharray: 2 3; }
.opt-tolline { stroke: var(--text-subtle); stroke-width: 1; stroke-dasharray: 5 4; }
.opt-bad { fill: none; stroke: var(--danger-dot); stroke-width: 2.5; stroke-linejoin: round; }
.opt-coin { fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linejoin: round; }
.opt-coin.c1 { stroke-dasharray: 7 4; }
.opt-coin-label { fill: var(--text-muted); font-weight: 600; }
.page-chart-key.exact { background: var(--kind-computed); }
.page-chart-key.network { background: none; border-top: 2px dotted var(--chart-accent); height: 0; }
.page-chart-key.gap { background: var(--chart-accent); }
.page-chart-key.tol { width: 14px; height: 10px; background: var(--text-subtle); opacity: 0.2; }
.page-chart-key.se { background: none; border-top: 1px dashed var(--text-subtle); height: 0; }
.page-chart-key.tolline { background: none; border-top: 1px dashed var(--text-subtle); height: 0; }
.page-chart-key.bad { background: var(--danger-dot); }
.page-chart-key.coin { background: var(--text-muted); }
.page-chart-key.coin.c1 { background: none; border-top: 2px dashed var(--text-muted); height: 0; }
.opt-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.opt-toggle input { margin: 0; }

/* the stochastic-volatility guide: the two methods side by side, each on a quiet panel */
.sv-guide { padding-top: 4px; padding-bottom: 8px; }
.sv-guide .sv-columns { gap: 14px; margin-top: 10px; }
.sv-method { padding: 12px 16px 14px; border-radius: 10px; background: var(--surface-muted); }
.sv-method h3 { margin-top: 0 !important; }
.sv-method .points { gap: 6px 14px; font-size: var(--text-sm); }
