:root {
  color-scheme: light;
  --page-bg: linear-gradient(180deg, #f4efe7 0%, #eef2f6 48%, #f8fafc 100%);
  --page-accent: rgba(103, 89, 69, 0.08);
  --panel-bg: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-border: rgba(33, 45, 62, 0.1);
  --panel-shadow: 0 24px 70px rgba(24, 39, 75, 0.08);
  --text-strong: #17202d;
  --text-muted: #556375;
  --text-soft: #778395;
  --accent: #1e5f74;
  --accent-soft: rgba(30, 95, 116, 0.1);
  --success: #1f7a47;
  --success-bg: rgba(31, 122, 71, 0.12);
  --warning: #a76115;
  --warning-bg: rgba(167, 97, 21, 0.13);
  --danger: #ab3f3f;
  --danger-bg: rgba(171, 63, 63, 0.12);
  --complex: #6b59a5;
  --complex-bg: rgba(107, 89, 165, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-heading: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eef2f5;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(30, 95, 116, 0.1), transparent 28%),
    radial-gradient(circle at left center, rgba(103, 89, 69, 0.12), transparent 22%),
    var(--page-bg);
  color: var(--text-strong);
  font-family: var(--font-body);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 4px 20px;
}

.site-header__meta h1,
.hero-panel h2,
.result-shell h2,
.result-placeholder h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-header__meta h1 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #163e52 0%, #2c6c83 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: white;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-main {
  display: grid;
  gap: 24px;
}

.hero-panel,
.app-card,
.panel,
.metric-card,
.note-card,
.result-placeholder {
  backdrop-filter: blur(10px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: calc(var(--radius-lg) + 4px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 253, 0.78)),
    var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -25% auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(30, 95, 116, 0.12), transparent 72%);
  pointer-events: none;
}

.hero-panel h2 {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 0.95;
  max-width: 10ch;
}

.hero-panel__lead {
  max-width: 56rem;
  margin: 18px 0 12px;
  color: var(--text-strong);
  font-size: clamp(1rem, 2.1vw, 1.22rem);
  line-height: 1.7;
}

.hero-panel__note,
.site-footer p,
.field__hint,
.panel-heading p,
.result-placeholder__note,
.copy-feedback {
  color: var(--text-muted);
  line-height: 1.65;
}

.internal-banner {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(30, 95, 116, 0.12);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.app-card {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: var(--panel-shadow);
}

.app-card__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 10px;
}

.panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h3,
.result-section h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.panel-heading--optional {
  margin-top: 24px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field--optional .field__label::after {
  content: " optional";
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 500;
}

.field__label {
  font-size: 0.96rem;
  font-weight: 700;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(21, 37, 59, 0.12);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  color: var(--text-strong);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.text-input:focus,
.select-input:focus {
  outline: none;
  border-color: rgba(30, 95, 116, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 95, 116, 0.12);
  transform: translateY(-1px);
}

.form-toolbar,
.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #173b48 0%, #29657a 100%);
  box-shadow: 0 14px 24px rgba(30, 95, 116, 0.18);
  color: white;
  font-weight: 700;
}

.secondary-button {
  background: rgba(23, 59, 72, 0.06);
  color: #173b48;
  font-weight: 700;
}

.ghost-button {
  border-color: rgba(21, 37, 59, 0.12);
  background: transparent;
  color: var(--text-strong);
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.panel--result {
  background:
    linear-gradient(180deg, rgba(246, 249, 251, 0.84), rgba(255, 255, 255, 0.98)),
    var(--panel-solid);
}

.result-placeholder,
.result-shell {
  height: 100%;
}

.result-placeholder {
  display: grid;
  align-content: start;
  gap: 12px;
}

.result-placeholder h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.result-shell {
  display: grid;
  gap: 20px;
}

.result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.result-header__copy p,
.note-card p,
.result-list li {
  margin: 0;
  line-height: 1.68;
}

.result-header__copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  margin-bottom: 10px;
}

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

.metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(21, 37, 59, 0.08);
  border-radius: var(--radius-md);
  background: #fbfcfd;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 1rem;
  line-height: 1.45;
}

.result-section {
  display: grid;
  gap: 10px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.1rem;
}

.note-card {
  padding: 18px;
  border: 1px solid rgba(21, 37, 59, 0.08);
  border-radius: var(--radius-md);
  background: #f8fafb;
}

.copy-feedback {
  min-height: 1.3rem;
  margin: -6px 0 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--blocked {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-badge--needs-setup {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge--complex {
  background: var(--complex-bg);
  color: var(--complex);
}

.status-badge--ready-soon {
  background: var(--success-bg);
  color: var(--success);
}

.site-footer {
  padding: 22px 4px 0;
}

@media (max-width: 1024px) {
  .app-card__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 1200px);
    padding-top: 18px;
  }

  .panel,
  .hero-panel {
    padding: 22px;
  }

  .field-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }
}
