/* GP Tools — shared 90s-terminal / CRT theme (green phosphor) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0a05; --surface: #161009; --surface2: #1f1810; --border: #4d3a18;
  --accent: #ffc04d; --accent-dim: #bf8a2e; --danger: #ff5e4d; --warn: #ff9e2e;
  --ok: #6ed96a; --text: #ffd684; --muted: #c99a55; --radius: 3px;
}

body {
  font-family: "Courier New", ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--bg); color: var(--text); min-height: 100vh;
  padding: 20px 16px 32px; max-width: 600px; margin: 0 auto;
  font-size: 16px; line-height: 1.55;
  text-shadow: 0 0 1px rgba(255, 192, 77, 0.22);
}
/* CRT scanlines (fixed) */
body::before { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 4px); }
/* Vignette + a slow amber refresh sweep that drifts down the screen (the unique CRT touch) */
body::after { content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(255,196,90,0.05) 50%, transparent),
    radial-gradient(ellipse at center, transparent 64%, rgba(0,0,0,0.24) 100%);
  background-size: 100% 240px, 100% 100%;
  background-repeat: no-repeat;
  background-position: 0 -240px, 0 0;
  animation: crt-sweep 7.5s linear infinite; }
@keyframes crt-sweep { 0% { background-position: 0 -240px, 0 0; } 100% { background-position: 0 130vh, 0 0; } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* Top header / back-to-hub bar */
.topbar { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border);
  padding-bottom: 10px; margin-bottom: 20px; }
.topbar .home { color: var(--accent-dim); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.8rem; }
.topbar .home:hover { color: var(--accent); }
.topbar .home::before { content: "\2302  "; }
.topbar .crumb { color: var(--muted); font-size: 0.8rem; }
.topbar .crumb::before { content: "/ "; color: var(--border); }

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

h1 { font-size: 1.4rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
h1.cursor::before { content: "> "; color: var(--accent-dim); }
h1.cursor::after { content: "_"; animation: blink 1s step-end infinite; }
.subtitle { color: var(--muted); font-size: 0.82rem; margin-bottom: 18px; line-height: 1.45; }

.card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.card-title::before { content: "// "; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
input, select { width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 0.95rem;
  padding: 8px 10px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
.field { margin-bottom: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }

.btn { width: 100%; padding: 10px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 0.9rem;
  cursor: pointer; transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.05em; }
.btn:hover { border-color: var(--accent); background: #0c2a16; color: var(--accent); }

.result-box { border: 2px solid var(--border); border-radius: var(--radius); padding: 20px;
  text-align: center; margin-bottom: 16px; background: var(--surface); }
.result-big { font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.result-label { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }

.muted { color: var(--muted); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .danger { color: var(--danger); }
.note { font-size: 0.74rem; color: var(--muted); border-left: 2px solid var(--border);
  padding-left: 9px; line-height: 1.45; margin-top: 8px; }

.back { font-size: 0.8rem; color: var(--accent-dim); display: inline-block; margin-bottom: 16px; }
.back::before { content: "[ ← "; } .back::after { content: " ]"; }
footer { margin-top: 32px; color: var(--muted); font-size: 0.8rem;
  border-top: 1px solid var(--border); padding-top: 16px; line-height: 1.6; }
.disclaimer { color: var(--muted); font-size: 0.68rem; line-height: 1.4; opacity: 0.8; margin-bottom: 10px; }
.disclaimer strong { color: var(--warn); }
.ver { color: var(--accent-dim); font-size: 0.72rem; letter-spacing: 0.04em; }
