/* Legacy File Format Migration Checklist - Styles */
:root {
  --bg: #0f1117;
  --bg-surface: #1a1d27;
  --bg-elevated: #232736;
  --bg-input: #1e2130;
  --border: #2e3348;
  --border-light: #3a3f58;
  --text: #e4e6f0;
  --text-muted: #8b8fa8;
  --text-dim: #5c6080;
  --accent: #6c8cff;
  --accent-hover: #829dff;
  --accent-dim: #3d5299;
  --success: #4ade80;
  --success-dim: #1a4a2e;
  --warning: #fbbf24;
  --warning-dim: #4a3d1a;
  --danger: #f87171;
  --danger-dim: #4a1a1a;
  --radius: 8px;
  --radius-lg: 12px;
  --font: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.logo:hover { color: var(--accent); text-decoration: none; }

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero-section {
  padding: 48px 0 32px;
}

.hero-section h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 16px;
}

.hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font);
}

/* Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
}

/* Config Panel */
.config-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 72px;
}

.config-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem !important;
  color: var(--text) !important;
  text-transform: none !important;
  font-weight: 400 !important;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn:hover { background: var(--border-light); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.btn-full { width: 100%; }

.btn-danger { color: var(--danger); border-color: var(--danger-dim); }

.btn-danger:hover { background: var(--danger-dim); }

/* Saved Projects */
.saved-projects {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.saved-projects h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
  font-size: 0.8rem;
}

.saved-item-name {
  color: var(--text);
  cursor: pointer;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-item-name:hover { color: var(--accent); }

.saved-item-delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
  line-height: 1;
}

.saved-item-delete:hover { color: var(--danger); }

/* Checklist Panel */
.checklist-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 400px;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.checklist-header h2 { font-size: 1.1rem; }

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state svg { margin-bottom: 16px; opacity: 0.5; }

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state p { font-size: 0.9rem; max-width: 400px; margin: 0 auto; }

/* Progress */
.progress-bar {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: var(--font);
}

/* Phases */
.phase {
  margin-bottom: 24px;
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.phase-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font);
  flex-shrink: 0;
}

.phase-title {
  font-size: 1rem;
  font-weight: 700;
}

.phase-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Step */
.step {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color var(--transition);
}

.step:hover { border-color: var(--border); }

.step.completed { opacity: 0.6; }

.step-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.step-content { flex: 1; min-width: 0; }

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step.completed .step-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.step-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.tool-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font);
}

.step-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 10px;
  background: var(--warning-dim);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--warning);
  margin-bottom: 6px;
}

.step-note-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 32px;
}

.step-note-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Reference Section */
.reference-section {
  margin-bottom: 48px;
}

.reference-section h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.ref-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.ref-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-card li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.ref-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-dim);
  font-family: var(--font);
}

.ref-card strong { color: var(--text); }

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ref-table th,
.ref-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ref-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ref-table td { color: var(--text); }

.ref-table tr:last-child td { border-bottom: none; }

/* Info Section */
.info-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
}

.info-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.info-section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 750px;
}

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

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

/* Print */
@media print {
  .site-header, .config-panel, .checklist-actions, .site-footer, .info-section, .reference-section { display: none !important; }
  .workspace { display: block; }
  .checklist-panel { border: none; padding: 0; }
  body { background: #fff; color: #000; }
  .step { break-inside: avoid; }
}

/* Responsive */
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .config-panel { position: static; }
  .ref-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-section h1 { font-size: 1.5rem; }
  .nav { gap: 12px; }
  .nav a { font-size: 0.8rem; }
  .checklist-header { flex-direction: column; align-items: flex-start; }
}



/* 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;
}
