/* ==========================================================================
   Neon Palm Networks — site stylesheet
   Colors are defined once as tokens; dark mode only swaps the token values.
   ========================================================================== */

:root {
  /* Brand (sampled from the logo) */
  --brand-navy: #2a2f86;
  --brand-green: #1f8f3a;
  --brand-cyan: #1ea0d8;

  /* Light theme */
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #dde3ec;
  --primary: var(--brand-navy);
  --primary-hover: #1f236b;
  --on-primary: #ffffff;
  --accent: var(--brand-green);
  --link: #2638b8;
  --hero-from: #e8eefc;
  --hero-to: #e3f5fb;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 4px 16px rgb(15 23 42 / 0.06);

  --radius: 12px;
  --container: 1120px;
  --header-h: 104px; /* fits the 83px-tall logo at full size */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #17223a;
  --text: #e6ebf5;
  --text-muted: #9aa6bd;
  --border: #233050;
  --primary: #5b6cff;
  --primary-hover: #7584ff;
  --on-primary: #ffffff;
  --accent: #34d399;
  --link: #7cc4ff;
  --hero-from: #121c38;
  --hero-to: #0d2533;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.3);

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.2s, color 0.2s;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; border-radius: 4px; }

address { font-style: normal; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

/* Logo shows at its native 255x83 size; it only scales down on screens too narrow to fit it. */
.brand { display: block; flex-shrink: 0; }
.brand img { width: auto; height: auto; }

/* The logo is a JPG with a white background — frame it so it looks intentional in dark mode. */
[data-theme="dark"] .brand img {
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--primary); background: var(--surface-2); }
[data-theme="dark"] .site-nav a[aria-current="page"] { color: var(--link); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Theme switch */
.theme-switch {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 999px;
}
.theme-switch__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 32px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.theme-switch svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.2s ease;
}
.theme-switch[aria-checked="true"] .theme-switch__thumb { transform: translateX(28px); }
.theme-switch[aria-checked="true"] .theme-switch__track { background: var(--primary); border-color: var(--primary); }
.theme-switch[aria-checked="true"] svg { stroke: #fff; }

/* Mobile menu button (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }

@media (max-width: 1000px) {
  .header-inner { flex-wrap: wrap; gap: 0.75rem; }
  .brand { flex: 1 1 0; min-width: 0; }
  .header-actions { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0; }
  .site-nav ul { flex-direction: column; padding-bottom: 0.75rem; }

  /* Menu collapses only when JS is available to reopen it. */
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--text-muted); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead { font-size: 1.2rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* Hero */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border-bottom: 1px solid var(--border);
}
/* The container stays full width so the hero lines up with the content below;
   only its contents are narrowed, for a comfortable line length. */
.hero-inner > * { max-width: 760px; }
.hero h1 span { color: var(--primary); }
[data-theme="dark"] .hero h1 span { color: var(--link); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Page header for interior pages */
.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border-bottom: 1px solid var(--border);
}
.page-hero p { max-width: 680px; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}
.stat strong { display: block; font-size: 1.75rem; color: var(--text); }
.stat span { color: var(--text-muted); font-size: 0.95rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--surface-2);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .card-icon svg { stroke: var(--link); }

.card-highlight { border-color: var(--accent); }
.card-first { order: -1; border-color: var(--accent); }
.badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}
[data-theme="dark"] .badge { color: #052e1c; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.5rem;
  height: 0.85rem;
  border: solid var(--accent);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Call-to-action band */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
}
.cta h2 { margin-bottom: 0.25rem; }
.cta p { margin: 0; opacity: 0.9; }
.cta .btn { background: #fff; color: var(--brand-navy); }
.cta .btn:hover { background: #e9edff; }

/* Two-column layout */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; align-items: start; }

/* Label/value list, e.g. email server settings */
.settings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  margin: 1rem 0;
}
.email-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 440px));
  justify-content: center;
}
.email-settings-group h4 { margin: 1rem 0 0.25rem; font-size: 1rem; }
.email-settings-group .settings { margin: 0 0 0.75rem; }
.email-settings-grid .settings { grid-template-columns: minmax(0, 1fr) auto; }
.email-settings-grid .settings dd { white-space: nowrap; overflow-wrap: normal; }
.settings dt,
.settings dd {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.settings dt { padding-right: 1rem; color: var(--text-muted); }
.settings dd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.small { font-size: 0.9rem; }

/* ---------- Network tools (/tools/) ---------- */

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.tool-tabs [role="tab"] {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}
.tool-tabs [role="tab"]:hover { border-color: var(--text-muted); }
.tool-tabs [role="tab"][aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.tool-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--text-muted); }
.field-grow { flex: 1 1 18rem; }
.field input,
.field select {
  min-height: 2.9rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.field input:focus-visible,
.field select:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 1px; }
.tool-form .btn { min-height: 2.9rem; }

/* Clear ("x") button inside the tools' text boxes */
.input-wrap { position: relative; display: flex; }
.input-wrap input { flex: 1; min-width: 0; padding-right: 2.6rem; }
.input-clear {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.input-clear:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.tool-hint { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--text-muted); }
.tool-result:not(:empty) { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.tool-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1.5rem 0 0.75rem; font-size: 1.05rem; }
.tool-result > .tool-heading:first-child { margin-top: 0; }
.tool-note { color: var(--text-muted); font-size: 0.95rem; }
.tool-busy { color: var(--text-muted); }
.tool-busy::before { content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.5em; vertical-align: -0.1em; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: tool-spin 0.8s linear infinite; }
@keyframes tool-spin { to { transform: rotate(360deg); } }
.tool-error { padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid #f1a9a0; background: #fdecea; color: #8a1c12; }

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pass, .status-clean { background: #dcfce7; color: #14532d; border-color: #86efac; }
.status-warn { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.status-fail, .status-listed { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.status-info, .status-error { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }

.tool-score { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tool-check {
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
}
.tool-check-pass { border-left-color: #22c55e; }
.tool-check-warn { border-left-color: #f59e0b; }
.tool-check-fail { border-left-color: #ef4444; }
.tool-check-info { border-left-color: var(--border); }
.tool-check-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tool-check-head h3 { margin: 0; font-size: 1.05rem; }
.tool-check p { margin: 0.4rem 0 0; }

.tool-pre,
.tool-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tool-pre { margin: 0.75rem 0 0; padding: 0.75rem; border-radius: 8px; background: var(--surface-2); }

.table-wrap { overflow-x: auto; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tool-table th,
.tool-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tool-table th { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.tool-kv { max-width: 760px; }
.tool-kv dd { font-family: inherit; font-weight: 500; }

[data-theme="dark"] .status-pass, [data-theme="dark"] .status-clean { background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .status-warn { background: #3b2604; color: #fcd34d; border-color: #92400e; }
[data-theme="dark"] .status-fail, [data-theme="dark"] .status-listed { background: #3f0d0d; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .tool-error { background: #3f0d0d; color: #fca5a5; border-color: #991b1b; }

.ip-box {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font: 600 1.35rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.remote-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.remote-form .btn { justify-self: center; }
.remote-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* The icon is a JPG on white; round it so it sits neatly in dark mode too. */
.remote-note img { flex: none; border-radius: 6px; }

.ip-box:has(.copy-btn) {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* Command-line versions of the IP lookup, on the Tools page's "Your IP" tab. */
.cmd-heading { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.cmd-list { max-width: 42rem; margin: 0; }
.cmd-list dt { margin-top: 0.75rem; font-size: 0.9rem; font-weight: 600; }
.cmd-list dd { margin: 0.35rem 0 0; }
.cmd-or { font-size: 0.85rem; }
.cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.cmd-box code {
  min-width: 0;
  font: 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

/* Small copy icon, shown on hover like a code block's copy button. It needs JavaScript,
   so it only appears when that's running; on touch screens (no hover) it's always shown. */
.copy-btn { display: none; }
.js .copy-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.ip-box:hover .copy-btn,
.cmd-box:hover .copy-btn,
.copy-btn:focus-visible,
.copy-btn.is-copied { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--text-muted); }
@media (hover: none) {
  .js .copy-btn { opacity: 1; }
}
.copy-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied { color: var(--accent); }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Downloads listing (/np-dl/, partials/np-dl-listing.html) ---------- */

.dl-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dl-table { width: 100%; border-collapse: collapse; }
.dl-table th,
.dl-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.dl-table tbody tr:last-child td { border-bottom: 0; }
.dl-table th { font-size: 0.9rem; font-weight: 600; }
.dl-table th a { color: var(--text-muted); text-decoration: none; }
.dl-table th a:hover { color: var(--text); }
.dl-table tbody tr:hover { background: var(--bg); }
.dl-table .dl-name { overflow-wrap: anywhere; font-weight: 600; }
.dl-table .dl-time,
.dl-table .dl-size { white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.dl-table .dl-size { text-align: right; }
.dl-footnote { margin: 1rem 0 0; font-size: 0.9rem; }

/* ---------- FileManager (/filemanager/, assets/js/filemanager.js) ---------- */

.fm { display: grid; gap: 1.5rem; }
.fm-title { margin: 0 0 1rem; font-size: 1.25rem; }
.fm-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.fm-title-row .fm-title { margin: 0; }
.fm-message { margin: 0; }
.fm-message:not(.tool-error) { padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.fm-drop { transition: border-color 0.15s, background-color 0.15s; }
.fm-drop.is-dragover { border-color: var(--brand-cyan); border-style: dashed; background: var(--surface-2); }
.fm-drop input[type="file"] { min-height: 0; }
.fm-queue { margin-top: 1.25rem; }
.fm-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.875rem; }
.btn-outline.fm-danger:hover { border-color: #c2410c; color: #c2410c; }
.fm-table .fm-cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.fm-table .fm-cell-actions .btn + .btn { margin-left: 0.4rem; }
.fm-table .fm-cell-status { min-width: 10rem; color: var(--text-muted); font-size: 0.9rem; }
.fm-table progress { display: block; width: 100%; margin-top: 0.3rem; accent-color: var(--primary); }
.fm-name-input {
  width: 100%;
  min-width: 12rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.fm-name-input:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 1px; }
.fm-name-input:disabled { opacity: 0.7; }
.fm-status-done { color: var(--accent); font-weight: 600; }
.fm-status-failed { color: #c2410c; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.footer-title { margin-bottom: 0.75rem; font-weight: 700; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }

/* Footer environment marker: date on LIVE, bright DEV badge on staging (www2). */
.env-badge {
  margin-left: auto;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.env-badge--dev {
  border-color: #c2410c;
  background: #ea580c;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
