:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #09090b;
  color: #f4f4f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 26rem),
    #09090b;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  margin-bottom: 28px;
}

.hero.compact {
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eyebrow {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.96;
  max-width: 900px;
}

h2 {
  font-size: 24px;
}

p,
li,
dd,
span {
  color: #d4d4d8;
}

.card,
.history {
  background: rgba(24, 24, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  margin: 22px 0;
  padding: 24px;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  color: #fafafa;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

input,
textarea,
select {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 14px;
  color: #fafafa;
  font: inherit;
  padding: 13px 14px;
}

textarea {
  resize: vertical;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboard-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

button {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 15px 22px;
  width: fit-content;
}

.button-link {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-weight: 800;
  margin-top: 8px;
  padding: 13px 20px;
  text-decoration: none;
}

.list {
  display: grid;
  gap: 12px;
}

.analysis-row {
  align-items: center;
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
}

.analysis-row span {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.score {
  color: #a1a1aa;
  text-align: right;
}

.score strong {
  color: #fbbf24;
  display: block;
  font-size: 24px;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metrics div {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 18px;
  padding: 16px;
}

.metrics span {
  display: block;
  font-size: 13px;
}

.metrics strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.details {
  display: grid;
  gap: 12px;
}

dt {
  color: #fbbf24;
  font-weight: 800;
}

dd {
  margin: 0 0 8px;
}

.idea {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 18px;
  margin-top: 14px;
  padding: 18px;
}

pre {
  background: #050506;
  border: 1px solid #27272a;
  border-radius: 14px;
  color: #e4e4e7;
  overflow-x: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.back {
  color: #fbbf24;
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: none;
}

.muted {
  color: #a1a1aa;
}

.hint {
  color: #a1a1aa;
  font-size: 13px;
  margin: -8px 0 0;
}

.next-update {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.next-update strong {
  color: #93c5fd;
}

.next-update span {
  font-size: 14px;
}

.pattern-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pattern-card {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 20px;
  color: #fff;
  display: grid;
  gap: 14px;
  padding: 18px;
  text-decoration: none;
}

.pattern-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.pattern-card p {
  color: #d4d4d8;
  margin-bottom: 0;
}

.pattern-head .eyebrow {
  margin-bottom: 8px;
}

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

.tags span {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.control-row {
  align-items: center;
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 18px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.compact-control {
  padding: 14px;
}

.control-row strong,
.control-row span {
  display: block;
}

.control-row .tags {
  margin-top: 10px;
}

.switch {
  display: inline-block;
  position: relative;
}

.switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch span {
  background: #3f3f46;
  border-radius: 999px;
  cursor: pointer;
  display: block;
  height: 34px;
  position: relative;
  transition: 0.2s ease;
  width: 62px;
}

.switch span::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  top: 4px;
  transition: 0.2s ease;
  width: 26px;
}

.switch input:checked + span {
  background: #f59e0b;
}

.switch input:checked + span::after {
  transform: translateX(28px);
}

.switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.45;
}

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

  .control-row,
  .analysis-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .score {
    text-align: left;
  }
}
