/* Ausgeology · Turbulent Earth: this lesson's own blocks.
   Loaded after lesson.css, which holds the shared design system. */
:root {
  --cf-ask: #fff4e0; --cf-ask-line: #d99a00;
  --role-sci: #1d5f8a; --role-em: #a5481a; --role-eng: #3e6b2a; --role-com: #6c4fa8;
  --sz-sky: #e6eff4; --sz-sea: #5aa3c4; --sz-ocean: #6d6a63; --sz-cont: #b59a72; --sz-line: #3b3127; --sz-magma: #d4541c; --sz-star: #e0b52a; --sz-volc: #8a5a3c; --sz-mantle: #e3c3a0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cf-ask: #3a2c10; --cf-ask-line: #ffcc4d;
    --role-sci: #6aaedc; --role-em: #ec8a52; --role-eng: #8cc56f; --role-com: #b49ae8;
    --sz-sky: #1b2a33; --sz-sea: #2c6d89; --sz-ocean: #4d4b46; --sz-cont: #7a6647; --sz-line: #e7d7c0; --sz-magma: #ec7a3c; --sz-star: #ffcc4d; --sz-volc: #8f6448; --sz-mantle: #5a4636;
  }
}
:root[data-theme="dark"] {
  --cf-ask: #3a2c10; --cf-ask-line: #ffcc4d;
  --role-sci: #6aaedc; --role-em: #ec8a52; --role-eng: #8cc56f; --role-com: #b49ae8;
  --sz-sky: #1b2a33; --sz-sea: #2c6d89; --sz-ocean: #4d4b46; --sz-cont: #7a6647; --sz-line: #e7d7c0; --sz-magma: #ec7a3c; --sz-star: #ffcc4d; --sz-volc: #8f6448; --sz-mantle: #5a4636;
}

/* ---------- roles ---------- */
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 960px) { .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .role-grid { grid-template-columns: minmax(0, 1fr); } }
.role-card { display: grid; gap: 6px; align-content: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.role-card b { font-size: 1.05rem; }
.role-card span { font-size: 0.93rem; line-height: 1.4; }
.role-card i { font-style: normal; font-weight: 700; }
.role-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.role-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.role-tag { display: inline-block; justify-self: start; font: 700 0.72rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #fff; }
.role-card .role-tag { font-size: 0.72rem; }
.role-sci { background: #1d5f8a; } .role-em { background: #a5481a; } .role-eng { background: #3e6b2a; } .role-com { background: #6c4fa8; }
.role-line { font-size: 0.95rem; margin: 0 0 12px; }
.brief { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; border-left: 4px solid var(--line); background: var(--bg); }
.brief p { font-size: 0.95rem; }
.brief-sci { border-color: var(--role-sci); } .brief-em { border-color: var(--role-em); } .brief-eng { border-color: var(--role-eng); } .brief-com { border-color: var(--role-com); }
.te-all { margin-left: auto; align-self: center; }

/* ---------- crisis file (the case-file layout from Life through deep time) ---------- */
.cf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.cf-list::before { content: ""; position: absolute; left: 47px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.cf-list > li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; position: relative; }
.cf-y { font: 700 0.8rem var(--font-mono); text-align: center; padding: 6px 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); position: relative; z-index: 1; line-height: 1.25; }
.cf-ask .cf-y { border-color: var(--cf-ask-line); background: var(--cf-ask); }
.cf-card { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; min-width: 0; }
.cf-ask .cf-card { background: var(--cf-ask); border-color: var(--cf-ask-line); }
.cf-card h4 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.cf-card h4:focus { outline: none; }
.cf-card p { margin: 0; line-height: 1.5; }
.cf-card .src { font-size: 0.82rem; color: var(--ink-2); }
.cf-card .table-wrap { margin: 0; }
.cf-picks { flex-direction: column; align-items: stretch; }
.cf-picks .rpick { text-align: left; border-radius: 12px; padding: 8px 12px; line-height: 1.35; }
.rpick.is-chosen { border-color: var(--accent); background: var(--accent-soft); }
.cf-then { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--cf-ask-line); }
.cf-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cf-nav [hidden] { display: none; }
@media (max-width: 560px) {
  .cf-list::before { left: 31px; }
  .cf-list > li { grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
  .cf-y { font-size: 0.72rem; padding: 5px 2px; }
}

/* ---------- subduction cross-section ---------- */
.sz-sky { fill: var(--sz-sky); } .sz-sea { fill: var(--sz-sea); } .sz-ocean { fill: var(--sz-ocean); } .sz-cont { fill: var(--sz-cont); }
.sz-lith { stroke: var(--sz-line); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: 0.45; fill: none; }
.sz-lab { font: 700 18px var(--font-body); fill: var(--ink); } .sz-lab-s { font: 600 15px var(--font-body); fill: var(--ink); }
.sz-move { fill: none; stroke: var(--sz-line); stroke-width: 3; }
.sz-ah { fill: var(--sz-line); }
.sz-lock { fill: none; stroke: var(--sz-magma); stroke-width: 6; stroke-dasharray: 3 7; stroke-linecap: round; }
.sz-star { fill: var(--sz-star); stroke: var(--sz-line); stroke-width: 1.5; }
.sz-ring { fill: none; stroke: var(--sz-star); stroke-width: 3; }
.sz-magma { fill: none; stroke: var(--sz-magma); stroke-width: 7; stroke-linecap: round; }
.sz-melt { fill: var(--sz-magma); }
.sz-volc { fill: var(--sz-volc); }

/* ---------- shared bits from the ecosystems lesson ---------- */
.pop-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.97rem; line-height: 1.4; cursor: pointer; }
.pop-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.halo { fill: none !important; stroke: var(--surface); stroke-width: 4.5; stroke-linejoin: round; opacity: 0.9; }
.rep-view { margin-top: 12px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; max-width: 72ch; }
.rep-view h4 { margin: 0 0 6px; font-size: 1.15rem; }
.rep-view h5 { margin: 8px 0 0; font-size: 0.95rem; color: var(--accent); }
.rep-view p { margin: 0; line-height: 1.5; }
.st-how.st-how-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .st-how.st-how-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .st-how.st-how-4 { grid-template-columns: minmax(0, 1fr); } }
.p-c i { background: #8a5a12; } .p-d i { background: #2f7a4a; }
.sz-mantle { fill: var(--sz-mantle); }
