/* =====================================================================
   ScholarHat - Sandbox UI
   Shared by /sandbox, the AWS sandbox page and the bootcamp page.
   .sbx   = page root (Sandboxes.cshtml, Course/Sandbox.cshtml)
   .sbx-x = interactive explorer (Shared/_SandboxExplorer.cshtml), also embedded in .bcl
   Tokens mirror self-paced-list.css (cyan brand). Radius rule:
   pills 999px, buttons and inputs 12px, cards 18px.
   ===================================================================== */

.sbx, .sbx-x {
    --sbx-brand: #26d3e4;
    --sbx-brand-ink: #0b7482;
    --sbx-brand-soft: rgba(38,211,228,.10);
    --sbx-brand-line: rgba(38,211,228,.30);
    --sbx-ink: #0f172a;
    --sbx-body: #334155;
    --sbx-muted: #64748b;
    --sbx-bg: #ffffff;
    --sbx-surface: #f5fafb;
    --sbx-card: #ffffff;
    --sbx-line: #e4ecf1;
    --sbx-ok: #059669;
    --sbx-ok-soft: rgba(5,150,105,.10);
    --sbx-warn: #b45309;
    --sbx-warn-soft: rgba(217,119,6,.12);
    --sbx-term: #0b1220;
    --sbx-term-ink: #cfe9ee;
    --sbx-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12);
    --sbx-shadow-hover: 0 2px 4px rgba(15,23,42,.05), 0 22px 40px -16px rgba(14,154,170,.35);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--sbx-body);
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] .sbx, [data-bs-theme="dark"] .sbx-x {
    --sbx-brand-ink: #26d3e4;
    --sbx-brand-soft: rgba(38,211,228,.09);
    --sbx-ink: #f1f5f9;
    --sbx-body: #cbd5e1;
    --sbx-muted: #94a3b8;
    --sbx-bg: #020817;
    --sbx-surface: #070f21;
    --sbx-card: #0b1628;
    --sbx-line: rgba(255,255,255,.09);
    --sbx-ok: #34d399;
    --sbx-ok-soft: rgba(52,211,153,.12);
    --sbx-warn: #fbbf24;
    --sbx-warn-soft: rgba(251,191,36,.12);
    --sbx-term: #050b17;
    --sbx-shadow: 0 1px 2px rgba(0,0,0,.3);
    --sbx-shadow-hover: 0 24px 44px -18px rgba(38,211,228,.28);
}

.sbx { background: var(--sbx-bg); overflow-x: clip; }
.sbx *, .sbx *::before, .sbx *::after, .sbx-x *, .sbx-x *::before, .sbx-x *::after { box-sizing: border-box; }

.sbx-shell { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sbx .ico, .sbx-x .ico { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- buttons ---------- */
.sbx-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px;
    border: 1px solid transparent; border-radius: 12px;
    font-family: inherit; font-weight: 700; font-size: .9375rem; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    color: #04222a;
    background: linear-gradient(135deg, var(--sbx-brand), #4fe3f0);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.sbx-btn::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
    transform: translateX(-120%);
}
.sbx-btn:hover { color: #04222a; filter: brightness(1.04); box-shadow: 0 10px 22px -10px rgba(38,211,228,.8); }
.sbx-btn:hover::after { transform: translateX(120%); transition: transform .7s ease; }
.sbx-btn:active { transform: scale(.98); }
.sbx-btn .ico { transition: transform .25s; }
.sbx-btn:hover .ico { transform: translateX(3px); }
.sbx-btn--ghost {
    color: var(--sbx-ink);
    background: var(--sbx-card);
    border-color: var(--sbx-line);
}
.sbx-btn--ghost:hover { color: var(--sbx-ink); border-color: var(--sbx-brand-line); box-shadow: none; filter: none; }
.sbx-btn--wide { width: 100%; }
.sbx-btn:focus-visible, .sbx-x button:focus-visible, .sbx a:focus-visible { outline: 3px solid var(--sbx-brand); outline-offset: 2px; }

/* ---------- hero ---------- */
.sbx-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
    background: var(--sbx-bg);
}
.sbx-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
    background-image: linear-gradient(var(--sbx-line) 1px, transparent 1px), linear-gradient(90deg, var(--sbx-line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(60% 90% at 25% 30%, #000 15%, transparent 75%);
    mask-image: radial-gradient(60% 90% at 25% 30%, #000 15%, transparent 75%);
}
.sbx-glow {
    position: absolute; z-index: -1; width: 460px; height: 460px; right: -120px; top: -160px;
    border-radius: 50%; background: rgba(38,211,228,.35); filter: blur(90px); opacity: .55;
    transform: translate(calc(var(--px, 0) * -40px), calc(var(--py, 0) * -26px));
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
[data-bs-theme="dark"] .sbx-glow { opacity: .3; }

.sbx-hero__grid { display: grid; gap: 36px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .sbx-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; } }

.sbx-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--sbx-brand-line);
    background: color-mix(in srgb, var(--sbx-card) 70%, transparent);
    color: var(--sbx-brand-ink); font-size: .8125rem; font-weight: 700;
}
.sbx-title {
    margin: 18px 0 16px; max-width: 16ch;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800;
    color: var(--sbx-ink); text-wrap: balance;
}
.sbx-title em {
    font-style: normal;
    background: linear-gradient(100deg, #0e9aaa, #26d3e4 55%, #4f8bff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-bs-theme="dark"] .sbx-title em { background: linear-gradient(100deg, #26d3e4, #7fe9f2 60%, #9db8ff); -webkit-background-clip: text; background-clip: text; }
.sbx-lead { margin: 0 0 26px; max-width: 52ch; font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.65; color: var(--sbx-muted); text-wrap: pretty; }
.sbx-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* video facade card */
.sbx-video {
    border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card);
    box-shadow: var(--sbx-shadow); overflow: hidden;
}
.sbx-video__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--sbx-line); }
.sbx-video__bar b { font-size: .9375rem; color: var(--sbx-ink); }
.sbx-video__body { padding: 14px; }
.sbx-video__frame { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--sbx-surface); }
.sbx-video__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.sbx-video__note { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: .8125rem; color: var(--sbx-muted); }
.sbx-video__note .ico { color: var(--sbx-ok); }

/* ---------- proof strip ---------- */
.sbx-proof { border-block: 1px solid var(--sbx-line); background: var(--sbx-surface); }
.sbx-proof ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .sbx-proof ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sbx-proof li { display: flex; align-items: center; gap: 12px; padding: 18px 14px; }
.sbx-proof li + li { border-left: 1px solid var(--sbx-line); }
@media (max-width: 899px) { .sbx-proof li:nth-child(odd) { border-left: 0; } .sbx-proof li:nth-child(n+3) { border-top: 1px solid var(--sbx-line); } }
.sbx-proof .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sbx-brand-soft); color: var(--sbx-brand-ink); flex: none; }
.sbx-proof b { display: block; color: var(--sbx-ink); font-size: .9375rem; }
.sbx-proof small { color: var(--sbx-muted); font-size: .8125rem; }

/* ---------- sections ---------- */
.sbx-sec { padding: clamp(48px, 2vw, 88px) 0; }
.sbx-sec--tint { background: radial-gradient(60% 40% at 50% 0%, var(--sbx-brand-soft), transparent 70%), var(--sbx-surface); }
.sbx-head { max-width: 680px; margin: 0 0 32px; }
.sbx-head--center { margin-inline: auto; text-align: center; }
.sbx-head h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; color: var(--sbx-ink); text-wrap: balance; }
.sbx-head p { margin: 0; color: var(--sbx-muted); line-height: 1.65; text-wrap: pretty; }

/* reveal: only when JS marked the root */
.js-rv .sbx-rv { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 60ms); }
.js-rv .sbx-rv.in { opacity: 1; transform: none; }

/* ---------- sandbox directory ---------- */
.sbx-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sbx-count { margin: 0; font-size: .875rem; color: var(--sbx-muted); }
.sbx-count b { color: var(--sbx-ink); }
.sbx-search { position: relative; width: min(100%, 320px); }
.sbx-search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sbx-muted); }
.sbx-search input {
    width: 100%; height: 46px; padding: 0 14px 0 40px;
    border: 1px solid var(--sbx-line); border-radius: 12px; background: var(--sbx-card); color: var(--sbx-ink);
    font: inherit; font-size: .9375rem;
}
.sbx-search input::placeholder { color: var(--sbx-muted); }
.sbx-search input:focus { outline: 3px solid var(--sbx-brand-line); border-color: var(--sbx-brand); }

.sbx-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .sbx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sbx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sbx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.sbx-card {
    position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px;
    border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card);
    box-shadow: var(--sbx-shadow); overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.sbx-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--sbx-brand) 20%, transparent), transparent 70%);
}
.sbx-card:hover, .sbx-card:focus-within { transform: translateY(-5px); box-shadow: var(--sbx-shadow-hover); border-color: var(--sbx-brand-line); }
.sbx-card:hover::before { opacity: 1; }
.sbx-card > * { position: relative; }
.sbx-card__logo { display: grid; place-items: center; height: 84px; border-radius: 12px; background: var(--sbx-surface); }
.sbx-card__logo img { max-height: 56px; max-width: 70%; object-fit: contain; transition: transform .35s; }
.sbx-card:hover .sbx-card__logo img { transform: scale(1.06); }
.sbx-card__name { margin: 0; font-size: 1.0625rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--sbx-ink); min-height: 2.6em; }
.sbx-card__name a { color: inherit; text-decoration: none; }
.sbx-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sbx-card__meta { display: flex; align-items: center; justify-content: space-between; font-size: .8125rem; color: var(--sbx-muted); }
.sbx-card__meta .ok { display: inline-flex; align-items: center; gap: 5px; color: var(--sbx-ok); font-weight: 700; }
.sbx-card__meta .st { display: inline-flex; align-items: center; gap: 5px; }
.sbx-card__meta .st .ico { color: #f59e0b; width: 14px; height: 14px; }
.sbx-card__go { margin-top: auto; }
.sbx-empty { text-align: center; padding: 48px 0; color: var(--sbx-muted); }
.sbx-empty h3 { color: var(--sbx-ink); font-size: 1.2rem; }

/* ---------- explorer ---------- */
.sbx-x { color: var(--sbx-body); }
.sbx-x__win { border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card); box-shadow: var(--sbx-shadow); overflow: hidden; }
.sbx-x__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--sbx-line); background: var(--sbx-surface); }
.sbx-x__title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--sbx-ink); font-size: .9375rem; }
.sbx-x__title .ico { color: var(--sbx-brand-ink); }
.sbx-x__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sbx-x__facts li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--sbx-line); background: var(--sbx-card); font-size: .75rem; font-weight: 600; color: var(--sbx-muted); }
.sbx-x__facts li b { color: var(--sbx-ink); }
.sbx-x__facts li.is-live { color: var(--sbx-ok); border-color: color-mix(in srgb, var(--sbx-ok) 40%, transparent); background: var(--sbx-ok-soft); }

.sbx-x__body { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .sbx-x__body { grid-template-columns: 250px minmax(0, 1fr); } }
.sbx-x__nav { padding: 14px; border-bottom: 1px solid var(--sbx-line); display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 900px) { .sbx-x__nav { border-bottom: 0; border-right: 1px solid var(--sbx-line); } }
.sbx-x__grp { margin: 10px 8px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sbx-muted); }
.sbx-x__grp:first-child { margin-top: 0; }
.sbx-x__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 900px) { .sbx-x__tabs { flex-direction: column; flex-wrap: nowrap; gap: 2px; } }
.sbx-x__tab {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 12px;
    background: transparent; color: var(--sbx-body); font-family: inherit; font-weight: 600; font-size: .875rem; line-height: 1.2; text-align: left; cursor: pointer;
    transition: background .2s, color .2s;
}
.sbx-x__tab:hover { background: var(--sbx-brand-soft); }
.sbx-x__tab[aria-selected="true"] { background: var(--sbx-brand-soft); color: var(--sbx-ink); box-shadow: inset 0 0 0 1px var(--sbx-brand-line); }
.sbx-x__abbr { display: grid; place-items: center; min-width: 38px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--sbx-surface); border: 1px solid var(--sbx-line); font-size: .6875rem; font-weight: 800; color: var(--sbx-brand-ink); }
.sbx-x__tab[aria-selected="true"] .sbx-x__abbr { background: var(--sbx-brand); border-color: transparent; color: #04222a; }

.sbx-x__main { padding: 20px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.sbx-x__panel[hidden] { display: none; }
.sbx-x__panel { animation: sbx-rise .35s cubic-bezier(.2,.7,.2,1) both; }
.sbx-x__panel h3 { margin: 0 0 6px; font-size: 1.25rem; letter-spacing: -.02em; color: var(--sbx-ink); font-weight: 800; }
.sbx-x__panel > p { margin: 0 0 16px; color: var(--sbx-muted); line-height: 1.6; }
.sbx-x__cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .sbx-x__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sbx-x__label { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sbx-muted); }
.sbx-x__can { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sbx-x__can li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--sbx-body); }
.sbx-x__can .ico { margin-top: 2px; color: var(--sbx-ok); width: 16px; height: 16px; }
.sbx-x__lim { margin: 0; display: grid; gap: 8px; }
.sbx-x__lim div { padding: 9px 12px; border: 1px solid var(--sbx-line); border-radius: 12px; background: var(--sbx-surface); }
.sbx-x__lim dt { font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sbx-muted); }
.sbx-x__lim dd { margin: 2px 0 0; font-size: .875rem; font-weight: 600; color: var(--sbx-ink); }

.sbx-x__try { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--sbx-line); }
.sbx-x__slots { display: flex; gap: 6px; margin-right: auto; }
.sbx-x__slot { width: 26px; height: 26px; border-radius: 8px; border: 1px dashed var(--sbx-line); background: var(--sbx-surface); transition: background .25s, border-color .25s, transform .25s; }
.sbx-x__slot.on { background: var(--sbx-brand); border: 1px solid transparent; transform: scale(1.05); }
.sbx-x__slot.deny { animation: sbx-shake .4s; border-color: #dc2626; }
.sbx-x .sbx-btn { min-height: 42px; padding: 0 16px; font-size: .875rem; }

.sbx-x__term { margin: 0 20px 20px; border-radius: 12px; background: var(--sbx-term); color: var(--sbx-term-ink); overflow: hidden; }
.sbx-x__termbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: .75rem; color: #8aa4ad; border-bottom: 1px solid rgba(255,255,255,.08); }
.sbx-x__log { margin: 0; padding: 12px 14px; height: 148px; overflow-y: auto; font: 500 .8125rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; list-style: none; }
.sbx-x__log li { animation: sbx-rise .25s both; }
.sbx-x__log .t-ok { color: #5eead4; }
.sbx-x__log .t-no { color: #fca5a5; }
.sbx-x__log .t-dim { color: #8aa4ad; }
.sbx-x__reset { border: 0; background: none; color: #8aa4ad; font: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.sbx-x__reset:hover { color: #fff; }
.sbx-x__note { margin: 10px 2px 0; font-size: .8125rem; color: var(--sbx-muted); }

/* lifecycle */
.sbx-flow { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); counter-reset: none; }
@media (min-width: 760px) { .sbx-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sbx-flow li { position: relative; padding: 18px; border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card); }
.sbx-flow li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--sbx-brand); border-radius: 0 3px 3px 0; transition: width .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 220ms); }
.sbx-flow.in li::after { width: 100%; }
.sbx-flow .ic { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 12px; background: var(--sbx-brand-soft); color: var(--sbx-brand-ink); }
.sbx-flow h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--sbx-ink); }
.sbx-flow p { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--sbx-muted); }

/* ---------- benefits (bento: 1 feature + 4 tiles + wide tile) ---------- */
.sbx-bento { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .sbx-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); } .sbx-bento .a { grid-column: span 3; grid-row: span 2; } .sbx-bento .b, .sbx-bento .c { grid-column: span 3; } .sbx-bento .d, .sbx-bento .e { grid-column: span 3; } .sbx-bento .f { grid-column: span 6; } }
.sbx-tile { padding: 22px; border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card); transition: transform .3s, border-color .3s, box-shadow .3s; }
.sbx-tile:hover { transform: translateY(-3px); border-color: var(--sbx-brand-line); box-shadow: var(--sbx-shadow); }
.sbx-tile .ic { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border-radius: 12px; background: var(--sbx-brand-soft); color: var(--sbx-brand-ink); }
.sbx-tile h3 { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 700; color: var(--sbx-ink); letter-spacing: -.01em; }
.sbx-tile p { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--sbx-muted); }
.sbx-tile--feature { display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; color: #e8fbfd; border-color: transparent; background: radial-gradient(120% 90% at 100% 0%, rgba(38,211,228,.45), transparent 60%), linear-gradient(160deg, #0b2a35, #07141f); }
.sbx-tile--feature .ic { background: rgba(255,255,255,.12); color: #7fe9f2; }
.sbx-tile--feature h3 { color: #fff; font-size: 1.5rem; letter-spacing: -.02em; }
.sbx-tile--feature p { color: #b9dfe6; }
.sbx-tile--feature .big { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #fff; margin-bottom: auto; }
.sbx-tile--wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--sbx-brand-soft); border-color: var(--sbx-brand-line); }
.sbx-tile--wide:hover { transform: none; }

/* ---------- advice ---------- */
.sbx-advice { display: grid; gap: 14px; margin-bottom: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .sbx-advice { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sbx-advice > div { display: flex; gap: 14px; align-items: flex-start; }
.sbx-advice .ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--sbx-brand-soft); color: var(--sbx-brand-ink); }
.sbx-advice h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--sbx-ink); }
.sbx-advice p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--sbx-muted); }

/* ---------- AWS detail page ---------- */
.sbx-crumb { margin-bottom: 14px; }
.sbx-detail { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; padding: 36px 0 72px; }
@media (min-width: 992px) { .sbx-detail { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; } }
.sbx-detail h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.025em; font-weight: 800; color: var(--sbx-ink); }
.sbx-detail section + section { margin-top: 48px; }
.sbx-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sbx-meta span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--sbx-line); border-radius: 999px; background: var(--sbx-card); font-size: .875rem; color: var(--sbx-body); }
.sbx-meta b { color: var(--sbx-ink); }
.sbx-meta .ico { color: #f59e0b; width: 15px; height: 15px; }
.sbx-hero__img { aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; border: 1px solid var(--sbx-line); box-shadow: var(--sbx-shadow); background: var(--sbx-surface); }
.sbx-hero__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbx-prose p { margin: 0 0 14px; line-height: 1.75; color: var(--sbx-body); max-width: 70ch; }

.sbx-feat { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .sbx-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sbx-feat > div { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card); transition: border-color .3s, transform .3s; }
.sbx-feat > div:hover { border-color: var(--sbx-brand-line); transform: translateY(-2px); }
.sbx-feat .ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--sbx-brand-soft); color: var(--sbx-brand-ink); }
.sbx-feat h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--sbx-ink); }
.sbx-feat p { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--sbx-muted); }

.sbx-buy { position: sticky; top: 88px; padding: 22px; border: 1px solid var(--sbx-line); border-radius: 18px; background: var(--sbx-card); box-shadow: var(--sbx-shadow); }
.sbx-buy h3 { margin: 0 0 16px; font-size: 1.0625rem; font-weight: 800; color: var(--sbx-ink); }
.sbx-buy ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.sbx-buy li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.sbx-buy li .ico { color: var(--sbx-ok); width: 16px; height: 16px; }
.sbx-buy li span:last-child { margin-left: auto; font-weight: 700; color: var(--sbx-ok); }
.sbx-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; padding-top: 16px; border-top: 1px dashed var(--sbx-line); }
.sbx-price b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--sbx-ink); line-height: 1; }
.sbx-price del { color: var(--sbx-muted); }
.sbx-price em { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-style: normal; font-size: .75rem; font-weight: 700; color: var(--sbx-ok); background: var(--sbx-ok-soft); }

@keyframes sbx-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sbx-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.sbx-hero__copy > * { animation: sbx-rise .6s cubic-bezier(.2,.7,.2,1) both; }
.sbx-hero__copy > :nth-child(2) { animation-delay: .06s; }
.sbx-hero__copy > :nth-child(3) { animation-delay: .12s; }
.sbx-hero__copy > :nth-child(4) { animation-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
    .sbx *, .sbx *::before, .sbx *::after, .sbx-x *, .sbx-x *::before, .sbx-x *::after { animation: none !important; transition: none !important; }
    .js-rv .sbx-rv { opacity: 1; transform: none; }
    .sbx-flow li::after { width: 100%; }
}

.sbx [hidden], .sbx-x [hidden] { display: none !important; }
