:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #65737a;
  --line: #d7dde0;
  --bg: #f6f3ed;
  --surface: #ffffff;
  --green: #1f7a58;
  --green-soft: #e5f4ed;
  --blue: #226d9c;
  --blue-soft: #e5f0f6;
  --yellow: #8a6500;
  --yellow-soft: #fff3ca;
  --red: #a33a35;
  --red-soft: #fbe6e4;
  --shadow: 0 18px 45px rgba(22, 32, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(246, 243, 237, 0.92);
  border-bottom: 1px solid rgba(23, 33, 38, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topnav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #344249;
}

.topnav a:hover {
  background: rgba(23, 33, 38, 0.08);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-view {
  display: none;
}

.page-view.is-active {
  display: grid;
}

.subpage-band.is-active {
  min-height: calc(100vh - 150px);
  align-content: start;
  padding-top: clamp(42px, 8vw, 86px);
}

.topnav a.is-active {
  background: rgba(23, 33, 38, 0.1);
  color: var(--ink);
  font-weight: 850;
}

.hero-band {
  display: grid;
  place-items: center;
  min-height: clamp(430px, 64vh, 620px);
  padding: clamp(56px, 9vw, 112px) 0 32px;
}

.hero-centered {
  width: min(850px, 100%);
  text-align: center;
}

.hero-copy h1 {
  margin: 8px auto 24px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-search input {
  min-height: 58px;
  border: 0;
  font-size: 18px;
}

.hero-search input:focus {
  outline: 0;
  border-color: transparent;
}

.hero-search button {
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 850;
}

.hero-hints {
  display: grid;
  gap: 7px;
  margin: 18px auto 0;
  color: #8a969b;
  font-size: 14px;
  line-height: 1.45;
}

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

.toolbar-band,
.segment-band,
.recommender-band {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 18px;
  align-items: end;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(22, 32, 37, 0.08);
}

.segment-band {
  align-items: start;
  margin-top: 16px;
  background: #f8fbfc;
}

.segment-band h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.12;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.segment-chips {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.segment-chips button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #c8d6dd;
  border-radius: 8px;
  background: white;
  color: #344249;
  cursor: pointer;
  font-weight: 800;
}

.recommender-band {
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  margin-top: 16px;
  background: #fffaf0;
  border-color: #e8d9b9;
}

.recommender-copy h2 {
  margin: 4px 0 10px;
  font-size: 28px;
  line-height: 1.12;
}

.recommender-copy p:last-child {
  color: #4c5d64;
  line-height: 1.5;
}

.recommender-form {
  display: grid;
  gap: 12px;
}

.wide-field {
  grid-column: 1 / -1;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-row button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d4c49d;
  border-radius: 8px;
  background: #fff7e4;
  color: #55421a;
  cursor: pointer;
  font-weight: 800;
}

.recommender-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.recommender-controls button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
}

.recommendation-result {
  grid-column: 1 / -1;
}

.recommendation-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid #e4d3ad;
  border-radius: 8px;
}

.recommendation-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.recommendation-header h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.recommendation-header p {
  margin: 0;
  color: #4c5d64;
  line-height: 1.5;
}

.fit-score {
  display: grid;
  flex: 0 0 96px;
  width: 96px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 850;
  text-align: center;
}

.fit-score strong {
  display: block;
  font-size: 24px;
}

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

.toolkit-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.toolkit-item h4 {
  margin: 0;
  font-size: 18px;
}

.toolkit-item p {
  margin: 0;
  color: #4c5d64;
  line-height: 1.45;
}

.toolkit-detail {
  display: grid;
  gap: 6px;
  color: #4c5d64;
  font-size: 14px;
  line-height: 1.4;
}

.toolkit-detail strong {
  color: var(--ink);
}

.toolkit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coupon-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 850;
}

.recommendation-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 7px;
  color: #425158;
  font-size: 13px;
  font-weight: 750;
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(34, 109, 156, 0.18);
  border-color: var(--blue);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0 22px;
}

.side-panel {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 18px;
  background: #edf3f0;
  border: 1px solid #cbdad2;
  border-radius: 8px;
}

.side-panel h2,
.section-heading h2,
.submit-copy h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.12;
}

.side-panel ol {
  margin: 18px 0;
  padding-left: 20px;
  color: #344249;
}

.side-panel li + li {
  margin-top: 10px;
}

.note-box {
  padding: 14px;
  background: white;
  border: 1px solid #d8e0dc;
  border-radius: 8px;
}

.note-box p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

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

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

.deal-card {
  display: grid;
  gap: 14px;
  min-height: 310px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.deal-card:hover {
  border-color: #a9b6bc;
  box-shadow: 0 14px 32px rgba(22, 32, 37, 0.1);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-lockup {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.tool-logo {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 850;
}

.tool-name {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1.15;
}

.category {
  color: var(--muted);
  font-size: 13px;
}

.score-pill,
.tag,
.risk {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.score-pill {
  background: var(--blue-soft);
  color: var(--blue);
}

.benefit {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.description {
  margin: 0;
  color: #4c5d64;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #eef0f1;
  color: #3b474d;
}

.risk.low {
  background: var(--green-soft);
  color: var(--green);
}

.risk.medium {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.risk.high {
  background: var(--red-soft);
  color: var(--red);
}

.card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.card-meta strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.deal-details {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid #e0e6e8;
  border-radius: 8px;
  color: #4c5d64;
  font-size: 14px;
  line-height: 1.45;
}

.deal-details strong {
  color: var(--ink);
}

.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.claim-link,
.details-button,
.submit-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.claim-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--ink);
  color: white;
}

.details-button {
  padding: 0 12px;
  background: #edf0f1;
  color: var(--ink);
}

.rankings-band,
.submit-band,
.news-band,
.forum-band {
  margin: 0;
  padding: 32px 0;
  border-top: 1px solid rgba(23, 33, 38, 0.14);
}

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

.ranking-card,
.news-item,
.forum-topic {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ranking-card h3,
.news-item h3,
.forum-topic h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.news-item p,
.forum-topic p {
  margin: 0;
  color: #4c5d64;
  line-height: 1.5;
}

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

.text-link {
  color: var(--blue);
  font-weight: 850;
}

.ranking-card ol {
  margin: 0;
  padding-left: 20px;
}

.ranking-card li + li {
  margin-top: 8px;
}

.submit-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
  gap: 28px;
  align-items: start;
}

.submit-copy p:last-child {
  color: #4c5d64;
  line-height: 1.55;
}

.submit-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-weight: 750;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 44px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 28px;
  background: white;
  border: 1px dashed #b8c2c7;
  border-radius: 8px;
  color: var(--muted);
}

.page-view:not(.is-active) {
  display: none;
}

@media (max-width: 920px) {
  .toolbar-band,
  .segment-band,
  .recommender-band,
  .content-grid,
  .submit-band {
    grid-template-columns: 1fr;
  }

  .filters,
  .segment-grid,
  .recommender-controls,
  .deal-grid,
  .toolkit-grid,
  .ranking-list,
  .news-list,
  .forum-list {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
  }

  .topnav a {
    padding-inline: 8px;
  }

  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .card-meta {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search button {
    width: 100%;
  }
}
