/* ==========================================================================
   PDF Toolkit - design system
   Light and dark, driven by tokens. No framework, no build step.
   ========================================================================== */

/* ---------- tokens ---------- */
:root{
  /* Native widgets — selects, scrollbars, date pickers — follow the page's
     theme rather than the operating system's. Without this a visitor whose
     OS is set to dark gets dark form controls on a light page. */
  color-scheme:light;

  --bg:#f6f7fb;
  --bg-soft:#eef0f7;
  --surface:#ffffff;
  --surface-2:#fafbfe;
  --border:#e3e6f0;
  --border-strong:#cfd4e4;
  --text:#171a26;
  --text-soft:#5b6178;
  --text-mute:#8b91a7;

  --brand:#5b53f0;
  --brand-ink:#4038d6;
  --brand-soft:#eeedfe;

  --to-pdf:#e8453c;
  --to-pdf-soft:#fdeceb;
  --from-pdf:#0f9d8f;
  --from-pdf-soft:#e5f6f4;
  --image:#c2670a;
  --image-soft:#fdf0e0;

  --ok:#15925f;
  --ok-soft:#e6f5ee;
  --warn:#b26a00;
  --warn-soft:#fdf2e0;
  --err:#cf3232;
  --err-soft:#fdecec;

  --shadow-sm:0 1px 2px rgba(19,22,40,.06), 0 1px 3px rgba(19,22,40,.05);
  --shadow-md:0 4px 12px rgba(19,22,40,.07), 0 2px 4px rgba(19,22,40,.04);
  --shadow-lg:0 18px 40px rgba(19,22,40,.12), 0 4px 12px rgba(19,22,40,.06);

  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:22px;
  --pad:clamp(16px,4vw,28px);
  --maxw:1140px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
}

html[data-theme="dark"]{
  color-scheme:dark;

  --bg:#0e1018;
  --bg-soft:#141724;
  --surface:#171a27;
  --surface-2:#1d2131;
  --border:#272c40;
  --border-strong:#39405a;
  --text:#eef0f8;
  --text-soft:#a7aec8;
  --text-mute:#787f9b;

  --brand:#8a83ff;
  --brand-ink:#a49eff;
  --brand-soft:#211f3d;

  --to-pdf:#ff6a60;
  --to-pdf-soft:#31201f;
  --from-pdf:#2ec4b2;
  --from-pdf-soft:#152b29;
  --image:#f0a94a;
  --image-soft:#2e2416;

  --ok:#38c98a; --ok-soft:#14291f;
  --warn:#e0a44a; --warn-soft:#2b2317;
  --err:#ff6b6b; --err-soft:#2d1a1a;

  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 4px 14px rgba(0,0,0,.45);
  --shadow-lg:0 20px 44px rgba(0,0,0,.55);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);font-family:var(--font);
  font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased;
  display:flex;flex-direction:column;min-height:100vh;
}
img,canvas{max-width:100%;display:block}
/* An inline SVG with a viewBox but no width/height fills its container and
   scales its height to match, so a 24px icon can render 600px tall. Default
   every SVG to a text-sized box; the context rules below are more specific
   and still win wherever a particular size is wanted. */
svg{width:1.15em;height:1.15em;flex:0 0 auto;display:inline-block;vertical-align:-.16em}
a{color:var(--brand-ink);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{line-height:1.22;margin:0;letter-spacing:-.02em;font-weight:700}
p{margin:0}
button{font:inherit;color:inherit}
/* The browser's own [hidden]{display:none} has the same specificity as a class,
   so any rule of ours setting `display` silently defeats it — .btn's
   inline-flex made every hidden button visible. Settle it once, here. */
[hidden]{display:none!important}
:focus-visible{outline:2.5px solid var(--brand);outline-offset:2px;border-radius:4px}
.wrap{width:100%;max-width:var(--maxw);margin-inline:auto;padding-inline:var(--pad)}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- header ---------- */
.site-head{
  position:sticky;top:0;z-index:50;background:var(--surface);
  border-bottom:1px solid var(--border);
}
.site-head__in{display:flex;align-items:center;gap:14px;height:64px}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.06rem;letter-spacing:-.03em;color:var(--text)}
.logo:hover{text-decoration:none}
.logo__mark{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:0 0 auto;
  background:linear-gradient(140deg,var(--brand),#8f6bff);color:#fff;box-shadow:var(--shadow-sm);
}
.logo__mark svg{width:19px;height:19px}
.head-nav{display:flex;align-items:center;gap:4px;margin-left:auto}
.head-link{
  padding:8px 12px;border-radius:var(--r-sm);font-size:.9rem;font-weight:600;color:var(--text-soft);
}
.head-link:hover{background:var(--bg-soft);color:var(--text);text-decoration:none}
.icon-btn{
  width:38px;height:38px;display:grid;place-items:center;border-radius:10px;cursor:pointer;
  background:transparent;border:1px solid var(--border);color:var(--text-soft);
}
.icon-btn:hover{background:var(--bg-soft);color:var(--text)}
.icon-btn svg{width:17px;height:17px}
html[data-theme="dark"] .icon-btn .i-sun{display:none}
html:not([data-theme="dark"]) .icon-btn .i-moon{display:none}

/* ---------- privacy strip ---------- */
.privacy{
  display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;
  background:var(--ok-soft);color:var(--ok);font-size:.82rem;font-weight:650;
  border:1px solid rgba(21,146,95,.24);
}
html[data-theme="dark"] .privacy{border-color:rgba(56,201,138,.28)}
.privacy svg{width:14px;height:14px;flex:0 0 auto}

/* ---------- hero ---------- */
.hero{padding:clamp(40px,7vw,76px) 0 clamp(28px,4vw,40px);text-align:center}
.hero h1{font-size:clamp(2rem,5.2vw,3.3rem);margin-bottom:16px}
.hero h1 em{font-style:normal;background:linear-gradient(100deg,var(--brand),#c05bff);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{max-width:62ch;margin:0 auto 22px;color:var(--text-soft);font-size:clamp(1rem,2.1vw,1.14rem)}

/* ---------- tool grid ---------- */
.group{margin-bottom:clamp(34px,5vw,54px)}
.group__head{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.group__head h2{font-size:1.22rem}
.group__head .rule{flex:1;height:1px;background:var(--border)}
.group__count{font-size:.8rem;color:var(--text-mute);font-weight:600}
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(232px,1fr))}

.card{
  position:relative;display:block;padding:20px;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);box-shadow:var(--shadow-sm);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:var(--border-strong);text-decoration:none}
.card:hover .card__cta{gap:9px;color:var(--brand-ink)}
.card__icon{
  width:44px;height:44px;border-radius:var(--r-md);display:grid;place-items:center;margin-bottom:14px;
  background:var(--brand-soft);color:var(--brand-ink);
}
.card__icon svg{width:22px;height:22px}
.card[data-group="to"] .card__icon{background:var(--to-pdf-soft);color:var(--to-pdf)}
.card[data-group="from"] .card__icon{background:var(--from-pdf-soft);color:var(--from-pdf)}
.card[data-group="image"] .card__icon{background:var(--image-soft);color:var(--image)}
.card h3{font-size:1.02rem;margin-bottom:6px;color:var(--text)}
.card p{font-size:.875rem;color:var(--text-soft);line-height:1.5}
.card__cta{display:inline-flex;align-items:center;gap:5px;margin-top:12px;font-size:.83rem;font-weight:650;color:var(--text-mute);transition:gap .16s ease,color .16s ease}
.card__cta svg{width:13px;height:13px}
.card__badge{
  position:absolute;top:14px;right:14px;font-size:.66rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:3px 8px;border-radius:999px;background:var(--warn-soft);color:var(--warn);
}

/* ---------- feature row ---------- */
.features{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));margin:clamp(20px,4vw,34px) 0 clamp(40px,6vw,64px)}
.feature{padding:20px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--border)}
.feature__icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--bg-soft);color:var(--brand-ink);margin-bottom:12px}
.feature__icon svg{width:18px;height:18px}
.feature h3{font-size:.98rem;margin-bottom:5px}
.feature p{font-size:.86rem;color:var(--text-soft)}

/* ---------- tool page ---------- */
.crumbs{display:flex;align-items:center;gap:7px;font-size:.83rem;color:var(--text-mute);padding-top:22px}
.crumbs a{color:var(--text-mute);font-weight:550}
.crumbs a:hover{color:var(--brand-ink)}
.crumbs svg{width:11px;height:11px;opacity:.6}

.tool-head{text-align:center;padding:clamp(22px,4vw,38px) 0 clamp(20px,3vw,28px)}
.tool-head__icon{
  width:58px;height:58px;border-radius:var(--r-lg);display:grid;place-items:center;margin:0 auto 16px;
  background:var(--brand-soft);color:var(--brand-ink);box-shadow:var(--shadow-sm);
}
.tool-head__icon svg{width:28px;height:28px}
body[data-group="to"] .tool-head__icon{background:var(--to-pdf-soft);color:var(--to-pdf)}
body[data-group="from"] .tool-head__icon{background:var(--from-pdf-soft);color:var(--from-pdf)}
body[data-group="image"] .tool-head__icon{background:var(--image-soft);color:var(--image)}
.tool-head h1{font-size:clamp(1.65rem,4.2vw,2.4rem);margin-bottom:10px}
.tool-head p{max-width:58ch;margin:0 auto 16px;color:var(--text-soft)}

.panel{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r-xl);
  box-shadow:var(--shadow-md);padding:clamp(18px,3.4vw,30px);margin-bottom:22px;
}

/* dropzone */
.drop{
  position:relative;border:2px dashed var(--border-strong);border-radius:var(--r-lg);
  background:var(--surface-2);padding:clamp(28px,6vw,54px) 22px;text-align:center;cursor:pointer;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.drop:hover{border-color:var(--brand);background:var(--brand-soft)}
.drop.is-over{border-color:var(--brand);background:var(--brand-soft);transform:scale(1.008)}
.drop__icon{width:54px;height:54px;margin:0 auto 14px;border-radius:50%;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);color:var(--brand-ink);box-shadow:var(--shadow-sm)}
.drop__icon svg{width:24px;height:24px}
.drop__title{font-weight:700;font-size:1.06rem;margin-bottom:6px}
.drop__hint{font-size:.87rem;color:var(--text-soft)}
.drop__types{display:inline-block;margin-top:12px;font-family:var(--mono);font-size:.74rem;color:var(--text-mute);background:var(--bg-soft);padding:4px 10px;border-radius:999px}
.drop input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}

/* file list */
.files{list-style:none;margin:18px 0 0;padding:0;display:flex;flex-direction:column;gap:9px}
.file{
  display:flex;align-items:center;gap:12px;padding:11px 13px;border:1px solid var(--border);
  border-radius:var(--r-md);background:var(--surface-2);
}
.file.is-dragging{opacity:.45}
.file.is-target{border-color:var(--brand);border-style:dashed}
.file__grip{cursor:grab;color:var(--text-mute);display:grid;place-items:center;flex:0 0 auto;touch-action:none}
.file__grip svg{width:15px;height:15px}
.file__thumb{
  width:40px;height:48px;flex:0 0 auto;border-radius:6px;overflow:hidden;background:var(--bg-soft);
  border:1px solid var(--border);display:grid;place-items:center;color:var(--text-mute);font-size:.6rem;font-weight:800;
}
.file__thumb img{width:100%;height:100%;object-fit:cover}
.file__meta{min-width:0;flex:1}
.file__name{display:block;font-size:.9rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file__sub{display:block;font-size:.78rem;color:var(--text-mute)}
.file__x{
  width:30px;height:30px;flex:0 0 auto;border-radius:8px;border:1px solid transparent;background:transparent;
  color:var(--text-mute);cursor:pointer;display:grid;place-items:center;
}
.file__x:hover{background:var(--err-soft);color:var(--err)}
.file__x svg{width:14px;height:14px}

/* options */
.opts{margin-top:22px;padding-top:20px;border-top:1px solid var(--border)}
.opts__title{font-size:.78rem;text-transform:uppercase;letter-spacing:.07em;font-weight:750;color:var(--text-mute);margin-bottom:14px}
.opt-grid{display:grid;gap:14px 18px;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field--wide{grid-column:1/-1}
.field label{font-size:.85rem;font-weight:650}
.field .help{font-size:.77rem;color:var(--text-mute);line-height:1.45}
.field select,.field input[type=text],.field input[type=number],.field textarea{
  width:100%;padding:9px 11px;border-radius:var(--r-sm);border:1px solid var(--border-strong);
  background:var(--surface);color:var(--text);font:inherit;font-size:.9rem;
}
.field select{appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b91a7' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");background-repeat:no-repeat;background-position:right 9px center;background-size:15px;padding-right:32px}
.field textarea{min-height:120px;resize:vertical;font-family:var(--mono);font-size:.82rem;line-height:1.55}
.field select:focus,.field input:focus,.field textarea:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px var(--brand-soft)}
.check{display:flex;align-items:flex-start;gap:9px;cursor:pointer;padding:2px 0}
.check input{width:17px;height:17px;margin:2px 0 0;accent-color:var(--brand);flex:0 0 auto;cursor:pointer}
.check span{font-size:.87rem;font-weight:600}
.check .help{font-weight:400;display:block}
.seg{display:flex;gap:6px;flex-wrap:wrap;background:var(--bg-soft);padding:4px;border-radius:10px}
.seg button{
  flex:1 1 auto;min-width:76px;padding:7px 11px;border:0;border-radius:7px;background:transparent;
  font-size:.85rem;font-weight:650;color:var(--text-soft);cursor:pointer;
}
.seg button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.range-row{display:flex;align-items:center;gap:11px}
.range-row input[type=range]{flex:1;accent-color:var(--brand)}
.range-row output{font-family:var(--mono);font-size:.82rem;min-width:48px;text-align:right;color:var(--text-soft)}
.field[hidden]{display:none}

/* actions */
.actions{display:flex;flex-wrap:wrap;gap:11px;align-items:center;margin-top:24px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 22px;border-radius:11px;
  border:1px solid transparent;font-size:.95rem;font-weight:700;cursor:pointer;transition:filter .15s ease,transform .1s ease;
}
.btn svg{width:17px;height:17px}
.btn:hover:not(:disabled){filter:brightness(1.06)}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn--primary{background:var(--brand);color:#fff;box-shadow:var(--shadow-sm)}
.btn--go{background:linear-gradient(135deg,var(--brand),#8b5cff);color:#fff;box-shadow:var(--shadow-md);flex:1 1 210px;padding:14px 24px;font-size:1rem}
.btn--ghost{background:transparent;color:var(--text-soft);border-color:var(--border-strong)}
.btn--ghost:hover{background:var(--bg-soft);color:var(--text)}
.btn--ok{background:var(--ok);color:#fff}
.spin{width:16px;height:16px;border:2.2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* progress */
.prog{margin-top:20px}
.prog__bar{height:8px;border-radius:999px;background:var(--bg-soft);overflow:hidden}
.prog__fill{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,var(--brand),#9d6bff);transition:width .25s ease}
.prog__label{display:flex;justify-content:space-between;gap:10px;font-size:.83rem;color:var(--text-soft);margin-top:8px}
.prog__label b{font-variant-numeric:tabular-nums;font-weight:700;color:var(--text)}

/* notes / alerts */
.note{display:flex;gap:11px;padding:13px 15px;border-radius:var(--r-md);font-size:.87rem;line-height:1.5;margin-top:16px}
.note svg{width:17px;height:17px;flex:0 0 auto;margin-top:2px}
.note--info{background:var(--brand-soft);color:var(--brand-ink)}
.note--warn{background:var(--warn-soft);color:var(--warn)}
.note--err{background:var(--err-soft);color:var(--err)}
.note--ok{background:var(--ok-soft);color:var(--ok)}
.note strong{font-weight:750}
.note code{font-family:var(--mono);font-size:.85em;background:rgba(125,125,145,.16);padding:1px 5px;border-radius:4px}

/* results */
.results{list-style:none;margin:18px 0 0;padding:0;display:flex;flex-direction:column;gap:9px}
.result{
  display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r-md);
  background:var(--ok-soft);border:1px solid rgba(21,146,95,.22);
}
html[data-theme="dark"] .result{border-color:rgba(56,201,138,.26)}
.result__ico{width:34px;height:34px;border-radius:9px;background:var(--surface);display:grid;place-items:center;color:var(--ok);flex:0 0 auto}
.result__ico svg{width:17px;height:17px}
.result__meta{flex:1;min-width:0}
.result__name{display:block;font-size:.9rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.result__sub{display:block;font-size:.78rem;color:var(--text-soft)}
.result .btn{padding:8px 15px;font-size:.85rem}

/* preview strip */
.thumbs{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));margin-top:16px}
.thumb{border:1px solid var(--border);border-radius:var(--r-sm);overflow:hidden;background:var(--surface-2);position:relative}
.thumb img{width:100%;height:auto}
.thumb__n{position:absolute;bottom:0;left:0;right:0;background:rgba(10,12,20,.7);color:#fff;font-size:.7rem;text-align:center;padding:3px}

/* how-to + faq */
.steps{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));counter-reset:s;list-style:none;padding:0;margin:0}
.steps li{counter-increment:s;padding:18px;border-radius:var(--r-md);background:var(--surface-2);border:1px solid var(--border)}
.steps li::before{content:counter(s);display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--brand);color:#fff;font-size:.8rem;font-weight:750;margin-bottom:10px}
.steps h3{font-size:.94rem;margin-bottom:4px}
.steps p{font-size:.85rem;color:var(--text-soft)}
.faq details{border-bottom:1px solid var(--border);padding:14px 0}
.faq details:last-of-type{border-bottom:0}
.faq summary{cursor:pointer;font-weight:650;font-size:.95rem;list-style:none;display:flex;justify-content:space-between;gap:12px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-weight:400;font-size:1.3rem;line-height:1;color:var(--text-mute)}
.faq details[open] summary::after{content:"\2212"}
.faq p{margin-top:9px;font-size:.9rem;color:var(--text-soft)}
.section-title{
  display:flex;align-items:center;gap:9px;
  font-size:1.18rem;margin-bottom:16px;
}
.section-title svg{width:20px;height:20px;flex:0 0 auto;color:var(--brand-ink)}
#results-panel .section-title svg{color:var(--ok)}
#results-panel.is-error .section-title svg{color:var(--err)}

/* related */
.related{display:grid;gap:11px;grid-template-columns:repeat(auto-fill,minmax(178px,1fr))}
.related a{
  display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:var(--r-md);
  border:1px solid var(--border);background:var(--surface);font-size:.88rem;font-weight:620;color:var(--text);
}
.related a:hover{border-color:var(--brand);background:var(--brand-soft);text-decoration:none}
.related svg{width:16px;height:16px;flex:0 0 auto;color:var(--text-mute)}
.related a:hover svg{color:var(--brand-ink)}

/* toast */
.toasts{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:200;display:flex;flex-direction:column;gap:9px;width:min(430px,calc(100vw - 32px))}
.toast{
  display:flex;gap:10px;align-items:flex-start;padding:12px 15px;border-radius:var(--r-md);
  background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-lg);font-size:.88rem;
  animation:rise .2s ease;
}
@keyframes rise{from{opacity:0;transform:translateY(10px)}}
.toast svg{width:17px;height:17px;flex:0 0 auto;margin-top:2px}
.toast--ok svg{color:var(--ok)} .toast--err svg{color:var(--err)} .toast--warn svg{color:var(--warn)} .toast--info svg{color:var(--brand)}

/* footer */
.site-foot{margin-top:auto;border-top:1px solid var(--border);background:var(--surface);padding:30px 0 34px}
.site-foot__in{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:flex-start}
.site-foot p{font-size:.85rem;color:var(--text-mute);max-width:44ch}
.foot-cols{display:flex;gap:38px;flex-wrap:wrap}
.foot-col h4{font-size:.76rem;text-transform:uppercase;letter-spacing:.07em;color:var(--text-mute);margin-bottom:9px}
.foot-col a{display:block;font-size:.86rem;color:var(--text-soft);padding:2px 0}
.foot-col a:hover{color:var(--brand-ink)}

/* offscreen render stage for HTML/Office -> PDF */
#render-stage{position:fixed;left:-10000px;top:0;width:794px;background:#fff;color:#000;z-index:-1;pointer-events:none}
.doc-render{font-family:Georgia,"Times New Roman",serif;font-size:12pt;line-height:1.55;color:#000;background:#fff;padding:0}
.doc-render h1{font-size:20pt;margin:0 0 10pt} .doc-render h2{font-size:16pt;margin:14pt 0 8pt}
.doc-render h3{font-size:13pt;margin:12pt 0 6pt}
.doc-render p{margin:0 0 8pt} .doc-render ul,.doc-render ol{margin:0 0 8pt;padding-left:22pt}
.doc-render img{max-width:100%;height:auto}
.doc-render table{border-collapse:collapse;width:100%;font-size:9.5pt;margin:0 0 10pt}
.doc-render th,.doc-render td{border:1px solid #999;padding:4pt 6pt;text-align:left;vertical-align:top}
.doc-render th{background:#eee;font-weight:700}
.sheet-title{font:700 13pt/1.3 Arial,sans-serif;margin:0 0 8pt;color:#111}
.no-grid th,.no-grid td{border:0!important}

@media (max-width:560px){
  .head-link{display:none}
  .actions .btn{flex:1 1 100%}
  .site-foot__in{flex-direction:column}
}

/* ==========================================================================
   Additions for the PHP build: limits line, tables, pills, speed test
   ========================================================================== */

.skip{
  position:absolute;left:-9999px;top:0;z-index:300;padding:10px 16px;background:var(--brand);color:#fff;
  border-radius:0 0 8px 0;font-weight:650;font-size:.9rem;
}
.skip:focus{left:0;text-decoration:none}

/* limits line under the drop zone */
.limits{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  margin:12px 0 0;font-size:.79rem;color:var(--text-mute);
}
.limits__engine{
  display:inline-flex;align-items:center;gap:5px;margin-left:auto;
  padding:3px 9px;border-radius:999px;background:var(--bg-soft);
  font-weight:600;color:var(--text-soft);cursor:help;
}
.limits__engine svg{width:12px;height:12px}

.retention-line{
  font-size:.83rem;color:var(--text-soft);margin-top:16px;
}
.retention-line b{font-variant-numeric:tabular-nums;color:var(--text)}

/* data tables */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 0 4px}
table.data{
  width:100%;border-collapse:collapse;font-size:.88rem;min-width:520px;
}
table.data th,table.data td{
  padding:10px 12px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--border);
}
table.data thead th{
  font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--text-mute);font-weight:750;border-bottom:1.5px solid var(--border-strong);
}
table.data tbody th{font-weight:650;color:var(--text-soft);width:34%}
table.data tr:last-child td,table.data tr:last-child th{border-bottom:0}
table.data code{
  font-family:var(--mono);font-size:.84em;background:var(--bg-soft);
  padding:2px 6px;border-radius:5px;
}

/* status pills */
.pill{
  display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;
  font-size:.76rem;font-weight:700;white-space:nowrap;
}
.pill svg{width:12px;height:12px;flex:0 0 auto}
.pill--ok{background:var(--ok-soft);color:var(--ok)}
.pill--no{background:var(--err-soft);color:var(--err)}
.pill--warn{background:var(--warn-soft);color:var(--warn)}
.pill-row{display:flex;flex-wrap:wrap;gap:7px}
.hint-line{font-size:.82rem;color:var(--text-mute);margin-top:12px;line-height:1.5}
.hint-line code{font-family:var(--mono);font-size:.9em}

/* plain checklist */
.plain-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.plain-list li{
  display:flex;gap:10px;align-items:flex-start;font-size:.91rem;color:var(--text-soft);
}
.plain-list svg{width:16px;height:16px;flex:0 0 auto;margin-top:3px;color:var(--ok)}

/* ==========================================================================
   Speed test
   ========================================================================== */

.speed__stage{
  text-align:center;padding:clamp(18px,4vw,34px) 0 clamp(14px,3vw,24px);
  border-bottom:1px solid var(--border);margin-bottom:22px;
}
.speed__phase{
  font-size:.83rem;font-weight:650;text-transform:uppercase;letter-spacing:.07em;
  color:var(--text-mute);margin-bottom:10px;
}
.speed.is-running .speed__phase{color:var(--brand-ink)}
.speed__reading{display:flex;align-items:baseline;justify-content:center;gap:9px}
.speed__value{
  font-size:clamp(3rem,12vw,5.2rem);font-weight:800;line-height:1;letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;
  background:linear-gradient(120deg,var(--brand),#b45bff);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.speed__unit{font-size:1.05rem;font-weight:700;color:var(--text-mute)}
.speed__meter{
  height:9px;border-radius:999px;background:var(--bg-soft);overflow:hidden;
  max-width:520px;margin:20px auto 0;
}
.speed__meter-fill{
  height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,#2ec4b2,var(--brand),#c05bff);
  transition:width .35s cubic-bezier(.3,.8,.3,1);
}
.speed.is-running .speed__meter-fill{
  box-shadow:0 0 12px rgba(91,83,240,.55);
}
.speed__server{font-size:.85rem;color:var(--text-mute);margin-top:16px}
.speed__server b{color:var(--text-soft);font-weight:650;word-break:break-all}

.tiles{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(148px,1fr))}
.tile{
  padding:16px;border-radius:var(--r-md);background:var(--surface-2);
  border:1px solid var(--border);text-align:center;
}
.tile__label{
  display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:.78rem;font-weight:650;color:var(--text-mute);margin-bottom:8px;
}
.tile__label svg{width:14px;height:14px}
.tile__value{
  display:block;font-size:1.65rem;font-weight:750;line-height:1.1;
  font-variant-numeric:tabular-nums;letter-spacing:-.02em;
}
.tile__unit{display:block;font-size:.75rem;color:var(--text-mute);margin-top:3px}
.tile[data-metric=download] .tile__label{color:var(--from-pdf)}
.tile[data-metric=upload] .tile__label{color:var(--brand-ink)}

.consent{
  margin-top:20px;padding:15px;border-radius:var(--r-md);
  background:var(--warn-soft);border:1px solid rgba(178,106,0,.22);
}
html[data-theme="dark"] .consent{border-color:rgba(224,164,74,.26)}
.consent span{font-size:.86rem;line-height:1.5}
.consent .help{margin-top:5px;color:inherit;opacity:.85}
.consent a{color:inherit;font-weight:700;text-decoration:underline}

@media (max-width:480px){
  .tiles{grid-template-columns:repeat(2,1fr)}
  .limits__engine{margin-left:0}
}
