.container {
  width: 100%;
  max-width: var(--app-max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--narrow {
  max-width: var(--content-max-width);
}

.section {
  padding-block: var(--space-7);
}

@media (min-width: 1024px) {
  .section { padding-block: var(--space-8); }
}

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height-mobile);
}

@media (min-width: 1024px) {
  .site-header { height: var(--header-height); }
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  min-height: 44px;
}

.brand:hover { color: var(--color-text); }

.brand__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }
}

.nav-desktop__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-5);
}

.nav-desktop__list a {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-2) 0;
}

.nav-desktop__list a:hover,
.nav-desktop__list a[aria-current="page"] {
  color: var(--color-text);
}

/* ---------- Tools dropdown ---------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: none;
  border: none;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-2) 0;
}

.nav-dropdown__trigger:hover,
.nav-dropdown__trigger[aria-expanded="true"] {
  color: var(--color-text);
}

.nav-dropdown__chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-dropdown__trigger[aria-expanded="true"] .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.nav-dropdown__panel {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(640px, 90vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  z-index: var(--z-dropdown);
  opacity: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.nav-dropdown__panel[data-open="true"] {
  display: grid;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.nav-dropdown__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-2) var(--space-1);
}

.nav-dropdown__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
}

a.nav-dropdown__item:hover {
  background: var(--color-surface-alt);
}

.nav-dropdown__item--soon {
  cursor: default;
  opacity: 0.6;
}

.nav-dropdown__item-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-dropdown__item-desc {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.badge--soon {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.65rem;
  padding: 1px var(--space-2);
}

/* ---------- Header actions (search, theme toggle, CTA) ---------- */

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}

/* Below ~480px, the brand wordmark + search + theme toggle + hamburger no
   longer fit on one line. Both search and the theme toggle are reachable
   from inside the mobile menu panel itself, so the compact header keeps
   only the hamburger — matching the "compact logo + hamburger" pattern for
   small mobile headers. */
@media (max-width: 479px) {
  .site-header__actions [data-search-trigger],
  .site-header__actions [data-theme-toggle] {
    display: none;
  }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}

@media (min-width: 1024px) {
  .menu-toggle { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-mobile-menu);
  display: none;
}

.mobile-menu[data-open="true"] {
  display: block;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 85vw);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  overflow-y: auto;
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mobile-menu__list a {
  display: block;
  padding: var(--space-4) var(--space-2);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--color-border);
  min-height: 44px;
}

body.no-scroll {
  overflow: hidden;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: var(--space-8);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-7);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-footer__brand svg { width: 28px; height: 28px; }

.site-footer__tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 46ch;
  margin: var(--space-3) 0 0;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6) var(--space-7);
  grid-template-columns: 1fr;
}

.footer-soon-note {
  margin-top: var(--space-3);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

.site-footer a:hover { color: var(--color-primary); }

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  padding-block: var(--space-4);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--color-primary); }

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--color-border);
}

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

.hero {
  padding-block: var(--space-7);
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding-block: var(--space-8);
  }
}

.hero__lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero__privacy {
  margin-top: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.hero__visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
}

/* ---------- Tool page header ---------- */

.tool-hero {
  padding-block: var(--space-5) var(--space-6);
}

.tool-hero__intro {
  max-width: var(--content-max-width);
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---------- Grids ---------- */

.tools-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

.benefits-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
}

.steps-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.related-tools-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .related-tools-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Ad slots (reserved, unused in Week 1) ---------- */

.ad-slot {
  display: none;
}
