/* ============================================================
   DESIGN TOKENS — SUNSET PALETTE (CORAL / AMBER / PLUM)
   ============================================================ */
:root {
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-light: #ffe4e6;
  --primary-ring: rgba(225, 29, 72, 0.22);

  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #7c3aed;
  --success-light: #ede9fe;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #ea580c;
  --warning-light: #ffedd5;

  --ink: #2d1b2e;
  --ink-soft: #5b4a5c;
  --ink-muted: #9c8ea0;

  --surface: #ffffff;
  --surface-soft: #fff8f6;
  --surface-tint: #ffeede;
  --border: #f0d9d2;
  --border-strong: #e0c0b8;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(45, 27, 46, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(45, 27, 46, 0.06);
  --shadow-md: 0 12px 32px -12px rgba(45, 27, 46, 0.14);
  --shadow-lg: 0 24px 60px -20px rgba(45, 27, 46, 0.22);
  --shadow-glow: 0 12px 40px -12px rgba(225, 29, 72, 0.45);

  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }

body {
  background-color: #fff5f2;
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.55;
}

body::before {
  width: 620px; height: 620px;
  top: -240px; left: -180px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.32), transparent 65%);
}

body::after {
  width: 560px; height: 560px;
  top: 120px; right: -220px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.30), transparent 65%);
}

main, header.hero, nav.site-nav, footer.site-footer { position: relative; z-index: 1; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; }

/* ============================================================
   NAVBAR — WHITE GLASS (FROSTED)
   ============================================================ */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.9rem 0;
  background: transparent;
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-pill);
  padding: 0.4rem;
  box-shadow:
    0 12px 32px -14px rgba(45, 27, 46, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  position: relative;
  overflow: hidden;
}

.nav-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 55%);
  pointer-events: none;
}

/* Brand zone */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.32rem 1rem 0.32rem 0.4rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(240, 217, 210, 0.9);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  min-width: 0;
  transform: translateY(-1px);
}

.nav-brand:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(225, 29, 72, 0.35);
  transform: translateY(-1px);
  color: var(--ink);
}

.nav-brand .brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px -4px rgba(225, 29, 72, 0.55);
  flex-shrink: 0;
}

.nav-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.nav-brand .brand-text strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-brand .brand-text small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Center links pill group */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  padding: 0.28rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(240, 217, 210, 0.9);
}

.nav-links a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
  background: var(--primary-light);
  outline: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  opacity: 0.9;
}

.nav-links a:hover::after,
.nav-links a:focus::after { transform: scaleX(1); }

/* Right CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 20px -8px rgba(225, 29, 72, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -10px rgba(225, 29, 72, 0.7);
}

.nav-cta i { font-size: 0.9rem; }

/* Mobile toggle — pinned to right corner */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 210, 0.9);
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  font-size: 1.15rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle:hover {
  background: var(--primary-light);
  border-color: rgba(225, 29, 72, 0.35);
}
.nav-toggle:active { transform: scale(0.95); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  margin-top: 0.6rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: drawerIn 0.25s ease;
}

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

@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-drawer a i {
  color: var(--primary);
  font-size: 0.95rem;
  transition: transform 0.18s ease;
}

.nav-drawer a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-drawer a:hover i { transform: translateX(3px); }

.nav-drawer .drawer-cta {
  margin-top: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 8px 20px -8px rgba(225, 29, 72, 0.6);
}

.nav-drawer .drawer-cta:hover { background: linear-gradient(135deg, var(--primary-hover), #d97706); color: #fff !important; }
.nav-drawer .drawer-cta i { color: #fff; }

/* ============================================================
   HERO
   ============================================================ */
header.hero { padding: 3rem 0 3.5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  border: 1px solid rgba(225, 29, 72, 0.22);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.4rem;
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

header.hero h1 {
  font-weight: 900;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

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

header.hero p.lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.68;
  max-width: 560px;
  margin-bottom: 1.6rem;
}

.hero-stats { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hero-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.hero-chip i { color: var(--success); font-size: 0.85rem; }

.hero-visual { position: relative; display: flex; justify-content: center; }

.hero-preview {
  background: linear-gradient(180deg, #ffffff 0%, #fff4ef 100%);
  border: 1px solid rgba(240, 217, 210, 0.9);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 340px;
  transform: rotate(-2deg);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-preview:hover { transform: rotate(0deg) translateY(-4px); }

.hero-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-preview-head small {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-preview-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--success-light);
  color: #5b21b6;
}

.hero-preview-file {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.hero-preview-file:last-child { margin-bottom: 0; }

.hero-preview-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #fff;
}

.hero-preview-file:nth-child(1) .hero-preview-thumb { background: linear-gradient(135deg, #fb7185, #e11d48); }
.hero-preview-file:nth-child(2) .hero-preview-thumb { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.hero-preview-file:nth-child(3) .hero-preview-thumb { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

.hero-preview-name {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.hero-preview-name small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.hero-preview-check { color: var(--success); font-size: 0.9rem; }

/* ============================================================
   TOOL CARDS
   ============================================================ */
.tool-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.tool-card.workspace-dragover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow-md);
  background-color: #fffaf7;
}

/* ============================================================
   DROPZONE
   ============================================================ */
.dropzone {
  position: relative;
  border: 2px dashed transparent;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(var(--surface-soft), var(--surface-soft)) padding-box,
    linear-gradient(135deg, rgba(225, 29, 72, 0.45), rgba(245, 158, 11, 0.45)) border-box;
  padding: 3.5rem 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  overflow: hidden;
}

.dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(225, 29, 72, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.dropzone:hover::before,
.dropzone.dragover::before { transform: translateX(100%); }

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  outline: none;
}

.dropzone-inner { position: relative; z-index: 1; }

.dropzone-icon-wrap {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.2rem;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 2.3rem;
  box-shadow: 0 14px 30px -12px rgba(225, 29, 72, 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone:hover .dropzone-icon-wrap,
.dropzone.dragover .dropzone-icon-wrap { transform: scale(1.08) rotate(-4deg); }

.dropzone h2, .dropzone .dz-title { font-size: 1.25rem; font-weight: 800; }
.dropzone .hint { color: var(--ink-muted); font-size: 0.92rem; }
.dropzone .hint strong { color: var(--ink-soft); }

.dropzone-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1.7rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.dropzone-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.dropzone-meta i { color: var(--success); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-weight: 600;
  border-radius: 11px;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-active-bg: var(--primary-hover);
  --bs-btn-active-border-color: var(--primary-hover);
  box-shadow: 0 8px 20px -8px rgba(225, 29, 72, 0.65);
  background-image: linear-gradient(135deg, var(--primary) 0%, #f43f5e 100%);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(225, 29, 72, 0.7);
}

.btn-primary:active { transform: translateY(0); }

.btn-success {
  --bs-btn-bg: var(--success);
  --bs-btn-border-color: var(--success);
  --bs-btn-hover-bg: #6d28d9;
  --bs-btn-hover-border-color: #6d28d9;
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.55);
}

.btn-lg { border-radius: 13px; }

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: rgba(225, 29, 72, 0.35);
  --bs-btn-hover-bg: var(--primary-light);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-hover-color: var(--primary);
  --bs-btn-active-bg: var(--primary-light);
  --bs-btn-active-color: var(--primary);
}

/* ============================================================
   PRESET CHIPS
   ============================================================ */
.preset-btn {
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  background: var(--surface);
  transition: all 0.18s ease;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.preset-btn.active {
  background: linear-gradient(135deg, var(--primary), #f43f5e) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(225, 29, 72, 0.65);
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin-bottom: 0.45rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background-color: var(--surface);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-control:hover,
.form-select:hover { border-color: var(--border-strong); }

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

.input-group-lg > .form-control,
.input-group-lg > .form-select {
  padding: 0.65rem 0.95rem;
  font-size: 1.1rem;
}

.input-group-lg > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-lg > .form-select { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none; }

.form-text { color: var(--ink-muted); font-size: 0.78rem; margin-top: 0.4rem; }

.form-range::-webkit-slider-thumb { background: var(--primary); }
.form-range::-moz-range-thumb { background: var(--primary); }

/* ============================================================
   FILE QUEUE
   ============================================================ */
.file-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-left-color: var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.9rem 0.9rem 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.file-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.file-item[data-status="pending"] { border-left-color: var(--border-strong); }
.file-item[data-status="processing"] { border-left-color: var(--warning); }
.file-item[data-status="done"] { border-left-color: var(--success); }
.file-item[data-status="error"] { border-left-color: var(--danger); }

.thumb-preview {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 11px;
  background-color: var(--surface-tint);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.badge-soft-success {
  background-color: var(--success-light);
  color: #5b21b6;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
}

.badge-soft-primary {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
}

/* ============================================================
   PANEL HEADING
   ============================================================ */
.panel-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.panel-heading .icon-box {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(225, 29, 72, 0.55);
}

.panel-heading h2 { font-size: 1.02rem; font-weight: 800; margin: 0; }

.step-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.7rem;
  margin-left: auto;
  white-space: nowrap;
}

/* ============================================================
   ARTICLE SECTION
   ============================================================ */
.article-wrap { max-width: 1120px; margin: 0 auto; }

.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.article-toc { position: sticky; top: 96px; }

.toc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.9rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border);
}

.toc-list li { margin: 0; }

.toc-list a {
  position: relative;
  display: block;
  padding: 0.45rem 0 0.45rem 1.1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.toc-list a::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transition: transform 0.18s ease;
}

.toc-list a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  background: linear-gradient(90deg, var(--primary-light), transparent);
  border-radius: 0 8px 8px 0;
}

.toc-list a:hover::before { transform: translateY(-50%) scale(1); }

.article-body { min-width: 0; }

.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 0.36rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.article-body h2.article-title {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.038em;
  color: var(--ink);
  margin: 0 0 1.1rem;
}

.article-body > p.article-lede {
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.article-body h2 {
  font-weight: 800;
  color: var(--ink);
  font-size: 1.38rem;
  letter-spacing: -0.028em;
  margin: 2.5rem 0 0.85rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.article-body h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.article-body h3 {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.06rem;
  margin: 1.5rem 0 0.55rem;
}

.article-body p {
  margin-bottom: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.article-body strong { color: var(--ink); font-weight: 700; }

.article-body code {
  background: var(--surface-tint);
  color: var(--primary);
  padding: 0.14rem 0.44rem;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
}

.article-figure {
  margin: 1.6rem 0 1.8rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--surface-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-figure:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 0.85rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  font-weight: 500;
}

.article-figure figcaption strong { color: var(--ink-soft); font-weight: 700; }

.step-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.4rem;
  counter-reset: step;
  display: grid;
  gap: 0.65rem;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.15rem 1rem 3.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--ink-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.step-list li:hover {
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px -3px rgba(225, 29, 72, 0.55);
}

.article-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 1.15rem 0 1.5rem;
}

.article-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.article-callout:hover {
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.article-callout .callout-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.98rem;
  margin-bottom: 0.6rem;
}

.article-callout.callout-success .callout-icon { background: var(--success-light); color: #5b21b6; }
.article-callout.callout-cyan   .callout-icon { background: var(--accent-light); color: #b45309; }

.article-callout h3 { font-size: 0.9rem; font-weight: 800; color: var(--ink); margin: 0 0 0.25rem; }
.article-callout p { font-size: 0.81rem; line-height: 1.55; color: var(--ink-muted); margin: 0; }

.tip-box {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  margin: 1.3rem 0;
  border: 1px solid;
  font-size: 0.9rem;
  line-height: 1.65;
}

.tip-box i { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }

.tip-box.tip-primary {
  background: var(--primary-light);
  border-color: rgba(225, 29, 72, 0.22);
  color: #9f1239;
}
.tip-box.tip-primary i { color: var(--primary); }

.tip-box.tip-warning {
  background: #fffbeb;
  border-color: rgba(234, 88, 12, 0.28);
  color: #9a3412;
}
.tip-box.tip-warning i { color: var(--warning); }

.tip-box strong { color: inherit; }

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 1.15rem 0 1.4rem;
}

.format-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.05rem 1rem;
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.format-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.format-card.fmt-jpg::before  { background: linear-gradient(90deg, #e11d48, #fb7185); }
.format-card.fmt-png::before  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.format-card.fmt-webp::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.format-card:hover {
  border-color: rgba(225, 29, 72, 0.32);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.format-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}

.format-tag.jpg  { background: #ffe4e6; color: #9f1239; }
.format-tag.png  { background: #fef3c7; color: #b45309; }
.format-tag.webp { background: #ede9fe; color: #5b21b6; }

.format-card p { font-size: 0.83rem; line-height: 1.6; margin: 0; color: var(--ink-soft); }

.privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fef2f2 0%, #fffbeb 100%);
  border: 1px solid rgba(225, 29, 72, 0.25);
  margin: 1.5rem 0 1rem;
}

.privacy-banner .privacy-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 6px 14px -5px rgba(225, 29, 72, 0.6);
}

.privacy-banner h3 { font-size: 0.95rem; font-weight: 800; color: var(--ink); margin: 0 0 0.3rem; }
.privacy-banner p { font-size: 0.87rem; line-height: 1.65; color: var(--ink-soft); margin: 0; }

.faq-heading-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 2.25rem 0 0.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.faq-heading-wrap .faq-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1rem;
}

.faq-heading-wrap h2 {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 1.38rem !important;
}

.accordion { --bs-accordion-border-radius: var(--radius-md); }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md) !important;
  margin-bottom: 0.65rem;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.accordion-button {
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  padding: 1.05rem 1.2rem;
  font-size: 0.97rem;
  border-radius: var(--radius-md) !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: none;
}

.accordion-button:focus { box-shadow: 0 0 0 4px var(--primary-ring); z-index: 1; }
.accordion-body { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.7; }

.progress {
  border-radius: var(--radius-pill);
  background: var(--surface-tint);
  overflow: hidden;
}

.progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)); }

footer.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.6rem 0 1.6rem;
  margin-top: 4rem;
}

footer.site-footer .brand-mark { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.8rem;
}

.footer-brandline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.55rem;
  font-size: 1rem;
}

.footer-tag {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 320px;
  margin: 0;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.16s ease;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.footer-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.footer-stat-pill i { color: var(--success); }

.fade-in-section { animation: fadeIn 0.35s ease-in-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { display: none; }
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .article-toc {
    position: static;
    padding: 1rem 1.1rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }
  .toc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; border-left: none; }
  .toc-list a { padding: 0.3rem 0 0.3rem 0.55rem; border-left-width: 2px; }
  .toc-list a::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* MOBILE: hamburger pinned to the right corner */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-shell { padding: 0.4rem 0.5rem 0.4rem 0.4rem; }
  .nav-brand { padding: 0.32rem 0.9rem 0.32rem 0.4rem; max-width: calc(100% - 60px); }
  .nav-brand .brand-text small { display: none; }
}

@media (max-width: 767.98px) {
  header.hero { padding: 2rem 0 2.2rem; }
  .article-body h2 { font-size: 1.22rem; }
  .toc-list { grid-template-columns: 1fr; }
  .step-list li { padding: 0.9rem 1rem 0.9rem 3.2rem; }
  .step-list li::before { top: 0.9rem; }
  .privacy-banner { flex-direction: column; gap: 0.65rem; }
  .dropzone { padding: 2.4rem 1rem; }
  .file-item { padding: 0.75rem 0.75rem 0.75rem 0.85rem; }
  .thumb-preview { width: 54px; height: 54px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  body::before, body::after { opacity: 0.35; }
  .article-figure img { max-height: 260px; }
  .article-figure figcaption { font-size: 0.78rem; padding: 0.7rem 0.9rem; }
}

/* Perf: drop heavy blurred background blobs on small screens */
@media (max-width: 767.98px) {
  body::before, body::after { display: none; }
}