/* Sureno free tools: page sections (how to, screenshot, questions, related), shared controls
   for the newer tools, phone fixes, and printing. Loaded on /tools and every tool page. */

/* ---------- how to use it, with a real screenshot ---------- */
.tool-how{margin:56px 0 0}
.tool-how h2,.tool-qa h2{font-size:28px;margin:0 0 18px}
.tool-how-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:36px;align-items:start}
.tool-how.no-shot .tool-how-in{grid-template-columns:minmax(0,1fr)}
.tool-how .tool-steps{counter-reset:st;list-style:none;padding:0;margin:0;display:grid;gap:14px}
.tool-how .tool-steps li{counter-increment:st;position:relative;padding:2px 0 0 52px;margin:0;font-size:17.5px;line-height:1.6;color:var(--ink-2);min-height:38px}
.tool-how .tool-steps li::before{content:counter(st);position:absolute;left:0;top:0;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;
  background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:16px}
.tool-shot{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:10px;box-shadow:var(--shadow)}
.tool-shot img{width:100%;height:auto;border-radius:12px;display:block;background:var(--bg-2)}
.tool-shot figcaption{font-size:14px;color:var(--muted);padding:9px 6px 2px;line-height:1.45}
.tool-qa{margin:52px 0 0}
.tool-qa .faq{max-width:none;margin:0}
.tool-related h2{margin-bottom:18px}
.tool-new{display:inline-block;vertical-align:2px;margin-left:6px;padding:1px 9px;border-radius:999px;background:var(--warm-soft);color:#9a4f22;
  font-style:normal;font-size:12.5px;font-weight:700;letter-spacing:.02em}
:root[data-theme="dark"] .tool-new{color:var(--warm)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tool-new{color:var(--warm)}}

/* ---------- /tools: new and popular strip ---------- */
.tools-strip{margin:26px auto 0;max-width:980px}
.tools-strip h2{font-family:var(--font);font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 10px;text-align:center}
.tools-strip-row{display:flex;gap:12px;overflow-x:auto;padding:4px 4px 12px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.tools-strip-row a{flex:0 0 170px;scroll-snap-align:start;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:18px;
  overflow:hidden;color:inherit;text-decoration:none;box-shadow:var(--shadow);transition:transform .25s,box-shadow .25s}
.tools-strip-row a:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
.tools-strip-row .art{display:block;aspect-ratio:16/9;background:var(--bg-2)}
.tools-strip-row .art svg{width:100%;height:100%;display:block}
.tools-strip-row b{display:block;padding:10px 12px 12px;font-size:15.5px;line-height:1.3;font-weight:600}
@media (min-width:1100px){.tools-strip-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible}}

/* ---------- shared controls for the newer tools ---------- */
.tool-lab{display:block;font-size:15px;font-weight:600;color:var(--ink-2);margin:18px 0 8px}
.tool-row>.tool-lab{margin:0;align-self:center}
.seg{display:inline-flex;flex-wrap:wrap;gap:6px;padding:5px;border-radius:16px;background:var(--bg);border:1px solid var(--line)}
.seg button{min-height:44px;padding:8px 16px;border-radius:12px;border:0;background:transparent;font:inherit;font-size:16px;font-weight:600;color:var(--ink-2);cursor:pointer;
  display:inline-flex;align-items:center;gap:8px}
.seg button:hover{background:var(--surface)}
.seg button.on{background:var(--accent);color:#fff}
:root[data-theme="dark"] .seg button.on{color:#0f191d}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .seg button.on{color:#0f191d}}
.seg button i{width:16px;height:16px;border-radius:50%;display:inline-block;border:2px solid rgba(255,255,255,.8)}
.seg-lg{display:flex;width:100%;margin-bottom:18px}
.seg-lg button{flex:1 1 0;justify-content:center;min-height:52px;font-size:17px}
.btn-lg{min-height:56px;padding:14px 30px;font-size:18px}
.tool-progress{margin-top:18px;display:grid;gap:8px}
.tool-progress-bar{display:block;height:12px;border-radius:12px;background:var(--bg-2);overflow:hidden}
.tool-progress-bar i{display:block;height:100%;width:0;background:var(--accent);border-radius:12px;transition:width .3s}
.tool-progress span:last-child{font-size:15.5px;color:var(--muted)}
.tool-warn{background:var(--warm-soft);border:1px solid color-mix(in srgb,var(--warm) 40%,transparent);border-radius:16px;padding:14px 18px;font-size:16px;line-height:1.55;margin:0 0 20px;color:var(--ink)}
.tool-warn b{display:block;margin-bottom:2px}
.tool-ok{color:var(--ok);font-weight:600}

/* Picture to text */
.ocr-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin:14px 0 4px}
.ocr-thumbs:empty{display:none}
.ocr-thumb{margin:0;background:var(--bg);border:1px solid var(--line);border-radius:16px;padding:8px;display:grid;gap:6px;min-width:0}
.ocr-thumb-img{display:grid;place-items:center;aspect-ratio:4/3;overflow:hidden;border-radius:10px;background:var(--bg-2)}
.ocr-thumb-img img{max-width:100%;max-height:100%;object-fit:contain;transition:transform .3s}
.ocr-thumb figcaption{font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ocr-thumb-btns{display:flex;gap:6px}
.ocr-thumb-btns .btn{flex:1 1 0;padding:8px 6px;min-height:44px;font-size:15px;justify-content:center}
.tool-card textarea.is-big{font-size:26px;line-height:1.5}

/* PDF to Word: a look at the first page */
.docx-peek{margin-top:18px}
.docx-peek-in{background:#fff;color:#1d2327;border:1px solid var(--line);border-radius:14px;padding:22px 26px;max-height:340px;overflow:auto;font-family:Calibri,Carlito,"Segoe UI",Arial,sans-serif;font-size:15px;line-height:1.5}
.docx-peek-in h3{font-size:22px;margin:4px 0 10px;color:#1f3b4d;font-family:inherit}
.docx-peek-in h4{font-size:17px;margin:10px 0 6px;color:#2f5f70;font-family:inherit}
.docx-peek-in p{margin:0 0 10px}

/* Fill-in tools with a live paper preview (invoice, resume, calendar). */
.tool-card{container-type:inline-size}
.mk{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.mk-form{display:grid;gap:14px;min-width:0}
.mk-form fieldset{border:1px solid var(--line);border-radius:18px;padding:14px 16px 16px;margin:0;display:grid;gap:12px;min-width:0}
.mk-form legend{font-weight:700;font-size:16px;padding:0 6px;color:var(--ink)}
.mk-form label{display:flex;flex-direction:column;gap:6px;font-size:15px;font-weight:600;color:var(--ink-2);min-width:0}
.mk-form input,.mk-form select,.mk-form textarea{width:100%;min-width:0!important}
.mk-form textarea{min-height:0!important;resize:vertical}
.mk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.mk-preview{min-width:0}
.mk-preview .tool-lab{margin-top:0}
.mk-paper{background:#e9e6df;border-radius:18px;padding:14px;overflow:hidden}
:root[data-theme="dark"] .mk-paper{background:#0b1316}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .mk-paper{background:#0b1316}}
.mk-actions{margin-top:22px}
.mk-row{display:grid;gap:8px;border:1px dashed var(--line-2);border-radius:14px;padding:10px;margin-bottom:10px}
.mk-row-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:14px;color:var(--muted);font-weight:600}
.mk-x{min-width:44px;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);cursor:pointer;font-size:18px;color:var(--ink-2)}
.mk-x:hover{border-color:var(--danger);color:var(--danger)}
@container (min-width:960px){.mk{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:28px}.mk-preview{position:sticky;top:90px}}

/* ---------- phone and tablet fixes for the tools ---------- */
/* Rows with display:flex/grid ignored the hidden attribute (e.g. the QR code's Wi-Fi row, BMI's metric row). */
.tool-card [hidden],.tool-card[hidden]{display:none!important}
.tool-card{min-width:0}
.tool-stats div{min-width:0}
.tool-card input[type=email],.tool-card input[type=tel],.tool-card input[type=search]{padding:13px 16px;border:1px solid var(--line-2);border-radius:14px;background:var(--bg);font-size:17px;min-width:120px;color:inherit}
.tool-card label.check{min-height:44px}
.tool-top .crumbs a{display:inline-flex;align-items:center;min-height:44px}
.tool-stats b{overflow-wrap:anywhere}
.tool-card textarea,.tool-card input,.tool-card select{max-width:100%}
.tool-files button{min-width:44px;min-height:44px;width:auto;height:auto}
.tool-actions .btn{min-height:46px}
.tool-row label{min-width:0}
.tool-drop{min-height:150px}
@media (max-width:640px){
  .tool-how-in{grid-template-columns:minmax(0,1fr);gap:22px}
  .tool-how h2,.tool-qa h2,.tool-related h2{font-size:24px}
  .tool-card{padding:18px 16px;border-radius:22px}
  .tool-row{gap:14px}
  .tool-row label{flex:1 1 100%}
  .tool-row label.check{flex:1 1 auto}
  .tool-card input[type=text],.tool-card input[type=number],.tool-card input[type=url],.tool-card input[type=password],.tool-card input[type=date],
  .tool-card input[type=time],.tool-card input[type=datetime-local],.tool-card input[type=email],.tool-card input[type=tel],.tool-card select{width:100%;min-width:0}
  .tool-card input[type=range]{width:100%}
  .tool-actions .btn{flex:1 1 auto;justify-content:center}
  .tool-head{flex-direction:column;align-items:stretch;gap:16px}
  .tool-hero-art{width:100%}
  .tool-top h1{font-size:clamp(30px,8.4vw,40px)}
  .tool-top .lede{font-size:18px}
  .calc-line{font-size:17px}
  .calc-line input{width:100%!important;flex:1 1 120px}
  .limits div{grid-template-columns:1fr 70px;gap:6px 10px}
  .limits div>span:first-child{grid-column:1/-1}
  .countdown{grid-template-columns:repeat(2,1fr)}
  .tool-stats{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
  .tool-big{padding:18px 14px}
  .tool-files li{padding:6px 6px 6px 12px}
  .seg{display:flex;width:100%}
  .seg button{flex:1 1 auto;justify-content:center;padding:8px 10px}
  .tool-chips a{min-height:44px}
}

/* ---------- printing (invoice, resume, calendar): only the sheet is printed ---------- */
#tool-print-root{display:none}
@media print{
  body.tool-printing>*:not(#tool-print-root){display:none!important}
  body.tool-printing #tool-print-root{display:block!important}
  body.tool-printing{background:#fff!important;margin:0}
}
