.asn-flowmap-app,
.asn-flowmap-app * { box-sizing: border-box; }

.asn-flowmap-app {
    --asn-bg: #071225;
    --asn-panel: rgba(15, 29, 58, .9);
    --asn-panel-soft: rgba(20, 39, 77, .72);
    --asn-line: rgba(126, 168, 255, .2);
    --asn-text: #f5f8ff;
    --asn-muted: #b7c5e4;
    --asn-primary: #7b70ff;
    --asn-cyan: #40d9ff;
    --asn-success: #59e2b0;
    --asn-danger: #ffb6c5;
    color: var(--asn-text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    margin: 24px auto;
    max-width: 1180px;
}

.asn-flowmap-shell {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 4vw, 52px);
    border: 1px solid var(--asn-line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 82% 2%, rgba(64, 217, 255, .18), transparent 28%),
        radial-gradient(circle at 8% 8%, rgba(123, 112, 255, .25), transparent 34%),
        linear-gradient(145deg, #08142b 0%, #091936 55%, #071225 100%);
    box-shadow: 0 26px 80px rgba(0, 5, 20, .36);
}

.asn-flowmap-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .36;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
}

.asn-flowmap-shell > * { position: relative; z-index: 1; }
.asn-flowmap-header { max-width: 830px; margin-bottom: 30px; }
.asn-flowmap-brand,
.asn-flowmap-result-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border: 1px solid rgba(64,217,255,.28);
    border-radius: 999px;
    background: rgba(64,217,255,.08);
    color: #91ebff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
}

.asn-flowmap-header h2 { margin: 14px 0 10px; color: var(--asn-text); font-size: clamp(28px, 4vw, 46px); line-height: 1.16; }
.asn-flowmap-header p { margin: 0; color: var(--asn-muted); font-size: 16px; line-height: 1.8; }
.asn-flowmap-trust { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.asn-flowmap-trust span { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: #d7e2fa; font-size: 12px; }

.asn-flowmap-progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.asn-flowmap-progress span { display: block; width: 25%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--asn-primary), var(--asn-cyan)); transition: width .25s ease; }
.asn-flowmap-progress-text { margin-top: 10px; color: var(--asn-muted); font-size: 13px; text-align: right; }

.asn-flowmap-form { margin-top: 28px; }
.asn-flowmap-step { display: none; animation: asnFlowFade .22s ease; }
.asn-flowmap-step.is-active { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.asn-flowmap-step h3 { grid-column: 1 / -1; margin: 0 0 4px; color: var(--asn-text); font-size: 24px; }
.asn-flowmap-step label { display: flex; flex-direction: column; gap: 9px; color: #dce7ff; font-size: 14px; font-weight: 650; }
.asn-flowmap-step input,
.asn-flowmap-step select {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid rgba(140, 174, 255, .28);
    border-radius: 13px;
    outline: none;
    background: rgba(5, 14, 33, .72);
    color: var(--asn-text);
    font: inherit;
    font-weight: 500;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.asn-flowmap-step input::placeholder { color: #7082a7; }
.asn-flowmap-step input:focus,
.asn-flowmap-step select:focus { border-color: var(--asn-cyan); box-shadow: 0 0 0 3px rgba(64,217,255,.12); }
.asn-flowmap-note { grid-column: 1 / -1; padding: 14px 16px; border-left: 3px solid var(--asn-cyan); border-radius: 0 10px 10px 0; background: rgba(64,217,255,.07); color: #c8d9f5; line-height: 1.7; }
.asn-flowmap-error { margin-top: 16px; padding: 11px 14px; border: 1px solid rgba(255,120,150,.35); border-radius: 10px; background: rgba(255,80,120,.1); color: #ffd5df; }
.asn-flowmap-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

.asn-flowmap-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--asn-primary), #557eff 58%, var(--asn-cyan));
    box-shadow: 0 12px 28px rgba(78, 104, 255, .24);
    color: #fff !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.asn-flowmap-button:hover { transform: translateY(-1px); box-shadow: 0 15px 32px rgba(78, 104, 255, .35); }
.asn-flowmap-button-secondary { border: 1px solid rgba(134,170,255,.28); background: rgba(255,255,255,.06); box-shadow: none; color: #e5edff !important; }
.asn-flowmap-button-cta { background: linear-gradient(135deg, #00a98b, #28c8a4); box-shadow: 0 12px 28px rgba(0,169,139,.2); }
.asn-flowmap-link-button { border: 0; background: transparent; color: #9edfff; cursor: pointer; font-weight: 700; }

.asn-flowmap-results { margin-top: 16px; }
.asn-flowmap-result-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px; border: 1px solid rgba(113,158,255,.26); border-radius: 22px; background: linear-gradient(135deg, rgba(123,112,255,.16), rgba(64,217,255,.08)); }
.asn-flowmap-result-hero h3 { margin: 11px 0 8px; color: var(--asn-text); font-size: clamp(24px, 3vw, 36px); }
.asn-flowmap-result-hero p { margin: 0; color: var(--asn-muted); line-height: 1.75; }
.asn-flowmap-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.asn-flowmap-reason { padding: 6px 9px; border-radius: 999px; background: rgba(89,226,176,.1); color: #9bf0d0; font-size: 12px; }
.asn-flowmap-score { width: 128px; height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(64,217,255,.36); border-radius: 50%; background: rgba(4,15,34,.56); box-shadow: inset 0 0 30px rgba(64,217,255,.08); }
.asn-flowmap-score strong { color: #9ef0ff; font-size: 31px; }
.asn-flowmap-score span { margin-top: 3px; color: var(--asn-muted); font-size: 12px; }
.asn-flowmap-condition-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 30px; }
.asn-flowmap-condition { padding: 6px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.04); color: #c8d6f0; font-size: 12px; }

.asn-flowmap-section { margin-top: 18px; padding: 24px; border: 1px solid var(--asn-line); border-radius: 20px; background: var(--asn-panel); backdrop-filter: blur(10px); }
.asn-flowmap-section-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }
.asn-flowmap-section-heading > span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 30px; padding: 0 8px; border-radius: 8px; background: rgba(123,112,255,.16); color: #b8b2ff; font-size: 12px; font-weight: 800; }
.asn-flowmap-section-heading h3 { margin: 0; color: var(--asn-text); font-size: 21px; }
.asn-flowmap-section-heading p { margin: 5px 0 0; color: var(--asn-muted); font-size: 13px; line-height: 1.6; }

.asn-flowmap-stack-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.asn-flowmap-stack-card { min-height: 128px; padding: 15px; border: 1px solid rgba(126,168,255,.15); border-radius: 14px; background: var(--asn-panel-soft); }
.asn-flowmap-stack-role { display: block; margin-bottom: 10px; color: #82ddff; font-size: 12px; font-weight: 700; }
.asn-flowmap-stack-card strong { display: block; color: #f4f7ff; font-size: 15px; line-height: 1.5; }
.asn-flowmap-stack-card small { display: block; margin-top: 8px; color: #8fa1c5; font-size: 11px; line-height: 1.55; }
.asn-flowmap-architecture { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(5,15,35,.7); }
.asn-flowmap-architecture span { display: block; margin-bottom: 5px; color: #8698bd; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.asn-flowmap-architecture strong { color: #cbd7f2; font-size: 13px; line-height: 1.65; }

.asn-flowmap-timeline { list-style: none; margin: 0; padding: 0; }
.asn-flowmap-timeline-item { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 0 0 22px; }
.asn-flowmap-timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 40px; bottom: 3px; width: 1px; background: rgba(116,166,255,.24); }
.asn-flowmap-step-number { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(64,217,255,.28); border-radius: 12px; background: rgba(64,217,255,.08); color: #8ceaff; font-weight: 800; }
.asn-flowmap-timeline-item h4 { margin: 2px 0 6px; color: var(--asn-text); font-size: 16px; }
.asn-flowmap-timeline-item p { margin: 0; color: var(--asn-muted); font-size: 14px; line-height: 1.7; }
.asn-flowmap-nodes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.asn-flowmap-node { padding: 4px 7px; border-radius: 6px; background: rgba(123,112,255,.1); color: #c2bcff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }

.asn-flowmap-prompt { overflow: auto; margin: 0; padding: 18px; border: 1px solid rgba(126,168,255,.14); border-radius: 13px; background: #050e20; white-space: pre-wrap; }
.asn-flowmap-prompt code { color: #dbe7ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.8; }
.asn-flowmap-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.asn-flowmap-list { list-style: none; margin: 0; padding: 0; }
.asn-flowmap-list li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; padding: 8px 0; color: #c6d3ed; font-size: 13px; line-height: 1.6; }
.asn-flowmap-list li > span:first-child { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(64,217,255,.08); color: #7be5ff; font-weight: 800; }
.asn-flowmap-alternatives { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.asn-flowmap-alternatives article { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 14px; border: 1px solid rgba(126,168,255,.14); border-radius: 13px; background: var(--asn-panel-soft); }
.asn-flowmap-alternatives article > span { font-size: 24px; }
.asn-flowmap-alternatives strong { display: block; color: var(--asn-text); }
.asn-flowmap-alternatives small { display: block; margin-top: 4px; color: var(--asn-muted); line-height: 1.45; }
.asn-flowmap-alternatives b { color: #8eeaff; }
.asn-flowmap-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.asn-flowmap-action-status { color: #8debc9; font-size: 12px; }
.asn-flowmap-empty { padding: 20px; border: 1px solid var(--asn-line); border-radius: 14px; color: var(--asn-muted); }
.asn-flowmap-compact .asn-flowmap-shell { padding: 24px; }

@keyframes asnFlowFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
    .asn-flowmap-stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .asn-flowmap-app { margin: 12px auto; }
    .asn-flowmap-shell { padding: 20px 16px; border-radius: 20px; }
    .asn-flowmap-step.is-active,
    .asn-flowmap-two-columns { grid-template-columns: 1fr; }
    .asn-flowmap-result-hero { grid-template-columns: 1fr; }
    .asn-flowmap-score { width: 100%; height: auto; padding: 14px; border-radius: 14px; }
    .asn-flowmap-score strong { font-size: 25px; }
    .asn-flowmap-stack-grid,
    .asn-flowmap-alternatives { grid-template-columns: 1fr; }
    .asn-flowmap-actions { justify-content: stretch; }
    .asn-flowmap-actions .asn-flowmap-button { flex: 1; }
    .asn-flowmap-result-actions .asn-flowmap-button,
    .asn-flowmap-result-actions a { width: 100%; }
}
