/* The simulated shared screen of a case interview, and the exhibits drawn on it. */

:root {
  --series-1: #2f5bd3;
  --series-2: #c46a1b;
  --grid: #e3e6eb;
  --code-bg: #f3f4f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #7b9cff;
    --series-2: #f0a35c;
    --grid: #2c313a;
    --code-bg: #15181d;
  }
}

body[data-view="call"][data-format="case"] main { max-width: 1280px; }
body[data-format="case"] .call-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1rem; align-items: start; }
body[data-format="case"] .tiles { grid-template-columns: 1fr; }
body[data-format="case"] .tile { min-height: 0; padding: 1rem; }
body[data-format="case"] .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
body[data-format="case"] .avatar.you { font-size: 0.9rem; }


.shared {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem 1rem;
  min-width: 0;
}
.shared-by { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.85rem; }
.screen-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.screen-tabs button { padding: 0.3rem 0.8rem; font-size: 0.9rem; border-radius: 8px; }
.screen-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.screen { max-height: 70vh; overflow: auto; }

.exhibit-head { margin-bottom: 0.75rem; }
.exhibit-number { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.exhibit-head h2 { margin: 0.1rem 0 0; font-size: 1.25rem; }
.exhibit-subtitle { margin: 0.2rem 0 0; color: var(--muted); }
.exhibit-note { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 1rem; }
.brief { font-size: 1.05rem; line-height: 1.6; }

.slide { display: grid; gap: 1rem; }
.slide-headline { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.slide-headline strong { font-size: 2.6rem; line-height: 1; color: var(--accent); }
.slide-headline span { color: var(--muted); }
.slide-points { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }

.table-frame { overflow-x: auto; }
.exhibit-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.exhibit-table th, .exhibit-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; }
.exhibit-table thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.exhibit-table tbody th { font-weight: 500; }
.exhibit-table .num { text-align: right; }
.exhibit-table.compact { width: auto; }

.code-frame { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
.code-language { position: absolute; right: 0.6rem; top: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.code { margin: 0; padding: 1.6rem 0 0.75rem; font: 0.85rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.code .line { display: block; padding-right: 1rem; white-space: pre; }
.code .ln { display: inline-block; width: 2.5rem; padding-right: 0.75rem; text-align: right; color: var(--muted); user-select: none; }
.code-output, .code-result, .code-answer { margin-top: 0.75rem; }
.code-output > span, .code-result > span, .code-answer > span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.code-output pre { margin: 0; padding: 0.5rem 0.75rem; background: var(--code-bg); border-radius: 8px; font: 0.85rem ui-monospace, Menlo, Consolas, monospace; }
.code-answer p { margin: 0; padding: 0.6rem 0.8rem; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }

.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .grid.day { stroke-dasharray: 2 4; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick, .chart .axis-title, .chart .direct-label, .chart .marker-label { fill: var(--muted); font-size: 13px; }
.chart .direct-label { fill: var(--text); }
.chart .marker { stroke: var(--muted); stroke-dasharray: 4 3; }
.chart .trace { fill: none; stroke-width: 2.25; stroke-linejoin: round; }
.chart .trace.s1 { stroke: var(--series-1); }
.chart .trace.s2 { stroke: var(--series-2); }
.chart .dot.s1 { fill: var(--series-1); }
.chart .dot.s2 { fill: var(--series-2); }
.chart .bar.s1 { fill: var(--series-1); }
.chart .hit { fill: transparent; }
.chart .point:hover .dot { r: 6; }
.legend { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; padding: 0; margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 0.4rem; vertical-align: middle; }
.legend i.s1 { background: var(--series-1); }
.legend i.s2 { background: var(--series-2); }

@media (max-width: 900px) {
  body[data-format="case"] .call-body { grid-template-columns: 1fr; }
  body[data-format="case"] .tiles { grid-template-columns: 1fr 1fr; order: -1; }
  body[data-format="case"] .tile { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  body[data-format="case"] .avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  body[data-format="case"] .who { text-align: left; }
  .screen { max-height: none; }
}

/* Open case: the statement above an embedded whiteboard. */
body[data-view="call"][data-format="open_case"] main { max-width: 1440px; }
body[data-format="open_case"] .call-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1rem; align-items: start; }
body[data-format="open_case"] .tiles { grid-template-columns: 1fr; }
body[data-format="open_case"] .tile { min-height: 0; padding: 0.9rem; gap: 0.5rem; }
body[data-format="open_case"] .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
body[data-format="open_case"] .avatar.you { font-size: 0.85rem; }
.tile-colleague { border-style: dashed; box-shadow: none; }
.tile-colleague strong { color: var(--muted); }
.board-area { display: grid; gap: 0.75rem; min-width: 0; position: relative; }
.statement {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.statement summary { cursor: pointer; color: var(--muted); font-size: 0.95rem; }
.statement[open] summary { margin-bottom: 0.5rem; }
.statement h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.statement p { margin: 0; }
/* Said on the board itself, so it is in every frame of a recording. */
.board-badge {
  position: absolute; bottom: 0.9rem; left: 50%; transform: translateX(-50%); z-index: 5;
  margin: 0; padding: 0.35rem 0.85rem; border-radius: 999px; pointer-events: none; white-space: nowrap;
  background: #fff4d6; color: #5c4300; border: 1px solid #ecd08a; font-size: 0.95rem; font-weight: 600;
}
body[data-demo="1"] .whiteboard .HintViewer { display: none; } /* nobody draws in a replay */
.whiteboard {
  height: min(72vh, 760px);
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}

@media (max-width: 900px) {
  body[data-format="open_case"] .call-body { grid-template-columns: 1fr; }
  body[data-format="open_case"] .tiles { grid-template-columns: repeat(3, 1fr); order: -1; }
  body[data-format="open_case"] .tile { flex-direction: column; padding: 0.6rem; }
  body[data-format="open_case"] .tile .muted.small { display: none; }
  .whiteboard { height: 60vh; min-height: 360px; }
}

/* The final board under an open-case debrief. */
.final-board { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #ffffff; padding: 0.5rem; overflow: auto; }
.final-board svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.board-text { white-space: pre-wrap; font: 0.85rem/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 0.75rem; border-radius: 8px; }
.criteria { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.criteria li::before { content: "No"; display: inline-block; width: 2.6rem; font-weight: 600; color: var(--warn); }
.criteria li.yes::before { content: "Yes"; color: var(--ok); }
body[data-try="1"] .tiles, body[data-try="1"] .clock { display: none; }
body[data-try="1"] .call-body { grid-template-columns: 1fr; }
