* {
  box-sizing: border-box;
}

:root {
  --text: #171716;
  --muted: #65615d;
  --line: #e9e5e1;
  --soft: #f7f5f2;
  --accent: #ff4b22;
  --accent-soft: #fff1eb;
  --green: #3a8f57;
  --green-soft: #edf7ef;
  --shadow: 0 18px 45px rgba(35, 29, 24, 0.06);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #fbfaf8;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 26px 0 40px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 75, 34, 0.12);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.search {
  display: flex;
  align-items: center;
  width: min(345px, 34vw);
  height: 48px;
  gap: 10px;
  padding: 0 16px;
  color: #2d2b29;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  gap: 10px;
  padding: 0 22px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.login svg {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: 305px 1fr;
  min-height: calc(100vh - 78px);
}

.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  height: calc(100vh - 78px);
  padding: 24px 32px 24px;
  overflow: auto;
  scrollbar-width: none;
  background: #fbfaf8;
  border-right: 1px solid var(--line);
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.mobile-actions,
.menu-scrim {
  display: none;
}

.nav-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.nav-block a,
.nav-title {
  display: flex;
  align-items: center;
  min-height: 32px;
  gap: 14px;
  margin: 6px 0;
  color: #4f4b47;
  font-size: 14px;
  font-weight: 500;
}

.nav-block svg,
.nav-title svg {
  flex: 0 0 auto;
  color: #4f4b47;
  stroke-width: 1.7;
}

.intro {
  padding-top: 0;
}

.intro-link {
  color: var(--text) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

.intro-link span {
  font-size: 13px;
  white-space: nowrap;
}

.intro-link svg {
  color: var(--accent);
  padding: 9px;
  width: 40px !important;
  height: 40px !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.nav-title {
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.industries a {
  border-radius: 9px;
}

.industries a.active {
  color: var(--accent);
  font-weight: 700;
}

.industries a.active svg {
  color: var(--accent);
}

.industries a.is-muted {
  color: #85807a;
  cursor: default;
}

.industries a.is-muted svg {
  color: #85807a;
}

.sidebar-actions {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.sidebar-actions a {
  display: flex;
  align-items: center;
  height: 52px;
  gap: 16px;
  padding: 0 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.sidebar-actions .feedback {
  color: var(--accent);
  background: linear-gradient(180deg, #fffaf7, #fff);
  border-color: rgba(255, 75, 34, 0.38);
}

.partner-links {
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 0;
}

.partner-links a {
  color: #4f4944;
}

.partner-links a:hover {
  color: var(--accent);
}

.legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 0;
  color: #706b65;
  border-top: 0;
  font-size: 12px;
}

.legal-links a,
.legal-links button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.cookie-settings-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 6px;
  padding: 0 !important;
  color: #5d5752 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  font-weight: 700;
}

.cookie-settings-link svg {
  color: var(--accent);
  stroke-width: 1.8;
}

.legal-mini-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.legal-mini-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-weight: 600;
}

.content {
  padding: 32px 44px 48px;
}

.page-head {
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 14px;
  color: #111;
  font-size: 24px;
  font-weight: 850;
}

.kicker span {
  color: var(--accent);
}

.page-head h1 {
  max-width: 840px;
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

.stats,
.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.stats strong {
  color: var(--accent);
}

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

.single-grid {
  grid-template-columns: minmax(280px, 420px);
}

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

.card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 16px 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(37, 31, 27, 0.02);
}

.card h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.card p {
  min-height: 40px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badge,
.detail-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.badge.prompt,
.detail-badge.prompt {
  color: var(--accent);
  background: var(--accent-soft);
}

.badge.checklist,
.detail-badge.checklist {
  color: var(--green);
  background: var(--green-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  color: #5c5752;
  background: #f1efed;
  border-radius: 11px;
  font-size: 12px;
}

.card-link {
  margin-top: 13px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.card-link span {
  margin-left: 6px;
}

.is-disabled .card-link {
  opacity: 0.9;
}

.promo-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff7f2, #fff);
  border: 1px solid rgba(255, 75, 34, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(37, 31, 27, 0.04);
}

.promo-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 86px;
  height: 22px;
  border-top: 1.5px dashed rgba(255, 75, 34, 0.36);
  border-radius: 50%;
  pointer-events: none;
}

.promo-grid-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 16px 16px;
}

.promo-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.promo-card h2,
.promo-card h3,
.promo-card p {
  position: relative;
  z-index: 1;
}

.promo-grid-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.promo-card p:not(.promo-kicker) {
  margin: 0 0 14px;
  color: #5f5a55;
  line-height: 1.5;
}

.promo-grid-card p:not(.promo-kicker) {
  font-size: 13px;
}

.promo-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.promo-detail-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  padding: 18px 20px;
  background: #fff;
  border-color: rgba(255, 75, 34, 0.28);
}

.promo-detail-strip::after {
  right: 24px;
  bottom: -2px;
}

.promo-strip-copy {
  max-width: 920px;
}

.promo-detail-strip h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: #151414;
  font-size: 20px;
  line-height: 1.2;
}

.promo-button {
  flex: 0 0 auto;
  min-height: 42px;
  margin-top: 0;
  padding: 0 14px;
  background: var(--accent-soft);
  border: 1px solid #ffd3c2;
  border-radius: 8px;
}

.academy-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  margin-top: 28px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(37, 31, 27, 0.03);
}

.academy-story-page {
  grid-template-columns: minmax(0, 1fr);
}

.story-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.academy-story h2 {
  max-width: 680px;
  margin: 0 0 14px;
  color: #151414;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.academy-story p {
  max-width: 820px;
  margin: 0 0 12px;
  color: #5f5a55;
  font-size: 16px;
  line-height: 1.62;
}

.academy-story p:last-child {
  margin-bottom: 0;
}

.academy-story-page h2,
.academy-story-page p {
  max-width: none;
}

.story-links {
  display: grid;
  gap: 12px;
  align-content: start;
}

.story-links a {
  display: grid;
  gap: 7px;
  padding: 18px;
  color: #171514;
  background: linear-gradient(180deg, #fff8f4, #fff);
  border: 1px solid rgba(255, 75, 34, 0.22);
  border-radius: 8px;
}

.story-links a:hover {
  border-color: rgba(255, 75, 34, 0.5);
  transform: translateY(-1px);
}

.story-links span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-links strong {
  font-size: 20px;
  line-height: 1.15;
}

.story-links small {
  color: #6c6660;
  font-size: 13px;
  line-height: 1.45;
}

.bottom-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  margin-top: 14px;
  padding: 16px 24px;
  overflow: hidden;
  background: #fff2ea;
  border: 1px solid #f0ddd3;
  border-radius: 12px;
}

.bottom-strip p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.infinity {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: #ffe0d1;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 500;
}

.wave {
  position: absolute;
  right: 24px;
  bottom: 8px;
  width: 440px;
  height: 44px;
  border-top: 1.5px dashed rgba(255, 75, 34, 0.55);
  border-radius: 50%;
  transform: rotate(-2deg);
}

.detail {
  width: 100%;
  max-width: none;
}

.detail-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.back-link {
  display: inline-flex;
  color: var(--accent);
  font-weight: 800;
}

.detail h1 {
  max-width: 1080px;
  margin: 0 0 16px;
  font-size: 44px;
  line-height: 1.04;
}

.detail-signals {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1080px;
  margin-bottom: 16px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 14px;
}

.detail-stats strong {
  color: var(--text);
}

.vote-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 16px;
  background: #fffaf7;
  border: 1px solid #f0ddd3;
  border-radius: 8px;
}

.vote-panel > div {
  margin-right: auto;
}

.vote-panel strong,
.vote-panel span {
  display: block;
}

.vote-panel strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.vote-panel > div span {
  color: var(--muted);
  font-size: 13px;
}

.vote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 38px;
  gap: 7px;
  color: #4e4945;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.vote-button.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #ffd3c2;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  max-width: 1080px;
  gap: 8px;
  margin-bottom: 24px;
}

.copy-box,
.checklist-box,
.usage-box,
.empty-state,
.related {
  margin-top: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.copy-head h2 {
  margin: 0;
}

.checklist-box h2,
.usage-box h2,
.empty-state h2,
.related h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.copy-head button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #ffd3c2;
  border-radius: 8px;
  font-weight: 800;
}

pre {
  white-space: pre-wrap;
  margin: 8px 0 0;
  padding: 18px;
  color: #2c2622;
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.55;
}

.checklist-section + .checklist-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.checklist-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.checklist-box ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.checklist-box li,
.usage-box p,
.empty-state p {
  color: #3b3733;
  line-height: 1.6;
}

.checklist-box li {
  white-space: pre-line;
}

.empty-state {
  max-width: 760px;
}

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

.related .card {
  min-height: 170px;
  box-shadow: none;
}

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  width: min(920px, calc(100vw - 48px));
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(35, 29, 24, 0.16);
}

.cookie-copy h2,
.cookie-copy p {
  margin: 0;
}

.cookie-copy h2 {
  font-size: 20px;
  line-height: 1.2;
}

.cookie-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.cookie-kicker {
  margin: 0 0 6px !important;
  color: var(--accent) !important;
  font-size: 11px !important;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.cookie-links a {
  color: var(--accent);
  font-weight: 700;
}

.cookie-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cookie-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #3b3733;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-options input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.cookie-actions {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 140px;
}

.cookie-choice,
.cookie-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.cookie-choice {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #ffd3c2;
}

.cookie-link-button {
  color: #4e4945;
  background: #fff;
  border: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  body.menu-open {
    overflow: hidden;
  }

  .topbar {
    position: sticky;
    height: 68px;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-radius: 0 0 10px 10px;
  }

  .brand {
    font-size: 20px;
  }

  .top-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .search {
    width: 100%;
  }

  .login {
    width: 100%;
  }

  .layout {
    display: block;
    min-height: calc(100vh - 68px);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(390px, calc(100vw - 34px));
    height: 100dvh;
    min-width: 0;
    padding: 18px;
    overflow: auto;
    background: #fbfaf8;
    border-right: 1px solid var(--line);
    box-shadow: 20px 0 50px rgba(35, 29, 24, 0.14);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    pointer-events: none;
    background: rgba(23, 23, 22, 0.32);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .menu-scrim.is-open {
    pointer-events: auto;
    opacity: 1;
  }

  .mobile-actions {
    display: grid;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-actions .search,
  .mobile-actions .login {
    width: 100%;
  }

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

  .industries .nav-title {
    grid-column: 1 / -1;
  }

  .content {
    width: 100%;
    min-width: 0;
    padding: 24px 18px 36px;
  }

  .kicker {
    font-size: 21px;
  }

  .page-head h1,
  .detail h1 {
    font-size: 34px;
  }

  .detail-signals {
    align-items: flex-start;
    flex-direction: column;
  }

  .vote-panel {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .vote-panel > div {
    width: 100%;
    margin-right: 0;
  }

  .grid,
  .compact-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .academy-story {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .academy-story h2 {
    font-size: 26px;
  }

  .academy-story p {
    font-size: 15px;
  }

  .card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 180px;
  }

  .promo-grid-card {
    min-height: 180px;
  }

  .promo-detail-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .promo-button {
    width: 100%;
    justify-content: center;
  }

  .copy-box,
  .checklist-box,
  .usage-box,
  .empty-state,
  .promo-detail-strip,
  .related {
    padding: 16px;
  }

  .copy-head {
    align-items: center;
    flex-direction: row;
  }

  .copy-head button {
    flex: 0 0 auto;
    height: 42px;
  }

  .bottom-strip {
    align-items: flex-start;
  }

  .wave {
    display: none;
  }

  .cookie-banner {
    left: 18px;
    right: 18px;
    bottom: 18px;
    grid-template-columns: 1fr;
    width: auto;
  }

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

  .cookie-link-button {
    grid-column: 1 / -1;
  }
}

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

  .cookie-actions {
    grid-template-columns: 1fr;
  }

  .cookie-link-button {
    grid-column: auto;
  }
}
