/* ================================================================
   Troubleshooting Practice on /learn - scenario cards, real console
   output and the free-scenario CTA. Built on learn-styles.css tokens;
   every colour here is one of them or a tint of the brand teal.
   ================================================================ */

/* ---- Hero figure: a scenario's network, framed like the app's card ---- */
.lab-figure {
    margin: 28px 0 8px;
    border: 1px solid var(--learn-border);
    border-radius: var(--learn-radius-lg);
    overflow: hidden;
    background: #EAF3FA;
    box-shadow: 0 18px 40px -26px rgba(15, 58, 74, .45);
}
.lab-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.lab-figure figcaption {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
    padding: 12px 18px;
    background: #fff; border-top: 1px solid var(--learn-border);
    color: var(--learn-text-muted); font-size: .86rem;
}
.lab-figure figcaption strong { color: var(--learn-text); }

/* ---- Answer block: the two-sentence answer an AI engine can lift ---- */
.answer-block {
    margin: 22px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--learn-primary);
    border-radius: 0 var(--learn-radius) var(--learn-radius) 0;
    background: var(--learn-primary-bg);
    font-size: 1.02rem; line-height: 1.65;
}
.answer-block p { margin: 0; }
.answer-block p + p { margin-top: 8px; }

/* ---- Scenario grid ---- */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin: 22px 0 8px;
}
.lab-card {
    display: flex; flex-direction: column;
    overflow: hidden;
    color: inherit; text-decoration: none;
    background: #fff;
    border: 1px solid var(--learn-border);
    border-radius: var(--learn-radius);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
a.lab-card:hover { border-color: rgba(42, 158, 166, .55); box-shadow: var(--learn-shadow); transform: translateY(-2px); }
.lab-card__cover { position: relative; aspect-ratio: 3 / 2; background: #EAF3FA; }
.lab-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-card__topic {
    position: absolute; left: 10px; top: 10px;
    padding: 3px 9px;
    color: #0f3d44; background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(15, 61, 68, .12); border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.lab-card__free {
    position: absolute; right: 10px; bottom: 10px;
    padding: 3px 9px;
    color: #fff; background: var(--learn-primary-dark);
    border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em;
}
.lab-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.lab-card__body h3 { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--learn-text); }
.lab-card__body p { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--learn-text-muted); }
.lab-card__meta {
    display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 8px;
    color: var(--learn-text-muted); font-size: .78rem;
}
.lab-card__meta strong { color: var(--learn-text); font-variant-numeric: tabular-nums; }

/* Difficulty: five ticks, the filled ones in teal. */
.lab-level { display: inline-flex; align-items: center; gap: 6px; }
.lab-level i { display: inline-block; width: 4px; border-radius: 2px; background: #CBD5E1; }
.lab-level i:nth-child(1) { height: 6px; } .lab-level i:nth-child(2) { height: 8px; } .lab-level i:nth-child(3) { height: 10px; }
.lab-level i:nth-child(4) { height: 12px; } .lab-level i:nth-child(5) { height: 14px; }
.lab-level i.on { background: var(--learn-primary); }
.lab-level span { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }

/* ---- Real console output ---- */
.cli {
    margin: 16px 0 6px;
    border: 1px solid #1e2a33;
    border-radius: var(--learn-radius);
    overflow: hidden;
    background: #0f1a21;
}
.cli__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 14px;
    color: #9fb4bf; background: #13232c;
    border-bottom: 1px solid #1e2f39;
    font: 600 .72rem/1.2 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .02em;
}
.cli__tag { padding: 2px 8px; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cli__tag--bad { color: #ffd2c9; background: rgba(239, 68, 68, .22); }
.cli__tag--ok { color: #c6f6df; background: rgba(16, 185, 129, .22); }
.cli pre {
    margin: 0; padding: 14px 16px;
    border: 0; border-radius: 0; box-shadow: none;
    overflow-x: auto;
    color: #cfe0e7;
    background: transparent;
    font: 400 12.5px/1.6 "JetBrains Mono", ui-monospace, monospace;
    white-space: pre;
}
.cli .p { color: #7fd6de; }
/* box-shadow, not padding: padding would push the monospace columns out of line. */
.cli mark { color: #10262d; background: #ffd479; border-radius: 2px; padding: 0; box-shadow: 0 0 0 2px #ffd479; }
.cli mark.ok { background: #8ee6c1; box-shadow: 0 0 0 2px #8ee6c1; }
.cli-note { margin: 4px 0 18px; color: var(--learn-text-muted); font-size: .86rem; }

/* ---- Symptom -> command quick reference ---- */
.cmd-table code { white-space: nowrap; }
.cmd-table td:first-child { font-weight: 600; }

/* ---- Blueprint map ---- */
.map-table td:first-child { font-weight: 600; width: 32%; }
.map-table .verb { margin-right: 6px; }
.verb {
    display: inline-block; padding: 1px 7px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .03em;
    color: #0f3d44; background: var(--learn-primary-bg); border: 1px solid rgba(42, 158, 166, .3);
}
.verb--fix { color: #7c2d12; background: #FFF4E5; border-color: rgba(245, 158, 11, .4); }

/* ---- Free scenario CTA: the network on the left, the offer on the right ---- */
.lab-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    margin: 30px 0;
    overflow: hidden;
    border: 1px solid rgba(42, 158, 166, .35);
    border-radius: var(--learn-radius-lg);
    background: #fff;
    box-shadow: 0 20px 44px -30px rgba(15, 58, 74, .55);
}
/* contain, not cover: a cropped topology loses the devices that make it readable. */
.lab-cta__img { display: flex; align-items: center; background: #E6F0F8; }
.lab-cta__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.lab-cta__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; }
.lab-cta__eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--learn-primary-dark);
    font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.lab-cta__eyebrow svg { width: 16px; height: 16px; }
.lab-cta h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; color: var(--learn-text); }
.lab-cta p { margin: 0; color: var(--learn-text-muted); font-size: .94rem; line-height: 1.55; }
.lab-cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 4px; }
.lab-cta__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    color: #fff; background: #1d6f78;
    border-radius: 10px;
    font-weight: 700; font-size: .95rem; text-decoration: none;
    box-shadow: 0 12px 24px -14px rgba(29, 111, 120, .9);
    transition: background .16s ease, transform .16s ease;
}
.lab-cta__btn:hover { color: #fff; background: #185e66; transform: translateY(-1px); }
.lab-cta__btn svg { width: 18px; height: 18px; }
.lab-cta__fine { color: var(--learn-text-light); font-size: .8rem; }
.lab-cta__fine a { color: var(--learn-primary-dark); }

/* ---- Simulator comparison ---- */
.sim-compare th, .sim-compare td { vertical-align: top; }
.sim-compare td:first-child { font-weight: 700; width: 20%; }
.sim-compare .us { background: var(--learn-primary-bg); }
.sim-slot {
    display: inline-block; margin: 2px 0;
    padding: 3px 9px; border-radius: 8px; line-height: 1.35;
    font-size: .72rem; font-weight: 700;
    color: #0f3d44; background: #F1F5F9; border: 1px solid var(--learn-border);
}
.pick-list, .learn-content .pick-list { list-style: none; padding: 0; margin: 18px 0; counter-reset: pick; }
.pick-list > li {
    position: relative;
    margin: 0 0 14px; padding: 16px 18px 16px 58px;
    border: 1px solid var(--learn-border); border-radius: var(--learn-radius);
    background: #fff;
}
.pick-list > li::before {
    counter-increment: pick; content: counter(pick);
    position: absolute; left: 16px; top: 16px;
    width: 28px; height: 28px; display: grid; place-items: center;
    color: #fff; background: var(--learn-text); border-radius: 50%;
    font-weight: 800; font-size: .85rem;
}
.pick-list > li.us { border-color: rgba(42, 158, 166, .5); background: var(--learn-primary-bg); }
.pick-list h3 { margin: 0 0 4px; font-size: 1.05rem; }
.pick-list p { margin: 6px 0 0; }
.pick-list .concede { color: var(--learn-text-muted); font-size: .9rem; }

/* ---- Duotone icon slot for info boxes (replaces emoji on these pages) ---- */
.info-box-icon svg { width: 22px; height: 22px; display: block; }

@media (max-width: 720px) {
    .lab-cta { grid-template-columns: 1fr; }
    .lab-cta__img img { aspect-ratio: 3 / 2; height: auto; }
    .lab-grid { grid-template-columns: 1fr; }
    .cli pre { font-size: 11.5px; }
}

/* ---- Commercial-interest disclosure (the ranked pages concede out loud) ---- */
.disclosure-box {
    margin: 18px 0 26px; padding: 14px 18px;
    color: #7c3f0e; background: #FFFBEB;
    border: 1px solid #FDE68A; border-left: 4px solid #F59E0B;
    border-radius: var(--learn-radius);
    font-size: .9rem; line-height: 1.6;
}
.disclosure-box strong { color: #6b2f07; }

/* ---- Scenario callout: one scenario, inside a topic guide, next to the concept it drills ---- */
.lab-callout {
    display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center;
    margin: 26px 0; padding: 12px 18px 12px 12px;
    color: inherit; text-decoration: none;
    border: 1px solid rgba(42, 158, 166, .35); border-radius: var(--learn-radius);
    background: linear-gradient(90deg, var(--learn-primary-bg) 0%, #fff 62%);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.lab-callout:hover { border-color: rgba(42, 158, 166, .7); box-shadow: var(--learn-shadow); }
.lab-callout img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: #EAF3FA; }
.lab-callout__eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--learn-primary-dark);
    font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.lab-callout__eyebrow svg { width: 14px; height: 14px; }
.learn-content .lab-callout h3, .lab-callout h3 { margin: 3px 0 4px; font-size: 1.02rem; line-height: 1.3; color: var(--learn-text); }
.lab-callout p { margin: 0; color: var(--learn-text-muted); font-size: .88rem; line-height: 1.55; }
.lab-callout__go { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--learn-primary-dark); font-size: .86rem; font-weight: 700; }
.lab-callout__go svg { width: 15px; height: 15px; }
@media (max-width: 520px) {
    .lab-callout { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
    /* Stacked, a 3:2 cover eats the screen; a 2:1 box with the whole topology contained keeps it readable and short. */
    .lab-callout img { aspect-ratio: 2 / 1; object-fit: contain; }
}
