*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(47, 124, 246, 0.18), transparent 62%),
    radial-gradient(600px 400px at 100% 0%, rgba(255, 159, 67, 0.08), transparent 70%),
    var(--bg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

#app {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header,
.site-footer,
main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--pad) 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  filter: drop-shadow(0 6px 16px rgba(47, 124, 246, 0.35));
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  letter-spacing: 0.02em;
}

.brand-text strong {
  font-size: 18px;
}

.brand-text small {
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

main {
  flex: 1;
  padding: 8px var(--pad) 40px;
}

.stage {
  animation: stage-in 0.28s ease both;
}

.hidden {
  display: none !important;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: var(--gap);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.lead {
  margin-bottom: 16px;
  color: var(--ink-dim);
  font-size: 16px;
}

.muted {
  color: var(--ink-dim);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.strong {
  color: var(--ink);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.choice:focus-visible,
.visa-card:focus-visible {
  outline: 3px solid rgba(127, 178, 255, 0.75);
  outline-offset: 3px;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2f7cf6, #4f9bff);
  color: #fff;
  box-shadow: 0 10px 26px rgba(47, 124, 246, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b86fb, #66a9ff);
}

.btn-ghost {
  background: transparent;
}

.btn-small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.btn-danger {
  border-color: rgba(255, 93, 93, 0.35);
  background: var(--danger-soft);
  color: #ffb3b3;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.visa-grid {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.visa-card {
  display: block;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.visa-card:hover {
  border-color: rgba(127, 178, 255, 0.5);
  background: rgba(47, 124, 246, 0.08);
}

.visa-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.visa-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.visa-card h3 {
  margin: 0;
}

.visa-card .tag {
  flex: none;
}

.visa-card p {
  margin: 6px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.tag-accent {
  background: var(--accent-soft);
  color: #9cc3ff;
}

.tag-warn {
  background: var(--accent-2-soft);
  color: #ffc98c;
}

.tag-ok {
  background: rgba(53, 200, 138, 0.14);
  color: #86e6bd;
}

.tag-danger {
  background: var(--danger-soft);
  color: #ffaaaa;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7fb2ff);
  transition: width 0.25s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-dim);
  font-size: 12px;
}

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

.field:first-of-type {
  border-top: 0;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 650;
}

.field-hint {
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 12px;
}

.field-error {
  margin: 8px 0 0;
  color: #ffaaaa;
  font-size: 13px;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.choice:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

.choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice-dot {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.choice.is-selected .choice-dot {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.gauge {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 6px 0 4px;
}

.gauge-value {
  font-size: clamp(30px, 9vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.gauge-unit {
  color: var(--ink-dim);
  font-size: 14px;
  white-space: nowrap;
}

.band-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

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

.dimension-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 14px;
}

.dimension-head span:last-child {
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7cf6, #7fb2ff);
}

.bar-fill.is-low {
  background: linear-gradient(90deg, #d9822b, var(--accent-2));
}

.bar-fill.is-high {
  background: linear-gradient(90deg, #22a06b, var(--ok));
}

.redline-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.redline {
  padding: 16px;
  border: 1px solid rgba(255, 93, 93, 0.35);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
}

.redline h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffb3b3;
}

.redline h3 svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.redline p {
  margin: 6px 0;
  font-size: 14px;
}

.section-title {
  margin-top: 26px;
}

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

.risk-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.risk-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-card ul,
.materials ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.risk-card li,
.materials li {
  margin: 4px 0;
  color: var(--ink-dim);
  font-size: 14px;
}

.materials {
  margin-top: 12px;
}

.materials h3 {
  margin-bottom: 4px;
}

.interview-question {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(47, 124, 246, 0.12), rgba(47, 124, 246, 0.03));
}

.interview-question h2 {
  margin-bottom: 0;
}

.plain-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--ink-dim);
}

.plain-list li {
  margin: 6px 0;
}

.feedback h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.feedback h4:first-child {
  margin-top: 0;
}

.feedback .notice {
  margin: 8px 0;
}

.answer-box {
  width: 100%;
  min-height: 130px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  resize: vertical;
}

.answer-box:focus {
  outline: 2px solid rgba(127, 178, 255, 0.7);
  outline-offset: 1px;
}

.feedback {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.feedback h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.feedback ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.feedback li {
  margin: 3px 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.feedback-good {
  border-color: rgba(53, 200, 138, 0.3);
}

.feedback-warn {
  border-color: rgba(255, 176, 32, 0.4);
}

.notice {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-dim);
  font-size: 13px;
}

.notice-warn {
  border-color: rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.08);
  color: #ffd28c;
}

.notice-danger {
  border-color: rgba(255, 93, 93, 0.35);
  background: var(--danger-soft);
  color: #ffb3b3;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer {
  padding: 20px var(--pad) 30px;
  color: var(--ink-faint);
  font-size: 12px;
}

.site-footer p {
  margin: 0 0 6px;
}

.footer-meta {
  color: var(--ink-faint);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 10;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--danger);
  color: #1a0505;
  text-align: center;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: calc(100vw - 40px);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #12263f;
  box-shadow: var(--shadow);
  font-size: 13px;
  transform: translateX(-50%);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 22px;
}

.saved-box {
  margin: 16px 0;
}

.saved-box p {
  margin: 4px 0 10px;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.step p {
  margin: 2px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.step-num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #9cc3ff;
  font-size: 13px;
  font-weight: 700;
}

.profile-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-top .btn {
  flex: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.field-list {
  margin-top: 8px;
}

fieldset.field {
  min-width: 0;
  margin: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

fieldset.field legend {
  padding: 0;
}

.field[data-error="true"] {
  padding-right: 12px;
  padding-left: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 93, 93, 0.06);
}

.notice + .notice {
  margin-top: 12px;
}

.notice strong {
  color: var(--ink);
}

@media (min-width: 640px) {
  .visa-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
