/* The free tools: a converter on one page, in the site's own colours. */
.tool { max-width: 880px; padding-top: 48px; }
.tool-crumbs { display: flex; gap: 8px; font-size: 14px; }
.tool-crumbs a { color: var(--muted); text-decoration: none; padding-block: 10px; }
.tool-crumbs a + a::before { content: "/"; margin-right: 8px; color: var(--field); }
.tool-crumbs a:hover { color: var(--accent); }
.tool h1 { margin: 8px 0 0; font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -.035em; }
.tool .lede { max-width: 640px; margin: 18px 0 0; font-size: 18px; text-align: left; }
.tool h2 { margin-top: 56px; font-size: 24px; letter-spacing: -.02em; }
.tool h3 { margin-top: 24px; font-size: 17px; font-weight: 600; }
.tool p, .tool li { color: var(--body); }
.tool h2 + p, .tool h3 + p, .tool ul { margin-top: 10px; }
.tool code { font: .88em "Geist Mono", ui-monospace, monospace; background: var(--surface); padding: .12em .36em; border-radius: 5px; }

.panel { margin-top: 32px; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-weight: 600; font-size: 15px; color: var(--heading); }
.field .hint { font-size: 14px; color: var(--muted); }
.box { width: 100%; min-height: 200px; max-height: 480px; overflow: auto; padding: 14px 16px; border: 1px solid var(--field); border-radius: 14px; background: var(--bg); color: var(--text); font: 400 14.5px/1.6 "Geist Mono", ui-monospace, monospace; font-variant-ligatures: none; resize: vertical; }
.box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 82, 35, .14); }
.box.rich { font: 400 15px/1.6 Inter, -apple-system, system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.box.rich:empty::before { content: attr(data-placeholder); color: var(--muted); }
.box[readonly] { background: var(--surface); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.status { min-height: 22px; margin: 0; font-size: 14px; color: var(--muted); }

.options { display: grid; gap: 14px; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; }
.options legend { padding: 0 6px; font-weight: 600; font-size: 15px; color: var(--heading); }
.choices { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface); width: fit-content; max-width: 100%; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--body); }
.choices input:checked + span { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(20, 20, 30, .12); }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; color: var(--body); cursor: pointer; }
.checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--button); }

.preview { overflow-x: auto; padding: 4px 0; }
.preview table { border-collapse: collapse; font-size: 15px; min-width: 50%; }
.preview th, .preview td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.preview th { font-weight: 600; color: var(--heading); }
.preview .a-center { text-align: center; }
.preview .a-right { text-align: right; font-variant-numeric: tabular-nums; }

.tool-coffee { margin-top: 40px; padding: 18px 20px; border-radius: 14px; background: var(--surface); color: var(--body); font-size: 15px; }
.tool-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.tool-list a { display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; color: inherit; text-decoration: none; transition: border-color .16s ease; }
.tool-list a:hover { border-color: var(--field); }
.tool-list h2 { margin: 0; font-size: 21px; }
.tool-list a:hover h2 { color: var(--accent); }
.tool-list p { margin-top: 6px; }
@media (max-width: 520px) { .tool { padding-top: 24px; } .box { min-height: 160px; } }
