
:root {
  --bg-top: #00152f;
  --bg-bottom: #003064;
  --surface: rgba(255, 255, 255, .96);
  --surface-soft: #f5f7fa;
  --surface-accent: #eaf0f7;
  --text: #17253a;
  --muted: #627184;
  --line: #d4dce6;
  --primary: #003064;
  --primary-2: #3a78b8;
  --primary-3: #d4004b;
  --navy: #001e49;
  --accent: #d4004b;
  --success: #16825d;
  --warning: #c96d08;
  --danger: #d4004b;
  --rx: #d4004b;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 14px rgba(0, 30, 73, .10);
  --shadow: 0 14px 38px rgba(0, 30, 73, .18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at 8% 8%, rgba(58, 120, 184, .28), transparent 30rem),
    radial-gradient(circle at 92% 15%, rgba(212, 0, 75, .17), transparent 27rem),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 52%, #001e49);
  color-scheme: light;
}

body {
  width: min(100% - 28px, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 0;
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
}

/* Header and footer follow the native 602px width of img/logo.png. */
.site-header {
  position: relative;
  width: min(100%, 602px);
  overflow: hidden;
  margin: 0 auto 18px;
  padding: 0 0 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.17), transparent 26rem),
    linear-gradient(135deg, #001e49 0%, var(--primary) 58%, #184f87 100%);
  box-shadow: var(--shadow);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto -9% -95px 43%;
  height: 155px;
  border-radius: 50%;
  background: rgba(212, 0, 75, .22);
  pointer-events: none;
}

/* Logo: deliberately no frame, outline, card or shadow. */
.img-top {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 602px;
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 0 auto 16px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.site-header h2 {
  position: relative;
  z-index: 1;
  margin: 4px 14px 14px;
  color: #fff;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: .01em;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.site-main {
  min-height: 32vh;
}

/* Main data targets receive their own safe horizontal scroll area on narrow screens. */
#main,
#lnksys,
#moni,
#opb,
#statictg,
#tgcount,
#bridge,
#lsthrd_log {
  display: block;
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #6f93b9 transparent;
}

noscript {
  display: block;
  margin: 12px auto;
  padding: 10px 14px;
  border: 1px solid #f2bf75;
  border-radius: var(--radius-sm);
  background: #fff5df;
  color: #7c4b06;
  font-weight: 650;
}

a {
  color: var(--primary-2);
  text-decoration: none;
  font-weight: 650;
}

a:visited {
  color: #315f91;
}

a:hover {
  color: #003064;
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(212, 0, 75, .72);
  outline-offset: 3px;
}

/* Navigation buttons */
a.button,
.dropbtn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none !important;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a.button:hover,
.dropbtn:hover,
.dropdown:hover .dropbtn {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .23);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(1, 24, 39, .18);
}

.link {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

/* Dropdowns */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  z-index: 1000;
  min-width: 180px;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}

.dropdown-content a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
}

.dropdown-content a:hover {
  background: var(--surface-accent);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: block;
}

/* Fieldsets become responsive cards. */
fieldset {
  width: 100%;
  max-width: 100%;
  margin: 14px auto;
  padding: clamp(12px, 2vw, 20px);
  overflow-x: auto;
  border: 1px solid rgba(0, 48, 100, .16);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

fieldset.big { width: min(100%, 1240px); }
fieldset.med { width: min(100%, 980px); }
fieldset.small { width: min(100%, 760px); }

legend {
  max-width: calc(100% - 24px);
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  text-align: left;
  font-size: .92rem;
  box-shadow: 0 4px 12px rgba(0, 48, 100, .18);
}

/* Tables */
table {
  width: 100%;
  max-width: 100%;
  margin: 5px 0;
  border-spacing: 0;
  border-collapse: separate;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 30, 73, .07);
}

th,
td {
  padding: 8px 9px;
  border: 0;
  border-right: 1px solid #e2e8ef;
  border-bottom: 1px solid #e2e8ef;
  text-align: center;
  vertical-align: middle;
}

th:last-child,
td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }

th {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .015em;
}

tr:first-child th:first-child { border-top-left-radius: 11px; }
tr:first-child th:last-child { border-top-right-radius: 11px; }

tbody tr:nth-child(even) td,
.log tr:nth-child(even) td {
  background-color: #f5f7fa;
}

tbody tr:hover td,
.log tr:hover td {
  background-color: #e9f0f7;
}

/* Server Activity table */
table.active-qso {
  width: 100%;
  border: 0;
  border-spacing: 0 8px;
  border-collapse: separate;
  background: transparent;
  box-shadow: none;
}

.active-qso th {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 9pt;
  font-weight: 750;
}

.active-qso td {
  height: 45px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  font-size: 11.5pt;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 30, 73, .07);
}

/* Static TG table */
table.stctg,
table.lnksys,
table.opb,
table.log {
  width: 100%;
  margin: 5px 0;
  background-color: #fff;
}

table.stctg,
table.lnksys,
table.opb {
  table-layout: fixed;
}

.stctg .th1wd { width: 120px; }
.stctg .th2wd { width: 160px; }
.stctg .th3wd { width: 90px; }
.stctg .th4wd { width: 40px; }
.stctg .th5wd { width: 50%; }
.stctg .th6wd { width: 65px; }
.stctg .th7wd { width: 65px; }
.stctg .connted-bkgnd { background-color: #dff6ea !important; }
.stctg .location { color: #a5003b; font-size: 92%; font-weight: 700; }
.ts1-bkgnd { background-color: #edf2f7 !important; }

/* Master peer table */
.lnksys .th1wd { width: 120px; }
.lnksys .th2wd { width: 160px; }
.lnksys .th3wd { width: 90px; }
.lnksys .th4wd { width: 40px; }
.lnksys .th5wd { width: 50%; }
.lnksys .th6wd { width: 40%; }
.lnksys .connted-bkgnd { background-color: #dff6ea !important; }
.lnksys .location { color: #a5003b; font-size: 92%; font-weight: 700; }
.lnksys .peer-conn { background-color: #dff6ea !important; font-size: 9pt; }
.lnksys .peer-disc { background-color: #ffe2dd !important; color: #842d22; font-size: 9pt; }

/* Last heard table */
table.log {
  border-collapse: separate;
  text-align: center;
}
.log th { height: 34px; }

/* Connection summary */
.conn2srv {
  margin: 8px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #edf2f7);
  box-shadow: var(--shadow-sm);
  font-size: 10pt;
  font-weight: 650;
}

.conn2srv .tittle {
  float: left;
  margin: 0 0 4px;
  padding: 8px 10px 5px;
  color: var(--navy);
  font-weight: 760;
  line-height: 1.5;
}

.conn2srv .hs-peers {
  clear: left;
  margin: 8px 16px 12px;
  color: #31465f;
  font-size: 9.5pt;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

/* OpenBridge */
.opb .col1 { padding-left: 20px; text-align: left; }
.opb .col2 { font-size: 9pt; }
.opb .col3 { color: #3e5060; font-size: 9pt; font-weight: 650; }
.opb .th1wd { width: 12%; }
.opb .th2wd { width: 12%; }
.opb .th3wd { width: 70%; }

/* Waiting for server data */
.w4data {
  width: 100%;
  height: 64px;
  margin: 6px 0;
  border: 1px dashed #ebbc77;
  border-radius: 12px;
  background: #fff8e8;
  color: #8a5304;
  font: 650 13pt/1.4 ui-sans-serif, system-ui, sans-serif;
  text-align: center;
}

/* Log monitor */
#log {
  width: 100%;
  height: min(48em, 62vh);
  margin: 8px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #003064;
  border-radius: 12px;
  background: #00152f;
  color: #dbe8f4;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  text-align: left;
  box-shadow: inset 0 0 32px rgba(0, 0, 0, .25);
}

/* System info page */
.images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  align-items: start;
}

.images img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted currentColor;
  opacity: 1;
}

.tooltip .tooltiptext {
  visibility: hidden;
  position: absolute;
  z-index: 20;
  left: 100%;
  width: 280px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #001e49;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity .15s ease;
}

.tooltip:hover .tooltiptext,
.tooltip:focus-within .tooltiptext {
  visibility: visible;
  opacity: 1;
}

div.tooltiptext.c2s-pos1 {
  top: -10px;
  left: 115%;
  padding-left: 15px;
  font-size: 9.5pt;
}

span.tooltiptext.c2s-pos2 {
  top: 120%;
  left: 50%;
  width: 100px;
  margin-left: -70%;
  padding: 2px 0;
  font-size: 9.5pt;
  text-align: center;
}


/* Connected-user hover details are mirrored to the document body by hbmon.js.
   This lets the overlay escape every table/scroll container with overflow clipping. */
.tooltip-body-overlay {
  visibility: visible !important;
  position: fixed !important;
  z-index: 100000 !important;
  display: block !important;
  width: min(280px, calc(100vw - 24px)) !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #001e49 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
  color: #fff !important;
  text-align: left !important;
  opacity: 1 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* Existing state helpers, refreshed to fit the palette. */
.bkgnd-1d1 { background: #22c55e !important; }
.bkgnd-8ecfb4 { background-color: #bdebd8 !important; }
.bkgnd-cefdce { background-color: #dff6ea !important; }
.bkgnd-ff0000 { background-color: #dc2626 !important; }

.txt-yellow { color: #a66500; }
.txt-b70101 { color: #b42323; }
.txt-green { color: #15803d; }
.txt-red { color: #c83232; }
.txt-white { color: #fff; }
.txt-blue { color: #3a78b8; }
.txt-008000 { color: #15803d; }
.txt-0065ff { color: #3a78b8; }
.txt-b5651d { color: #a75b19; }
.txt-464646 { color: #465766; }
.txt-002d62 { color: #003064; }
.txt-3a4aa6 { color: #315f91; }

.TX {
  background-color: #bdeecf !important;
  color: #123c27 !important;
}

.RX {
  background-color: var(--rx) !important;
  color: #fff !important;
}

.fnt-7pt { font-size: 7pt; }
.fnt-8pt { font-size: 8pt; }

.srv-tittle {
  padding: 8px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

footer {
  width: min(100%, 602px);
  margin: 24px auto 0;
  padding: 18px clamp(12px, 2vw, 24px);
  border-top: 4px solid var(--primary-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, #001e49, #003064);
  color: #e7edf5;
  box-shadow: 0 -6px 20px rgba(0, 30, 73, .14);
  font-size: .82rem;
}

footer p {
  margin: 0;
}

footer a,
footer a:visited {
  color: #dce8f5;
}

footer a:hover {
  color: #fff;
}

@media (max-width: 900px) {
  body {
    width: min(100% - 18px, 1440px);
    padding-top: 9px;
  }

  .site-header {
    margin-bottom: 12px;
    border-radius: 16px;
  }

  .site-main {
    min-height: 22vh;
  }

  /* Fixed-width monitor tables scroll instead of breaking the viewport. */
  table.stctg,
  table.opb,
  table.log,
  table.active-qso,
  fieldset table {
    min-width: 680px;
  }

  .tooltip .tooltiptext {
    left: auto;
    right: 0;
    width: min(280px, 75vw);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 0 12px;
  }

  .img-top {
    margin-bottom: 11px;
  }

  .site-header h2 {
    margin-bottom: 11px;
    font-size: 1.18rem;
  }

  .site-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  a.button,
  .dropbtn,
  .dropdown {
    width: 100%;
  }

  a.button,
  .dropbtn {
    min-height: 44px;
  }

  fieldset {
    padding: 10px;
    border-radius: 14px;
  }

  legend {
    margin-left: 3px;
    white-space: normal;
  }

  #log {
    height: 52vh;
    padding: 10px;
    font-size: 11px;
  }

  footer {
    margin-top: 16px;
    border-radius: 16px 16px 0 0;
  }
}

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

/* Modernised linked-systems table */
#lnksys {
  width: min(100%, 1180px);
  margin: 0 auto 18px;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 15px;
  background: transparent;
  scrollbar-gutter: stable;
}

#lnksys table.lnksys,
#lnksys .lnksys {
  width: 100%;
  min-width: 760px;
  margin: 0;
  table-layout: auto;
  border: 1px solid #ccd8e5;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 8px 22px rgba(0, 30, 73, .10);
  font-size: .82rem;
}

#lnksys .lnksys th {
  height: auto;
  padding: 7px 8px;
  border-right-color: rgba(255,255,255,.16);
  background: linear-gradient(135deg, #003064, #3a78b8);
  color: #fff;
  font-size: .75rem;
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: .015em;
  white-space: normal;
}

/* Different blue nuances make HB protocol, master system, target etc. easier to scan. */
#lnksys .lnksys th:nth-child(1) { background: linear-gradient(135deg, #001e49, #003064); }
#lnksys .lnksys th:nth-child(2) { background: linear-gradient(135deg, #003064, #184f87); }
#lnksys .lnksys th:nth-child(3) { background: linear-gradient(135deg, #184f87, #3a78b8); }
#lnksys .lnksys th:nth-child(4) { background: linear-gradient(135deg, #003064, #3a78b8); }
#lnksys .lnksys th:nth-child(5) { background: linear-gradient(135deg, #001e49, #315f91); }
#lnksys .lnksys th:nth-child(6) { background: linear-gradient(135deg, #003064, #184f87); }

#lnksys .lnksys td {
  padding: 6px 8px;
  border-right-color: #e1e7ee;
  border-bottom-color: #e1e7ee;
  background: #fff;
  color: #26384e;
  font-size: .8rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#lnksys .lnksys tbody tr:nth-child(even) td { background: #f5f7fa; }
#lnksys .lnksys tbody tr:hover td { background: #eaf0f7; }

#lnksys .lnksys td:nth-child(1) { background-image: linear-gradient(90deg, rgba(0,48,100,.06), transparent 38%); }
#lnksys .lnksys td:nth-child(2) { color: #003d75; font-weight: 720; }
#lnksys .lnksys td:nth-child(3) { color: #315f91; font-weight: 680; }
#lnksys .lnksys td:nth-child(5),
#lnksys .lnksys td:nth-child(6) { color: #3b4d63; }

#lnksys .lnksys .connted-bkgnd,
#lnksys .lnksys .peer-conn {
  background: linear-gradient(90deg, #dff6ea, #effaf5) !important;
  color: #166044 !important;
  font-weight: 720;
}

#lnksys .lnksys .peer-disc {
  background: linear-gradient(90deg, #ffe6e1, #fff4f2) !important;
  color: #8a3428 !important;
  font-weight: 720;
}

#lnksys .lnksys .location {
  color: #a5003b;
  font-size: .76rem;
  font-weight: 720;
}

#lnksys .lnksys .th1wd { width: 11%; min-width: 86px; }
#lnksys .lnksys .th2wd { width: 15%; min-width: 112px; }
#lnksys .lnksys .th3wd { width: 10%; min-width: 78px; }
#lnksys .lnksys .th4wd { width: 7%; min-width: 58px; }
#lnksys .lnksys .th5wd { width: 28%; min-width: 180px; }
#lnksys .lnksys .th6wd { width: 29%; min-width: 180px; }

/* Compact footer with accessible hover/focus credits. */
footer {
  padding-top: 13px;
  padding-bottom: 13px;
}

.footer-copy {
  display: flex;
  justify-content: center;
  margin: 0;
}

.footer-hover {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #f4f7fb;
  font-size: .88rem;
  font-weight: 740;
  cursor: help;
  outline: none;
  transition: background-color .18s ease, border-color .18s ease;
}

.footer-hover:hover,
.footer-hover:focus-visible {
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255,255,255,.14);
}

.footer-hovertext {
  visibility: hidden;
  position: absolute;
  z-index: 10000;
  left: 50%;
  bottom: calc(100% + 11px);
  width: min(390px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px;
  background: #001e49;
  color: #f6f8fb;
  box-shadow: 0 14px 32px rgba(0,0,0,.26);
  font-size: .82rem;
  font-weight: 560;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  pointer-events: auto;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.footer-hover:hover .footer-hovertext,
.footer-hover:focus .footer-hovertext,
.footer-hover:focus-within .footer-hovertext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer-hovertext a,
.footer-hovertext a:visited {
  color: #dce8f5;
  font-weight: 760;
}


@media (max-width: 900px) {
  #lnksys table.lnksys,
  #lnksys .lnksys {
    min-width: 680px;
    font-size: .79rem;
  }

  #lnksys .lnksys th { padding: 6px 7px; font-size: .71rem; }
  #lnksys .lnksys td { padding: 5px 7px; font-size: .76rem; }
}

@media (max-width: 620px) {
  #lnksys {
    margin-bottom: 12px;
    border: 1px solid rgba(0,48,100,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.58);
  }

  #lnksys table.lnksys,
  #lnksys .lnksys {
    min-width: 610px;
    border: 0;
    border-radius: 11px;
    box-shadow: none;
  }

  #lnksys .lnksys th { padding: 6px; font-size: .68rem; }
  #lnksys .lnksys td { padding: 5px 6px; font-size: .72rem; }

  .footer-hover { width: 100%; }
  .footer-hovertext { width: min(350px, calc(100vw - 20px)); }
}


/* Start page: compact, colour-coded activity/history table (Datum / TG / System ...). */
#main .start-table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 8px auto 16px;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(0, 48, 100, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 22px rgba(0, 30, 73, .09);
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
}

#main table.start-activity-table {
  width: 100%;
  min-width: 700px;
  margin: 0;
  border: 0;
  border-radius: 13px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: #fff;
  box-shadow: none;
  font-size: .81rem;
}

#main .start-activity-table th {
  height: auto;
  padding: 7px 8px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.15);
  border-radius: 0;
  color: #fff;
  font-size: .73rem;
  font-weight: 790;
  line-height: 1.15;
  letter-spacing: .012em;
  white-space: nowrap;
}

#main .start-activity-table th:nth-child(1) { background: linear-gradient(135deg, #001e49, #003064); }
#main .start-activity-table th:nth-child(2) { background: linear-gradient(135deg, #003064, #184f87); }
#main .start-activity-table th:nth-child(3) { background: linear-gradient(135deg, #184f87, #3a78b8); }
#main .start-activity-table th:nth-child(4) { background: linear-gradient(135deg, #003064, #3a78b8); }
#main .start-activity-table th:nth-child(5) { background: linear-gradient(135deg, #001e49, #315f91); }
#main .start-activity-table th:nth-child(n+6) { background: linear-gradient(135deg, #003064, #184f87); }

#main .start-activity-table th:first-child { border-top-left-radius: 13px; }
#main .start-activity-table th:last-child {
  border-right: 0;
  border-top-right-radius: 13px;
}

#main .start-activity-table td {
  height: auto;
  padding: 5px 8px;
  border: 0;
  border-right: 1px solid #e2e8ef;
  border-bottom: 1px solid #e2e8ef;
  border-radius: 0;
  background: #fff;
  color: #26394e;
  font-size: .79rem;
  font-weight: 590;
  line-height: 1.25;
  box-shadow: none;
  vertical-align: middle;
}

#main .start-activity-table td:last-child { border-right: 0; }
#main .start-activity-table tr:last-child td { border-bottom: 0; }
#main .start-activity-table tbody tr:nth-child(even) td { background: #f5f7fa; }
#main .start-activity-table tbody tr:hover td { background: #eaf0f7; }

/* Subtle column cues improve scanning without overpowering existing TX/RX status colours. */
#main .start-activity-table td:nth-child(1) {
  color: #445b72;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#main .start-activity-table td:nth-child(2) {
  color: #003064;
  font-weight: 760;
  white-space: nowrap;
}
#main .start-activity-table td:nth-child(3) {
  color: #315f91;
  font-weight: 680;
}
#main .start-activity-table td:nth-child(4) { color: #3b526a; }

#main .start-activity-table .TX,
#main .start-activity-table .RX {
  font-weight: 760;
}

@media (max-width: 900px) {
  #main .start-table-scroll {
    border-radius: 12px;
  }

  #main table.start-activity-table {
    min-width: 640px;
    font-size: .77rem;
  }

  #main .start-activity-table th {
    padding: 6px 7px;
    font-size: .69rem;
  }

  #main .start-activity-table td {
    padding: 5px 7px;
    font-size: .75rem;
  }
}

@media (max-width: 620px) {
  #main .start-table-scroll {
    margin: 6px auto 12px;
    border-radius: 11px;
    background: rgba(255,255,255,.7);
  }

  #main table.start-activity-table {
    min-width: 570px;
    border-radius: 10px;
  }

  #main .start-activity-table th {
    padding: 5px 6px;
    font-size: .66rem;
  }

  #main .start-activity-table td {
    padding: 4px 6px;
    font-size: .71rem;
  }
}

/* Desktop sticky footer: stays at the viewport bottom on short pages,
   while following the document flow normally on pages with more content. */
@media (min-width: 901px) {
  html {
    overflow-y: scroll;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .site-header {
    flex: 0 0 auto;
  }

  .site-main {
    flex: 1 0 auto;
    width: 100%;
  }

  footer {
    flex: 0 0 auto;
    margin-top: auto;
  }
}

/* Schleswig-Holstein colour accents */
.site-header {
  border-bottom: 4px solid var(--primary-3);
}

fieldset {
  border-top-color: rgba(212, 0, 75, .28);
}

legend {
  background: linear-gradient(135deg, var(--primary), #184f87);
  box-shadow: 0 4px 12px rgba(0, 48, 100, .20);
}

table th {
  border-bottom: 3px solid rgba(212, 0, 75, .78);
}

#lnksys .lnksys,
#main .start-activity-table {
  border-top: 3px solid var(--primary-3);
}

#lnksys .lnksys th,
#main .start-activity-table th {
  border-bottom-color: rgba(212, 0, 75, .75);
}

footer {
  border-top-color: var(--primary-3);
}
