/* ==========================================================================
   Endless Center — design system (v3, 19 Nov 2026)
   Palette: LIGHT + EYE-FRIENDLY. White background, soft slate text, one calm
   teal accent, no saturated gradients, no harsh colours. The tool is the
   focus — the chrome stays quiet (iLovePDF-style: airy, lots of whitespace).
   System fonts only, no webfonts, no frameworks. One shared file.
   ========================================================================== */
:root {
  --ink: #1f2937;
  --primary: #0f766e;
  --primary-dark: #0b5e57;
  --primary-soft: #ccfbf1;
  --accent: #0f766e;
  --accent-soft: #f0fdfa;
  --text: #334155;
  --muted: #64748b;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-panel: #f0fdfa;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-card: 0 2px 10px rgba(15, 23, 42, .05);
  --shadow-lift: 0 10px 28px rgba(15, 23, 42, .10);
  --shadow-tool: 0 14px 40px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--primary); }
a:hover { text-decoration: none; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.site-header .wrap {
  max-width: 1020px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { color: var(--ink); font-weight: 800; font-size: 21px; text-decoration: none; letter-spacing: .2px; }
.brand span { color: var(--primary); }
.site-nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; font-weight: 600; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Layout ---------- */
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 30px; padding-bottom: 44px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; color: var(--ink); font-weight: 800; letter-spacing: -.4px; }
h2 { font-size: 23px; color: var(--ink); margin: 34px 0 12px; font-weight: 800; letter-spacing: -.3px; }
h3 { font-size: 18px; color: var(--ink); margin: 22px 0 8px; font-weight: 700; }
p { margin: 0 0 14px; }
.lede { font-size: 18px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.privacy-note {
  background: var(--bg-soft); border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: 15px; margin: 18px 0;
}

/* ---------- Hero (homepage) ---------- */
.hero {
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  color: var(--ink);
  border-radius: 0 0 28px 28px;
  padding: 56px 20px 64px;
  text-align: center;
}
.hero h1 { color: var(--ink); font-size: 42px; line-height: 1.15; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto 26px; }
.search-box { max-width: 560px; margin: 0 auto; position: relative; }
.search-box input {
  width: 100%; padding: 17px 22px 17px 52px; font-size: 18px;
  border: 1.5px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .08); font-family: inherit;
}
.search-box input:focus { outline: 3px solid var(--primary-soft); outline-offset: 2px; border-color: var(--primary); }
.search-box svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.search-hint { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Category sections (homepage) ---------- */
.category { margin-top: 44px; }
.category-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.category-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.category-icon svg { width: 24px; height: 24px; color: var(--primary); }
.category-head h2 { margin: 0; }
.category p.cat-desc { color: var(--muted); margin: 4px 0 18px 56px; }

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  text-decoration: none; color: var(--text); background: #fff; display: block;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { border-color: var(--primary); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.card h2, .card h3 { font-size: 18px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .card-cta { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--primary); }

/* ---------- Tool box (the tool itself — elevated, prominent) ---------- */
.tool-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin: 22px 0;
  box-shadow: var(--shadow-tool);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 15px; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
input[type="number"], input[type="text"], input[type="date"], input[type="email"],
select, textarea {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
  font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
textarea { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 200px; }
button, .btn {
  background: var(--primary); color: #fff; border: 0; border-radius: 10px;
  padding: 14px 26px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 18px rgba(15, 118, 110, .22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease;
}
button:hover, .btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15, 118, 110, .28); }
button.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
button.secondary:hover { background: var(--accent-soft); box-shadow: none; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.result {
  background: var(--bg-panel); border: 1px solid #99f6e4; border-radius: 12px;
  padding: 18px 20px; margin-top: 20px; font-size: 18px;
}
.result .big { font-size: 32px; font-weight: 800; color: var(--ink); }
.result table { width: 100%; border-collapse: collapse; font-size: 16px; }
.result table td { padding: 7px 0; border-bottom: 1px solid #ccfbf1; }
.result table td:last-child { text-align: right; font-weight: 700; }
.error { color: #b3261e; background: #fdecea; border: 1px solid #f5c6cb; border-radius: 10px; padding: 13px 15px; margin-top: 14px; }
.success { color: #14532d; background: #e6f4ea; border: 1px solid #a3d9a5; border-radius: 10px; padding: 13px 15px; margin-top: 14px; }
pre.output {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 15px; overflow-x: auto; font-size: 14px; white-space: pre-wrap; word-break: break-word;
}
.dropzone {
  border: 2.5px dashed #5eead4; border-radius: var(--radius-lg);
  padding: 40px 18px; text-align: center; color: var(--muted); cursor: pointer; background: var(--bg-soft);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--accent-soft); color: var(--ink); }
.dropzone strong { display: block; font-size: 19px; color: var(--ink); margin-bottom: 4px; }
canvas.draw { border: 1.5px solid var(--border); border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 180px; }
canvas.barcode, svg.barcode { max-width: 100%; height: auto; background: #fff; }
.file-list { list-style: none; padding: 0; margin: 12px 0; }
.file-list li { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }

/* ---------- Related tools + FAQ ---------- */
.related { margin-top: 36px; }
.related ul { columns: 2; padding-left: 20px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; background: #fff; box-shadow: var(--shadow-card); }
.faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.faq p { margin: 8px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: #f1f5f9; color: #475569; margin-top: 24px; border-top: 1px solid var(--border); }
.site-footer .wrap { padding-top: 30px; padding-bottom: 30px; font-size: 15px; }
.site-footer a { color: #334155; }
.site-footer nav { margin-bottom: 14px; line-height: 2.1; }
.site-footer nav a { margin-right: 14px; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer h3 { color: var(--ink); font-size: 15px; margin: 18px 0 6px; }

/* ---------- Footer polish (v4.1) ---------- */
/* Categories as separate pills so each one stands apart */
.site-footer nav[aria-label="Categories"] a {
  display: inline-block;
  padding: 5px 13px;
  margin: 0 8px 8px 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  line-height: 1.5;
  text-decoration: none;
}
.site-footer nav[aria-label="Categories"] a:hover {
  border-color: #0f766e;
  color: #0f766e;
  text-decoration: none;
}
/* About / Contact / Privacy: centred, separated from the rows above */
.site-footer nav[aria-label="About Endless Center"] {
  text-align: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #cbd5e1;
}
.site-footer nav[aria-label="About Endless Center"] a {
  margin: 0 12px;
  font-weight: 600;
}

/* ---------- Tool-specific display classes ---------- */
.stopwatch-display, .countdown-display {
  font-size: 44px; font-weight: 800; color: var(--ink); text-align: center;
  font-variant-numeric: tabular-nums; letter-spacing: 1px; padding: 18px 0 6px;
}
.meter { height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 12px 0 6px; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width .3s ease; }
.mode-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.font-btn.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
button.selected { border-color: var(--primary); }
.preset-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.preset { width: 36px; height: 36px; min-width: 36px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.preset:hover { transform: scale(1.12); }
.swatch-preview { height: 64px; border-radius: 10px; border: 1px solid var(--border); margin: 10px 0; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0; }
.palette-grid .swatch { height: 64px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); }
.sig-preview { min-height: 90px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--border); border-radius: 10px; background: #fff; font-size: 34px; color: var(--ink); padding: 10px; text-align: center; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.invoice-table th, .invoice-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.invoice-table th { color: var(--ink); }
.note { background: var(--bg-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 15px; margin: 14px 0; }

@media (max-width: 700px) {
  .stopwatch-display, .countdown-display { font-size: 36px; }
  .palette-grid { gap: 8px; }
  .palette-grid .swatch { height: 48px; }
  .sig-preview { font-size: 26px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  .hero { padding: 40px 16px 48px; border-radius: 0 0 20px 20px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 17px; }
  .search-box input { font-size: 17px; padding: 15px 18px 15px 48px; }
  .tool-grid { grid-template-columns: 1fr; }
  .related ul { columns: 1; }
  .tool-box { padding: 18px; }
  .site-nav a { margin-left: 10px; font-size: 14px; }
  .category p.cat-desc { margin-left: 0; }
  .result .big { font-size: 27px; }
  button, .btn { padding: 13px 20px; }
}
/* ---------- v4 additions ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-logo { width: 32px; height: 32px; display: block; border-radius: 8px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.cat-card .cat-count { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--primary); }
.subgroup { margin-top: 30px; }
.subgroup h3 { margin-top: 0; }
@media (max-width: 700px) {
  .cat-grid { grid-template-columns: 1fr; }
}
