:root {
  --atlas-paper: #ffffff;
  --atlas-soft: #edf3f8;
  --atlas-ink: #142238;
  --atlas-muted: #44546a;
  --atlas-blue: #2f6fa6;
  --atlas-deep: #214e78;
  --atlas-red: #a65a5f;
  --atlas-line: #d7e0e9;
  --atlas-shadow: 0 18px 42px rgba(33, 78, 120, .09);
}

.science-atlas-page { background: var(--atlas-paper); color: var(--atlas-ink); }
.atlas-hero { border-bottom: 1px solid var(--atlas-line); }
.atlas-hero__grid { align-items: end; gap: clamp(1.5rem, 4vw, 5rem); }
.atlas-hero h1 { max-width: 15ch; }
.atlas-hero p { max-width: 68ch; }
.atlas-hero__note { align-self: stretch; background: var(--atlas-soft); border: 1px solid var(--atlas-line); color: var(--atlas-ink); display: grid; gap: .65rem; padding: clamp(1.25rem, 3vw, 2rem); }
.atlas-hero__note strong { color: var(--atlas-deep); font-size: .92rem; letter-spacing: .045em; text-transform: uppercase; }
.atlas-hero__note p { font-family: 'Newsreader', Georgia, serif; font-size: 1.12rem; line-height: 1.45; margin: 0; }

.atlas-intro { border-bottom: 1px solid var(--atlas-line); padding: 2.7rem 0; }
.atlas-intro__grid { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1.15fr) minmax(19rem, .85fr); }
.atlas-intro h2 { color: var(--atlas-ink); font-family: 'EB Garamond', Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: .98; margin: .25rem 0 .85rem; max-width: 19ch; }
.atlas-intro p { color: var(--atlas-muted); line-height: 1.6; margin: 0; max-width: 68ch; }
.atlas-principles { border-left: 3px solid var(--atlas-red); display: grid; gap: .7rem; margin: 0; padding: .35rem 0 .35rem 1.2rem; }
.atlas-principles li { color: var(--atlas-muted); line-height: 1.42; }

.atlas-workspace { padding: clamp(2.4rem, 5vw, 5.3rem) 0; }
.atlas-picker { align-items: end; border-bottom: 1px solid var(--atlas-line); display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 1.5rem; padding-bottom: 1.35rem; }
.atlas-picker__label { color: var(--atlas-deep); display: grid; font-size: .9rem; font-weight: 750; gap: .45rem; letter-spacing: .04em; text-transform: uppercase; }
.atlas-picker select, .atlas-scenario select { background: #fff; border: 1px solid #afc1d0; border-radius: 8px; color: var(--atlas-ink); font: inherit; font-size: 1rem; min-height: 2.9rem; padding: .55rem .8rem; width: min(100%, 48rem); }
.atlas-picker select:focus-visible, .atlas-scenario select:focus-visible, .atlas-note:focus-visible, .atlas-actions button:focus-visible, .atlas-source-card a:focus-visible { outline: 3px solid rgba(47, 111, 166, .42); outline-offset: 3px; }
.atlas-picker__note { align-self: center; color: var(--atlas-muted); font-size: .9rem; line-height: 1.4; margin: 0; max-width: 25rem; }
.atlas-query-notice { background: #fff6f6; border-left: 3px solid var(--atlas-red); color: var(--atlas-ink); margin: -.45rem 0 1rem; padding: .75rem .9rem; }

.atlas-layout { align-items: start; display: grid; gap: clamp(1.2rem, 3vw, 2.2rem); grid-template-columns: minmax(0, 1.45fr) minmax(17.5rem, .55fr); }
.atlas-card, .atlas-panel { background: #fff; border: 1px solid var(--atlas-line); box-shadow: var(--atlas-shadow); }
.atlas-card { overflow: hidden; }
.atlas-card__head { background: linear-gradient(120deg, #f7fbfe 0%, #ffffff 70%); border-bottom: 1px solid var(--atlas-line); padding: clamp(1.35rem, 3vw, 2.35rem); position: relative; }
.atlas-card__head::after { background: linear-gradient(90deg, var(--atlas-deep) 0 67%, transparent 67% 77%, var(--atlas-red) 77% 100%); content: ''; display: block; height: 4px; margin-top: 1.4rem; max-width: 12rem; }
.atlas-card__stage, .atlas-kicker { color: var(--atlas-deep); display: block; font-size: .76rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.atlas-card__head h2 { color: var(--atlas-ink); font-family: 'EB Garamond', Georgia, serif; font-size: clamp(2.1rem, 4.3vw, 4.3rem); letter-spacing: -.025em; line-height: .9; margin: .55rem 0 1rem; max-width: 17ch; }
.atlas-card__kind { color: var(--atlas-red); font-family: 'Newsreader', Georgia, serif; font-size: 1.24rem; font-weight: 650; margin: 0; }
.atlas-card__body { display: grid; gap: 1.45rem; padding: clamp(1.25rem, 3vw, 2.3rem); }
.atlas-status-strip { border-left: 3px solid var(--atlas-blue); display: grid; gap: .45rem; padding: .15rem 0 .15rem 1rem; }
.atlas-status-strip strong { color: var(--atlas-ink); line-height: 1.38; }
.atlas-status-strip p { color: var(--atlas-muted); line-height: 1.48; margin: 0; }
.atlas-operation { background: #f7fafc; border: 1px solid var(--atlas-line); color: var(--atlas-ink); font-family: 'Newsreader', Georgia, serif; font-size: 1.18rem; line-height: 1.42; margin: 0; padding: 1rem 1.1rem; }

.atlas-scenario { border-bottom: 1px solid var(--atlas-line); border-top: 1px solid var(--atlas-line); display: grid; gap: .7rem; padding: 1.2rem 0; }
.atlas-scenario label { color: var(--atlas-deep); font-size: .9rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.atlas-scenario__hint { color: var(--atlas-muted); font-size: .95rem; line-height: 1.42; margin: 0; }
.atlas-scenario__summary { color: var(--atlas-ink); font-family: 'Newsreader', Georgia, serif; font-size: 1.16rem; line-height: 1.45; margin: .25rem 0 0; }
.atlas-table-wrap { overflow-x: auto; }
.atlas-data-table { border-collapse: collapse; min-width: 100%; width: 100%; }
.atlas-data-table caption { caption-side: top; color: var(--atlas-deep); font-size: .9rem; font-weight: 750; letter-spacing: .04em; padding: 0 0 .65rem; text-align: left; text-transform: uppercase; }
.atlas-data-table th, .atlas-data-table td { border-bottom: 1px solid var(--atlas-line); padding: .76rem .85rem; text-align: left; vertical-align: top; }
.atlas-data-table th { background: #f6f9fb; color: var(--atlas-ink); font-weight: 750; min-width: 12.5rem; }
.atlas-data-table td { color: var(--atlas-muted); line-height: 1.42; }
.atlas-inference { background: #eef5f8; border-left: 3px solid var(--atlas-deep); color: var(--atlas-ink); line-height: 1.52; margin: 0; padding: 1rem 1.1rem; }
.atlas-inference::before { color: var(--atlas-red); content: 'Lectura cauta · '; font-size: .78rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }

.atlas-practice { display: grid; gap: .7rem; }
.atlas-practice h3, .atlas-sources-section h3, .atlas-details h3 { color: var(--atlas-ink); font-family: 'EB Garamond', Georgia, serif; font-size: 1.7rem; line-height: 1; margin: 0; }
.atlas-practice__prompt { color: var(--atlas-ink); font-family: 'Newsreader', Georgia, serif; font-size: 1.15rem; line-height: 1.48; margin: 0; }
.atlas-note { border: 1px solid #afc1d0; border-radius: 8px; color: var(--atlas-ink); font: inherit; line-height: 1.48; min-height: 9.3rem; padding: .85rem; resize: vertical; width: 100%; }
.atlas-note-help { color: var(--atlas-muted); font-size: .88rem; line-height: 1.4; margin: -.15rem 0 0; }
.atlas-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; }
.atlas-actions button { background: #fff; border: 1px solid var(--atlas-blue); border-radius: 7px; color: var(--atlas-deep); cursor: pointer; font: inherit; font-weight: 750; padding: .66rem .9rem; }
.atlas-actions button:hover { background: #edf3f8; }
.atlas-actions .atlas-actions__primary { background: var(--atlas-deep); border-color: var(--atlas-deep); color: #fff; }
.atlas-actions .atlas-actions__primary:hover { background: #173d61; }
.atlas-actions__quiet { border-color: transparent !important; color: var(--atlas-muted) !important; }
.atlas-live-status { color: var(--atlas-deep); flex: 1 1 100%; font-size: .9rem; min-height: 1.2rem; }

.atlas-side { display: grid; gap: 1.15rem; }
.atlas-panel { padding: 1.2rem; }
.atlas-panel h3 { color: var(--atlas-ink); font-family: 'EB Garamond', Georgia, serif; font-size: 1.5rem; line-height: 1; margin: 0 0 .8rem; }
.atlas-panel > p { color: var(--atlas-muted); line-height: 1.46; margin: 0; }
.atlas-source-list { display: grid; gap: .8rem; list-style: none; margin: 0; padding: 0; }
.atlas-source-card { border-top: 1px solid var(--atlas-line); display: grid; gap: .35rem; padding-top: .85rem; }
.atlas-source-card strong { color: var(--atlas-ink); font-size: .95rem; line-height: 1.36; }
.atlas-source-card a { color: var(--atlas-deep); font-size: .92rem; font-weight: 750; text-underline-offset: .18em; }
.atlas-source-card p { color: var(--atlas-muted); font-size: .86rem; line-height: 1.43; margin: 0; }
.atlas-source-card__use { color: var(--atlas-ink) !important; }
.atlas-details { display: grid; gap: 1rem; }
.atlas-details__block { border-top: 1px solid var(--atlas-line); padding-top: .95rem; }
.atlas-details__block:first-child { border-top: 0; padding-top: 0; }
.atlas-details__block p, .atlas-details__block li { color: var(--atlas-muted); font-size: .95rem; line-height: 1.47; }
.atlas-details__block p { margin: 0; }
.atlas-details__block ul { display: grid; gap: .5rem; margin: .6rem 0 0; padding-left: 1.25rem; }
.atlas-details__safety { border-left: 3px solid var(--atlas-red); padding-left: .85rem; }

.atlas-bridge { background: #f5f9fc; border-top: 1px solid var(--atlas-line); padding: clamp(2.4rem, 5vw, 4rem) 0; }
.atlas-bridge__inner { align-items: end; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: space-between; }
.atlas-bridge h2 { font-family: 'EB Garamond', Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: .96; margin: .35rem 0 .65rem; max-width: 19ch; }
.atlas-bridge p { color: var(--atlas-muted); line-height: 1.5; margin: 0; max-width: 56ch; }
.atlas-bridge__links { display: flex; flex-wrap: wrap; gap: .65rem; }

/* This is exported from atlas-focales.js for lesson-level use. The card remains
 * readable without this stylesheet, but shares the CIENCIAS NATURALES paper/blue/red
 * system when the stylesheet is also loaded by the host page. */
.natural-atlas-inline { background: #fff; border: 1px solid var(--atlas-line, #d7e0e9); border-left: 4px solid var(--atlas-red, #a65a5f); box-shadow: 0 10px 26px rgba(33, 78, 120, .07); color: var(--atlas-ink, #142238); display: grid; gap: .75rem; margin: 1.35rem 0; max-width: 60rem; padding: 1.1rem 1.2rem; }
.natural-atlas-inline__eyebrow { color: var(--atlas-deep, #214e78); font-size: .76rem; font-weight: 800; letter-spacing: .075em; margin: 0; text-transform: uppercase; }
.natural-atlas-inline h3 { font-family: 'EB Garamond', Georgia, serif; font-size: 1.65rem; line-height: 1; margin: 0; }
.natural-atlas-inline p { line-height: 1.45; margin: 0; }
.natural-atlas-inline table { border-collapse: collapse; max-width: 42rem; width: 100%; }
.natural-atlas-inline caption { color: var(--atlas-deep, #214e78); font-size: .85rem; font-weight: 750; padding-bottom: .4rem; text-align: left; }
.natural-atlas-inline th, .natural-atlas-inline td { border-bottom: 1px solid var(--atlas-line, #d7e0e9); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.natural-atlas-inline th { background: #f6f9fb; font-weight: 750; }
.natural-atlas-inline__limit, .natural-atlas-inline__source { color: var(--atlas-muted, #44546a); font-size: .92rem; }
.natural-atlas-inline a { color: var(--atlas-deep, #214e78); font-weight: 750; text-underline-offset: .18em; }

.atlas-print-sheet { display: none; }

@media (max-width: 850px) {
  .atlas-intro__grid, .atlas-layout { grid-template-columns: 1fr; }
  .atlas-picker { grid-template-columns: 1fr; }
  .atlas-card__head h2 { max-width: none; }
}

@media (max-width: 560px) {
  .atlas-workspace { padding-inline: .05rem; }
  .atlas-card__body, .atlas-card__head { padding: 1.1rem; }
  .atlas-actions { align-items: stretch; display: grid; grid-template-columns: 1fr; }
  .atlas-actions button { width: 100%; }
  .atlas-data-table th { min-width: 10rem; }
}

@media print {
  body.science-atlas-page > * { display: none !important; }
  body.science-atlas-page > .atlas-print-sheet { background: #fff; color: #142238; display: block !important; font-family: Georgia, serif; margin: 0; padding: 0; }
  .atlas-print-sheet h1 { font-size: 27pt; line-height: 1; margin: 0 0 4mm; }
  .atlas-print-sheet h2 { color: #214e78; font-size: 14pt; margin: 7mm 0 3mm; }
  .atlas-print-sheet p { font-size: 10.8pt; line-height: 1.42; margin: 0 0 3mm; }
  .atlas-print__meta { border-block: 1px solid #afc1d0; color: #44546a; font-family: Arial, sans-serif; font-size: 8.5pt !important; margin: 5mm 0 7mm !important; padding: 2.5mm 0; }
  .atlas-print-sheet table { border-collapse: collapse; font-size: 10.5pt; margin: 4mm 0; width: 100%; }
  .atlas-print-sheet th, .atlas-print-sheet td { border: 1px solid #c4d1db; padding: 2.5mm; text-align: left; vertical-align: top; }
  .atlas-print-sheet th { background: #f1f6f9; }
  .atlas-print__note { background: #f4f7fb; border-left: 3px solid #a65a5f; margin-top: 5mm !important; padding: 3mm; white-space: pre-wrap; }
  .atlas-print__limit { color: #44546a; font-size: 9.5pt !important; }
}
