/* gitime.dev — shared design tokens + layout
   Privacy-first developer utilities. Local-only, deterministic. */

:root {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #1c2230;
  --panel: #11161f;
  --ink: #e6edf3;
  --ink-soft: #aeb9c4;
  --muted: #7d8a97;
  --line: #283039;
  --accent: #2dd4a7;        /* terminal-teal */
  --accent-2: #1f9d7b;
  --accent-ink: #052e22;
  --violet: #8b7cf6;
  --amber: #e3a008;
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1080px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(45,212,167,.08), transparent 60%), var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13,17,23,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 700; font-size: 18px;
  color: var(--ink); letter-spacing: -.3px;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
.brand .badge {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  color: var(--accent); background: rgba(45,212,167,.12);
  border: 1px solid rgba(45,212,167,.3);
  padding: 2px 6px; border-radius: 999px; letter-spacing: .4px;
}
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(30px, 5vw, 48px); line-height: 1.1;
  margin: 0 0 16px; letter-spacing: -1px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft);
  max-width: 660px; margin: 0 auto 24px;
}
.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  margin-top: 10px;
}
.trust-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-soft);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px;
}
.trust-pill svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Tool grid ---------- */
.section-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); font-weight: 700; margin: 40px 0 16px;
}
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  display: block; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; transition: .18s ease;
  position: relative; overflow: hidden;
}
.card:hover {
  border-color: rgba(45,212,167,.45); transform: translateY(-2px);
  text-decoration: none; box-shadow: var(--shadow);
}
.card.soon { opacity: .55; pointer-events: none; }
.card .ico {
  width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center; margin-bottom: 12px;
  background: rgba(45,212,167,.12); color: var(--accent);
}
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); font-weight: 700; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.card .tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--amber); background: rgba(227,160,8,.12);
  border: 1px solid rgba(227,160,8,.3); padding: 2px 7px; border-radius: 999px;
}

/* ---------- Tool page workspace ---------- */
.tool-head { padding: 36px 0 18px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.tool-head h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 10px; letter-spacing: -.6px; }
.tool-head p { color: var(--ink-soft); max-width: 720px; margin: 0; font-size: 16px; }

.local-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  background: rgba(45,212,167,.1); border: 1px solid rgba(45,212,167,.3);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.local-badge svg { width: 14px; height: 14px; }

.workspace {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 8px 0 12px;
}
.ws-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.seg { display: inline-flex; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.seg button.active { background: var(--accent); color: var(--accent-ink); }

.btn {
  border: 1px solid var(--line); background: var(--bg-3); color: var(--ink);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); color: #fff; }
.btn.ghost { background: transparent; }
.spacer { margin-left: auto; }

.ctl { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.ctl select.btn { padding: 6px 10px; -webkit-appearance: none; appearance: none; }
.ctl input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
@media (max-width: 760px) { .io-grid { grid-template-columns: 1fr; } }
.io-pane { display: flex; flex-direction: column; min-height: 360px; }
.io-pane + .io-pane { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .io-pane + .io-pane { border-left: 0; border-top: 1px solid var(--line); } }
.io-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.io-label .meta { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
textarea.code {
  flex: 1; width: 100%; resize: vertical; border: 0; outline: 0;
  background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  padding: 14px; tab-size: 2;
}
textarea.code::placeholder { color: var(--muted); }
.io-pane.out textarea.code { color: var(--ink-soft); }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  padding: 10px; text-align: center; font-size: 12.5px; color: var(--muted);
  margin: 10px 14px 0; cursor: pointer; transition: .15s;
}
.dropzone.drag { border-color: var(--accent); color: var(--accent); background: rgba(45,212,167,.06); }

.preview { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.preview-img { max-width: 100%; max-height: 320px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }

.cmp { font-family: var(--mono); min-width: 220px; }
.hash-list { flex: 1; padding: 6px; overflow: auto; }
.hash-row {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: var(--radius-sm);
}
.hash-row + .hash-row { margin-top: 4px; }
.hash-row.match { border-color: var(--accent); background: rgba(45,212,167,.08); }
.hash-algo { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .3px; }
.hash-val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); word-break: break-all; }
.hash-row.match .hash-val { color: var(--accent); }
.hash-copy { padding: 4px 10px; font-size: 12px; }

.num { width: 96px; }
.qval { font-family: var(--mono); font-size: 13px; color: var(--accent); min-width: 26px; text-align: right; }
.ctl input[type="range"] { accent-color: var(--accent); width: 130px; vertical-align: middle; }
.dz-big { margin: 14px; padding: 22px; }
.img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .img-grid { grid-template-columns: 1fr; } }
.img-pane { display: flex; flex-direction: column; min-height: 260px; }
.img-pane + .img-pane { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .img-pane + .img-pane { border-left: 0; border-top: 1px solid var(--line); } }
.img-stage {
  flex: 1; display: grid; place-items: center; padding: 16px; overflow: auto;
  background:
    linear-gradient(45deg, #1a1f29 25%, transparent 25%), linear-gradient(-45deg, #1a1f29 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1f29 75%), linear-gradient(-45deg, transparent 75%, #1a1f29 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.img-stage img { max-width: 100%; max-height: 360px; border-radius: var(--radius-sm); display: block; }

/* ---------- JWT decoder ---------- */
.algchip {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); background: rgba(45,212,167,.12);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
}
textarea.code.jwt-mini { flex: 0 0 auto; min-height: 96px; resize: vertical; }
.claims { padding: 6px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.claim-row {
  display: flex; gap: 10px; align-items: baseline; font-size: 13px;
  padding: 5px 0; border-bottom: 1px solid var(--line);
}
.claim-row:last-child { border-bottom: 0; }
.claim-k { flex: 0 0 150px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.claim-v { color: var(--ink); word-break: break-word; }
.claim-v.mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.algchip.bad { color: var(--danger); background: rgba(248,113,113,.12); }
.claim-note { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; margin-left: 6px; }
.claim-note.good { color: var(--accent); background: rgba(45,212,167,.12); }
.claim-note.bad { color: var(--danger); background: rgba(248,113,113,.12); }

.verify-bar {
  display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap;
  padding: 14px; border-top: 1px solid var(--line); background: var(--bg-2);
}
textarea.code.keybox {
  flex: 1 1 360px; min-height: 70px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--ink);
}
.verify-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; justify-content: center; }
.verify-badge {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-sm); color: var(--muted);
}
.verify-badge.good { color: var(--accent); background: rgba(45,212,167,.12); }
.verify-badge.bad { color: var(--danger); background: rgba(248,113,113,.12); }
.verify-badge.neutral { color: var(--ink-soft); background: var(--bg-3); }

/* ---------- Diff checker ---------- */
.diff-out {
  border-top: 1px solid var(--line); background: var(--bg);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  max-height: 520px; overflow: auto;
}
.dline { display: flex; gap: 0; white-space: pre-wrap; word-break: break-word; }
.dsign { flex: 0 0 22px; text-align: center; color: var(--muted); user-select: none; opacity: .8; }
.dtext { flex: 1; padding-right: 12px; }
.dline.eq { color: var(--ink-soft); }
.dline.add { background: rgba(45,212,167,.10); color: var(--ink); }
.dline.add .dsign { color: var(--accent); }
.dline.del { background: rgba(248,113,113,.10); color: var(--ink); }
.dline.del .dsign { color: var(--danger); }
.dline.chg { background: rgba(200,134,44,.10); color: var(--ink); }
.dline.chg .dsign { color: #e0a94a; }
.dline b { color: var(--accent); font-weight: 600; }

.status {
  font-size: 12.5px; padding: 8px 14px; min-height: 34px;
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.status.ok { color: var(--accent); }
.status.err { color: var(--danger); }

/* ---------- Article / SEO content ---------- */
.article { padding: 24px 0 10px; }
.article h2 { font-size: 24px; margin: 38px 0 12px; letter-spacing: -.4px; }
.article h3 { font-size: 18px; margin: 26px 0 8px; color: var(--ink); }
.article p, .article li { color: var(--ink-soft); font-size: 16px; }
.article ul, .article ol { padding-left: 22px; }
.article code {
  font-family: var(--mono); font-size: .9em; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--accent);
}
.toc {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin: 18px 0;
}
.toc strong { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.toc ul { margin: 10px 0 0; list-style: none; padding: 0; columns: 2; }
@media (max-width: 600px){ .toc ul { columns: 1; } }
.toc a { color: var(--ink-soft); font-size: 14px; }

.faq dt { font-weight: 700; color: var(--ink); margin-top: 18px; }
.faq dd { margin: 6px 0 0; color: var(--ink-soft); }

.crosslink { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); margin-top: 14px; }
.crosslink a {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--ink); font-weight: 600; font-size: 14px;
}
.crosslink a:hover { border-color: var(--accent); text-decoration: none; }
.crosslink a span { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0;
  color: var(--muted); font-size: 14px;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--muted); margin-bottom: 7px; font-size: 14px; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }

/* ad slot placeholder — kept empty during AdSense review */
.ad-slot { margin: 26px 0; min-height: 1px; }
