/* Nexys site — base layer: tokens, reset, layout, header, footer, buttons. */

:root {
  --bg: #0A0F1A;
  --surface: #101827;
  --card: #16202F;
  --card-alt: #1C2839;
  --border: #263449;
  --border-subtle: #1E2A3C;
  --blue: #2E7DFF;
  --blue-light: #5AA0FF;
  --blue-press: #1B4FB0;
  --cyan: #38E0D8;
  --text-strong: #EAF1FB;
  --text: #B8C6DB;
  --muted: #6F8199;
  --ok: #2ED573;
  --warn: #FFB020;
  --crit: #FF4D5E;

  --radius-card: 12px;
  --radius: 8px;
  --radius-sm: 4px;

  --step: 4px;
  --gutter: 24px;
  --container: 1140px;

  --font-ui: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Inter, Roboto, Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;

  --ease: 140ms cubic-bezier(.4, 0, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Faint technical grid, faded out below the fold. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(38, 52, 73, .45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 52, 73, .45) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000, transparent 70%);
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.125rem; }

p { margin: 0; }

img, svg { max-width: 100%; }
img { height: auto; }

ul { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--text-strong); }

.mono {
  font-family: var(--font-mono);
  font-size: .875em;
  letter-spacing: .01em;
}

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}
.btn--primary:hover { background: var(--blue-light); color: #fff; }
.btn--primary:active { background: var(--blue-press); }

.btn--ghost {
  border-color: var(--border);
  color: var(--text-strong);
  background: transparent;
}
.btn--ghost:hover {
  border-color: #34496A;
  background: rgba(90, 160, 255, .07);
  color: var(--text-strong);
}

.btn--lg {
  height: 54px;
  padding: 0 28px;
  font-size: 1.1875rem;
  font-weight: 700;
  border-radius: 10px;
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: .9375rem;
}

.btn__icon { flex: none; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 15, 26, .88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color var(--ease), background-color var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(10, 15, 26, .96);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}
.brand:hover { color: var(--text-strong); }
.brand__mark { flex: none; }
.brand__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--text-strong);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav__list a:not(.btn) {
  color: var(--text);
  font-size: .9375rem;
  padding: 6px 0;
}
.site-nav__list a:not(.btn):hover { color: var(--text-strong); }
.site-nav__list a[aria-current="page"]:not(.btn) { color: var(--text-strong); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-strong);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

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

.section { padding: clamp(56px, 7vw, 96px) 0; }

.section__head {
  max-width: 60ch;
  margin-bottom: 40px;
}
.section__head p { margin-top: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
/* Very soft blue wash behind the hero only. */
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: min(900px, 120%);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(46, 125, 255, .16), transparent 72%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 900px;
}

.hero__title { margin-top: 16px; }

.hero__lead {
  max-width: 62ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 28px;
  font-size: .875rem;
  color: var(--muted);
}
.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.hero__meta li + li::before {
  content: "";
  width: 1px;
  height: 14px;
  background: var(--border);
}
.hero__meta .badge { color: var(--text-strong); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--text-strong);
}

/* ---- Specification lists ---- */

.section-heading {
  margin-top: 56px;
  margin-bottom: 20px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.spec > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 18px;
  background: var(--card);
}
.spec__wide { grid-column: 1 / -1; }
.spec dt {
  min-width: 140px;
  color: var(--muted);
  font-size: .8125rem;
}
.spec dd {
  margin: 0;
  color: var(--text-strong);
  font-size: .9375rem;
}
.spec__hash {
  font-size: .8125rem;
  line-height: 1.6;
  word-break: break-all;
}

/* ---- Changelog ---- */

.releases {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.release {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.release__version {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.125rem;
  letter-spacing: 0;
}
.release__date {
  margin-top: 4px;
  color: var(--muted);
  font-size: .875rem;
}
.release__summary {
  margin-bottom: 16px;
  color: var(--text);
}

.changes { display: grid; gap: 10px; }
.changes li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  color: var(--text);
  font-size: .9375rem;
}

.change {
  flex: none;
  min-width: 88px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}
.change--added { border-color: rgba(46, 213, 115, .45); color: var(--ok); }
.change--changed { border-color: rgba(90, 160, 255, .45); color: var(--blue-light); }
.change--fixed { border-color: rgba(56, 224, 216, .45); color: var(--cyan); }
.change--removed { border-color: rgba(255, 77, 94, .45); color: var(--crit); }

@media (max-width: 720px) {
  .release { grid-template-columns: 1fr; gap: 12px; }
}

.notice {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: .9375rem;
}

.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
}

/* ---- Account forms ---- */

.container--narrow { max-width: 560px; }
.container--narrow h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.container--narrow .hero__lead { margin-top: 14px; font-size: 1rem; color: var(--muted); }
.container--narrow h2 { margin-top: 48px; font-size: 1.25rem; }

/* A form is easier to read narrow; a table is not. Same page, two widths. */
.container--data { max-width: 880px; }
.container--data h2 { margin-top: 48px; font-size: 1.25rem; }

.notice--ok { border-left-color: var(--ok); }

.form-card {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.form-card label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
}
.form-card label + input { margin-bottom: 18px; }

.form-card input[type="email"],
.form-card input[type="text"],
.form-card input[type="password"] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .9375rem;
}

.form-card input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.form-card .btn { width: 100%; height: 44px; margin-top: 6px; }
.form-card .btn + .btn { margin-top: 10px; }

.form-hint {
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: .8125rem;
}

.form-optional { color: var(--muted); font-weight: 400; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  font-size: .875rem;
  font-weight: 400;
  color: var(--muted);
}
.form-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); }

.form-errors {
  margin-top: 24px;
  padding: 14px 16px 14px 34px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--crit);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: .9375rem;
  list-style: disc;
}
.form-errors li + li { margin-top: 6px; }

.form-aside {
  margin-top: 20px;
  color: var(--muted);
  font-size: .9375rem;
}

.btn--danger {
  border: 1px solid rgba(255, 77, 94, .5);
  background: transparent;
  color: var(--crit);
}
.btn--danger:hover { background: rgba(255, 77, 94, .12); }

.btn[disabled] { opacity: .5; cursor: default; }

.form-provider { margin-top: 28px; }
.form-provider .btn { width: 100%; height: 46px; }

.form-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: .8125rem;
}
.form-separator::before,
.form-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.form-separator + .form-card { margin-top: 22px; }

.form-inline { display: inline-block; margin-top: 24px; }
.form-inline + .form-card { margin-top: 20px; }
.hero__actions .form-inline { margin-top: 0; }

.data-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 20px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: .9375rem;
}
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; color: var(--text); }

@media (max-width: 720px) {
  .hero__actions .form-inline { width: 100%; }
}

@media (max-width: 560px) {
  .data-list { grid-template-columns: 1fr; gap: 2px 0; }
  .data-list dd + dt { margin-top: 12px; }
}

/* ---- Maintenance ---- */

.maintenance {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px var(--gutter);
}

.maintenance__box {
  width: 100%;
  max-width: 460px;
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}
.maintenance__box h1 {
  margin-top: 18px;
  font-size: 1.5rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.maintenance__message {
  margin-top: 16px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}
.maintenance__admin {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: .875rem;
}
.maintenance__admin a { color: var(--muted); }
.maintenance__admin a:hover { color: var(--blue-light); }

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

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-block: 48px 32px;
}
.site-footer__brand { max-width: 44ch; }
.site-footer__brand p { margin-top: 8px; font-size: .9375rem; }
.site-footer__version { color: var(--muted); }

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.site-footer__nav a {
  color: var(--text);
  font-size: .9375rem;
}
.site-footer__nav a:hover { color: var(--text-strong); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: .8125rem;
  color: var(--muted);
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  :root { --gutter: 20px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 12px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .site-nav__list a:not(.btn) {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .site-nav__cta { margin-top: 14px; }
  .site-nav__cta .btn { width: 100%; height: 44px; }

  .site-header__inner { position: relative; }

  .hero__actions .btn { width: 100%; }
}

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

/* ---- Fleet and activity, on the account page ---- */

.fleet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: 12px;
  margin-top: 20px;
}
.fleet__card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.fleet__card--crit { border-left-color: var(--crit); }
.fleet__card--warn { border-left-color: var(--warn); }
.fleet__card--ok { border-left-color: var(--ok); }
.fleet__num {
  display: block;
  color: var(--text-strong);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
}
.fleet__label { display: block; margin-top: 4px; color: var(--muted); font-size: .8125rem; }

.fleet-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: .9375rem;
}
.fleet-table thead th {
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}
.fleet-table tbody td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.fleet-table tbody tr:last-child td { border-bottom: none; }
.fleet-name { display: block; color: var(--text-strong); }
.fleet-sub { display: block; margin-top: 3px; color: var(--muted); font-size: .8125rem; }
.fleet-when { color: var(--muted); white-space: nowrap; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-alt);
  color: var(--text);
  font-size: .8125rem;
}
.pill--crit { border-color: rgba(255, 77, 94, .45); color: var(--crit); }
.pill--warn { border-color: rgba(255, 176, 32, .45); color: var(--warn); }
.pill--ok { border-color: rgba(46, 213, 115, .4); color: var(--ok); }

@media (max-width: 720px) {
  .fleet-table thead { display: none; }
  .fleet-table tbody tr {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .fleet-table tbody td { display: block; padding: 3px 0; border: none; }
}

/* ---- The account area: four rooms instead of one endless column ---- */

.section--account { padding-top: clamp(32px, 4vw, 56px); }

.account-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}
.account-head h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.account-head__who {
  margin-top: 8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-head__actions { display: flex; align-items: center; gap: 10px; }

.pill--admin { border-color: rgba(46, 125, 255, .45); color: var(--blue-light); }

/* Tabs are links, not script: the address bar says which room you are in. */
.tabs {
  display: flex;
  gap: 4px;
  margin: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  /* Sideways when the tabs do not fit, never up and down: asking for overflow-x alone
     turns on the vertical axis too, and a stray scrollbar appears beside the tabs. */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
  position: relative;
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: .9375rem;
  white-space: nowrap;
}
/* The underline is drawn inside the tab, so nothing sticks out of the scroll box. */
.tabs__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: transparent;
}
.tabs__item:hover { color: var(--text-strong); }
.tabs__item--on { color: var(--text-strong); }
.tabs__item--on::after { background: var(--blue-light); }
.tabs__count {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: .75rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
a.stat:hover { border-color: var(--blue-light); }
.stat--warn { border-color: rgba(255, 176, 32, .45); }
.stat__num {
  display: block;
  color: var(--text-strong);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}
.stat__label { display: block; margin-top: 5px; color: var(--muted); font-size: .8125rem; }

/* Wide screens read two columns; narrow ones read one. */
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; }
.split h2 { margin-top: 0; font-size: 1.125rem; }
.split__main > h2:not(:first-child),
.split__side > h2:not(:first-child) { margin-top: 36px; }

.cards { list-style: none; margin: 16px 0 0; padding: 0; }
.cards--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  margin-top: 20px;
}
.cards li { margin: 0 0 10px; }
.cards--grid li { margin: 0; }

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.card-row:hover { border-color: var(--blue-light); }
.card-row--crit { border-left-color: var(--crit); }
.card-row--warn { border-left-color: var(--warn); }
.card-row--ok { border-left-color: var(--ok); }
.card-row__main { display: block; min-width: 0; }
.card-row__name { display: block; color: var(--text-strong); }
.card-row__sub { display: block; margin-top: 3px; color: var(--muted); font-size: .8125rem; }

.pc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.pc-card:hover { border-color: var(--blue-light); }
.pc-card--crit { border-top-color: var(--crit); }
.pc-card--warn { border-top-color: var(--warn); }
.pc-card--ok { border-top-color: var(--ok); }
.pc-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-card__name { color: var(--text-strong); font-weight: 600; word-break: break-word; }
.pc-card__client { display: block; margin-top: 6px; color: var(--text); font-size: .875rem; }
.pc-card__os { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.pc-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8125rem;
}

.feed { list-style: none; margin: 16px 0 0; padding: 0; }
.feed__item {
  padding: 12px 0 12px 14px;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid var(--border);
}
.feed__item:last-child { border-bottom: none; }
.feed__item--ok { border-left-color: var(--ok); }
.feed__item--errore { border-left-color: var(--crit); }
.feed__item--attenzione { border-left-color: var(--warn); }
.feed__when { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.feed__what { display: block; margin-top: 3px; color: var(--text-strong); }
.feed__where { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.feed .form-inline { margin-top: 8px; }

.empty {
  padding: 40px 32px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.empty h2 { margin-top: 0; font-size: 1.25rem; }
.empty p { max-width: 56ch; margin: 12px auto 0; color: var(--muted); }
.empty__how { font-size: .875rem; }
.empty .btn { margin-top: 24px; }

.crumbs { margin-bottom: 18px; color: var(--muted); font-size: .875rem; }

.machine-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.machine-head h2 { margin: 0; font-size: 1.5rem; }
.machine-head__sub { margin-top: 4px; color: var(--muted); font-size: .9375rem; }

.link { display: inline-block; margin-top: 14px; color: var(--blue-light); font-size: .875rem; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .account-head { align-items: flex-start; }
}

/* In the side column the labels have to give way: a long address must wrap, not spill. */
.split__side .data-list { grid-template-columns: minmax(0, 100px) minmax(0, 1fr); padding: 18px; }
.split__side .data-list dd { overflow-wrap: anywhere; }
.split__side .data-list dd.mono { font-size: .8125rem; }

/* Visible to a screen reader, not on screen: labels the search box without a second title. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.search input[type="search"] {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-strong);
  font: inherit;
  font-size: .9375rem;
}
.search input[type="search"]::placeholder { color: var(--muted); }
.search input[type="search"]:focus { border-color: var(--blue-light); outline: none; }
.search__clear { margin-top: 0; }
.search__result { margin-top: 14px; color: var(--muted); font-size: .875rem; }

.pc-card__user { display: block; margin-top: 2px; color: var(--text); font-size: .8125rem; }

/* The short pairing code: read off one screen and typed on another, so it wants room. */
.pair-code {
  font-size: 1.25rem;
  letter-spacing: .12em;
  color: var(--text-strong);
}
.form-optional { color: var(--muted); font-weight: 400; }
.form-card select {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-alt);
  color: var(--text-strong);
  font: inherit;
}
.form-card select:focus { border-color: var(--blue-light); outline: none; }

/* "Collega un PC": a short explanation and one field, above the fleet. */
.pair-box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.pair-box__text { flex: 1 1 320px; min-width: 0; }
.pair-box h2 { margin: 0 0 6px; font-size: 1.0625rem; }
.pair-box p { color: var(--muted); font-size: .875rem; }
.pair-box__form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pair-box__form input {
  width: 190px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-alt);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pair-box__form input::placeholder { color: var(--muted); letter-spacing: .08em; }
.pair-box__form input:focus { border-color: var(--blue-light); outline: none; }

/* ---- Matomo SSO bridge ---- */

/* A page nobody reads: it posts itself to Matomo and is replaced. Centred so the one line
   it does show does not sit alone in a corner while that happens. */
.mtm-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  color: var(--muted);
}
