@import url("./brand-tokens.css");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
}

/* BRAND_LOCK_START: Keep this section identical across all NeoNema properties. */
.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--header-bg) 84%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  display: block;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand img.brand-main {
  height: 50px;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 4px 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand img.brand-main {
    height: 40px;
  }
}
/* BRAND_LOCK_END */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 16px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  max-width: 760px;
  width: 100%;
  text-align: center;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.hero-copy {
  color: var(--muted);
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-card {
  margin-top: 28px;
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 20px;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
}

.tool-card > label:first-of-type {
  margin-top: 0;
}

select,
input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101713;
  color: var(--foreground);
  padding: 12px;
  font: inherit;
  font-size: 1rem;
}

select:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.field-hint,
.detail,
.summary,
.average {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.status {
  margin: 12px 0 0;
  color: var(--muted);
}

.status:empty {
  display: none;
}

.stat {
  margin-top: 22px;
  text-align: center;
}

.stat-value {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.stat-label {
  margin: 8px 0 0;
  color: var(--muted);
}

.facts {
  margin: 18px 0 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.facts dt {
  color: var(--muted);
  font-weight: 500;
}

.facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.section-label {
  margin: 22px 0 0;
  font-size: 1.05rem;
}

.equiv {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.equiv th,
.equiv td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  vertical-align: baseline;
  text-align: left;
}

.equiv th[scope="col"]:last-child,
.equiv td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.equiv tr.is-current th,
.equiv tr.is-current td {
  color: var(--primary);
}

.choice-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice-fieldset legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 600;
}

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

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

.choice {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101713;
  font-weight: 600;
}

.choice input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #062012;
}

.choice input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.choice input:disabled + span {
  opacity: 0.55;
  cursor: default;
}

button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  background: transparent;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.primary-btn {
  width: 100%;
  background: var(--primary);
  color: #062012;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.stage {
  width: 100%;
  min-height: 220px;
  margin-top: 18px;
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #101713;
  color: var(--foreground);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.stage-kicker,
.stage-label {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.stage-kicker:empty,
.stage-value:empty {
  display: none;
}

.stage-value {
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stage[data-state="go"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #062012;
}

.stage[data-state="go"] .stage-label {
  font-size: clamp(2rem, 6vw, 3rem);
}

.stage[data-state="idle"] .stage-label {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
}

.sweep {
  position: relative;
  height: 28px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #101713;
}

.sweep-bar {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
}

.recent {
  margin-top: 8px;
}

.attempts {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.attempts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.privacy-note {
  width: 100%;
  max-width: 760px;
  margin: 16px auto 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.privacy-bold {
  display: block;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 6px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--foreground);
}

.policy {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 72px;
  line-height: 1.6;
  color: var(--muted);
}

.policy h1 {
  color: var(--foreground);
}

.policy a {
  color: var(--primary);
}

.policy a:hover {
  color: var(--foreground);
}

/* Hub-embed mode: the hub loads this page in a tab and hides page chrome.
   The privacy note must stay visible — never add it to this hide list. */
html.hub-embed body {
  min-height: auto;
}

html.hub-embed .header,
html.hub-embed .hero,
html.hub-embed .footer {
  display: none;
}

html.hub-embed .container {
  padding: 0 16px 24px;
}

html.hub-embed .tool-card {
  margin-top: 0;
}
