/* Toolbench — shared styles. Clean, restrained dev-utility aesthetic. */

:root {
  --bg:        #0f1115;
  --surface:   #171a21;
  --surface-2: #1e222b;
  --border:    #2a2f3a;
  --text:      #e6e9ef;
  --muted:     #9aa3b2;
  --accent:    #57c7a8;   /* muted teal — quiet, not acid */
  --accent-dim:#2f5d52;
  --danger:    #e0795f;
  --radius:    10px;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Top nav ---- */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }

/* ---- Layout ---- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
  font-weight: 700;
}
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 2.5rem; max-width: 56ch; }

/* ---- Cards / panels ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.panel h2 { font-size: 1.05rem; margin: 0 0 1rem; font-weight: 600; }

/* ---- Controls ---- */
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0 0 0.4rem; }
input[type="text"], input[type="number"], input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border-radius: 7px;
  transition: border-color 0.15s;
}
input:focus { outline: none; border-color: var(--accent-dim); }

.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }

button, .btn {
  background: var(--accent);
  color: #08120f;
  border: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.3rem;
  border-radius: 7px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); filter: none; background: var(--surface-2); }

/* ---- Toggles / checkboxes ---- */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.2rem; margin: 1rem 0; }
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--text); }
.check input { width: auto; accent-color: var(--accent); }

/* ---- Output / mono blocks ---- */
.output {
  font-family: var(--mono);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 1rem 1.1rem;
  word-break: break-all;
  font-size: 1rem;
  min-height: 1.2em;
  color: var(--accent);
}
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 0.5rem 1rem; font-family: var(--mono); font-size: 0.9rem; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); word-break: break-all; }

.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 0.7rem; }
.meter > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s, background 0.2s; }

.hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

/* ifconfig.io-style property table */
.props { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.props th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--sans);
  padding: 0.6rem 0.8rem 0.6rem 0;
  white-space: nowrap;
  vertical-align: top;
  width: 120px;
  border-bottom: 1px solid var(--border);
}
.props td {
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.props td.v { font-family: var(--mono); color: var(--text); word-break: break-all; }
.props td.c { font-family: var(--mono); color: var(--accent-dim); white-space: nowrap; font-size: 0.8rem; text-align: right; }
.props tr:last-child th, .props tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
  .props, .props tbody, .props tr, .props th, .props td { display: block; width: auto; }
  .props tr { padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
  .props th { padding: 0; border: none; }
  .props td { padding: 0.15rem 0 0; border: none; }
  .props td.c { text-align: left; opacity: 0.7; }
}
.foot { color: var(--muted); font-size: 0.82rem; text-align: center; padding: 2rem 1rem; border-top: 1px solid var(--border); }
code.inline { font-family: var(--mono); background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.88em; }

@media (max-width: 540px) {
  .checks { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 100px 1fr; }
  .nav { gap: 1rem; padding: 0.8rem 1rem; }
}

