/* ============================================================
   WebWatch "What does it all mean?" interactive Learn page
   Lives inside base.html (.layout > .content), so this file only
   adds component styles + the few extra design tokens global.css
   doesn't already provide. No global resets here on purpose.
   ============================================================ */
:root {
    /* additive tokens only. global.css owns --bg/--surface/--border/etc. */
    --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.14);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --green: #22c55e; --green-ink: #166534; --green-deep: #16a34a;
    --amber: #f59e0b; --amber-ink: #92400e; --amber-deep: #d97706;
    --red: #ef4444;  --red-ink: #991b1b;  --red-deep: #dc2626;
}

.learn { width: min(var(--content-max, 1080px), 100%); margin: 0 auto; }
.learn .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88em; background: rgba(79, 70, 229, 0.08); padding: 1px 6px; border-radius: 6px;
}

/* ── reveal on scroll ── transform-only so a frozen/throttled transition
   clock can never leave content invisible (opacity stays 1 throughout) ── */
.learn .reveal { transform: translateY(16px); transition: transform 0.6s var(--ease); will-change: transform; }
.learn .reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) { .learn .reveal { transform: none; transition: none; } }

/* ── hero ── */
.learn-hero { text-align: center; padding: clamp(24px, 5vw, 56px) 0 28px; position: relative; }
.learn-hero .hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79, 70, 229, 0.2); color: var(--brand-2);
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.learn-hero h1 { margin: 18px 0 0; font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.06; }
.learn-hero h1 .grad {
    background: linear-gradient(120deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.learn-hero p { margin: 16px auto 0; max-width: 620px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.6; }

/* ── sticky scroll-spy nav (tucks just under the floating glass navbar) ── */
.spy {
    position: sticky; top: 92px; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; padding: 12px 0; margin-bottom: 8px;
}
.spy a {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.86rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
    transition: color 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.spy a .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.spy a:hover { color: var(--text); transform: translateY(-1px); border-color: var(--brand); }
.spy a.active { color: #fff; background: linear-gradient(135deg, #4f46e5, #4338ca); border-color: transparent; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28); }
.spy a.active .dot { opacity: 1; background: #fff; }

/* ── section shell ── */
.sec { padding: clamp(36px, 6vw, 64px) 0; scroll-margin-top: 150px; }
.sec-head { max-width: 720px; margin-bottom: 28px; }
.sec-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); }
.sec-eyebrow .ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79, 70, 229, 0.18); color: var(--brand); }
.sec-eyebrow .ico svg { width: 17px; height: 17px; }
.sec h2 { margin: 14px 0 10px; font-size: clamp(1.5rem, 3.4vw, 2.05rem); letter-spacing: -0.02em; line-height: 1.15; }
.sec-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.sec-lead b { color: var(--text); }

/* ── generic metric card ── */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.mcard {
    position: relative; padding: 20px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.35s var(--ease);
}
.mcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(79, 70, 229, 0.4); }
.mcard-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mcard-ico { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(79, 70, 229, 0.1); color: var(--brand); }
.mcard-ico svg { width: 22px; height: 22px; }
.mcard h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.mcard p { color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.mcard p + p { margin-top: 8px; }
.mcard .irl {
    margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.18); display: flex; gap: 10px; align-items: flex-start;
}
.mcard .irl svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.mcard .irl span { font-size: 0.88rem; line-height: 1.5; color: var(--text); }
.mcard .irl b { color: #0e7490; font-weight: 700; }

/* ── callout ── */
.callout {
    margin-top: 22px; padding: 18px 20px; border-radius: 14px; display: flex; gap: 14px; align-items: flex-start;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.07), rgba(6, 182, 212, 0.07));
    border: 1px solid rgba(79, 70, 229, 0.18);
}
.callout .c-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.callout .c-ico svg { width: 20px; height: 20px; }
.callout strong { display: block; margin-bottom: 4px; color: var(--brand-2); font-size: 1rem; }
.callout p { color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.callout p b { color: var(--text); }

/* ── footer CTA ── */
.cta-final {
    margin: 44px 0 8px; padding: 40px clamp(22px, 5vw, 48px); border-radius: 24px; text-align: center;
    background: linear-gradient(140deg, #4f46e5, #4338ca); color: #fff; box-shadow: 0 24px 60px rgba(79, 70, 229, 0.3);
    position: relative; overflow: hidden;
}
.cta-final::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(500px 300px at 20% 0%, rgba(6, 182, 212, 0.5), transparent 60%), radial-gradient(500px 300px at 90% 100%, rgba(244, 114, 182, 0.4), transparent 60%);
    opacity: 0.5;
}
.cta-final > * { position: relative; }
.cta-final h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); letter-spacing: -0.02em; }
.cta-final p { margin: 10px auto 22px; max-width: 520px; opacity: 0.92; font-size: 1.05rem; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.learn .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; transition: transform 0.4s var(--ease), filter 0.3s ease, background 0.3s ease; }
.learn .btn svg { width: 17px; height: 17px; }
.learn .btn-white { background: #fff; color: var(--brand-2); }
.learn .btn-white:hover { transform: translateY(-2px); filter: brightness(1.03); }
.learn .btn-glass { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.learn .btn-glass:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-2px); }

/* ════════════════ INTERACTIVE WIDGETS ════════════════ */

/* ── Status board (uptime) ── */
.statusboard { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: stretch; }
.sb-tabs { display: flex; flex-direction: column; gap: 8px; }
.sb-tab {
    display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); text-align: left; font: inherit; color: var(--text);
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.sb-tab:hover { border-color: rgba(79, 70, 229, 0.4); transform: translateX(3px); }
.sb-tab.active { border-color: transparent; box-shadow: var(--shadow); }
.sb-tab .sb-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.sb-tab .sb-name { font-weight: 700; font-family: ui-monospace, monospace; font-size: 0.85rem; letter-spacing: 0.02em; }
.sb-tab.active.s-up { background: rgba(34, 197, 94, 0.1); } .s-up .sb-dot { background: var(--green); }
.sb-tab.active.s-down { background: rgba(239, 68, 68, 0.1); } .s-down .sb-dot { background: var(--red); }
.sb-tab.active.s-warn { background: rgba(245, 158, 11, 0.12); } .s-warn .sb-dot { background: var(--amber); }
.sb-stage {
    border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
    overflow: hidden; display: flex; flex-direction: column; min-height: 320px;
}
.sb-browser { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.sb-browser .tl { display: flex; gap: 6px; } .sb-browser .tl i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.sb-browser .url { flex: 1; margin-left: 8px; padding: 5px 11px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 0.76rem; color: var(--muted); font-family: ui-monospace, monospace; display: flex; align-items: center; gap: 6px; }
.sb-screen { flex: 1; display: grid; place-items: center; text-align: center; padding: 30px 24px; transition: background 0.4s ease; }
.sb-screen .big-ico { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px; transition: transform 0.4s var(--ease); }
.sb-screen .big-ico svg { width: 38px; height: 38px; color: #fff; }
.sb-screen .scode { font-family: ui-monospace, monospace; font-size: 0.82rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; display: inline-block; margin-bottom: 12px; }
.sb-screen h4 { font-size: 1.25rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.sb-screen p { color: var(--muted); font-size: 0.94rem; line-height: 1.55; max-width: 360px; margin: 0 auto; }
.sb-screen .irl-line { margin-top: 14px; font-size: 0.88rem; color: var(--text); display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.sb-screen .irl-line svg { width: 15px; height: 15px; flex-shrink: 0; }

/* uptime bar viz */
.uptime-viz { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.uptime-stat { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; }
.uptime-stat .pct { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.uptime-stat .pct.g { color: var(--green-ink); } .uptime-stat .pct.a { color: var(--amber-ink); } .uptime-stat .pct.r { color: var(--red-ink); }
.uptime-stat .lbl { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.uptime-stat .bar { height: 7px; border-radius: 4px; background: var(--surface-2); margin-top: 11px; overflow: hidden; }
.uptime-stat .bar i { display: block; height: 100%; border-radius: 4px; }

/* ── Performance relay ── */
.relay { margin-top: 4px; padding: 26px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.relay-track { display: flex; gap: 4px; height: 56px; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.relay-seg { position: relative; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.82rem; cursor: pointer; border: 0; font-family: inherit; transition: filter 0.3s ease, flex 0.5s var(--ease); overflow: hidden; }
.relay-seg span { position: relative; z-index: 1; white-space: nowrap; }
.relay-seg:hover { filter: brightness(1.08); }
.relay-seg.dim { opacity: 0.35; }
.relay-labels { display: flex; gap: 4px; font-size: 0.72rem; color: var(--muted); }
.relay-labels > div { text-align: center; }
.relay-detail { margin-top: 18px; padding: 16px 18px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); min-height: 92px; }
.relay-detail h4 { font-size: 1.05rem; margin-bottom: 6px; }
.relay-detail p { color: var(--muted); font-size: 0.93rem; line-height: 1.6; }
.relay-detail .irl { margin-top: 10px; font-size: 0.88rem; color: var(--text); }
.relay-detail .irl b { color: var(--brand-2); }
.relay-hint { margin-top: 12px; font-size: 0.82rem; color: var(--muted); text-align: center; }

/* speed gauge */
.gauge-row { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.gauge { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.gauge .g-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.gauge .g-name { font-weight: 700; font-size: 0.92rem; }
.gauge .g-val { font-size: 0.8rem; color: var(--muted); font-family: ui-monospace, monospace; }
.gauge .g-track { height: 9px; border-radius: 5px; background: linear-gradient(90deg, var(--green) 0%, var(--green) 40%, var(--amber) 40%, var(--amber) 72%, var(--red) 72%); position: relative; }
.gauge .g-pin { position: absolute; top: -4px; width: 4px; height: 17px; border-radius: 3px; background: var(--text); box-shadow: 0 0 0 3px var(--surface); transition: left 1s var(--ease); }
.gauge .g-scale { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); margin-top: 7px; }

/* ── SSL layered shield ── */
.shield-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; }
.shield { position: relative; aspect-ratio: 1 / 1.12; display: grid; place-items: center; }
.shield svg { width: 100%; height: 100%; }
.shield .core { position: absolute; text-align: center; }
.shield .core .lock { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 16px; background: linear-gradient(135deg, #4f46e5, #4338ca); display: grid; place-items: center; box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35); }
.shield .core .lock svg { width: 28px; height: 28px; color: #fff; }
.shield .core .lbl { font-weight: 800; font-size: 0.92rem; }
.shield .core .sub { font-size: 0.76rem; color: var(--muted); }
.layer-list { display: flex; flex-direction: column; gap: 10px; }
.layer { display: flex; gap: 13px; padding: 14px 16px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; width: 100%; text-align: left; font: inherit; color: var(--text); appearance: none; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease); }
.layer:hover { transform: translateX(4px); border-color: rgba(79, 70, 229, 0.4); }
.layer.on { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.05); }
.layer .l-check { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: background 0.3s ease, color 0.3s ease; }
.layer.on .l-check { background: var(--green); color: #fff; }
.layer .l-check svg { width: 15px; height: 15px; }
.layer .l-body h4 { font-size: 0.98rem; margin-bottom: 3px; }
.layer .l-body p { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.layer .l-body .irl { font-size: 0.85rem; margin-top: 6px; color: var(--text); }
.layer .l-body .irl b { color: #0e7490; }

/* ── SEO + Open Graph demo ── */
.og-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; margin-bottom: 26px; }
.og-toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.og-toggle button { padding: 8px 16px; border-radius: 9px; border: none; background: transparent; font: inherit; font-weight: 700; font-size: 0.86rem; color: var(--muted); cursor: pointer; transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.og-toggle button.on { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow); }
.og-explain h4 { font-size: 1.1rem; margin-bottom: 8px; }
.og-explain p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.og-card-stage { display: grid; place-items: center; min-height: 260px; padding: 22px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.share-card { width: 100%; max-width: 340px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.share-card .sc-img { height: 150px; background: linear-gradient(135deg, #4f46e5, #06b6d4); display: grid; place-items: center; color: #fff; }
.share-card .sc-img img { width: 46px; opacity: 0.92; }
.share-card .sc-body { padding: 13px 15px; }
.share-card .sc-domain { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.share-card .sc-title { font-weight: 700; font-size: 0.98rem; margin: 4px 0 4px; line-height: 1.3; }
.share-card .sc-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }
.share-card.bare { max-width: 340px; box-shadow: var(--shadow); }
.share-card.bare .sc-img { display: none; }
.share-card.bare .sc-title { color: #1a0dab; font-size: 0.92rem; }
.share-card.bare .sc-link { font-size: 0.78rem; color: var(--green-ink); margin-top: 2px; word-break: break-all; }

/* ── Score builder ── */
.score-builder { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.score-panel { position: sticky; top: 150px; padding: 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); text-align: center; }
.score-ring { width: 168px; height: 168px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; position: relative; transition: background 0.6s var(--ease); }
.score-ring .ring-inner { width: 134px; height: 134px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: inset 0 2px 8px rgba(16, 24, 40, 0.06); }
.score-ring .ring-num { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.score-ring .ring-of { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.score-grade { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 1rem; color: #fff; }
.score-panel .sp-label { margin-top: 12px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.score-panel .sp-reset { margin-top: 14px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font: inherit; font-weight: 600; font-size: 0.84rem; color: var(--muted); cursor: pointer; transition: border-color 0.3s ease, color 0.3s ease; }
.score-panel .sp-reset:hover { border-color: var(--brand); color: var(--brand); }
.checklist { display: grid; gap: 9px; }
.check {
    display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 12px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); transition: border-color 0.25s var(--ease), background 0.25s var(--ease); user-select: none;
    width: 100%; text-align: left; font: inherit; color: var(--text); appearance: none;
}
.check:hover { border-color: rgba(79, 70, 229, 0.4); }
.check.on { background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(6, 182, 212, 0.05)); border-color: rgba(79, 70, 229, 0.35); }
.check .box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; border: 2px solid var(--border); display: grid; place-items: center; transition: background 0.25s ease, border-color 0.25s ease; }
.check.on .box { background: linear-gradient(135deg, #4f46e5, #4338ca); border-color: transparent; }
.check .box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(0.5); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.check.on .box svg { opacity: 1; transform: scale(1); }
.check .c-name { flex: 1; font-weight: 600; font-size: 0.94rem; }
.check .c-name small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.check .c-pts { font-family: ui-monospace, monospace; font-weight: 800; font-size: 0.82rem; color: var(--brand); background: rgba(79, 70, 229, 0.1); padding: 3px 9px; border-radius: 7px; }

/* grade legend */
.grade-legend { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.grade-chip { padding: 13px 15px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 12px; }
.grade-chip .gl { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.grade-chip .gd { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.grade-chip.green { border-color: rgba(34, 197, 94, 0.32); } .grade-chip.green .gl { color: var(--green-ink); }
.grade-chip.amber { border-color: rgba(245, 158, 11, 0.32); } .grade-chip.amber .gl { color: var(--amber-ink); }
.grade-chip.red { border-color: rgba(239, 68, 68, 0.32); } .grade-chip.red .gl { color: var(--red-ink); }

/* ── Glossary ── */
.gloss-search { position: relative; max-width: 420px; margin-bottom: 18px; }
.gloss-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.gloss-search input { width: 100%; padding: 13px 14px 13px 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 0.95rem; color: var(--text); outline: none; box-shadow: var(--shadow); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.gloss-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.16); }
.gloss-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.gterm { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.3s var(--ease), border-color 0.3s ease; }
.gterm:hover { transform: translateY(-3px); border-color: rgba(79, 70, 229, 0.4); }
.gterm .abbr { font-family: ui-monospace, monospace; font-weight: 800; font-size: 0.92rem; color: var(--brand-2); }
.gterm .full { font-size: 0.82rem; color: var(--text); font-weight: 600; margin: 3px 0 6px; }
.gterm p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.gloss-empty { padding: 30px; text-align: center; color: var(--muted); grid-column: 1 / -1; }

/* focus styles for the keyboard crowd */
.learn .spy a:focus-visible,
.learn .sb-tab:focus-visible,
.learn .relay-seg:focus-visible,
.learn .layer:focus-visible,
.learn .og-toggle button:focus-visible,
.learn .check:focus-visible,
.learn .sp-reset:focus-visible,
.learn .btn:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.65); outline-offset: 3px;
}

@media (max-width: 900px) {
    .statusboard { grid-template-columns: 1fr; }
    .sb-tabs { flex-direction: row; flex-wrap: wrap; }
    .sb-tab { flex: 1 1 30%; }
    .shield-wrap { grid-template-columns: 1fr; }
    .shield { max-width: 180px; margin: 0 auto; }
    .og-demo { grid-template-columns: 1fr; }
    .score-builder { grid-template-columns: 1fr; }
    .score-panel { position: static; }
}

@media (max-width: 768px) {
    .spy { top: 8px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 10px 0; -ms-overflow-style: none; }
    .spy::-webkit-scrollbar { display: none; }
    .uptime-viz { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
    :root { --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45); --green-ink: #86efac; --amber-ink: #fcd34d; --red-ink: #fca5a5; }
    .callout .c-ico { background: #111827; }
    .mcard .irl b { color: #67e8f9; }
    .layer .l-body .irl b { color: #67e8f9; }
    .score-ring .ring-inner { background: #0f1424; }
    .share-card.bare .sc-title { color: #8ab4f8; }
}
