/* thaana.ai design tokens (mirrors resources/css/base.css in the main app) */
:root {
  --white-100: oklch(1 0 0);
  --white-200: oklch(0.9818 0.0054 95.1);
  --snow: oklch(0.966 0.0093 99.98);
  --linen: oklch(0.8889 0.0276 72.79);
  --orange: oklch(0.690967 0.20156 35.3211);
  --black-kite: oklch(0.2647 0.0365 25.22);
  --charcoal: oklch(0.1598 0.0107 52.91);
  --muted: oklch(0.556 0 0);
  --danger: oklch(0.505 0.213 27.518);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Martina Plantijn", ui-serif, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@font-face {
  font-family: "Martina Plantijn";
  src: url("/fonts/martina-plantijn-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white-200);
  color: var(--black-kite);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
    52rem 26rem at 50% -8rem,
    color-mix(in oklab, var(--orange) 12%, transparent),
    transparent 70%
  );
}

.top, .wrap, .foot { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.brand { display: inline-flex; border-radius: 0.5rem; }
.logo { display: block; height: 28px; width: auto; }

.wrap {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.card {
  background: var(--white-100);
  border: 1px solid var(--linen);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow:
    0 1px 2px color-mix(in oklab, var(--black-kite) 5%, transparent),
    0 6px 20px -8px color-mix(in oklab, var(--black-kite) 10%, transparent);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}
h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lede {
  margin: 0.75rem 0 1.75rem;
  color: color-mix(in oklab, var(--black-kite) 70%, transparent);
}

.field { margin-bottom: 1.1rem; }
label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
}
select, input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.9rem;
  font: inherit;
  color: var(--black-kite);
  background: var(--white-100);
  border: 1px solid var(--linen);
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
input::placeholder { color: oklch(0.78 0 0); }
select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1.05rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select:hover, input:hover { border-color: color-mix(in oklab, var(--orange) 40%, var(--linen)); }
select:focus, input:focus {
  border-color: color-mix(in oklab, var(--orange) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--orange) 20%, transparent);
}
input[aria-invalid="true"] { border-color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--orange) 40%, transparent);
}
.btn-primary { width: 100%; background: var(--orange); color: #fff; }
.btn-primary:hover { background: color-mix(in oklab, var(--orange) 90%, white); }
.btn-primary:disabled { opacity: 0.75; cursor: progress; }
.btn-ghost {
  height: 2.5rem;
  padding: 0 1.1rem;
  background: var(--white-100);
  border-color: var(--linen);
  color: var(--black-kite);
}
.btn-ghost:hover { border-color: color-mix(in oklab, var(--orange) 40%, transparent); }

.spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  margin: -0.25rem 0 1rem;
  font-size: 0.85rem;
  color: var(--danger);
}

/* Result panel */
.result {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem 0.35rem;
  background: var(--snow);
  border: 1px solid var(--linen);
  border-radius: 1rem;
}
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--linen);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 1.85rem;
  padding: 0 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.status-active { background: oklch(0.962 0.044 156.743); color: oklch(0.448 0.119 151.328); }
.status-scheduled { background: oklch(0.962 0.059 95.617); color: oklch(0.473 0.137 46.201); }
.status-expired, .status-revoked, .status-notfound {
  background: oklch(0.936 0.032 17.717);
  color: var(--danger);
}
.remaining { font-size: 0.85rem; color: var(--muted); }

dl { margin: 0; }
.row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--linen);
  font-size: 0.9rem;
}
.row:last-of-type { border-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.components {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.components li {
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--white-100);
  border: 1px solid var(--linen);
  border-radius: 9999px;
}
.result-note {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--linen);
  font-size: 0.8rem;
  color: var(--muted);
}
.notfound { padding: 1rem 0 0.75rem; }
.notfound h2 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 600; }
.notfound p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.fineprint {
  margin: 1.25rem 0.5rem 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid var(--linen);
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .card { padding: 1.5rem 1.25rem; border-radius: 1.25rem; }
  input { font-size: 0.85rem; letter-spacing: 0; }
  h1 { font-size: 1.7rem; }
  .row { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.5s; }
}
