/* Nefa's exchange, credit-card and advanced-tools sections, adapted for Tangcong. */
.story-section {
  --story-ink: var(--ink);
  --story-muted: var(--muted);
  --story-accent: var(--action);
  color: var(--story-ink);
  background: #fff;
  scroll-margin-top: 80px;
  overflow-x: clip;
}
.story-section [hidden] { display: none; }
.story-wrap { box-sizing: border-box; width: min(100%, 1280px); margin-inline: auto; padding-inline: var(--page-gutter, clamp(20px, 4vw, 56px)); }
.story-split { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; column-gap: clamp(34px, 6.1vw, 84px); }
.story-scenarios { padding-block: clamp(62px, 7.8vw, 118px) clamp(28px, 4vw, 65px); }
.story-section h2 { margin: 0; color: var(--story-ink); font-family: var(--font-heading); font-size: var(--section-title-size, clamp(31px, 3vw, 44px)); line-height: 1.28; letter-spacing: -.035em; font-weight: 680; text-wrap: balance; }
.story-section h2 span { color: var(--story-accent); }
.story-intro > p, .story-feature-copy > p { max-width: 29em; margin: 19px 0 0; font-size: 16px; color: var(--story-muted); line-height: 1.83; text-wrap: pretty; }
.story-choices {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin-block: 25px 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-mint);
}
.story-choices[role="tablist"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px auto 4px 4px;
  width: calc((100% - 8px) / var(--tab-count));
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 3px #123f361f;
  transform: translateX(calc(var(--selected-tab) * 100%));
}
.story-choice { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 10px; padding-inline: clamp(12px, 1.4vw, 22px); color: var(--muted); font-size: 14px; line-height: 1.4; font-weight: 500; text-decoration: none; white-space: nowrap; }
.story-choice[aria-selected="true"] { color: var(--story-accent); font-weight: 600; }
.story-button { display: inline-flex; align-items: center; justify-content: center; align-self: start; gap: 12px; min-height: 46px; padding: 0 21px; border: 1px solid var(--line-strong); border-radius: 999px; background: #ffffffc9; color: var(--story-ink); text-decoration: none; font-size: 14px; line-height: 1.4; font-weight: 560; }
.story-button-solid { display: flex; width: fit-content; background: var(--story-accent); border-color: transparent; color: white; box-shadow: 0 2px 5px #123f361f; }
.story-choice:focus-visible, .story-button:focus-visible, .story-product-art a:focus-visible { outline: 2px solid var(--story-accent); outline-offset: 3px; }
.story-choice:focus-visible { outline-offset: -2px; }
.story-button:active { box-shadow: inset 0 1px 4px #123f361f; }
@media (hover: hover) and (pointer: fine) {
  .story-choice:hover { color: var(--story-accent); }
  .story-button:hover { border-color: #7aab9b; color: var(--story-accent); background: var(--surface-mint); }
  .story-button-solid:hover { background: var(--action-hover); color: white; border-color: transparent; }
  .story-button:hover > span { translate: 2px 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .story-choices::before { transition: transform .23s cubic-bezier(.22,.72,.24,1); }
  .story-choice, .story-button { transition: color .16s, background-color .18s, border-color .18s, box-shadow .18s; }
  .story-button > span { transition: translate .18s; }
  .story-demo[data-switched] .story-demo-body { animation: story-switch .23s cubic-bezier(.22,.72,.24,1) both; }
  @keyframes story-switch { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}

.story-panels { position: relative; z-index: 0; display: grid; justify-items: center; gap: 22px; min-width: 0; padding: clamp(20px,3.5vw,49px) clamp(12px,2.5vw,37px); }
.story-panels::before, .story-product-art::before { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 80%; max-width: 500px; aspect-ratio: 1.25; border-radius: 50%; background: linear-gradient(148deg, #f9fbef 6%, #e7f6ed 47%, #a9dbc5 100%); top: 50%; left: 50%; transform: translate(-48%, -50%) rotate(-22deg); }
.story-panels::before { width: 86%; aspect-ratio: 1.05; }
.story-panels::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 16px; aspect-ratio: 1; bottom: 8%; right: .5%; border-radius: 50%; background: radial-gradient(circle at 32% 26%, #eafff5, #7dd6b4 40%, #178976 75%, #095c57); }
.story-demo { --demo-accent: var(--action); --demo-fill: var(--surface-mint); position: relative; box-sizing: border-box; width: min(100%, 570px); min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 22px 48px -24px #153f3647, 0 4px 12px -6px #123f361f; scroll-margin-top: 90px; }
#story-content { --demo-accent: #665526; --demo-fill: #fcf5df; }
#story-qa { --demo-accent: #17555c; --demo-fill: #eaf5f1; }
.story-demo-chrome { display: flex; align-items: center; justify-content: space-between; height: 39px; padding: 0 17px; border-bottom: 1px solid var(--line-soft); border-radius: 15px 15px 0 0; background: var(--surface-mint); color: var(--muted); font-size: 12px; font-weight: 500; }
.story-dots { display: flex; gap: 5px; }
.story-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.story-view-icon { width: 11px; height: 8px; margin-right: 8px; border: 1px solid #7aab9b; border-radius: 2px; }
.story-demo-body { padding: clamp(16px, 2.1vw, 30px); }
.story-path { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.story-path > span:not(.story-folder) { color: #8caa9d; }
.story-folder { position: relative; width: 14px; height: 10px; border: 1.3px solid; border-radius: 2px; }
.story-folder::before { content: ""; position: absolute; left: -1px; top: -3px; width: 7px; height: 3px; border: 1.3px solid; border-radius: 2px 2px 0 0; border-bottom: 0; }
.story-demo h3 { margin: 12px 0 6px; color: var(--story-ink); font-size: clamp(22px, 1.9vw, 28px); line-height: 1.35; letter-spacing: -.02em; font-weight: 600; }
.story-lede { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.story-envs { margin-top: 19px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.story-envs > details + details { border-top: 1px solid var(--line); }
.story-envs summary { display: flex; align-items: center; gap: 10px; min-height: 47px; padding: 7px 13px; color: var(--body-ink); font-size: 14px; font-weight: 550; list-style: none; cursor: pointer; }
.story-envs summary::-webkit-details-marker { display: none; }
.story-envs summary::after { content: ""; width: 7px; height: 7px; flex: none; border-right: 1.4px solid; border-bottom: 1.4px solid; color: #68887e; transform: translateY(-2px) rotate(45deg); }
.story-envs [open] summary { color: var(--demo-accent); background: var(--demo-fill); }
.story-envs [open] summary::after { transform: translateY(2px) rotate(225deg); }
.story-envs summary small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 450; white-space: nowrap; }
.story-env-icon { position: relative; width: 18px; height: 14px; flex: none; border: 1.5px solid currentColor; border-radius: 3px; color: var(--demo-accent); }
.story-env-icon::after { content: ""; position: absolute; inset: 3px 0 auto; border-top: 1px solid; }
.story-envs dl { display: grid; grid-template-columns: .9fr 1.1fr; gap: 10px; margin: 0; padding: 13px 14px 15px 41px; }
.story-envs dt { color: var(--muted); font-size: 12px; }
.story-envs dd { margin: 3px 0 0; color: var(--body-ink); font-size: 13px; line-height: 1.45; }
.story-envs summary:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .story-envs details:not([open]) summary:hover { color: var(--demo-accent); background: var(--surface-mint); }
}
@media (prefers-reduced-motion: no-preference) {
  .story-envs summary { transition: background-color .18s, color .18s; }
  .story-envs summary::after { transition: transform .2s; }
}

.story-desktop { padding-block: clamp(54px, 7.6vw, 113px); grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
.story-product-art { position: relative; isolation: isolate; min-width: 0; margin: 0; padding: clamp(22px,3.6vw,58px) 10px 28px; }
.story-desktop-art::before { height: 100%; width: 77%; top: 49%; left: 43%; transform: translate(-50%, -50%) rotate(18deg); background: linear-gradient(140deg, #f9fbef 7%, #e7f6ed 45%, #a9dbc5 100%); }
.story-product-window { display: block; width: 100%; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; box-shadow: 0 23px 33px -20px #1e685d66, 0 4px 11px -7px #1e685d40; cursor: zoom-in; }
.story-product-window img { display: block; width: 100%; height: auto; }
.story-desktop-art .story-product-window { transform: perspective(1400px) rotateY(8deg) rotateZ(-2deg); }
.story-product-art figcaption { margin-top: 13px; text-align: right; line-height: 1.5; }
.story-product-art figcaption a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 5px 2px; color: var(--muted); font-size: 13px; text-decoration: none; }
.story-product-art figcaption a:hover { color: var(--action); text-decoration: underline; }
.story-checks { display: grid; gap: 12px; padding: 0; margin: 19px 0 23px; list-style: none; }
.story-checks li { position: relative; padding-left: 26px; color: var(--body-ink); font-size: 15px; line-height: 1.55; }
.story-checks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: #dbf4e9; }
.story-checks li::after { content: ""; position: absolute; width: 7px; height: 4px; top: 9px; left: 4px; border-left: 1.5px solid var(--action); border-bottom: 1.5px solid var(--action); transform: rotate(-45deg); }
.story-cloud { max-width: 1540px; margin: clamp(12px,3vw,48px) auto clamp(40px,4.6vw,70px); width: calc(100% - clamp(24px, 4vw, 70px)); border: 1px solid var(--line-soft); border-radius: 20px; background: radial-gradient(ellipse at 94% 4%, #fff5cf88, transparent 42%), linear-gradient(110deg,#f4fbf7,#e5f4eb); box-shadow: 0 4px 17px -12px #1e685d40; }
.story-cloud-inner { padding-block: clamp(38px,5vw,80px); column-gap: clamp(30px,4.6vw,65px); }
.story-cloud-list { display: grid; gap: 17px; margin: 23px 0; }
.story-cloud-list dt { font-weight: 600; color: var(--story-ink); font-size: 17px; }
.story-cloud-list dd { margin: 3px 0 0; color: var(--story-muted); font-size: 15px; line-height: 1.76; max-width: 29em; text-wrap: pretty; }
.story-cloud-art::before { background: linear-gradient(140deg, #fff7, #e7f6ed 48%, #a9dbc5); }
.story-cloud-art .story-product-window { transform: perspective(1400px) rotateY(-6deg) rotateZ(1.5deg); }
@media (max-width: 860px) {
  .story-wrap { padding-inline: clamp(20px,3.5vw,30px); }
  .story-split { column-gap: 25px; }
  .story-section h2 { font-size: clamp(27px, 3.8vw, 35px); }
  .story-panels { padding-inline: 5px; }
  .story-demo-body { padding: 14px; }
  .story-envs dl { padding-inline: 12px; }
}
@media (max-width: 700px) {
  .story-split { display: flex; flex-direction: column; align-items: stretch; gap: 23px; }
  .story-wrap { padding-inline: clamp(18px,5.1vw,32px); }
  .story-scenarios { padding-block: 52px 10px; }
  .story-section h2 { font-size: clamp(28px,6.8vw,38px); }
  .story-intro > p, .story-feature-copy > p { margin-top: 12px; font-size: 15px; line-height: 1.75; }
  .story-intro { order: 0; }
  .story-choices { display: grid; width: min(100%, 350px); margin-block: 20px 16px; }
  .story-choice { min-height: 44px; padding-inline: 8px; }
  .story-button { min-height: 44px; padding-inline: 19px; font-size: 14px; }
  .story-panels { padding: 16px 6px 22px; }
  .story-panels::after { display: none; }
  .story-desktop { padding-block: 40px 32px; gap: 16px; }
  .story-product-art { padding: 20px 5px 5px; }
  .story-product-art figcaption { margin-top: 8px; }
  .story-checks { gap: 8px; margin-block: 15px 18px; }
  .story-cloud { width: calc(100% - 22px); margin: 14px auto 44px; border-radius: 15px; }
  .story-cloud-inner { padding-block: 33px 22px; gap: 13px; }
  .story-cloud-list { gap: 12px; margin-block: 17px; }
}
@media (max-width: 370px) {
  .story-choice { padding-inline: 8px; font-size: 13px; }
  .story-panels { padding-inline: 0; }
  .story-demo-body { padding: 12px; }
  .story-envs summary { padding-inline: 7px; gap: 6px; }
}
