:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f0f3f7;
  --line: #dce1e8;
  --line-strong: #c7ced8;
  --text: #17202a;
  --text-soft: #5d6978;
  --muted: #8791a0;
  --primary: #caa33a;
  --primary-hover: #a98224;
  --primary-soft: #fbf3d9;
  --primary-text: #5f4612;
  --danger-soft: #f7ece8;
  --radius: 8px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

:focus-visible {
  outline: 3px solid rgba(202, 163, 58, 0.26);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 62px;
  padding: 8px 0;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-weight: 800;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.button,
.text-button,
.chip,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.button {
  min-height: 42px;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.button--primary,
.inline-link--primary {
  color: #221806;
  background: var(--primary);
}

.button--primary:hover,
.inline-link--primary:hover {
  background: var(--primary-hover);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: center;
  padding: 24px 0 22px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 18ch;
  margin-bottom: 8px;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-count {
  margin-bottom: 0;
  color: var(--primary-text);
  font-size: 1rem;
  font-weight: 800;
}

.quick-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quick-card__label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-card a {
  width: fit-content;
  color: var(--primary-text);
  font-weight: bolder;
}

.quick-card .support-phone {
  color: var(--primary-text);
  font-size: 1.25rem;
  font-weight: 800;
}

.quick-card span:not(.quick-card__label) {
  color: var(--text-soft);
}

.workspace {
  padding-top: 20px;
}

.workspace-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.workspace h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: 0;
}

#resultsCounter {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-weight: 700;
  white-space: nowrap;
}

.tools {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--bg);
  outline: none;
}

.search-field input:focus {
  border-color: var(--primary);
  background: #fff;
}

.chip-row,
.tag-row,
.instruction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 36px;
  padding: 0.48rem 0.75rem;
  border-color: var(--line);
  color: var(--text-soft);
  background: #fff;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip.is-active {
  color: var(--primary-text);
  border-color: transparent;
  background: var(--primary-soft);
}

.results-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 10px 0 2px;
}

.results-actions p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}

.text-button {
  padding: 0.42rem 0.55rem;
  color: var(--text-soft);
  background: transparent;
}

.text-button:not(:disabled):hover {
  color: var(--text);
  background: var(--surface-soft);
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.instruction-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.instruction-card:hover {
  border-color: var(--line-strong);
}

.badge {
  width: fit-content;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  color: var(--primary-text);
  background: var(--primary-soft);
  font-size: x-small;
  font-weight: 500;
}

.instruction-card h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.32;
  letter-spacing: 0;
}

.tag {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.inline-link {
  min-height: 38px;
  padding: 0.56rem 0.72rem;
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}

.inline-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state h3 {
  margin-bottom: 6px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 22px;
  }

  .instructions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page {
    width: min(calc(100% - 24px), var(--container));
    padding-top: 8px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .hero {
    padding-top: 18px;
  }

  h1 {
    max-width: 16ch;
  }

  .workspace-head {
    display: block;
  }

  #resultsCounter {
    margin-top: 10px;
    white-space: normal;
  }

  .instructions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .brand,
  .button {
    width: 100%;
  }

  .button {
    min-height: 46px;
  }

  .hero {
    padding-bottom: 24px;
  }

  h1 {
    font-size: 2rem;
  }

  .tools {
    padding: 10px;
  }
}
