/*
 * Layout overrides for the wired walker. kit.css defines the design
 * tokens + base components for a fixed 1440x900 design board; this
 * file relaxes the fixed dimensions and wires the canvas+sidebar
 * grid for the live app. No new colors. No new typography.
 */

html, body, #root {
  height: 100%;
  margin: 0;
}

.dw-frame {
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.dw-main {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dw-canvas {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
}

.dw-sidebar {
  width: 360px;
  flex-shrink: 0;
  border-left: 1px solid var(--ink);
  background: var(--paper);
  padding: 16px 20px;
  overflow: auto;
}

.dw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.dw-header h1 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  white-space: nowrap;
}

.dw-header .dw-meta,
.dw-header .dw-reader {
  font-size: 11px;
  color: var(--ink-60);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dw-header .dw-reader { margin-left: auto; }

.dw-case-list {
  list-style: none;
  margin: 0;
  padding: 16px 20px;
  display: grid;
  gap: 4px;
  counter-reset: case;
}

.dw-case-list li {
  counter-increment: case;
}

.dw-case-list li::before {
  content: counter(case) ". ";
  color: var(--ink-30);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

.dw-case-list button {
  background: var(--paper);
  border: 1px solid var(--ink-30);
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.dw-case-list button:hover {
  border-color: var(--ink);
  background: var(--ink-12);
}

.dw-case-list button[aria-pressed="true"] {
  border: 1px solid var(--ink);
  background: var(--ink-12);
}

.dw-case-no { font-weight: 600; }
.dw-debtor  { color: var(--ink); }
.dw-chapter,
.dw-court   { color: var(--ink-60); font-size: 11px; }

.dw-filings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.dw-filings button {
  background: var(--paper);
  border: 1px solid var(--ink-30);
  color: var(--ink);
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 12px;
}

.dw-filings button[aria-pressed="true"] {
  border: 1px solid var(--ink);
  background: var(--ink-12);
}

.dw-filings .dw-dkt   { color: var(--ink-60); width: 64px; display: inline-block; }
.dw-filings .dw-phase { color: var(--ink-60); font-size: 11px; float: right; }

.dw-sidebar h2 {
  font-size: 13px;
  margin: 0 0 8px;
  letter-spacing: 0;
}

.dw-sidebar p {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 12px;
}

.dw-sidebar dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 11px;
  margin: 0;
}
.dw-sidebar dt { color: var(--ink-60); text-transform: uppercase; letter-spacing: 0.08em; }
.dw-sidebar dd { margin: 0; }

.dw-cap-stack {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.dw-cap-stack td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--ink-30);
}

.dw-phase-legend {
  list-style: none;
  margin: 0;
  padding: 8px 20px;
  display: flex;
  gap: 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-60);
  border-top: 1px solid var(--ink-30);
}

.dw-command-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-top: 1px solid var(--ink);
  font-size: 12px;
  color: var(--ink-60);
}

.dw-command-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.dw-command-bar input::placeholder { color: var(--ink-30); }

.dw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.4);
  display: grid;
  place-items: center;
  z-index: 10;
}

.dw-overlay-card {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 16px 20px;
  max-width: 480px;
  font-size: 12px;
}

.dw-overlay h2 {
  font-size: 13px;
  margin: 0 0 8px;
}

.dw-overlay pre {
  font: inherit;
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}

.dw-overlay p {
  margin: 0;
}

.dw-frame-error,
.dw-frame-loading {
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--ink-60);
}

.dw-logo {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
