/* CDE2's own minimal stylesheet -- independent of the root Preact app's
   src/styles.css (different build pipeline entirely), but reuses the same
   palette tokens for visual continuity: --ink/--paper/--accent are the same
   hex values as src/styles.css's :root in this repo. */
:root {
  --ink: #202520;
  --paper: #fbfbf8;
  --accent: #be4127;
  --line: #d6dad3;
  --muted: #6b756e;
  --dark: #1d2725;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.shell { max-width: 960px; margin: 0 auto; padding: 0 0 48px; }

.experimental-banner {
  background: var(--dark);
  color: #ec7a5f;
  text-align: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.identity-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
}

.sign-in-link {
  display: inline-block;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

main { padding: 24px 20px; }

h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 15px; margin: 20px 0 8px; }

.lede { color: var(--muted); max-width: 60ch; }

.hint { color: var(--muted); font-size: 12px; }

section {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.status-ok { color: #1a7a4c; font-weight: 600; }
.status-err { color: var(--accent); font-weight: 600; }

.viewer canvas {
  display: block;
  width: 100%;
  max-width: 960px;
  height: 540px;
  background: #10120f;
  border-radius: 6px;
  margin-bottom: 12px;
}

button {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

select, input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  max-width: 480px;
}

.grouping-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grouping-tables ul { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.grouping-tables li { padding: 4px 0; border-bottom: 1px solid var(--line); }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 12px; margin: 12px 0; }
dt { color: var(--muted); font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }

.element-detail { margin-top: 12px; }

.draft-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #fff6f4;
}

.draft-card label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.draft-card input { margin-bottom: 8px; }

.save-controls {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.live-issues-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; }
.live-issues-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.live-issues code { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
