:root {
  --bg-top: #d7e9fb;
  --bg-bottom: #a9ccee;
  --bg-panel: rgba(247, 251, 255, 0.82);
  --bg-panel-strong: rgba(236, 245, 254, 0.96);
  --bg-deep: #0f4f87;
  --bg-accent: #2e75bc;
  --bg-accent-soft: #dcecff;
  --ink: #15314f;
  --muted: #567392;
  --line: rgba(24, 67, 108, 0.12);
  --line-strong: rgba(24, 67, 108, 0.2);
  --success: #1f8a63;
  --warn: #b86b1d;
  --shadow: 0 24px 70px rgba(20, 62, 99, 0.18);
  --radius-hero: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.86), transparent 26%),
    radial-gradient(circle at bottom right, rgba(121, 174, 224, 0.45), transparent 25%),
    linear-gradient(150deg, var(--bg-top), var(--bg-bottom));
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
strong,
span {
  margin: 0;
}

.page-shell {
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  border-radius: var(--radius-hero);
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(15, 79, 135, 0.96), rgba(47, 115, 188, 0.88)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%);
  color: white;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-panel);
}

.hero-grid,
.workspace-grid,
.analysis-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 1.25fr 0.75fr;
  align-items: stretch;
}

.workspace-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-top: 18px;
}

.saved-grid {
  grid-template-columns: 1.15fr 0.85fr;
  scroll-margin-top: 20px;
}

.analysis-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.lower-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.hero-copy-stack {
  display: grid;
  align-content: start;
  gap: 16px;
}

.hero-aside {
  display: grid;
  gap: 14px;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.highlight-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
}

.highlight-card strong {
  font-size: 1.2rem;
  line-height: 1.18;
}

.hero-card-label,
.mini-card span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.mini-card {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 120px;
}

.mini-card strong {
  font-size: 2rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(223, 239, 255, 0.88);
}

.panel .eyebrow {
  color: var(--bg-accent);
}

h1 {
  max-width: 920px;
  font-size: clamp(2.1rem, 3.8vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.16rem, 2vw, 1.62rem);
  line-height: 1.08;
}

h3 {
  font-size: 1rem;
}

.hero-copy,
.section-copy,
.status-line,
.parse-notes,
.workflow-list,
.field-help,
.insight-body,
.saved-empty,
.saved-meta,
.saved-footer,
.mini-stat span,
.note-callout p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy,
.hero-card p,
.hero-summary-lines {
  color: rgba(244, 249, 255, 0.92);
}

.hero-tagline {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.98);
}

.hero-copy {
  max-width: 800px;
  font-size: 1.03rem;
}

.hero-summary-lines {
  display: grid;
  gap: 8px;
  max-width: 880px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.hero-summary-lines strong {
  color: white;
}

.paste-panel,
.utility-panel {
  background: var(--bg-panel-strong);
}

.listing-input {
  width: 100%;
  min-height: 250px;
  margin-top: 18px;
  padding: 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(30, 87, 138, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.95));
  color: var(--ink);
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.listing-input:focus,
input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(54, 131, 204, 0.2);
  border-color: rgba(54, 131, 204, 0.5);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.product-nav-row {
  margin-top: 8px;
}

.product-nav-row .active {
  color: white;
  background: linear-gradient(135deg, #1f67af, #0d4e87);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 24px rgba(20, 73, 122, 0.18);
}

.utility-actions {
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.ghost-button,
.tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.tiny-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #1f67af, #0d4e87);
  box-shadow: 0 12px 24px rgba(20, 73, 122, 0.22);
}

.secondary-button {
  color: var(--bg-deep);
  background: linear-gradient(135deg, #eef6ff, #d9ebff);
  border-color: rgba(30, 92, 143, 0.16);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(21, 49, 79, 0.12);
}

.tiny-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--bg-deep);
  border-color: rgba(30, 92, 143, 0.12);
}

.status-line {
  min-height: 24px;
  margin-top: 14px;
}

.summary-panel,
.note-stack {
  display: grid;
  gap: 14px;
}

.deal-photo-frame {
  overflow: hidden;
  min-height: 180px;
  max-height: 240px;
  border-radius: 24px;
  border: 1px solid rgba(37, 98, 152, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 243, 255, 0.94));
}

.deal-photo-preview {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(231, 242, 255, 0.95));
  border: 1px solid rgba(38, 95, 148, 0.12);
}

.mini-stat span {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
  color: var(--bg-deep);
}

.parse-notes,
.workflow-list {
  padding-left: 20px;
}

.parse-notes li + li,
.workflow-list li + li {
  margin-top: 8px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.deal-input-panel {
  margin-top: 18px;
  background:
    radial-gradient(circle at top right, rgba(72, 194, 142, 0.22), transparent 28%),
    linear-gradient(160deg, rgba(235, 253, 243, 0.98), rgba(214, 245, 225, 0.97));
  border-color: rgba(31, 138, 99, 0.18);
}

.deal-input-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.deal-input-panel .eyebrow,
.deal-input-panel h2 {
  color: #136847;
}

.deal-input-panel .section-copy {
  color: #376b55;
}

.deal-input-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.deal-input-panel input {
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(19, 104, 71, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(35, 113, 74, 0.06);
}

.executive-panel {
  margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(242, 248, 255, 0.98), rgba(230, 242, 255, 0.95)),
    radial-gradient(circle at top right, rgba(61, 173, 149, 0.12), transparent 26%);
}

.executive-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.executive-heading {
  display: grid;
  gap: 10px;
}

.executive-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(22, 92, 144, 0.12);
  color: var(--bg-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.executive-dashboard {
  margin-top: 18px;
}

.executive-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.executive-score-shell {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(22, 92, 144, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.executive-score-shell.tone-a,
.executive-score-shell.tone-b {
  background:
    radial-gradient(circle at top right, rgba(79, 209, 147, 0.28), transparent 32%),
    linear-gradient(160deg, rgba(245, 255, 250, 0.98), rgba(224, 246, 235, 0.96));
}

.executive-score-shell.tone-c,
.executive-score-shell.tone-d {
  background:
    radial-gradient(circle at top right, rgba(255, 190, 85, 0.24), transparent 32%),
    linear-gradient(160deg, rgba(255, 252, 244, 0.98), rgba(255, 241, 220, 0.96));
}

.executive-score-shell.tone-f,
.executive-score-shell.tone-na {
  background:
    radial-gradient(circle at top right, rgba(114, 146, 183, 0.18), transparent 32%),
    linear-gradient(160deg, rgba(248, 251, 255, 0.98), rgba(232, 241, 252, 0.96));
}

.executive-score-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.executive-score-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.executive-score-value {
  display: block;
  margin-top: 8px;
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--bg-deep);
}

.executive-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 82px;
  padding: 10px;
  border-radius: 24px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.executive-grade-badge.grade-a {
  color: #0f6840;
  background: linear-gradient(180deg, rgba(225, 252, 236, 0.98), rgba(183, 237, 203, 0.96));
}

.executive-grade-badge.grade-b {
  color: #0d5a82;
  background: linear-gradient(180deg, rgba(230, 247, 255, 0.98), rgba(193, 228, 247, 0.96));
}

.executive-grade-badge.grade-c,
.executive-grade-badge.grade-d {
  color: #9a5a08;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.98), rgba(248, 224, 170, 0.96));
}

.executive-grade-badge.grade-f,
.executive-grade-badge.grade-na {
  color: #4f6781;
  background: linear-gradient(180deg, rgba(239, 245, 252, 0.98), rgba(214, 226, 240, 0.96));
}

.executive-score-verdict {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
}

.executive-score-subnote {
  color: var(--muted);
  line-height: 1.6;
}

.executive-detail-stack {
  display: grid;
  gap: 14px;
}

.executive-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.executive-stat-card {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(37, 98, 152, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 242, 255, 0.94));
}

.executive-stat-card span {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.executive-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
  line-height: 1.08;
  color: var(--bg-deep);
}

.executive-stat-card.mint {
  background: linear-gradient(180deg, rgba(239, 254, 246, 0.98), rgba(222, 247, 236, 0.95));
}

.executive-stat-card.sky {
  background: linear-gradient(180deg, rgba(239, 249, 255, 0.98), rgba(221, 238, 251, 0.95));
}

.executive-stat-card.gold {
  background: linear-gradient(180deg, rgba(255, 250, 238, 0.98), rgba(248, 236, 207, 0.95));
}

.executive-stat-card.violet {
  background: linear-gradient(180deg, rgba(245, 244, 255, 0.98), rgba(228, 226, 251, 0.95));
}

.executive-stat-card.slate {
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(227, 236, 247, 0.95));
}

.executive-stat-card.amber {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98), rgba(255, 232, 202, 0.95));
}

.executive-factor-list {
  display: grid;
  gap: 12px;
}

.executive-factor-row {
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(37, 98, 152, 0.1);
}

.executive-factor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.executive-factor-head h3 {
  color: var(--bg-deep);
}

.executive-factor-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.executive-factor-head strong {
  color: var(--bg-deep);
  white-space: nowrap;
}

.executive-factor-track {
  position: relative;
  overflow: hidden;
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(194, 212, 232, 0.55);
}

.executive-factor-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #23c38d, #34a7db);
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.field-help {
  font-size: 0.74rem;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(28, 79, 124, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric-card {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(232, 243, 255, 0.94));
  border: 1px solid rgba(37, 98, 152, 0.11);
}

.metric-card.good {
  background: linear-gradient(180deg, rgba(238, 252, 246, 0.98), rgba(226, 247, 238, 0.95));
  border-color: rgba(31, 138, 99, 0.16);
}

.metric-card.warn {
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 241, 224, 0.96));
  border-color: rgba(184, 107, 29, 0.18);
}

.metric-card h3 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.24rem;
  line-height: 1.08;
  color: var(--bg-deep);
}

.metric-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.insight-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.insight-card {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 242, 255, 0.94));
  border: 1px solid rgba(37, 98, 152, 0.12);
}

.insight-card h3 {
  color: var(--bg-deep);
}

.insight-body {
  margin-top: 8px;
}

.saved-properties-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.saved-property-card,
.note-callout {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 242, 255, 0.95));
  border: 1px solid rgba(37, 98, 152, 0.12);
}

.saved-property-card {
  display: grid;
  gap: 10px;
}

.saved-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.saved-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--bg-deep);
}

.saved-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.9rem;
}

.saved-footer {
  font-size: 0.84rem;
}

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

.saved-chip-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.saved-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(218, 235, 255, 0.95);
  border: 1px solid rgba(37, 98, 152, 0.12);
  color: var(--bg-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.saved-score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  border: 1px solid transparent;
}

.saved-score-chip.grade-a {
  color: #0f6840;
  background: rgba(218, 247, 229, 0.96);
  border-color: rgba(31, 138, 99, 0.14);
}

.saved-score-chip.grade-b {
  color: #0d5a82;
  background: rgba(220, 240, 252, 0.96);
  border-color: rgba(22, 92, 144, 0.14);
}

.saved-score-chip.grade-c,
.saved-score-chip.grade-d {
  color: #9a5a08;
  background: rgba(255, 241, 210, 0.96);
  border-color: rgba(184, 107, 29, 0.14);
}

.saved-score-chip.grade-f,
.saved-score-chip.grade-na {
  color: #4f6781;
  background: rgba(231, 239, 247, 0.96);
  border-color: rgba(79, 103, 129, 0.12);
}

.saved-empty {
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(37, 98, 152, 0.2);
}

.note-callout {
  display: grid;
  gap: 8px;
}

.note-callout strong {
  color: var(--bg-deep);
}

@media (max-width: 1180px) {
  .hero-grid,
  .workspace-grid,
  .saved-grid,
  .analysis-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .executive-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 920px) {
  .deal-input-grid,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-head,
  .executive-factor-head {
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100%, calc(100% - 18px));
    padding-top: 18px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .hero-mini-grid,
  .deal-input-grid,
  .field-grid,
  .metric-grid,
  .executive-stat-grid {
    grid-template-columns: 1fr;
  }

  .action-row,
  .saved-actions,
  .saved-header,
  .executive-score-top {
    flex-direction: column;
  }
}
