:root {
  --ink: #172033;
  --muted: #647084;
  --line: #d9e0ea;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --mint: #1f9d8a;
  --coral: #e45d4f;
  --gold: #d89c2b;
  --blue: #356ed8;
  --shadow: 0 18px 55px rgba(23, 32, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcff;
}

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

button,
select,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(217, 224, 234, 0.86);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px) 36px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(31, 157, 138, 0.12), rgba(53, 110, 216, 0.09) 44%, rgba(228, 93, 79, 0.09)),
    #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  color: #465267;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.icon-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-weight: 720;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #aab7c8;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button.compact {
  min-height: 38px;
  padding: 8px 12px;
}

.button.full {
  width: 100%;
}

.icon-button {
  width: 44px;
  font-size: 22px;
}

.network-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 330px;
}

.network-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-visual path {
  fill: none;
  stroke: rgba(23, 32, 51, 0.22);
  stroke-width: 3;
}

.node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 850;
}

.node-a {
  left: 8%;
  top: 18%;
  background: var(--mint);
}

.node-b {
  right: 11%;
  top: 17%;
  background: var(--coral);
}

.node-c {
  left: 24%;
  top: 57%;
  background: var(--gold);
}

.node-d {
  right: 28%;
  bottom: 11%;
  background: var(--blue);
}

.node-e {
  right: 7%;
  bottom: 28%;
  background: #6a55cc;
}

.signal-card {
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: 3;
  display: grid;
  min-width: 158px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

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

.signal-card strong {
  font-size: 46px;
}

.tool-band {
  padding: 28px clamp(16px, 5vw, 72px) 54px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  width: min(740px, 100%);
  margin: 0 auto 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tab {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 730;
}

.tab.active {
  background: var(--ink);
  color: #fff;
}

.panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
}

.panel.active {
  display: block;
}

.panel-focus {
  animation: panelPulse 900ms ease;
}

@keyframes panelPulse {
  0% {
    outline: 0 solid rgba(31, 157, 138, 0);
  }

  35% {
    outline: 4px solid rgba(31, 157, 138, 0.22);
    outline-offset: 6px;
  }

  100% {
    outline: 0 solid rgba(31, 157, 138, 0);
  }
}

.panel-head,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.test-layout,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.question-list,
.result-panel,
.input-card,
.output-card,
.quiz-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(23, 32, 51, 0.06);
}

.question-list {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.quiz-progress {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 14px 16px;
}

.quiz-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.question {
  display: grid;
  gap: 18px;
  min-height: 300px;
  padding: 22px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
}

.completion-card {
  display: grid;
  gap: 16px;
  min-height: 300px;
  align-content: center;
  padding: 26px;
  border: 1px solid #b9e2d9;
  border-radius: 8px;
  background: #f2fbf8;
}

.completion-card h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.completion-card p {
  max-width: 680px;
  margin: 0;
  color: #405064;
  line-height: 1.55;
}

.question legend {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 840;
  line-height: 1.18;
}

.choices {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.choice {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.choice.answered {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.question-hint {
  min-height: 22px;
  margin: 0;
  color: var(--coral);
  font-size: 14px;
  font-weight: 720;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.quiz-nav .button {
  min-width: 128px;
}

.result-panel,
.input-card,
.output-card {
  padding: 18px;
}

.result-panel {
  position: sticky;
  top: 86px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.result-panel.result-ready {
  border-color: var(--mint);
  box-shadow: 0 14px 42px rgba(31, 157, 138, 0.2);
}

.result-label,
.small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.type-result {
  margin: 8px 0 10px;
  font-size: 58px;
  line-height: 1;
  font-weight: 900;
}

#science-note {
  margin-top: 14px;
  line-height: 1.45;
}

.meter {
  overflow: hidden;
  height: 10px;
  margin: 16px 0 8px;
  border-radius: 999px;
  background: #e8edf4;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--blue));
}

.input-card {
  display: grid;
  gap: 14px;
}

#add-member {
  border-style: dashed;
}

label {
  display: grid;
  gap: 7px;
  color: #3a4658;
  font-size: 14px;
  font-weight: 720;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.score {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 34px;
  font-weight: 900;
}

.insight-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  border-left: 4px solid var(--mint);
  padding: 10px 12px;
  background: #f7fafc;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 42px;
  gap: 8px;
  margin-bottom: 10px;
}

.member-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

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

.role-pill {
  border: 1px solid #e3e9f1;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
}

.role-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.content-section {
  padding: 54px clamp(16px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.type-grid,
.seo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.type-card,
.seo-grid article {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.type-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.type-card p,
.seo-grid p,
.output-card p {
  color: var(--muted);
  line-height: 1.55;
}

.disclaimer {
  margin: 34px clamp(16px, 5vw, 72px);
  border: 1px solid #ead7a2;
  border-radius: 8px;
  padding: 16px;
  background: #fff9e8;
  color: #5d4a19;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(16px, 5vw, 72px);
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero,
  .test-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .network-visual {
    min-height: 300px;
  }

  .result-panel {
    position: static;
  }

  .type-grid,
  .seo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    flex-direction: column;
  }

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

  .member-row {
    grid-template-columns: 1fr;
  }

  .role-grid,
  .type-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .node {
    width: 66px;
    height: 66px;
    font-size: 13px;
  }
}
