:root {
  --ink: #262f35;
  --paper: #faf7f5;
  --brand: #a5302b;
  --brand-dark: #7a2321;
  --brand-pale: #f8ebe7;
  --accent: #cb6042;
  --slate: #475157;
  --line: #e7e0da;
  --muted: #667078;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

header {
  padding: 1.25rem 2rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

a.logo { display: inline-flex; align-items: center; }
a.logo img { height: 42px; width: auto; display: block; }

.nav-email {
  margin-left: 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

header nav a {
  margin-left: 1.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
header nav a:hover { color: var(--brand); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

/* ---- Hero ---- */

.hero {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 60%, #b9452e 100%);
  border-radius: 18px;
  padding: 3.5rem 2.5rem 2rem;
  margin-top: 2.5rem;
  color: #fff;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  max-width: 20ch;
  margin: 0 auto 0.75rem;
  line-height: 1.15;
}

.hero p {
  max-width: 50ch;
  margin: 0 auto;
  color: #fff1ec;
  font-size: 1.05rem;
}

form.search {
  display: flex;
  gap: 0.6rem;
  margin: 2rem auto 0;
  max-width: 620px;
  background: #fff;
  padding: 0.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(60, 15, 15, 0.28);
}

form.search input[type="text"] {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--ink);
}
form.search input[type="text"]:focus { outline: none; }

form.search button {
  padding: 0.85rem 1.6rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
form.search button:hover { background: var(--brand-dark); }

/* ---- Price strip inside hero ---- */

.price-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.price-chip {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: #fff;
}
.price-chip b { color: #fff; }
.price-chip .amount { font-weight: 700; margin-left: 0.35rem; }

/* ---- TLD picker ---- */

.tld-picker {
  margin: 1.5rem auto 0;
  max-width: 620px;
  text-align: left;
}

.tld-picker summary {
  cursor: pointer;
  color: #fff1ec;
  font-size: 0.9rem;
  user-select: none;
}
.tld-picker summary:hover { color: #fff; }

.tld-picker #tld-filter {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
}

.tld-options {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.6rem 1.1rem;
  margin-top: 0.85rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.tld-loading { color: #fff1ec; font-size: 0.9rem; }

.tld-options label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff3ef;
}

.tld-options input[type="checkbox"] {
  accent-color: #fff;
}

/* ---- Feature row ---- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  text-align: center;
}

@media (max-width: 800px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  color: var(--brand);
}

.features h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.features p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ---- Results ---- */

#results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.domain-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  transition: box-shadow 0.15s ease;
}
.domain-row:not(.taken):hover {
  box-shadow: 0 4px 16px rgba(90, 30, 25, 0.10);
}

.domain-row.taken {
  opacity: 0.55;
}

.domain-row .name {
  font-size: 1.05rem;
  font-weight: 700;
}

.domain-row .status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-pale);
  color: var(--brand-dark);
  font-weight: 700;
}
.domain-row.taken .status {
  background: #efeae6;
  color: #8a8a8a;
}

.domain-row .price {
  margin-left: auto;
  margin-right: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.domain-row button {
  padding: 0.55rem 1.1rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
.domain-row button:hover { background: var(--brand-dark); }
.domain-row button:disabled {
  background: #e6dfda;
  cursor: not-allowed;
}

.empty-state {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* ---- Auth forms ---- */

.auth-form {
  max-width: 400px;
  margin: 3.5rem auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
}

.auth-form h1 {
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
}

.auth-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.auth-form input,
.auth-form select {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.auth-form input:focus,
.auth-form select:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
}

.auth-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -0.5rem 0 0;
}

.auth-form button {
  padding: 0.8rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.auth-form button:hover { background: var(--brand-dark); }

.auth-error {
  color: #b3261e;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.auth-switch {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1.25rem;
  text-align: center;
}
.auth-switch a { color: var(--brand); }

.password-field {
  display: flex;
  gap: 0.5rem;
}
.password-field input { flex: 1; }
.password-field .toggle-password {
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  background: #faf5f2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.password-field .toggle-password:hover { background: var(--brand-pale); color: var(--brand-dark); }

.auth-notice {
  background: var(--brand-pale);
  color: var(--brand-dark);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

#captcha-container {
  margin: 0.25rem 0;
}


/* ---- Brand ribbon (top of every page) ---- */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand) 55%, var(--accent));
}

/* ---- Footer ---- */
footer.site-footer {
  margin-top: 4rem;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site-footer img { height: 96px; width: auto; display: block; margin: 0 auto 0.75rem; }
footer.site-footer a { color: var(--brand); text-decoration: none; margin: 0 0.6rem; font-weight: 600; }
footer.site-footer a:hover { text-decoration: underline; }
footer.site-footer .fine { margin-top: 0.75rem; }

.hero .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff1ec;
  margin: 0 auto 0.9rem;
}
