@font-face {
  font-family: "Noto Sans Thai";
  src: url("/fonts/NotoSansThai-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --startup-white: #fff;
  --startup-surface: #f7f7f8;
  --startup-ink: #18181b;
  --startup-muted: #52525b;
  --startup-red: #d71920;
  --startup-red-dark: #a50f17;
  --startup-border: #e4e4e7;
  --startup-shadow: 0 20px 60px rgba(24, 24, 27, 0.09);
  --paper: #fff;
  --paper-light: #fff;
  --paper-deep: #f4f4f5;
  --ink: #18181b;
  --ink-soft: #52525b;
  --celestial-teal: #d71920;
  --teal-light: #ffe4e6;
  --saffron: #d71920;
  --saffron-light: #fff1f2;
  --dusk: #18181b;
  --coral: #d71920;
  --line: #e4e4e7;
  --radius-large: 24px;
  --radius-medium: 18px;
  --shadow: var(--startup-shadow);
  --display: "Noto Sans Thai", sans-serif;
  --body: "Noto Sans Thai", sans-serif;
}

html,
body {
  background: var(--startup-white);
  color: var(--startup-ink);
}

body {
  overflow-x: hidden;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  background-image: none;
}

body::before {
  display: none;
  background-image: none;
}

h1,
h2,
h3,
.brand-type,
.card-number strong,
.analyzed-name {
  font-family: "Noto Sans Thai", sans-serif;
  letter-spacing: -0.035em;
}

:focus-visible {
  outline: 3px solid var(--startup-red);
  outline-offset: 3px;
}

button,
a,
input {
  min-height: 44px;
}

.site-header {
  top: 16px;
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  padding: 9px 10px 9px 16px;
  border-color: rgba(24, 24, 27, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(24, 24, 27, 0.06);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 36px rgba(24, 24, 27, 0.09);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--startup-red);
  color: white;
}

.brand-mark b {
  font-size: 19px;
  font-weight: 800;
}

.brand-orbit,
.brand-signal {
  display: none;
}

.brand-type strong {
  font-size: 18px;
  font-weight: 800;
}

.brand-type em {
  color: var(--startup-muted);
  font-size: 14px;
}

.brand-credit {
  color: var(--startup-muted);
  font-size: 9px;
}

.site-nav a {
  color: var(--startup-muted);
  font-size: 13px;
  font-weight: 600;
}

.nav-action {
  background: var(--startup-red);
  color: white !important;
}

.nav-action span {
  background: white;
  color: var(--startup-red);
}

.hero {
  min-height: auto;
  padding: 130px 24px 64px;
  background:
    radial-gradient(circle at 86% 14%, rgba(215, 25, 32, 0.07), transparent 25%),
    var(--startup-white);
}

.hero-frame {
  width: min(1180px, 100%);
  min-height: auto;
  padding: clamp(48px, 6vw, 76px) 0 0;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.88fr);
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-frame::before,
.hero-frame::after {
  display: none;
}

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

.hero-message .eyebrow {
  margin-bottom: 22px;
  color: var(--startup-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.eyebrow span {
  background: var(--startup-red);
}

.hero-message h1 {
  margin: 0;
  color: var(--startup-ink);
  font-size: clamp(54px, 7vw, 88px);
  font-weight: 800;
  line-height: 1.04;
}

.hero-message h1 em {
  color: var(--startup-red);
  font-style: normal;
}

.hero-intro {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--startup-muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.75;
}

.prediction-shell {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--startup-border);
  border-radius: 24px;
  background: var(--startup-white);
  box-shadow: var(--startup-shadow);
}

.prediction-kicker {
  margin: 0 0 18px;
  color: var(--startup-ink);
  font-size: 14px;
  font-weight: 700;
}

.mode-switch {
  width: 100%;
  margin-bottom: 24px;
  padding: 4px;
  border-color: var(--startup-border);
  background: var(--startup-surface);
}

.mode-switch button {
  flex: 1;
  color: var(--startup-muted);
  font-size: 14px;
  font-weight: 600;
}

.mode-switch button[aria-pressed="true"] {
  background: white;
  color: var(--startup-ink);
  box-shadow: 0 2px 8px rgba(24, 24, 27, 0.09);
}

.field-row {
  gap: 16px;
}

.field label {
  margin-bottom: 4px;
  color: var(--startup-muted);
  font-size: 13px;
  font-weight: 600;
}

.field input {
  min-height: 56px;
  padding: 8px 0;
  border-color: #a1a1aa;
  color: var(--startup-ink);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 22px;
  font-weight: 600;
}

.field input:focus {
  border-color: var(--startup-red);
  box-shadow: 0 3px 0 -1px var(--startup-red);
}

.field input[aria-invalid="true"] {
  border-color: var(--startup-red-dark);
}

.field-divider {
  color: var(--startup-red);
}

.form-hint {
  color: var(--startup-muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-actions {
  min-height: auto;
  margin-top: 22px;
}

.primary-button {
  min-height: 54px;
  border-radius: 14px;
  background: var(--startup-red);
  color: white;
  box-shadow: none;
  font-weight: 700;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--startup-red-dark);
  box-shadow: 0 10px 28px rgba(215, 25, 32, 0.2);
}

.primary-button > i {
  background: white;
  color: var(--startup-red);
}

.form-status {
  max-width: none;
  color: var(--startup-red-dark);
  font-size: 13px;
}

.trust-strip {
  grid-column: 1 / -1;
  min-height: 86px;
  padding: 24px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--startup-border);
}

.trust-portraits {
  display: flex;
  flex: 0 0 auto;
}

.trust-portraits img {
  width: 50px;
  height: 50px;
  display: block;
  object-fit: cover;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--startup-border);
}

.trust-portraits img + img {
  margin-left: -12px;
}

.trust-strip p {
  margin: 0;
  color: var(--startup-muted);
  font-size: 12px;
  line-height: 1.55;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  color: var(--startup-ink);
  font-size: 14px;
}

.recent-history,
.results,
.privacy {
  border-color: var(--startup-border);
  background: white;
  box-shadow: var(--startup-shadow);
}

.recent-history {
  margin-top: 18px;
}

.history-heading h2,
.results-heading h2,
.science-heading h2,
.privacy h2,
.final-cta h2 {
  color: inherit;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.history-card {
  border-color: var(--startup-border);
  background: var(--startup-white);
  box-shadow: none;
}

.history-action:first-child,
.history-clear[data-confirm="true"] {
  background: var(--startup-red);
  color: white;
}

.results {
  padding-top: clamp(34px, 6vw, 74px);
}

.section-marker span,
.chapter-number,
.chapter-kicker,
.chapter-note {
  color: var(--startup-red);
}

.results-heading h2 em,
.science-heading h2 em {
  color: var(--startup-red);
  font-style: normal;
}

.secondary-button {
  border-color: var(--startup-border);
  border-radius: 12px;
  background: white;
  color: var(--startup-ink);
}

.secondary-button:hover {
  border-color: var(--startup-red);
  background: var(--startup-red);
  color: white;
}

.result-tabs {
  border-color: var(--startup-border);
  background: var(--startup-surface);
}

.result-tab {
  color: var(--startup-muted);
  font-weight: 600;
}

.result-tab[aria-selected="true"] {
  background: var(--startup-red);
  color: white;
}

.character-chip {
  border-color: var(--startup-border);
  background: var(--startup-surface);
}

.prediction-grid {
  gap: 16px;
}

.prediction-card:nth-child(n) {
  min-height: 340px;
  border-color: var(--startup-border);
  background: white;
  color: var(--startup-ink);
  box-shadow: 0 14px 42px rgba(24, 24, 27, 0.06);
}

.prediction-card::before {
  width: 48px;
  height: 4px;
  margin-bottom: 18px;
  display: block;
  border-radius: 99px;
  background: var(--startup-red);
  content: "";
}

.prediction-card::after {
  display: none;
}

.card-meta {
  color: var(--startup-muted);
}

.card-number strong,
.card-number h3 {
  color: var(--startup-ink);
}

.card-number strong {
  font-weight: 700;
}

.card-meaning {
  color: var(--startup-ink);
  font-size: 17px;
  line-height: 1.8;
}

.warning-banner {
  border-left-color: var(--startup-red);
  background: #fff1f2;
  color: var(--startup-red-dark);
}

.science-intro {
  padding: 110px 0 42px;
}

.science-heading {
  align-items: end;
}

.science-heading h2 {
  color: var(--startup-ink);
}

.science-heading > p {
  color: var(--startup-muted);
  font-size: 17px;
}

.science-chapter {
  width: min(1180px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto 16px;
  padding: clamp(28px, 5vw, 52px);
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 30px;
  border: 1px solid var(--startup-border);
  border-radius: 24px;
  background: white;
  color: var(--startup-ink);
}

.chapter-copy h3 {
  color: var(--startup-ink);
  font-size: clamp(38px, 5vw, 62px);
}

.chapter-copy > p:not(.chapter-kicker) {
  max-width: 760px;
  color: var(--startup-muted);
  font-size: 17px;
}

.chapter-art {
  display: none;
}

.privacy {
  background: var(--startup-red-dark);
  color: white;
}

.privacy-seal {
  border-color: white;
  color: white;
}

.privacy-copy h2 em {
  color: #fecdd3;
  font-style: normal;
}

.privacy-copy > p:last-child,
.privacy-list span {
  color: #fecdd3;
}

.privacy-list {
  border-color: rgba(255, 255, 255, 0.35);
}

.privacy-list li {
  border-color: rgba(255, 255, 255, 0.35);
}

.final-cta {
  min-height: 560px;
  background: var(--startup-surface);
  color: var(--startup-ink);
}

.final-cta > p {
  color: var(--startup-muted);
}

.final-cta h2 em {
  color: var(--startup-red);
  font-style: normal;
}

.cta-orbit {
  border-color: var(--startup-red);
  color: var(--startup-red);
}

.cta-orbit i {
  display: none;
}

.primary-button-light {
  background: var(--startup-red);
  color: white;
}

.site-footer {
  border-top-color: var(--startup-border);
  background: var(--startup-white);
  color: var(--startup-ink);
}

.brand-footer .brand-credit,
.site-footer > p {
  color: var(--startup-muted);
}

@media (max-width: 1040px) {
  .hero-frame {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
    gap: 38px;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .hero {
    padding: 96px 16px 32px;
  }

  .hero-frame {
    padding: 26px 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-message h1 {
    font-size: clamp(48px, 14vw, 68px);
  }

  .hero-intro {
    margin-top: 20px;
    font-size: 17px;
  }

  .prediction-shell {
    padding: 20px;
    border-radius: 20px;
  }

  .trust-strip {
    min-height: 0;
    padding-top: 20px;
    align-items: flex-start;
  }

  .recent-history,
  .results,
  .privacy {
    width: calc(100% - 24px);
  }

  .science-chapter {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-type strong {
    font-size: 16px;
  }

  .nav-action {
    font-size: 11px !important;
  }

  .hero-message .eyebrow {
    margin-bottom: 16px;
  }

  .mode-switch button {
    padding-inline: 8px;
    font-size: 13px;
  }

  .field input {
    font-size: 20px;
  }

  .primary-button {
    width: 100%;
  }

  .card-meaning {
    font-size: 17px;
    line-height: 1.8;
  }

  .prediction-card:nth-child(n) {
    min-height: 0;
  }

  .science-intro {
    padding-top: 80px;
  }

  .science-chapter {
    padding: 28px 24px;
  }

  .chapter-copy h3 {
    font-size: 42px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Compact search experience */
.site-header,
.hero-frame,
.prediction-shell,
.recent-history,
.results,
.compact-help {
  width: min(820px, calc(100% - 32px));
}

.hero {
  padding: 112px 16px 28px;
  background: var(--startup-white);
}

.hero-frame {
  padding: 30px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.compact-intro {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.compact-intro .eyebrow {
  margin-bottom: 8px;
}

.compact-intro h1 {
  font-size: clamp(38px, 7vw, 58px);
  line-height: 1.08;
}

.compact-intro .hero-intro {
  max-width: 620px;
  margin: 12px auto 0;
  font-size: 17px;
  line-height: 1.55;
}

.prediction-shell {
  max-width: 820px;
  padding: 24px;
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(24, 24, 27, 0.09);
}

.prediction-kicker,
.mode-switch {
  margin-bottom: 12px;
}

.form-actions {
  margin-top: 16px;
}

.quick-facts {
  width: 100%;
  margin: 0;
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--startup-border);
  list-style: none;
}

.quick-facts li {
  padding: 0 12px;
  text-align: center;
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts strong {
  color: var(--startup-ink);
  font-size: 14px;
}

.quick-facts span {
  color: var(--startup-muted);
  font-size: 12px;
}

.recent-history,
.results,
.compact-help {
  margin-inline: auto;
}

.compact-help {
  padding: 18px 0 38px;
}

.compact-help details {
  border: 1px solid var(--startup-border);
  border-radius: 16px;
  background: white;
}

.compact-help summary {
  min-height: 52px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
}

.method-grid {
  padding: 0 18px 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.method-grid article {
  padding: 16px;
  border-radius: 12px;
  background: var(--startup-surface);
}

.method-grid h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.method-grid p,
.compact-privacy {
  margin: 0;
  color: var(--startup-muted);
  font-size: 14px;
  line-height: 1.6;
}

.compact-privacy {
  padding-top: 10px;
  text-align: center;
}

.footer-portraits {
  justify-content: center;
}

.site-footer {
  min-height: 0;
  padding: 24px max(24px, calc((100vw - 1180px) / 2));
  grid-template-columns: minmax(300px, 1.6fr) auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.site-footer > p {
  font-size: 12px;
}

.footer-meta {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > p {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 58px;
  }

  .brand-credit,
  .site-nav > a:not(.nav-action),
  .compact-intro .eyebrow {
    display: none;
  }

  .hero {
    padding-top: 86px;
  }

  .hero-frame {
    padding-top: 12px;
    gap: 16px;
  }

  .compact-intro h1 {
    font-size: 38px;
  }

  .compact-intro .hero-intro {
    font-size: 16px;
  }

  .prediction-shell {
    padding: 16px;
    border-radius: 18px;
  }

  .quick-facts,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    gap: 8px;
  }

  .quick-facts li {
    padding-inline: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-footer > p,
  .footer-meta {
    grid-column: 1;
    justify-content: center;
  }
}
