:root {
  --bg: #0f172a;
  --panel: rgba(255,255,255,0.9);
  --text: #0f172a;
  --muted: #475569;
  --accent: #ca8a04;
  --accent-2: #0f766e;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 25%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.14), transparent 25%),
    linear-gradient(135deg, #e2e8f0, #f8fafc 40%, #dbeafe 100%);
  min-height: 100vh;
}
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 44px;
  display: grid;
  gap: 22px;
}
.hero-card, .form-card, .result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
  backdrop-filter: blur(10px);
}
.hero-card {
  padding: 28px;
}
.hero-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.hero-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  font-family: "Cormorant Garamond", serif;
}
.hero-card p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.04rem;
}
.hero-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.hero-grid > div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.06);
}
.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.form-card, .result-card { padding: 26px; }
.card-header, .result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.card-header h2, .result-header h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}
.card-header p {
  margin: 0;
  color: var(--muted);
}
.lookup-file-pill, .theme-tag {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  font-size: 0.84rem;
  white-space: nowrap;
}
.lease-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
label { display: grid; gap: 8px; }
label span {
  font-weight: 700;
  font-size: 0.96rem;
}
input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 16px;
  background: #fff;
  font-size: 1rem;
  outline: none;
  transition: box-shadow .2s, border-color .2s;
}
input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.field-help {
  color: var(--muted);
  font-size: 0.84rem;
}
.field-help.ok { color: #166534; }
.field-help.error { color: #b91c1c; }
.actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(14,165,233,0.22);
}
button.secondary {
  background: rgba(15,23,42,0.08);
  color: var(--text);
  box-shadow: none;
}
button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.hidden { display: none; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.result-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(15,23,42,0.06);
}
.result-item .label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.result-item .value {
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}
body.theme-yt {
  --accent: #b45309;
  --accent-2: #92400e;
}
body.theme-tt {
  --accent: #166534;
  --accent-2: #0f766e;
}
body.theme-rt {
  --accent: #1d4ed8;
  --accent-2: #4338ca;
}
body.theme-yt .hero-card,
body.theme-yt button:not(.secondary) { background-image: linear-gradient(135deg, rgba(245,158,11,0.13), rgba(120,53,15,0.08)); }
body.theme-tt .hero-card,
body.theme-tt button:not(.secondary) { background-image: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(13,148,136,0.08)); }
body.theme-rt .hero-card,
body.theme-rt button:not(.secondary) { background-image: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(99,102,241,0.08)); }
@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1120px); margin: 12px auto 26px; }
  .hero-card, .form-card, .result-card { border-radius: 22px; }
  .form-card, .result-card, .hero-card { padding: 18px; }
  .card-header, .result-header { flex-direction: column; }
}


.hero-disclaimer {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.06);
}
.hero-disclaimer p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}
.hero-disclaimer p:last-child {
  margin-bottom: 0;
}
