/* Palette/fonts: see /css/site-theme.css */


* { box-sizing: border-box; }

html { font-size: 15px; }

/* body chrome from site-theme */


.shell { min-height: 100vh; }

body.viewer-open { overflow: hidden; }

body.viewer-open .shell {
  display: grid;
  grid-template-columns: minmax(340px, 42%) 1fr;
  height: 100vh;
}

.page {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  min-width: 0;
}

body.viewer-open .page {
  width: auto;
  margin: 0;
  padding: 0.65rem 0.75rem 1rem;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-sep {
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: var(--line);
  margin: 0 0.2rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  font-size: 0.92rem;
}

.nav a.nav-suite { font-size: 0.85rem; }

.nav a:hover,
.nav a.is-active,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent-soft);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.hero p {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.section {
  margin-top: 2rem;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}

.section-lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card .ticker {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.card h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0.35rem 0 0.25rem;
}

.card .meta { color: var(--muted); font-size: 0.9rem; }

.card-module {
  border-left: 3px solid var(--accent);
}

.levels {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--muted);
}

.chip.easy { border-color: #9cc4ae; color: var(--good); }
.chip.medium { border-color: #d2c08a; color: var(--warn); }
.chip.tough { border-color: #d2a090; color: var(--bad); }

/* Quiz layout */
.quiz-head {
  margin-bottom: 0.55rem;
}

.quiz-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.quiz-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  margin: 0 0 0.15rem;
}

.quiz-head .meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin: 0.5rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.score-live {
  font-weight: 700;
  color: var(--navy-deep, var(--ink));
  white-space: nowrap;
}

.bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.prompt-box {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
}

.prompt-box .level {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.prompt-box h2 {
  font-family: var(--serif);
  font-size: 1rem;
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.prompt-box .value-line {
  margin: 0;
  font-size: 0.9rem;
}

.prompt-box .value-line strong {
  font-family: var(--mono);
  font-size: 0.95rem;
}

.choices {
  display: grid;
  gap: 0.35rem;
}

.choice {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.choice:hover:not(:disabled) { border-color: var(--accent); }

.choice .qname {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin-bottom: 0.1rem;
}

.choice .label {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.choice.is-correct {
  border-color: var(--good);
  background: #e8f4ec;
}

.choice.is-wrong {
  border-color: var(--bad);
  background: #f8ece9;
}

.choice:disabled { cursor: default; }

.feedback {
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.85rem;
}

.feedback.ok { border-color: #9cc4ae; }
.feedback.no { border-color: #d2a090; }

.feedback code {
  font-family: var(--mono);
  font-size: 0.82em;
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.actions-top {
  margin-top: 0;
  flex-shrink: 0;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #f3f7f4;
  font-weight: 600;
}

.btn:disabled { opacity: 0.5; cursor: default; }

.score-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.score-card h2 {
  font-family: var(--serif);
  margin: 0 0 0.5rem;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}

.score-grid div {
  border: 1px solid var(--line);
  padding: 0.65rem;
  text-align: center;
}

.score-grid b {
  display: block;
  font-size: 1.4rem;
  font-family: var(--serif);
}

/* Filing pane */
.filing-pane {
  display: flex;
  flex-direction: column;
  background: #121816;
  color: #e8eeeb;
  min-width: 0;
  height: 100vh;
}

.filing-pane[hidden] { display: none !important; }

.filing-pane-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #2a3531;
  flex-shrink: 0;
}

.filing-pane-title { font-weight: 600; font-size: 0.95rem; }
.filing-pane-sub {
  font-size: 0.75rem;
  color: #8f9c96;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28rem;
}

.filing-pane-actions { display: flex; gap: 0.5rem; align-items: center; }
.sec-link { color: #9fd4bd; font-size: 0.85rem; text-decoration: none; }
.btn-close {
  appearance: none;
  border: 1px solid #3d4a45;
  background: transparent;
  color: #e8eeeb;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.filing-pane-status {
  margin: 0;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  color: #8f9c96;
}

#filing-iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2rem;
}

.guide h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.35rem 0 0.75rem;
  color: var(--accent);
}

.guide p, .guide li {
  max-width: 40rem;
  color: var(--ink);
}

.guide ul { padding-left: 1.2rem; }

.guide code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.guide .btn { margin-right: 0.4rem; margin-top: 0.5rem; display: inline-block; text-decoration: none; }

@media (max-width: 860px) {
  body.viewer-open .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 48vh 52vh;
  }
  body.viewer-open .page { height: 48vh; border-right: 0; }
  .filing-pane { height: 52vh; border-top: 1px solid #2a3531; }
  .score-grid { grid-template-columns: 1fr; }
}
