/* ITB.CSS - Mastering the Clinical Conversation · Part II House · General Pages Style */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
  --ink: #18192b;
  --cream: #f7f2ea;
  --cream-card: #ffffff;
  --sand-box: #f4ecdf;
  --sand-border: #dbcab0;
  --gold: #c9882b;
  --gold-lt: #e4aa4c;
  --gold-glow: rgba(201, 136, 43, 0.15);
  --teal: #1c615a;
  --teal-lt: #e1efec;
  --teal-border: #9ec5c0;
  --rust: #9e3825;
  --rust-lt: #faece9;
  --rust-border: #e6aba1;
  --mist: #e8e1d5;
  --muted: #6b5847;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.68;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Top Banner */
header.top {
  background: linear-gradient(135deg, #1b1c31 0%, #292a48 60%, #171828 100%);
  color: #fff;
  padding: 48px 36px 38px;
  border-bottom: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}

header.top::after {
  content: 'ITB';
  position: absolute;
  right: 24px;
  top: 6px;
  font-family: var(--font-display);
  font-size: 84px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  letter-spacing: 2px;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-lt);
  background: rgba(201, 136, 43, 0.16);
  border: 1px solid rgba(228, 170, 76, 0.35);
  padding: 4px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
}

header.top h1 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.18;
  color: #fcf8f2;
  margin-bottom: 8px;
}

header.top h1 em {
  color: var(--gold-lt);
  font-style: italic;
}

header.top p.sub {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: rgba(245, 235, 220, 0.82);
  max-width: 780px;
  line-height: 1.6;
}

.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f7ede0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Container Wrap */
.wrap {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 48px;
  flex-grow: 1;
}

/* Theory / Intro Block */
.theory {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 18px rgba(30, 20, 10, 0.04);
}

.theory h3 {
  font-family: var(--font-display);
  font-size: 21px;
  color: #2b1f15;
  margin-bottom: 10px;
}

.theory p {
  color: #3b2e24;
  margin-bottom: 10px;
  font-size: 15px;
}

.theory p:last-child {
  margin-bottom: 0;
}

/* Card Sections */
.card {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-top: 3px solid #292a48;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(30, 20, 10, 0.05);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: #1e1b2e;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(160, 130, 70, 0.2);
}

/* Grid-2 Columns */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.box {
  background: var(--sand-box);
  border: 1px solid var(--sand-border);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.box h3 {
  font-family: var(--font-display);
  font-size: 17px;
  color: #2e1e12;
  margin-bottom: 8px;
}

.box p {
  font-size: 14.5px;
  color: #3a2c20;
  line-height: 1.55;
  margin-bottom: 6px;
}

.box p:last-child {
  margin-bottom: 0;
}

/* Note & Misstep Callouts */
.note {
  background: var(--teal-lt);
  border: 1px solid var(--teal-border);
  border-left: 3px solid var(--teal);
  color: #14443f;
  padding: 9px 13px;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.5;
}

.no {
  background: var(--rust-lt);
  border: 1px solid var(--rust-border);
  border-left: 3px solid var(--rust);
  color: #701c0c;
  padding: 9px 13px;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

/* Layers (Clients page) */
.layers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .layers { grid-template-columns: 1fr; }
}

/* Glossary Controls & Cards */
.controls {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 28px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.controls input#searchInput {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--sand-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.controls input#searchInput:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.filter-btn {
  padding: 9px 16px;
  border: 1px solid var(--sand-border);
  border-radius: 6px;
  background: #ffffff;
  color: #4a382b;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: var(--sand-box);
  border-color: var(--gold);
}

.filter-btn.active {
  background: #24253d;
  color: #f7eedf;
  border-color: #24253d;
}

.term-card {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 3px 12px rgba(20, 10, 5, 0.04);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.term-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.tc-ru {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #1f1b2b;
}

.tc-en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  margin-left: 8px;
}

.tc-short {
  font-size: 14.5px;
  color: #44372e;
  margin-top: 6px;
}

.tc-expanded {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--sand-border);
  display: none;
}

.term-card.open .tc-expanded {
  display: block;
}

.tc-example {
  background: var(--sand-box);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 10px 0;
  font-size: 14px;
  color: #2e2319;
}

.tc-page {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8c735d;
  margin-top: 6px;
}

/* Quiz & Test Styles */
.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.progress .bar {
  flex: 1;
  max-width: 320px;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.progress .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold-lt);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.bar-txt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-lt);
}

.q-card {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.q-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.q-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: #1a1728;
  margin-bottom: 16px;
  line-height: 1.4;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--sand-border);
  border-radius: 6px;
  background: #faf7f2;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14.5px;
  color: #33271c;
}

.q-opt:hover {
  background: #f2e9dc;
  border-color: var(--gold);
}

.q-opt.correct {
  background: #e4f4ed;
  border-color: #2b7a54;
  color: #14472d;
}

.q-opt.wrong {
  background: #faece9;
  border-color: #ba4a3b;
  color: #731e13;
}

.q-feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.results {
  background: #ffffff;
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  display: none;
}

.results-score {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: #1c1a2e;
  margin-bottom: 8px;
}

/* File Navigation Strip */
.file-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(160, 130, 70, 0.2);
}

.file-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4a3928;
  background: #ffffff;
  border: 1px solid var(--sand-border);
  padding: 7px 14px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.file-nav a:hover {
  background: #24253d;
  color: #f7eedf;
  border-color: #24253d;
}

.file-nav a.here {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  font-weight: 600;
}

/* Site Footer */
.site-foot {
  margin-top: auto;
  background: #18192b;
  color: #d8d3c7;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-family: var(--font-body);
  border-top: 1px solid rgba(201, 136, 43, 0.3);
}

.site-foot img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
