/* The feature pages: one per thing the product does.
 *
 * Written as ordinary semantic markup with classes, not as the inline-styled blocks the rest of the
 * site inherited from the design export. These pages are the ones meant to be found by search and
 * then read end to end, so they are long-form prose — and long-form prose written with inline styles
 * on every paragraph is unmaintainable the moment there are six of them.
 *
 * Mobile-first, like the rest: the base rules are the phone, and the media queries add width.
 */

.feature {
  max-width: 760px;
  margin-inline: auto;
  padding: 0 var(--gutter-xs) 100px;
}

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

.feature__hero {
  padding: 56px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature__hero h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.feature__lede {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.feature__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* -- Body ---------------------------------------------------------------------------------------- */

/* **The shorthand is deliberate.** `base.css` styles the bare `section` element with a
   `padding-inline` gutter, which every section on this page inherited — so the body sat 32px to the
   right of the hero, which is a `header` and escapes that rule. Setting only `padding-top` here
   leaves the inherited horizontal padding in place; the shorthand clears it. */
.feature__section {
  padding: 44px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature__section h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.feature__section h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature__section p {
  margin: 0;
  font-size: 1.0125rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}

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

/* Numbered steps. The counter is drawn rather than using the list marker so it can be a brand-tinted
   disc that lines up with the text baseline at every size. */
.feature__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature__steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  font-size: 1.0125rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.feature__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  color: var(--brand-light);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

.feature__steps li b { color: var(--text); font-weight: 600; }

/* A worked example, set apart because it carries the numbers the prose refers to. */
.feature__example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature__example h3 { font-size: 0.95rem; }

.feature__example dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 16px;
  font-size: 0.95rem;
}

.feature__example dt { color: var(--text-muted); }

.feature__example dd {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* **The honest bit.** Every feature page says what the feature does not do, which is the section a
   trading product is most tempted to leave out — and the one a reader is actually looking for. */
.feature__limits {
  border-left: 2px solid color-mix(in srgb, var(--warning) 55%, transparent);
  padding-left: 20px;
}

.feature__faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature__faq details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.feature__faq summary {
  cursor: pointer;
  font-size: 1.0125rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  transition: color 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.feature__faq summary::-webkit-details-marker { display: none; }

.feature__faq summary::after {
  content: '+';
  flex: 0 0 auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.15rem;
  color: var(--brand-light);
}

/* These rows are borderless, so the question itself answers the pointer. */
.feature__faq summary:hover { color: var(--brand-lighter); }

.feature__faq details[open] summary::after { content: '\2212'; }

.feature__faq details p {
  margin: 12px 0 2px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* -- Sibling links, so every feature page is one click from the other five --------------------- */

.feature__next {
  padding: 52px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature__next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.feature__next-grid a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.feature__next-grid a:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  transform: translateY(-2px);
}

.feature__next-grid strong { font-size: 1rem; font-weight: 600; color: var(--text); }
.feature__next-grid span { font-size: 0.9rem; line-height: 1.5; color: var(--text-dim); }

@media (min-width: 600px) {
  .feature { padding-inline: var(--gutter-sm); }
  .feature__hero { padding-top: 76px; }
  .feature__next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .feature__section { padding-top: 56px; }
}

/* -- The example path chart (entry-check page) ---------------------------------------------------- */

/* Inline SVG rather than an image, so it takes the page's own tokens and follows the theme. A
   screenshot of the app's dark chart would sit on a white page looking like a hole. */
.path-figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }

.path-chart { width: 100%; height: auto; overflow: visible; }

.pc-grid { stroke: var(--border); stroke-width: 1; }
.pc-axis { stroke: var(--border-strong); stroke-width: 1; }

.pc-ylabel,
.pc-xlabel,
.pc-xtitle,
.pc-callout {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  fill: var(--text-dim);
}

.pc-ylabel { text-anchor: end; }
.pc-xlabel { text-anchor: middle; }
.pc-xtitle { text-anchor: middle; font-family: var(--font-sans); fill: var(--text-dim); }

.pc-band { fill: color-mix(in srgb, var(--brand) 17%, transparent); stroke: none; }

.pc-signal {
  fill: none;
  stroke: var(--brand-light);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dashed and muted: it is the thing being compared against, not a second result. */
.pc-baseline {
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 1.75;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
}

.pc-dot { fill: var(--brand-light); }
.pc-callout { fill: var(--brand-light); font-weight: 600; text-anchor: end; }
.pc-callout--dim { fill: var(--text-dim); font-weight: 500; }

.path-figure__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.path-key { display: inline-flex; align-items: center; gap: 8px; }

.path-key::before {
  content: '';
  width: 16px;
  height: 3px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.path-key--signal::before { background: var(--brand-light); }
.path-key--baseline::before {
  background: repeating-linear-gradient(90deg,
    var(--text-dim) 0 5px, transparent 5px 9px);
}
.path-key--band::before {
  height: 11px;
  background: color-mix(in srgb, var(--brand) 17%, transparent);
}

.path-figure__note { font-size: 0.875rem !important; color: var(--text-dim) !important; }
