/* Toolora — shared styles · Design A "Minimal White" */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --brand: #2563eb;         /* links, focus */
  --brand-2: #0f172a;       /* selected states (ink) */
  --brand-soft: #eff4ff;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --grad: #0f172a;
  /* category colours */
  --c-image: #0ea5e9;
  --c-pdf: #ef4444;
  --c-text: #8b5cf6;
  --c-calc: #10b981;
  --c-utility: #f59e0b;
  --accent: var(--brand);   /* per-page accent, set by data-cat */
  --font: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --surface: #111827;
    --surface-2: #1a2232;
    --text: #e5e9f2;
    --muted: #94a3b8;
    --line: #243045;
    --line-strong: #334155;
    --brand: #60a5fa;
    --brand-2: #e5e9f2;
    --brand-soft: #172036;
    --ok: #34d399;
    --ok-soft: #0f2a22;
    --warn: #fbbf24;
    --warn-soft: #2d2410;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --grad: #e5e9f2;
  }
}
body[data-cat="image"] { --accent: var(--c-image); }
body[data-cat="pdf"] { --accent: var(--c-pdf); }
body[data-cat="text"] { --accent: var(--c-text); }
body[data-cat="calc"] { --accent: var(--c-calc); }
body[data-cat="utility"] { --accent: var(--c-utility); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.03em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); display: inline-block; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 500; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
@media (max-width: 700px) { .nav { display: none; } }

/* Footer */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 22px; grid-template-columns: 2fr 1fr 1fr 1fr; font-size: 14px; color: var(--muted); }
.site-footer h4 { margin: 0 0 8px; color: var(--text); font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }

/* Buttons / inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 20px; font: 600 15px/1.2 var(--font); cursor: pointer;
  background: var(--accent); color: #fff; transition: transform .08s, opacity .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; opacity: .92; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { border-color: var(--line-strong); box-shadow: none; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { min-height: 200px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; vertical-align: -3px; }

/* Layout pieces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); font: 600 14px/1.2 var(--font); cursor: pointer; color: var(--text);
}
.chip:hover { border-color: var(--line-strong); }
.chip.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.note { border-radius: 10px; padding: 10px 14px; font-size: 14px; background: var(--surface-2); color: var(--text); }
.note.ok { background: var(--ok-soft); }
.note.warn { background: var(--warn-soft); }

/* Tool page */
.tool-hero { padding: 40px 0 22px; text-align: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.tool-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -.035em; line-height: 1.15; font-weight: 800; }
.tool-hero p { margin: 0 auto; color: var(--muted); max-width: 640px; font-size: 17px; }
.tool-hero .hi { display: block; margin-top: 4px; font-size: 15px; }
.privacy-pill { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ok); background: var(--ok-soft); padding: 4px 11px; border-radius: 999px; font-weight: 600; }

.drop {
  border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2);
  padding: 40px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.drop .big { font-size: 40px; line-height: 1; }
.drop strong { display: block; font-size: 18px; margin: 10px 0 4px; }
.drop input { display: none; }

.file-list { display: grid; gap: 10px; margin-top: 16px; }
.file-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.file-item .thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; }
.file-item .name { font-weight: 600; word-break: break-all; font-size: 14px; }
.file-item .meta { font-size: 13px; color: var(--muted); }
.file-item .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .file-item { grid-template-columns: 52px 1fr; } .file-item .thumb { width: 52px; height: 52px; } .file-item .actions { grid-column: 1 / -1; justify-content: stretch; } .file-item .actions .btn { flex: 1; } }
.saved { color: var(--ok); font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

.result-big { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.content { margin: 48px auto 0; max-width: 760px; }
.content h2 { font-size: 22px; margin: 28px 0 10px; letter-spacing: -.02em; }
.content ol, .content ul { padding-left: 20px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* Tool cards (home + related) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  --cc: var(--brand);
}
.tool-card[data-cat="image"] { --cc: var(--c-image); }
.tool-card[data-cat="pdf"] { --cc: var(--c-pdf); }
.tool-card[data-cat="text"] { --cc: var(--c-text); }
.tool-card[data-cat="calc"] { --cc: var(--c-calc); }
.tool-card[data-cat="utility"] { --cc: var(--c-utility); }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.tool-card .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; margin-bottom: 14px; background: color-mix(in srgb, var(--cc) 12%, var(--surface)); }
.tool-card h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.01em; }
.tool-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
@media (max-width: 560px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 14px; }
  .tool-card .ic { margin-bottom: 10px; }
  .tool-card h3 { font-size: 15px; }
  .tool-card p { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 44px 0 16px; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.section-title span { color: var(--muted); font-size: 14px; }

/* Home hero */
.hero { padding: 64px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5.5vw, 52px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.04em; font-weight: 800; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 580px; }
.search { max-width: 540px; margin: 0 auto; display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.search input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 14px 16px; font-size: 16px; background: transparent; }
.search .s-btn { border: 0; background: var(--text); color: var(--bg); padding: 0 20px; font: 600 15px var(--font); cursor: pointer; }
.cat-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 36px 0 24px; scroll-margin-top: 80px; }
.cat-tabs button { padding: 7px 15px; border-radius: 999px; font: 600 14px var(--font); color: var(--muted); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cat-tabs button:hover { color: var(--text); border-color: var(--line-strong); }
.cat-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.badges { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--muted); }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 64px; }
@media (max-width: 720px) { .why { grid-template-columns: 1fr; } }
.why .card { background: var(--surface-2); border: 0; }
.why h3 { margin: 10px 0 4px; font-size: 17px; }

canvas.preview, img.preview { max-width: 100%; border-radius: 10px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; display: block; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* PDF page grid */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.page-tile { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; cursor: pointer; user-select: none; transition: border-color .12s, opacity .12s; }
.page-tile:hover { border-color: var(--accent); }
.page-tile .pv { height: 170px; display: grid; place-items: center; }
.page-tile canvas { max-width: 100%; max-height: 170px; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .2s; }
.page-tile .pn { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--muted); }
.page-tile.marked { border-color: #dc2626; opacity: .55; }
.page-tile.marked::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; color: #dc2626; font-weight: 800; }
.page-tile .tile-btn { position: absolute; top: 6px; right: 6px; }

/* Site information, guides and long-form content */
.legal-links { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 18px; padding:16px; border-top:1px solid var(--line); background:var(--surface-2); font-size:14px; }
.legal-links a { color:var(--muted); }
.legal-links a:hover { color:var(--brand); }
.prose { max-width:820px; margin-left:auto; margin-right:auto; overflow-wrap:anywhere; }
.prose h2 { margin-top:30px; }
.prose li { margin:6px 0; }
.home-info { margin-top:48px; }
.guide-link { padding:12px 14px; background:var(--brand-soft); border-radius:10px; }
.guide-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin-top:14px; }
.guide-card { display:block; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); }
.guide-card:hover { border-color:var(--brand); }
.guide-card span { color:var(--brand); font-size:12px; font-weight:700; text-transform:uppercase; }
.guide-card h2, .guide-card h3 { margin:6px 0; font-size:17px; line-height:1.3; }
.guide-card p { margin:0; color:var(--muted); font-size:14px; }
.contact-box { display:flex; flex-direction:column; gap:4px; padding:20px; text-align:center; background:var(--brand-soft); border-radius:14px; font-size:15px; }
.contact-box a { font-size:20px; font-weight:700; }

.table-scroll { overflow-x:auto; margin:12px 0 18px; }
.info-table { width:100%; border-collapse:collapse; font-size:14px; }
.info-table th, .info-table td { padding:9px 10px; border:1px solid var(--line); text-align:left; }
.info-table th { background:var(--surface-2); font-weight:700; }
.also { font-size:14px; color:var(--muted); }
.nav-toggle { display:none; margin-left:auto; padding:8px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--text); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.site-footer .wrap { grid-template-columns:1.6fr 1fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .site-footer .wrap { grid-template-columns:1fr 1fr; } .site-footer .wrap > div:first-child { grid-column:1 / -1; } }
@media (max-width: 860px) {
  .site-header .wrap { position:relative; }
  .nav-toggle { display:block; }
  .nav { display:none; position:absolute; top:60px; left:0; right:0; margin:0; padding:8px 16px 14px; background:var(--bg); border-bottom:1px solid var(--line); box-shadow:0 10px 20px rgba(0,0,0,.08); flex-direction:column; gap:2px; }
  .nav.open { display:flex; }
  .nav a { padding:11px 10px; font-size:15px; }
}
/* Phone layout: shorter pages, one clear list, larger touch targets */
@media (max-width: 640px) {
  .site-header .wrap { height:56px; }
  .nav { top:56px; }
  .logo { font-size:19px; }
  .hero { padding:24px 0 12px; }
  .hero h1 { font-size:29px; margin-bottom:8px; }
  .hero p { font-size:15.5px; margin-bottom:16px; }
  .search input { padding:13px 14px; }
  .badges { gap:6px 12px; margin-top:12px; font-size:12.5px; }
  .cat-tabs { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; margin:18px -16px 14px; padding:2px 16px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .cat-tabs::-webkit-scrollbar { display:none; }
  .cat-tabs button { flex:none; min-height:40px; padding:7px 15px; }
  .tool-grid { grid-template-columns:1fr; gap:8px; }
  .tool-card { display:grid; grid-template-columns:42px minmax(0,1fr); column-gap:12px; align-items:center; padding:11px 12px; min-height:66px; }
  .tool-card .ic { grid-row:1 / span 2; width:42px; height:42px; margin:0; }
  .tool-card h3 { margin:0; font-size:15.5px; line-height:1.25; }
  .tool-card p { margin-top:2px; font-size:13px; line-height:1.35; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-line-clamp:unset; }
  .why { margin-top:32px; gap:8px; }
  .why .card { padding:14px; }
  .home-info { margin-top:30px; }
  .all-tools { display:none; }
  .home-info .guide-card:nth-child(n+4) { display:none; }
  .guide-grid { grid-template-columns:1fr; gap:8px; }
  .guide-card { padding:14px; }
  .guide-card h2, .guide-card h3 { font-size:16px; }
  .guide-card p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13.5px; }
  .tool-hero { padding:16px 0 12px; }
  .crumbs { margin-bottom:6px; font-size:12px; }
  .tool-hero h1 { font-size:26px; }
  .tool-hero p { font-size:15px; line-height:1.45; }
  .tool-hero .hi { font-size:14px; }
  .privacy-pill { margin-top:8px; font-size:12px; }
  .card { padding:14px; }
  .drop { padding:26px 14px; }
  .btn { min-height:44px; }
  .btn.small { min-height:40px; }
  .chip { min-height:40px; }
  .row .btn { flex:1 1 auto; }
  input[type=text], input[type=number], input[type=date], input[type=password], input[type=url], select, textarea { min-height:44px; font-size:16px; }
  input[type=range] { height:30px; }
  .content { margin-top:30px; }
  .content h2 { font-size:19px; margin:22px 0 8px; line-height:1.3; }
  .prose h2 { margin-top:24px; }
  .content p, .content li { font-size:15.5px; line-height:1.6; }
  .faq details { padding:0 14px; }
  .faq summary { padding:12px 0; line-height:1.35; }
  .faq p { margin:0 0 12px; }
  .info-table { font-size:13px; }
  .info-table th, .info-table td { padding:7px 6px; }
  .contact-box a { font-size:18px; }
  .site-footer { margin-top:36px; }
  .site-footer .wrap { grid-template-columns:1fr; gap:14px; padding-top:22px; padding-bottom:24px; }
  .site-footer .wrap > div:nth-child(2), .site-footer .wrap > div:nth-child(3), .site-footer .wrap > div:nth-child(4) { display:none; }
  .site-footer ul { grid-template-columns:1fr 1fr; gap:0 12px; }
  .site-footer li a { display:block; padding:9px 0; font-size:14.5px; }
}
@media (max-width: 350px) { .info-table { font-size:11.5px; } .info-table th, .info-table td { padding:6px 3px; } }
