:root {
  --bg: #0f1117;
  --bg-panel: #161822;
  --bg-input: #1c1f2b;
  --border: #2a2e3d;
  --border-focus: #5b8af5;
  --text: #e2e4ed;
  --text-muted: #8b8fa3;
  --accent: #6c8cff;
  --accent-hover: #82a0ff;
  --danger: #f56c6c;
  --danger-bg: rgba(245, 108, 108, 0.1);
  --feature: #4ade80;
  --feature-bg: rgba(74, 222, 128, 0.12);
  --fix: #60a5fa;
  --fix-bg: rgba(96, 165, 250, 0.12);
  --breaking: #f59e0b;
  --breaking-bg: rgba(245, 158, 11, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #0f172a;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo { flex-shrink: 0; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.top-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: var(--bg-panel);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(108, 140, 255, 0.1);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.release-meta {
  display: flex;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.input:focus { border-color: var(--border-focus); }

.input-wide { width: 100%; }

.entries-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.entry-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.entry-row:focus-within { border-color: var(--border-focus); }

.entry-text {
  flex: 1;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  min-width: 0;
  cursor: text;
}

.entry-text[contenteditable] {
  padding: 2px 4px;
  border-radius: 4px;
}

.entry-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tag-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}

.tag-btn:hover { border-color: var(--text-muted); color: var(--text); }

.tag-btn.active-feature { background: var(--feature-bg); border-color: var(--feature); color: var(--feature); }
.tag-btn.active-fix { background: var(--fix-bg); border-color: var(--fix); color: var(--fix); }
.tag-btn.active-breaking { background: var(--breaking-bg); border-color: var(--breaking); color: var(--breaking); }

.btn-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.btn-delete:hover { color: var(--danger); background: var(--danger-bg); }

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state p { margin-top: 8px; }

.add-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0f172a;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--danger);
}

.btn-danger-ghost:hover { border-color: var(--danger); background: var(--danger-bg); }

.export-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-body {
  padding: 20px;
}

.preview-output {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 560px;
  overflow-y: auto;
  min-height: 200px;
}

.guide {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.guide-inner { max-width: 960px; }

.guide-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.guide-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.guide-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.guide-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-details {
  margin-bottom: 32px;
}

.guide-details summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0;
  color: var(--text);
}

.guide-details summary:hover { color: var(--accent); }

.qa-list {
  display: grid;
  gap: 16px;
  padding: 16px 0;
}

.qa-list dt {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.qa-list dd {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.assumptions {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.assumptions h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.assumptions p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.assumptions p:last-child { margin-bottom: 0; }

.site-footer {
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-left { margin-right: auto; }

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover { color: var(--accent); }

.footer-nav {
  display: flex;
  gap: 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .top-nav { width: 100%; }

  .nav-link { flex: 1; text-align: center; }

  .release-meta { width: 100%; }

  .release-meta .field { flex: 1; }

  .release-meta .input { width: 100%; }

  .add-row { flex-wrap: wrap; }

  .export-actions { width: 100%; }

  .export-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
  .app { padding: 0 12px 48px; }

  .panel-header { flex-direction: column; align-items: flex-start; }

  .entry-row { flex-wrap: wrap; }

  .entry-text { width: 100%; }

  .guide-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .footer-left { margin-right: 0; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
