:root {
  color-scheme: light dark;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

header h1 {
  margin-bottom: 0.25rem;
}

.tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-intro {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.panel-intro h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.2rem;
}

.panel-intro p {
  margin: 0;
  color: #cbd5f5;
}

.profile-indicator {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 0.5rem;
}

.profile-link {
  font-size: 0.85rem;
  margin-left: 0.4rem;
  color: #82cfff;
  text-decoration: none;
}

.profile-link:hover {
  text-decoration: underline;
}

.aux-link {
  margin-left: 0.5rem;
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.aux-link:hover {
  text-decoration: underline;
}

.tab-button {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #cbd5f5;
  cursor: pointer;
}

.tab-button.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
}

.tab-content.hidden {
  display: none;
}

.controls {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.sample-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sample-row select {
  flex: 1 1 220px;
}

.field.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

textarea,
select,
input[type="range"] {
  width: 100%;
}

textarea {
  border-radius: 8px;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  overflow-y: auto;
  min-height: 120px;
  resize: vertical;
}

select {
  border-radius: 8px;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
}

.buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.buttons.below-sliders {
  margin: 1rem 0 1.5rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}

button[type="button"] {
  background: rgba(226, 232, 240, 0.2);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

#generateBtn.generating,
#generateBtn.generating:disabled {
  background: #94a3b8;
  color: #0f172a;
}

.sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}

.sliders.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sliders.hidden {
  display: none;
}

.analysis-results {
  margin-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.analysis-entry {
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
}

.analysis-entry span {
  display: block;
}

.modernize-controls {
  margin-bottom: 1rem;
}

.modernize-results {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modernize-results .modern-column {
  flex: 1 1 300px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem;
  margin: 0;
  min-height: 180px;
  white-space: pre-wrap;
}

.modern-column .para {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.modern-column .para:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.para .chunk-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.slider-row {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.6rem 0.75rem;
}

.slider-row header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.label-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.slider-row .value {
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
}

input[type="range"] {
  accent-color: #38bdf8;
  width: 100%;
}

.info-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  padding: 0;
  color: #e2e8f0;
  cursor: pointer;
}

.output {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem;
  min-height: 180px;
}

.status {
  min-height: 1.5rem;
  color: #38bdf8;
  font-size: 0.9rem;
}

pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  font-family: "iA Writer Mono", "Berkeley Mono", monospace;
  margin: 0;
  color: #f8fafc;
}
.style-override {
  margin-top: 1rem;
}

.style-override input[type="text"] {
  margin-top: 0.5rem;
}

.revision-toggle textarea {
  margin-top: 0.5rem;
}

.mode-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
}
