/* ==========================================================================
   features.html — page styles (scoped under .page-features)
   ========================================================================== */

/* ---------- Hero ---------- */
.page-features .fx-hero { padding-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.page-features .fx-hero__grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4rem); align-items: center; }
@media (min-width: 1024px) { .page-features .fx-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.page-features .fx-hero .h1 { max-width: 15ch; }
.page-features .fx-hero__list { margin-top: .25rem; }
.page-features .fx-hero__visual { position: relative; min-width: 0; }
.page-features .fx-hero__visual .mock { max-width: 640px; margin-inline: auto; }
.page-features .fx-hero__input { display: grid; gap: .6rem; }
.page-features .fx-hero__visual .note__head .chips { gap: .3rem; }
.page-features .fx-hero__visual .note__head .chip { height: 24px; padding: 0 .5rem; font-size: .625rem; }
.page-features .fx-hero__visual .float-chip { display: none; }
@media (min-width: 1180px) {
  .page-features .fx-hero__visual .float-chip { display: inline-flex; }
  .page-features .fx-fc-1 { left: -2.25rem; bottom: 2.5rem; }
  .page-features .fx-fc-2 { right: -1.25rem; bottom: -1.1rem; }
}
.page-features .fx-hero__stats { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); background: var(--line); }
.page-features .fx-hero__stats .stat { background: rgba(255, 255, 255, .78); }

/* On-this-page jump links */
.page-features .fx-jump { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.page-features .fx-jump__label { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin-right: .5rem; }
.page-features .fx-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; transition: border-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2); }
.page-features .fx-jump a:hover { border-color: rgba(81, 59, 244, .45); color: var(--indigo-700); box-shadow: var(--sh-xs); }

/* ---------- Core intro + numbered index ---------- */
.page-features .fx-core-lead { max-width: 30rem; }
.page-features .fx-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 720px) { .page-features .fx-index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .page-features .fx-index { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.page-features .fx-index a { display: flex; flex-direction: column; gap: .35rem; min-height: 44px; height: 100%; padding: .9rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; text-decoration: none; transition: border-color var(--dur-2), transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3); }
.page-features .fx-index a span { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--indigo-700); letter-spacing: .06em; }
.page-features .fx-index a:hover { border-color: rgba(81, 59, 244, .4); transform: translateY(-2px); box-shadow: var(--sh-sm); }

/* ---------- Feature sections ---------- */
.page-features .fx { scroll-margin-top: var(--header-h); }
.page-features .fx__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; min-width: 0; }
.page-features .fx__copy .feature-detail__h { margin: .5rem 0 -.25rem; }
.page-features .fx__num { display: flex; align-items: center; gap: .85rem; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .08em; color: var(--slate); }
.page-features .fx__title { max-width: 16ch; }
.page-features .fx__copy .lead { max-width: 34rem; }
.page-features .fx__visual { min-width: 0; }
.page-features .fx__visual > .mock { max-width: 500px; }
.page-features .fx-mock-actions { --gap: .5rem; align-items: center; }

/* Example strip: scenario | process | outcome */
.page-features .fx-ex { display: grid; grid-template-columns: 1fr; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; box-shadow: var(--sh-xs); }
@media (min-width: 900px) { .page-features .fx-ex { grid-template-columns: 1fr 1.35fr 1fr; } }
.page-features .fx-ex__block { padding: 1.35rem 1.5rem; min-width: 0; }
.page-features .fx-ex__block + .fx-ex__block { border-top: 1px dashed var(--line); }
@media (min-width: 900px) { .page-features .fx-ex__block + .fx-ex__block { border-top: 0; border-left: 1px dashed var(--line); } }
.page-features .fx-ex__block > p:not(.feature-detail__h) { font-size: var(--fs-sm); line-height: 1.6; color: var(--fg-2); }
.page-features .fx-ex__block .feature-detail__h { margin-bottom: .75rem; }
.page-features .fx-ex__outcome { background: linear-gradient(180deg, var(--mint-50), #fff); }
.page-features .fx-ex__outcome .feature-detail__h { color: var(--mint-700); }

/* F2 report mock */
.page-features .fx-rep__head { margin-bottom: .65rem; }
.page-features .fx-rep__label { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: #646a7c; margin-bottom: .5rem; }
.page-features .fx-goal { display: grid; gap: .3rem; margin-bottom: .6rem; font-size: .75rem; color: var(--fg-2); }
.page-features .fx-goal:last-child { margin-bottom: 0; }
.page-features .fx-goal .progress { height: 6px; }

/* F3 access log mock */
.page-features .fx-sec__status { display: flex; flex-wrap: wrap; gap: .5rem; }
.page-features .fx-sec__pill { display: inline-flex; align-items: center; gap: .4rem; height: 28px; padding: 0 .65rem; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: .625rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mint-700); background: var(--mint-50); border: 1px solid rgba(25, 195, 156, .3); }
.page-features .fx-sec__pill .icon { width: 13px; height: 13px; }
.page-features .fx-log { display: grid; gap: 0; }
.page-features .fx-log__row { display: grid; grid-template-columns: 2.6rem 4.6rem minmax(0, 1fr) 14px; align-items: center; gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .75rem; color: var(--fg-2); }
.page-features .fx-log__row:first-of-type { border-top: 0; }
.page-features .fx-log__row .icon { width: 14px; height: 14px; color: var(--slate); }
.page-features .fx-log__t { font-family: var(--font-mono); font-size: .625rem; color: #6b7183; }
.page-features .fx-log__who { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .03em; color: var(--indigo-700); }
.page-features .fx-log__what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-features .fx-log__row--deny .fx-log__what { color: #b42318; }
.page-features .fx-log__row--deny .icon { color: #b42318; }

/* F4 scan mock */
.page-features .fx-scan { grid-template-columns: 1fr; }
@media (min-width: 520px) { .page-features .fx-scan { grid-template-columns: 1fr 1.15fr; } }
.page-features .fx-paper { position: relative; overflow: hidden; padding: 1.8rem .95rem .9rem; border-radius: 10px; background: repeating-linear-gradient(180deg, transparent 0 27px, #dfe3f0 27px 28px), #fffdf6; border: 1px solid #ece6d2; box-shadow: 0 8px 20px -12px rgba(40, 28, 150, .3); transform: rotate(-1.2deg); font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 28px; color: #26306b; }
.page-features .fx-paper p { white-space: nowrap; }
.page-features .fx-paper__meta { position: absolute; top: .45rem; left: .6rem; font-family: var(--font-mono); font-style: normal; font-size: .5625rem; color: #6b7183; }
.page-features .fx-paper__scan { position: absolute; left: 0; right: 0; top: 0; height: 36px; background: linear-gradient(180deg, transparent, rgba(81, 59, 244, .18) 70%, rgba(81, 59, 244, .6) 96%, transparent); pointer-events: none; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  html.js .page-features .fx-paper__scan { opacity: 1; animation: fx-scan 3.6s var(--ease-in-out) infinite; }
}
@keyframes fx-scan { 0% { transform: translateY(-40px); } 60%, 100% { transform: translateY(190px); } }
.page-features .fx-scan__out { display: grid; gap: .3rem; align-content: start; font-size: .75rem; color: var(--fg-2); }
.page-features .fx-scan__out .btn { justify-self: start; margin-top: .45rem; }

/* F5 template mock */
.page-features .fx-tpl__brand { display: flex; align-items: center; gap: .75rem; }
.page-features .fx-tpl__brand b { display: block; font-size: .8125rem; color: var(--ink); }
.page-features .fx-tpl__brand small { display: block; font-size: .6875rem; color: #6b7183; }
.page-features .fx-tpl__logo { flex: none; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--mint-700), #2f6fe0); }
.page-features .fx-tpl__list { list-style: none; margin: 0; padding: 0; display: grid; }
.page-features .fx-tpl__list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .75rem; color: var(--fg-2); }
.page-features .fx-tpl__list li:first-child { border-top: 0; }
.page-features .fx-toggle { flex: none; position: relative; width: 28px; height: 16px; border-radius: 16px; background: #d5d8e6; }
.page-features .fx-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(13, 15, 26, .2); }
.page-features .fx-toggle.is-on { background: var(--indigo); }
.page-features .fx-toggle.is-on::after { left: 14px; }

/* F6 language mock */
.page-features .fx-lang__bar { display: flex; align-items: center; gap: .5rem; }
.page-features .fx-lang__bar .icon { width: 14px; height: 14px; color: var(--indigo); }
.page-features .fx-lang { display: grid; gap: .75rem; }
@media (min-width: 520px) { .page-features .fx-lang { grid-template-columns: 1fr 1fr; } }
.page-features .fx-lang p { font-size: .8125rem; line-height: 1.5; color: var(--fg-2); }
.page-features .fx-lang p + p { margin-top: .45rem; }

/* ---------- Platform (ink) ---------- */
.page-features #platform .bento__visual { min-height: 170px; }
.page-features .fx-plat__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .4rem; }
.page-features .fx-plat__top .bento__title { margin-bottom: 0; }
.page-features .fx-plat__list { margin-top: 1rem; }
.page-features .fx-plat__note { display: flex; gap: .5rem; align-items: flex-start; margin-top: 1rem; font-size: var(--fs-xs); color: var(--muted); }
.page-features .fx-plat__note .icon { flex: none; width: 15px; height: 15px; margin-top: .15em; color: var(--lilac); }
.page-features .fx-plat__disclaimer { margin-top: 1.5rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.page-features .fx-plat-wave { width: min(100%, 380px); display: grid; gap: 1rem; justify-items: center; }
.page-features .fx-plat-wave .wave { width: 100%; }
.page-features .fx-plat-doc { width: min(100%, 300px); display: grid; grid-template-columns: 1.6rem 1fr; gap: .6rem .75rem; align-items: center; }
.page-features .fx-plat-doc__k { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 7px; font-family: var(--font-mono); font-size: .6875rem; font-weight: 600; color: var(--lilac); background: rgba(139, 123, 255, .16); }
.page-features .fx-plat-doc i { display: block; height: 7px; border-radius: 4px; width: var(--w); background: linear-gradient(90deg, rgba(180, 171, 255, .55), rgba(255, 255, 255, .1)); }
.page-features .fx-plat-dots { position: relative; width: min(100%, 320px); height: 120px; }
.page-features .fx-plat-dots svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.page-features .fx-plat-dots polyline { fill: none; stroke: rgba(180, 171, 255, .6); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4 5; }
.page-features .fx-plat-dots span { position: absolute; left: var(--x); top: var(--y); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--violet-glow); box-shadow: 0 0 0 4px rgba(139, 123, 255, .18), 0 0 18px rgba(139, 123, 255, .8); z-index: 1; }
.page-features .fx-plat-dots span:last-of-type { background: var(--mint); box-shadow: 0 0 0 4px rgba(25, 195, 156, .2), 0 0 18px rgba(25, 195, 156, .7); }
.page-features .fx-plat-export { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.page-features .fx-plat-export .file-row { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.page-features .fx-plat-export .file-row__name { color: #fff; }
.page-features .fx-plat-export > .icon { width: 20px; height: 20px; color: var(--lilac); }
.page-features .fx-plat-export__ehr { display: inline-flex; align-items: center; gap: .45rem; height: 46px; padding: 0 .9rem; border-radius: 9px; border: 1px dashed rgba(180, 171, 255, .5); color: #fff; font-size: .75rem; font-weight: 500; }
.page-features .fx-plat-export__ehr .icon { width: 16px; height: 16px; color: var(--lilac); }

/* ---------- Feature set tabs ---------- */
.page-features .fx-set { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .page-features .fx-set { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .page-features .fx-set { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.page-features .fx-set__item { display: flex; gap: .9rem; align-items: flex-start; padding: 1.15rem 1.2rem; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); }
.page-features .fx-set__item h4 { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin-bottom: .2rem; }
.page-features .fx-set__item p { font-size: var(--fs-xs); line-height: 1.5; color: var(--slate); }
.page-features .fx-set__more { margin-top: 1.25rem; }
html:not(.js) .page-features #feature-set [role="tabpanel"] + [role="tabpanel"] { margin-top: 2rem; }

/* ---------- Toolkit ---------- */
.page-features .fx-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(.75rem, .5rem + .8vw, 1.1rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .page-features .fx-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .page-features .fx-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.page-features .fx-tool { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 1.35rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs); scroll-margin-top: calc(var(--header-h) + 1.5rem); transition: border-color var(--dur-2), box-shadow var(--dur-3), transform var(--dur-3) var(--ease-out); }
.page-features .fx-tool:hover { border-color: var(--line-strong); box-shadow: var(--sh-md); transform: translateY(-2px); }
.page-features .fx-tool:target, .page-features .fx-tool:has(> .fx-anchor:target) { border-color: rgba(81, 59, 244, .55); box-shadow: 0 0 0 4px rgba(81, 59, 244, .12), var(--sh-md); }
.page-features .fx-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.page-features .fx-tool__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.page-features .fx-tool__name { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -.015em; }
.page-features .fx-tool__text { font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); }
.page-features .fx-tool .link-arrow { margin-top: auto; padding-top: .35rem; }
.page-features .fx-tool--private { background: linear-gradient(180deg, var(--mint-50), #fff 55%); border-color: rgba(25, 195, 156, .35); }
.page-features .fx-tool__flag { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; padding: .3rem .6rem; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .02em; color: var(--mint-700); background: #fff; border: 1px solid rgba(25, 195, 156, .35); }
.page-features .fx-tool__flag .icon { width: 13px; height: 13px; }

.page-features .fx-cmdk { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: center; margin-top: 1.25rem; padding: 1.25rem 1.4rem; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); background: var(--mist); }
.page-features .fx-cmdk__title { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -.015em; margin-bottom: .2rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.page-features .fx-cmdk__btn, .page-features .fx-cmdk__alt { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 720px) {
  .page-features .fx-cmdk { grid-template-columns: auto 1fr auto auto; }
  .page-features .fx-cmdk__btn, .page-features .fx-cmdk__alt { grid-column: auto; }
}
html:not(.js) .page-features .fx-cmdk__btn { display: none; }

/* ---------- CTA ---------- */
.page-features .fx-cta__fine { position: relative; margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--slate-ink); }

/* ---------- QA pass 1 fixes ---------- */
.page-features .fx-tag-short { display: none; }
@media (max-width: 519px) {
  .page-features .fx-tag-long { display: none; }
  .page-features .fx-tag-short { display: inline; }
}
.page-features .fx-hero + .section { padding-top: clamp(2.5rem, 2rem + 2.5vw, 4rem); }
.page-features #platform .bento__visual { min-height: 0; height: 180px; }
.page-features .fx-cta__fine { display: inline-block; padding: .35rem .8rem; border-radius: var(--r-pill); background: rgba(13, 15, 26, .72); color: #c3c7d8; }


/* ==========================================================================
   Flask port: parity additions (old FeaturesSection content, restyled)
   ========================================================================== */
/* Platform cards: "Click for detailed example" opens the old detail dialogs */
.page-features .fx-plat__more { min-height: 44px; }
.page-features .bento__card .bento__foot { margin-top: auto; }
.page-features .fx-dialogs:has(> dialog:not([open])) { display: contents; }
.page-features .fx-dlg__badge { margin-top: .6rem; }
.page-features .fx-dlg__extitle { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -.015em; margin: 0 0 .75rem; }
.page-features .fx-hero .hero-ctas { flex-wrap: wrap; }

/* Security & Compliance First + the old hero photo */
.page-features .fx-secure__split { align-items: center; }
.page-features .fx-secure__split > * { min-width: 0; }
@media (min-width: 960px) { .page-features .fx-secure__split { grid-template-columns: 1fr 1.05fr; } }
.page-features .fx-secure__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.page-features .fx-secure__copy .lead { max-width: 36rem; }
.page-features .fx-secure__tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; width: 100%; }
.page-features .fx-secure__tiles li { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.page-features .fx-secure__tiles h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.page-features .fx-secure__tiles p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin: .15rem 0 0; }
.page-features .fx-photo { position: relative; margin: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); aspect-ratio: 3 / 2; background: var(--mist); }
.page-features .fx-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-features .fx-photo__stats { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.page-features .fx-photo__stats span { display: inline-flex; align-items: baseline; gap: .35rem; padding: .5rem .8rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--sh-sm); font-size: var(--fs-xs); color: var(--fg-2); }
.page-features .fx-photo__stats b { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; color: var(--indigo-700); }
/* the old (longer) H1 wording: a touch smaller so it sets in three lines beside the mock */
.page-features .fx-hero .h1 { max-width: 17ch; font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.9rem); }
