/* ===================================================================
   FREE TOOLS  (free-tools.php + the tool pages, 2026-12-02)
   Loaded only on those pages, after landing.css. Uses landing.css variables.
   =================================================================== */
.tool-wrap{ padding-top:0; }
.tool{ max-width:1080px; margin:0 auto; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-md); padding:30px; }
.tool__grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.08fr); gap:30px; align-items:start; }
.tool__panel{ min-width:0; }
.tool__out{ position:sticky; top:88px; }
.tool__h{ font-family:var(--font-display); font-weight:600; font-size:19px; margin:0 0 16px; color:var(--ink); }
.tool__sub{ font-family:var(--font-sans); font-weight:700; font-size:12.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--accent-3); margin:26px 0 12px; }
.tool__sub:first-child{ margin-top:0; }

/* fields */
.tl-field{ margin:0 0 16px; }
.tl-label{ display:block; font-weight:600; font-size:14.5px; margin:0 0 7px; color:var(--ink); }
.tl-label small{ font-weight:500; color:var(--muted); }
.tl-hint{ font-size:13.5px; line-height:1.5; color:var(--muted); margin:6px 0 0; }
.tl-select, .tl-input, .tl-textarea{
  width:100%; font:inherit; font-size:16px; line-height:1.35; padding:11px 13px;
  border:1.5px solid var(--line-2); border-radius:var(--radius-sm); background:var(--bg); color:var(--ink);
}
.tl-select{ appearance:none; -webkit-appearance:none; padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1917' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; background-size:16px; }
.tl-select:focus, .tl-input:focus, .tl-textarea:focus{ outline:none; border-color:var(--accent-2); box-shadow:0 0 0 3px rgba(22,163,74,.16); }
.tl-input[type=number]{ font-variant-numeric:tabular-nums; }
.tl-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.tl-row--3{ grid-template-columns:1fr 1fr 1fr; }
.tl-inline{ display:flex; gap:8px; align-items:stretch; }
.tl-inline .tl-input{ flex:1 1 auto; min-width:0; }
.tl-inline .tl-select{ flex:0 0 auto; width:auto; min-width:96px; }
.tl-prefix{ display:flex; align-items:center; padding:0 12px; border:1.5px solid var(--line-2); border-radius:var(--radius-sm); background:var(--panel); color:var(--ink-soft); font-weight:600; }

/* chips (toggle buttons) */
.tl-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.tl-chip{ border:1.5px solid var(--line-2); background:var(--bg); color:var(--ink-soft); border-radius:999px; padding:8px 14px; font-size:14.5px; font-weight:600; line-height:1.2; transition:background .15s, color .15s, border-color .15s; }
.tl-chip:hover{ border-color:var(--ink); color:var(--ink); }
.tl-chip[aria-pressed="true"]{ background:var(--ink); color:#fff; border-color:var(--ink); }
.tl-chips--seg{ background:var(--panel); border-radius:999px; padding:4px; gap:4px; display:inline-flex; flex-wrap:wrap; }
.tl-chips--seg .tl-chip{ border-color:transparent; background:transparent; }
.tl-chips--seg .tl-chip[aria-pressed="true"]{ background:#fff; color:var(--ink); border-color:var(--line-2); box-shadow:var(--shadow-sm); }

/* output */
.tl-out{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.tl-out__label{ font-weight:700; font-size:12.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--accent-3); margin:0 0 10px; }
.tl-textarea{ min-height:220px; resize:vertical; background:#fff; font-size:15.5px; line-height:1.65; }
.tl-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.tl-actions .btn{ padding:13px 22px; font-size:15.5px; }
.tl-tip{ font-size:14px; line-height:1.55; color:var(--ink-soft); margin:12px 0 0; }
.tl-big{ font-family:var(--font-display); font-size:clamp(30px,4.4vw,44px); font-weight:600; line-height:1.08; color:var(--ink); letter-spacing:-.01em; word-break:break-word; }
.tl-big small{ font-size:.5em; font-weight:500; color:var(--muted); }
.tl-sublist{ margin:12px 0 0; padding:0; list-style:none; font-size:15px; color:var(--ink-soft); }
.tl-sublist li{ padding:6px 0; border-top:1px solid var(--line); font-variant-numeric:tabular-nums; }
.tl-sublist li:first-child{ border-top:0; }
.tl-note{ font-size:13.5px; line-height:1.55; color:var(--muted); margin:12px 0 0; }
.tl-pills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:14px; }
.tl-pill{ font-size:12.5px; font-weight:700; padding:5px 10px; border-radius:999px; background:#fff; border:1px solid var(--line-2); color:var(--muted); }
.tl-pill.is-on{ background:rgba(108,233,160,.22); border-color:rgba(22,163,74,.35); color:var(--accent-3); }
.tl-copied{ background:var(--accent-2) !important; color:#fff !important; }

/* strip under the tool that points to the product */
.tl-cta{ max-width:1080px; margin:22px auto 0; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; border:1px solid var(--line); border-radius:var(--radius); padding:18px 22px; background:var(--bg); }
.tl-cta p{ margin:0; color:var(--ink-soft); font-size:16px; line-height:1.55; flex:1 1 320px; }
.tl-cta strong{ color:var(--ink); }
.tl-cta .btn{ white-space:normal; text-align:center; }

/* tables */
.tl-table{ width:100%; border-collapse:collapse; font-size:15px; margin:0 0 18px; }
.tl-table th, .tl-table td{ text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.tl-table th{ font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.tl-table td.num, .tl-table th.num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.art-prose .tl-table{ font-size:16px; color:var(--ink-soft); }
.tl-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* hub */
.tools-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; max-width:1080px; margin:0 auto; }
.tools-grid .guide-card h3{ font-size:23px; }
.tool-card__icon{ width:46px; height:46px; border-radius:14px; background:rgba(108,233,160,.25); color:var(--accent-3); display:grid; place-items:center; margin-bottom:16px; }
.tool-card__icon svg{ width:24px; height:24px; }

/* ---------- scale calculator ---------- */
.tl-ruler{ background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px; overflow-x:auto; }
.tl-ruler svg{ display:block; max-width:none; }
@media screen{ .tl-ruler svg{ width:100%; height:auto; } }   /* on screen it fits the box; print keeps the exact mm size from the SVG */

/* ---------- fee calculator ---------- */
.tl-methods .tl-method{ border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; margin:0 0 10px; background:var(--bg); }
.tl-method__head{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.tl-method__name{ font-weight:700; font-size:15px; }
.tl-method__fee{ font-weight:700; font-variant-numeric:tabular-nums; font-size:17px; }
.tl-method__meta{ font-size:13.5px; color:var(--muted); margin-top:4px; }
.tl-bar{ height:6px; border-radius:6px; background:var(--panel-2); margin-top:8px; overflow:hidden; }
.tl-bar > i{ display:block; height:100%; background:var(--accent-2); border-radius:6px; }
.tl-method.is-low .tl-bar > i{ background:#C98A2B; }
.tl-method.is-pick{ border-color:var(--ink); box-shadow:0 0 0 1px var(--ink) inset; }
.tl-radio{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:15px; cursor:pointer; }
.tl-radio input{ width:18px; height:18px; accent-color:var(--ink); margin:0; }
.tl-helper{ border:1px dashed var(--line-2); border-radius:var(--radius-sm); padding:12px 14px; margin:-4px 0 16px; background:var(--bg); }
.tl-helper summary{ cursor:pointer; font-weight:600; font-size:14.5px; color:var(--accent-3); }
.tl-helper[open] summary{ margin-bottom:12px; }

/* ---------- palette generator ---------- */
.tl-drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; min-height:170px; border:2px dashed var(--line-2); border-radius:var(--radius); background:var(--bg); padding:22px; cursor:pointer; transition:border-color .15s, background .15s; }
.tl-drop:hover, .tl-drop.is-over{ border-color:var(--accent-2); background:rgba(108,233,160,.08); }
.tl-drop strong{ font-size:16.5px; }
.tl-drop span{ font-size:14px; color:var(--muted); }
.tl-drop svg{ width:30px; height:30px; color:var(--accent-3); }
.tl-samples{ display:grid; grid-template-columns:repeat(6,1fr); gap:8px; }
.tl-sample{ padding:0; border:2px solid transparent; border-radius:10px; overflow:hidden; aspect-ratio:1; background:var(--panel); }
.tl-sample img{ width:100%; height:100%; object-fit:cover; }
.tl-sample[aria-pressed="true"]{ border-color:var(--ink); }
.tl-preview{ border-radius:var(--radius-sm); overflow:hidden; background:var(--panel-2); aspect-ratio:3/2; display:grid; place-items:center; color:var(--muted); font-size:14px; }
.tl-preview img{ width:100%; height:100%; object-fit:cover; }
.tl-strip{ display:flex; height:46px; border-radius:12px; overflow:hidden; margin:14px 0 0; box-shadow:inset 0 0 0 1px rgba(0,0,0,.06); }
.tl-strip i{ display:block; height:100%; }
.tl-swatches{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-top:14px; }
.tl-sw{ display:flex; gap:10px; align-items:center; text-align:left; border:1px solid var(--line); border-radius:12px; background:#fff; padding:8px; font:inherit; color:var(--ink); }
.tl-sw:hover{ border-color:var(--ink); }
.tl-sw__c{ flex:0 0 40px; height:40px; border-radius:8px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.08); }
.tl-sw__t{ min-width:0; line-height:1.3; }
.tl-sw__n{ display:block; font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tl-sw__h{ display:block; font-family:var(--font-mono); font-size:12.5px; color:var(--ink-soft); }
.tl-sw__p{ display:block; font-size:12px; color:var(--muted); }
.tl-rule{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.tl-rule__i{ border-radius:12px; padding:12px; min-height:92px; display:flex; flex-direction:column; justify-content:flex-end; box-shadow:inset 0 0 0 1px rgba(0,0,0,.08); }
.tl-rule__i b{ font-size:20px; font-family:var(--font-display); }
.tl-rule__i span{ font-size:12.5px; font-weight:600; }

@media (max-width:900px){
  .tool__grid{ grid-template-columns:1fr; }
  .tool__out{ position:static; }
  .tools-grid{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  .tool{ padding:18px; border-radius:var(--radius); }
  .tl-row, .tl-row--3{ grid-template-columns:1fr; }
  .tl-samples{ grid-template-columns:repeat(3,1fr); }
  .tl-cta{ padding:16px; }
}

/* print only the scale ruler (body gets .tl-printing while the print dialog is open) */
@media print{
  body.tl-printing *{ visibility:hidden !important; }
  body.tl-printing .tl-print, body.tl-printing .tl-print *{ visibility:visible !important; }
  body.tl-printing .tl-print{ position:absolute; left:0; top:0; border:0; padding:0; overflow:visible; }
}
