/* Hwanpen Tools — self-contained styles (no external deps, Cloudflare-Pages ready) */
:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface2: #1c222b;
  --border: #2a313c;
  --ink: #e6edf3;
  --muted: #9aa7b4;
  --accent: #4da3ff;
  --accent-dim: #14304d;
  --good: #3fb950;
  --radius: 12px;
  --maxw: 960px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 17, 22, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 1.4rem; font-size: 0.9rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Layout */
main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.hero { text-align: center; padding: 1.5rem 0 2.5rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hero p { color: var(--muted); max-width: 560px; margin: 0.9rem auto 0; font-size: 1.02rem; }

/* Tool grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.card.soon { opacity: 0.55; pointer-events: none; }
.card h3 { font-size: 1rem; color: var(--ink); margin-bottom: 0.35rem; }
.card p { font-size: 0.85rem; color: var(--muted); }
.tag { display: inline-block; font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: var(--accent-dim); border-radius: 4px; padding: 0.1rem 0.45rem; margin-bottom: 0.7rem; }
.tag.soon-tag { color: var(--muted); background: var(--surface2); }

/* Content pages */
.prose { max-width: 680px; margin: 0 auto; }
.prose h1 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.prose h2 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink); margin-bottom: 0.8rem; }
.prose ul { padding-left: 1.3rem; }
.prose .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; }

/* Tool UI */
.tool { max-width: 720px; margin: 0 auto; }
.tool h1 { font-size: 1.7rem; margin-bottom: 0.4rem; }
.tool .lead { color: var(--muted); margin-bottom: 1.5rem; }
textarea, input[type="text"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
textarea:focus, input:focus { border-color: var(--accent); }
textarea { min-height: 180px; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }
.back { display: inline-block; margin-bottom: 1.2rem; color: var(--muted); font-size: 0.85rem; }

/* Tool "about" content block (SEO + user context) */
.tool-about { margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.tool-about h2 { font-size: 1.1rem; color: var(--ink); margin-bottom: 0.6rem; }
.tool-about p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; line-height: 1.75; }

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
footer.site a { color: var(--muted); }
footer.site .links { margin-bottom: 0.5rem; display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
