:root {
  --ink: #0a2443;
  --paper: #f4efe4;
  --paper-2: #ebe3d2;
  --line: rgba(10, 36, 67, 0.12);
  --gold: #ffb706;
  --gold-ink: #3a2a00;
  --ok: #1b6b45;
  --warn: #9a4a12;
  --muted: #5b6a79;
  --max: 720px;
  --card: #fffc;
  --danger: #9b1c1c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(255, 183, 6, 0.18), transparent 45%),
    radial-gradient(700px 360px at -10% 20%, rgba(10, 36, 67, 0.08), transparent 50%),
    var(--paper);
  font-family: "Schibsted Grotesk", "Segoe UI", sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.ayra {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 680;
  font-size: 20px;
}
.ayra-word {
  font-family: Fraunces, Georgia, serif;
  font-weight: 680;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.pill {
  border: 1px solid var(--line);
  background: #fff8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 680;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.lede {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 42ch;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.progress span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}
.progress span.on { background: var(--ink); }
.progress span.done { background: var(--gold); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 22px 18px;
  backdrop-filter: blur(6px);
}
.card h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.card .hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.grid {
  display: grid;
  gap: 14px;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
  .grid.two { grid-template-columns: 1fr; }
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
label.field span.req::after {
  content: " *";
  color: var(--warn);
}
input, select, textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(255, 183, 6, 0.55);
  border-color: var(--gold);
}
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.choice input { width: auto; accent-color: var(--ink); }

.subcard {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.55);
}
.subcard.hidden { display: none; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
button {
  font: inherit;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
button.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
button.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.ghost { background: transparent; }

.screen { display: none; }
.screen.active { display: block; }

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.notice.warn {
  background: rgba(154, 74, 18, 0.1);
  color: var(--warn);
  border: 1px solid rgba(154, 74, 18, 0.25);
}
.notice.ok {
  background: rgba(27, 107, 69, 0.1);
  color: var(--ok);
  border: 1px solid rgba(27, 107, 69, 0.25);
}
.notice.err {
  background: rgba(155, 28, 28, 0.08);
  color: var(--danger);
  border: 1px solid rgba(155, 28, 28, 0.2);
}

.done-panel {
  text-align: center;
  padding: 40px 20px;
}
.done-panel h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.8rem;
  margin: 0 0 10px;
}
