/* Conclave: the dark room. Ink ground, bone text, the arc wire, gold once per
   screen. Built on the platform's tokens (design.css); this file is the overlay
   until a Conclave brand lives in the platform (C-09). Nothing here restyles a
   control: buttons, focus, targets and reduced motion are the platform's. */

:root[data-theme="dark"] {
  --ink: #0b0e14;
  --ink-raised: #11151d;
  --bone: #ece6da;
  --bone-quiet: #aaa497;
  --arc: #8ea2ff;
  --arc-wire: rgba(142, 162, 255, 0.16);
  --gold: #d4a84b;

  --surface: var(--ink);
  --surface-sunken: var(--ink);
  --surface-raised: var(--ink-raised);
  --text: var(--bone);
  --text-muted: var(--bone-quiet);
  --border: var(--arc-wire);
  --border-strong: rgba(142, 162, 255, 0.55);
  --accent: var(--arc);
}

body.room {
  background: var(--ink);
  color: var(--bone);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--arc-wire);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--arc);
  text-decoration: none;
  min-height: var(--layout-touch-target);
}

.eyebrow {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-quiet);
  margin: 0;
}

.signout {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
}

.who { color: var(--bone-quiet); }

.stage {
  flex: 1;
  width: min(100%, var(--layout-container-sm));
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-8);
}

.hero { margin-bottom: var(--space-7); }

.display {
  font-size: var(--font-size-3xl);
  line-height: var(--font-leading-tight);
  letter-spacing: var(--font-tracking-tighter);
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}

.lede {
  font-size: var(--font-size-md);
  color: var(--bone);
  text-wrap: pretty;
}

.muted { color: var(--bone-quiet); }

.panel {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--arc-wire);
}

.panel h1, .panel h2 { margin-top: 0; }

.stack { display: grid; gap: var(--space-3); max-width: 28rem; }

.error { color: var(--colour-critical-500); }
.notice { color: var(--gold); }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.inline { margin: 0; }
textarea { width: 100%; }

.date {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  color: var(--bone-quiet);
  margin: 0 0 var(--space-2);
}

/* The nine phases as nodes on a wire. Lit is gold; the current one carries the
   arc; what is ahead is dim. Depth by dimming, not by shadow. */
.phases { margin-bottom: var(--space-6); }

.nodes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: var(--space-3);
  position: relative;
}

.node {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  color: var(--bone-quiet);
  opacity: 0.55;
}

.node--current { opacity: 1; color: var(--arc); }
.node--lit { opacity: 1; color: var(--bone); }

.node-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: transparent;
}

.node--current .node-dot { border-color: var(--arc); }
.node--lit .node-dot { background: var(--gold); border-color: var(--gold); }

.node-name {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The paper register inside the dark room: the document as paper, bone
   ground and ink text, with the plain summary beside it. */
.reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
@media (min-width: 900px) {
  .reading { grid-template-columns: 18rem minmax(0, 1fr); align-items: start; }
  .summary { position: sticky; top: var(--space-4); }
}
.summary { color: var(--bone-quiet); border-top: 1px solid var(--arc-wire); padding-top: var(--space-4); }
.summary p { text-wrap: pretty; }
.paper {
  background: var(--bone);
  color: #15181f;
  padding: var(--space-6) var(--space-6) var(--space-7);
  border-radius: var(--radius-sm);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.paper h2, .paper h3 { color: #15181f; margin-top: var(--space-5); }
.paper p { text-wrap: pretty; }
.evidence { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-1) var(--space-4); margin: var(--space-3) 0 var(--space-5); overflow-wrap: anywhere; }
.evidence dt { color: var(--bone-quiet); font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.evidence dd { margin: 0; }

.foot {
  padding: var(--space-5);
  border-top: 1px solid var(--arc-wire);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.foot-links { display: flex; gap: var(--space-4); }
.foot-links a { color: var(--bone-quiet); min-height: var(--layout-touch-target); display: inline-flex; align-items: center; }

/* The button protocol (AW-108), stated once for the dark room. Every rule that
   changes a background states its colour; hover lifts and deepens; click
   presses. The platform's base hover (design.css) is completed here rather
   than edited there: the base rule sets a background alone, which is the
   AW-108 rule 1 shape, and the platform is read-only until Philip lifts it. */
.button {
  background: var(--arc);
  color: var(--ink);
  border-color: transparent;
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard),
              background var(--motion-duration-fast) var(--motion-easing-standard),
              color var(--motion-duration-fast) var(--motion-easing-standard);
}
.button:hover {
  background: #5b73d9;
  color: #ffffff;
  transform: translateY(-1px);
}
.button:active {
  background: #4a60bd;
  color: #ffffff;
  transform: translateY(1px);
}
.button--plain {
  background: transparent;
  color: var(--bone);
  border-color: var(--border-strong);
}
.button--plain:hover {
  background: #1a2030;
  color: var(--bone);
  transform: translateY(-1px);
}
.button--plain:active {
  background: #141924;
  color: var(--bone);
  transform: translateY(1px);
}
.button--danger {
  background: #b23a3a;
  color: #ffffff;
}
.button--danger:hover {
  background: #8f2e2e;
  color: #ffffff;
  transform: translateY(-1px);
}
.button--danger:active {
  background: #742525;
  color: #ffffff;
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .button:hover, .button:active,
  .button--plain:hover, .button--plain:active,
  .button--danger:hover, .button--danger:active { transform: none; }
}
