/* ==========================================================================
   It All Stays Here — shared stylesheet
   Every tool page is built from these primitives.
   ========================================================================== */

:root{
  /* neutrals — very slightly warm, so the green accent reads calm not clinical */
  --bg:#FBFBF9;
  --surface:#FFFFFF;
  --surface-2:#F2F3EF;
  --surface-3:#E8EAE4;
  --ink:#14181A;
  --ink-2:#4B5350;
  --ink-3:#767E7A;
  --rule:#DFE2DB;
  --rule-2:#C8CDC4;

  /* accent — pine. semantically "safe / local / go" */
  --accent:#1C6B57;
  --accent-hover:#155444;
  --accent-soft:#E3F0EB;
  --accent-ink:#FFFFFF;

  /* signals */
  --warn:#8A5B0B;
  --warn-soft:#F7EEDC;
  --error:#9B3626;
  --error-soft:#F8E6E2;

  --f-ui:"Instrument Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --f-read:"Source Serif 4",Georgia,"Times New Roman",serif;
  --f-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Consolas,monospace;

  --radius:8px;
  --radius-sm:5px;
  --maxw:1120px;
  --shadow:0 1px 2px rgba(20,24,26,.05),0 4px 14px rgba(20,24,26,.05);
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#101312;
    --surface:#171B1A;
    --surface-2:#1F2422;
    --surface-3:#2A302D;
    --ink:#E9ECE8;
    --ink-2:#A9B1AC;
    --ink-3:#7E857F;
    --rule:#282E2B;
    --rule-2:#3A413D;
    --accent:#4FB795;
    --accent-hover:#67C9A8;
    --accent-soft:#152B24;
    --accent-ink:#0B1210;
    --warn:#D3A257;
    --warn-soft:#2A2316;
    --error:#DE8271;
    --error-soft:#2E1C18;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 14px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"]{
  --bg:#101312;
  --surface:#171B1A;
  --surface-2:#1F2422;
  --surface-3:#2A302D;
  --ink:#E9ECE8;
  --ink-2:#A9B1AC;
  --ink-3:#7E857F;
  --rule:#282E2B;
  --rule-2:#3A413D;
  --accent:#4FB795;
  --accent-hover:#67C9A8;
  --accent-soft:#152B24;
  --accent-ink:#0B1210;
  --warn:#D3A257;
  --warn-soft:#2A2316;
  --error:#DE8271;
  --error-soft:#2E1C18;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 14px rgba(0,0,0,.25);
}

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

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

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--f-ui);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px;}
.wrap-narrow{max-width:760px;margin:0 auto;padding:0 20px;}

a{color:var(--accent);text-underline-offset:2px;}
a:hover{color:var(--accent-hover);}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px;}

h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.02em;line-height:1.15;text-wrap:balance;}
p{margin:0 0 1em;}

.skip{
  position:absolute;left:-9999px;top:0;
  background:var(--accent);color:var(--accent-ink);
  padding:10px 16px;border-radius:0 0 var(--radius-sm) 0;z-index:200;
}
.skip:focus{left:0;}

/* ---------- header ---------- */

.site-header{
  border-bottom:1px solid var(--rule);
  background:var(--surface);
  position:sticky;top:0;z-index:60;
}
.site-header .wrap{
  display:flex;align-items:center;gap:22px;
  height:60px;
}
.logo{
  display:flex;align-items:center;gap:9px;
  font-weight:600;font-size:1.06rem;letter-spacing:-.025em;
  color:var(--ink);text-decoration:none;flex-shrink:0;
}
.logo:hover{color:var(--ink);}
.logo-mark{
  width:24px;height:24px;border-radius:6px;
  background:var(--accent);
  display:grid;place-items:center;flex-shrink:0;
}
.logo-mark svg{width:14px;height:14px;display:block;}

.nav{display:flex;gap:20px;align-items:center;margin-left:auto;}
.nav a{
  color:var(--ink-2);text-decoration:none;font-size:.925rem;font-weight:500;
}
.nav a:hover{color:var(--ink);}

.theme-btn{
  background:transparent;border:1px solid var(--rule);
  width:32px;height:32px;border-radius:var(--radius-sm);
  display:grid;place-items:center;cursor:pointer;color:var(--ink-2);
  flex-shrink:0;
}
.theme-btn:hover{border-color:var(--rule-2);color:var(--ink);}
.theme-btn svg{width:15px;height:15px;display:block;}
.theme-btn .i-sun{display:none;}
:root[data-theme="dark"] .theme-btn .i-sun{display:block;}
:root[data-theme="dark"] .theme-btn .i-moon{display:none;}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-btn .i-sun{display:block;}
  :root:not([data-theme="light"]) .theme-btn .i-moon{display:none;}
}

@media (max-width:640px){
  .nav{gap:14px;}
  .nav a{font-size:.87rem;}
  .nav a.hide-sm{display:none;}
}

/* ---------- tool hero ---------- */

.tool-head{padding:36px 0 22px;text-align:center;}
.tool-head h1{font-size:clamp(1.75rem,4.4vw,2.5rem);margin-bottom:12px;}
.tool-head .sub{
  font-size:1.06rem;color:var(--ink-2);max-width:56ch;margin:0 auto 16px;
}

.privacy-badge{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--accent-soft);color:var(--accent);
  padding:6px 14px;border-radius:100px;
  font-size:.845rem;font-weight:600;
}
.privacy-badge svg{width:14px;height:14px;flex-shrink:0;}

/* ---------- tool panel ---------- */

.tool-panel{
  background:var(--surface);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.dropzone{
  border:2px dashed var(--rule-2);
  border-radius:var(--radius);
  margin:20px;
  padding:44px 24px;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s,background .15s;
  background:var(--surface);
}
.dropzone:hover,.dropzone.over{
  border-color:var(--accent);
  background:var(--accent-soft);
}
.dropzone.over{border-style:solid;}
.dz-icon{
  width:42px;height:42px;margin:0 auto 14px;
  color:var(--ink-3);
}
.dropzone:hover .dz-icon,.dropzone.over .dz-icon{color:var(--accent);}
.dz-icon svg{width:100%;height:100%;display:block;}
.dz-title{font-size:1.06rem;font-weight:600;margin-bottom:6px;}
.dz-sub{color:var(--ink-3);font-size:.9rem;margin:0;}
.dz-formats{
  font-family:var(--f-mono);font-size:.735rem;letter-spacing:.06em;
  color:var(--ink-3);margin-top:12px;text-transform:uppercase;
}

/* options */
.opts{
  border-top:1px solid var(--rule);
  padding:18px 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:16px 22px;
  background:var(--surface-2);
}
.opt{display:flex;flex-direction:column;gap:6px;min-width:0;}
.opt > label,.opt-label{
  font-size:.78rem;font-weight:600;letter-spacing:.045em;text-transform:uppercase;
  color:var(--ink-3);
}
.opt-hint{font-size:.8rem;color:var(--ink-3);margin:0;}

input[type="text"],input[type="number"],input[type="email"],input[type="date"],
input[type="tel"],select,textarea{
  font-family:var(--f-ui);font-size:.94rem;
  padding:8px 11px;
  border:1px solid var(--rule-2);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  width:100%;
  min-width:0;
}
textarea{resize:vertical;line-height:1.5;}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
input[type="range"]{width:100%;accent-color:var(--accent);}
input[type="color"]{
  width:100%;height:36px;padding:2px;cursor:pointer;
  border:1px solid var(--rule-2);border-radius:var(--radius-sm);background:var(--surface);
}
select{
  appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 8l3-3.5' fill='none' stroke='%23767E7A' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:12px;
  padding-right:30px;
}

.seg-ctl{display:flex;gap:0;border:1px solid var(--rule-2);border-radius:var(--radius-sm);overflow:hidden;}
.seg-ctl button{
  flex:1;background:var(--surface);border:none;
  padding:8px 10px;cursor:pointer;
  font-family:var(--f-ui);font-size:.87rem;font-weight:500;color:var(--ink-2);
  border-right:1px solid var(--rule-2);
  transition:background .12s,color .12s;
  min-width:0;
}
.seg-ctl button:last-child{border-right:none;}
.seg-ctl button:hover{background:var(--surface-2);color:var(--ink);}
.seg-ctl button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);font-weight:600;}

.checkline{display:flex;align-items:center;gap:9px;font-size:.9rem;color:var(--ink-2);cursor:pointer;}
.checkline input[type="checkbox"]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;flex-shrink:0;}

/* actions */
.actions{
  border-top:1px solid var(--rule);
  padding:16px 20px;
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
}
.btn{
  font-family:var(--f-ui);font-size:.94rem;font-weight:600;
  padding:10px 20px;border-radius:var(--radius-sm);
  border:1px solid var(--rule-2);background:var(--surface);color:var(--ink);
  cursor:pointer;display:inline-flex;align-items:center;gap:8px;
  text-decoration:none;transition:background .12s,border-color .12s,opacity .12s;
}
.btn:hover:not(:disabled){background:var(--surface-2);border-color:var(--rule-2);color:var(--ink);}
.btn:disabled{opacity:.45;cursor:not-allowed;}
.btn svg{width:15px;height:15px;flex-shrink:0;}
.btn-primary{
  background:var(--accent);border-color:var(--accent);color:var(--accent-ink);
}
.btn-primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover);color:var(--accent-ink);}
.btn-ghost{background:transparent;border-color:transparent;color:var(--ink-2);}
.btn-ghost:hover:not(:disabled){background:var(--surface-2);color:var(--ink);}
.actions .spacer{margin-left:auto;}

/* file list */
.filelist{border-top:1px solid var(--rule);}
.fileitem{
  display:flex;align-items:center;gap:14px;
  padding:12px 20px;border-bottom:1px solid var(--rule);
}
.fileitem:last-child{border-bottom:none;}
.fi-thumb{
  width:40px;height:40px;border-radius:var(--radius-sm);
  background:var(--surface-2);flex-shrink:0;
  display:grid;place-items:center;overflow:hidden;
  color:var(--ink-3);
}
.fi-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.fi-thumb svg{width:18px;height:18px;}
.fi-body{flex:1;min-width:0;}
.fi-name{
  font-size:.9rem;font-weight:500;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fi-meta{
  font-family:var(--f-mono);font-size:.75rem;color:var(--ink-3);
  margin-top:2px;font-variant-numeric:tabular-nums;
}
.fi-meta .ok{color:var(--accent);font-weight:500;}
.fi-meta .err{color:var(--error);font-weight:500;}
.fi-action{flex-shrink:0;}

.spinner{
  width:15px;height:15px;border-radius:50%;
  border:2px solid var(--rule-2);border-top-color:var(--accent);
  animation:spin .7s linear infinite;flex-shrink:0;
}
@keyframes spin{to{transform:rotate(360deg);}}

/* progress */
.progress-wrap{padding:16px 20px;border-top:1px solid var(--rule);background:var(--surface-2);}
.progress-top{
  display:flex;justify-content:space-between;align-items:baseline;
  font-size:.86rem;margin-bottom:8px;gap:12px;
}
.progress-top .pct{font-family:var(--f-mono);color:var(--ink-2);font-variant-numeric:tabular-nums;}
.progress{height:6px;background:var(--surface-3);border-radius:100px;overflow:hidden;}
.progress-bar{
  height:100%;background:var(--accent);border-radius:100px;
  width:0%;transition:width .25s ease;
}
.progress.indet .progress-bar{
  width:35% !important;animation:indet 1.3s ease-in-out infinite;
}
@keyframes indet{0%{margin-left:-35%;}100%{margin-left:100%;}}

/* messages */
.msg{
  padding:11px 15px;border-radius:var(--radius-sm);
  font-size:.9rem;margin:0 20px 20px;
  display:flex;gap:10px;align-items:flex-start;
}
.msg svg{width:16px;height:16px;flex-shrink:0;margin-top:2px;}
.msg-warn{background:var(--warn-soft);color:var(--warn);}
.msg-error{background:var(--error-soft);color:var(--error);}
.msg-ok{background:var(--accent-soft);color:var(--accent);}
.msg p{margin:0;}
.msg p + p{margin-top:5px;}

.limits-note{
  font-size:.83rem;color:var(--ink-3);
  text-align:center;margin:12px auto 0;max-width:60ch;
}

/* ---------- ad slots (placeholders only — no real ad code) ---------- */

.ad-slot{
  background:var(--surface-2);
  border:1px dashed var(--rule-2);
  border-radius:var(--radius-sm);
  display:grid;place-items:center;
  color:var(--ink-3);
  font-family:var(--f-mono);font-size:.68rem;letter-spacing:.2em;
  text-transform:uppercase;
  overflow:hidden;
}
.ad-leaderboard{height:96px;margin:26px auto;max-width:970px;}
.ad-incontent{height:250px;margin:34px auto;max-width:728px;}
.ad-sidebar{height:600px;width:300px;}

/* Sticky side rail.
   It lives beside the reading column, never beside the tool — someone using
   the tool came here to work, someone reading has already finished. The margin
   it sits in exists for line length, not for this; the rail is a tenant.
   One side only: rails on both sides make the page feel like an ad farm, which
   would undercut the whole point of the site. */
.rail-wrap{position:relative;}
.ad-rail{display:none;}
@media (min-width:1440px){
  .ad-rail{
    display:block;
    position:absolute;
    top:0;
    bottom:0;
    /* just right of the 760px reading column, with a gap */
    left:calc(50% + 380px + 34px);
    width:300px;
    pointer-events:none;
  }
  .ad-rail .ad-slot{
    position:sticky;
    top:84px;
    height:600px;
    width:300px;
    pointer-events:auto;
  }
}

.ad-modal{
  position:fixed;inset:0;z-index:150;
  background:rgba(10,14,13,.55);
  display:none;place-items:center;padding:20px;
}
.ad-modal.show{display:grid;}
.ad-modal-box{
  background:var(--surface);border-radius:var(--radius);
  padding:18px;max-width:400px;width:100%;position:relative;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
}
.ad-modal-box .ad-slot{height:250px;}
.ad-modal-close{
  position:absolute;top:-11px;right:-11px;
  width:28px;height:28px;border-radius:50%;
  background:var(--ink);color:var(--bg);border:none;
  cursor:pointer;display:grid;place-items:center;font-size:15px;line-height:1;
}
.ad-modal-msg{
  text-align:center;font-size:.88rem;color:var(--ink-2);
  margin:0 0 12px;
}

.ad-corner{
  position:fixed;bottom:16px;right:16px;z-index:90;
  background:var(--surface);border:1px solid var(--rule);
  border-radius:var(--radius);box-shadow:var(--shadow);
  padding:10px;display:none;
}
.ad-corner.show{display:block;}
.ad-corner .ad-slot{width:300px;height:100px;}
.ad-corner-close{
  position:absolute;top:-9px;left:-9px;
  width:22px;height:22px;border-radius:50%;
  background:var(--ink);color:var(--bg);border:none;
  cursor:pointer;display:grid;place-items:center;font-size:13px;line-height:1;
}
/* The corner unit only earns its place where there is room beside the content.
   On anything narrower it covers the tool, which is the fastest way to lose a
   visitor — and a reviewer. */
@media (max-width:1024px){
  .ad-corner{display:none !important;}
}

/* ---------- content sections ---------- */

.section{padding:52px 0;border-top:1px solid var(--rule);}
.section h2{font-size:clamp(1.4rem,3vw,1.85rem);margin-bottom:14px;}
.section-lede{font-size:1.03rem;color:var(--ink-2);max-width:64ch;margin-bottom:0;}

.steps{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:26px;margin-top:30px;
}
.step-n{
  font-family:var(--f-mono);font-size:.76rem;font-weight:600;letter-spacing:.14em;
  color:var(--accent);margin-bottom:9px;
}
.step h3{font-size:1.05rem;margin-bottom:7px;}
.step p{color:var(--ink-2);font-size:.94rem;margin:0;}

.usecases{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:1px;background:var(--rule);
  border:1px solid var(--rule);border-radius:var(--radius);
  margin-top:28px;overflow:hidden;
}
.usecase{background:var(--surface);padding:20px;}
.usecase h3{font-size:1rem;margin-bottom:7px;}
.usecase p{color:var(--ink-2);font-size:.92rem;margin:0;}

/* article / SEO prose
   The measure is capped near 70 characters because longer lines are tiring to
   read. Centring it matters as much as the cap: left-aligned inside a centred
   container, the column looks broken on a wide screen rather than deliberate. */
.article{
  font-family:var(--f-read);
  font-size:1.06rem;
  line-height:1.68;
  max-width:70ch;
  margin-inline:auto;
}
.article h2{font-family:var(--f-ui);font-size:1.5rem;margin:36px 0 13px;}
.article h2:first-child{margin-top:0;}
.article h3{font-family:var(--f-ui);font-size:1.13rem;margin:26px 0 9px;}
.article p{margin:0 0 17px;}
.article ul,.article ol{margin:0 0 17px;padding-left:22px;}
.article li{margin-bottom:8px;}
.article strong{font-weight:600;}
.article table{
  width:100%;border-collapse:collapse;font-family:var(--f-ui);font-size:.92rem;margin:0 0 17px;
}
.article th{
  text-align:left;font-weight:600;font-size:.78rem;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-3);padding:0 14px 8px 0;border-bottom:1.5px solid var(--rule-2);
}
.article td{padding:10px 14px 10px 0;border-bottom:1px solid var(--rule);color:var(--ink-2);vertical-align:top;}
.article td:first-child{color:var(--ink);font-weight:500;}
.table-scroll{overflow-x:auto;margin:0 0 17px;}
.table-scroll table{min-width:460px;margin:0;}

/* FAQ */
.faq{max-width:760px;margin-top:26px;margin-inline:auto;}
.faq details{
  border-bottom:1px solid var(--rule);
}
.faq summary{
  cursor:pointer;padding:16px 30px 16px 0;
  font-weight:600;font-size:1rem;position:relative;
  list-style:none;
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{
  content:"";position:absolute;right:6px;top:50%;
  width:9px;height:9px;margin-top:-6px;
  border-right:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);
  transform:rotate(45deg);transition:transform .18s;
}
.faq details[open] summary::after{transform:rotate(-135deg);margin-top:-2px;}
.faq .faq-body{padding:0 0 18px;color:var(--ink-2);font-size:.97rem;max-width:66ch;}
.faq .faq-body p{margin:0 0 11px;}
.faq .faq-body p:last-child{margin:0;}

/* tool grid */
.tool-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px;margin-top:26px;
}
.tool-card{
  background:var(--surface);border:1px solid var(--rule);
  border-radius:var(--radius);padding:18px;
  text-decoration:none;color:var(--ink);
  display:block;transition:border-color .14s,transform .14s,box-shadow .14s;
}
.tool-card:hover{
  border-color:var(--accent);color:var(--ink);
  transform:translateY(-2px);box-shadow:var(--shadow);
}
.tool-card .tc-icon{
  width:32px;height:32px;border-radius:var(--radius-sm);
  background:var(--accent-soft);color:var(--accent);
  display:grid;place-items:center;margin-bottom:12px;
}
.tool-card .tc-icon svg{width:17px;height:17px;}
.tool-card h3{font-size:1rem;margin-bottom:5px;}
.tool-card p{font-size:.885rem;color:var(--ink-2);margin:0;}
.tool-card.soon{opacity:.55;pointer-events:none;}
.tc-badge{
  font-family:var(--f-mono);font-size:.63rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--ink-3);border:1px solid var(--rule-2);border-radius:100px;
  padding:2px 7px;margin-left:7px;vertical-align:middle;
}

@media (prefers-reduced-motion: reduce){
  .tool-card:hover{transform:none;}
  *{animation-duration:.01ms !important;transition-duration:.01ms !important;}
}

/* ---------- footer ---------- */

.site-footer{
  border-top:1px solid var(--rule);
  background:var(--surface);
  margin-top:60px;padding:40px 0 32px;
}
.footer-grid{
  display:grid;grid-template-columns:1.5fr repeat(auto-fit,minmax(140px,1fr));
  gap:30px;
}
.footer-brand p{
  color:var(--ink-3);font-size:.9rem;margin:11px 0 0;max-width:34ch;
}
.footer-col h4{
  font-size:.76rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:11px;font-weight:600;
}
.footer-col ul{list-style:none;padding:0;margin:0;}
.footer-col li{margin-bottom:7px;}
.footer-col a{color:var(--ink-2);text-decoration:none;font-size:.9rem;}
.footer-col a:hover{color:var(--accent);}
.footer-base{
  border-top:1px solid var(--rule);margin-top:32px;padding-top:20px;
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
  font-size:.85rem;color:var(--ink-3);
}

/* ---------- utilities ---------- */

.hidden{display:none !important;}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.center{text-align:center;}
.mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums;}
