/* EX.CSS - Mastering the Clinical Conversation · Part II House · Exercises & Worksheets */
@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: #19182b;
  --cream: #f6f1e8;
  --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;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 28px 80px;
  width: 100%;
  flex-grow: 1;
}

/* Header */
.ex-header {
  background: linear-gradient(135deg, #1b1c31 0%, #292a48 60%, #171828 100%);
  color: #fff;
  border-radius: 12px;
  padding: 42px 36px 34px;
  margin-bottom: 32px;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 8px 28px rgba(20, 15, 10, 0.08);
}

.ex-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 12px;
}

.ex-header h1 {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.15;
  color: #fdfaf6;
  margin-bottom: 16px;
}

.ex-header h1 em {
  color: var(--gold-lt);
  font-style: italic;
}

.ex-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245, 235, 220, 0.85);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ex-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 4px;
}

/* Why / Rationale Lead Box */
.why {
  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 16px rgba(0, 0, 0, 0.03);
}

.why p.lead {
  font-size: 15.5px;
  color: #332519;
  line-height: 1.68;
  margin-bottom: 12px;
}

.why p.lead:last-child {
  margin-bottom: 0;
}

/* Task Box & Steps */
.task-box {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.task-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 18px;
}

.task-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(160, 130, 70, 0.15);
}

.task-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num {
  width: 34px;
  height: 34px;
  background: #24253d;
  color: var(--gold-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #1e1b2e;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 14.5px;
  color: #403024;
}

.step-example {
  margin-top: 8px;
  background: var(--sand-box);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #2b1f15;
  border-left: 2px solid var(--gold);
}

/* Interactive Dialogue Trainer */
.dlg {
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.dlg-turn {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 8px;
}

.dlg-turn.client {
  background: #f5ede2;
  border-left: 3px solid #8e6840;
}

.dlg-turn.therapist {
  background: #e8f1ef;
  border-left: 3px solid var(--teal);
}

.dlg-who {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.dlg-turn.client .dlg-who { color: #734c20; }
.dlg-turn.therapist .dlg-who { color: var(--teal); }

.dlg-aside {
  margin-top: 8px;
  font-size: 13px;
  font-style: italic;
  color: #63503f;
}

/* Homework Fields */
.field-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #241a12;
  margin-bottom: 6px;
  margin-top: 18px;
  display: block;
}

.fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .fields-2 { grid-template-columns: 1fr; }
}

textarea, input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--sand-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14.5px;
  background: #faf7f2;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Steps Navigation & Step Panels */
.steps-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
}
.step-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.step-tab:hover {
  border-color: var(--gold);
  background: #fffdf9;
}
.step-tab .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ece4d4;
  color: #55412b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.step-tab.on {
  background: #1b1c31;
  color: #ffffff;
  border-color: #1b1c31;
  box-shadow: 0 4px 14px rgba(27,28,49,0.22);
}
.step-tab.on .n {
  background: var(--gold);
  color: #1b1c31;
}
.step-panel {
  display: none;
}
.step-panel.on {
  display: block;
}

/* Now-do Alert Box */
.now-do {
  background: #fbf7ee;
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #433322;
  margin: 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* Person Bar */
.person-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: #f7f1e5;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid rgba(201, 136, 43, 0.35);
  margin: 16px 0;
}
.person-bar .who {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
}
.person-bar .line {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: #24190e;
}

/* Halls Grid */
.halls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.halls.six {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 680px) {
  .halls, .halls.six { grid-template-columns: 1fr; }
}
.hall-btn {
  display: flex;
  flex-direction: column;
  padding: 13px 15px;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.hall-btn:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.hall-btn.on {
  background: #1b1c31;
  color: #ffffff;
  border-color: #1b1c31;
  box-shadow: 0 4px 14px rgba(27,28,49,0.18);
}
.hall-btn .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.hall-btn.on .num {
  color: var(--gold-lt);
}
.hall-btn .name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 3px 0 2px;
}
.hall-btn .sub {
  font-size: 12.5px;
  color: #6d6052;
}
.hall-btn.on .sub {
  color: #d1cdd9;
}

/* Role Selection */
.role-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
@media (max-width: 680px) {
  .role-pick { grid-template-columns: 1fr; }
}
.role-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 16px;
  border: 1px solid var(--sand-border);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.role-btn:hover {
  border-color: var(--gold);
  background: #fffdf9;
}
.role-btn.on {
  background: #1b1c31;
  color: #ffffff;
  border-color: #1b1c31;
  box-shadow: 0 4px 14px rgba(27,28,49,0.18);
}
.role-btn .who {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: inherit;
  margin-bottom: 4px;
}
.role-btn .how {
  font-size: 13px;
  color: #635649;
  line-height: 1.4;
}
.role-btn.on .how {
  color: #d2cee0;
}
.role-script {
  display: none;
  margin-top: 18px;
}
.role-script.on {
  display: block;
}

/* How Slide & Guidelines */
.how-slide {
  background: #fdfaf5;
  border: 1px solid var(--sand-border);
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 22px;
}
.how-slide h2 {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 12px;
  color: #241a12;
}
.how-slide ol {
  padding-left: 20px;
}
.how-slide li {
  margin-bottom: 8px;
  font-size: 15px;
  color: #3b2d20;
}

/* Play Grid for Roles */
.play-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0;
}
@media (max-width: 680px) {
  .play-grid { grid-template-columns: 1fr; }
}
.play-box {
  background: #fbf7f0;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.play-box h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.play-box p {
  font-size: 14px;
  color: #33271b;
  margin: 0;
}

/* Sticker Board */
.sticker-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px;
  background: #f7f1e6;
  border: 1px dashed var(--sand-border);
  border-radius: 9px;
  min-height: 56px;
  margin: 14px 0;
}
.sticker {
  display: inline-block;
  padding: 9px 13px;
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  font-size: 14px;
  color: #1e1915;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  cursor: grab;
  user-select: none;
}
.sticker:active {
  cursor: grabbing;
}
.compose {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.compose input {
  flex: 1;
}
.compose button {
  padding: 10px 18px;
  background: var(--gold);
  color: #1b1c31;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.compose button:hover {
  background: var(--gold-lt);
}
.zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 780px) {
  .zones { grid-template-columns: 1fr; }
}
.zone {
  min-height: 240px;
  border: 2px dashed #dbcdb8;
  border-radius: 10px;
  padding: 16px;
  background: #faf7f2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.15s ease;
}
.zone.drag-over {
  border-color: var(--gold);
  background: #fdf5e6;
}
.zone h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  margin-bottom: 2px;
  color: #241a12;
}
.zone p.hint {
  font-size: 12.5px;
  color: #7a6e60;
  margin-bottom: 6px;
}

/* Next / Navigation Row */
.next-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}
.next-row button {
  padding: 11px 24px;
  background: #1b1c31;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.next-row button:hover:not(:disabled) {
  background: #2b2c4d;
  transform: translateY(-1px);
}
.next-row button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Rules / Checklists */
.rules-block {
  margin-top: 28px;
}
.rule-yes {
  padding: 7px 0 7px 24px;
  position: relative;
  font-size: 14.5px;
  color: #1b5337;
  line-height: 1.5;
}
.rule-yes::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22704b;
  font-weight: bold;
}
.rule-no {
  padding: 7px 0 7px 24px;
  position: relative;
  font-size: 14.5px;
  color: #8c2618;
  line-height: 1.5;
}
.rule-no::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #9e2a1a;
  font-weight: bold;
}

/* Competency Ticks */
.ticks {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.ticks label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: #3b2d20;
  cursor: pointer;
}
.ticks input[type="checkbox"] {
  accent-color: var(--gold);
}

/* Explorer Footer */
.exp-footer {
  margin-top: 48px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--sand-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.exp-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.exp-site {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7a634e;
}

.exp-links a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  margin: 0 6px;
}

.exp-links a:hover {
  text-decoration: underline;
}

.exp-disc {
  font-size: 12px;
  color: #94806d;
}
