/* ==========================================================================
   Utilify — design tokens
   ========================================================================== */
:root {
  --background: #f5f7fa;
  --surface: #ffffff;
  --foreground: #0e1726;
  --muted: #5b6577;
  --border: #e2e7ef;
  --primary: #1f5eff;
  --primary-ink: #ffffff;
  --primary-soft: #e8efff;
  --accent: #ffb020;
  --danger: #d93a3a;
  --success: #138a52;

  --checker-a: #ffffff;
  --checker-b: #e6eaf1;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 23, 38, 0.04), 0 8px 24px rgba(14, 23, 38, 0.06);

  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
}

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

html {
  background: var(--background);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.checker {
  background-color: var(--checker-a);
  background-image:
    linear-gradient(45deg, var(--checker-b) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-b) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-b) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-b) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

/* ==========================================================================
   Buttons & form controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-primary:hover {
  background: #1a4fd9;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  border-color: var(--foreground);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

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

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 14px;
  font-weight: 600;
}

.hint {
  font-size: 14px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.textarea.mono,
.mono {
  font-family: var(--font-mono);
  font-size: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 250, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-cta {
  display: none;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 12px 20px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 15px;
}

.mobile-nav a:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

@media (min-width: 960px) {
  .nav {
    display: flex;
  }
  .header-cta {
    display: inline-flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* ==========================================================================
   Ad slots
   ========================================================================== */
.ad-wrap {
  display: flex;
  justify-content: center;
  padding-block: 16px;
}

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot:empty {
  display: none;
}

.ad-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.ad-frame {
  border: 0;
  max-width: 100%;
  display: block;
}

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  border: 1.5px dashed #c5cdda;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(31, 94, 255, 0.035) 8px,
    rgba(31, 94, 255, 0.035) 16px
  );
}

.ad-placeholder strong {
  color: var(--foreground);
  font-family: var(--font-heading);
  font-size: 14px;
}

.ad-sticky {
  position: sticky;
  top: 84px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-block: 40px 24px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

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

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin-top: 18px;
}

.hero h1 .hl {
  color: var(--primary);
}

.hero-lead {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

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

.hero-points .icon {
  color: var(--success);
}

/* Before / after comparison */
.compare {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  user-select: none;
  touch-action: pan-y;
  --pos: 50%;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare .compare-after {
  clip-path: inset(0 0 0 var(--pos));
}

.compare .compare-after-bg {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: var(--surface);
  transform: translateX(-1px);
  pointer-events: none;
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.compare-tag {
  position: absolute;
  top: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(14, 23, 38, 0.72);
  color: var(--primary-ink);
  pointer-events: none;
}

.compare-tag.left {
  left: 14px;
}

.compare-tag.right {
  right: 14px;
  background: var(--primary);
}

@media (min-width: 960px) {
  .hero {
    padding-block: 64px 32px;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 64px;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-block: 56px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

/* Tool grid */
.tool-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

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

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

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  text-decoration: none;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.tool-card h3 {
  font-size: 19px;
}

.tool-card p {
  color: var(--muted);
  font-size: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--foreground);
}

.tool-card.featured {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  padding: 0;
  overflow: hidden;
}

.tool-card.featured .featured-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  justify-content: center;
}

.tool-card.featured .featured-media {
  min-height: 200px;
  position: relative;
}

.tool-card.featured .featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-card.featured h3 {
  font-size: 26px;
}

@media (min-width: 640px) {
  .tool-card.featured {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* Feature list */
.features {
  display: grid;
  gap: 16px;
}

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

.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature h3 {
  font-size: 18px;
}

.feature p {
  color: var(--muted);
  font-size: 15px;
}

.feature .tool-icon {
  margin-bottom: 4px;
}

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

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

.steps li {
  counter-increment: step;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.steps li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.steps h3 {
  font-size: 18px;
}

.steps p {
  color: var(--muted);
  font-size: 15px;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding-bottom: 16px;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  border-radius: 20px;
  background: var(--foreground);
  color: var(--surface);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.cta-band h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.cta-band p {
  color: #b7c0cf;
}

@media (min-width: 768px) {
  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px;
  }
}

/* ==========================================================================
   Tool page layout
   ========================================================================== */
.page-head {
  padding-block: 28px 8px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.page-head h1 {
  font-size: clamp(30px, 4.5vw, 44px);
}

.page-head p {
  color: var(--muted);
  font-size: 17px;
  margin-top: 10px;
  max-width: 680px;
}

.tool-layout {
  display: grid;
  gap: 24px;
  padding-block: 16px 48px;
}

@media (min-width: 1024px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.tool-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

@media (min-width: 768px) {
  .panel {
    padding: 28px;
  }
}

.panel-title {
  font-size: 18px;
  margin-bottom: 14px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.related {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 15px;
}

.related a:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.related .icon {
  color: var(--primary);
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed #c5cdda;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  background: var(--background);
  transition: border-color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone .tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.dropzone strong {
  font-family: var(--font-heading);
  font-size: 18px;
}

.dropzone span {
  font-size: 14px;
  color: var(--muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.grid-2 {
  display: grid;
  gap: 16px;
}

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

.grid-3 {
  display: grid;
  gap: 16px;
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-box {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-box img,
.preview-box canvas {
  max-height: 460px;
  width: auto;
  object-fit: contain;
}

.preview-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

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

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

.stat {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--background);
  border: 1px solid var(--border);
}

.stat b {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.2;
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress > div {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.2s ease;
}

.status {
  font-size: 14px;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
}

.swatch[aria-pressed="true"] {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

input[type="color"].swatch {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  overflow: hidden;
}

input[type="color"].swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"].swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

input[type="color"].swatch::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.result-row img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.result-info strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-info span {
  font-size: 13px;
  color: var(--muted);
}

.badge-good {
  background: #e3f5ec;
  border-color: #bfe6d1;
  color: var(--success);
}

.status.ok {
  color: var(--success);
}

.keyword-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

@media (min-width: 640px) {
  .keyword-list {
    grid-template-columns: 1fr 1fr;
  }
}

.keyword-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--background);
  border: 1px solid var(--border);
  font-size: 14px;
}

.keyword-list li span:last-child {
  color: var(--muted);
}

.keyword-list li.hint {
  grid-column: 1 / -1;
  background: transparent;
  border: 0;
  padding: 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

.output-line {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.output-line .input {
  font-family: var(--font-mono);
  font-size: 15px;
}

.strength {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.strength > div {
  height: 100%;
  width: 0;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.prose {
  color: var(--foreground);
}

.prose h2 {
  font-size: 24px;
  margin: 28px 0 10px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 18px;
  margin: 20px 0 8px;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose p + p {
  margin-top: 12px;
}

.prose ul {
  padding-left: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--foreground);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-block: 48px 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-grid h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-grid a {
  color: var(--foreground);
  font-size: 15px;
}

.footer-about {
  color: var(--muted);
  font-size: 15px;
  margin-top: 12px;
  max-width: 320px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 0.6s ease forwards;
  }
  .reveal.d1 {
    animation-delay: 0.08s;
  }
  .reveal.d2 {
    animation-delay: 0.16s;
  }
  .reveal.d3 {
    animation-delay: 0.24s;
  }
  .reveal.d4 {
    animation-delay: 0.32s;
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}
