:root {
  --bg: #eef1f6;
  --bg2: #e4e8f0;
  --panel: #ffffff;
  --panel2: #f6f8fb;
  --border: #dce1ea;
  --text: #1c2431;
  --dim: #5b6577;
  --accent: #2563eb;
  --sea: #0891b2;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 6px 20px rgba(30, 41, 59, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

/* ===== HERO ===== */
.hero { position: relative; text-align: center; margin-bottom: 26px; }
.lang-switcher {
  position: absolute; top: 0; right: 0;
  display: flex; gap: 4px;
}
.lang-btn {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--dim);
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.09);
  border-color: rgba(37, 99, 235, 0.2);
}
@media (max-width: 560px) {
  .lang-switcher { position: static; justify-content: center; margin-bottom: 10px; }
}
.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.09);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 5px 12px;
  border-radius: 999px;
}
.hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
}
.hero-sub { color: var(--dim); font-size: 14px; margin: 0; }

/* ===== MONITOR ===== */
.monitors { display: flex; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.monitor-card {
  flex: 1 1 220px;
  position: relative;
  border-radius: 18px;
  padding: 24px 20px 22px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.monitor-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2); }
.monitor-planes { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 60%, #60a5fa 100%); }
.monitor-ships { background: linear-gradient(135deg, #0e7490 0%, #06b6d4 60%, #22d3ee 100%); }
.monitor-card::after {
  content: ""; position: absolute; top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(20deg); animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { left: -60%; } 50% { left: 130%; } }
.monitor-icon { font-size: 30px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)); position: relative; z-index: 1; }
.monitor-number { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); position: relative; z-index: 1; }
.monitor-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.95; margin-top: 6px; position: relative; z-index: 1; }
.monitor-sub { font-size: 12px; opacity: 0.85; margin-top: 3px; min-height: 16px; position: relative; z-index: 1; }
.monitor-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 36px; opacity: 0.98; }

/* ===== STAZIONI ===== */
.stations { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stations .station-adsb { flex: 1 1 100%; }
.stations-row { display: flex; gap: 16px; flex-wrap: wrap; flex: 1 1 100%; }
.stations-row .station { flex: 1 1 300px; }
.stations-col { display: flex; flex-direction: column; gap: 16px; flex: 1 1 340px; }
.stations-col .station { flex: 0 0 auto; }
.station {
  flex: 1 1 340px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.station-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.station-title { font-size: 16px; font-weight: 700; }
.chip {
  font-size: 11px; font-weight: 600; color: var(--dim);
  background: var(--panel2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; margin-left: auto; background: var(--dim); box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2s infinite; }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 4px 10px; border-radius: 6px; border: 1px solid; }
.pill.ok { color: var(--ok); background: #ecfdf3; border-color: #6ce9a6; }
.pill.warn { color: var(--warn); background: #fffaeb; border-color: #fec84b; }
.pill.bad { color: var(--bad); background: #fef3f2; border-color: #fda29b; }

.feeds-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin: 16px 0 8px; }
.feeds-row { display: flex; flex-wrap: wrap; gap: 6px; }

.quote-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sea);
  text-align: left;
}
.quote-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sea); margin-bottom: 6px; }
.quote-text { font-size: 13px; font-style: italic; color: var(--text); line-height: 1.5; margin: 0 0 6px; }
.quote-author { font-size: 11px; color: var(--dim); }
.quote-box-adsb { border-left-color: var(--accent); }
.quote-box-adsb .quote-label { color: var(--accent); margin-bottom: 0; }

/* ===== STATION INFRASTRUCTURE ===== */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.infra-tile {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}
.infra-icon { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.infra-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 6px; }
.infra-detail { font-size: 12px; color: var(--dim); line-height: 1.6; }

/* ===== STATION ROADMAP ===== */
.roadmap-intro {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 22px;
}
.roadmap-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.roadmap-card {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: border-color 0.2s ease;
}
.roadmap-card.roadmap-done { border-color: var(--ok); }
.roadmap-photo {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
}
.roadmap-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); }
.roadmap-product { font-size: 16px; font-weight: 700; color: var(--text); margin: 4px 0 16px; }
.roadmap-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.roadmap-stat { display: flex; flex-direction: column; gap: 2px; }
.roadmap-stat .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.roadmap-stat .v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-track {
  width: 100%; height: 10px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 4px;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--sea));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-fill.progress-done { background: var(--ok); }
.progress-pct { font-size: 12px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.roadmap-installed { margin: 4px 0 14px; }
.roadmap-installed-date { font-size: 11px; color: var(--dim); margin-top: 6px; }
.roadmap-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.roadmap-actions .btn { width: 100%; }
.btn-paypal { background: #0070ba; box-shadow: 0 3px 10px rgba(0, 112, 186, 0.3); }
.btn-paypal:hover { box-shadow: 0 6px 16px rgba(0, 112, 186, 0.4); }
.btn-amazon { background: #ff9900; color: #14171a; box-shadow: 0 3px 10px rgba(255, 153, 0, 0.3); }
.btn-amazon:hover { box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4); }
.feed-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--panel2);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 11px; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.feed-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.1); }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.feed-chip.up .feed-dot { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.feed-chip.down { opacity: 0.6; }
.feed-chip.down .feed-dot { background: var(--bad); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.stat { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--panel2); font-size: 13px; }
.stat .k { color: var(--dim); }
.stat .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; flex-shrink: 0; margin-left: 8px; }
.stat .k { flex-shrink: 1; }
.wx-spark-cell { border-bottom: none; padding: 8px 2px; }
.wx-spark-cell svg { width: 100%; height: 100%; display: block; }
.stat .v.ok { color: var(--ok); }
.stat .v.warn { color: var(--warn); }
.stat .v.bad { color: var(--bad); }

.pg-fade { animation: pg-fade-in 0.2s ease; }
@keyframes pg-fade-in { from { opacity: 0.35; } to { opacity: 1; } }

/* ===== AZIONI ===== */
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.btn {
  display: inline-block; text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 9px 15px; border-radius: 9px;
  background: var(--accent); color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35); }
.btn-sea { background: var(--sea); box-shadow: 0 3px 10px rgba(8, 145, 178, 0.25); }
.btn-sea:hover { box-shadow: 0 6px 16px rgba(8, 145, 178, 0.35); }
.btn-whatsapp { background: #25d366; box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3); }
.btn-whatsapp:hover { box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4); }

/* ===== PANNELLI ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  text-align: center;
}
.panel-title { font-size: 15px; font-weight: 700; margin: 0 0 16px; letter-spacing: 0.01em; }
.net-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; flex-wrap: wrap; }
.feeder-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; margin-bottom: 16px; }
.feeder-logos img { max-height: 40px; opacity: 0.85; transition: opacity 0.15s ease, transform 0.15s ease; }
.feeder-logos a:hover img { opacity: 1; transform: translateY(-2px); }
.linkrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 12px; }
.linkrow a { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.linkrow a:hover { text-decoration: underline; }
.panel-note { color: var(--dim); font-size: 12px; margin: 8px 0 0; }
.wx-credit { font-size: 10.5px; opacity: 0.75; }
.wx-credit a { color: inherit; text-decoration: underline; }

/* ===== RETE ===== */
.net-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.net-tile {
  flex: 1 1 120px; border-radius: 12px; padding: 14px 12px;
  background: var(--panel2); border: 1px solid var(--border); text-align: center;
}
.net-ico { font-size: 20px; line-height: 1; }
.net-val { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.net-unit { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.net-dl .net-val { color: var(--accent); }
.net-ul .net-val { color: var(--sea); }
.net-pg .net-val { color: var(--ok); }
.net-meta { font-size: 12px; color: var(--dim); text-align: center; margin-bottom: 8px; }
#th-battery.ok { color: var(--ok); }
#th-battery.warn { color: var(--warn); }
#th-battery.bad { color: var(--bad); }

.chart-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--text); margin: 16px 0 6px;
}
.chart-head small { color: var(--dim); font-weight: 500; }
.chart-now { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.chart-wrap { position: relative; width: 100%; height: 90px; }
.chart-wrap.chart-sm { height: 60px; }
.chart-wrap svg { width: 100%; height: 100%; display: block; cursor: crosshair; }
.chart-tip {
  position: absolute; top: -4px; pointer-events: none; opacity: 0;
  background: var(--text); color: #fff; font-size: 11px; line-height: 1.3;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap; text-align: center;
  transition: opacity 0.1s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index: 2;
}

/* ===== GUESTBOOK ===== */
#guestbook {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; text-align: center;
}
.guestbook-form { max-width: 420px; margin: 0 auto 22px; display: flex; flex-direction: column; gap: 8px; }
.guestbook-form input[type="text"], .guestbook-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 13px; font-family: inherit; resize: vertical;
}
.guestbook-form input[type="text"]:focus, .guestbook-form textarea:focus { outline: none; border-color: var(--accent); }
.gb-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.gb-status { display: block; text-align: center; font-size: 12px; color: var(--dim); min-height: 16px; }
.guestbook-list { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.guestbook-entry { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; text-align: left; }
.guestbook-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.guestbook-entry-name { font-weight: 700; font-size: 13px; }
.guestbook-entry-ts { font-size: 11px; color: var(--dim); white-space: nowrap; }
.guestbook-entry-msg { font-size: 13px; color: var(--dim); line-height: 1.5; word-wrap: break-word; }
.guestbook-empty { text-align: center; color: var(--dim); font-size: 13px; padding: 12px; }

/* ===== DAILY HIGHLIGHTS ===== */
.highlights-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.highlights-grid { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.highlight-col {
  flex: 1 1 300px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; text-align: center;
}
.highlight-kicker {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); margin-bottom: 10px;
}
.highlight-col.highlight-ship .highlight-kicker { color: var(--sea); }
.highlight-photo {
  width: 100%; height: 140px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg2), var(--panel2));
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; margin-bottom: 12px; border: 1px solid var(--border);
}
.highlight-photo img { width: 100%; height: 100%; object-fit: cover; }
a.highlight-photo { cursor: pointer; text-decoration: none; transition: opacity 0.15s ease, transform 0.15s ease; }
a.highlight-photo:hover { opacity: 0.85; transform: translateY(-1px); }
.highlight-name { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.highlight-meta { font-size: 12px; color: var(--dim); margin-bottom: 10px; line-height: 1.5; }
.highlight-score {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: rgba(37, 99, 235, 0.09); border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent); font-weight: 800; font-size: 13px;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.highlight-col.highlight-ship .highlight-score { background: rgba(8, 145, 178, 0.09); border-color: rgba(8, 145, 178, 0.2); color: var(--sea); }
.highlight-score b { font-size: 16px; }
.highlight-reasons { list-style: none; margin: 0 0 10px; padding: 0; text-align: left; }
.highlight-reasons li {
  font-size: 12px; color: var(--text); padding: 3px 0 3px 20px; position: relative;
}
.highlight-reasons li::before { content: "✔"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.highlight-photo-credit { font-size: 10px; color: var(--dim); opacity: 0.8; margin-top: -6px; margin-bottom: 10px; }
.highlight-time { font-size: 11px; color: var(--dim); }
.highlight-empty { color: var(--dim); font-size: 13px; padding: 30px 10px; }
.highlights-archive-link { display: block; text-align: center; margin-top: 16px; font-size: 12px; }
.highlights-archive-link a { color: var(--accent); text-decoration: none; font-weight: 600; }
.highlights-archive-link a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.foot { text-align: center; color: var(--dim); font-size: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.foot a { color: var(--accent); text-decoration: none; }
.foot-sep { margin: 0 6px; opacity: 0.5; }

@media (max-width: 560px) {
  .hero-title { font-size: 24px; }
  .monitor-number { font-size: 44px; }
  .stat-grid { grid-template-columns: 1fr; }
}
