 /* ============================================================
   ToolNest — Online Tools Website
   Original SaaS design · HTML5 + CSS3 only (no frameworks)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --brand: #5657d9;
  --brand-dark: #4546c2;
  --brand-soft: #eef0fe;
  --violet: #8b5cf6;

  --cat-pdf: #e25c4f;
  --cat-pdf-soft: #fdeeec;
  --cat-image: #6366f1;
  --cat-image-soft: #eef0ff;
  --cat-text: #0891b2;
  --cat-text-soft: #e6f7fb;

  --ok: #16a34a;
  --ok-soft: #e9f9ef;
  --err: #dc2626;
  --err-soft: #fdecec;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --info: #2563eb;
  --info-soft: #eaf1fe;

  --ink: #12162b;
  --muted: #5d6478;
  --faint: #8a90a6;
  --line: #e7eaf3;
  --bg: #f6f7fc;
  --surface: #ffffff;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 22, 43, 0.06);
  --shadow: 0 8px 24px -12px rgba(18, 22, 43, 0.18);
  --shadow-lg: 0 20px 44px -18px rgba(18, 22, 43, 0.28);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Code", Menlo, Monaco, monospace;
}

/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none !important; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

::selection { background: rgba(86, 87, 217, 0.22); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(86, 87, 217, 0.55); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--brand); background: var(--brand-soft); }
.btn-danger { background: var(--err-soft); color: var(--err); }
.btn-danger:hover { background: #fbdddd; }
.btn-sm { padding: 7px 13px; font-size: 0.84rem; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: all 0.15s ease; flex: none;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn.danger:hover { background: var(--err-soft); color: var(--err); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -3px rgba(86, 87, 217, 0.6);
}
.logo-mark svg { width: 17px; height: 17px; color: #fff; }
.main-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-link {
  padding: 8px 14px; border-radius: 9px; color: var(--muted);
  font-weight: 600; font-size: 0.93rem; transition: all 0.15s ease;
}
.nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.header-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; }
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 78px 0 58px; text-align: center; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(700px 340px at 15% -10%, rgba(139, 92, 246, 0.14), transparent 60%),
  radial-gradient(700px 340px at 85% -10%, rgba(86, 87, 217, 0.16), transparent 60%),
  linear-gradient(180deg, #fdfdff 0%, var(--bg) 100%);
}.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 2.18rem !important;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 15px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4);} 50% { box-shadow: 0 0 0 5px rgba(22,163,74,0);} }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -0.03em; max-width: 720px; margin-inline: auto; }
.hero h1 .grad {
  background: linear-gradient(92deg, var(--brand) 10%, var(--violet) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 16px auto 30px; }

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 7px 7px 20px;
  max-width: 560px; margin-inline: auto;
  box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease;
}
.search-bar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(86,87,217,.14), var(--shadow); }
.search-bar svg { width: 19px; height: 19px; color: var(--faint); flex: none; }
.search-bar input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; background: transparent; min-width: 0; }
.search-bar .btn { border-radius: 999px; padding: 10px 22px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 15px; border-radius: 999px; font-size: 0.83rem; font-weight: 600;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin-top: 34px; color: var(--faint); font-size: 0.86rem; font-weight: 600; }
.hero-stats b { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 38px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; margin-top: 12px; }
.section-head p { color: var(--muted); margin-top: 10px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
}
.eyebrow svg { width: 14px; height: 14px; }
.eyebrow-pdf   { background: var(--cat-pdf-soft);   color: var(--cat-pdf); }
.eyebrow-image { background: var(--cat-image-soft); color: var(--cat-image); }
.eyebrow-text  { background: var(--cat-text-soft);  color: var(--cat-text); }

/* ---------- Tool cards ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 18px; }
.tool-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: rise .4s ease both;
  text-decoration: none !important;
}
.tool-card * {
  text-decoration: none !important;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d8dbf5; }
.tc-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tc-icon svg { width: 23px; height: 23px; }
.cat-pdf .tc-icon   { background: var(--cat-pdf-soft);   color: var(--cat-pdf); }
.cat-image .tc-icon { background: var(--cat-image-soft); color: var(--cat-image); }
.cat-text .tc-icon  { background: var(--cat-text-soft);  color: var(--cat-text); }
.tc-body h3 { font-size: 1.02rem; letter-spacing: -0.01em; }
.tc-body p { color: var(--muted); font-size: 0.875rem; margin-top: 4px; }
.tc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 700; color: var(--faint); }
.tc-foot .open { color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }
.tc-foot .open svg { width: 14px; height: 14px; transition: transform .15s ease; }
.tool-card:hover .open svg { transform: translateX(3px); }
.no-results { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* ---------- How it works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 22px; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; box-shadow: 0 6px 14px -6px rgba(86,87,217,.6);
}
.step-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Privacy banner ---------- */
.privacy-strip {
  background: linear-gradient(120deg, #171b33, #232a52);
  border-radius: var(--radius-lg); color: #dfe3f5;
  padding: 34px 30px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
.privacy-strip .shield { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; flex: none; }
.privacy-strip .shield svg { width: 26px; height: 26px; color: #9db4ff; }
.privacy-strip h3 { color: #fff; font-size: 1.15rem; }
.privacy-strip p { color: #aab1cf; font-size: 0.93rem; margin-top: 4px; max-width: 640px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: none; border: 0; text-align: left;
  padding: 17px 20px; font-weight: 650; font-size: 0.98rem; color: var(--ink);
}
.faq-q .chev { flex: none; width: 18px; height: 18px; color: var(--faint); transition: transform .2s ease; }
.faq-item.open .chev { transform: rotate(180deg); color: var(--brand); }
.faq-a { display: none; padding: 0 20px 18px; color: var(--muted); font-size: 0.93rem; }

/* ---------- Footer ---------- */
.site-footer { background: #12162b; color: #a7adc7; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding: 54px 0 40px; }
.site-footer .logo { color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: #a7adc7; font-size: 0.92rem; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-note { font-size: 0.88rem; color: #8b91ad; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 20px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.84rem; color: #7d839f; }

/* ---------- Tool page ---------- */
.crumb { display: inline-flex; align-items: center; gap: 7px; color: var(--faint); font-size: 0.86rem; font-weight: 600; margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.tool-hero { padding: 42px 0 26px; }
.tool-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.02em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tool-hero .tool-desc { color: var(--muted); margin-top: 8px; max-width: 640px; }
.tool-hero .tc-icon { width: 52px; height: 52px; border-radius: 15px; }
.tool-hero .tc-icon svg { width: 26px; height: 26px; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-bottom: 70px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
}
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; }
.side-card h3 { font-size: 0.98rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.side-card h3 svg { width: 17px; height: 17px; color: var(--brand); }
.side-card ol { padding-left: 20px; display: grid; gap: 9px; color: var(--muted); font-size: 0.9rem; }
.side-card ol li::marker { color: var(--brand); font-weight: 700; }
.sticky-side { position: sticky; top: 86px; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #ccd3ec; border-radius: var(--radius-lg);
  background: #fafbff; padding: 44px 24px; text-align: center;
  cursor: pointer; transition: all .18s ease; outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #f5f6ff; }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.005); box-shadow: inset 0 0 0 4px rgba(86,87,217,.08); }
.dropzone.has-files { padding: 26px 20px; }
.dz-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.dz-icon svg { width: 27px; height: 27px; }
.dz-title { font-weight: 700; font-size: 1.04rem; }
.dz-title u { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dz-hint { color: var(--faint); font-size: 0.84rem; margin-top: 5px; }

.file-list { margin-top: 16px; display: grid; gap: 9px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px;
  animation: rise .25s ease both;
}
.fi-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #f1f2fa; flex: none; }
.fi-thumb.doc { display: flex; align-items: center; justify-content: center; color: var(--cat-pdf); background: var(--cat-pdf-soft); }
.fi-thumb.doc svg { width: 20px; height: 20px; }
.fi-info { min-width: 0; flex: 1; }
.fi-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-size { color: var(--faint); font-size: 0.78rem; }
.fi-actions { display: flex; gap: 2px; }

/* ---------- Progress ---------- */
.progress { height: 9px; background: #eceffb; border-radius: 999px; overflow: hidden; margin: 18px 0 6px; }
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--violet));
  border-radius: 999px; transition: width .2s ease;
}
.progress.indeterminate .progress-bar { width: 36% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -36%; } 100% { margin-left: 100%; } }
.progress-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 13px 15px;
  font-size: 0.91rem; margin: 14px 0; border: 1px solid transparent;
  animation: rise .25s ease both;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert div { min-width: 0; word-break: break-word; }
.alert-error   { background: var(--err-soft);  color: var(--err);  border-color: #f6caca; }
.alert-success { background: var(--ok-soft);   color: var(--ok);   border-color: #bfe8cd; }
.alert-info    { background: var(--info-soft); color: var(--info); border-color: #c4d8fb; }
.alert-warn    { background: var(--warn-soft); color: var(--warn); border-color: #f3ddb8; }

/* ---------- Forms ---------- */
.field { margin-top: 20px; }
.opt-label { display: block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); margin-bottom: 9px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: var(--surface); outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(86,87,217,.15); }
.textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.textarea.code, .input.code { font-family: var(--mono); font-size: 0.88rem; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235d6478' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }
.input-sm { width: auto; padding: 8px 11px; font-size: 0.9rem; }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  transition: all .15s ease; cursor: pointer; user-select: none;
}
.pill span:hover { border-color: var(--brand); color: var(--brand); }
.pill input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(86,87,217,.2); }

.check { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; font-weight: 550; color: var(--ink); cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); height: 5px; cursor: pointer; }
.range-val { font-family: var(--mono); font-size: 0.86rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 7px; padding: 4px 10px; min-width: 56px; text-align: center; }

.inline-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.inline-controls .grow { flex: 1; min-width: 130px; }
.hint { font-size: 0.8rem; color: var(--faint); margin-top: 7px; }

.actions-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 24px; }

/* ---------- Stat tiles (counters) ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-top: 20px; }
.tile { background: #fafbff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; }
.tile-num { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.tile-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin-top: 3px; }

/* ---------- Results ---------- */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.results-head h3 { font-size: 1.05rem; }
.results-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.results-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); padding: 9px 10px; border-bottom: 1px solid var(--line); }
.results-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results-table tr:last-child td { border-bottom: 0; }
.results-table .num { font-variant-numeric: tabular-nums; }
.saved { color: var(--ok); font-weight: 700; }
.saved.neg { color: var(--err); }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.result-card { background: #fafbff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 9px; animation: rise .3s ease both; }
.rc-thumb { height: 110px; border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#eef0f6 0% 25%, #ffffff 0% 50%) 0 / 18px 18px; }
.rc-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rc-name { font-size: 0.78rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* ---------- Output boxes ---------- */
.output-wrap { position: relative; margin-top: 14px; }
.copy-btn { position: absolute; top: 9px; right: 9px; z-index: 2; }
.char-note { position: absolute; bottom: 9px; right: 12px; font-size: 0.72rem; color: var(--faint); background: var(--surface); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- Password generator ---------- */
.pw-box {
  display: flex; align-items: center; gap: 10px;
  background: #171b33; color: #7ef0b2; border-radius: var(--radius);
  padding: 18px 18px; font-family: var(--mono); font-size: clamp(1rem, 2.6vw, 1.3rem);
  word-break: break-all; min-height: 64px; margin-top: 20px;
}
.pw-box .pw-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.pw-box .icon-btn { color: #9aa1c4; }
.pw-box .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.strength { margin-top: 14px; }
.strength-meta { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; margin-bottom: 6px; }
.strength-track { height: 7px; background: #eceffb; border-radius: 999px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; border-radius: 999px; background: var(--err); transition: width .25s ease, background .25s ease; }

/* ---------- Cropper ---------- */
.crop-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; touch-action: none; user-select: none; }
.crop-stage img { max-height: 420px; width: auto; max-width: 100%; border-radius: 10px; }
.crop-sel {
  position: absolute; border: 2px solid var(--brand);
  box-shadow: 0 0 0 9999px rgba(13, 16, 38, 0.5);
  cursor: move; border-radius: 2px;
}
.crop-sel .handle { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--brand); border-radius: 3px; }
.crop-sel .h-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-sel .h-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-sel .h-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-sel .h-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.crop-dims { position: absolute; top: 8px; left: 8px; background: rgba(13,16,38,.75); color: #fff; font-size: 0.72rem; font-family: var(--mono); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.crop-scroll { overflow: auto; text-align: center; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: repeating-conic-gradient(#f0f1f7 0% 25%, #fafbff 0% 50%) 0 / 20px 20px; }

/* ---------- Misc tool UI ---------- */
.notice-unavailable {
  border: 1px dashed #f0b4ae; background: var(--err-soft); color: var(--err);
  border-radius: var(--radius); padding: 18px; font-size: 0.92rem; margin-top: 16px;
}
.empty-state { text-align: center; color: var(--faint); padding: 34px 10px; font-size: 0.92rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.kbd { font-family: var(--mono); font-size: 0.78rem; background: #f1f2fa; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; }
.spinner { width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .tool-layout { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu {
    display: block; position: fixed; inset: 66px 0 auto 0; z-index: 59;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 10px 4%;
    transform: translateY(-130%); transition: transform .25s ease;
  }
  .mobile-menu.open { transform: none; }
  .mobile-menu a { display: block; padding: 13px 10px; font-weight: 650; color: var(--ink); border-radius: 10px; }
  .mobile-menu a:hover { background: var(--brand-soft); color: var(--brand); }
  .hero { padding: 54px 0 44px; }
  .section { padding: 48px 0; }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tool-card { padding: 16px; }
  .tc-body p { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .panel { padding: 18px; }
  .search-bar .btn span { display: none; }
  .search-bar .btn { padding: 10px 14px; }
}
@media (max-width: 400px) {
  .tools-grid { grid-template-columns: 1fr; }
}