:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #64716b;
  --line: #dfe7e2;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --green: #1f7a5c;
  --blue: #245f9d;
  --gold: #b7791f;
  --red: #b4443f;
  --shadow: 0 18px 50px rgba(30, 45, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(120deg, rgba(31, 122, 92, 0.92), rgba(36, 95, 157, 0.84)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.valuation-panel,
.auth-band,
.section {
  background: var(--panel);
}

.valuation-panel {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.valuation-panel label,
.filters span,
dialog span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.domain-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.primary {
  padding: 0 18px;
  color: #fff;
  background: var(--green);
}

.secondary {
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
}

.ghost {
  padding: 0 16px;
  color: var(--green);
  background: #e9f4ef;
}

.icon-button {
  width: 40px;
  color: var(--muted);
  background: #f3f6f4;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.valuation-result {
  display: grid;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.value-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.value-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.value-card strong {
  display: block;
  margin-top: 3px;
  font-size: 1.25rem;
}

.score-line {
  height: 10px;
  overflow: hidden;
  background: #e8eee9;
  border-radius: 999px;
}

.score-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.auth-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px) auto;
  gap: 18px;
  align-items: end;
  padding: 28px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.auth-band h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.section {
  padding: clamp(42px, 7vw, 84px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.count-pill {
  white-space: nowrap;
  padding: 9px 12px;
  color: var(--green);
  background: #e8f5ef;
  border-radius: 8px;
  font-weight: 850;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(190px, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.filters label {
  display: grid;
  gap: 6px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  background: #f3f7f5;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td strong {
  display: block;
  margin-bottom: 3px;
}

.industry-tag {
  display: inline-flex;
  padding: 5px 8px;
  color: #174735;
  background: #e8f5ef;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 850;
}

.bid-cell {
  min-width: 150px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-grid h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
}

.article-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 32, 27, 0.48);
}

#bidForm {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
}

@media (max-width: 900px) {
  .hero,
  .auth-band,
  .filters,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-band {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .domain-entry,
  .auth-form,
  .value-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }
}
