:root {
  --ink: #10161d;
  --muted: #5d6873;
  --line: #e1e7ec;
  --soft: #f7faf9;
  --paper: #ffffff;
  --teal: #07978f;
  --teal-dark: #07716c;
  --accent: #f8bf17;
  --navy: #17212b;
  --shadow: 0 16px 38px rgba(23, 33, 43, .08);
}

* { box-sizing: border-box; }

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

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

.site-header {
  min-height: 70px;
  padding: 14px clamp(18px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 950;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 31px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.brand-mark i {
  border: 3px solid var(--teal);
  border-radius: 3px 10px 3px 3px;
  background: #eafaf8;
  box-shadow: inset 0 -4px 0 rgba(7, 151, 143, .12);
}

.brand-mark i:last-child { transform: scaleX(-1); }

.top-nav {
  display: flex;
  gap: 8px;
  font-weight: 850;
}

.top-nav a {
  padding: 10px 12px;
  border-radius: 8px;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: #f0f6f5;
  outline: none;
}

.hero {
  padding: clamp(34px, 5vw, 62px) clamp(18px, 5vw, 56px) 26px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(390px, 1fr);
  gap: 24px 42px;
  background:
    radial-gradient(circle at 16% 16%, rgba(248, 191, 23, .13), transparent 23%),
    radial-gradient(circle at 92% 18%, rgba(7, 151, 143, .12), transparent 24%),
    #fff;
}

.hero-copy {
  align-self: end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 950;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 14px;
  font-size: clamp(42px, 4.8vw, 64px);
  line-height: 1.08;
  font-weight: 950;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: #2f3a44;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.65;
  font-weight: 750;
}

.topic-search {
  align-self: end;
}

.topic-search label {
  display: block;
  margin-bottom: 8px;
  color: #333d47;
  font-weight: 900;
}

.search-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr 110px;
  border: 3px solid var(--teal);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-row input {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0 20px;
  font: inherit;
  font-size: 19px;
  outline: none;
}

.search-row button {
  border: 0;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 19px;
  font-weight: 950;
  cursor: pointer;
}

.search-row button:hover,
.search-row button:focus-visible {
  background: var(--teal-dark);
  outline: none;
}

.intent-buttons {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.intent-buttons button {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 21px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 33, 43, .05);
}

.intent-buttons button:last-child {
  border-color: rgba(248, 191, 23, .72);
  background: #fff9e5;
}

.intent-buttons button:hover,
.intent-buttons button:focus-visible {
  border-color: rgba(7, 151, 143, .45);
  color: var(--teal-dark);
  outline: none;
}

.layout {
  width: min(1180px, calc(100% - 36px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.side-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 33, 43, .055);
}

.side-panel {
  padding: 16px;
  position: sticky;
  top: 14px;
}

.side-panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.side-link {
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #26313b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.side-link:last-child { border-bottom: 0; }

.side-link b {
  color: #7a858f;
  font-weight: 850;
}

.side-link.is-active {
  background: #fff8df;
  color: var(--teal-dark);
  border-radius: 6px;
}

.content-panel {
  padding: 20px;
}

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

.section-head.compact {
  margin-top: 28px;
}

.section-head h2,
.new-tools h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.18;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.featured-card,
.topic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 33, 43, .055);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.featured-card:hover,
.topic-card:hover,
.featured-card:focus-visible,
.topic-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(7, 151, 143, .40);
  box-shadow: 0 16px 34px rgba(23, 33, 43, .10);
  outline: none;
}

.featured-card {
  min-height: 170px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e4f5f3;
  color: var(--teal-dark);
  font-size: 19px;
  font-weight: 950;
}

.featured-card strong {
  font-size: 21px;
}

.featured-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 750;
}

.featured-card b {
  margin-top: auto;
  color: var(--teal-dark);
  font-size: 16px;
}

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

.topic-card {
  min-height: 188px;
  padding: 18px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto 1fr auto;
  column-gap: 14px;
  position: relative;
}

.topic-card .icon {
  grid-row: 1 / 5;
  width: 58px;
  height: 58px;
}

.topic-card strong {
  font-size: 22px;
  line-height: 1.26;
}

.topic-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 750;
}

.topic-card b {
  align-self: end;
  width: max-content;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ddf5ec;
  color: var(--teal-dark);
  font-size: 14px;
}

.topic-card em {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #121212;
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}

.topic-card.special {
  border-color: rgba(248, 191, 23, .72);
  background: linear-gradient(180deg, #fff9e5, #fff);
}

.empty-state {
  margin-top: 16px;
  padding: 22px;
  border: 1px dashed #ccd7dc;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.empty-state strong {
  font-size: 20px;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.new-tools {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 58px;
  padding: clamp(24px, 4vw, 34px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8f8;
}

.new-tools p:last-child {
  max-width: 720px;
  margin: 10px 0 0;
  color: #34404a;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 750;
}

.primary-link {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #121212;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(248, 191, 23, .25);
}

.site-footer {
  padding: 30px clamp(18px, 5vw, 56px) 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: #4e5a65;
  font-weight: 850;
}

.is-hidden { display: none !important; }

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .intent-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    font-size: 24px;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 18px;
  }

  .search-row {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .search-row input {
    min-height: 62px;
    padding: 0 16px;
    font-size: 17px;
  }

  .search-row button {
    min-height: 56px;
  }

  .intent-buttons,
  .featured-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .intent-buttons button {
    min-height: 68px;
  }

  .layout,
  .new-tools {
    width: min(100% - 24px, 640px);
  }

  .content-panel {
    padding: 16px;
  }

  .section-head,
  .new-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-card {
    min-height: 168px;
  }

  .primary-link {
    width: 100%;
  }
}
