/* ==========================================================================
   IngramDown — design system
   Mobile-first. Purple/pink accent utility style.
   ========================================================================== */

:root {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --secondary: #9333EA;
  --accent: #EC4899;
  --bg: #FFFFFF;
  --bg-alt: #F8F7FC;
  --ink: #171526;
  --ink-soft: #69677A;
  --line: #E9E6F0;
  --success: #138A63;
  --error: #D9364F;
  --warning: #B7791F;
  --primary-soft: #F3EEFE;
  --accent-soft: #FDF0F7;
  --shadow-sm: 0 1px 2px rgba(23, 21, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(23, 21, 38, 0.08);
  --shadow-lg: 0 18px 48px rgba(76, 29, 149, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container: 1120px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(var(--container), calc(100% - 36px));
  margin-inline: auto;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
  min-height: 46px;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 60%, var(--accent) 130%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 60%, var(--accent) 130%);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-soft:hover {
  background: #E9DEFD;
  color: var(--primary-dark);
}

.btn-block {
  width: 100%;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-ghost .btn-spinner,
.btn-soft .btn-spinner {
  border-color: rgba(124, 58, 237, 0.3);
  border-top-color: var(--primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--secondary) 70%, var(--accent));
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.35);
}

.brand-mark svg { width: 21px; height: 21px; }

.main-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav .nav-list > li > a,
.nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav .nav-list > li > a:hover,
.nav-more-btn:hover,
.main-nav .nav-list > li > a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-more { position: relative; }

.nav-more-btn .chev { width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  list-style: none;
  margin: 0;
  z-index: 70;
  max-height: min(70vh, 480px);
  overflow-y: auto;
}

.more-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
}

.more-menu li a:hover,
.more-menu li a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  background:
    radial-gradient(ellipse at 8% 15%, rgba(236, 72, 153, 0.10), transparent 42%),
    radial-gradient(ellipse at 92% 5%, rgba(147, 51, 234, 0.12), transparent 45%),
    linear-gradient(180deg, #FCFAFF 0%, var(--bg-alt) 100%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(1.95rem, 5vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 20px 0 14px;
  color: var(--ink);
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.pill b { color: var(--primary); font-weight: 700; }

/* --------------------------------------------------------------------------
   Downloader widget
   -------------------------------------------------------------------------- */

.dl-widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  text-align: left;
  max-width: 780px;
  margin-inline: auto;
}

.dl-widget-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.dl-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.dl-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.dl-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
  background: #fff;
}

.dl-link-icon {
  width: 20px;
  height: 20px;
  margin-left: 14px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.dl-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 15px 10px 15px 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}

.dl-input::placeholder { color: #9A97AB; }

.dl-clear {
  margin-right: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 11px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.dl-clear:hover { color: var(--error); border-color: var(--error); }

.dl-submit { white-space: nowrap; padding-inline: 26px; }

.dl-error {
  margin: 10px 2px 0;
  font-size: 0.88rem;
  color: var(--error);
  font-weight: 500;
}

.dl-hint {
  margin: 10px 2px 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Results ---------------------------------------------------------------- */

.dl-results:not(:empty) { margin-top: 22px; }

.result-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.result-head h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.result-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.9rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge.pink { background: var(--accent-soft); color: var(--accent); }

.preview-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.preview-thumb {
  position: relative;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb .thumb-fallback {
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 20px;
  text-align: center;
}

.preview-thumb .thumb-fallback svg { width: 44px; height: 44px; opacity: 0.5; }

.type-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(23, 21, 38, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.preview-info h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.preview-caption {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.meta-chip b { color: var(--ink); font-weight: 600; }

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.preview-actions .btn { min-width: 200px; }

.ext-link {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 18px;
  line-height: 1.55;
}

.notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.notice strong { color: var(--ink); }
.notice.warn { background: #FFF9EC; border-color: #F3E4BE; }
.notice.warn svg { color: var(--warning); }
.notice.error { background: #FFF1F3; border-color: #F8D4DA; }
.notice.error svg { color: var(--error); }

/* Profile gallery -------------------------------------------------------- */

.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.profile-summary h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.profile-summary p { margin: 3px 0 0; color: var(--ink-soft); font-size: 0.88rem; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.media-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.media-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.media-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

.media-thumb .empty-thumb svg { width: 40px; height: 40px; color: #B9B5C9; }

.media-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(23, 21, 38, 0.75);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.media-index {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.media-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.media-title {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.media-sub { font-size: 0.76rem; color: var(--ink-soft); margin: 0; }

.media-card .btn { padding: 9px 12px; font-size: 0.84rem; min-height: 40px; margin-top: auto; }

.gallery-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-head.center { margin-inline: auto; text-align: center; }

.mini-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 800;
}

.section-head p { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }

/* Feature cards ---------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: #D9D2F3;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  color: var(--primary);
  margin-bottom: 16px;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 { font-size: 1.06rem; margin: 0 0 8px; letter-spacing: -0.015em; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.feature-card .card-link { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 600; }

/* Steps ------------------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.step h3 { margin: 0 0 8px; font-size: 1.04rem; letter-spacing: -0.015em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* FAQ -------------------------------------------------------------------- */

.faq-list { display: grid; gap: 12px; }

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 17px 46px 17px 20px;
  font-weight: 650;
  font-size: 1rem;
  list-style: none;
  position: relative;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.2px solid var(--primary);
  border-bottom: 2.2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item summary:hover { color: var(--primary); background: #FCFAFF; }

.faq-body {
  padding: 0 20px 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.faq-body p { margin: 0 0 10px; }
.faq-body p:last-child { margin-bottom: 0; }

/* CTA band --------------------------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 55%, var(--accent) 130%);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  color: #fff;
  text-align: center;
}

.cta-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 10px; letter-spacing: -0.02em; }
.cta-band p { margin: 0 auto 22px; max-width: 560px; opacity: 0.92; }
.cta-band .btn-white {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.cta-band .btn-white:hover { color: var(--primary-dark); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Tool / content pages
   -------------------------------------------------------------------------- */

.page-hero {
  background:
    radial-gradient(ellipse at 5% 0%, rgba(147, 51, 234, 0.10), transparent 45%),
    radial-gradient(ellipse at 95% 10%, rgba(236, 72, 153, 0.09), transparent 40%),
    linear-gradient(180deg, #FCFAFF, var(--bg-alt));
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-hero-inner { max-width: 800px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; color: #B9B5C9; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--primary); font-weight: 600; }

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 12px;
  font-weight: 800;
}

.page-hero .lede { color: var(--ink-soft); font-size: 1.04rem; margin: 0 0 24px; }

.tool-layout { display: grid; grid-template-columns: 1fr; gap: 40px; padding: 44px 0 56px; }

.prose {
  max-width: 780px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin: 36px 0 12px;
  line-height: 1.3;
}

.prose h3 { font-size: 1.12rem; margin: 26px 0 8px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 14px; color: #3A3748; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; color: #3A3748; }
.prose li { margin-bottom: 8px; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

.prose figure { margin: 22px 0; }
.prose figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-card h3 { margin: 0 0 8px; font-size: 1rem; }
.info-card p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Related tools ---------------------------------------------------------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.related-card:hover {
  border-color: #D9D2F3;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--ink);
}

.related-card .rc-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 10px;
}

.related-card .rc-icon svg { width: 20px; height: 20px; }
.related-card h3 { margin: 0 0 4px; font-size: 0.96rem; letter-spacing: -0.01em; }
.related-card p { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.blog-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  display: grid;
  place-items: center;
  color: var(--primary);
}

.blog-card-media svg { width: 52px; height: 52px; opacity: 0.75; }

.blog-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-body h2, .blog-card-body h3 { margin: 0; font-size: 1.08rem; letter-spacing: -0.015em; line-height: 1.35; }
.blog-card-body h2 a, .blog-card-body h3 a { color: var(--ink); text-decoration: none; }
.blog-card-body h2 a:hover, .blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-body p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; flex: 1; }

.blog-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.blog-meta span { display: inline-flex; align-items: center; gap: 5px; }

.article-header { max-width: 780px; margin-inline: auto; padding: 44px 0 8px; }
.article-header h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.2; margin: 14px 0; }
.article-body { max-width: 780px; margin-inline: auto; padding: 18px 0 56px; }
.article-body.prose { font-size: 1.05rem; }

.author-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  max-width: 780px;
  margin: 0 auto 56px;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.author-box strong { display: block; font-size: 0.95rem; }
.author-box span { font-size: 0.84rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Forms (contact / report)
   -------------------------------------------------------------------------- */

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  max-width: 640px;
}

.form-row { margin-bottom: 16px; }

.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-row .req { color: var(--error); }

.form-control {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.97rem;
  font-family: inherit;
  background: var(--bg-alt);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
  background: #fff;
}

textarea.form-control { min-height: 150px; resize: vertical; }

.form-help { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }

.form-alert {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.92rem;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.form-alert.success { background: #E9F7F1; border: 1px solid #BCE4D4; color: #0E6B4D; }
.form-alert.error { background: #FFF1F3; border: 1px solid #F8D4DA; color: #A82237; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Ads (hidden unless enabled)
   -------------------------------------------------------------------------- */

.ad-slot { margin: 26px auto; text-align: center; max-width: 100%; }
.ad-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

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

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 30px;
}

.footer-blurb { color: var(--ink-soft); font-size: 0.9rem; margin: 14px 0 10px; max-width: 320px; }
.footer-contact { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }
.footer-contact a { font-weight: 600; }

.footer-heading {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-soft); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: var(--primary); }

.footer-notice {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: grid;
  gap: 8px;
}

.footer-notice p { margin: 0; font-size: 0.83rem; color: var(--ink-soft); }

.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bottom p { margin: 0; font-size: 0.84rem; color: var(--ink-soft); }

.footer-legal-inline { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-legal-inline a { font-size: 0.84rem; color: var(--ink-soft); }
.footer-legal-inline a:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   Utilities / misc
   -------------------------------------------------------------------------- */

.noscript-note {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  font-size: 0.9rem;
  text-align: center;
  z-index: 100;
}

.error-page { display: grid; place-items: center; min-height: 70vh; padding: 40px 16px; background: var(--bg-alt); }
.error-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  max-width: 560px;
  box-shadow: var(--shadow-md);
}
.error-card h1 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 12px; }
.error-message { color: var(--error); font-weight: 600; }
.error-hint { color: var(--ink-soft); font-size: 0.94rem; }
.error-card .btn { margin: 8px 5px 0; }

.skeleton {
  background: linear-gradient(90deg, #EFEDF5 25%, #F7F6FB 50%, #EFEDF5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 34px 12px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.loading-dot {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 34px 18px;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
}

.empty-state h3 { color: var(--ink); margin: 0 0 8px; font-size: 1.05rem; }
.empty-state p { margin: 0 auto 14px; max-width: 460px; font-size: 0.92rem; }

.divider { height: 1px; background: var(--line); margin: 40px 0; border: 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Legal TOC -------------------------------------------------------------- */

.toc {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px 0;
}

.toc strong { display: block; margin-bottom: 8px; font-size: 0.9rem; }
.toc ul { margin: 0; padding-left: 18px; }
.toc li { font-size: 0.9rem; margin-bottom: 6px; break-inside: avoid; }

/* Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
