/* Seat Four: "How it works" page. Loads after site.css and costs.css, reuses their tokens. All classes prefixed hw-. */

.tag.t-plan { background: #ECEFF3; color: #4B5560; }
.more-link-inline { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Hero status strip */
.hw-status { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.hw-status li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: .84rem; background: var(--surface); border: 1px solid var(--divider); }
.hw-status li .i { width: 17px; height: 17px; }
.hw-status li.good .i { color: var(--green); } .hw-status li.later .i { color: var(--amber); }
.hw-status li b { font-weight: 600; margin-right: 2px; }

/* ===== Phase one diagram ===== */
.hw-p1 { background: var(--surface); }
.hw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hw-dot.own { background: var(--brand); }
.hw-dot.ghl { background: #E6A21A; }
.hw-dot.sync { background: linear-gradient(90deg, var(--brand) 50%, #E6A21A 50%); }

.hw-diagram { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px) minmax(0, 1fr); gap: 0; align-items: stretch; margin-top: 52px; }
.hw-sys { position: relative; background: var(--surface); border: 1.5px solid var(--divider); border-radius: var(--radius-xl); padding: 22px 20px 20px; box-shadow: var(--shadow); transition: box-shadow .3s, border-color .3s, transform .3s; min-width: 0; }
.hw-sys.hw-s4 { border-top: 4px solid var(--brand); }
.hw-sys.hw-ghl { border-top: 4px solid #E6A21A; background: #FFFDF8; display: flex; flex-direction: column; }
.hw-skip { display: flex; gap: 10px; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; border: 1.5px dashed #E8C777; font-size: .85rem; color: #5A4300; margin-top: auto; }
.hw-skip .i { width: 17px; height: 17px; color: var(--amber); margin-top: 2px; }
.hw-ghl .hw-mods { margin-bottom: 18px; }
.hw-sys-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hw-sys-head .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); flex: none; }
.hw-sys.hw-ghl .hw-sys-head .ic { background: var(--amber-bg); color: var(--amber); }
.hw-sys-head b { display: block; font: 700 1.2rem var(--head); }
.hw-sys-head small { color: var(--text-2); font-size: .82rem; }
.hw-mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-mod { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--divider); background: var(--surface); font: 500 .92rem var(--body); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.hw-mod .i { width: 19px; height: 19px; color: var(--brand); }
.hw-sys.hw-ghl .hw-mod .i { color: var(--amber); }
.hw-mod span { flex: 1; min-width: 0; }
.hw-mod:hover { border-color: var(--border); transform: translateX(2px); }
.hw-sys.hw-ghl .hw-mod:hover { transform: translateX(-2px); }
.hw-mod[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(117,73,239,.16); font-weight: 600; }
.hw-sys.hw-ghl .hw-mod[aria-pressed="true"] { border-color: #E6A21A; background: #FFF7E3; box-shadow: 0 0 0 3px rgba(230,162,26,.22); }

/* Cards glow where the selected data lives */
.hw-diagram[data-kind="own"] .hw-sys.hw-s4, .hw-diagram[data-kind="sync"] .hw-sys.hw-s4 { box-shadow: 0 0 0 4px rgba(117,73,239,.14), var(--shadow-lg); }
.hw-diagram[data-kind="ghl"] .hw-sys.hw-ghl, .hw-diagram[data-kind="sync"] .hw-sys.hw-ghl { box-shadow: 0 0 0 4px rgba(230,162,26,.2), var(--shadow-lg); }
.hw-diagram[data-kind="own"] .hw-sys.hw-ghl, .hw-diagram[data-kind="ghl"] .hw-sys.hw-s4 { opacity: .78; }

/* Connector */
.hw-bridge { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0; min-width: 0; }
.hw-bridge-title { text-align: center; margin-bottom: 4px; }
.hw-bridge-title b { display: block; font: 700 1.05rem var(--head); }
.hw-bridge-title small { color: var(--text-2); font-size: .78rem; }
.hw-bn { display: grid; grid-template-columns: minmax(14px, 1fr) auto minmax(14px, 1fr); align-items: center; }
.hw-chip { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 9px 12px; border-radius: 14px; background: var(--ink); color: #fff; width: 196px; box-shadow: var(--shadow); position: relative; z-index: 1; }
.hw-chip .i { width: 17px; height: 17px; color: #C9B8FF; grid-row: span 2; }
.hw-chip b { font: 600 .86rem var(--head); line-height: 1.1; }
.hw-chip small { grid-column: 2; font-size: .72rem; line-height: 1.25; color: #B7BEC8; }
.hw-ln { position: relative; display: block; height: 3px; background-image: repeating-linear-gradient(90deg, #B9A2FF 0 7px, transparent 7px 13px); background-size: 26px 3px; opacity: .6; animation: hwDash 1.4s linear infinite; }
@keyframes hwDash { to { background-position: 26px 0; } }
.hw-ln::before, .hw-ln::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #7549EF; box-shadow: 0 0 12px 3px rgba(117,73,239,.65); opacity: 0; left: 0; }
.hw-ln.r::before, .hw-ln.r::after { background: #E6A21A; box-shadow: 0 0 12px 3px rgba(230,162,26,.7); }
@keyframes hwPktR { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes hwPktL { 0% { left: 100%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }
/* data-dir: out = Seat Four to GoHighLevel, in = GoHighLevel to Seat Four */
.hw-diagram[data-dir="out"] .hw-ln::before, .hw-diagram[data-dir="both"] .hw-ln::before { animation: hwPktR 1.6s linear infinite; }
.hw-diagram[data-dir="out"] .hw-ln.r::before, .hw-diagram[data-dir="both"] .hw-ln.r::before { animation-delay: .8s; }
.hw-diagram[data-dir="in"] .hw-ln::after, .hw-diagram[data-dir="both"] .hw-ln::after { animation: hwPktL 1.6s linear infinite; }
.hw-diagram[data-dir="in"] .hw-ln.l::after, .hw-diagram[data-dir="both"] .hw-ln.l::after { animation-delay: .8s; }
.hw-diagram[data-dir="none"] .hw-ln { opacity: .22; animation-play-state: paused; }
.hw-diagram[data-dir="none"] .hw-chip { opacity: .85; }

.hw-where { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; max-width: 880px; margin: 30px auto 0; padding: 22px 26px; border-radius: var(--radius-xl); background: var(--brand-soft); border: 1px solid #DCD0FF; }
.hw-where[data-kind="ghl"] { background: #FFF7E3; border-color: #F2D590; }
.hw-loc { display: flex; align-items: center; gap: 0; font: 600 .78rem var(--head); }
.hw-loc span { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--divider); color: var(--text-2); transition: background .25s, color .25s, border-color .25s; white-space: nowrap; }
.hw-loc i { width: 26px; height: 3px; background: var(--divider); }
.hw-where[data-kind="own"] .hw-loc .a, .hw-where[data-kind="sync"] .hw-loc .a { background: var(--brand); color: #fff; border-color: var(--brand); }
.hw-where[data-kind="ghl"] .hw-loc .b, .hw-where[data-kind="sync"] .hw-loc .b { background: #E6A21A; color: #3B2A00; border-color: #E6A21A; }
.hw-where[data-kind="sync"] .hw-loc i { background: linear-gradient(90deg, var(--brand), #E6A21A); }
.hw-where-k { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-pressed); }
.hw-where[data-kind="ghl"] .hw-where-k { color: var(--amber); }
.hw-where h3 { margin: 4px 0 6px; } .hw-where p { margin: 0; color: var(--text-2); font-size: .95rem; }
.hw-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 18px; font-size: .82rem; color: var(--text-2); }
.hw-legend span { display: inline-flex; align-items: center; gap: 8px; }
.hw-honest { display: flex; gap: 14px; align-items: flex-start; max-width: 880px; margin: 30px auto 0; padding: 18px 22px; border-radius: var(--radius-lg); background: var(--amber-bg); border: 1px solid #F2D590; color: #4A3200; }
.hw-honest .i { color: var(--amber); margin-top: 3px; } .hw-honest p { margin: 0; font-size: .93rem; }

/* Outbox demo */
.hw-outbox { max-width: 980px; margin: 56px auto 0; padding: 30px; border-radius: var(--radius-xl); background: var(--ink); color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hw-outbox::before { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; top: -260px; background: radial-gradient(circle, rgba(117,73,239,.5), rgba(117,73,239,0) 65%); }
.hw-outbox .eyebrow { color: #B9A2FF; } .hw-outbox .eyebrow::before { background: #B9A2FF; }
.hw-outbox .muted { color: #B7BEC8; }
.hw-ob-head { position: relative; display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.hw-ob-head h3 { font-size: 1.6rem; margin: 0 0 6px; } .hw-ob-head p { margin: 0; max-width: 560px; }
.hw-ob-head .btn[disabled] { opacity: .5; cursor: default; transform: none; }
.hw-ob-lane { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; margin: 34px 0 14px; padding-bottom: 66px; }
.hw-ob-lane::before { content: ""; position: absolute; left: 16%; right: 16%; top: 38px; height: 3px; background: repeating-linear-gradient(90deg, #4A5460 0 8px, transparent 8px 14px); }
.hw-node { position: relative; text-align: center; display: grid; justify-items: center; gap: 2px; }
.hw-node b { font: 600 1rem var(--head); } .hw-node small { color: #8792A3; font-size: .8rem; }
.hw-node .ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #1B2127; border: 2px solid #3A444F; color: #D7C9FF; margin-bottom: 8px; transition: border-color .3s, box-shadow .3s; }
.hw-outbox[data-state="sent"] .hw-node:nth-child(3) .ic { border-color: #6CE9A6; box-shadow: 0 0 0 6px rgba(108,233,166,.18); color: #9BE2B4; }
.hw-outbox[data-state="pending"] .hw-node.mid .hw-ring { box-shadow: 0 0 0 6px rgba(117,73,239,.28); }
.hw-ring { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #1B2127; margin-bottom: 8px; transition: box-shadow .3s; }
.hw-ring svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); transform: rotate(-90deg); }
.hw-ring circle { fill: none; stroke-width: 5; }
.hw-ring .trk { stroke: #2E3640; }
.hw-ring .val { stroke: #9E7BFF; stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; }
.hw-ring em { position: relative; font: 700 1.5rem var(--head); font-style: normal; font-variant-numeric: tabular-nums; }
.hw-bub { position: absolute; bottom: 0; left: 8%; width: min(300px, 70%); display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: var(--ink); font-size: .84rem; line-height: 1.35; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; transform: translateY(10px); transition: left .8s cubic-bezier(.5,0,.2,1), opacity .4s, transform .4s, background .3s; }
.hw-bub .i { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.hw-outbox[data-state="pending"] .hw-bub { opacity: 1; transform: none; left: 33%; background: #EFE9FF; }
.hw-outbox[data-state="sent"] .hw-bub { opacity: 1; transform: none; left: calc(92% - min(300px, 70%)); background: #E5F5EA; }
.hw-outbox[data-state="undone"] .hw-bub { opacity: .0; transform: translateY(-14px) scale(.9); left: 33%; }
.hw-ob-foot { position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hw-ob-foot p { margin: 0; color: #B7BEC8; font-size: .92rem; }
.hw-outbox .btn-ghost { background: transparent; color: #fff; border-color: #4A5460; }
.hw-outbox .btn-ghost:hover { border-color: #B9A2FF; color: #fff; }
.hw-outbox .btn-ghost[disabled] { opacity: .35; cursor: default; }

/* ===== Lead flow ===== */
.hw-flow { background: var(--canvas); }
.hw-stage { position: relative; margin-top: 50px; display: grid; gap: 22px; }
.hw-top { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 30px; align-items: center; position: relative; }
.hw-tl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; position: relative; }
.hw-st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 20px 12px 16px; border-radius: var(--radius-lg); border: 1.5px solid var(--divider); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; transition: border-color .3s, box-shadow .3s, transform .3s, background .3s, opacity .3s; opacity: .55; min-width: 0; }
.hw-st:hover { opacity: 1; border-color: var(--border); }
.hw-st.done { opacity: 1; border-color: #CDBFFB; }
.hw-st.cur { opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(117,73,239,.16), var(--shadow-lg); transform: translateY(-4px); }
.hw-st b { font: 600 1.02rem var(--head); }
.hw-sub { font-size: .78rem; color: var(--text-2); }
.hw-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); margin-bottom: 6px; transition: background .3s, color .3s; }
.hw-st.done .hw-ico { background: var(--brand); color: #fff; }
.hw-st.cur .hw-ico { background: var(--brand); color: #fff; animation: hwPulse 1.6s ease-out infinite; }
@keyframes hwPulse { 0% { box-shadow: 0 0 0 0 rgba(117,73,239,.5); } 100% { box-shadow: 0 0 0 16px rgba(117,73,239,0); } }
.hw-top .hw-st::after { content: ""; position: absolute; right: -30px; top: 50%; width: 30px; height: 3px; margin-top: -2px; background: repeating-linear-gradient(90deg, var(--brand) 0 6px, transparent 6px 11px); opacity: .5; }
.hw-top .hw-st:last-child::after { display: none; }
.hw-tl::before { content: ""; position: absolute; left: 8%; right: 8%; top: 49px; height: 3px; background: var(--divider); }
.hw-tl::after { content: ""; position: absolute; left: 8%; top: 49px; height: 3px; background: var(--brand); width: var(--fill, 0%); max-width: 84%; transition: width .7s cubic-bezier(.4,0,.2,1); }
.hw-tl .hw-st { background: transparent; border-color: transparent; padding-top: 24px; z-index: 1; }
.hw-tl .hw-st.cur { background: var(--surface); border-color: var(--brand); }
.hw-tl .hw-st.done { border-color: transparent; }
.hw-sc { display: inline-flex; align-items: center; gap: 6px; margin: 2px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); border: 1px solid #DCD0FF; font-size: .74rem; font-weight: 600; color: var(--brand-pressed); transition: background .25s, transform .25s; }
.hw-sc i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hw-st.cur .hw-sc { animation: hwChip 2.2s ease-in-out infinite; }
.hw-st.cur .hw-sc:nth-child(2) { animation-delay: .25s; } .hw-st.cur .hw-sc:nth-child(3) { animation-delay: .5s; } .hw-st.cur .hw-sc:nth-child(4) { animation-delay: .75s; } .hw-st.cur .hw-sc:nth-child(5) { animation-delay: 1s; }
@keyframes hwChip { 0%, 100% { transform: none; background: var(--brand-soft); } 20% { transform: translateY(-3px); background: #E2D8FF; } }
.hw-two { display: flex; gap: 6px; margin-top: 6px; }
.hw-two i { font-style: normal; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--ink); color: #fff; }
.hw-two i:last-child { background: var(--brand); }
.hw-pkt { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #9E7BFF 45%, #7549EF); box-shadow: 0 0 0 5px rgba(117,73,239,.22), 0 6px 16px rgba(117,73,239,.6); transition: transform .8s cubic-bezier(.4,0,.2,1); z-index: 3; pointer-events: none; opacity: 0; }
.hw-stage.ready .hw-pkt { opacity: 1; }

.hw-cap { display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; margin-top: 34px; padding: 22px 26px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--divider); box-shadow: var(--shadow); }
.hw-cap-n { font: 700 2.2rem var(--head); color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 94px; }
.hw-cap-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.hw-cap-row h3 { margin: 0; font-size: 1.35rem; }
.hw-cap p { margin: 0; color: var(--text-2); font-size: .95rem; max-width: 62ch; }
.hw-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: #ECEFF3; color: #4B5560; }
.hw-tag.ok { background: var(--green-bg); color: var(--green); } .hw-tag.mid { background: var(--amber-bg); color: var(--amber); }
.hw-ctl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hw-cb { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--divider); background: var(--surface); font: 600 .88rem var(--body); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.hw-cb .i { width: 17px; height: 17px; color: var(--brand); }
.hw-cb:hover { border-color: var(--brand); transform: translateY(-1px); }
.hw-cb.hw-play { background: var(--brand); color: #fff; border-color: var(--brand); } .hw-cb.hw-play .i { color: #fff; }
.hw-cb.hw-play:hover { background: var(--brand-hover); }

/* ===== Phones teaser ===== */
.hw-ph { background: var(--surface); padding: 96px 0; }
.hw-ph-card { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 48px; border-radius: var(--radius-xl); background: radial-gradient(700px 360px at 100% 0%, #EEE7FF, rgba(238,231,255,0) 70%), var(--canvas); border: 1px solid var(--divider); box-shadow: var(--shadow); overflow: hidden; }
.hw-ph-card h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.hw-ph-list { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; gap: 12px; }
.hw-ph-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.hw-ph-list .tag { flex: none; margin-top: 2px; min-width: 128px; text-align: center; }
.hw-ph-art { display: grid; justify-items: center; gap: 10px; }
.hw-ph-art > p { margin: 0; font-size: .78rem; color: var(--text-2); }
.hw-handset { position: relative; width: min(300px, 100%); padding: 26px 22px 22px; border-radius: 36px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); display: grid; justify-items: center; gap: 12px; min-height: 340px; align-content: start; }
.hw-handset::before { content: ""; width: 70px; height: 6px; border-radius: 6px; background: #2E3640; }
.hw-ring-call { position: relative; display: grid; place-items: center; width: 84px; height: 84px; margin-top: 8px; }
.hw-ring-call .ic { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #20643B; color: #fff; animation: hwShake 2.4s ease-in-out infinite; }
.hw-ring-call .r1, .hw-ring-call .r2 { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #6CE9A6; opacity: 0; animation: hwRing 2.4s ease-out infinite; }
.hw-ring-call .r2 { animation-delay: .5s; }
@keyframes hwRing { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes hwShake { 0%, 60%, 100% { transform: none; } 5%, 15%, 25% { transform: rotate(-12deg); } 10%, 20%, 30% { transform: rotate(12deg); } }
.hw-call-no { font: 600 .9rem var(--head); color: #B7BEC8; letter-spacing: .02em; }
.hw-call-pop { display: grid; gap: 2px; width: 100%; padding: 14px 16px; border-radius: 16px; background: #fff; color: var(--ink); animation: hwPop 7s ease-in-out infinite; }
.hw-call-pop b { font: 700 1.1rem var(--head); } .hw-call-pop span { font-size: .8rem; color: var(--text-2); }
@keyframes hwPop { 0%, 18% { opacity: 0; transform: translateY(22px) scale(.96); } 28%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px); } }

/* ===== Phase two ===== */
.hw-p2 { background: var(--canvas); }
.hw-toggle { display: flex; width: fit-content; margin: 34px auto 0; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--divider); box-shadow: var(--shadow); }
.hw-toggle button { padding: 11px 24px; border: 0; border-radius: 999px; background: transparent; font: 600 .95rem var(--body); color: var(--text-2); cursor: pointer; transition: background .25s, color .25s; }
.hw-toggle button.on { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(117,73,239,.6); }
.hw-slots { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; perspective: 1200px; }
.hw-slot { position: relative; display: block; width: 100%; height: 132px; padding: 0; border: 0; background: transparent; cursor: pointer; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,.7,.2,1); transition-delay: calc(var(--i, 0) * 45ms); text-align: left; font: inherit; color: inherit; }
.hw-slot:focus-visible { outline-offset: 4px; }
.hw-slots[data-mode="open"] .hw-slot { transform: rotateY(180deg); }
.hw-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 16px 16px 14px; border-radius: var(--radius-lg); backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1.5px solid var(--divider); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.hw-face small { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.hw-face b { font: 600 1.05rem/1.15 var(--head); }
.hw-face.front { background: #FFFDF8; border-color: #F2D590; }
.hw-face.front small { color: var(--amber); }
.hw-face.back { background: linear-gradient(160deg, #fff, var(--brand-soft)); border-color: #CDBFFB; transform: rotateY(180deg); }
.hw-face.back small { color: var(--brand-pressed); }
.hw-face em { font-style: normal; align-self: flex-start; white-space: normal; max-width: 100%; line-height: 1.25; }
.hw-slot:hover .hw-face { box-shadow: var(--shadow-lg); }
.hw-slot[aria-pressed="true"] .hw-face { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(117,73,239,.18), var(--shadow-lg); }
.hw-slot-detail { max-width: 880px; margin: 30px auto 0; padding: 24px 28px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--divider); box-shadow: var(--shadow); }
.hw-sd-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .hw-sd-top h3 { margin: 0; font-size: 1.4rem; }
.hw-slot-detail p { color: var(--text-2); margin: 10px 0 12px; }
.hw-sd-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .85rem; color: var(--text-2); }
.hw-sd-meta span:empty { display: none; }
.hw-sd-meta b { color: var(--ink); }

/* ===== Swap anything ===== */
.hw-sw { background: var(--surface); }
.hw-art { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--brand-soft); } .hw-art img { width: 100%; height: auto; }
.hw-aside { font: italic 600 1rem var(--head); color: var(--brand-pressed); padding-left: 14px; border-left: 3px solid var(--brand); }
.hw-sw .split .btn { margin-top: 6px; }
.hw-swapper { margin-top: 64px; padding: 28px; border-radius: var(--radius-xl); background: var(--canvas); border: 1px solid var(--divider); }
.hw-swapper-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 16px; }
.hw-swapper-head b { font: 700 1.3rem var(--head); } .hw-swapper-head small { color: var(--text-2); }
.hw-rows { display: grid; gap: 10px; }
.hw-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; }
.hw-row-l { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.hw-block { position: relative; display: block; height: 52px; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(240,235,254,.9)); border: 1.5px solid #CDBFFB; box-shadow: inset 0 1px 0 #fff, 0 6px 16px -8px rgba(117,73,239,.4); }
.hw-block b { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 18px; font: 600 1.05rem var(--head); }
.hw-block.hw-out b { animation: hwOut .22s ease-in forwards; }
.hw-block.hw-in b { animation: hwIn .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hwOut { to { transform: translateY(-120%); opacity: 0; } }
@keyframes hwIn { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.hw-swapper-foot { margin: 18px 0 0; font-size: .88rem; color: var(--text-2); }
.hw-swapper-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ===== Under the hood ===== */
.hw-hood { background: var(--canvas); }
.hw-term { max-width: 900px; margin: 44px auto 0; border-radius: var(--radius-lg); background: #11161B; color: #E6EAF0; box-shadow: var(--shadow-lg); overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hw-term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #1B2127; border-bottom: 1px solid #2A323B; }
.hw-term-bar > i { width: 11px; height: 11px; border-radius: 50%; background: #F97066; } .hw-term-bar > i:nth-child(2) { background: #FDB022; } .hw-term-bar > i:nth-child(3) { background: #32D583; }
.hw-tabs { display: flex; gap: 4px; margin-left: 14px; flex-wrap: wrap; }
.hw-tabs button { border: 0; background: transparent; color: #8792A3; font: 500 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.hw-tabs button[aria-selected="true"] { background: #2A323B; color: #fff; }
.hw-tabs button:hover { color: #fff; }
.hw-pane { padding: 26px; min-height: 270px; }
.hw-pane[hidden] { display: none; }
.hw-stack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hw-stack li { padding: 12px 14px; border-radius: 12px; background: #1B2127; border: 1px solid #2A323B; transition: border-color .2s, transform .2s; }
.hw-stack li:hover { border-color: #9E7BFF; transform: translateY(-2px); }
.hw-stack small { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #8792A3; }
.hw-stack b { display: block; margin-top: 3px; font-weight: 600; font-size: .9rem; color: #D7C9FF; }
.hw-term-note { margin: 22px 0 0; font-size: .85rem; color: #6CE9A6; } .hw-term-note span { color: #8792A3; }
.hw-svc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hw-svc button { border: 1px solid #2A323B; background: #1B2127; color: #E6EAF0; padding: 12px 20px; border-radius: 12px; font: 600 .95rem ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; transition: border-color .15s, background .15s; }
.hw-svc button:hover { border-color: #9E7BFF; }
.hw-svc button.on { background: #3B2A80; border-color: #9E7BFF; color: #fff; }
.hw-svc i { font-style: normal; color: #9E7BFF; }
.hw-svc-text { margin: 22px 0 0; padding: 16px 18px; border-radius: 12px; background: #1B2127; border-left: 3px solid #9E7BFF; font: 400 .92rem/1.55 var(--body); color: #DDE2E8; }
.hw-guard { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font: 400 .93rem/1.5 var(--body); }
.hw-guard li { display: flex; gap: 12px; align-items: flex-start; } .hw-guard .i { color: #6CE9A6; margin-top: 2px; width: 19px; height: 19px; }
.hw-hood-foot { max-width: 900px; margin: 26px auto 0; text-align: center; color: var(--text-2); font-size: .93rem; } .hw-hood-foot a { text-decoration: underline; text-underline-offset: 2px; }

/* ===== Vision ===== */
.hw-vision { background: var(--surface); }
.hw-vision .btn { margin-top: 26px; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .hw-diagram { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hw-bridge { flex-direction: column; padding: 34px 0; gap: 8px; }
  .hw-bridge::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background-image: repeating-linear-gradient(180deg, #B9A2FF 0 7px, transparent 7px 13px); opacity: .55; }
  .hw-bridge::after { content: ""; position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #7549EF; box-shadow: 0 0 12px 3px rgba(117,73,239,.65); opacity: 0; }
  .hw-diagram[data-dir="out"] .hw-bridge::after, .hw-diagram[data-dir="both"] .hw-bridge::after { animation: hwPktD 1.8s linear infinite; }
  .hw-diagram[data-dir="in"] .hw-bridge::after { animation: hwPktU 1.8s linear infinite; }
  .hw-diagram[data-dir="none"] .hw-bridge::before { opacity: .2; }
  @keyframes hwPktD { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  @keyframes hwPktU { 0% { top: 100%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 0; opacity: 0; } }
  .hw-bridge-title { position: relative; background: var(--surface); padding: 4px 12px; z-index: 1; align-self: center; }
  .hw-bn { display: block; position: relative; z-index: 1; }
  .hw-ln { display: none; }
  .hw-chip { margin: 0 auto; width: 250px; }
  .hw-top { grid-template-columns: 1fr; gap: 26px; }
  .hw-top .hw-st::after { right: auto; left: 50%; top: auto; bottom: -26px; width: 3px; height: 26px; margin: 0 0 0 -1px; background: repeating-linear-gradient(180deg, var(--brand) 0 6px, transparent 6px 11px); }
  .hw-tl { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .hw-tl::before, .hw-tl::after { display: none; }
  .hw-tl .hw-st { background: var(--surface); border-color: var(--divider); }
  .hw-cap { grid-template-columns: 1fr; gap: 14px; } .hw-ctl { justify-content: flex-start; }
  .hw-ph-card { grid-template-columns: 1fr; padding: 34px 26px; }
  .hw-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hw-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hw-where { grid-template-columns: 1fr; gap: 14px; }
  .hw-loc { justify-content: flex-start; }
  .hw-tl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hw-slot { height: 148px; }
  .hw-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .hw-row-l { grid-column: 1 / -1; }
  .hw-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-pane { padding: 18px; }
  .hw-outbox { padding: 22px 18px; }
  .hw-ob-lane { padding-bottom: 96px; }
  .hw-node .ic, .hw-ring { width: 60px; height: 60px; }
  .hw-ob-lane::before { top: 30px; }
  .hw-outbox[data-state="sent"] .hw-bub { left: 8%; width: 84%; top: 132px; bottom: auto; }
  .hw-outbox[data-state="pending"] .hw-bub { left: 8%; width: 84%; }
  .hw-bub { width: 84%; }
  .hw-ph-list .tag { min-width: 0; }
  .hw-ph-list li { flex-direction: column; gap: 4px; }
  .hw-swapper { padding: 20px 16px; }
  .hw-toggle button { padding: 10px 14px; font-size: .88rem; }
  .hw-st { padding: 16px 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-ln, .hw-ln::before, .hw-ln::after, .hw-bridge::after, .hw-ring-call .ic, .hw-ring-call .r1, .hw-ring-call .r2, .hw-st.cur .hw-ico, .hw-st.cur .hw-sc, .hw-handset .hw-call-pop { animation: none !important; }
  .hw-call-pop { opacity: 1; transform: none; }
  .hw-slot, .hw-pkt, .hw-bub, .hw-tl::after { transition: none !important; }
  .hw-block.hw-out b, .hw-block.hw-in b { animation: none; }
}
