:root {
  --bg: #eef6f6;
  --bg2: #f7fbfb;
  --card: rgba(255,255,255,.92);
  --text: #10242a;
  --muted: #61737a;
  --line: #dfe9ea;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --primary-soft: #e1f4f1;
  --accent: #2f80ed;
  --warning-bg: #fff7ed;
  --warning-line: #fed7aa;
  --ok-soft: #ecfdf3;
  --shadow: 0 22px 60px rgba(15, 62, 66, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 118, 110, .18), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(47, 128, 237, .12), transparent 32%),
    linear-gradient(180deg, #f2fbfa 0%, #f7fbfb 46%, #edf5f5 100%);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(247, 251, 251, .75);
  border-bottom: 1px solid rgba(223,233,234,.7);
}
.site-header-inner {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -.02em;
  font-size: 22px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
}
.brand-lockup {
  display: block;
  height: 34px;
  width: auto;
}
.brand-text {
  display:none;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.site-nav a:hover { color: var(--primary); }

.container {
  width: min(980px, calc(100% - 32px));
  margin: 34px auto 48px;
}
.card {
  background: var(--card);
  border: 1px solid rgba(223, 233, 234, .92);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.hero { overflow: hidden; position: relative; }
.hero:before {
  content: "";
  position: absolute;
  right: -140px;
  top: -160px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(15,118,110,.12), transparent 64%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: stretch;
}
.hero-panel {
  border-radius: 22px;
  border: 1px solid rgba(15,118,110,.15);
  background: linear-gradient(180deg, rgba(225,244,241,.9), rgba(255,255,255,.76));
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: center;
}
.stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(223,233,234,.9);
}
.stat strong { display:block; font-size: 30px; line-height: 1; color: var(--primary); letter-spacing: -.04em; }
.stat span { display:block; color: var(--muted); font-size: 14px; margin-top: 5px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .01em;
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 8vw, 72px);
  letter-spacing: -.07em;
  line-height: .96;
}
h2 { margin: 0 0 16px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
h3 { margin: 28px 0 10px; font-size: 22px; letter-spacing: -.03em; }
.lead { font-size: clamp(18px, 2vw, 22px); color: #29464c; max-width: 690px; margin: 0 0 18px; }
.step-intro { font-size: 18px; color: #29464c; }
.muted { color: var(--muted); font-size: 14px; }
.notice, .warning, .ok {
  border-radius: 18px;
  padding: 15px 17px;
  margin: 16px 0;
}
.notice { background: #eff8ff; border: 1px solid #cfeafe; color: #16445d; }
.warning { background: var(--warning-bg); border: 1px solid var(--warning-line); color: #6f3b0b; }
.ok { background: var(--ok-soft); border: 1px solid #bbf7d0; color: #14532d; }

.progress-wrap { margin: 28px 0 8px; }
.progress-label {
  display:flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.progress {
  height: 12px;
  background: rgba(16,36,42,.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .3s ease;
}

.step { display: none; animation: fadeIn .22s ease; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display:block; font-weight: 800; margin: 15px 0 7px; color: #20383e; }
input, select, textarea {
  width: 100%;
  border: 1px solid #ccdadd;
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(255,255,255,.9);
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(15,118,110,.72);
  box-shadow: 0 0 0 4px rgba(15,118,110,.12);
  background: #fff;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #14998f);
  color: #fff;
  font-weight: 850;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  min-height: 50px;
  box-shadow: 0 10px 24px rgba(15,118,110,.22);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(15,118,110,.26); }
button:disabled { opacity: .62; cursor: progress; transform: none; }
button.secondary, .button.secondary {
  background: rgba(255,255,255,.78);
  color: #1a3036;
  border: 1px solid #d7e2e4;
  box-shadow: none;
}
button.secondary:hover, .button.secondary:hover { background: #fff; }
button.choice {
  background: #fff;
  color: var(--text);
  border: 1px solid #d2dee0;
  box-shadow: 0 8px 20px rgba(16,36,42,.04);
}
button.choice:hover { border-color: var(--primary); }
button.choice.selected, .shapeBtn.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.actions {
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}
.wordbox {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.wordbox strong {
  display:flex;
  min-height: 58px;
  align-items:center;
  justify-content:center;
  border-radius: 18px;
  border: 1px solid #d7e5e5;
  background: linear-gradient(180deg, #ffffff, #f5fbfa);
  font-size: 20px;
}
.shapes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.shapeBtn { justify-content: flex-start; text-align: left; }
.clockTask {
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.66);
  border: 1px solid #dfe9ea;
}

#resultSection { animation: fadeIn .22s ease; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.result-item {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #dfe9ea;
  background: linear-gradient(180deg, #ffffff, #f7fbfb);
  box-shadow: 0 10px 22px rgba(16,36,42,.04);
}
.result-item:first-child {
  grid-column: span 1;
  background: linear-gradient(145deg, #0f766e, #2f80ed);
  color: white;
}
.result-item:first-child .muted { color: rgba(255,255,255,.75); }
.big-score { font-size: 46px; font-weight: 900; letter-spacing: -.06em; line-height: 1; margin: 6px 0 10px; }
#emailSaveBox, #tokenSaveBox {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(15,118,110,.18);
  background: var(--primary-soft);
  margin-top: 20px;
}

.chart-wrap {
  padding: 18px;
  border: 1px solid #dfe9ea;
  border-radius: 22px;
  background: #fff;
  margin: 20px 0 26px;
}
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px #dfe9ea;
}
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid #eef2f3; }
th { background: #f4faf9; color: #29464c; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }

.site-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 42px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 780px) {
  .site-header-inner { min-height: 64px; }
  .brand-lockup { height: 30px; }
  .hero-grid, .grid, .grid3, .result-grid, .shapes, .wordbox { grid-template-columns: 1fr; }
  .hero-panel { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 12px; }
  .stat strong { font-size: 24px; }
  table { display:block; overflow-x:auto; white-space: nowrap; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 20px, 980px); margin-top: 18px; }
  .card { border-radius: 20px; padding: 20px; }
  .hero-panel { grid-template-columns: 1fr; }
  .site-nav { display:none; }
  button, .button { width: 100%; }
  .actions { width: 100%; }
}
