:root {
  --bg: #edf1f5;
  --surface: #ffffff;
  --surface-alt: #f7f9fb;
  --text: #111827;
  --muted: #5f6b7a;
  --accent: #0f4c81;
  --accent-strong: #0b3d67;
  --line: #d7dee7;
  --line-strong: #bcc8d4;
  --success: #1a7f53;
  --warning: #9a6700;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #f7f9fc 0%, #edf1f5 220px, #edf1f5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 44px;
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.utility-items {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0 20px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
}

.brand-block {
  min-width: 0;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 68px;
  height: 48px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #ffffff;
}

.brand-copy {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.brand-copy strong {
  display: block;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
}

.header-nav a {
  position: relative;
  padding-bottom: 6px;
  color: #233243;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.header-nav a:hover::after,
.header-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-status {
  display: grid;
  justify-items: end;
  gap: 3px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: end;
  padding: 34px 0 30px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.hero-kicker,
.hero-label,
.summary-key,
.label {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-strip h1 {
  margin: 0 0 10px;
  font-size: clamp(2.25rem, 4.2vw, 3.65rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0;
  max-width: 760px;
  color: #445162;
  font-size: 1.06rem;
  line-height: 1.65;
}

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

.hero-point {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
}

.hero-point:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-point strong {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding-top: 28px;
}

.panel {
  padding: 24px 24px 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 18px;
}

.access-panel {
  align-self: start;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.border-bottom {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0 0 5px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.panel-heading p,
.muted {
  margin: 0;
  color: var(--muted);
}

.access-summary {
  display: grid;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-item:last-child {
  border-bottom: 0;
}

.summary-key {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-value {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-stack {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.form-stack[disabled] {
  opacity: 0.58;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.section-title-row h3 {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-card {
  display: grid;
  gap: 16px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

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

.span-2 {
  grid-column: span 2;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: #2f4052;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input,
.select {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  outline: none;
  appearance: none;
}

.select {
  padding-right: 26px;
  background-image:
    linear-gradient(45deg, transparent 50%, #516274 50%),
    linear-gradient(135deg, #516274 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 8px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.input:focus,
.select:focus {
  border-bottom-color: var(--accent);
}

.select:disabled,
.input:disabled {
  color: #7b8794;
  border-bottom-color: #d9e0e7;
  cursor: not-allowed;
}

.field-note {
  margin: 8px 0 0;
  font-size: 0.84rem;
}

.inline-note,
.subtle-panel {
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.subtle-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.94rem;
}

.action-row {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.cta,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--text);
  cursor: pointer;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cta {
  background: var(--text);
  color: #ffffff;
}

.ghost {
  background: transparent;
  color: var(--text);
}

.cta:hover,
.ghost:hover {
  border-color: var(--accent-strong);
}

.cta:hover {
  background: var(--accent-strong);
}

.ghost:hover {
  color: var(--accent-strong);
}

.cta:disabled,
.ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.feedback-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.quote-card {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.quote-row:first-child {
  padding-top: 0;
}

.quote-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status {
  padding: 14px 16px;
  border-left: 3px solid transparent;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
}

.status.success {
  background: #eef8f2;
  border-left-color: #99d3b4;
  color: var(--success);
}

.status.warning {
  background: #fff6e5;
  border-left-color: #f2c66d;
  color: var(--warning);
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .app-header,
  .hero-strip,
  .app-shell,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .header-status {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  }

  .page-shell {
    width: min(100%, calc(100% - 32px));
  }

  .utility-bar {
    display: none;
  }

  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 0 12px;
  }

  .brand-row {
    gap: 10px;
  }

  .brand-logo {
    width: 58px;
    height: 42px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .header-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 0 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .header-nav a {
    flex: 0 0 auto;
    padding-bottom: 4px;
    font-size: 0.88rem;
  }

  .header-status {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 96px;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .panel {
    padding: 18px 16px 20px;
  }

  .hero-strip {
    gap: 18px;
    padding: 16px 0 18px;
  }

  .hero-strip h1 {
    font-size: 2rem;
    line-height: 1.02;
  }

  .hero-text {
    font-size: 0.97rem;
    line-height: 1.55;
  }

  .hero-side {
    gap: 10px;
  }

  .hero-point {
    padding-bottom: 10px;
  }

  .panel-heading h2,
  .section-title-row h3 {
    font-size: 0.88rem;
  }

  .form-grid,
  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .cta,
  .ghost {
    width: 100%;
  }

  .results-grid {
    gap: 14px;
  }

  .status {
    padding: 12px 14px;
  }
}

@media (max-width: 640px) {
  .header-status,
  .hero-side {
    display: none;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .header-nav {
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    padding-top: 10px;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
  }

  .app-header {
    padding-top: 12px;
  }

  .hero-kicker {
    margin-bottom: 6px;
    font-size: 0.74rem;
  }

  .hero-strip h1 {
    font-size: 1.62rem;
    letter-spacing: -0.03em;
  }

  .hero-text {
    font-size: 0.92rem;
  }

  .panel {
    padding: 16px 14px 18px;
  }

  .panel-heading {
    gap: 8px;
  }

  .panel-heading p {
    font-size: 0.9rem;
  }

  .summary-item {
    padding: 10px 0;
  }

  .input,
  .select {
    padding: 12px 0;
    font-size: 16px;
  }

  .field-note,
  .inline-note,
  .subtle-panel,
  .muted,
  .status {
    font-size: 0.88rem;
  }
}
