/* Free tools — page layout on top of ../redesign.css (same tokens & colours). */
[hidden] { display: none !important; }
.field small { font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1; }
.tool-hero { position: relative; padding: 56px 0 28px; overflow: hidden; }
.tool-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 70% at 90% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
              radial-gradient(45% 60% at 0% 0%, color-mix(in srgb, var(--c2) 12%, transparent), transparent 70%); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.tool-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -.03em; color: var(--ink); font-weight: 770; display: flex; align-items: center; gap: 16px; }
.tool-hero h1 .ib { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 10px 22px -10px var(--c); }
.tool-hero h1 .ib .ico { width: 26px; height: 26px; }
.tool-hero p.lede { font-size: 18px; color: var(--muted); max-width: 720px; margin-top: 14px; }
.private { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--good); background: var(--good-tint); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.private .ico { width: 15px; height: 15px; }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; padding-bottom: 32px; }
.tool-grid.wide { grid-template-columns: 1.05fr 1fr; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 17px; color: var(--ink); margin-bottom: 16px; letter-spacing: -.01em; }
.result { border-top: 4px solid var(--c); }
@media (max-width: 860px) { .tool-grid, .tool-grid.wide { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .lbl { font-size: 14px; font-weight: 650; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; font: inherit; font-weight: 650; font-size: 14.5px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--c); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text); margin-bottom: 16px; }
.check input { margin-top: 4px; accent-color: var(--c); width: 16px; height: 16px; }

.big { font-family: var(--font-display); font-size: 46px; font-weight: 780; letter-spacing: -.03em; color: var(--ink); line-height: 1.1; }
.big-sub { color: var(--muted); font-size: 14.5px; margin: 4px 0 18px; }
.lines { list-style: none; border-top: 1px solid var(--line); }
.lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lines li span:first-child { color: var(--muted); }
.lines li span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.msg { display: flex; gap: 10px; font-size: 14px; padding: 10px 12px; border-radius: 10px; margin-top: 12px; }
.msg .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.msg.note { background: color-mix(in srgb, var(--c1) 9%, transparent); color: var(--text); }
.msg.note .ico { color: var(--c1); }
.msg.warn { background: color-mix(in srgb, var(--c4) 13%, transparent); color: var(--text); }
.msg.warn .ico { color: var(--c4); }
.msg.err { background: color-mix(in srgb, var(--c5) 11%, transparent); color: var(--text); }
.msg.err .ico { color: var(--c5); }
.empty { color: var(--muted); font-size: 15px; padding: 24px 0; text-align: center; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }

/* description formatter */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.toolbar button { font: inherit; font-size: 13.5px; font-weight: 650; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.toolbar button:hover { border-color: var(--c); color: var(--c); }
.meter { height: 8px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 4px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--c3), var(--c)); transition: width .2s ease; }
.meter.over span { background: var(--c5); }
.count { font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; }
.preview { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--bg); min-height: 160px; font-size: 15px; color: var(--text); max-height: 420px; overflow: auto; }
.preview p { margin-bottom: 12px; }
.preview h4 { font-size: 17px; color: var(--ink); margin: 6px 0 10px; }
.preview ul, .preview ol { margin: 0 0 12px 22px; }
.code { width: 100%; font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px; color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; height: 130px; resize: vertical; }
.copy { margin-top: 10px; }

/* keyword boxes */
.kbox { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kbox .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 750; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.kbox code { font-family: inherit; font-size: 14.5px; color: var(--ink); word-break: break-word; }
.kbox code.empty-box { color: var(--muted); font-style: italic; }
.kbox .len { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kbox button { grid-column: 3; }
.mini { font: inherit; font-size: 12.5px; font-weight: 650; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.mini:hover { border-color: var(--c); color: var(--c); }
.drop { list-style: none; margin-top: 8px; display: grid; gap: 6px; font-size: 14px; }
.drop li { padding: 8px 10px; border-radius: 9px; background: var(--bg-soft); }
.drop li b { color: var(--ink); }
.drop li span { color: var(--muted); }
details.more { margin-top: 16px; }
details.more summary { cursor: pointer; font-weight: 650; color: var(--ink); font-size: 14.5px; }

/* explainer + CTA */
.explain { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding-top: 8px; padding-bottom: 72px; }
.explain h2 { font-size: 20px; color: var(--ink); margin-bottom: 10px; letter-spacing: -.01em; }
.explain p, .explain li { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.explain ul { padding-left: 20px; }
.cta-card { border-radius: var(--r-lg); padding: 26px; color: #dbe5f7; background: linear-gradient(135deg, #1b3a73, #2b5aa6 55%, #6d3fd6); }
.cta-card h3 { color: #fff; font-size: 19px; margin-bottom: 8px; }
.cta-card p { color: #dbe5f7; font-size: 14.5px; margin-bottom: 16px; }
.src { font-size: 13px; color: var(--muted); margin-top: 10px; }
@media (max-width: 860px) { .explain { grid-template-columns: 1fr; } }

/* hub */
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 80px; }
@media (max-width: 700px) { .hub { grid-template-columns: 1fr; } }
