:root {
  --blue: #2563eb;
  --blue-deep: #1e3a8a;
  --blue-mid: #b8cdf2;
  --blue-soft: #f1f6fe;
  --ink: #0f1c2e;
  --ink-soft: #33465c;
  --muted: #64748b;
  --line: #e4eaf2;
  --bg: #ffffff;
  --bg-soft: #f8fafd;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--blue-soft);
  color: var(--blue-deep);
  padding: 0.12em 0.36em;
  border-radius: 3px;
}

/* ---------- Header + navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 1.5rem;
}

.site-header-inner {
  max-width: 940px;
  height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav > a,
.nav-group > summary {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.nav-group > summary::after {
  content: "";
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  margin-left: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 0.22em;
  transition: transform 0.15s ease;
}

.nav-group[open] > summary::after {
  transform: rotate(-135deg);
  vertical-align: -0.02em;
}

.site-nav > a:hover,
.nav-group > summary:hover,
.nav-group[open] > summary {
  color: var(--ink);
  background: var(--bg-soft);
}

.site-nav > a.active,
.nav-group.has-active > summary {
  color: var(--blue);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 28, 46, 0.1);
}

.nav-menu.single {
  min-width: 220px;
  grid-template-columns: 1fr;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.3;
}

.nav-menu a span {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.nav-menu a small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-menu a:hover {
  background: var(--bg-soft);
}

.nav-menu a.active {
  background: var(--blue-soft);
}

.nav-menu a.active span {
  color: var(--blue);
  font-weight: 600;
}

/* ---------- Layout ---------- */

main {
  max-width: calc(940px + 3rem);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4rem 0 1.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.page-intro {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 68ch;
  margin: 0 0 1.75rem;
}

h2 + .page-intro {
  font-size: 0.95rem;
}

.template-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

/* ---------- Callout ---------- */

.cmp-note {
  background: var(--blue-soft);
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

.cmp-note strong {
  color: var(--blue-deep);
}

.cmp-note code {
  background: rgba(37, 99, 235, 0.1);
}

/* ---------- Facts ---------- */

.facts ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 78ch;
}

.facts li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.facts li:last-child {
  border-bottom: none;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 8px;
  height: 1px;
  background: var(--blue);
}

/* ---------- Service grid ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.service-icon {
  font-size: 0.95rem;
  opacity: 0.65;
}

.consent-tag {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}

.service-desc {
  margin: 0;
  padding: 1rem 1.1rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.embed-slot {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
}

.geo-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.9rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.geo-btn:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.embed-slot iframe {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}

/* Fallback look for the X/Twitter blockquote before widgets.js renders it */
blockquote.twitter-tweet {
  margin: 0 0 1rem;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

blockquote.twitter-tweet p {
  margin: 0 0 0.35rem;
}

blockquote.twitter-tweet a {
  font-size: 0.82rem;
  text-decoration: none;
}

.service-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.geo-output {
  font-size: 0.82rem;
  margin: 0.7rem 0 0;
  color: var(--blue-deep);
  word-break: break-word;
}

/* ---------- Hero ---------- */

.hero {
  border-left: 2px solid var(--blue);
  padding: 0.2rem 0 0.2rem 1.5rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.35rem;
}

.hero p {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Homepage template cards ---------- */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.template-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.template-card:hover {
  border-color: var(--blue-mid);
  background: var(--blue-soft);
}

.template-card .region {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.template-card h3 {
  font-size: 0.95rem;
  line-height: 1.4;
}

.template-card p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 2rem 1.5rem 2.5rem;
}

.site-footer-inner {
  max-width: 940px;
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer-inner p {
  max-width: 76ch;
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  main {
    padding: 2rem 1.25rem 3rem;
  }
  h1,
  .hero h1 {
    font-size: 1.6rem;
  }
  .site-header {
    padding: 0 0.85rem;
  }
  .site-header-inner {
    height: 56px;
  }
  .site-title {
    font-size: 0.85rem;
  }
  .site-nav > a {
    display: none;
  }
  .nav-group > summary {
    padding: 0.4rem 0.45rem;
    font-size: 0.82rem;
  }
  .nav-group {
    position: static;
  }
  .nav-menu,
  .nav-menu.single {
    position: fixed;
    top: 62px;
    left: 1rem;
    right: 1rem;
    min-width: 0;
  }
  .hero {
    padding-left: 1.1rem;
  }
  h2 {
    margin-top: 3rem;
  }
}

/* ---------- Account bar, forms, plans, ads, DSR ---------- */

.account-bar {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.account-bar a {
  font-weight: 500;
  text-decoration: none;
}

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.ad-slot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ad-label {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-unit {
  width: 300px;
  max-width: 100%;
  min-height: 250px;
  background: var(--bg-soft);
}

.form-card {
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.form-card input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.form-card input:focus {
  outline: 2px solid var(--blue-mid);
  border-color: var(--blue);
}

.btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.btn:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.form-status {
  font-size: 0.85rem;
  color: var(--blue-deep);
  margin: 1rem 0 0;
}

.fine-print {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 620px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.plan-card.featured {
  border-color: var(--blue);
}

.plan-price {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.4rem 0 0;
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.plan-card ul {
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.rights-list li {
  margin-bottom: 0.35rem;
}

.dsr-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 120px;
  margin-top: 1.5rem;
}
