:root {
  --paper: #f8f5ef;
  --paper-soft: #fffdf8;
  --ink: #171717;
  --muted: #6c6861;
  --line: #ded8cf;
  --line-dark: #bdb6ab;
  --bloom: #dcefdc;
  --bloom-ink: #315f3b;
  --blaze: #f7d9cd;
  --blaze-ink: #8c3e28;
  --anchor: #efe1bd;
  --anchor-ink: #6a5527;
  --edge: #e6e6e4;
  --edge-ink: #4d4d4b;
  --tide: #dceaf4;
  --tide-ink: #295c78;
  --focus: #111111;
  --shadow: 0 18px 50px rgba(31, 28, 23, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.48;
}

button,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.72);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(222, 216, 207, 0.82);
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.78rem;
}

.hero,
.section-block,
.result-section,
.site-footer {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding-right: 18px;
  padding-left: 18px;
}

.hero {
  display: flex;
  min-height: calc(82vh - 58px);
  flex-direction: column;
  justify-content: center;
  padding-top: 62px;
  padding-bottom: 34px;
}

.hero-inner {
  max-width: 620px;
}

.brand-word {
  margin: 0 0 26px;
  font-size: 1rem;
  font-weight: 900;
}

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

.hero h1 {
  margin-bottom: 18px;
  font-family:
    Georgia, "Times New Roman", Times, serif;
  font-size: 3.25rem;
  font-weight: 500;
  line-height: 0.96;
}

.hero-copy {
  max-width: 360px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.primary-action {
  background: var(--ink);
  color: var(--paper-soft);
}

.secondary-action {
  border: 1px solid var(--line-dark);
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.primary-action.small,
.secondary-action.small {
  width: 100%;
  min-height: 46px;
  padding-right: 16px;
  padding-left: 16px;
}

.element-strip {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 52px;
}

.element-strip span {
  height: 7px;
  border-radius: 999px;
}

.strip-bloom {
  background: var(--bloom);
}

.strip-blaze {
  background: var(--blaze);
}

.strip-anchor {
  background: var(--anchor);
}

.strip-edge {
  background: var(--edge);
}

.strip-tide {
  background: var(--tide);
}

.section-block,
.result-section {
  padding-top: 58px;
  padding-bottom: 58px;
}

.section-kicker {
  margin-bottom: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.section-heading-row {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section-heading-row h2,
.deeper-block h2 {
  margin-bottom: 0;
  font-size: 1.42rem;
  line-height: 1.08;
}

.section-heading-row p,
.deeper-block p {
  margin-bottom: 0;
  color: var(--muted);
}

.pulse-grid {
  display: grid;
  gap: 12px;
}

.pulse-card {
  --accent-bg: var(--edge);
  --accent-ink: var(--edge-ink);
  position: relative;
  display: grid;
  min-height: 148px;
  grid-template-columns: 54px 1fr;
  gap: 4px 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.pulse-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-dark);
}

.pulse-card.is-selected {
  border-color: var(--accent-ink);
  background:
    linear-gradient(90deg, var(--accent-bg), rgba(255, 253, 248, 0.92) 52%),
    var(--paper-soft);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.04), var(--shadow);
}

.pulse-card.is-selected::after {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-ink);
  content: "";
}

.pulse-card.bloom {
  --accent-bg: var(--bloom);
  --accent-ink: var(--bloom-ink);
}

.pulse-card.blaze {
  --accent-bg: var(--blaze);
  --accent-ink: var(--blaze-ink);
}

.pulse-card.anchor {
  --accent-bg: var(--anchor);
  --accent-ink: var(--anchor-ink);
}

.pulse-card.edge {
  --accent-bg: var(--edge);
  --accent-ink: var(--edge-ink);
}

.pulse-card.tide {
  --accent-bg: var(--tide);
  --accent-ink: var(--tide-ink);
}

.pulse-icon {
  display: grid;
  width: 54px;
  height: 54px;
  grid-row: 1 / span 3;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-ink);
}

.pulse-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.pulse-name,
.pulse-core,
.pulse-keywords {
  display: block;
}

.pulse-name {
  align-self: end;
  font-size: 1.22rem;
  font-weight: 900;
}

.pulse-core {
  color: var(--accent-ink);
  font-size: 0.88rem;
  font-weight: 850;
}

.pulse-keywords {
  align-self: start;
  color: var(--muted);
  font-size: 0.76rem;
}

.module-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

#nextToPath {
  width: 100%;
  margin-top: 18px;
}

.birthday-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.birthday-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.birthday-form select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 1rem;
}

.path-preview {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
}

.path-preview p {
  margin-bottom: 0;
  color: var(--muted);
}

.path-preview strong,
.path-preview span {
  display: block;
}

.path-preview strong {
  margin-bottom: 2px;
  font-size: 1.16rem;
}

.path-preview span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.cutoff-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.cutoff-note b {
  display: block;
  color: var(--ink);
  font-weight: 850;
}

.result-card {
  padding: 22px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(248, 245, 239, 0.98)),
    var(--paper-soft);
  box-shadow: var(--shadow);
}

.result-topline,
.result-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.result-card h2 {
  margin: 16px 0;
  font-family:
    Georgia, "Times New Roman", Times, serif;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.02;
}

.result-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line-dark);
}

.result-columns {
  display: grid;
  gap: 14px;
}

.result-columns > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.68);
}

.result-label,
.result-columns strong,
.result-columns span,
.result-columns small {
  display: block;
}

.result-columns strong {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 900;
}

.result-columns span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.result-columns small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.result-description {
  margin: 20px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.toast-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.deeper-block {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.link-action {
  width: 100%;
  margin-top: 4px;
}

.about-section p {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: 1.08rem;
}

.site-footer {
  padding-top: 36px;
  padding-bottom: 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
  font-weight: 900;
}

.site-footer p {
  max-width: 560px;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

@media (min-width: 700px) {
  .site-header {
    justify-content: flex-start;
    padding-right: 34px;
    padding-left: 34px;
  }

  .hero,
  .section-block,
  .result-section,
  .site-footer {
    padding-right: 34px;
    padding-left: 34px;
  }

  .hero {
    min-height: calc(78vh - 58px);
  }

  .hero h1 {
    font-size: 4.75rem;
  }

  .section-heading-row {
    grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.65fr);
    align-items: end;
  }

  .section-heading-row h2,
  .deeper-block h2 {
    font-size: 1.9rem;
  }

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

  #nextToPath {
    width: auto;
  }

  .birthday-form {
    max-width: 520px;
  }

  .result-card {
    padding: 32px;
  }

  .result-card h2 {
    font-size: 3.25rem;
  }

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

@media (min-width: 980px) {
  .hero {
    padding-top: 80px;
  }

  .pulse-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .pulse-card {
    min-height: 220px;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pulse-icon {
    grid-row: auto;
  }

  .deeper-block {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
  }

  .deeper-block p {
    margin-bottom: 0;
  }

  .link-action {
    width: auto;
    min-width: 170px;
    grid-row: 1 / span 2;
    grid-column: 2;
  }
}

@media (max-width: 360px) {
  .hero,
  .section-block,
  .result-section,
  .site-footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .pulse-card {
    grid-template-columns: 48px 1fr;
    gap: 4px 12px;
    padding: 16px;
  }

  .pulse-icon {
    width: 48px;
    height: 48px;
  }

  .pulse-keywords {
    font-size: 0.7rem;
  }

  .birthday-form {
    grid-template-columns: 1fr;
  }

  .result-card h2 {
    font-size: 1.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
