/* Features page (features_page.py): the loop as a ring on desktop, stacked steps on phones. Eva identity: paper, 2px ink outline, flat colour.
   Phase hues are lines, rims and numbers only, never large fills. */
:root {
  --ph1: #0e8c86; --ph2: #6f42d6; --ph3: #c2367e; --ph4: #a0522d; --ph5: #3f5e96;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
:root[data-theme='dark'] { --ph1: #3ec9c1; --ph2: #a78bfa; --ph3: #f472b6; --ph4: #e08a5a; --ph5: #8fa9da; }

/* ---------- shared pieces ---------- */
.fx-ph { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 13px var(--font-data); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }

/* ---------- feature lists ---------- */
.fx-items { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.fx-items li { padding-left: 16px; box-shadow: inset 2px 0 0 var(--ph, var(--line)); }
.fx-items h3 { margin: 0; font-size: 17px; font-weight: 600; }
.fx-items p { margin: 6px 0 0; color: var(--ink-body); font-size: 15.5px; line-height: 1.55; max-width: 56ch; }


/* ---------- B: the loop as a ring ---------- */
.fp-wrap { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 48px; }
.fp-ring { position: sticky; top: 110px; aspect-ratio: 1; width: 100%; }
.fp-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink-faint); }
.fp-arcs path { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.fp-mascot { position: absolute; left: 50%; top: 44%; width: 22%; height: auto; transform: translate(-50%, -50%); }
.fp-node { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; border: var(--stroke) solid var(--outline); background: var(--surface); color: var(--ink); font: 600 15px var(--font-ui); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.fp-node .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ph); color: var(--ph); font: 600 12px var(--font-data); }
.fp-node[aria-selected='true'] { background: var(--ink); color: var(--surface); }
.fp-node[aria-selected='true'] .num { background: var(--surface); }
.fp-node:active { transform: translate(-50%, -50%) scale(0.97); }
@media (hover: hover) and (pointer: fine) { .fp-node:hover:not([aria-selected='true']) { background: var(--band); } }
.fp-node:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.fp-panel h2 { margin: 14px 0 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; max-width: 20ch; }
.fp-panel:not([hidden]) { animation: fp-in 240ms var(--ease-out); }
@keyframes fp-in { from { opacity: 0; transform: translateY(6px); } }
/* Phone: direction 1's stacked story instead of the ring. */
@media (max-width: 960px) {
  .fp-wrap { grid-template-columns: 1fr; gap: 0; padding-top: 8px; }
  .fp-ring { display: none; }
  .fp-panel { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 88px; }
  .fp-panel:first-child { border-top: 0; }
  .fp-panel:not([hidden]) { animation: none; }
}

/* menu icons in the phase circle */
.fp-node .num svg { display: block; }
.fp-more { padding-top: 40px; }
.fp-more-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.fp-more-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: var(--stroke) solid var(--outline); border-radius: 14px; background: var(--surface); color: var(--ink); transition: background-color 160ms ease; }
.fp-more-card svg { flex: none; margin-top: 2px; color: var(--ink-muted); }
.fp-more-card b { display: block; font-size: 17px; }
.fp-more-card small { display: block; margin-top: 4px; color: var(--ink-body); font-size: 15px; line-height: 1.5; }
.fp-more-card .arr { margin-left: auto; font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .fp-more-card:hover { background: var(--band); } }
.fp-more-card:active { transform: scale(0.99); }
@media (max-width: 700px) { .fp-more-row { grid-template-columns: 1fr; } }

.fp-wrap { scroll-margin-top: 96px; }
.fx-items h3 .tag { vertical-align: 2px; margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .fp-panel:not([hidden]) { animation: none; } }

/* Simple panel: icon + lead line, then the features. */
.fp-panel h2 { display: flex; align-items: center; gap: 12px; margin: 0; }
.fp-panel h2 .num { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ph); color: var(--ph); }
.fp-panel h2 .num svg { width: 17px; height: 17px; }
.fp-panel .fx-items { margin-top: 28px; gap: 22px; }
.fp-ring .fp-mascot { top: 50%; }
.fp-panel { scroll-margin-top: 110px; }

/* One picture per step, then the features as rows. */
.fp-panel .fp-vis { display: grid; place-items: center; min-height: 150px; margin-top: 24px; padding: 22px; border: var(--stroke) solid var(--outline); border-radius: 14px; background: var(--sunken); font: 12.5px var(--font-data); color: var(--ink-body); }
.fp-rows { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.fp-rows li { border-bottom: 1px solid var(--line); }
.fp-rows summary { display: flex; align-items: center; gap: 10px; padding: 14px 2px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; }
.fp-rows summary::-webkit-details-marker { display: none; }
.fp-rows summary .tag { margin: 0; flex: none; }
.fp-rows .pl { margin-left: auto; position: relative; width: 12px; height: 12px; flex: none; }
.fp-rows .pl::before, .fp-rows .pl::after { content: ''; position: absolute; left: 0; top: 5px; width: 12px; height: 2px; background: var(--ph, var(--ink)); transition: transform 200ms var(--ease-out); }
.fp-rows .pl::after { transform: rotate(90deg); }
.fp-rows details[open] .pl::after { transform: rotate(0deg); }
.fp-rows details p { margin: 0 0 16px; padding: 0 2px; color: var(--ink-body); font-size: 15.5px; line-height: 1.55; }
.fp-rows summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .fp-rows summary:hover .nm { text-decoration: underline; text-underline-offset: 3px; } }

/* mini pictures */
.bar { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--surface); border: 1.5px solid var(--outline); }
.bar b { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--kornblomst); }
.bar i { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.btn-m { padding: 6px 14px; border-radius: 9px; border: 1.5px dashed var(--ink-faint); color: var(--ink-faint); font-weight: 600; font-size: 13.5px; }
.mv-ci { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mv-ci li { font: 12.5px var(--font-data); padding: 3px 9px 3px 7px; border-radius: 999px; border: 1.5px solid var(--pass); color: var(--pass-ink); background: var(--surface); }
.mv-ci li::before { content: '✓ '; font-weight: 700; }
.mv-code { display: grid; gap: 6px; width: 100%; max-width: 260px; }
.mv-code span { padding: 3px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.mv-code .lockrow { justify-self: start; border: 1.5px solid var(--outline); font-weight: 600; }
.mv-files, .mv-judge, .mv-tl { list-style: none; margin: 0; padding: 0; }
.mv-files { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.mv-files li { padding: 4px 8px; border-radius: 5px; background: var(--pass-wash); color: var(--pass-ink); }
.mv-name { display: grid; gap: 8px; }
.mv-name span { color: var(--syn-k); padding: 4px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.mv-sw { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mv-sw i { width: 30px; height: 30px; border-radius: 7px; border: 1.5px solid var(--outline); }
.mv-sw i.x { outline: 2px dashed var(--fail); outline-offset: 2px; }
.mv-sw span { width: 100%; text-align: center; color: var(--fail-ink); margin-top: 4px; }
.mv-q { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: var(--stroke) solid var(--outline); border-radius: 10px; background: var(--surface); font-family: var(--font-ui); font-size: 14px; }
.mv-q span { padding: 2px 10px; border-radius: 7px; border: 1.5px solid var(--outline); }
.mv-q .on { background: var(--ink); color: var(--surface); }
.mv-rep { display: grid; gap: 8px; justify-items: center; }
.mv-rep .who { padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ph2); color: var(--ink); }
.mv-rep .steps { display: flex; gap: 6px; align-items: center; }
.mv-rep .steps i { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.mv-rep .steps i.d { background: var(--ph2); }
.mv-fid { display: grid; gap: 10px; width: 100%; max-width: 360px; }
.mv-fid .split { display: flex; height: 30px; border: 1.5px solid var(--outline); border-radius: 8px; overflow: hidden; }
.mv-fid .split b, .mv-fid .split i { display: grid; place-items: center; font-weight: 500; font-style: normal; font-size: 11.5px; }
.mv-fid .split b { background: var(--band); color: var(--on-band); border-right: 1.5px solid var(--outline); }
.mv-fid .split i { flex: 1; background: var(--surface); }
.mv-fid .num { justify-self: center; font-weight: 600; color: var(--ink); }
.mv-bar, .mv-ba { width: 100%; max-width: 240px; display: grid; gap: 10px; }
.mv-bar .bar b { background: var(--fail); }
.mv-bar .lab { text-align: center; }
.mv-judge { display: grid; gap: 5px; width: 100%; max-width: 200px; }
.mv-judge li { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.mv-judge .p::after { content: '✓'; color: var(--pass-ink); font-weight: 700; }
.mv-judge .f::after { content: '✗'; color: var(--fail-ink); font-weight: 700; }
.mv-ba { grid-template-columns: auto 1fr; align-items: center; }
.mv-ba .bar { grid-column: auto; }
.mv-ba .bar b { background: var(--fail); }
.mv-ba .bar b.ok { background: var(--pass); }
.mv-pr { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; width: 100%; max-width: 300px; align-items: center; }
.mv-pr b { grid-row: span 2; font-size: 18px; color: var(--ink); padding: 8px 10px; border: var(--stroke) solid var(--outline); border-radius: 10px; background: var(--surface); }
.mv-pr span { padding: 4px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.mv-ci { margin: 0; justify-content: center; }
.mv-merge { display: grid; gap: 8px; justify-items: center; font-family: var(--font-ui); }
.mv-tl { display: flex; align-items: center; gap: 0; }
.mv-tl li { position: relative; padding: 18px 10px 0; font-size: 11.5px; }
.mv-tl li::before { content: ''; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ph5); }
.mv-tl li::after { content: ''; position: absolute; top: 5px; left: calc(50% + 7px); width: calc(100% - 14px); height: 2px; background: var(--ph5); }
.mv-tl li:last-child::after { display: none; }
.mv-tl .n { color: var(--ink-faint); }
.mv-tl .n::before { border-style: dashed; }

