/* =========================================================================
   NetTools — instrument / datasheet stijl
   Palet:  paper #EEF1F5 · surface #FFF · ink #14181F · muted #5E6878
           hairline #DBE0E7 · cobalt #2348E0 · ok #1F9D6B · bad #C9453B · warn #B8791C
   Type:   grotesk (UI) + monospace (alle data)
   ========================================================================= */

:root {
  --paper:    #EEF1F5;
  --surface:  #FFFFFF;
  --ink:      #14181F;
  --muted:    #5E6878;
  --dim:      #8A93A1;
  --hairline: #DBE0E7;
  --cobalt:   #2348E0;
  --cobalt-d: #1A37AE;
  --ok:       #1F9D6B;
  --bad:      #C9453B;
  --warn:     #B8791C;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Circular Std", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1440px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.masthead__inner {
  display: flex; align-items: baseline; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--cobalt); display: inline-flex; }
.brand__name {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
}
.masthead__tag {
  margin: 0; color: var(--muted); font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.02em;
}

/* ---- Hero -------------------------------------------------------------- */
.hero { padding: 56px 0 32px; max-width: 60ch; }
.hero__title {
  margin: 0 0 14px; font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 760;
}
.hero__lede { margin: 0; font-size: 1.08rem; color: var(--muted); }

/* ---- Tool-grid (patch bay) -------------------------------------------- */
.grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  background: var(--hairline);            /* hairlines tussen kaarten */
  border: 1px solid var(--hairline);
  margin-bottom: 64px;
}
.card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); color: var(--ink);
  padding: 20px 20px 22px;
  transition: background .12s ease;
}
.card:hover { background: #F7F9FC; text-decoration: none; }
.card__slug {
  font-family: var(--mono); font-size: 0.8rem; color: var(--cobalt);
  letter-spacing: 0.01em;
}
.card__name { font-weight: 680; letter-spacing: -0.01em; }
.card__desc { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }

/* ---- Tool-pagina kop --------------------------------------------------- */
.crumbs {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  padding-top: 22px;
}
.crumbs span[aria-hidden] { margin: 0 8px; color: var(--dim); }
.lead { padding: 14px 0 26px; max-width: 64ch; }
.lead__title {
  margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.025em; line-height: 1.1; font-weight: 740;
}
.lead__desc { margin: 0; color: var(--muted); }

/* ---- Probe-formulier --------------------------------------------------- */
.probe { margin: 0 0 28px; }
.probe__row {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px;
}
.probe__label {
  flex-basis: 100%; font-family: var(--mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.probe__input {
  flex: 1 1 280px; min-width: 0;
  font-family: var(--mono); font-size: 0.98rem;
  padding: 13px 14px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 0;
}
.probe__input:focus,
.probe__select:focus,
.probe__go:focus-visible {
  outline: 2px solid var(--cobalt); outline-offset: 1px;
}
.probe__select {
  font-family: var(--mono); font-size: 0.92rem; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--ink); border-radius: 0;
}
.probe__go {
  font-family: var(--mono); font-weight: 600; font-size: 0.92rem;
  padding: 0 26px; cursor: pointer; border: 1px solid var(--cobalt);
  background: var(--cobalt); color: #fff; border-radius: 0;
  letter-spacing: 0.04em;
}
.probe__go:hover { background: var(--cobalt-d); border-color: var(--cobalt-d); }

/* ---- Console-paneel (signatuur) --------------------------------------- */
.console {
  border: 1px solid var(--hairline); background: var(--surface);
  margin-bottom: 40px;
}
.console__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--hairline);
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(20,24,31,.04) 7px 8px),
    #F3F5F9;
}
.console__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(31,157,107,.15);
}
.console__meta {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  letter-spacing: 0.01em;
}
.console__body { padding: 4px 0; overflow-x: auto; }

/* ---- Datatabel --------------------------------------------------------- */
.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data th, .data td {
  text-align: left; padding: 10px 16px; vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
.data thead th {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); font-weight: 600;
}
.data tbody tr:last-child th,
.data tbody tr:last-child td { border-bottom: none; }
.data th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.val { font-family: var(--mono); word-break: break-word; }
.num { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.dim { color: var(--dim); font-size: 0.82em; }

/* ---- Ruwe uitvoer ------------------------------------------------------ */
.raw {
  margin: 0; padding: 16px; font-family: var(--mono); font-size: 0.84rem;
  line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--ink);
}

/* ---- Pills & meldingen ------------------------------------------------- */
.pill {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  font-weight: 600; padding: 2px 8px; border: 1px solid currentColor;
  letter-spacing: 0.02em; line-height: 1.6;
}
.pill--ok      { color: var(--ok); }
.pill--bad     { color: var(--bad); }
.pill--warn    { color: var(--warn); }
.pill--neutral { color: var(--muted); }

.msg { font-size: 0.92rem; padding: 12px 16px; margin: 4px 0 0; color: var(--muted); }
.msg--ok   { color: var(--ok); }
.msg--bad  { color: var(--bad); }
.msg--warn { color: var(--warn); }
.hint { font-size: 0.85rem; color: var(--dim); margin: 0 0 24px; font-family: var(--mono); }

/* ---- Footer ------------------------------------------------------------ */
.foot {
  border-top: 1px solid var(--hairline); background: var(--surface);
  margin-top: 24px;
}
.foot__inner { padding: 24px 0; color: var(--muted); font-size: 0.85rem; }
.foot__inner p { margin: 0 0 4px; }
.foot__note { font-family: var(--mono); font-size: 0.76rem; color: var(--dim); }

/* ---- Responsief & toegankelijkheid ------------------------------------ */
@media (max-width: 540px) {
  .wrap { padding: 0 16px; }
  .probe__go { flex: 1 1 100%; padding: 13px; }
  .probe__select { flex: 1 1 100%; padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* =========================================================================
   Beheerpaneel
   ========================================================================= */
.brand__logo { max-height: 30px; width: auto; display: block; }
.foot__admin { margin-top: 6px; }
.foot__admin a { font-family: var(--mono); font-size: 0.78rem; }

.admin { padding-bottom: 56px; }
.lead--admin .lead__desc a { font-family: var(--mono); font-size: 0.85rem; }
.admin__flash { border: 1px solid var(--hairline); margin: 18px 0 0; }

.panel {
  border: 1px solid var(--hairline); background: var(--surface);
  padding: 8px 24px 28px; margin-top: 22px;
}
.panel__h {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); font-weight: 600;
  margin: 28px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline);
}
.panel__h:first-child { margin-top: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field > label {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}
.admin__area { font-family: var(--sans); line-height: 1.5; resize: vertical; }
.admin__color {
  width: 64px; height: 40px; padding: 2px; border: 1px solid var(--hairline);
  background: var(--surface); cursor: pointer;
}
input[type="file"] { font-family: var(--mono); font-size: 0.85rem; }

.admin__check {
  display: flex; align-items: baseline; gap: 8px; font-size: 0.92rem;
  text-transform: none; letter-spacing: 0; color: var(--ink); margin-top: 8px;
}
.admin__check input { margin: 0; }

.toolgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 18px; margin-top: 14px;
}
.admin__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px;
}
.admin__logo {
  display: flex; align-items: center; gap: 16px; padding: 12px;
  border: 1px solid var(--hairline); background: var(--paper); margin-bottom: 8px;
}
.admin__logo img { max-height: 44px; width: auto; }
.admin__actions { margin-top: 28px; }

/* =========================================================================
   Thema (licht/donker), header-controls, featured, kaart, animaties
   ========================================================================= */

/* Aanvullende tokens (licht). */
:root {
  --hover:   #F7F9FC;
  --bar-bg:  #F3F5F9;
  --tick:    rgba(20, 24, 31, .04);
}

/* Donker thema. Accent (--cobalt) blijft bewust ongemoeid zodat de
   beheerder-accentkleur in beide thema's klopt. */
html[data-theme="dark"] {
  --paper:    #0F1722;
  --surface:  #16202E;
  --ink:      #D7DFEA;
  --muted:    #8A99B0;
  --dim:      #647892;
  --hairline: #27374B;
  --hover:    #1B2838;
  --bar-bg:   #1A2636;
  --tick:     rgba(255, 255, 255, .04);
  --ok:       #37C08C;
  --bad:      #E76A5F;
  --warn:     #D69A3C;
}

body { transition: background-color .25s ease, color .25s ease; }

/* Overrides zodat eerdere hardcoded kleuren het thema volgen. */
.card:hover { background: var(--hover); }
.console__bar {
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, var(--tick) 7px 8px),
    var(--bar-bg);
}

/* ---- Masthead met controls rechts ---- */
.masthead__inner { align-items: center; justify-content: space-between; }
.masthead__tag {
  padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--hairline);
  color: var(--muted); font-family: var(--mono); font-size: 0.78rem; letter-spacing: .01em;
}
.masthead__controls { display: inline-flex; align-items: center; gap: 10px; }

.meter {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 10px;
  white-space: nowrap;
}
.meter .ic { opacity: .75; }
.meter--low { color: var(--bad); border-color: var(--bad); }

.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 34px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); cursor: pointer; border-radius: 8px;
  transition: border-color .12s ease, color .12s ease;
}
.theme-btn:hover { border-color: var(--cobalt); color: var(--cobalt); }
.ic--sun { display: none; }
.ic--moon { display: block; }
html[data-theme="dark"] .ic--moon { display: none; }
html[data-theme="dark"] .ic--sun { display: block; }

/* ---- Featured tools (de twee belangrijkste) ---- */
.featured {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px; margin: 26px 0 36px;
}
.feat {
  display: flex; align-items: center; gap: 18px; color: var(--ink);
  padding: 20px 22px; border: 1px solid var(--cobalt);
  background: color-mix(in srgb, var(--cobalt) 7%, var(--surface));
  transition: background .14s ease, transform .14s ease;
}
.feat:hover { background: color-mix(in srgb, var(--cobalt) 13%, var(--surface)); text-decoration: none; transform: translateY(-1px); }
.feat__icon {
  flex: none; width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--cobalt);
}
.feat__body { display: flex; flex-direction: column; }
.feat__name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.feat__desc { color: var(--muted); font-size: 0.88rem; margin-top: 3px; }
.feat__go { margin-left: auto; color: var(--cobalt); font-size: 1.4rem; line-height: 1; }
@supports not (background: color-mix(in srgb, red, blue)) {
  .feat { background: var(--surface); }
  .feat:hover { background: var(--hover); }
}

/* ---- Ingebed kaartje ---- */
.mapwrap { border-top: 1px solid var(--hairline); }
.map { width: 100%; height: 300px; border: 0; display: block; }
.map__link { display: inline-block; font-family: var(--mono); font-size: 0.78rem; padding: 10px 16px; }

/* ---- Admin: compactere invoervelden ---- */
.admin .field .probe__input { max-width: 320px; padding: 7px 10px; font-size: 0.9rem; }
.admin .field .admin__area { max-width: 420px; padding: 7px 10px; font-size: 0.9rem; }
.admin .field input[type="number"] { max-width: 110px; }
.admin .panel { max-width: 720px; }

/* ---- Subtiele animaties ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeInUp .42s ease both; }
.console { animation: fadeInUp .4s ease both; }
.feat, .card { animation: fadeIn .5s ease both; }
.featured .feat:nth-child(2) { animation-delay: .06s; }
.grid .card:nth-child(1) { animation-delay: .02s; }
.grid .card:nth-child(2) { animation-delay: .05s; }
.grid .card:nth-child(3) { animation-delay: .08s; }
.grid .card:nth-child(4) { animation-delay: .11s; }
.grid .card:nth-child(5) { animation-delay: .14s; }
.grid .card:nth-child(n+6) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, .fade-in, .console, .feat, .card { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
  .masthead__tag { display: none; }
}

/* =========================================================================
   Huisstijl-lettertype, bredere layout, ronde tegels, groot IP-veld
   ========================================================================= */

@font-face { font-family: "Circular Std"; src: url("fonts/CircularStd-Light.woff2")  format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Circular Std"; src: url("fonts/CircularStd-Book.woff2")   format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Circular Std"; src: url("fonts/CircularStd-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Circular Std"; src: url("fonts/CircularStd-Bold.woff2")   format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Iets grotere basistekst (alle rem-maten schalen mee). */
html { font-size: 17px; }
body { font-size: 1rem; }

/* Ronde, losse tegels met ~10px tussenruimte. */
.grid { gap: var(--tile-gap, 60px); background: transparent; border: 0; }
.card { border: 1px solid var(--hairline); border-radius: 20px; }
.feat { border-radius: 20px; }
.featured { gap: var(--tile-gap, 60px); }

/* Groot, vet headline-veld (o.a. het IP in "Wat is mijn IP"). */
.bigval { padding: 16px 16px 8px; }
.bigval__label {
  display: block; font-family: var(--mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px;
}
.bigval__value {
  display: block; font-family: var(--mono); font-weight: 700;
  font-size: 30pt; line-height: 1.1; color: var(--ink); word-break: break-all;
}

/* ---- Deel-resultaten (Wat is mijn browser) ---- */
.sb-share { margin: 14px 0 6px; }
.sb-share-out, #sb-share-out { margin-top: 10px; }
.sb-link { font-family: var(--mono); font-size: 0.82rem; word-break: break-all; margin: 0 0 10px; }
.sb-copy { margin-top: 4px; }

/* ---- Footer: ~60px afstand + gecentreerde tekst ---- */
.foot { margin-top: 60px; }
.foot__inner { text-align: center; }

/* ---- Padding op het vak rondom alle tegels (niet op de tegels zelf) ---- */
.grid, .featured { padding: var(--tile-pad, 5px); }
