:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #64716d;
  --line: #dbe5e1;
  --panel: #ffffff;
  --soft: #f6faf8;
  --teal: #0b806f;
  --teal-soft: #dff5ef;
  --coral: #ff735c;
  --yellow: #ffe28a;
  --blue: #4378ff;
  --shadow: 0 18px 44px rgba(23, 33, 31, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

a,
button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  color: var(--teal);
  font-size: 30px;
  font-weight: 900;
}

.site-nav {
  position: relative;
}

.site-header nav a,
.nav-menu summary {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"],
.nav-menu summary:hover,
.nav-menu[data-current="true"] summary {
  color: var(--teal);
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 260px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.nav-panel a:hover,
.nav-panel a[aria-current="page"] {
  background: var(--teal-soft);
}

main {
  padding: clamp(18px, 4vw, 44px) clamp(20px, 6vw, 80px) clamp(32px, 6vw, 72px);
}

.dashboard-header,
.test-header {
  max-width: 920px;
  margin-bottom: 32px;
}

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

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.dashboard-header h1 {
  max-width: none;
  font-size: clamp(30px, 3.6vw, 46px);
  white-space: nowrap;
}

.dashboard-header p,
.test-header p,
.test-card p {
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card {
  display: grid;
  min-height: 188px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 128, 111, 0.45);
  box-shadow: 0 22px 52px rgba(23, 33, 31, 0.14);
}

.dashboard-card svg,
.test-icon svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

.dashboard-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.dashboard-card h2 {
  align-self: end;
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.dashboard-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.card-url,
.reference-url span {
  color: var(--teal);
  font-weight: 800;
}

.card-url {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.reference-url {
  margin-top: 18px;
}

.policy-widget {
  width: min(100%, 750px);
  max-width: 750px;
  margin-inline: auto;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.test-shell {
  display: block;
  max-width: 920px;
}

.cookie-policy-page {
  width: 100%;
  max-width: none;
}

.cookie-policy-page .test-header {
  max-width: 750px;
  margin-right: auto;
  margin-left: auto;
}

.test-card,
.preview-surface,
.code-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.test-card {
  padding: 24px;
}

.test-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  background: var(--teal-soft);
  border-radius: 8px;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  color: white;
  text-decoration: none;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 8px;
}

.button.secondary {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.preview-surface {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.fake-page {
  padding: 26px;
}

.fake-bar,
.fake-line,
.fake-block {
  border-radius: 8px;
  background: #e8f0ed;
}

.fake-bar {
  width: 42%;
  height: 20px;
  margin-bottom: 28px;
}

.fake-line {
  height: 12px;
  margin-bottom: 12px;
}

.fake-line.short {
  width: 62%;
}

.fake-block {
  height: 180px;
  margin-top: 30px;
  background: linear-gradient(135deg, #dff5ef, #fff2d0);
}

.banner-preview {
  position: absolute;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100% - 32px));
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 33, 31, 0.18);
}

.banner-preview.bottom-left {
  bottom: 16px;
  left: 16px;
}

.banner-preview.bottom-right {
  right: 16px;
  bottom: 16px;
}

.banner-preview.cookie-wall {
  inset: 50%;
  width: min(440px, calc(100% - 32px));
  transform: translate(-50%, -50%);
}

.preview-surface.wall::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(23, 33, 31, 0.52);
}

.banner-preview strong {
  font-size: 18px;
}

.banner-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.banner-actions {
  display: flex;
  gap: 10px;
}

.banner-actions span {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
}

.banner-actions span:last-child {
  background: #edf3f1;
}

.embed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.embed-box {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--teal);
  font-weight: 800;
  background: #eef8f5;
  border: 1px dashed rgba(11, 128, 111, 0.55);
  border-radius: 8px;
}

.embed-stack {
  display: grid;
  gap: 28px;
  max-width: 920px;
}

.embed-item {
  display: grid;
  gap: 12px;
}

.embed-item h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.embed-item iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.consent-mode-panel {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.signal span:last-child {
  color: var(--coral);
  font-weight: 800;
}

.code-panel {
  margin-top: 18px;
  padding: 16px;
  overflow: auto;
  color: #d8fff4;
  background: #13211f;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: pre-wrap;
}

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

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

@media (max-width: 820px) {
  .site-header,
  .site-header nav,
  .test-shell {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
  }

  .nav-menu,
  .nav-menu summary {
    width: 100%;
  }

  .nav-panel {
    position: static;
    margin-top: 8px;
    width: 100%;
    min-width: 0;
  }

  .dashboard-grid,
  .embed-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header h1 {
    white-space: normal;
  }

  .preview-surface {
    min-height: 460px;
  }
}
