/* ==========================================================================
   Toolbox — soft product UI
   Direction: light grey page, a floating white app shell with generous corner
   radii, oversized tight-tracked headline, dark pill controls, soft shadows.
   ========================================================================== */

:root {
  --page:      #d8dadc;   /* the grey the shell floats on */
  --shell:     #f2f2f0;   /* the shell itself */
  --surface:   #ffffff;
  --sunken:    #e8e8e6;
  --border:    #e2e2e0;
  --ink:       #14161a;
  --muted:     #6a7079;
  --faint:     #9aa0a8;
  --accent:    #ff4d3d;
  --accent-dk: #e03e2f;
  --dark:      #14161a;

  --sans: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r-shell: 30px;
  --r-card:  22px;
  --r-pill:  999px;
  --shadow:  0 1px 2px rgba(20,22,26,.04), 0 12px 34px rgba(20,22,26,.07);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 22px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -.038em; line-height: 1.05; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); }
h2 { font-size: 1.45rem; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; letter-spacing: -.02em; }
p { margin: 0 0 1.1em; }

/* The floating shell wraps header + main + footer */
.shell {
  max-width: 1240px; margin: 0 auto;
  background: var(--shell);
  border-radius: var(--r-shell);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 34px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--dark); color: #fff; padding: 11px 18px; border-radius: var(--r-pill); z-index: 99; }

/* Header ---------------------------------------------------------------- */
.site-header { background: transparent; }
.header-inner {
  display: flex; align-items: center; gap: 14px;
  height: 84px; max-width: 1140px; margin: 0 auto; padding: 0 34px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.04em; color: var(--ink);
}
.logo::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent);
  box-shadow: inset -6px -6px 0 rgba(0,0,0,.12);
}
.logo b { font-weight: 700; }

.nav { display: flex; gap: 4px; margin-left: 26px; }
.nav a {
  font-size: .88rem; font-weight: 500; color: var(--muted);
  padding: 9px 15px; border-radius: var(--r-pill);
}
.nav a:hover { color: var(--ink); background: rgba(0,0,0,.045); text-decoration: none; }
.nav a.is-active { color: #fff; background: var(--dark); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(20,22,26,.06);
}
.pill-btn:hover { text-decoration: none; background: #fff; }
.pill-btn.dark { background: var(--dark); color: #fff; }
.pill-btn.dark:hover { background: #24272d; }
.circle-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--dark); color: #fff; font-size: .95rem;
}
.circle-btn.light { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,22,26,.06); }

/* Hero ------------------------------------------------------------------ */
.hero { padding: 30px 0 10px; position: relative; }
.hero h1 { max-width: 15ch; }
.hero h1 .chip {
  display: inline-grid; place-items: center;
  width: .82em; height: .82em; border-radius: 50%;
  background: var(--dark); color: #fff; font-size: .5em;
  vertical-align: middle; margin: 0 .06em;
}
.hero p { color: var(--muted); max-width: 54ch; font-size: 1.02rem; }

/* Big soft panel that product/tool content sits on */
.stage {
  position: relative;
  background: var(--sunken);
  border-radius: var(--r-card);
  padding: 34px;
  margin: 26px 0 0;
}

.reviews { display: flex; align-items: center; gap: 11px; }
.avatars { display: flex; }
.avatars i {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--shell); margin-left: -10px;
  background: linear-gradient(135deg, #c9ced6, #9aa3ae);
  display: block;
}
.avatars i:first-child { margin-left: 0; }
.reviews small { font-size: .78rem; color: var(--muted); line-height: 1.35; display: block; }

/* Tool grid ------------------------------------------------------------- */
.section-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--faint); font-weight: 700; margin: 44px 0 16px;
}

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.tool-card {
  display: block; padding: 26px;
  background: var(--surface); border: 0; border-radius: var(--r-card);
  color: var(--ink); box-shadow: 0 1px 2px rgba(20,22,26,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.tool-card .ico {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--sunken); font-size: 1.35rem; margin-bottom: 16px;
}
.tool-card h3 { margin: 0 0 6px; }
.tool-card p { margin: 0; font-size: .89rem; color: var(--muted); }

/* Tool page ------------------------------------------------------------- */
.tool-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 26px; align-items: start; padding: 20px 0 46px; }

.panel {
  background: var(--surface);
  border: 0; border-radius: var(--r-card);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(20,22,26,.05);
}
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 1.15rem; }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--faint); font-weight: 700; margin-bottom: 8px;
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 14px 16px;
  background: var(--sunken); color: var(--ink);
  border: 1px solid transparent; border-radius: 14px;
  font-family: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--dark); background: var(--surface); }
textarea { min-height: 200px; resize: vertical; line-height: 1.65; }

.row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.swap {
  background: var(--dark); border: 0; color: #fff;
  border-radius: 50%; width: 44px; height: 44px; cursor: pointer; font-size: 1rem;
}
.swap:hover { background: #24272d; }

.btn {
  display: inline-block; padding: 14px 26px; border: 0; border-radius: var(--r-pill);
  background: var(--dark); color: #fff; font-family: inherit;
  font-weight: 600; font-size: .92rem; cursor: pointer;
}
.btn:hover { background: #24272d; text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,22,26,.06); }
.btn-ghost:hover { background: #fff; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dk); }

.result {
  font-size: 2rem; font-weight: 700; letter-spacing: -.035em; color: var(--ink);
  background: var(--sunken); border-radius: 16px;
  padding: 22px; margin-top: 4px; overflow-wrap: anywhere;
}
.result small { display: block; font-size: .8rem; color: var(--faint); font-weight: 500; margin-top: 8px; letter-spacing: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px,1fr)); gap: 12px; }
.stat { background: var(--sunken); border-radius: 16px; padding: 18px 14px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.035em; }
.stat span { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 600; }

.checks { display: grid; gap: 11px; }
.check { display: flex; align-items: center; gap: 11px; font-size: .94rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--dark); cursor: pointer; }

input[type="range"] { width: 100%; accent-color: var(--dark); }

.strength { height: 8px; border-radius: var(--r-pill); background: var(--sunken); overflow: hidden; margin-top: 12px; }
.strength i { display: block; height: 100%; width: 0; background: var(--dark); transition: width .2s, background .2s; }

.note { font-size: .84rem; color: var(--faint); margin: 14px 0 0; }

/* Prose ----------------------------------------------------------------- */
.prose { max-width: 68ch; padding-bottom: 44px; }
.prose h2 { margin-top: 1.7em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose code { font-family: var(--mono); font-size: .87em; background: var(--sunken); padding: 3px 7px; border-radius: 6px; }
.callout {
  background: var(--surface); border: 0; border-left: 3px solid var(--accent);
  border-radius: 16px; padding: 20px 22px; margin: 1.5em 0;
  box-shadow: 0 1px 2px rgba(20,22,26,.05);
}
.callout strong { display: block; margin-bottom: 5px; color: var(--ink); }
.callout p { margin: 0; font-size: .92rem; }

/* Ad slots -------------------------------------------------------------- */
.ad-slot { display: flex; flex-direction: column; align-items: center; margin: 0 auto; overflow: hidden; }
.ad-slot iframe { border: 0; display: block; }
.ad-slot::before {
  content: attr(data-ad-label); display: block; margin-bottom: 8px;
  font-size: .62rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.ad-leaderboard { min-height: 106px; padding: 22px 0; }
.ad-rectangle   { min-height: 266px; }
.ad-native      { min-height: 200px; margin: 30px 0; }

.ad-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; gap: 4px; padding: 16px; text-align: center;
  border: 0; border-radius: var(--r-card);
  background: var(--sunken);
  color: var(--faint); font-family: var(--mono); font-size: .72rem;
}
.ad-placeholder b { color: var(--muted); font-size: .8rem; }

/* Footer ---------------------------------------------------------------- */
.site-footer { background: transparent; border: 0; padding: 10px 0 30px; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 22px 34px 0;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: .84rem; color: var(--faint);
}
.footer-inner a { color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.ad-disclosure { text-align: center; font-size: .82rem; color: var(--faint); padding: 0 34px 14px; }

/* Responsive ------------------------------------------------------------ */

/* The header runs out of room well before the old 680px breakpoint: six nav
   links plus three actions need ~980px. Below that the row must wrap, because
   `.shell` clips overflow for its rounded corners — so anything that does not
   fit disappears silently instead of producing a scrollbar. */
@media (max-width: 1000px) {
  .header-inner { height: auto; flex-wrap: wrap; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
  .nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .header-actions { margin-left: auto; }
  /* Secondary action; the nav already reaches every tool. */
  .header-actions .pill-btn:not(.dark) { display: none; }
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}

@media (max-width: 680px) {
  body { padding: 10px; }
  :root { --r-shell: 22px; }
  .wrap, .header-inner, .footer-inner { padding-left: 20px; padding-right: 20px; }
  .row { grid-template-columns: 1fr; }
  .swap { width: 100%; border-radius: 14px; }
  .stage { padding: 20px; }
  .ad-leaderboard { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Icons ------------------------------------------------------------------
   Rounded stroke icons sitting in the soft tinted tile. */
.icon { display: block; width: 100%; height: 100%; }
.tool-card .ico .icon { width: 22px; height: 22px; color: var(--ink); }
.circle-btn .icon { width: 17px; height: 17px; }
.swap .icon { width: 18px; height: 18px; }

/* Sister-site strip ------------------------------------------------------- */
.network { max-width: 1140px; margin: 0 auto; padding: 22px 34px 4px; }
.network-label {
  display: block; margin-bottom: 14px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--faint);
}
.network-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.network-links a {
  background: var(--surface); border-radius: 14px; padding: 14px 16px;
  font-size: .87rem; font-weight: 600; color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,22,26,.05);
}
.network-links a span { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.network-links a:hover { text-decoration: none; background: #fff; }
@media (max-width: 760px) { .network-links { grid-template-columns: 1fr 1fr; } }
