:root {
  color-scheme: light;
  --ink: #171513;
  --muted: #706960;
  --soft: #f7f4ee;
  --paper: #fffdf8;
  --line: #ded7ca;
  --green: #0f7b56;
  --green-dark: #07543a;
  --red: #b24130;
  --gold: #a16808;
  --blue: #245f9b;
  --shadow: 0 24px 70px rgba(49, 41, 29, 0.13);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(255, 253, 248, 0.94), rgba(247, 244, 238, 0.88)),
    repeating-linear-gradient(90deg, rgba(23, 21, 19, 0.035) 0, rgba(23, 21, 19, 0.035) 1px, transparent 1px, transparent 72px);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(520px, 1.16fr);
  gap: 28px;
  padding: 28px;
}

.promptPanel,
.resultsPanel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
  min-height: calc(100vh - 56px);
}

.promptPanel {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px;
}

.resultsPanel {
  padding: 24px;
  overflow: hidden;
}

.brandLine,
.resultTop,
.controls,
.manualCheck div,
.summary,
.filterBar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandLine,
.resultTop,
.summary {
  justify-content: space-between;
}

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

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  border-radius: 7px;
}

.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.heroCopy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  max-width: 9ch;
}

h2 {
  font-size: 28px;
}

.heroCopy p:last-child {
  max-width: 54ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.composer,
.manualCheck {
  display: grid;
  gap: 12px;
}

label {
  color: var(--ink);
  font-weight: 750;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 168px;
  padding: 16px;
  line-height: 1.5;
}

input,
select {
  min-height: 46px;
  padding: 0 12px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 95, 155, 0.12);
}

.controls {
  align-items: stretch;
}

.controls select {
  flex: 1;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.manualCheck {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.manualCheck input {
  flex: 1;
}

.resultTop {
  margin-bottom: 16px;
}

.resultTop button,
.manualCheck button {
  background: #efe8dc;
  color: var(--ink);
  border: 1px solid var(--line);
}

.filterBar {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.summary {
  border: 1px solid var(--line);
  background: #f2ede4;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.results {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-right: 4px;
}

.domainRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 15px;
}

.domainName {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.domainName strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.available {
  background: rgba(15, 123, 86, 0.12);
  color: var(--green-dark);
}

.taken {
  background: rgba(178, 65, 48, 0.12);
  color: var(--red);
}

.premium {
  background: rgba(161, 104, 8, 0.14);
  color: var(--gold);
}

.meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.price {
  text-align: right;
  min-width: 126px;
}

.price strong {
  display: block;
  font-size: 20px;
}

.price span {
  color: var(--muted);
  font-size: 12px;
}

.emptyState {
  min-height: 360px;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--muted);
}

.emptyIcon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  color: var(--ink);
  font-weight: 900;
  font-size: 24px;
}

.loading {
  opacity: 0.7;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }

  .promptPanel,
  .resultsPanel {
    min-height: auto;
    padding: 18px;
  }

  h1 {
    font-size: 46px;
    max-width: 11ch;
  }

  .controls,
  .manualCheck div,
  .domainRow,
  .summary {
    align-items: stretch;
  }

  .controls,
  .domainRow {
    grid-template-columns: 1fr;
  }

  .controls,
  .manualCheck div,
  .summary {
    flex-direction: column;
  }

  .results {
    max-height: none;
    overflow: visible;
  }

  .price {
    text-align: left;
  }
}
