/* Working examples: extends /advisory/advanced-analytics/styles.css */
.example-hero { padding-block: 1.25rem 2.5rem; }
.example-hero-shell { display: grid; gap: 1.75rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 2rem; color: #fff; }
.example-hero h1 { max-width: 760px; margin: 0; color: #fff; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1; }
.example-hero blockquote { max-width: 680px; margin: 1.25rem 0 0; color: #dbe8ff; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.2rem, 2.5vw, 1.5rem); line-height: 1.4; }
.example-hero .hero-intro { margin-top: 1rem; }
.method-panel { align-self: end; padding: 1.35rem; border: 1px solid rgba(143,182,255,.35); border-radius: 1.25rem; background: rgba(7,17,36,.42); }
.method-panel .panel-label { margin: 0; color: var(--aa-blue); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.method-panel h2 { margin: .6rem 0 .75rem; color: #fff; font-size: 1.45rem; line-height: 1.2; }
.method-panel p { margin: 0; color: #c8d8f3; font-size: .86rem; line-height: 1.6; }
.method-panel p + p { margin-top: .6rem; }
.synthetic-note { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid rgba(143,182,255,.25); color: #aec3e6 !important; font-size: .78rem !important; }

.example-section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.example-section .section-intro { margin-bottom: 1.5rem; }
.example-section .section-intro h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.method-steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.method-steps li { min-width: 0; position: relative; padding: 1.25rem 1.25rem 1.25rem 3.4rem; border: 1px solid var(--aa-line); border-radius: 1rem; background: rgba(255,255,255,.88); color: var(--aa-text); font-size: .9rem; line-height: 1.65; counter-increment: step; }
.method-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 1.2rem; top: 1.3rem; color: #4b75b2; font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.method-steps strong { display: block; margin-bottom: .25rem; color: var(--aa-navy); }
.formula { display: block; margin-top: .5rem; padding: .5rem .7rem; border-radius: .5rem; background: #eef4ff; color: var(--aa-navy); font-family: Consolas, 'Courier New', monospace; font-size: .8rem; overflow-x: auto; white-space: nowrap; }

.lab { display: grid; gap: 1.25rem; padding: clamp(1rem, 3vw, 1.75rem); border-radius: 1.5rem; }
.lab-controls { display: grid; gap: 1rem; align-content: start; }
.lab-controls h3, .chart-card h3 { margin: 0; color: var(--aa-navy); font-size: 1rem; }
.lab-controls > p { margin: 0; color: var(--aa-muted); font-size: .8rem; line-height: 1.5; }
.control { display: grid; gap: .35rem; }
.control label, .control legend { display: flex; justify-content: space-between; gap: .75rem; color: var(--aa-navy); font-size: .82rem; font-weight: 700; }
.control output { color: #2f5fa7; font-variant-numeric: tabular-nums; }
.control input[type="range"] { width: 100%; accent-color: var(--aa-navy); }
.control small { color: var(--aa-muted); font-size: .74rem; line-height: 1.45; }
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; border: 0; }
.segmented legend { width: 100%; margin-bottom: .35rem; }
.segmented label { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border: 1px solid rgba(16,38,76,.2); border-radius: .6rem; background: #fff; color: var(--aa-navy); font-size: .8rem; font-weight: 600; cursor: pointer; }
.segmented input { accent-color: var(--aa-navy); }
.lab-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.lab-button { min-height: 42px; padding: .6rem .95rem; border: 1px solid var(--aa-navy); border-radius: .7rem; background: var(--aa-navy); color: #fff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.lab-button.secondary { background: #fff; color: var(--aa-navy); }
.lab-button:hover { background: #1b3b70; color: #fff; }
.lab-button:disabled { opacity: .5; cursor: default; }
.lab-output { display: grid; gap: 1rem; min-width: 0; }
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.readout { padding: .9rem 1rem; border: 1px solid var(--aa-line); border-radius: .9rem; background: #f7faff; }
.readout small { display: block; color: var(--aa-muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.readout strong { display: block; margin-top: .3rem; color: var(--aa-navy); font-size: 1.45rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.readout span { display: block; margin-top: .2rem; color: var(--aa-text); font-size: .75rem; line-height: 1.4; }
.chart-card { min-width: 0; padding: 1rem; border: 1px solid var(--aa-line); border-radius: 1rem; background: #fff; }
.chart-card > p { margin: .35rem 0 .5rem; color: var(--aa-muted); font-size: .8rem; line-height: 1.5; }
.chart-box { width: 100%; min-height: 200px; }
.chart-grid { display: grid; gap: 1rem; }
.aax-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .25rem 0 .35rem; color: var(--aa-text); font-size: .78rem; }
.aax-legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.aax-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.aax-swatch-line { height: 3px; border-radius: 2px; }
.aax-swatch-ring { border: 2.5px solid; border-radius: 50%; background: #fff; }
.insight { margin: 0; padding: 1rem 1.15rem; border-left: 3px solid #2f5fa7; border-radius: 0 .75rem .75rem 0; background: #eef4ff; color: var(--aa-navy); font-size: .9rem; line-height: 1.6; }

.aax-chart { display: block; overflow: visible; font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif; }
.aax-chart text { fill: #5a6d90; }
.aax-tick { font-size: 11px; font-variant-numeric: tabular-nums; }
.aax-axis-label { font-size: 11.5px; font-weight: 600; }
.aax-chart .aax-direct-label { fill: #10264c; font-size: 11.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.aax-chart .aax-ref-label { fill: #5a6d90; font-size: 11px; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.aax-chart .aax-cell-label { fill: #10264c; font-size: 10.5px; font-weight: 700; pointer-events: none; }
.aax-chart .aax-cell-label.is-light { fill: #ffffff; }
.aax-grid { stroke: #e3e9f2; stroke-width: 1; }
.aax-zero, .aax-baseline { stroke: #9aa8bf; stroke-width: 1; }
.aax-crosshair { stroke: #5a6d90; stroke-width: 1; stroke-dasharray: 3 3; }
.aax-diagonal { stroke: #9aa8bf; stroke-width: 1.25; stroke-dasharray: 5 4; }
.aax-overlay { cursor: crosshair; }
.aax-bar.is-hover { opacity: .75; }
circle.is-hover { stroke: #10264c; stroke-width: 2.5; }
.aax-tip { position: fixed; z-index: 1000; max-width: 280px; padding: .6rem .75rem; border: 1px solid rgba(16,38,76,.18); border-radius: .6rem; background: #fff; box-shadow: 0 12px 30px rgba(9,21,45,.18); color: #223c63; font-size: .78rem; line-height: 1.45; pointer-events: none; }
.aax-tip-head { margin-bottom: .3rem; color: #10264c; font-weight: 800; }
.aax-tip-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: .45rem; }
.aax-tip-row strong { color: #10264c; font-variant-numeric: tabular-nums; }
.aax-tip-swatch { width: 10px; height: 10px; border-radius: 2px; }

.result-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.result-table th, .result-table td { padding: .55rem .5rem; border-bottom: 1px solid var(--aa-line); text-align: left; vertical-align: top; }
.result-table th { color: var(--aa-muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.result-table td { color: var(--aa-text); font-variant-numeric: tabular-nums; }
.result-table td strong { color: var(--aa-navy); }
.table-scroll { overflow-x: auto; }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: .6rem; background: #eef1f6; color: #10264c; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge.good { background: #e3f3f0; color: #17635a; }
.badge.warn { background: #fbeee2; color: #8a4512; }

.reading-grid { display: grid; gap: 1rem; }
.reading-grid article { padding: 1.25rem; border: 1px solid var(--aa-line); border-radius: 1rem; background: rgba(255,255,255,.88); }
.reading-grid h3 { margin: 0 0 .5rem; color: var(--aa-navy); font-size: 1rem; }
.reading-grid p, .reading-grid li { margin: 0; color: var(--aa-text); font-size: .88rem; line-height: 1.65; }
.reading-grid ul { margin: 0; padding-left: 1.1rem; }
.reading-grid li + li { margin-top: .35rem; }

.example-nav { display: grid; gap: .75rem; padding-block: 1rem 3.5rem; }
.example-nav a { display: block; padding: 1rem 1.15rem; border: 1px solid var(--aa-line); border-radius: 1rem; background: #fff; color: var(--aa-navy); text-decoration: none; }
.example-nav a:hover { border-color: #4f86df; }
.example-nav small { display: block; color: var(--aa-muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.example-nav strong { display: block; margin-top: .2rem; font-size: .95rem; }
.example-nav .cta { background: var(--aa-navy); color: #fff; }
.example-nav .cta small { color: #b9cdf0; }

/* Links from the problem cards on the Advanced Analytics page */
.content-card .example-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; color: #2f5fa7; font-size: .84rem; font-weight: 700; text-decoration: none; }
.content-card .example-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.content-card .example-method { display: block; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--aa-line); color: var(--aa-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.problem-grid .content-card { display: flex; flex-direction: column; }
.problem-grid .content-card .example-method { margin-top: auto; }

@media (min-width: 720px) {
  .method-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reading-grid { grid-template-columns: repeat(2, 1fr); }
  .example-nav { grid-template-columns: repeat(3, 1fr); }
  .chart-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .example-hero-shell { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); align-items: center; }
  .lab { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .example-hero-shell { border-radius: 1.25rem; }
  .lab { border-radius: 1rem; }
  .readout strong { font-size: 1.25rem; }
}
.roster-table td.off { color: #9aa8bf; }
.roster-table th .badge { margin-left: .3rem; }
.result-table tbody th { color: var(--aa-navy); font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.result-table td small { color: var(--aa-muted); }
.readout strong.compact { font-size: 1rem; }
.example-hero-shell, .method-steps, .lab, .lab-output, .lab-controls, .chart-grid, .reading-grid, .example-nav { grid-template-columns: minmax(0, 1fr); }
.example-hero-shell > *, .lab > * { min-width: 0; }
@media (min-width: 720px) { .method-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .example-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chart-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .example-hero-shell { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); } .lab { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); } }
