/* Ivy At Yours. Tokens follow DESIGN.md: calm neutrals, green only for decisions. */
:root {
  --ink: #1d1d1f;
  --muted: #515154;
  --surface: #f5f5f7;
  --line: #d2d2d7;
  --green: #007a5e;
  --green-hover: #00654e;
  --green-soft: #e6f4ef;
  --red: #b3261e;
  --amber: #8a5a00;
  --white: #ffffff;
  --font:
    "Manrope", "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 48px;
  --radius: 28px;
  --section: clamp(68px, 9vw, 118px);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-hover);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

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

.muted {
  color: var(--muted);
}

.block {
  display: block;
}

.accent {
  color: var(--green);
}

[hidden] {
  display: none !important;
}

/* ---- Header and footer ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  height: 86px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: url("/favicon.svg") center / cover no-repeat;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

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

.site-nav a:hover {
  color: var(--ink);
}

.site-footer {
  max-width: 1280px;
  margin: var(--section) auto 0;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ---- Type ---- */

.display {
  margin: 0;
  font-size: clamp(51px, 8vw, 96px);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.headline {
  margin: 0;
  font-size: clamp(37px, 5.1vw, 62px);
  font-weight: 670;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.title {
  margin: 0;
  font-size: clamp(22px, 2.7vw, 31px);
  font-weight: 670;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 655px;
  margin: 24px auto 0;
  font-size: 18px;
  color: var(--muted);
}

/* ---- Sections ---- */

main > section {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section) var(--gutter) 0;
}

.hero {
  text-align: center;
  padding-top: clamp(40px, 7vw, 96px) !important;
}

.hero.narrow {
  max-width: 820px;
}

.hero.narrow .button-primary,
.hero.narrow .button-secondary {
  margin-top: 32px;
}

.ref-banner {
  display: inline-block;
  margin: 0 0 28px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-hover);
  font-size: 14px;
  font-weight: 650;
}

/* ---- Buttons ---- */

.button-primary,
.button-secondary,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font: 650 16px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.button-primary {
  background: var(--green);
  color: var(--white);
}

.button-primary:hover {
  background: var(--green-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(0, 101, 78, 0.7);
}

.button-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.button-danger {
  background: var(--white);
  color: var(--red);
  border-color: var(--red);
}

.button-danger:hover {
  background: var(--red);
  color: var(--white);
}

/* ---- Forms ---- */

input[type="text"],
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.4 var(--font);
  transition: border-color 0.15s ease;
}

textarea {
  resize: vertical;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.field {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  text-align: left;
}

.field > label,
.field > legend {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 650;
}

.hint {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.field-error,
.form-error {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.form-error {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fbeceb;
  text-align: left;
}

.form-ok {
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-hover);
  font-weight: 650;
}

.has-error input[type="text"] {
  border-color: var(--red);
}

/* Claim form: the hero is the input. */

.claim {
  max-width: 640px;
  margin: 44px auto 0;
}

.slug-input {
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 650;
  transition: border-color 0.15s ease;
}

.slug-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.slug-input input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  font: inherit;
  text-align: right;
  background: transparent;
}

.slug-input input[type="text"]:focus {
  box-shadow: none;
}

.slug-suffix {
  flex: 0 0 auto;
  color: var(--muted);
}

.slug-status {
  min-height: 24px;
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--muted);
}

.slug-status.is-available {
  color: var(--green);
}

.slug-status.is-taken {
  color: var(--red);
}

.slug-suggestion {
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font: 600 14px/1.6 var(--font);
  color: var(--ink);
  cursor: pointer;
}

.slug-suggestion:hover {
  border-color: var(--green);
  color: var(--green);
}

.claim-details {
  margin-top: 28px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 0 22px;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
}

.consent input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.consent a {
  color: var(--muted);
}

.consent.has-error span {
  color: var(--red);
}

.consent-slug {
  font-weight: 700;
}

.cf-turnstile {
  margin: 0 0 18px;
  min-height: 65px;
}

.claim-details .button-primary {
  width: 100%;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 650;
}

.promises li {
  padding: 0 20px;
}

.promises li + li {
  border-left: 1px solid var(--line);
}

.city-count {
  margin: 18px 0 0;
  font-weight: 650;
  color: var(--green-hover);
}

/* ---- Benefit band ---- */

main > section.band {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.band-inner {
  max-width: calc(1280px - 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
}

.rows .row {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.rows .row:first-child {
  border-top: 0;
  padding-top: 0;
}

.rows p {
  margin: 10px 0 0;
  color: var(--muted);
}

.news-list {
  margin: 28px 0 24px;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
}

.news-list time {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding-top: 2px;
}

/* ---- Manage ---- */

.reward {
  text-align: center;
}

.reward .headline {
  font-size: clamp(34px, 5.6vw, 66px);
  overflow-wrap: anywhere;
}

.reward-kicker {
  margin: 0 0 18px;
  font-weight: 700;
  color: var(--green-hover);
}

.private-link {
  max-width: 640px;
  margin: 36px auto 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  text-align: left;
  font-size: 15px;
}

.private-link p {
  margin: 0 0 12px;
}

.copy-row {
  display: flex;
  gap: 10px;
}

.copy-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.share {
  text-align: center;
}

.share-previews {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  margin: 40px 0 28px;
}

.share-previews figure {
  margin: 0;
}

.share-previews canvas {
  display: block;
  height: clamp(220px, 32vw, 380px);
  width: auto;
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.55);
}

.share-previews figcaption {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.share .field {
  max-width: 640px;
  margin: 0 auto;
}

.share .field .button-secondary {
  margin-top: 10px;
}

.step-two-head {
  display: flex;
  align-items: center;
  gap: 28px;
}

.step-two-head .lede {
  margin-left: 0;
}

.ring {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 3.2;
}

.ring-track {
  stroke: var(--surface);
}

.ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.4s ease;
}

.ring-1 {
  stroke-dasharray: 20 100;
}
.ring-2 {
  stroke-dasharray: 40 100;
}
.ring-3 {
  stroke-dasharray: 60 100;
}
.ring-4 {
  stroke-dasharray: 80 100;
}
.ring-5 {
  stroke-dasharray: 100 100;
}

.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 750;
}

.step-two-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  margin-top: 40px;
  align-items: start;
}

.agent-preview {
  position: sticky;
  top: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
}

.agent-preview-label {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.agent-preview-name {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.agent-preview-meta {
  margin: 4px 0 20px;
  color: var(--muted);
}

.agent-preview dl {
  margin: 0;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 14px;
  font-size: 15px;
}

.agent-preview dt {
  font-weight: 650;
  color: var(--muted);
}

.agent-preview dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.agent-preview-host {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 650;
  color: var(--green-hover);
  overflow-wrap: anywhere;
}

.step-two form .button-primary {
  width: 100%;
}

.danger {
  max-width: 820px !important;
}

.danger .muted {
  margin: 10px 0 18px;
}

/* ---- Checker ---- */

.check-form {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: left;
}

.check-form .copy-row {
  margin-bottom: 14px;
}

.check-form.compact {
  margin: 16px 0 0;
}

.tiers {
  max-width: 560px;
  margin: 40px auto 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.tiers li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.tier-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 750;
  font-size: 15px;
  background: var(--surface);
  color: var(--muted);
}

.tier-badge.tier-1,
.tier-badge.tier-2 {
  background: var(--green-soft);
  color: var(--green-hover);
}

.tier-badge.tier-3,
.tier-badge.tier-4 {
  background: var(--green);
  color: var(--white);
}

.tier-badge.large {
  width: 84px;
  height: 84px;
  font-size: 40px;
}

.result-host {
  margin: 0 0 22px;
  font-weight: 700;
  font-size: 18px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result-tier {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  text-align: left;
}

.share-result {
  max-width: 560px;
  margin: 24px auto 0;
}

.findings-wrap {
  max-width: 900px !important;
}

.findings {
  margin: 20px 0 48px;
  padding: 0;
  list-style: none;
}

.finding {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.finding p {
  margin: 0;
}

.finding-level {
  align-self: start;
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  color: var(--muted);
}

.finding-pass .finding-level {
  background: var(--green-soft);
  color: var(--green-hover);
}

.finding-fail .finding-level {
  background: #fbeceb;
  color: var(--red);
}

.finding-warn .finding-level {
  background: #fdf3e1;
  color: var(--amber);
}

.finding-title {
  font-weight: 650;
}

.finding-detail,
.finding-fix {
  margin-top: 4px !important;
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.finding-ref {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ---- Tables (live list, legal) ---- */

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

td .tier-badge {
  width: 26px;
  height: 26px;
  font-size: 13px;
  margin-right: 6px;
}

/* ---- Legal ---- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) 0;
  font-size: 16px;
}

.legal h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.legal h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
}

.legal h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: #333336;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin: 4px 0;
}

/* ---- Mobile ---- */

@media (max-width: 860px) {
  :root {
    --gutter: 28px;
    --radius: 22px;
  }

  .band-inner,
  .step-two-grid {
    grid-template-columns: 1fr;
  }

  .band-inner {
    margin: 0 var(--gutter);
    gap: 28px;
  }

  .agent-preview {
    position: static;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  .site-header {
    height: 72px;
  }

  .site-nav {
    gap: 14px;
    font-size: 14px;
  }

  .slug-input {
    min-height: 60px;
    padding: 0 18px;
    font-size: 17px;
  }

  .claim-details {
    padding: 22px 18px;
  }

  .promises {
    flex-direction: column;
    align-items: center;
  }

  .promises li + li {
    border-left: 0;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .share-previews {
    gap: 14px;
  }

  .share-previews canvas {
    height: auto;
    width: 100%;
    max-height: 300px;
  }

  .share-previews figure:first-child {
    flex: 0 0 52%;
  }

  .share-previews figure:last-child {
    flex: 0 0 34%;
  }

  .share-actions .button-primary,
  .share-actions .button-secondary {
    flex: 1 1 100%;
  }

  .step-two-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .copy-row {
    flex-direction: column;
  }

  .result-tier {
    flex-direction: column;
    text-align: center;
  }

  .finding {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
