:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --surface: #ffffff;
  --surface-soft: #f7f5ee;
  --ink: #141a1f;
  --ink-soft: #2b343d;
  --muted: #69737c;
  --line: #ded8ca;
  --line-strong: #c8bfad;
  --navy: #132238;
  --green: #166c55;
  --green-soft: #e4f2ec;
  --red: #b6403c;
  --red-soft: #fae8e5;
  --gold: #a87522;
  --gold-soft: #f7ead1;
  --blue: #275c9b;
  --shadow: 0 18px 44px rgba(29, 35, 41, 0.1);
  --shadow-strong: 0 28px 70px rgba(19, 34, 56, 0.2);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(20, 26, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 26, 31, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 26px;
}

.hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  min-height: 190px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(19, 34, 56, 0.97), rgba(20, 26, 31, 0.98)),
    var(--navy);
  box-shadow: var(--shadow-strong);
  color: #fff;
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 260px;
  height: 88px;
  border-top: 1px solid rgba(218, 180, 112, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(244, 215, 155, 0.09) 58% 59%, transparent 59%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 46px);
  pointer-events: none;
}

.brand-lockup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 930px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(218, 180, 112, 0.75);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #f4d79b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f4d79b;
}

.hero h1 {
  margin: 5px 0 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.55;
}

.domain-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f6e2b6;
  padding: 7px 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

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

.summary-strip div {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.summary-strip div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gold);
}

.summary-strip span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.input-panel,
.result-panel {
  display: grid;
  gap: 14px;
}

.result-panel {
  position: sticky;
  top: 18px;
}

.section-card,
.score-card,
.chart-card,
.score-breakdown,
.metric-card,
.recommendation-box,
.risk-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.section-card {
  padding: 18px;
}

.section-card,
.metric-card,
.chart-card,
.score-breakdown,
.risk-section,
.recommendation-box {
  backdrop-filter: blur(10px);
}

.section-card:first-child {
  border-top: 4px solid var(--gold);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading.flat {
  margin-bottom: 12px;
}

.section-heading h2,
.chart-card h2,
.risk-section h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 92, 155, 0.16);
}

.field:hover input,
.field:hover select,
.field:hover .money-input {
  border-color: var(--gold);
}

.money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.money-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 92, 155, 0.16);
}

.money-input input {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.money-input span {
  min-width: 38px;
  padding-right: 12px;
  color: var(--gold);
  font-weight: 950;
  text-align: right;
}

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

.research-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.research-grid a::after {
  content: "↗";
  color: var(--gold);
  font-size: 14px;
}

.research-grid a:hover {
  border-color: rgba(168, 117, 34, 0.55);
  background: #fff;
  box-shadow: 0 10px 24px rgba(19, 34, 56, 0.1);
  transform: translateY(-2px);
}

.score-card {
  padding: 20px;
  background:
    linear-gradient(150deg, rgba(19, 34, 56, 0.96), rgba(20, 26, 31, 0.99)),
    var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(244, 215, 155, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 18px);
}

.score-card > * {
  position: relative;
  z-index: 1;
}

.score-card .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.score-orbit {
  --score: 0deg;
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  margin: 18px auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #152338 0 53%, transparent 54%),
    conic-gradient(var(--green) 0 var(--score), rgba(255, 255, 255, 0.14) var(--score) 360deg);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.score-orbit::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(244, 215, 155, 0.42);
  border-radius: 50%;
}

.score-orbit span {
  color: #fff;
  font-size: 58px;
  font-weight: 950;
  line-height: 1;
}

.score-orbit small {
  position: absolute;
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 900;
}

.score-card strong {
  display: block;
  color: #fff;
  font-size: 22px;
  text-align: center;
}

.score-track {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: 330px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.score-track i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}

.status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 950;
}

.status-pill.good {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.bad {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.warn {
  background: var(--gold-soft);
  color: var(--gold);
}

.chart-card,
.score-breakdown,
.risk-section {
  padding: 15px;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bar-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.score-bar-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-bar-card strong {
  font-size: 14px;
}

.score-bar-card span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 950;
}

.score-bar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.score-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e0d4;
}

.score-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.radar-chart {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  filter: drop-shadow(0 16px 26px rgba(19, 34, 56, 0.12));
}

.radar-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.radar-area {
  fill: rgba(22, 108, 85, 0.28);
  stroke: var(--green);
  stroke-width: 3;
}

.radar-point {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 3;
}

.radar-center {
  fill: var(--gold);
}

.radar-label {
  fill: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
}

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

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 15px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.metric-card strong {
  align-self: end;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1;
}

.recommendation-box {
  display: grid;
  gap: 9px;
  min-height: 78px;
  border-left: 5px solid var(--gold);
  padding: 15px;
}

.recommendation-box.good {
  border-left-color: var(--green);
  background: #fbfffc;
}

.recommendation-box.bad {
  border-left-color: var(--red);
  background: #fffafa;
}

.recommendation-box.warn {
  border-left-color: var(--gold);
}

.recommendation-box strong {
  color: var(--ink);
  font-size: 15px;
}

.recommendation-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.risk-list {
  display: grid;
  gap: 10px;
}

.risk-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.risk-item div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-item strong {
  font-size: 14px;
}

.risk-item span {
  color: var(--gold);
  font-weight: 950;
}

.risk-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.risk-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e0d4;
}

.risk-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}

@media (max-width: 1120px) {
  .hero {
    min-height: auto;
    flex-direction: column;
  }

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

  .result-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .hero {
    padding: 18px;
  }

  .hero::after {
    display: none;
  }

  .brand-lockup,
  .summary-strip,
  .field-grid,
  .research-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  .domain-link {
    justify-content: center;
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-chip {
    width: 100%;
  }
}
