/* ==========================================================================
   makerattic — shared design system
   One stylesheet for the whole site (home + heic-to-jpg + remove-bg).
   Warm cream light theme with a matching dark mode.
   ========================================================================== */

/* ---------- Font (self-hosted Inter, variable) ---------- */
@font-face {
  font-family: "Inter";
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1f1c17;
  --ink-soft: #6b655a;
  --ink-faint: #9a9384;
  --border: #e6e1d6;
  --accent: #e07b39;
  --accent-strong: #c96a2d;
  --accent-soft: #fbeadc;
  --success: #2f9e63;
  --danger: #d04545;
  --shadow: 0 1px 2px rgba(31, 28, 23, 0.04), 0 8px 24px rgba(31, 28, 23, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1e1b17;
    --surface-2: #26221c;
    --ink: #f0ece4;
    --ink-soft: #b4ac9d;
    --ink-faint: #7d766a;
    --border: #37322a;
    --accent: #ed8a48;
    --accent-strong: #f0985c;
    --accent-soft: #3a2a1c;
    --success: #4cc388;
    --danger: #e06b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }

.container {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand-name { font-size: 17px; }

.brand-tag { color: var(--ink-faint); font-size: 13px; }

.header-links { margin-left: auto; display: inline-flex; align-items: center; gap: 16px; }

.header-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.header-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { text-align: center; margin: 40px 0 48px; }

.hero.tight { margin: 24px 0 32px; }

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.hero .accent { color: var(--accent); }

.hero .arrow { color: var(--accent); font-weight: 400; }

.lede {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Tool cards (home) ---------- */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
  color: var(--ink);
}

.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.tool-card .icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tool-card h2 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.tool-card p { color: var(--ink-soft); margin: 0; font-size: 15px; flex: 1; }

.tool-card .cta { color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- Dropzone ---------- */
.dropzone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow);
}

.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }

.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}

.dropzone-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
}

.dropzone-title { font-size: 20px; font-weight: 700; margin: 8px 0 0; }

.dropzone-sub { color: var(--ink-soft); margin: 0; font-size: 15px; }

.dropzone-sub .link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone-hint { color: var(--ink-faint); font-size: 13px; margin: 12px 0 0; }

/* ---------- Status ---------- */
.status {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 14px;
  min-height: 1.4em;
}

.status.error { border-color: var(--danger); color: var(--danger); background: rgba(208, 69, 69, 0.06); }

.status.ok { color: var(--success); }

.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Compress controls ---------- */
.compress-controls {
  display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}

.compress-controls label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}

.compress-controls input[type="range"] { width: 180px; accent-color: var(--accent); }

.compress-controls select {
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}

.size-info { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--ink-soft); align-self: center; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn:active { transform: translateY(1px); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }

.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }

.btn-sm { padding: 7px 13px; font-size: 13px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.tab {
  flex: 1; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink-soft); font-weight: 600;
  cursor: pointer; font-size: 0.9rem; transition: all 0.15s ease; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

.tab:hover { border-color: var(--accent); color: var(--ink); }

.tab.active { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- Tool stage (remove-bg result) ---------- */
.tool {
  max-width: 760px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}

#stage { display: none; margin-top: 20px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }

.panel .label {
  padding: 10px 14px; font-size: 0.8rem; color: var(--ink-soft);
  border-bottom: 1px solid var(--border); background: var(--surface);
}

.panel img { width: 100%; display: block; }

.checker {
  background-image:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }

/* ---------- File list (heic results) ---------- */
.results { margin-top: 32px; }

.results-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}

.results-toolbar h2 { font-size: 18px; margin: 0; font-weight: 700; }

.results-actions { display: flex; gap: 10px; }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.file-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
}

.file-thumb {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover;
  background: var(--surface-2); flex-shrink: 0; border: 1px solid var(--border);
}

.file-meta { flex: 1; min-width: 0; }

.file-name {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.file-state { font-size: 12px; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }

.file-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); display: inline-block; }

.file-state.ready .dot { background: var(--success); }
.file-state.ready { color: var(--success); }
.file-state.error .dot { background: var(--danger); }
.file-state.error { color: var(--danger); }

.file-actions { display: flex; gap: 8px; flex-shrink: 0; }

.file-download {
  appearance: none;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
  border-radius: var(--radius-sm); padding: 7px 13px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

.file-download:hover:not(:disabled) { background: var(--border); }
.file-download:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Lead funnel (upsell) ---------- */
.results-upsell {
  margin-top: 24px; padding: 16px 18px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); font-size: 14px;
  color: var(--ink-soft); text-align: center;
}

.results-upsell p { margin: 0; }

.results-upsell a { color: var(--accent-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.site-footer p { margin: 0; }

.site-footer .site-footer-promo {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.site-footer-promo a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Auth modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}

.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  width: 100%; max-width: 380px; padding: 30px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.modal h2 { font-size: 1.3rem; margin: 0 0 6px; }

.modal .sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 0.9rem; text-align: left; }

.modal .close {
  position: absolute; top: 16px; right: 18px; background: transparent; border: none;
  color: var(--ink-faint); font-size: 1.5rem; cursor: pointer; padding: 0 4px; line-height: 1;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: 1rem; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.18); }

.modal .full { width: 100%; margin-top: 4px; padding: 12px; font-size: 0.98rem; justify-content: center; }

.modal .msg { font-size: 0.85rem; min-height: 1.2em; margin: 10px 0 0; }
.modal .msg.err { color: var(--danger); }
.modal .msg.ok { color: var(--success); }

.modal .switch { margin-top: 18px; font-size: 0.86rem; color: var(--ink-soft); text-align: center; }
.modal .switch button { background: transparent; border: none; color: var(--accent); cursor: pointer; font-size: 0.86rem; padding: 0; }
.modal .switch button:hover { text-decoration: underline; }
.modal button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 0.8rem;
  color: var(--accent-strong); background: var(--accent-soft); border: 1px solid var(--accent);
  margin-bottom: 20px;
}

/* ---------- FAQ (home) ---------- */
.faq { margin-top: 56px; }

.faq h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden;
}

.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px;
  padding: 16px 18px; list-style: none; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+"; color: var(--accent); font-weight: 700;
  font-size: 18px; line-height: 1; transition: transform 0.15s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  margin: 0; padding: 0 18px 16px;
  color: var(--ink-soft); font-size: 14px; line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .container { padding: 16px 16px 48px; }
  /* 10px, not the desktop 14px: the nav links below carry their own 12px of
     vertical padding to reach a 44pt thumb target, and that alone put 11pt
     back on top of the hero. This takes most of it back. */
  .site-header { padding: 10px 16px; flex-wrap: wrap; row-gap: 6px; }
  .dropzone-inner { padding: 40px 16px; }
  .results-toolbar { flex-direction: column; align-items: stretch; }
  .results-actions { justify-content: stretch; }
  .results-actions .btn { flex: 1; }
  .file-item { flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; }

  /* Header: four items need ~407px, but a 414pt phone has 382px and a 375pt
     one only 343px — and with `align-items: baseline` and no wrap it squeezed
     its text instead of reflowing. The tagline is decorative (the logo already
     says it), so drop it here and let the rest wrap on very narrow phones.
     `>` matters: the signed-in email is also a `.brand-tag`, but it is nested
     inside #userView and must survive. */
  .site-header > .brand-tag { display: none; }
  .header-links { gap: 12px; }

  /* The hero kept its desktop rhythm on phones — 40px above the headline, 48px
     below, with a 36px headline (clamp() bottoms out there until the viewport
     reaches 600px) on a 1.5 line-height, so two lines of Chinese took 108px.
     That put the first tool card at y≈525 of 736, past the halfway mark. */
  .hero { margin: 18px 0 28px; }
  .hero.tight { margin: 14px 0 22px; }
  .hero h1 { font-size: 28px; line-height: 1.25; margin-bottom: 10px; }
  .lede { font-size: 16px; }

  /* Thumb targets. Measured against Apple's 44pt guideline:
     - `.header-link` was a bare text run, so its box was just the line (21pt
       tall) — a 375pt-only problem, and it is navigation, not prose.
       `:not(.btn-sm)` matters below: without it this rule would also stretch
       the header's own small buttons and grow the header back.
     - `.btn-primary` landed at 41pt tall, 3pt short, on the one control every
       tool page is built around.
     Widths are left alone deliberately: padding them out cost enough room at
     375pt that the header started wrapping again. */
  .header-link { padding: 12px 8px; }
  .header-links { gap: 6px; }
  .btn:not(.btn-sm) { padding: 12px 18px; }
  /* The header's own small buttons were the reason for `:not(.btn-sm)` above,
     but the nav links are taller than they are, so growing them costs the
     header nothing now. */
  .btn-sm { padding: 13px 14px; }

  /* The logo (26pt) and the "<- All tools" crumb (17pt) are also aimed at. */
  .brand { padding: 10px 0; }
  .crumbs a { display: inline-block; padding: 13px 0; }
}


/* ==========================================================================
   makerattic — rules the generated pages add on top of the design system.
   Loaded as a continuation of styles.css; the tokens and components above are
   reused as-is, this only adds what the 55 generated tool pages need.
   ========================================================================== */

/* ---------- Breadcrumb ---------- */
.crumbs { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); }

/* ---------- Language switch ---------- */
.lang-switch { font-weight: 600; }

/* ---------- Upload slots ---------- */
.slots { display: flex; flex-direction: column; gap: 16px; }

.slot-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}

.slot-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.slot-file {
  font-size: 12px; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 60%;
}

.slot-thumb {
  display: none; max-height: 132px; max-width: 100%;
  border-radius: 10px; margin-top: 14px; border: 1px solid var(--border);
}

.slot .dropzone-inner { padding: 34px 20px; }

/* ---------- Parameter controls ---------- */
.controls {
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  margin-top: 18px; padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.control {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}

.control select,
.control input[type="text"],
.control input[type="number"] {
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; font-family: inherit;
}

.control input[type="number"] { width: 110px; }
.control input[type="text"] { min-width: 200px; }
.control input[type="range"] { width: 180px; accent-color: var(--accent); }

.control select:focus,
.control input:focus { outline: none; border-color: var(--accent); }

.range-out { font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- Run row ---------- */
.run-actions { margin-top: 18px; }

/* ---------- Result stage ---------- */
.grid.single { grid-template-columns: 1fr; }

.imgwrap { position: relative; line-height: 0; }

#boxCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ---------- JSON result ---------- */
.json-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 20px 0 10px; flex-wrap: wrap;
}

.box-note { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.json-tree {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 13px; overflow-x: auto;
}

.jt-row { display: flex; gap: 12px; padding: 3px 0; align-items: baseline; }
.jt-key { color: var(--ink-soft); font-weight: 600; min-width: 120px; flex: 0 0 auto; }
.jt-val { flex: 1; }
.jt-kids { flex: 1; border-left: 2px solid var(--border); padding-left: 12px; }

.jt-num { font-variant-numeric: tabular-nums; color: var(--accent-strong); font-weight: 600; }
.jt-str { color: var(--ink); }
.jt-bool { color: var(--accent-strong); }
.jt-null { color: var(--ink-faint); }
.jt-link { font-weight: 600; }

.json-tree ul { list-style: none; margin: 0; padding-left: 12px; }
.json-tree li { padding: 3px 0; border-left: 2px solid var(--border); padding-left: 12px; }

/* ---------- Long-running progress ---------- */
.status .elapsed { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ---------- Prose / FAQ on tool pages ---------- */
.prose { max-width: 720px; margin: 36px auto 0; text-align: center; }
.prose p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin: 0; }

.tool + .faq { margin-top: 44px; }

/* ---------- Hub: category sections ---------- */
.cat { margin-top: 44px; }

.cat h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px;
}

.cat .count {
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px;
}

.cat-lede { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

.tool-card.compact { padding: 20px 22px; gap: 6px; }

.tool-card.compact h3 {
  font-size: 16px; font-weight: 700; margin: 0;
  letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px;
}

.tool-card.compact p { font-size: 13.5px; line-height: 1.55; }

.tool-card .pill {
  font-size: 11px; font-weight: 700; color: var(--success);
  background: rgba(47, 158, 99, 0.12); border-radius: 999px; padding: 2px 8px;
}

.related { margin-top: 52px; }

.related h2 { font-size: 20px; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.02em; }

@media (max-width: 600px) {
  .tool-card.compact { padding: 16px; }
  .jt-key { min-width: 84px; }
  .control input[type="text"], .control select { min-width: 0; width: 100%; }
  .controls { align-items: stretch; }
}

/* The bare-domain language chooser. Shown only when the script in the page has
   not already forwarded the visitor, so it is the no-JS and no-preference view.
   It stands alone: no header, no footer, no tool chrome. */
body.landing { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.lang-pick { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }

.lang-pick .btn { min-width: 120px; justify-content: center; }
