/* Iru brand tokens — sourced from the Iru design system (globals.css). */
:root {
  --iru-purple: #bc4bff;
  --iru-purple-deep: #71118c;
  --iru-cyan: #86fffe;

  /* Iru light theme */
  --bg-base: #fafaf7;
  --bg-surface: #ffffff;
  --bg-surface-2: #f4f4f0;
  --bg-elevated: #ffffff;

  --border-subtle: rgba(12, 12, 41, 0.06);
  --border-default: rgba(12, 12, 41, 0.1);
  --border-strong: rgba(12, 12, 41, 0.16);

  --text-primary: #0c0c29;
  --text-secondary: #2c2c4e;
  --text-tertiary: #54547a;
  --text-quaternary: #7676a0;
  --text-on-accent: #ffffff;

  --accent: var(--iru-purple-deep);
  --accent-soft: rgba(113, 17, 140, 0.14);
  --accent-border: rgba(113, 17, 140, 0.28);
  --accent-ring: rgba(113, 17, 140, 0.35);
  --accent-text: #5f0d77;

  --success: #047857;
  --warning: #92400e;
  --danger: #9f1239;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --radius: 12px;
  --maxw: 660px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo img {
  height: 26px;
  width: auto;
  display: block;
}

.badge {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border: 1px solid var(--border-default);
  padding: 5px 12px;
  border-radius: 999px;
}

.hero {
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.lede {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 56ch;
  margin: 0;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 28px;
}

.field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.req {
  color: var(--accent-text);
}

input,
textarea,
select {
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-quaternary);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

input[type="date"] {
  color-scheme: light;
}

textarea {
  resize: vertical;
}

.hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 6px 0 0;
}

.submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-on-accent);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.2s;
}

.submit:hover {
  filter: brightness(1.06);
}

.submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.legal {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 14px 0 0;
}

.result {
  margin-top: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}

.result.error {
  border-left-color: var(--danger);
}

.result h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

.result .sub {
  color: var(--text-secondary);
  margin: 0 0 18px;
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  font-size: 12px;
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
}

.chip b {
  color: var(--accent-text);
  font-weight: 600;
}

.chip.sev-critical b {
  color: var(--danger);
}

.reasoning {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0 0 18px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-on-accent);
  background: var(--accent);
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.cta:hover {
  filter: brightness(1.06);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-quaternary);
  font-size: 13px;
  margin-top: 44px;
}

.foot .dot {
  opacity: 0.5;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(12, 12, 41, 0.35);
  border-top-color: var(--text-on-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
