/* gwtrade.app v2 — feature pages (/features/**, /changelog/).
   Loaded per page through {% head %}. Builds on the tokens and components in site.css;
   only adds what the hub, the group pages, the deep dives and the changelog need.
   Sections: 1 hero extras · 2 hub · 3 module sections · 4 deep dives · 5 illustrations · 6 changelog */

/* 1. Hero extras --------------------------------------------------------- */

.feature-hero { padding-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.feature-hero h1 { max-width: 20ch; }
.feature-hero__media { margin-top: clamp(2rem, 1.5rem + 3vw, 3.5rem); }

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.75rem;
  list-style: none;
}
.jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  transition: border-color var(--t-micro) var(--ease-ui), color var(--t-micro) var(--ease-ui), background-color var(--t-micro);
}
.jump-nav a:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--surface-2); }
.jump-nav a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.75; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 1px;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
  overflow: hidden;
}
.stat-strip > div { padding: 16px 18px; background: var(--surface); }
.stat-strip b { display: block; font: 600 1.5rem/1.1 var(--font-mono); color: var(--text); letter-spacing: -0.02em; }
.stat-strip span { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }

.sim-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--dim);
}
.sim-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); opacity: 0.8; }

/* 2. Hub ------------------------------------------------------------------ */

.hub-group + .hub-group { margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.hub-group__head {
  display: grid;
  gap: 1rem 2rem;
  align-items: end;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) { .hub-group__head { grid-template-columns: 1.1fr 1fr auto; } }
.hub-group__head h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); }
.hub-group__head p { color: var(--muted); }
.hub-group__head .eyebrow { margin-bottom: 0.6rem; }

.tile-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ftile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t-ui) var(--ease-ui), transform var(--t-ui) var(--ease-out);
}
.ftile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.ftile__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: #0f1410; }
.ftile__media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 900ms var(--ease-out); }
.ftile:hover .ftile__media img { transform: scale(1.04); }
.ftile__media .mock { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.ftile__body { display: flex; flex-direction: column; gap: 0.35rem; padding: 16px 18px 18px; flex: 1; }
.ftile__body h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.ftile__body h3 .icon { width: 15px; height: 15px; color: var(--accent-text); margin-left: auto; transition: transform var(--t-ui) var(--ease-out); }
.ftile:hover .ftile__body h3 .icon { transform: translateX(3px); }
.ftile__body p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.ftile--wide { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .ftile--wide { flex-direction: row; }
  .ftile--wide .ftile__media { flex: 1.4; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 1px solid var(--line); }
  .ftile--wide .ftile__body { flex: 1; justify-content: center; padding: clamp(22px, 1rem + 2vw, 40px); gap: 0.6rem; }
  .ftile--wide .ftile__body h3 { font-size: 1.35rem; }
  .ftile--wide .ftile__body p { font-size: 0.98rem; }
}

/* 3. Module sections ------------------------------------------------------ */

.module + .module { border-top: 1px solid var(--line); }
.module h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem); }
.module .lead { margin-top: 1rem; }
.module__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.module__name .icon-tile { width: 32px; height: 32px; border-radius: 8px; }
.module__name .icon-tile .icon { width: 16px; height: 16px; }

.use-note {
  margin-top: 1.5rem;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  color: var(--text-2);
  font-size: 0.95rem;
}
.use-note strong { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); font-weight: 500; }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-text);
}
.more-link .icon { transition: transform var(--t-ui) var(--ease-out); }
.more-link:hover .icon { transform: translateX(3px); }

.shot--stack { display: grid; gap: 14px; }
.shot--stack .app-frame + .app-frame { width: 78%; margin-left: auto; margin-top: -18%; position: relative; }

.compact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.compact {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.compact__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: #0f1410; }
.compact__media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.compact__media .mock { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.compact__body { padding: clamp(18px, 1rem + 0.8vw, 26px); display: grid; gap: 0.6rem; align-content: start; }
.compact__body h3 { font-size: 1.15rem; }
.compact__body p { color: var(--muted); font-size: 0.94rem; }
.compact__body .check-list { gap: 0.45rem; font-size: 0.92rem; margin-top: 0.3rem; }

.related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.related a {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color var(--t-ui) var(--ease-ui), transform var(--t-ui) var(--ease-out);
}
.related a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.related b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.related b .icon { width: 14px; height: 14px; margin-left: auto; color: var(--accent-text); }
.related span { font-size: 0.86rem; color: var(--muted); }

/* 4. Deep dives ----------------------------------------------------------- */

.read-steps { display: grid; gap: 14px; counter-reset: read; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; }
.read-steps li {
  position: relative;
  padding: 20px 20px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  counter-increment: read;
}
.read-steps li::before {
  content: counter(read, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  color: var(--accent-text);
}
.read-steps h3 { font-size: 1.05rem; }
.read-steps p { margin-top: 6px; color: var(--muted); font-size: 0.92rem; }

.legend { display: grid; gap: 10px; list-style: none; }
.legend li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--text-2); font-size: 0.95rem; }
.legend li b { color: var(--text); font-weight: 600; }
.swatch-dot { width: 14px; height: 14px; margin-top: 0.3em; border-radius: 4px; background: var(--c, var(--accent)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 0 14px -2px var(--c, var(--accent)); }

.caveat {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}
.caveat .icon { color: var(--amber); margin-top: 0.15em; }

/* Annotated screenshot: numbered pins placed in percent of the image, so they track it at any width.
   Drawn in the app's colours: the screenshot is dark in both site themes. */
.annotated { position: relative; }
.annotated img { display: block; }
.pins { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-13px, -50%);
}
.pin b {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: #a3e635;
  color: #0b0f0c;
  font: 700 12px/1 var(--font-mono);
  box-shadow: 0 0 0 3px rgba(11, 15, 12, 0.85), 0 6px 18px rgba(0, 0, 0, 0.55);
}
.pin b::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #a3e635;
  opacity: 0;
}
.pin span {
  padding: 4px 9px;
  border: 1px solid rgba(163, 230, 53, 0.35);
  border-radius: 7px;
  background: rgba(11, 15, 12, 0.86);
  color: #f4f7f2;
  font: 500 12px/1.3 var(--font-mono);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* Labels on the right half point left, so they stay inside the image */
.pin--flip { flex-direction: row-reverse; transform: translate(calc(-100% + 13px), -50%); }
@media (prefers-reduced-motion: no-preference) {
  .pin b::after { animation: pin-ping 2.8s var(--ease-out, ease-out) infinite; }
  .pin:nth-child(2) b::after { animation-delay: 0.5s; }
  .pin:nth-child(3) b::after { animation-delay: 1s; }
  .pin:nth-child(4) b::after { animation-delay: 1.5s; }
  .pin:nth-child(5) b::after { animation-delay: 2s; }
}
@keyframes pin-ping { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
@media (max-width: 900px) { .pin span { display: none; } }
@media (max-width: 560px) {
  .pin { transform: translate(-9px, -50%); }
  .pin b { width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 2px rgba(11, 15, 12, 0.85); }
}

/* Numbered walkthrough that matches the pins */
.anatomy { display: grid; gap: 14px; counter-reset: anat; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.anatomy li {
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  counter-increment: anat;
}
.anatomy li::before {
  content: counter(anat);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0f0c;
  font: 700 12px/1 var(--font-mono);
}
.anatomy__time { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--accent-text); }
.anatomy h3 { font-size: 1.02rem; }
.anatomy p { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }

.theme-strip { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.theme-strip figure { margin: 0; }
.theme-strip .app-frame { border-radius: var(--r); }
.theme-strip figcaption { margin-top: 0.6rem; font-size: var(--fs-sm); color: var(--muted); }

/* 5. Illustrations (drawn in the app's own colours, so they stay dark like the screenshots) */

.mock {
  --m-bg: #0f1410;
  --m-surface: #19211a;
  --m-frame: #1e2a1e;
  --m-line: #2b3a2b;
  --m-text: #e8eee6;
  --m-muted: #8e988c;
  --m-lime: #a3e635;
  --m-red: #ff7d7d;
  --m-amber: #ffc440;
  --m-cyan: #22d3ee;
  --m-blue: #4aa3ff;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--m-line);
  background: #141b15;
  color: var(--m-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.mock__bar b { color: var(--m-amber); font-weight: 500; }
.mock__bar .live { color: var(--m-lime); }
.mock__bar .live::before { content: "● "; }
.mock__bar span:last-child { margin-left: auto; }
.mock__label {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--m-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* News feed */
.mock-news { list-style: none; }
.mock-news li { display: flex; gap: 12px; padding: 7px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-news li:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.mock-news time { color: var(--m-muted); flex: none; }
.mock-news mark { background: rgba(255, 196, 64, 0.16); color: var(--m-amber); padding: 0 3px; border-radius: 3px; }
.mock-news .hit { box-shadow: inset 2px 0 0 var(--m-amber); }

/* Connect AI panel */
.mock-connect { display: grid; place-items: center; padding: clamp(18px, 3vw, 44px); background:
  radial-gradient(ellipse 70% 60% at 50% 40%, rgba(132, 204, 22, 0.08), transparent 70%), var(--m-bg); }
.mock-connect__panel { width: min(100%, 560px); border: 1px solid var(--m-line); border-radius: 10px; background: var(--m-surface); box-shadow: 0 30px 80px -30px #000; }
.mock-connect__panel header { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--m-line); color: var(--m-text); }
.mock-connect__body { display: grid; gap: 10px; padding: 14px; color: var(--m-muted); }
.mock-connect__body p { color: var(--m-text); font-family: var(--font-ui); font-size: 13px; line-height: 1.5; }
.mock-connect__tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mock-connect__tabs span { padding: 3px 9px; border-radius: 5px; border: 1px solid var(--m-line); }
.mock-connect__tabs span.on { background: #243025; color: var(--m-lime); border-color: #3e5a2b; }
.mock-connect__row { display: flex; gap: 8px; align-items: center; }
.mock-connect__row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 9px; border-radius: 5px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-text); font-size: 11.5px; }
.mock-connect__row i { font-style: normal; padding: 6px 11px; border-radius: 5px; background: #243025; color: var(--m-text); border: 1px solid var(--m-line); }
.mock-connect__row i.go { background: var(--m-lime); color: #0f1410; border-color: transparent; font-weight: 600; }

/* Chat-style AI exchange */
.mock-chat { display: grid; gap: 12px; padding: 18px; font-family: var(--font-ui); font-size: 14px; }
.mock-chat__q { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: #243025; color: var(--m-text); }
.mock-chat__tool { font-family: var(--font-mono); font-size: 11.5px; color: var(--m-muted); }
.mock-chat__tool b { color: var(--m-cyan); font-weight: 500; }
.mock-chat__a { max-width: 92%; padding: 12px 14px; border-radius: 14px 14px 14px 4px; border: 1px solid var(--m-line); background: var(--m-surface); color: var(--m-text); }
.mock-chat__a em { font-style: normal; color: var(--m-muted); }

/* Ladder (GEX Pulse) */
.mock-ladder { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--m-line); }
.mock-ladder__col { background: var(--m-bg); padding: 10px 12px 14px; }
.mock-ladder__col h4 { margin: 0 0 8px; font: 500 11px/1 var(--font-mono); color: var(--m-muted); letter-spacing: 0.08em; display: flex; justify-content: space-between; }
.mock-ladder__col h4 b { color: var(--m-text); font-weight: 600; }
.mock-ladder__row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; height: 17px; color: var(--m-muted); font-size: 10.5px; }
.mock-ladder__row i { display: block; height: 11px; border-radius: 2px; background: var(--c); width: var(--w); justify-self: var(--side, start); opacity: 0.9; }
.mock-ladder__row.spot { color: var(--m-text); }
.mock-ladder__row.spot::after { content: ""; grid-column: 1 / -1; height: 1px; margin-top: -9px; background: var(--m-text); opacity: 0.5; }

/* Impact chart (News Impact) and generic SVG frame */
.mock-svg { display: block; width: 100%; height: auto; }
.mock-svg text { font-family: var(--font-mono); }

/* Command palette */
.mock-palette { padding: clamp(16px, 3vw, 32px); display: grid; place-items: center; background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(132, 204, 22, 0.07), transparent 70%), var(--m-bg); }
.mock-palette__box { width: min(100%, 460px); border: 1px solid var(--m-line); border-radius: 10px; background: var(--m-surface); overflow: hidden; box-shadow: 0 30px 80px -30px #000; }
.mock-palette__input { padding: 10px 14px; border-bottom: 1px solid var(--m-line); color: var(--m-text); }
.mock-palette__input::after { content: "▍"; color: var(--m-lime); animation: blink 1.1s steps(1) infinite; }
.mock-palette ul { list-style: none; padding: 6px; }
.mock-palette li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; color: var(--m-muted); }
.mock-palette li.on { background: #243025; color: var(--m-text); }
.mock-palette li small { font-size: 10.5px; color: var(--m-muted); }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mock-palette__input::after { animation: none; } }

/* ATAS chart */
.mock-atas { background: #0c0f14; }

/* 6. Changelog ------------------------------------------------------------ */

.releases { display: grid; gap: 0; list-style: none; }
.release { display: grid; gap: 1rem 2.5rem; padding-block: clamp(2rem, 1.5rem + 2vw, 3rem); border-top: 1px solid var(--line); }
.release:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 860px) { .release { grid-template-columns: 220px 1fr; } }
.release__meta { display: grid; gap: 8px; align-content: start; }
.release__ver { font: 600 1.6rem/1 var(--font-mono); letter-spacing: -0.02em; }
.release__date { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.release__body h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); }
.release__body > p { margin-top: 0.75rem; color: var(--text-2); }
.release__body h3 { margin-top: 1.75rem; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.release__body .check-list { margin-top: 0.9rem; }
.release__files { display: grid; gap: 8px; margin-top: 1.5rem; }
.release__files div { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: var(--fs-sm); }
.release__files code { border: 0; background: none; padding: 0; color: var(--text-2); word-break: break-all; }
.release__files span { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); overflow-wrap: anywhere; }

/* Long paths and hashes must wrap at phone width */
.read-steps code, .caveat code, .legend code { overflow-wrap: anywhere; word-break: break-word; }
.mock-svg { max-width: 100%; }
