/* =====================================================
       CSS CUSTOM PROPERTIES — Design tokens
       ===================================================== */
    :root {
      --bg:        #F5F3EE;
      --surface:   #FDFCFA;
      --border:    #E4E0D8;
      --ink:       #1A1714;
      --ink-2:     #5C564E;
      --ink-3:     #9B9389;
      --accent:    #E85D2F;
      --accent-2:  #F5B946;
      --accent-dk: #C44018;
      --green:     #2DA882;
      --radius:    14px;
      --radius-sm: 8px;
      --shadow:    0 2px 12px rgba(26,23,20,.08);
      --shadow-lg: 0 8px 40px rgba(26,23,20,.12);
      --font-d:    'Syne', sans-serif;
      --font-b:    'DM Sans', sans-serif;
      --transition: .2s cubic-bezier(.4,0,.2,1);
    }

    /* =====================================================
       RESET & BASE
       ===================================================== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: var(--font-b);
      background: var(--bg);
      color: var(--ink);
      min-height: 100vh;
      font-size: 15px;
      line-height: 1.6;
    }
    img, svg { display: block; }
    button { cursor: pointer; border: none; background: none; font-family: inherit; }
    a { text-decoration: none; color: inherit; }
    input[type="file"] { display: none; }

    /* Consistent, visible focus ring for keyboard users — only shows
       on keyboard focus (:focus-visible), never on mouse clicks. */
    :focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* =====================================================
       NOISE TEXTURE OVERLAY
       ===================================================== */
    body::before {
      content: '';
      position: fixed; inset: 0; z-index: 0;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
      opacity: .4;
    }

    /* =====================================================
       LAYOUT HELPERS
       ===================================================== */
    .container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
    .section { padding: 80px 0; }

    /* =====================================================
       NAV
       ===================================================== */
    nav {
      position: sticky; top: 0; z-index: 100;
      background: rgba(245,243,238,.88);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
    }
    .nav-inner {
      display: flex; align-items: center; justify-content: space-between;
      height: 60px;
    }
    .logo {
      font-family: var(--font-d);
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -.02em;
      color: var(--ink);
      display: flex; align-items: center; gap: 8px;
    }
    .logo-dot { color: var(--accent); }
    .nav-links { display: flex; gap: 6px; }
    .nav-links a {
      font-size: .85rem;
      font-weight: 500;
      color: var(--ink-2);
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      transition: background var(--transition), color var(--transition);
    }
    .nav-links a:hover { background: var(--border); color: var(--ink); }

    /* =====================================================
       HERO
       ===================================================== */
    .hero {
      padding: 96px 0 64px;
      text-align: center;
    }
    .hero-badge {
      display: inline-flex; align-items: center; gap: 6px;
      background: rgba(232,93,47,.1);
      color: var(--accent);
      font-size: .75rem;
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      padding: 5px 12px;
      border-radius: 99px;
      margin-bottom: 24px;
      border: 1px solid rgba(232,93,47,.2);
    }
    .hero h1 {
      font-family: var(--font-d);
      font-size: clamp(2.4rem, 6vw, 4rem);
      font-weight: 800;
      line-height: 1.12;
      letter-spacing: -.03em;
      color: var(--ink);
      margin-bottom: 20px;
    }
    .hero h1 em { color: var(--accent); font-style: normal; }
    .hero p {
      font-size: 1.1rem;
      color: var(--ink-2);
      max-width: 560px;
      margin: 0 auto 40px;
      font-weight: 300;
    }
    .hero-stats {
      display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
      margin-top: 48px;
    }
    .stat { text-align: center; }
    .stat strong {
      display: block;
      font-family: var(--font-d);
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--ink);
      letter-spacing: -.02em;
    }
    .stat span { font-size: .8rem; color: var(--ink-3); }

    /* =====================================================
       PRIVACY BANNER
       ===================================================== */
    .privacy-banner {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 24px;
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 32px 0 0;
      max-width: 640px;
      margin-left: auto;
      margin-right: auto;
    }
    .privacy-icon { font-size: 1.4rem; flex-shrink: 0; }
    .privacy-banner p { font-size: .85rem; color: var(--ink-2); }
    .privacy-banner strong { color: var(--ink); }

    /* =====================================================
       TOOLS GRID
       ===================================================== */
    .tools-section h2,
    .how-section h2,
    .faq-section h2 {
      font-family: var(--font-d);
      font-size: 1.8rem;
      font-weight: 700;
      letter-spacing: -.02em;
    }
    .tools-section h2 { margin-bottom: 8px; }
    .tools-section .subtitle {
      color: var(--ink-2);
      margin-bottom: 40px;
      font-size: .95rem;
    }
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 14px;
    }

    /* Tool card */
    .tool-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px 22px;
      cursor: pointer;
      text-decoration: none;
      color: inherit;
      transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .tool-card::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 3px;
      background: var(--tool-color, var(--accent));
      transform: scaleX(0);
      transform-origin: left;
      transition: transform var(--transition);
    }
    .tool-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-lg);
      border-color: var(--tool-color, var(--accent));
    }
    .tool-card:active { transform: translateY(-1px) scale(.99); }
    .tool-card:hover::after { transform: scaleX(1); }
    .tool-icon {
      width: 44px; height: 44px;
      border-radius: 10px;
      background: color-mix(in srgb, var(--tool-color, var(--accent)) 12%, transparent);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem;
    }
    .tool-card h3 {
      font-family: var(--font-d);
      font-size: .95rem;
      font-weight: 600;
      letter-spacing: -.01em;
    }
    .tool-card p {
      font-size: .8rem;
      color: var(--ink-3);
      line-height: 1.5;
      flex: 1;
    }
    .tool-arrow {
      color: var(--ink-3);
      font-size: .85rem;
      align-self: flex-start;
      transition: color var(--transition), transform var(--transition);
    }
    .tool-card:hover .tool-arrow {
      color: var(--tool-color, var(--accent));
      transform: translateX(4px);
    }

    /* =====================================================
       AD SLOTS
       ===================================================== */
    .ad-slot {
      background: var(--surface);
      border: 1px dashed var(--border);
      border-radius: var(--radius);
      height: 90px;
      display: flex; align-items: center; justify-content: center;
      color: var(--ink-3);
      font-size: .75rem;
      letter-spacing: .06em;
      text-transform: uppercase;
      margin: 32px 0;
    }
    .ad-slot-vertical {
      height: 280px;
    }

    /* =====================================================
       HOW IT WORKS
       ===================================================== */
    .how-section { background: var(--surface); border-radius: var(--radius); padding: 56px; }
    .how-section h2 { margin-bottom: 40px; }
    .steps {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 32px;
    }
    .step { display: flex; flex-direction: column; gap: 12px; }
    .step-num {
      font-family: var(--font-d);
      font-size: 2rem;
      font-weight: 800;
      color: var(--accent);
      opacity: .3;
      line-height: 1;
    }
    .step h3 {
      font-family: var(--font-d);
      font-size: .95rem;
      font-weight: 700;
    }
    .step p { font-size: .82rem; color: var(--ink-2); }

    /* =====================================================
       FAQ
       ===================================================== */
    .faq-section h2 { margin-bottom: 32px; }
    .faq-list { display: flex; flex-direction: column; gap: 2px; }
    .faq-item {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }
    .faq-q {
      padding: 18px 20px;
      font-weight: 500;
      font-size: .9rem;
      display: flex; justify-content: space-between; align-items: center;
      cursor: pointer;
      transition: background var(--transition);
    }
    .faq-q:hover { background: var(--bg); }
    .faq-toggle { font-size: 1.2rem; color: var(--ink-3); transition: transform var(--transition); }
    .faq-a {
      padding: 0 20px;
      max-height: 0;
      overflow: hidden;
      font-size: .85rem;
      color: var(--ink-2);
      transition: max-height .3s ease, padding .3s ease;
    }
    .faq-item.open .faq-a { max-height: 200px; padding: 0 20px 18px; }
    .faq-item.open .faq-toggle { transform: rotate(45deg); }

    /* =====================================================
       FOOTER
       ===================================================== */
    footer {
      border-top: 1px solid var(--border);
      padding: 40px 0;
      margin-top: 80px;
    }
    .footer-inner {
      display: flex; justify-content: space-between; align-items: center;
      flex-wrap: wrap; gap: 16px;
    }
    .footer-copy { font-size: .8rem; color: var(--ink-3); }
    .footer-links { display: flex; gap: 20px; }
    .footer-links a { font-size: .8rem; color: var(--ink-3); transition: color var(--transition); }
    .footer-links a:hover { color: var(--accent); }

    /* =====================================================
       MODAL / TOOL OVERLAY
       ===================================================== */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(26,23,20,.6);
      backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .modal-overlay.active { display: flex; animation: overlayFadeIn .2s ease; }
    .modal-overlay.closing { animation: overlayFadeOut .18s ease forwards; }
    .modal {
      background: var(--surface);
      border-radius: 20px;
      width: 100%;
      max-width: 860px;
      max-height: 92vh;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
      animation: slideUp .25s cubic-bezier(.4,0,.2,1);
    }
    .modal-overlay.closing .modal {
      animation: slideDown .18s cubic-bezier(.4,0,.2,1) forwards;
    }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(24px) scale(.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes slideDown {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to   { opacity: 0; transform: translateY(14px) scale(.97); }
    }
    @keyframes overlayFadeIn  { from { opacity: 0; } to { opacity: 1; } }
    @keyframes overlayFadeOut { from { opacity: 1; } to { opacity: 0; } }
    .modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 22px 26px;
      border-bottom: 1px solid var(--border);
      position: sticky; top: 0;
      background: var(--surface);
      z-index: 2;
    }
    .modal-title {
      display: flex; align-items: center; gap: 12px;
    }
    .modal-title-icon {
      width: 36px; height: 36px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem;
    }
    .modal-title h2 {
      font-family: var(--font-d);
      font-size: 1.1rem;
      font-weight: 700;
    }
    .modal-close {
      width: 32px; height: 32px;
      border-radius: 8px;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem;
      color: var(--ink-2);
      transition: background var(--transition);
    }
    .modal-close:hover { background: var(--border); }
    .modal-body { padding: 26px; }

    /* =====================================================
       DROP ZONE
       ===================================================== */
    .dropzone {
      border: 2px dashed var(--border);
      border-radius: var(--radius);
      padding: 48px 32px;
      text-align: center;
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition), transform var(--transition);
      background: var(--bg);
    }
    .dropzone:hover, .dropzone.over {
      border-color: var(--accent);
      background: rgba(232,93,47,.04);
    }
    .dropzone.over { transform: scale(1.01); }
    /* Transient states — set briefly by JS after a drop/selection */
    .dropzone.dz-processing {
      border-color: var(--accent);
      background: rgba(232,93,47,.04);
      cursor: wait;
      pointer-events: none;
    }
    .dropzone.dz-success {
      border-color: var(--green);
      background: rgba(45,168,130,.06);
    }
    .dropzone.dz-error {
      border-color: #E84F4F;
      background: rgba(232,79,79,.05);
      animation: dzShake .35s ease;
    }
    @keyframes dzShake {
      0%, 100% { transform: translateX(0); }
      25%      { transform: translateX(-4px); }
      75%      { transform: translateX(4px); }
    }
    .dropzone-icon { font-size: 2.5rem; margin-bottom: 12px; transition: transform var(--transition); }
    .dropzone.dz-processing .dropzone-icon { animation: dzPulse 1.1s ease-in-out infinite; }
    @keyframes dzPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
    .dropzone h3 {
      font-family: var(--font-d);
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .dropzone p { font-size: .82rem; color: var(--ink-3); }
    .dropzone .btn-browse {
      margin-top: 16px;
      display: inline-block;
      background: var(--accent);
      color: #fff;
      padding: 9px 20px;
      border-radius: var(--radius-sm);
      font-size: .85rem;
      font-weight: 500;
      transition: background var(--transition);
    }
    .dropzone .btn-browse:hover { background: var(--accent-dk); }

    /* =====================================================
       FILE LIST
       ===================================================== */
    .file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
    .file-item {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      display: flex; align-items: center; gap: 10px;
      font-size: .85rem;
    }
    .file-item-icon { font-size: 1.2rem; }
    .file-item-name { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .file-item-size { color: var(--ink-3); font-size: .75rem; flex-shrink: 0; }
    .file-item-remove { color: var(--ink-3); font-size: .9rem; transition: color var(--transition); cursor: pointer; }
    .file-item-remove:hover { color: var(--accent); }

    /* =====================================================
       PREVIEW GRID
       ===================================================== */
    .preview-container { margin-top: 20px; }
    .preview-label {
      font-size: .8rem;
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--ink-3);
      margin-bottom: 12px;
    }
    .pages-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 10px;
      max-height: 340px;
      overflow-y: auto;
      padding: 4px;
    }
    .page-thumb {
      border: 2px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
      cursor: pointer;
      position: relative;
      transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
      background: white;
    }
    .page-thumb, .reorder-thumb {
      animation: thumbFadeIn .3s cubic-bezier(.4,0,.2,1) both;
    }
    @keyframes thumbFadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .page-thumb, .reorder-thumb { animation: none; }
    }
    .page-thumb.selected {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(232,93,47,.2);
    }
    .page-thumb canvas { width: 100% !important; height: auto !important; display: block; }
    .page-thumb-num {
      position: absolute; bottom: 4px; left: 50%;
      transform: translateX(-50%);
      background: rgba(26,23,20,.6);
      color: #fff;
      font-size: .65rem;
      padding: 2px 6px;
      border-radius: 99px;
      font-weight: 500;
    }
    .page-thumb:hover { border-color: var(--accent); }
    .page-thumb .check {
      position: absolute; top: 4px; right: 4px;
      background: var(--accent);
      color: #fff;
      width: 18px; height: 18px;
      border-radius: 50%;
      font-size: .65rem;
      display: none;
      align-items: center;
      justify-content: center;
    }
    .page-thumb.selected .check { display: flex; }

    /* =====================================================
       TOOL CONTROLS
       ===================================================== */
    .controls { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
    .control-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .control-label { font-size: .82rem; font-weight: 500; color: var(--ink-2); min-width: 120px; }
    .control-input {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-family: var(--font-b);
      font-size: .85rem;
      background: var(--bg);
      color: var(--ink);
      transition: border-color var(--transition);
    }
    .control-input:focus { outline: none; border-color: var(--accent); }
    .hint { font-size: .75rem; color: var(--ink-3); }

    /* =====================================================
       BUTTONS
       ===================================================== */
    .btn {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 10px 22px;
      border-radius: var(--radius-sm);
      font-family: var(--font-b);
      font-size: .88rem;
      font-weight: 500;
      transition: background var(--transition), color var(--transition),
                  transform var(--transition), opacity var(--transition);
      cursor: pointer;
    }
    .btn-primary {
      background: var(--accent);
      color: #fff;
    }
    .btn-primary:hover { background: var(--accent-dk); transform: translateY(-1px); }
    .btn-primary:active { transform: translateY(0); }
    .btn-secondary {
      background: var(--bg);
      color: var(--ink);
      border: 1px solid var(--border);
    }
    .btn-secondary:hover { background: var(--border); }
    .btn-lg { padding: 13px 28px; font-size: .95rem; }
    .btn:disabled { opacity: .4; pointer-events: none; }
    .btn-spinner {
      width: 13px; height: 13px;
      border: 2px solid rgba(255,255,255,.4);
      border-top-color: #fff;
      border-radius: 50%;
      animation: btnSpin .7s linear infinite;
      flex-shrink: 0;
    }
    @keyframes btnSpin { to { transform: rotate(360deg); } }

    /* =====================================================
       ACTION BAR
       ===================================================== */
    .action-bar {
      display: flex; align-items: center; justify-content: space-between;
      flex-wrap: wrap; gap: 12px;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid var(--border);
    }
    .action-bar-left { display: flex; gap: 8px; flex-wrap: wrap; }

    /* =====================================================
       PROGRESS / STATUS
       ===================================================== */
    .status-bar {
      margin-top: 16px;
      display: none;
      opacity: 0;
      transition: opacity .2s ease;
    }
    .status-bar.visible { display: block; }
    .status-bar.visible.shown { opacity: 1; }
    .progress-track {
      height: 4px;
      background: var(--border);
      border-radius: 99px;
      overflow: hidden;
      margin-bottom: 8px;
      position: relative;
    }
    .progress-fill {
      height: 100%;
      background: var(--accent);
      border-radius: 99px;
      transition: width .4s cubic-bezier(.4,0,.2,1);
      width: 0%;
    }
    /* Indeterminate mode — used whenever we don't have a real,
       measurable progress value. Never fake a percentage. */
    .progress-track.indeterminate .progress-fill {
      width: 35%;
      position: absolute;
      animation: progressIndeterminate 1.2s ease-in-out infinite;
    }
    @keyframes progressIndeterminate {
      0%   { left: -35%; }
      100% { left: 100%; }
    }
    .status-msg {
      font-size: .8rem;
      color: var(--ink-2);
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .status-msg::before {
      content: '';
      width: 11px; height: 11px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      flex-shrink: 0;
      animation: btnSpin .7s linear infinite;
    }
    .status-bar.done .status-msg::before {
      border: none;
      width: auto; height: auto;
      animation: none;
      content: '✓';
      color: var(--green);
      font-weight: 700;
    }

    /* =====================================================
       TOASTS / NOTIFICATIONS
       Replaces alert() — non-blocking, stacked, auto-dismiss.
       ===================================================== */
    .toast-container {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-width: 360px;
      pointer-events: none;
    }
    .toast {
      pointer-events: auto;
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 4px solid var(--toast-color, var(--accent));
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-lg);
      padding: 13px 14px 13px 16px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-family: var(--font-b);
      opacity: 0;
      transform: translateX(24px) scale(.98);
      transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1);
    }
    .toast.show { opacity: 1; transform: translateX(0) scale(1); }
    .toast.hide { opacity: 0; transform: translateX(24px) scale(.98); }
    .toast-icon { font-size: 1.05rem; line-height: 1.4; flex-shrink: 0; }
    .toast-body { flex: 1; min-width: 0; }
    .toast-msg { font-size: .85rem; color: var(--ink); line-height: 1.4; }
    .toast-close {
      flex-shrink: 0;
      width: 22px; height: 22px;
      border-radius: 6px;
      display: flex; align-items: center; justify-content: center;
      color: var(--ink-3);
      font-size: .8rem;
      transition: background var(--transition), color var(--transition);
    }
    .toast-close:hover { background: var(--bg); color: var(--ink); }
    .toast-success { --toast-color: var(--green); }
    .toast-info     { --toast-color: #5B6AF0; }
    .toast-warning  { --toast-color: var(--accent-2); }
    .toast-error    { --toast-color: #E84F4F; }

    @media (max-width: 600px) {
      .toast-container { left: 16px; right: 16px; bottom: 16px; max-width: none; }
    }

    /* =====================================================
       ROTATE CONTROLS
       ===================================================== */
    .rotate-btns { display: flex; gap: 8px; }
    .rotate-btn {
      width: 40px; height: 40px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem;
      transition: border-color var(--transition), background var(--transition);
    }
    .rotate-btn:hover { border-color: var(--accent); background: rgba(232,93,47,.06); }

    /* =====================================================
       DRAG REORDER
       ===================================================== */
    .reorder-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 10px;
      max-height: 400px;
      overflow-y: auto;
      padding: 2px; /* room for box-shadow on edges */
    }
    .reorder-thumb {
      border: 2px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: white;
      cursor: grab;
      position: relative;
      user-select: none;
      transition: border-color var(--transition), transform var(--transition),
                  box-shadow var(--transition), opacity var(--transition);
    }
    .reorder-thumb:hover { border-color: #aaa; box-shadow: var(--shadow); }
    .reorder-thumb:active { cursor: grabbing; }
    .reorder-thumb.dragging { opacity: .35; transform: scale(.97); }
    .reorder-thumb.drag-over {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(232,93,47,.2);
    }
    /* "moved" state — page is no longer in its original position */
    .reorder-thumb.moved { border-color: var(--accent-2); }

    .reorder-thumb canvas { width: 100% !important; height: auto !important; display: block; }

    /* Footer label bar inside each thumb */
    .reorder-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 6px;
      background: var(--bg);
      border-top: 1px solid var(--border);
      gap: 4px;
      min-height: 28px;
    }
    /* Current position — updates on every drag */
    .reorder-pos {
      font-family: var(--font-d);
      font-size: .72rem;
      font-weight: 700;
      color: var(--ink);
      line-height: 1;
    }
    /* Original page badge — NEVER changes */
    .reorder-orig {
      font-size: .65rem;
      font-weight: 500;
      color: var(--ink-3);
      background: var(--border);
      border-radius: 4px;
      padding: 2px 5px;
      line-height: 1.2;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background var(--transition), color var(--transition);
    }
    /* When page has moved, highlight the origin badge in amber */
    .reorder-thumb.moved .reorder-orig {
      background: rgba(245,185,70,.25);
      color: #8a6200;
    }

    /* Summary bar above the grid */
    .reorder-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }
    .reorder-summary-text {
      font-size: .8rem;
      color: var(--ink-3);
      transition: color .2s;
    }
    .reorder-summary-text.has-changes { color: var(--accent); font-weight: 500; }
    .reorder-legend {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: .72rem;
      color: var(--ink-3);
    }
    .legend-dot {
      width: 10px; height: 10px;
      border-radius: 2px;
      flex-shrink: 0;
    }

    /* =====================================================
       SPLIT TOOL — UI mejorada
       ===================================================== */

    /* Tabs de modo */
    .split-tabs {
      display: flex;
      gap: 4px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 4px;
      margin-bottom: 18px;
    }
    .split-tab {
      flex: 1;
      padding: 8px 12px;
      border-radius: 6px;
      font-size: .82rem;
      font-weight: 500;
      color: var(--ink-2);
      text-align: center;
      cursor: pointer;
      transition: background var(--transition), color var(--transition), box-shadow var(--transition);
      border: none;
      background: none;
      font-family: var(--font-b);
    }
    .split-tab.active {
      background: var(--surface);
      color: var(--ink);
      box-shadow: 0 1px 4px rgba(26,23,20,.1);
    }
    .split-tab:hover:not(.active) { color: var(--ink); background: rgba(26,23,20,.04); }

    /* Panel de modo */
    .split-panel { display: none; }
    .split-panel.active { display: block; }

    /* Botones de selección rápida */
    .quick-select {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }
    .qs-btn {
      padding: 5px 11px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--surface);
      font-size: .75rem;
      font-weight: 500;
      color: var(--ink-2);
      cursor: pointer;
      transition: border-color var(--transition), color var(--transition), background var(--transition);
      font-family: var(--font-b);
    }
    .qs-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(232,93,47,.05); }
    .qs-btn.danger:hover { border-color: #E84F4F; color: #E84F4F; background: rgba(232,79,79,.05); }

    /* Contador de selección */
    .split-sel-count {
      font-size: .8rem;
      color: var(--ink-3);
      margin-bottom: 10px;
      min-height: 18px;
      transition: color .2s;
    }
    .split-sel-count.has-sel { color: var(--accent); font-weight: 500; }

    /* Auto-split controls */
    .auto-split-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .auto-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .auto-row label { font-size: .85rem; font-weight: 500; color: var(--ink-2); min-width: 160px; }
    .auto-num {
      display: flex;
      align-items: center;
      gap: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: var(--surface);
    }
    .auto-num button {
      width: 32px; height: 34px;
      background: var(--bg);
      border: none;
      font-size: 1rem;
      color: var(--ink-2);
      cursor: pointer;
      transition: background var(--transition);
      font-family: var(--font-b);
    }
    .auto-num button:hover { background: var(--border); }
    .auto-num input {
      width: 48px;
      text-align: center;
      border: none;
      border-left: 1px solid var(--border);
      border-right: 1px solid var(--border);
      font-family: var(--font-b);
      font-size: .88rem;
      color: var(--ink);
      background: var(--surface);
      height: 34px;
      padding: 0;
    }
    .auto-num input:focus { outline: none; }
    .auto-split-radio {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .auto-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border: 2px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition);
      background: var(--surface);
    }
    .auto-option:hover { border-color: var(--accent); }
    .auto-option.selected { border-color: var(--accent); background: rgba(232,93,47,.04); }
    .auto-option input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
    .auto-option-text { flex: 1; }
    .auto-option-text strong { display: block; font-size: .88rem; }
    .auto-option-text span { font-size: .76rem; color: var(--ink-3); }
    .auto-option-control { margin-left: auto; }

    /* Preview del resultado del split */
    .split-preview-bar {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-size: .8rem;
      color: var(--ink-2);
      margin-top: 14px;
      display: none;
    }
    .split-preview-bar.visible { display: flex; align-items: center; gap: 8px; }
    .split-chunks {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }
    .split-chunk {
      background: rgba(232,93,47,.12);
      color: var(--accent);
      border: 1px solid rgba(232,93,47,.25);
      border-radius: 4px;
      padding: 2px 7px;
      font-size: .72rem;
      font-weight: 600;
    }

    /* =====================================================
       RESPONSIVE
       ===================================================== */
    @media (max-width: 600px) {
      .hero { padding: 56px 0 40px; }
      .hero h1 { font-size: 2.2rem; }
      .how-section { padding: 32px 20px; }
      .modal-body { padding: 16px; }
      .modal-header { padding: 14px 16px; }
      .pages-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
      .reorder-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
      nav .nav-links { display: none; }
      .footer-inner { flex-direction: column; text-align: center; }

      /* Action bar: stack so the primary CTA is full-width and
         always the easiest target to reach with a thumb. */
      .action-bar { flex-direction: column-reverse; align-items: stretch; }
      .action-bar .btn-lg { width: 100%; justify-content: center; }
      .action-bar-left { width: 100%; }
      .action-bar-left .btn { flex: 1; justify-content: center; }

      .dropzone { padding: 32px 20px; }
      .dropzone-icon { font-size: 2rem; }

      .auto-row label { min-width: 0; width: 100%; }
      .control-label { min-width: 0; width: 100%; }

      .tool-page-hero { padding: 40px 0 32px; }
      .tool-page-hero h1 { font-size: 1.9rem; }
      .tool-page-lead { font-size: .95rem; }
      .tool-feature-list { gap: 8px 12px; }
      .other-tools-strip { gap: 6px; }
    }

/* ── Tool landing pages ──────────────────────────────────────────── */
.tool-page-hero {
  padding: 60px 0 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tool-page-hero-inner {
  max-width: 660px;
  text-align: center;
  margin: 0 auto;
}
.tool-icon-xl {
  width: 76px; height: 76px;
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem;
  margin: 0 auto 22px;
  background: color-mix(in srgb, var(--tool-color) 14%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--tool-color) 28%, transparent);
}
.tool-page-hero h1 {
  font-family: var(--font-d);
  font-size: clamp(1.85rem, 3.8vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  color: var(--ink);
  line-height: 1.15;
}
.tool-page-lead {
  font-size: 1.05rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.btn-tool-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-bottom: 28px;
  letter-spacing: -.01em;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-tool-launch:hover { background: var(--accent-dk); transform: translateY(-2px); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 36%, transparent); }
.btn-tool-launch:active { transform: none; box-shadow: none; }
.tool-feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
}
.tool-feature-list li {
  font-size: .86rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-feature-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
}
.tool-page-about { background: var(--bg); }
.tool-page-about h2 {
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--ink);
}
.tool-page-about p {
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 12px;
}
.other-tools-section { background: var(--surface); border-top: 1px solid var(--border); }
.other-tools-section h2 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}
.other-tools-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.other-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .83rem;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--bg);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.other-tool-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* ── Merge: drag-sortable file list ─────────────────────────── */
.merge-file-item {
  user-select: none;
  transition: border-color var(--transition), box-shadow var(--transition),
              opacity var(--transition), background var(--transition);
}
.merge-file-item.dragging {
  opacity: .4;
  box-shadow: none;
}
.merge-file-item.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232,93,47,.18);
  background: rgba(232,93,47,.03);
}
.file-drag-handle {
  color: var(--ink-3);
  font-size: 1rem;
  cursor: grab;
  padding: 0 2px;
  flex-shrink: 0;
  line-height: 1;
  touch-action: none;
}
.merge-file-item.dragging .file-drag-handle { cursor: grabbing; }
.file-item-pos {
  font-family: var(--font-d);
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 16px;
  flex-shrink: 0;
  text-align: right;
}
.file-move-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  font-family: var(--font-b);
  line-height: 1;
}
.file-move-btn:hover { background: var(--border); color: var(--ink); border-color: var(--ink-3); }
.file-move-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.merge-order-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--ink-3);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ── Hamburger button — hidden on desktop ────────────────────── */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
.nav-burger:hover { background: var(--border); }
.nav-burger[aria-expanded="true"] { border-color: var(--accent); }

/* ── Reorder: move buttons for touch devices ─────────────────── */
.reorder-move-btn {
  width: 22px; height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .75rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  font-family: var(--font-b);
}
.reorder-move-btn:hover { background: var(--border); color: var(--ink); border-color: var(--ink-3); }

/* Show move buttons only on touch-primary screens */
@media (hover: none) {
  .reorder-move-btn { display: flex; }
  .reorder-foot { min-height: 34px; gap: 3px; }
  .reorder-thumb { cursor: default; }
}

/* ── Reorder touch notice ────────────────────────────────────── */
.reorder-touch-notice {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(91,106,240,.06);
  border: 1px solid rgba(91,106,240,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .8rem;
  color: var(--ink-2);
  margin-bottom: 10px;
}
@media (hover: none) {
  .reorder-touch-notice { display: flex; }
}

/* ── Expanded mobile breakpoint ──────────────────────────────── */
@media (max-width: 600px) {
  /* ── Nav: hamburger menu ── */
  .nav-burger { display: flex; }
  .nav-inner { position: relative; }
  nav .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(245,243,238,.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 14px;
    gap: 2px;
    box-shadow: 0 4px 16px rgba(26,23,20,.1);
    z-index: 50;
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--ink-2);
  }
  nav .nav-links a:hover { background: var(--border); color: var(--ink); }

  /* ── Hero ── */
  .hero { padding: 48px 0 36px; }
  .hero-stats { gap: 24px; }
  .section { padding: 56px 0; }

  /* ── Privacy banner ── */
  .privacy-banner { flex-direction: column; text-align: center; gap: 8px; padding: 14px 16px; }

  /* ── Modal: bottom sheet on mobile ── */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 96vh;
  }

  /* ── Tool cards ── */
  .tool-card { padding: 20px 18px; }

  /* ── Pages/thumbnail grids inside modal ── */
  .pages-grid { max-height: 200px; }
  .reorder-grid { max-height: 240px; }

  /* ── Touch targets ── */
  .rotate-btn { width: 44px; height: 44px; font-size: 1.2rem; }
  .auto-num button { width: 40px; height: 40px; }
  .faq-q { min-height: 48px; }
  .qs-btn { padding: 8px 12px; min-height: 38px; }
  .split-tab { min-height: 42px; }
  .modal-close { width: 40px; height: 40px; }

  /* ── Btn tool launch: full-width on mobile ── */
  .btn-tool-launch { width: 100%; justify-content: center; box-sizing: border-box; }

  /* ── Other tool chips: more padding for touch ── */
  .other-tool-chip { padding: 9px 14px; min-height: 40px; }
}

/* =====================================================
   BLOG — index and article pages
   ===================================================== */

/* Index hero */
.blog-index-hero {
  padding: 64px 0 0;
}
.blog-index-hero h1 {
  font-family: var(--font-d);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  line-height: 1.1;
}
.blog-index-hero p {
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 58ch;
  line-height: 1.65;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 40px 0 80px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.blog-card-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-card h2 {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.blog-card p {
  font-size: .85rem;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}
.blog-card-arrow {
  font-size: .85rem;
  color: var(--accent);
  margin-top: 4px;
  transition: transform var(--transition);
}
.blog-card:hover .blog-card-arrow { transform: translateX(4px); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--ink-3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* Article header */
.article-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.article-header h1 {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 20ch;
}
.article-lead {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.65;
}
.article-meta {
  margin-top: 14px;
  font-size: .78rem;
  color: var(--ink-3);
}

/* Article body */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 64px;
}
.article-body h2 {
  font-family: var(--font-d);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--ink);
}
.article-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}
.article-body p {
  margin-bottom: 18px;
  color: var(--ink-2);
  line-height: 1.75;
}
.article-body ul,
.article-body ol {
  margin: 4px 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-body li {
  color: var(--ink-2);
  line-height: 1.6;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a.inline-link {
  color: var(--accent);
  border-bottom: 1px solid rgba(232,93,47,.3);
  transition: border-color var(--transition);
}
.article-body a.inline-link:hover { border-color: var(--accent); }

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 20px 0;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 480px;
}
.comparison-table th {
  background: var(--border);
  color: var(--ink);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.comparison-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: top;
  line-height: 1.5;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(228,224,216,.4); }

/* Article CTA block */
.article-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dk) 100%);
  border-radius: var(--radius);
  padding: 28px;
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-cta h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.article-cta p {
  font-size: .88rem;
  color: rgba(255,255,255,.85);
  margin: 0;
  line-height: 1.5;
}
.article-cta .cta-link {
  display: inline-block;
  background: #fff;
  color: var(--accent-dk);
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  align-self: flex-start;
  margin-top: 4px;
}
.article-cta .cta-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.cta-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Step list */
.step-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.step-num {
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 3px;
}
.step-text { color: var(--ink-2); line-height: 1.6; }
.step-text strong { color: var(--ink); }

/* Related articles */
.related-articles {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  padding-bottom: 80px;
  max-width: 680px;
  margin: 0 auto;
}
.related-articles h2 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--ink);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color var(--transition);
  color: inherit;
  text-decoration: none;
}
.related-card:hover { border-color: var(--accent); }
.related-card .related-label {
  font-size: .72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
}
.related-card strong {
  font-size: .88rem;
  color: var(--ink);
  line-height: 1.4;
}

/* Mobile adjustments for blog */
@media (max-width: 600px) {
  .blog-index-hero { padding: 40px 0 0; }
  .blog-grid { grid-template-columns: 1fr; gap: 14px; padding: 28px 0 60px; }
  .article-header { padding: 36px 0 24px; margin-bottom: 32px; }
  .article-header h1 { font-size: 1.7rem; max-width: none; }
  .article-body h2 { font-size: 1.18rem; margin-top: 32px; }
  .article-cta { padding: 22px 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-links-row { flex-direction: column; }
}
