/* Free Tools Hub – shared styles
   Light theme only, high-contrast dark text on light backgrounds. */

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe3ef;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf0ff;
  --ink: #0b1220;
  --success-bg: #e8f7ee;
  --success-text: #11643a;
  --error-bg: #fdecec;
  --error-text: #9b1c1c;
  --warn-bg: #fff6e0;
  --warn-text: #7a4b00;
  --info-bg: #e8f1ff;
  --info-text: #1e3a8a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 40px rgba(15, 23, 42, .13);
  --radius: 16px;
  --radius-sm: 12px;
  --cat-text: #2563eb;
  --cat-pdf: #dc2626;
  --cat-image: #059669;
  --cat-everyday: #7c3aed;
  --cat: var(--accent);
  --cat-soft: var(--accent-soft);
}
/* each page sets its category colour on <body> */
body.cat-text { --cat: #2563eb; --cat-soft: #e6eeff; }
body.cat-pdf { --cat: #dc2626; --cat-soft: #fde8e8; }
body.cat-image { --cat: #059669; --cat-soft: #dcf5ea; }
body.cat-everyday { --cat: #7c3aed; --cat-soft: #efe8fd; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
img, canvas, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
code { background: #eef1f6; padding: 1px 6px; border-radius: 5px; font-size: .92em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed); box-shadow: 0 4px 10px rgba(37, 99, 235, .3); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-list a { color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; padding: 8px 13px; border-radius: 999px; transition: background .15s, color .15s; }
.nav-list a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.nav-list a[aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); }
.nav-list a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-btn { display: none; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 1.3rem; border-radius: 8px; width: 44px; height: 42px; cursor: pointer; }

/* ---------- Hero / homepage ---------- */
.hero { background: radial-gradient(900px 380px at 88% -10%, rgba(167, 139, 250, .55), transparent 62%), radial-gradient(700px 320px at 0% 110%, rgba(56, 189, 248, .35), transparent 60%), linear-gradient(135deg, #1e3a8a 0%, #2563eb 58%, #4f46e5 100%); color: #fff; text-align: center; padding: 64px 0 52px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.2vw, 3.1rem); font-weight: 800; letter-spacing: -.028em; margin: 0 auto 14px; max-width: 820px; }
.hero p { color: #f5f8ff; font-size: 1.15rem; max-width: 660px; margin: 0 auto 30px; }
.badge { display: inline-block; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .3); font-weight: 700; font-size: .78rem; letter-spacing: .06em; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }

.search-box { max-width: 640px; margin: 0 auto; }
.search-box input { width: 100%; font: inherit; font-size: 1.1rem; padding: 17px 20px 17px 54px; border: 0; border-radius: var(--radius); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 18px center / 22px no-repeat; color: #0f172a; color-scheme: light; box-shadow: 0 12px 32px rgba(8, 20, 70, .35); }
.search-box input::placeholder { color: #64748b; opacity: 1; }
.search-box input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .45), 0 12px 32px rgba(8, 20, 70, .35); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 0; }
.filter-btn { font: inherit; font-weight: 600; font-size: .95rem; min-height: 42px; padding: 8px 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .15s, color .15s; }
.filter-btn:hover { background: rgba(255, 255, 255, .26); }
.filter-btn[aria-pressed="true"] { background: #fff; border-color: #fff; color: #1e3a8a; }
.hero .filter-btn:focus-visible { outline-color: #fff; }

.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin: 28px 0 0; padding: 0; color: #fff; font-size: .95rem; font-weight: 600; }
.trust li::before { content: "\2713"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: .75rem; }

.cat-section { margin: 52px 0 10px; }
.cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.cat-head h2 { font-size: 1.55rem; margin: 0; }
.cat-blurb { margin: 2px 0 0; color: var(--muted); }
.cat-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--accent-soft); }
.cat-icon.cat-text { background: #e6eeff; }
.cat-icon.cat-pdf { background: #fde8e8; }
.cat-icon.cat-image { background: #dcf5ea; }
.cat-icon.cat-everyday { background: #efe8fd; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.tool-link { --c: var(--accent); --ct: var(--accent-dark); position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px 20px; text-decoration: none; color: var(--text); transition: transform .18s, box-shadow .18s, border-color .18s; height: 100%; overflow: hidden; }
.tool-link::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.tool-link[data-cat="text"] { --c: #2563eb; --ct: #1d4ed8; }
.tool-link[data-cat="pdf"] { --c: #dc2626; --ct: #b91c1c; }
.tool-link[data-cat="image"] { --c: #059669; --ct: #047857; }
.tool-link[data-cat="everyday"] { --c: #7c3aed; --ct: #6d28d9; }
.tool-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c); color: var(--text); }
.tool-link:active { transform: translateY(-1px); }
.tool-link:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.tool-icon { flex: none; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 1.75rem; background: var(--accent-soft); }
.tool-icon.cat-text { background: #e6eeff; }
.tool-icon.cat-pdf { background: #fde8e8; }
.tool-icon.cat-image { background: #dcf5ea; }
.tool-icon.cat-everyday { background: #efe8fd; }
.tool-body { display: block; }
.tool-link h3 { font-size: 1.12rem; margin: 0 0 6px; }
.tool-link p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.tool-open { margin-top: auto; padding-top: 4px; font-weight: 700; font-size: .92rem; color: var(--ct); }
.tool-link:hover .tool-open { text-decoration: underline; }
.empty-state { text-align: center; color: var(--muted); padding: 44px 10px; background: var(--card); border: 2px dashed var(--border); border-radius: var(--radius); margin-top: 28px; }

.how { margin: 64px 0 0; }
.how h2 { text-align: center; font-size: 1.6rem; margin-bottom: 24px; }
.how-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; }
.how-steps li { display: flex; gap: 16px; align-items: flex-start; }
.how-num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.how-steps h3 { font-size: 1.05rem; margin: 0 0 4px; }
.how-steps p { margin: 0; color: var(--muted); font-size: .96rem; }

.home-notes { margin: 56px 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.note-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); font-size: 1.4rem; margin-bottom: 14px; }
.note-card h3 { font-size: 1.1rem; }
.note-card p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- Tool page ---------- */
.tool-hero { background: linear-gradient(180deg, var(--cat-soft) 0%, var(--bg) 100%); padding-bottom: 14px; }
.breadcrumb { font-size: .9rem; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-dark); }
.page-head { padding: 14px 0 6px; }
.page-head h1 { font-size: clamp(1.9rem, 4.8vw, 2.6rem); font-weight: 800; letter-spacing: -.026em; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 720px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.chips li { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: .88rem; font-weight: 600; color: var(--text); }
.chips li::before { content: "\2713"; color: #15803d; margin-right: 7px; font-weight: 800; }

.tool-card { background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--cat); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 18px 0 28px; }
.tool-card h2 { font-size: 1.25rem; }

.field { margin-bottom: 18px; }
.field > label, .field-label, legend { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 7px; color: var(--text); }
fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.hint { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > .field { flex: 1 1 200px; min-width: 0; margin-bottom: 14px; }

textarea, input[type="text"], input[type="number"], input[type="date"], select {
  display: block; width: 100%; font: inherit; font-size: 1.02rem;
  color: #111111; background-color: #ffffff; color-scheme: light;
  border: 2px solid #c3cee0; border-radius: var(--radius-sm); padding: 11px 14px; transition: border-color .15s, box-shadow .15s;
}
select { text-overflow: ellipsis; }
textarea {
  min-height: 300px; resize: vertical; padding: 16px 18px; line-height: 1.7; font-size: 1.1rem; font-weight: 500;
  color: #111111 !important; -webkit-text-fill-color: #111111; caret-color: #111111; background-color: #fff !important; opacity: 1;
}
textarea.mono, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 1rem; }
textarea.short { min-height: 150px; }
textarea::placeholder, input::placeholder { color: #64748b; -webkit-text-fill-color: #64748b; opacity: 1; }
textarea::selection, input::selection { background: #bcd3ff; color: #111; -webkit-text-fill-color: #111; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] { width: 56px; height: 42px; padding: 2px; border: 2px solid #b8c3d6; border-radius: 10px; background: #fff; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 8px 0; cursor: pointer; }
.check span { font-weight: 500; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 20px 0 24px; }
.stat { background: linear-gradient(180deg, #f3f7ff, var(--accent-soft)); border: 1px solid #cddcf8; border-radius: var(--radius-sm); padding: 16px 8px; text-align: center; }
.stat .num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent-dark); line-height: 1.15; word-break: break-word; }
.stats.stats-6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .stats.stats-6 { grid-template-columns: repeat(2, 1fr); } }
.stat .label { margin-top: 4px; font-size: .9rem; color: var(--text); font-weight: 600; }

/* buttons */
.btn-row { margin-bottom: 18px; }
.group-title { font-size: .92rem; font-weight: 700; color: var(--muted); margin: 0 0 9px; }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { font: inherit; font-weight: 600; font-size: 1rem; min-height: 46px; padding: 10px 22px; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid var(--border); background: #fff; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
.btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .menu-btn:focus-visible, .filter-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .35), 0 6px 14px rgba(37, 99, 235, .22); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: 0 2px 4px rgba(37, 99, 235, .4), 0 10px 22px rgba(37, 99, 235, .3); }
.btn.danger:hover { border-color: #dc2626; color: #b91c1c; background: #fff5f5; }
.btn.small { min-height: 36px; padding: 5px 12px; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* status messages */
.status { margin: 16px 0 0; }
.alert { padding: 12px 16px; border-radius: 10px; font-weight: 500; border: 1px solid transparent; margin: 12px 0; }
.alert.success { background: var(--success-bg); color: var(--success-text); border-color: #bfe6cf; }
.alert.error { background: var(--error-bg); color: var(--error-text); border-color: #f3c4c4; }
.alert.warn { background: var(--warn-bg); color: var(--warn-text); border-color: #f0dba5; }
.alert.info { background: var(--info-bg); color: var(--info-text); border-color: #c4d6f6; }
.alert[hidden] { display: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #bcd0f5; border-top-color: var(--accent); display: inline-block; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.progress { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* dropzone + file list */
.dropzone { display: block; position: relative; border: 2px dashed #9fb2d4; border-radius: var(--radius); background: linear-gradient(180deg, #fbfcff, #f1f5ff); padding: 34px 18px 30px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.dropzone::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: #e3ebff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='M5 15v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E") center / 30px no-repeat; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone strong { display: block; font-size: 1.12rem; margin-bottom: 4px; }
.dropzone span { color: var(--muted); font-size: .93rem; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.file-item .fname { flex: 1 1 200px; min-width: 0; font-weight: 600; word-break: break-all; }
.file-item .fmeta { color: var(--muted); font-size: .9rem; }
.file-item .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.file-item.is-error { border-color: #f3c4c4; background: #fff8f8; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.tag.good { background: var(--success-bg); color: var(--success-text); }
.tag.bad { background: var(--warn-bg); color: var(--warn-text); }

.result-box { border: 1px solid #bfe6cf; border-left: 5px solid #16a34a; background: #f4fbf7; border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 16px; }
.result-box h3 { font-size: 1.05rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 14px 0; }
.thumb { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; text-align: center; font-size: .88rem; }
.thumb img { display: block; width: 100%; height: 150px; object-fit: contain; background: #eef1f6; border-radius: 6px; margin-bottom: 6px; }
.preview-img { max-height: 320px; display: block; margin: 8px auto; border: 1px solid var(--border); border-radius: 8px; background: repeating-conic-gradient(#e9edf3 0 25%, #fff 0 50%) 50% / 16px 16px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
table.data th { background: #f1f5fb; }

/* result lines for calculators */
.calc-block { border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; background: #fcfdff; }
.calc-block h3 { font-size: 1.05rem; margin-bottom: 12px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.calc-row .field { flex: 1 1 130px; margin-bottom: 0; }
.calc-result { margin-top: 14px; padding: 12px 16px; background: var(--accent-soft); border-radius: 10px; font-size: 1.15rem; font-weight: 700; color: var(--accent-dark); min-height: 3em; }
.calc-result.muted { color: var(--muted); font-weight: 500; font-size: 1rem; }
.big-output { font-size: 1.5rem; font-weight: 700; word-break: break-all; padding: 14px 16px; background: #f1f5fb; border: 2px solid var(--border); border-radius: 10px; color: #111; }

.qr-preview { text-align: center; margin: 12px 0; }
.qr-preview canvas { border: 1px solid var(--border); border-radius: 8px; background: #fff; image-rendering: pixelated; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* article content */
.content { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; margin: 0 0 32px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.content h2 { font-size: 1.3rem; margin-top: 1.4em; }
.content h2:first-child { margin-top: 0; }
.content li { margin-bottom: .45em; }
.content details { border-top: 1px solid var(--border); padding: 12px 0; }
.content details:last-child { border-bottom: 1px solid var(--border); }
.content summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.content summary:hover, .content details[open] > summary { color: var(--accent-dark); }
.content summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.related { margin: 0 0 40px; }
.related h2 { font-size: 1.4rem; margin-bottom: 16px; }

/* reserved advertising space: hidden until you add an ad (see README) */
.ad-slot { display: none; }
.ad-slot.is-active { display: block; min-height: 100px; margin: 20px 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 0; padding: 44px 0 26px; color: #94a3b8; font-size: .95rem; margin-top: 56px; }
.site-footer .footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-grid > div { min-width: 150px; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; border-radius: 4px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 30px; padding-top: 18px; text-align: center; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #16202f; color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .how-steps, .home-notes { grid-template-columns: 1fr; }
  .how-steps li { align-items: center; }
}
@media (max-width: 760px) {
  html { font-size: 16px; }
  .menu-btn { display: block; }
  .nav { min-height: 62px; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; background: var(--card); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgba(15, 23, 42, .1); padding: 8px 12px 14px; }
  .nav-list.open { display: flex; }
  .nav-list a { display: block; padding: 13px 14px; border-radius: 10px; }
  .site-header .container { position: relative; }
  .hero { padding: 42px 0 38px; }
  .hero p { font-size: 1.05rem; margin-bottom: 24px; }
  .search-box input { padding: 15px 16px 15px 50px; font-size: 1.05rem; }
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 18px -20px 0; padding: 2px 20px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: none; }
  .trust { gap: 6px 18px; font-size: .9rem; margin-top: 22px; }
  .cat-section { margin-top: 40px; }
  .cat-head h2 { font-size: 1.35rem; }
  .tool-card, .content { padding: 20px 18px; }
  .page-head h1 { font-size: 1.85rem; }
  textarea { min-height: 240px; font-size: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .btn-group .btn { flex: 1 1 auto; }
  .stat .num { font-size: 1.7rem; }
  .how { margin-top: 48px; }
  .site-footer { padding-top: 34px; }
}
@media (max-width: 560px) {
  .tool-grid { grid-template-columns: 1fr; gap: 12px; }
  .tool-link { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px 16px; }
  .tool-link .tool-open { display: none; }
  .tool-icon { width: 48px; height: 48px; font-size: 1.5rem; border-radius: 13px; }
  .tool-link:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-link, .btn, .filter-btn, .dropzone { transition: none; }
  .tool-link:hover, .btn:active { transform: none; }
  html { scroll-behavior: auto; }
}

/* JSON error context */
.code-context { margin: 10px 0 0; padding: 12px 14px; background: #fff8f8; border: 1px solid #f3c4c4; border-radius: 10px; color: #111; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .92rem; overflow-x: auto; white-space: pre; }
.code-context[hidden] { display: none; }
