/* Hallmark · shape: app screen · genre: atmospheric · theme: Kiln (deal 1/3, seed explorer-india-lok-sabha-21a7·f48816f2·2026-12-02·r0)
 * nav: top bar with house switch and search, camera views in a bottom dock · signature: the chamber with every sitting member in their seat, faces from official photos · states: loading, error, empty search, full · kiln: ember
 * axes: dark/high-contrast-serif/warm · posture: full-palette · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, four floating regions over a busy 3D scene; panels are opaque smoked wells and the info panel folds away */
/* Hallmark · dismissed F4 · the two filled pills are a house switch where only the current house is filled, never two actions */
/* Hallmark · dismissed F6 · .state-title holds loading and error sentences, no figures */
@import url("./tokens.css");
@import url("./base.css");

html, body { height: 100%; }
body { overflow: clip; touch-action: none; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: var(--color-paper); cursor: grab; }
#scene:active { cursor: grabbing; }
#scene.is-hover { cursor: pointer; }

.well { background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-well); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--color-ink); font-weight: 500; font-size: var(--text-sm); cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.pill:hover { background: var(--color-paper-3); }
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.pill[aria-pressed="true"], .pill--primary { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: none; }
.pill[aria-pressed="true"]:hover, .pill--primary:hover { background: var(--color-focus); }
.pill:disabled { opacity: 0.5; cursor: not-allowed; }

/* top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky-nav);
  display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-md);
  background: linear-gradient(to bottom, color-mix(in oklab, var(--color-paper) 85%, transparent), transparent);
}
.wordmark { font-size: var(--text-xl); max-width: none; white-space: nowrap; }
.switch { display: inline-flex; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-paper-2); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.switch .pill { box-shadow: none; }
.search { margin-left: auto; width: min(320px, 40vw); }
.search input {
  width: 100%; min-height: 40px; padding: 0 var(--space-md); border-radius: var(--radius-well);
  background: var(--color-paper-2); color: var(--color-ink); border: var(--rule-hair) solid var(--color-rule);
  transition: border-color var(--dur-short) var(--ease-out);
}
.search input::placeholder { color: var(--color-muted); }
.search input:hover { border-color: var(--color-muted); }
.search input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.search input[aria-invalid="true"] { border-color: var(--color-error); }
.search { position: relative; }
.find-msg { position: absolute; top: calc(100% + var(--space-2xs)); right: 0; max-width: 100%; padding: var(--space-2xs) var(--space-xs); font-size: var(--text-sm); color: var(--color-ink); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-well); text-wrap: balance; }
.find-msg:empty { display: none; }

/* house explainer */
.info { position: fixed; top: 72px; left: var(--space-md); z-index: var(--z-raised); width: min(340px, calc(100% - 2 * var(--space-md))); max-height: calc(100% - 200px); overflow: auto; }
.info summary { cursor: pointer; padding: var(--space-sm) var(--space-md); font-weight: 500; font-size: var(--text-sm); color: var(--color-ink-2); border-radius: var(--radius-well); }
.info summary:hover { color: var(--color-ink); }
.info summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.info-body { padding: 0 var(--space-md) var(--space-md); display: grid; gap: var(--space-sm); }
.info-body h2 { font-size: var(--text-3xl); }
.info-sub { color: var(--color-muted); font-size: var(--text-sm); margin-top: calc(-1 * var(--space-xs)); }
.info-body p { font-size: var(--text-sm); line-height: 1.5; }
.tally { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: var(--rule-hair) solid var(--color-rule); }
.tally dt, .tally dd { margin: 0; padding: var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); }
.tally dt { color: var(--color-ink-2); }
.tally dd { font-family: var(--font-display); font-size: var(--text-lg); font-variant-numeric: lining-nums tabular-nums; text-align: right; line-height: 1.2; }
.fine { color: var(--color-muted); font-size: var(--text-xs) !important; }

/* member card */
.card {
  position: fixed; top: 72px; right: var(--space-md); z-index: var(--z-raised);
  width: min(320px, calc(100% - 2 * var(--space-md))); padding: var(--space-md); display: grid; gap: var(--space-md);
  max-height: calc(100% - 72px - 130px); overflow: auto; /* clear of the camera buttons below */
  box-shadow: var(--shadow-card);
}
.close { justify-self: end; min-height: 32px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font-size: var(--text-sm); cursor: pointer; transition: color var(--dur-short) var(--ease-out); margin: calc(-1 * var(--space-xs)) calc(-1 * var(--space-xs)) calc(-1 * var(--space-sm)) 0; position: relative; }
.close::after { content: ""; position: absolute; inset: -6px; }
.close:hover { color: var(--color-ink); }
.close:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.portrait { position: relative; aspect-ratio: 4 / 5; max-height: 36vh; border-radius: var(--radius-well); overflow: hidden; background-color: var(--color-paper-3); background-repeat: no-repeat; background-size: cover; background-position: center 20%; outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
.portrait img.is-loaded { opacity: 1; }
.card-text { display: grid; gap: var(--space-xs); }
.card-text h2 { font-size: var(--text-2xl); }
.card-text > p { color: var(--color-ink-2); font-size: var(--text-sm); }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs) var(--space-md); font-size: var(--text-sm); }
.facts dt { color: var(--color-muted); }
.facts dd { margin: 0; }

/* bottom dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-raised);
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); padding: var(--space-md);
  padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
  background: linear-gradient(to top, color-mix(in oklab, var(--color-paper) 85%, transparent), transparent);
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.proceedings { max-width: 46ch; min-width: 0; }
.proceedings .hi { font-size: var(--text-lg); color: var(--color-ink); }
.proceedings .now { font-size: var(--text-sm); color: var(--color-ink-2); }
.views { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2xs); max-width: 60%; }
.views .pill { background: color-mix(in oklab, var(--color-paper-2) 92%, transparent); }
.views .pill[aria-pressed="true"] { background: var(--color-accent); }

/* hover tip */
.tip { position: fixed; left: 0; top: 0; z-index: var(--z-tooltip); pointer-events: none; padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); white-space: nowrap; }

/* loading and error */
.state { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-content: center; justify-items: center; gap: var(--space-sm); padding: var(--space-lg); text-align: center; background: var(--color-paper); transition: opacity var(--dur-long) var(--ease-out); }
.state.is-done { opacity: 0; pointer-events: none; }
.state-title { font-family: var(--font-display); font-size: var(--text-3xl); line-height: 1.05; letter-spacing: var(--tracking-display); }
.state-sub { color: var(--color-muted); max-width: 46ch; }
.state[data-kind="error"] .state-title { color: var(--color-error); }

@media (max-width: 60rem) {
  .bar { flex-wrap: wrap; gap: var(--space-xs); }
  .wordmark { font-size: var(--text-lg); }
  .search { order: 3; width: 100%; margin-left: 0; }
  .info { top: 118px; max-height: 45%; }
  .card { top: auto; bottom: 150px; right: var(--space-md); grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
  .card .close { grid-column: 1 / -1; }
  .dock { flex-direction: column; align-items: stretch; }
  .views { max-width: none; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: var(--space-2xs); }
}
