/* Shared styling for WackySafe information and feature pages. */

:root {
  --ws-blue: #087fc4;
  --ws-blue-dark: #075a8c;
  --ws-sky: #eaf8ff;
  --ws-ink: #19324a;
  --ws-muted: #597087;
  --ws-line: #cfe7f6;
  --ws-green: #18794e;
  --ws-yellow: #fff4bf;
  --ws-white: #fff;
  --ws-shadow: 0 12px 32px rgba(23, 88, 128, 0.11);
  --ws-radius: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ws-ink);
  background:
    radial-gradient(circle at 8% 9%, rgba(255, 215, 92, 0.2), transparent 24rem),
    linear-gradient(180deg, #fff 0 150px, #f2fbff 150px 100%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ws-blue-dark);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

a:hover {
  color: var(--ws-blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ws-blue-dark);
  border-radius: 10px;
  transform: translateY(-150%);
}

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

.site-header {
  display: flex;
  min-height: 142px;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(207, 231, 246, 0.75);
}

.brand {
  display: inline-flex;
  border-radius: 14px;
}

.brand img {
  display: block;
  width: 250px;
  max-width: min(72vw, 250px);
}

.page-shell {
  width: min(100% - 28px, 980px);
  margin: 28px auto 48px;
}

.page-shell.wide {
  width: min(100% - 28px, 1180px);
}

.content-card,
.step-card,
.resource-card,
.radio-player {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  box-shadow: var(--ws-shadow);
}

.content-card {
  padding: clamp(22px, 4vw, 44px);
}

.content-card + .content-card,
.content-card + .step-list,
.step-list + .content-card {
  margin-top: 20px;
}

h1, h2, h3 {
  color: var(--ws-ink);
  line-height: 1.22;
}

h1 {
  max-width: 780px;
  margin: 0 auto 14px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  text-align: center;
}

h2 {
  margin: 1.6em 0 0.55em;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

h3 {
  font-size: 1.08rem;
}

p, ul, ol {
  max-width: 76ch;
}

.lead {
  max-width: 720px;
  margin: 0 auto 26px;
  color: var(--ws-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  text-align: center;
}

.callout {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--ws-yellow);
  border-left: 5px solid #f3b600;
  border-radius: 12px;
}

.callout.info {
  background: var(--ws-sky);
  border-left-color: var(--ws-blue);
}

.button-row,
.store-links,
.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.button,
button.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  color: #fff;
  background: var(--ws-blue);
  border: 1px solid var(--ws-blue);
  border-radius: 999px;
  box-shadow: 0 7px 18px rgba(8, 127, 196, 0.2);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: var(--ws-blue-dark);
}

.button.secondary {
  color: var(--ws-blue-dark);
  background: #fff;
  border-color: #9fd3ef;
  box-shadow: none;
}

.code-value {
  overflow-wrap: anywhere;
  padding: 11px 14px;
  color: var(--ws-ink);
  background: #f5fbff;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  font-family: Consolas, Monaco, monospace;
}

.step-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-card {
  position: relative;
  padding: 22px 24px 22px 78px;
  counter-increment: steps;
}

.step-card::before {
  position: absolute;
  top: 20px;
  left: 22px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--ws-blue);
  border-radius: 50%;
  content: counter(steps);
  font-weight: 800;
}

.step-card h2,
.step-card h3 {
  margin-top: 0;
}

.step-card p:last-child {
  margin-bottom: 0;
}

.browser-guides {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

details.guide,
details.safety-tip {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 15px;
  box-shadow: 0 5px 16px rgba(23, 88, 128, 0.07);
}

details > summary {
  padding: 16px 18px;
  color: var(--ws-ink);
  cursor: pointer;
  font-weight: 800;
}

details[open] > summary {
  color: var(--ws-blue-dark);
  border-bottom: 1px solid var(--ws-line);
}

.guide-body,
.tip-body {
  padding: 4px 20px 18px;
}

.guide-body ol,
.tip-body ul {
  padding-left: 1.3rem;
}

.safety-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.resource-card {
  display: flex;
  min-height: 110px;
  align-items: center;
  padding: 18px;
  font-weight: 800;
  text-decoration: none;
}

.contact-frame {
  display: block;
  width: 100%;
  min-height: 820px;
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 16px;
}

.donate-form {
  margin: 26px auto 0;
  text-align: center;
}

.store-badge {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 13px;
}

.store-badge img {
  display: block;
  width: auto;
  max-height: 48px;
}

.app-preview {
  display: block;
  width: min(100%, 440px);
  margin: 28px auto 0;
  border-radius: 20px;
  box-shadow: var(--ws-shadow);
}

.radio-toolbar {
  display: grid;
  gap: 8px;
  margin: 22px 0 16px;
}

.radio-toolbar label {
  font-weight: 800;
}

.radio-toolbar input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ws-ink);
  background: #fff;
  border: 1px solid #9fd3ef;
  border-radius: 13px;
  font: inherit;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}

.station-card {
  overflow: hidden;
  min-width: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 15px;
  box-shadow: 0 5px 16px rgba(23, 88, 128, 0.08);
}

.station-button {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: 92px auto;
  padding: 0;
  color: var(--ws-ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.station-button:hover {
  color: var(--ws-blue-dark);
  background: var(--ws-sky);
}

.station-button[aria-pressed="true"] {
  background: var(--ws-yellow);
  box-shadow: inset 0 0 0 3px var(--ws-blue);
}

.station-button img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: var(--ws-sky);
}

.station-button span {
  padding: 11px 12px 13px;
}

.radio-empty {
  padding: 20px;
  text-align: center;
}

.radio-player {
  position: sticky;
  z-index: 5;
  bottom: 10px;
  margin-top: 18px;
  padding: 15px;
}

.radio-player[hidden] {
  display: none;
}

.radio-player__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.radio-player h2 {
  margin: 0;
  font-size: 1.05rem;
}

.radio-player iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
}

.site-footer {
  padding: 26px 16px 32px;
  color: var(--ws-muted);
  background: #fff;
  border-top: 1px solid var(--ws-line);
  text-align: center;
}

.footer-nav {
  display: flex;
  max-width: 1000px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 0 auto 16px;
}

.footer-nav a,
.footer-link {
  color: var(--ws-blue-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav a[aria-current="page"] {
  color: var(--ws-ink);
  text-decoration: none;
}

.site-footer p {
  margin: 6px auto 0;
  font-size: 0.88rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #fff 0 118px, #f2fbff 118px 100%);
  }

  .site-header {
    min-height: 116px;
  }

  .page-shell,
  .page-shell.wide {
    width: min(100% - 18px, 980px);
    margin-top: 18px;
  }

  .content-card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .step-card {
    padding: 70px 18px 20px;
  }

  .step-card::before {
    top: 16px;
    left: 18px;
  }

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

  .radio-player {
    position: static;
  }

  .radio-player iframe {
    min-height: 520px;
  }

  .contact-frame {
    min-height: 920px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
