/* Traxelo shared design system — keep in sync with index.html / signaldesk.html themes */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;450;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #0f1513;
  --muted: #5b6864;
  --faint: #8a958f;
  --soft: #eef3ee;
  --paper: #f7faf6;
  --panel: #ffffff;
  --line: #e2e9e1;
  --line-strong: #d2dccf;
  --accent: #0db46b;
  --accent-2: #16c77b;
  --accent-strong: #077a4b;
  --accent-soft: #e2f7ec;
  --charcoal: #161f1c;
  --charcoal-2: #1d2926;
  --shadow-sm: 0 1px 2px rgba(16, 23, 21, .06), 0 2px 8px rgba(16, 23, 21, .04);
  --shadow: 0 14px 40px rgba(16, 23, 21, .10);
  --shadow-lg: 0 30px 80px rgba(16, 23, 21, .14);
  --ring: 0 0 0 4px rgba(13, 180, 107, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --display: "Space Grotesk", "Aptos Display", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Aptos", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(13, 180, 107, .07), transparent 60%),
    linear-gradient(180deg, #fbfdf9 0%, var(--paper) 44%, #ffffff 100%);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(13, 180, 107, .22); }

.shell { width: min(calc(100% - 40px), 1080px); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(16, 23, 21, .08);
  background: rgba(247, 250, 246, .82);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}
.nav-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--charcoal); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow-sm); }
.mark span { width: 15px; height: 15px; border-radius: 5px; background: var(--accent); transform: rotate(45deg); display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links a { position: relative; transition: color .16s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--accent); border-radius: 2px; transition: width .2s ease; }
.nav-links a:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #04150d; box-shadow: 0 10px 24px rgba(13, 180, 107, .28); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(13, 180, 107, .36); transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: rgba(16,23,21,.05); }

/* ---------- Hero ---------- */
.tool-hero { padding: 64px 0 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  padding: 6px 13px 6px 11px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(13,180,107,.22);
  color: var(--accent-strong); font-size: 12.5px; font-weight: 600; letter-spacing: 0;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(13, 180, 107, .16); }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--display); font-size: clamp(34px, 5vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; max-width: 760px; }
.lede { max-width: 620px; margin-top: 18px; color: var(--muted); font-size: 18px; line-height: 1.6; }

section { padding: 30px 0; }

/* ---------- Tool layout ---------- */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 26px; box-shadow: var(--shadow);
}
.panel h2 { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 18px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
label { font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; min-height: 48px;
  padding: 12px 14px; background: #fbfdfa; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: var(--ring); }

.output {
  white-space: pre-wrap; font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  background: var(--charcoal); color: #e7f4ec; border-radius: 14px; padding: 20px;
  min-height: 220px; overflow: auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.output-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--charcoal-2), var(--charcoal));
  color: #f3faf6; border-radius: var(--radius); padding: 34px; margin: 22px 0; box-shadow: var(--shadow-lg);
}
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(13,180,107,.30), transparent 70%); }
.cta-band h2 { position: relative; font-family: var(--display); font-size: clamp(23px, 3.2vw, 32px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
.cta-band p { position: relative; color: #b6c6bf; margin-top: 12px; max-width: 620px; }
.cta-actions { position: relative; display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- Tools index cards ---------- */
.tools-index { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.tool-card { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: rgba(13,180,107,.45); box-shadow: var(--shadow); }
.tool-card .icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: -0.02em; }
.tool-card h3 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.tool-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.tool-card .btn { margin-top: auto; }

/* ---------- Footer ---------- */
.footer { padding: 38px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 36px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink); font-weight: 600; transition: color .16s ease; }
.footer a:hover { color: var(--accent-strong); }

.note { color: var(--faint); font-size: 13px; margin-top: 10px; }
.copied { color: #8ff0c1 !important; }
.hidden { display: none; }

/* ---------- Article / guide prose ---------- */
.article { max-width: 740px; margin: 0 auto; }
.article p { color: #3c4a45; font-size: 17.5px; line-height: 1.72; margin: 0 0 18px; }
.article h2 { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.02em; margin: 38px 0 12px; }
.article h3 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 26px 0 8px; }
.article ul, .article ol { color: #3c4a45; font-size: 17px; line-height: 1.7; padding-left: 22px; margin: 0 0 18px; display: grid; gap: 8px; }
.article a { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article a:hover { color: var(--accent); }
.article strong { color: var(--ink); }
.article blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 18px; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 16px; }
.article th, .article td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.article th { font-weight: 700; background: var(--soft); }
.callout { border: 1px solid rgba(13,180,107,.30); background: var(--accent-soft); border-radius: var(--radius); padding: 22px; margin: 24px 0; }
.callout h3 { margin: 0 0 6px; font-family: var(--display); font-size: 19px; font-weight: 600; }
.callout p { margin: 0 0 14px; color: #38463f; font-size: 16px; }
.meta-line { color: var(--faint); font-size: 14px; margin-top: 14px; }
.guide-index { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.guide-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.guide-card:hover { transform: translateY(-4px); border-color: rgba(13,180,107,.45); box-shadow: var(--shadow); }
.guide-card .kicker { color: var(--accent-strong); font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.guide-card h3 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.guide-card p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.guide-card a.btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 760px) { .guide-index { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tools-index { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  .shell { width: min(calc(100% - 28px), 1080px); }
  .tool-hero { padding: 44px 0 22px; }
  h1 { font-size: 32px; }
  .btn { width: 100%; }
  .panel, .cta-band { padding: 22px; }
}
