:root {
  --bg: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.9);
  --bg-elevated-soft: rgba(15, 23, 42, 0.8);
  --border-subtle: rgba(148, 163, 184, 0.35);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.1);
  --accent-strong: rgba(56, 189, 248, 0.3);
  --accent-stronger: rgba(56, 189, 248, 0.6);
  --marlowe-gold: #f5d08a;
  --marlowe-gold-soft: #fef3c7;
  --marlowe-ivory: #f9fafb;
  --marlowe-slate: #24334f;
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.1);
  --good: #16a34a;
  --good-soft: rgba(22, 163, 74, 0.12);
  --muted: #9ca3af;
  --muted-soft: rgba(148, 163, 184, 0.12);
  --radius-card: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, #020617 50%, #020617 100%);
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.hero {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-eyebrow span.badge {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: normal;
  color: #e5e7eb;
}

.hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f9fafb;
}

.hero-tagline {
  margin: 0;
  color: #9ca3af;
  font-size: 0.95rem;
  max-width: 540px;
}

.hero-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.14rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
}

.chip span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.chip strong {
  font-weight: 500;
  color: #e5e7eb;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.9);
}

.pill span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.pill.highlight {
  border-color: var(--accent-stronger);
  background: var(--accent-soft);
  color: #e5e7eb;
}

.pill.highlight span {
  color: var(--accent);
}

.pill.danger {
  border-color: rgba(220, 38, 38, 0.5);
  background: var(--danger-soft);
  color: #fecaca;
}

.pill.danger span {
  color: #fecaca;
}

/* Auth wrapper */
.auth-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.auth-panel {
  border-radius: var(--radius-card);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1.35rem 1.4rem;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-panel header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
}

.auth-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f9fafb;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
}

label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

input[type="email"],
input[type="password"],
input[type="number"],
input[type="text"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 1));
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: #6b7280;
  font-size: 0.8rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
}

textarea {
  border-radius: 16px;
  min-height: 3.5rem;
  resize: vertical;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  line-height: 1.4;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.field-col {
  min-width: 0;
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.4rem;
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-stronger), #60a5fa);
  color: #0b1120;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(56, 189, 248, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(56, 189, 248, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(56, 189, 248, 0.4);
}

.btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-ghost.sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
}

.btn-subtle {
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: transparent;
  color: #9ca3af;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.btn-subtle:hover {
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.8);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.85);
}

.auth-footnote {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.4rem;
}

.auth-switch {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.6rem;
}

.auth-switch button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: flex-start;
}

.auth-feature-card {
  border-radius: var(--radius-card);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1rem 1.05rem;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.auth-feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.auth-feature-card p {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.feature-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-top: 0.3rem;
  background: radial-gradient(circle at center, var(--marlowe-gold), #f97316);
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.2);
  flex-shrink: 0;
}

.feature-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.1rem;
}

.feature-tag {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.14rem 0.55rem;
  font-size: 0.7rem;
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.96);
}

.grid-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.grid-split header {
  margin-bottom: 0.6rem;
}

.grid-split h3 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.grid-split p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.badge-stack .pill {
  font-size: 0.74rem;
  padding: 0.16rem 0.55rem;
}

/* App Shell */
.app-shell {
  border-radius: 22px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99));
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.25rem 1.4rem 1.4rem;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.95);
  margin-top: 1rem;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-title {
  font-family: "Times New Roman", "Georgia", ui-serif, system-ui;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f9fafb;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.97);
}

.user-email {
  font-size: 0.78rem;
  color: #e5e7eb;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: flex-start;
}

.card {
  border-radius: var(--radius-card);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.9rem 0.95rem;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.98);
  margin-bottom: 0.7rem;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.card small {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  margin: 0.6rem 0 0.65rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.toggle-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 1);
  cursor: pointer;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 0.6rem;
}

.metric {
  border-radius: 14px;
  border: 1px solid rgba(30, 64, 175, 0.7);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.96));
  padding: 0.55rem 0.6rem;
  font-size: 0.8rem;
}

.metric-label {
  font-size: 0.74rem;
  color: #9ca3af;
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f9fafb;
}

.metric-sub {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.metric.bad {
  border-color: rgba(248, 113, 113, 0.7);
  background: radial-gradient(circle at top, rgba(30, 64, 175, 0.4), rgba(15, 23, 42, 1));
}

.metric.good {
  border-color: rgba(45, 212, 191, 0.7);
  background: radial-gradient(circle at top, rgba(22, 163, 74, 0.3), rgba(15, 23, 42, 1));
}

.metric.emphasis {
  border-color: rgba(250, 204, 21, 0.75);
  background: radial-gradient(circle at top, rgba(250, 204, 21, 0.3), rgba(15, 23, 42, 1));
}

.metric.emphasis .metric-label {
  color: #facc15;
}

.metric.emphasis .metric-value {
  color: #fefce8;
}

.metric.stack {
  display: grid;
  gap: 0.3rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.badge {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.96);
}

.badge.key {
  border-color: rgba(250, 204, 21, 0.6);
  color: #facc15;
}

.badge.soft {
  border-style: dashed;
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.7);
}

.saved-deals-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.saved-deal-row {
  border-radius: 14px;
  border: 1px solid rgba(30, 64, 175, 0.8);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.96));
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr);
  gap: 0.4rem;
  align-items: center;
}

.saved-deal-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.saved-deal-title-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.saved-deal-address {
  font-weight: 500;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-deal-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

.saved-deal-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.tag {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  color: #9ca3af;
}

.tag.green {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

.tag.gold {
  border-color: rgba(250, 204, 21, 0.7);
  color: #facc15;
}

.tag.red {
  border-color: rgba(248, 113, 113, 0.8);
  color: #fecaca;
}

.tag.subtle {
  border-style: dashed;
}

.empty-state {
  font-size: 0.76rem;
  color: #6b7280;
  font-style: italic;
}

.small-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.small-value {
  font-size: 0.82rem;
  color: #e5e7eb;
}

.note {
  font-size: 0.74rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

.note strong {
  color: #e5e7eb;
}

.warning {
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.06);
  padding: 0.45rem 0.55rem;
  font-size: 0.75rem;
  color: #fecaca;
  margin-top: 0.4rem;
}

.warning strong {
  color: #fecaca;
}

.subgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.submetric {
  border-radius: 12px;
  border: 1px solid rgba(30, 64, 175, 0.7);
  background: rgba(15, 23, 42, 0.98);
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

.submetric-label {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-bottom: 0.12rem;
}

.submetric-value {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.submetric-sub {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.1rem;
}

.inline-input-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.inline-input-group input {
  width: 80px;
  padding-inline: 0.5rem;
}

.inline-input-group select {
  width: 120px;
  padding-inline: 0.5rem;
}

.footnote {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

.footnote strong {
  color: #9ca3af;
}

.footnote a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-tabs {
  display: inline-flex;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  padding: 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  gap: 0.2rem;
}

.app-tab {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.app-tab.active {
  background: linear-gradient(135deg, var(--marlowe-gold), var(--marlowe-gold-soft));
  color: #111827;
  font-weight: 600;
}

@media (max-width: 768px) {
  .app-tabs {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 14px;
    justify-content: stretch;
  }
  .app-tab {
    flex: 1 1 auto;
    text-align: center;
    font-size: 0.72rem;
    padding: 0.5rem 0.5rem;
    min-width: 0;
  }
}

@media (max-width: 1024px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .saved-deal-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-chip {
    align-self: flex-start;
  }
}

@media (max-width: 640px) {
  .page-inner {
    padding-inline: 1rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  .app-shell {
    padding-inline: 1rem;
  }

  .card {
    padding-inline: 0.8rem;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-grid,
  .subgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-panel {
    padding-inline: 1rem;
  }
}

/* ================== SUBDIVISION DECISION SUMMARY ================== */

.sub-verdict {
  grid-column: 1 / -1;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.2rem;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sub-verdict.go {
  border-color: rgba(45, 212, 191, 0.6);
  background: radial-gradient(circle at top left, rgba(22, 163, 74, 0.25), rgba(15, 23, 42, 0.98));
}

.sub-verdict.caution {
  border-color: rgba(250, 204, 21, 0.6);
  background: radial-gradient(circle at top left, rgba(202, 138, 4, 0.2), rgba(15, 23, 42, 0.98));
}

.sub-verdict.nogo {
  border-color: rgba(248, 113, 113, 0.6);
  background: radial-gradient(circle at top left, rgba(185, 28, 28, 0.2), rgba(15, 23, 42, 0.98));
}

.sub-verdict-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sub-verdict.go .sub-verdict-label { color: #34d399; }
.sub-verdict.caution .sub-verdict-label { color: #fbbf24; }
.sub-verdict.nogo .sub-verdict-label { color: #f87171; }

.sub-verdict-headline {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f9fafb;
  line-height: 1.3;
}

.sub-verdict-detail {
  font-size: 0.88rem;
  color: #9ca3af;
  line-height: 1.6;
}

.sub-kpi-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.sub-kpi {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.98);
  padding: 0.9rem 1rem;
}

.sub-kpi-label {
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.sub-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.1;
}

.sub-kpi-sub {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.3rem;
  line-height: 1.4;
}

.sub-kpi.highlight { border-color: rgba(250, 204, 21, 0.4); }
.sub-kpi.good { border-color: rgba(45, 212, 191, 0.4); }
.sub-kpi.bad { border-color: rgba(248, 113, 113, 0.4); }
.sub-kpi.warn { border-color: rgba(251, 146, 60, 0.4); }

.sub-kpi.good .sub-kpi-value { color: #34d399; }
.sub-kpi.bad .sub-kpi-value { color: #f87171; }
.sub-kpi.warn .sub-kpi-value { color: #fb923c; }

.sub-scenario {
  grid-column: 1 / -1;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem 1.1rem;
}

.sub-scenario-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.7rem;
}

.sub-scenario-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.9rem;
}

.sub-scenario-row:last-child { border-bottom: none; }

.sub-scenario-row .sr-label { color: #9ca3af; }
.sub-scenario-row .sr-val { font-weight: 600; color: #f9fafb; }
.sub-scenario-row .sr-val.pos { color: #34d399; }
.sub-scenario-row .sr-val.neg { color: #f87171; }
.sub-scenario-row .sr-val.warn { color: #fb923c; }

/* ================== MOBILE / TABLET TUNING ================== */

/* Tablet and down */
@media (max-width: 1024px) {
  .page-inner {
    padding: 1rem 1rem 1.5rem;
  }

  .hero {
    margin-bottom: 1.25rem;
  }

  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .saved-deal-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .top-nav-links {
    display: none !important;
  }

  .sub-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-chip {
    align-self: flex-start;
  }
}

/* Phone: keep everything stacked and tight, no jumping */
@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .page-inner {
    padding: 0.9rem 0.75rem 1.25rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero-tagline {
    font-size: 0.9rem;
  }

  .hero-meta {
    gap: 0.4rem;
  }

  .chip,
  .pill {
    font-size: 0.7rem;
  }

  .auth-panel,
  .auth-feature-card,
  .app-shell,
  .card {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    margin-bottom: 0.7rem;
  }

  .card:last-child {
    margin-bottom: 0;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .metric-grid,
  .subgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .app-tabs {
    width: 100%;
    justify-content: space-between;
    padding: 0.18rem;
  }

  .app-tab {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.3rem;
    font-size: 0.8rem;
  }

  .btn-row {
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .btn-primary,
  .btn-ghost,
  .btn-subtle {
    font-size: 0.8rem;
  }

  /* Prevent “jumpy” feel on tap by disabling hover move on small screens */
  .btn-primary:hover {
    transform: none;
    box-shadow:
      0 12px 30px rgba(15, 23, 42, 0.9),
      0 0 0 1px rgba(56, 189, 248, 0.4);
  }

  /* Improve tap targets and avoid text zoom on iOS */
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="text"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px;
    padding: 0.55rem 0.75rem;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .brand-title {
    font-size: 0.95rem;
    letter-spacing: 0.16em;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }

  .user-email {
    max-width: 140px;
  }
}

/* ================== GOLD ACCENT ENHANCEMENTS ================== */

:root {
  --marlowe-gold: #d4af37;          /* richer metallic gold */
  --marlowe-gold-soft: #e8c86b;     /* warm midtone gold */
  --marlowe-gold-faint: rgba(212, 175, 55, 0.25);
}

/* ===== Body Background ===== */
body {
  background:
    radial-gradient(ellipse at top left, rgba(212, 175, 55, 0.05), transparent 70%),
    radial-gradient(ellipse at bottom right, rgba(212, 175, 55, 0.05), transparent 70%),
    #0f172a;
  background-attachment: fixed;
}

/* ===== Brand Header ===== */
.brand-title {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--marlowe-gold), var(--marlowe-gold-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  color: var(--marlowe-gold-soft);
}

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--marlowe-gold), var(--marlowe-gold-soft));
  border: none;
  color: #111827;
  box-shadow:
    0 4px 14px rgba(212, 175, 55, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(212, 175, 55, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ===== Cards & Headers ===== */
.card h3 {
  color: var(--marlowe-gold);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.section-divider {
  border-color: var(--marlowe-gold-faint);
}

/* ===== Pills / Chips ===== */
.pill span:first-child {
  background: var(--marlowe-gold);
  color: #111827;
  border-radius: 999px;
  padding: 0 0.35rem;
}
.pill.highlight {
  background: var(--marlowe-gold-faint);
  border: 1px solid var(--marlowe-gold-soft);
}
.chip strong {
  color: var(--marlowe-gold);
}

/* ===== Tabs ===== */
.app-tab.active {
  background: linear-gradient(135deg, var(--marlowe-gold), var(--marlowe-gold-soft));
  color: #111827;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* ===== Metrics and Accents ===== */
.metric.emphasis {
  border-color: rgba(212, 175, 55, 0.6);
  background: radial-gradient(circle at top, rgba(212, 175, 55, 0.2), rgba(15, 23, 42, 1));
}
.metric.emphasis .metric-label {
  color: var(--marlowe-gold-soft);
}
.metric.emphasis .metric-value {
  color: #fffbea;
}

/* ===== Highlighted Borders ===== */
.card,
.auth-panel,
.auth-feature-card {
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ===== Gold Glow on Hoverable Areas ===== */
.card:hover,
.auth-feature-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ===== Optional Decorative Rule ===== */
h1, h2 {
  color: #f9fafb;
  border-bottom: 1px solid var(--marlowe-gold-faint);
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ===== Small Device Balance (keeps accents neat) ===== */
@media (max-width: 640px) {
  .btn-primary {
    box-shadow:
      0 4px 12px rgba(212, 175, 55, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  .brand-title {
    font-size: 1rem;
  }
  .card h3 {
    font-size: 0.95rem;
  }
  .app-tab.active {
    box-shadow: none;
  }
}
.plan-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.18rem 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(15, 23, 42, 0.92);
}

.plan-pill.pro {
  border-color: rgba(250, 204, 21, 0.8);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(15, 23, 42, 0.95));
  color: #facc15;
}

.plan-pill.dev {
  border-color: rgba(56, 189, 248, 0.8);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.95));
  color: #e0f2fe;
}

.plan-message {
  opacity: 0.9;
}

/* Locked tab look */
.app-tab.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Optional: make developer toggle look disabled when not allowed */
.toggle-row.locked {
  opacity: 0.5;
}
