:root {
  --wow1-brand-orange: #F15A26;
  --wow1-brand-blue: #2756A7;
  --wow1-orange-strong: #C74618;
  --wow1-orange-soft: #FFF1EB;
  --wow1-blue-dark: #1D4387;
  --wow1-blue-soft: #EDF3FB;
  --wow1-ink: #212327;
  --wow1-text: #4B4F58;
  --wow1-muted: #667085;
  --wow1-border: #D8E0E7;
  --wow1-surface: #F3F6F8;
  --wow1-surface-subtle: #FAFBFC;
  --wow1-white: #FFFFFF;
  --wow1-gradient-blue: linear-gradient(135deg, #1D4387 0%, #2756A7 100%);

  --blue: var(--wow1-brand-blue);
  --blue-dark: var(--wow1-blue-dark);
  --orange: var(--wow1-brand-orange);
  --bg: var(--wow1-surface);
  --surface: var(--wow1-white);
  --surface-soft: var(--wow1-surface-subtle);
  --text: var(--wow1-ink);
  --muted: var(--wow1-muted);
  --line: var(--wow1-border);
  --shadow: 0 12px 32px rgba(29, 67, 135, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, var(--wow1-blue-soft), transparent 34rem),
    radial-gradient(circle at bottom right, var(--wow1-orange-soft), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 16px;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--wow1-brand-orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--blue-dark);
  color: var(--wow1-white);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  padding: 20px 16px 18px;
  border-bottom: 3px solid var(--wow1-brand-orange);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(29, 67, 135, 0.06);
}

.header-inner,
.shell {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.header-inner {
  display: grid;
  gap: 7px;
  padding: 0 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 5px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(112px, 18vw, 138px);
  height: auto;
}

.home-page .site-header {
  padding: 0 16px;
}

.home-page .header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
}

.home-page .brand-logo {
  width: 224px;
  max-width: 62vw;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--wow1-ink);
}

.subtitle {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.shell {
  flex: 1;
  padding: 18px 16px 40px;
}

.home-intro {
  margin: 0 0 16px;
  padding: 0 12px;
}

.home-intro h1 {
  margin-bottom: 6px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

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

.filter-button,
.copy-button,
.open-button {
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.filter-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.filter-button:hover {
  border-color: var(--wow1-brand-blue);
  background: var(--wow1-blue-soft);
  color: var(--blue);
}

.filter-button.active {
  border-color: var(--wow1-brand-blue);
  background: var(--wow1-brand-blue);
  box-shadow: inset 0 -3px 0 var(--wow1-brand-orange);
  color: var(--wow1-white);
}

.result-meta {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.state-message {
  margin: 12px 0;
  color: var(--muted);
  font-size: 17px;
}

.state-message.hidden {
  display: none;
}

.cards-grid {
  display: grid;
  gap: 8px;
}

.link-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(29, 67, 135, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--wow1-brand-blue);
  box-shadow: 0 14px 30px rgba(29, 67, 135, 0.11);
}

.card-top {
  display: grid;
  gap: 8px;
}

.card-title {
  margin: 0;
  min-width: 0;
  font-size: 20px;
  line-height: 1.18;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.category {
  background: var(--wow1-blue-soft);
  color: var(--blue);
}

.badge.category {
  display: none;
}

.badge.status {
  background: var(--wow1-orange-soft);
  color: var(--wow1-orange-strong);
}

.description {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.open-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  text-decoration: none;
}

.open-button {
  background: var(--blue);
  color: var(--wow1-white);
}

.open-button:hover {
  background: var(--blue-dark);
}

.copy-button {
  border: 1px solid var(--wow1-brand-blue);
  background: var(--wow1-white);
  color: var(--blue);
}

.copy-button:hover {
  background: var(--wow1-blue-soft);
}

.copy-feedback {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  color: var(--wow1-orange-strong);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.site-footer {
  padding: 24px 16px;
  border-top: 3px solid var(--wow1-brand-orange);
  background: var(--wow1-gradient-blue);
}

.footer-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--wow1-white);
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-inner a,
.cookie-settings-button {
  color: var(--wow1-white);
  font-weight: 700;
  text-underline-offset: 3px;
}

.footer-inner a:hover,
.cookie-settings-button:hover {
  color: var(--wow1-orange-soft);
}

.creator-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cookie-settings-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wow1-white);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cookie-settings-button:focus-visible,
.consent-button:focus-visible,
.consent-copy a:focus-visible {
  outline: 3px solid var(--wow1-brand-orange);
  outline-offset: 3px;
}

.consent-banner {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 50;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--wow1-brand-blue);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(29, 67, 135, 0.24);
}

.consent-banner[hidden] {
  display: none;
}

.consent-inner {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.consent-copy h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.consent-copy p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.consent-copy a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.consent-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.consent-reject {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.consent-reject:hover {
  border-color: var(--wow1-brand-blue);
  background: var(--wow1-blue-soft);
  color: var(--blue);
}

.consent-accept {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--wow1-white);
}

.consent-accept:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.policy-page .header-inner,
.policy-shell,
.policy-page .footer-inner {
  width: min(860px, 100%);
}

.policy-page .site-header {
  padding: 0 16px;
}

.policy-page .header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 0;
}

.policy-page .brand-logo {
  width: 224px;
  max-width: 62vw;
}

.policy-shell {
  flex: 1;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.policy-article {
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

.policy-intro {
  margin: 0 0 24px;
  padding: 0 0 22px;
  border-bottom: 2px solid var(--line);
}

.policy-intro h1 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(30px, 4.5vw, 40px);
  line-height: 1.15;
  scroll-margin-top: 20px;
}

.policy-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.policy-meta {
  display: grid;
  gap: 4px;
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: var(--surface-soft);
}

.policy-meta p {
  margin: 0;
}

.policy-article a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.policy-article a:hover {
  color: var(--blue-dark);
}

.policy-article p {
  margin: 0 0 16px;
}

.policy-article ul {
  margin: 0 0 20px;
  padding-left: 24px;
}

.policy-article li {
  margin: 6px 0;
  padding-left: 3px;
}

.policy-article h2,
.policy-article h3,
.policy-article h4 {
  color: var(--text);
  font-family: Arial, sans-serif;
  scroll-margin-top: 20px;
}

.policy-article h2 {
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.2;
}

.policy-article h3 {
  margin: 36px 0 14px;
  font-size: clamp(21px, 3vw, 25px);
  line-height: 1.25;
}

.policy-article h4 {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.3;
}

.table-of-contents {
  margin: 28px 0 36px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.table-of-contents h2 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  font-size: 24px;
}

.toc-columns {
  display: grid;
  gap: 20px;
}

.toc-group > a {
  display: inline-block;
  margin-bottom: 7px;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.toc-group ol {
  margin: 0;
  padding-left: 23px;
}

.toc-group li {
  margin: 5px 0;
  padding-left: 1px;
}

.toc-sublist {
  margin: 4px 0 7px !important;
  padding-left: 20px !important;
  font-size: 15px;
}

.back-to-top {
  display: inline-block;
  margin-top: 8px;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

@media (min-width: 720px) {
  .site-header {
    padding-top: 22px;
  }

  .header-inner {
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 22px;
    align-items: center;
  }

  .header-inner .brand-link {
    grid-row: 1 / 3;
  }

  .header-inner h1,
  .header-inner .subtitle {
    grid-column: 2;
  }

  h1 {
    font-size: 38px;
  }

  .toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .result-meta {
    justify-self: end;
  }

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

  .link-card {
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-areas:
      "top actions"
      "description actions";
    align-items: center;
    min-height: 66px;
    padding: 10px 12px;
  }

  .card-top {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .card-title {
    min-width: 0;
    font-size: 19px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .badges {
    flex: 0 0 auto;
  }

  .description {
    grid-area: description;
    align-self: start;
  }

  .card-actions {
    grid-area: actions;
    grid-template-columns: 1fr 1fr;
    justify-self: end;
    align-self: center;
    width: 220px;
  }

  .toc-columns {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .consent-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 20px;
  }

  .consent-actions {
    min-width: 216px;
  }

}

@media (max-width: 519px) {
  .site-header {
    padding: 17px 12px 15px;
  }

  .header-inner {
    padding: 0 8px;
  }

  .home-page .site-header {
    padding: 0 12px;
  }

  .home-page .header-inner {
    min-height: 76px;
    padding: 0 8px;
  }

  .home-page .brand-logo {
    width: 184px;
    max-width: 68vw;
  }

  .home-intro {
    margin-bottom: 14px;
  }

  .home-intro h1 {
    font-size: 30px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    max-width: 320px;
  }

  .policy-article {
    font-size: 16px;
    line-height: 1.66;
  }

  .policy-page .site-header {
    padding: 0 12px;
  }

  .policy-page .header-inner {
    min-height: 76px;
    padding: 0;
  }

  .policy-page .brand-logo {
    width: 184px;
    max-width: 68vw;
  }

  .policy-intro {
    margin-bottom: 20px;
    padding-bottom: 18px;
  }

  .policy-intro h1 {
    font-size: 30px;
  }

  .table-of-contents {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (min-width: 1080px) {
  .site-header {
    padding-top: 24px;
  }
}
