/* N4USS site styles: same look as n4uss.com/vfnstart.php
   (dark navy panels, amber "signal" accent, Barlow fonts). */
@import url("header.css");   /* the shared site header (also loads the Barlow fonts) */

:root {
  --bg:        #0c1822;
  --panel:     #132432;
  --panel-alt: #172b3b;
  --line:      #264257;
  --text:      #e8eef3;
  --muted:     #8da3b3;
  --signal:    #ffb938;
  --head-font: "Barlow Semi Condensed", "Barlow", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--signal); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--head-font); letter-spacing: .01em; }

/* Page body */
main { max-width: 1100px; margin: 0 auto; padding: 40px 16px 48px; }
main.narrow { max-width: 440px; }
main h1 { margin: 0 0 20px; font: 700 clamp(1.9rem, 4.5vw, 2.8rem)/1.1 var(--head-font); }
main p { max-width: 70ch; }
.muted { color: var(--muted); }
.error { background: #3a1c1c; color: #ffc9c2; border: 1px solid #6b2e2a;
  padding: 10px 12px; border-radius: 8px; }

/* Fact strip, as on the VFN home */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px;
  margin: 0 0 24px; background: var(--line); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; }
.facts div { padding: 14px 18px; background: var(--panel); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font: 600 1.2rem/1.3 var(--head-font); }

/* Forms and buttons */
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
input, select { font: inherit; padding: 10px 12px; min-height: 44px; color: var(--text);
  background: var(--panel-alt); border: 1px solid var(--line); border-radius: 8px; }
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 0 18px; border: 0;
  border-radius: 8px; background: var(--signal); color: #1a1200; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--panel-alt); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }

/* Widgets */
.grid-stack-item-content.widget { background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
.widget-head { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--panel-alt); border-bottom: 1px solid var(--line);
  cursor: move; }
.widget-head h2 { margin: 0; font: 600 1.05rem/1.2 var(--head-font); }
.widget-remove { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer;
  min-width: 44px; min-height: 36px; color: var(--muted); }
.widget-remove:hover { color: var(--text); }
.widget-body { padding: 12px; overflow: auto; flex: 1; }
.grid-stack-placeholder > .placeholder-content { background: rgba(255, 185, 56, .08) !important;
  border: 1px dashed var(--signal) !important; border-radius: 10px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 185, 56, .15); color: var(--signal); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv .num { font: 700 1.8rem/1.1 var(--head-font); color: var(--signal); }
.kv .lbl { font-size: .8rem; color: var(--muted); }
table.bands { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
table.bands th { color: var(--muted); font-weight: 500; }
table.bands th, table.bands td { text-align: left; padding: 4px 0; border-top: 1px solid var(--line); }
.solar-headline { margin: 6px 0 10px; font: 600 1.15rem/1.25 var(--head-font); color: var(--text); }
.solar-summary { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }
.solar-watch { margin: 8px 0 0; padding: 6px 10px; border-radius: 6px; background: rgba(255, 185, 56, .1);
  color: var(--signal); font-size: .88rem; }
.home-updated { margin: 6px 0 0; font-size: .8rem; }
.otd-item { padding: 6px 0; border-top: 1px solid var(--line); }
.otd-cat { font-size: .8rem; font-weight: 600; color: var(--signal); }
.otd-title { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.otd-title a { color: var(--text); }
.otd-title a:hover { color: var(--signal); }
.otd-year { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.otd-text { margin-top: 2px; color: var(--muted); font-size: .9rem; }

/* Links widget */
.links-top { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.links-list { list-style: none; margin: 0; padding: 0; }
.links-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-top: 1px solid var(--line); }
.links-list li.editing { align-items: center; }
.links-list li:has(> .links-form) { display: block; }
.links-title { font-weight: 500; overflow-wrap: anywhere; }
.links-host { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.links-text { display: flex; flex-direction: column; min-width: 0; }
.links-btns { display: flex; gap: 2px; flex: none; }
.links-btns .w-btn[disabled] { opacity: .3; cursor: default; background: transparent; }
.links-rm.armed { width: auto; padding: 0 8px; background: #7a2d2d; color: var(--text); }
.links-msg { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; background: #3a1c1c; color: #ffc9c2; font-size: .9rem; }
.links-add { margin: 14px 0 6px; font-size: 1rem; }
.links-form { display: flex; flex-direction: column; gap: 6px; }
.links-form input { min-height: 36px; padding: 6px 10px; }
.links-actions { display: flex; gap: 6px; }

/* Apps widget */
.apps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app-card { padding: 10px 12px; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 8px; }
.app-card.soon { opacity: .7; }
.app-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.app-name { font: 600 1.05rem/1.2 var(--head-font); color: var(--text); }
a.app-name { color: var(--signal); }
.app-text { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.app-tag { flex: none; font-size: .72rem; font-weight: 600; letter-spacing: .03em; padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); }
.app-tag.tag-live { color: #7fd99a; border-color: #2f6b45; }
.app-tag.tag-pilot { color: var(--signal); border-color: #7a5a1c; }
.app-tag.tag-private { color: #9fb4ff; border-color: #3a4a80; }
.soon .app-tag { color: var(--muted); border-color: var(--line); }

/* ShackRemote widget (station sign, from the VFN canvas's station.html) */
.sr-body { display: flex; flex-direction: column; }
.sr-wrap { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sr-display { position: relative; flex: 1; min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 14px 12px; overflow: hidden;
  background: radial-gradient(ellipse at center, #1a0d0f 0%, #0c0e10 70%); border: 1px solid var(--line); border-radius: 10px; }
.sr-call { font: 600 13px/1 ui-monospace, Consolas, monospace; letter-spacing: .14em; color: var(--muted); }
.sr-sign { display: flex; align-items: center; gap: 12px; padding: 8px 20px; max-width: 100%;
  border: 2px solid #6b2a2e; border-radius: 10px; background: #160a0b; box-shadow: inset 0 0 18px rgba(229,72,77,.12); }
.sr-lamp { flex: none; width: 13px; height: 13px; border-radius: 50%; background: #5a2023; border: 1px solid #7a3236;
  animation: sr-lamp 2.4s ease-in-out infinite; }
@keyframes sr-lamp { 0%, 100% { background: #5a2023; box-shadow: none; } 50% { background: #e5484d; box-shadow: 0 0 12px #e5484d; } }
.sr-words { font: 700 clamp(20px, 4vw, 34px)/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .1em;
  color: #ff6b70; text-shadow: 0 0 14px rgba(229,72,77,.45); white-space: nowrap; }
.sr-why { font-size: 13px; color: var(--muted); text-align: center; }
.sr-display.checking { background: radial-gradient(ellipse at center, #1a150b 0%, #0c0e10 70%); }
.checking .sr-sign { border-color: #6b5222; background: #16120a; box-shadow: inset 0 0 18px rgba(255,180,59,.10); }
.checking .sr-lamp { animation: sr-lamp-a 1.2s ease-in-out infinite; border-color: #7a6232; }
@keyframes sr-lamp-a { 0%, 100% { background: #4d3d1d; box-shadow: none; } 50% { background: var(--signal); box-shadow: 0 0 12px var(--signal); } }
.checking .sr-words { color: var(--signal); text-shadow: 0 0 14px rgba(255,180,59,.40); }
.sr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sr-actions[hidden], .sr-bar[hidden], .sr-control[hidden] { display: none; }
.sr-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.sr-control { margin-left: auto; }
.w-body .widget-body.sr-on { padding: 0; }
.sr-on .sr-wrap { gap: 0; }
.sr-on .sr-bar { margin: 0; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--panel-alt); }
.sr-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--bg); }
.sr-next { font-size: 12px; }
/* Down for maintenance (Admin switch): amber like "checking", steady lamp */
.sr-display.maint { background: radial-gradient(ellipse at center, #1a150b 0%, #0c0e10 70%); }
.maint .sr-sign { border-color: #6b5222; background: #16120a; box-shadow: inset 0 0 18px rgba(255,180,59,.10); }
.maint .sr-lamp { animation: none; background: var(--signal); border-color: #7a6232; box-shadow: 0 0 10px var(--signal); }
.maint .sr-words { color: var(--signal); text-shadow: 0 0 14px rgba(255,180,59,.40); }
.sr-maint-note { font-size: 12px; color: var(--signal); }
@media (prefers-reduced-motion: reduce) { .sr-lamp { animation: none !important; } }

/* Admin page and maintenance page */
main.admin { max-width: 820px; }
.admin-h2 { margin: 8px 0 4px; font-size: 1.3rem; }
.admin-ok { padding: 10px 12px; border-radius: 8px; background: #123a26; border: 1px solid #2f6b45; color: #b6f0c8; }
.admin-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.admin-app { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.admin-app.is-on { border-color: #7a5a1c; box-shadow: inset 4px 0 0 var(--signal); }
.admin-app-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.admin-app h3 { margin: 0; font-size: 1.15rem; }
.admin-app h3 a { color: var(--text); }
.admin-state { font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 10px; border: 1px solid #2f6b45; color: #7fd99a; }
.is-on .admin-state { border-color: #7a5a1c; color: var(--signal); }
.admin-meta { margin: 2px 0 10px; font-size: .88rem; }
.admin-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.admin-form label { flex: 1 1 320px; font-weight: 500; font-size: .9rem; }
.maint-page { padding-top: 64px; }
.maint-tag { margin: 0 0 6px; color: var(--signal); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.app-tag.tag-maint { color: var(--signal); border-color: #7a5a1c; background: rgba(255, 185, 56, .1); }

/* Landing page */
main.home { padding-top: 32px; }
.home-hero { margin-bottom: 28px; }
.home-date { margin: 0 0 8px; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.home-hero h1 { max-width: 760px; }
.home-intro { margin: 0 0 8px; font-size: 1.1rem; color: var(--muted); }
.home-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.home-solar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 32px; align-items: start; }
.home-solar-bands table.bands { margin-top: 0; }
@media (max-width: 760px) { .home-solar { grid-template-columns: minmax(0, 1fr); } }
.home-live { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; }
.home-live-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.home-live-head h2 { margin: 0; font: 600 1.25rem/1.2 var(--head-font); }
.home-src { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.home-live .badge { align-self: flex-start; }
.home-embed { width: 100%; min-height: 260px; flex: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.home-more { margin-top: auto; padding: 8px 0 0; }
.home-section { margin-top: 44px; }
.home-section h2 { margin: 0 0 16px; font: 700 1.6rem/1.2 var(--head-font); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.home-card { display: flex; flex-direction: column; gap: 6px; min-height: 110px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
a.home-card:hover { border-color: var(--signal); }
.home-card.soon { opacity: .7; }
.home-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.home-card-name { font: 600 1.1rem/1.2 var(--head-font); }
a.home-card .home-card-name { color: var(--signal); }
.home-card-text { color: var(--muted); font-size: .92rem; }
.home-foot { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; }
.home-foot strong { color: var(--text); }

/* Landing page: Today row extras, About */
.home-today .home-live.wide { grid-column: 1 / -1; }
.home-otd { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; align-items: baseline; }
.home-otd-year { font: 700 1.5rem/1 var(--head-font); color: var(--signal); font-variant-numeric: tabular-nums; }
.home-otd-text { margin: 0; }
.home-otd-text a { white-space: nowrap; font-size: .9rem; }
.home-nets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.home-net { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.home-net:last-child { border-bottom: 0; padding-bottom: 0; }
.home-net-name { font: 600 1.05rem/1.2 var(--head-font); }
.home-net-where { color: var(--muted); font-size: .85rem; }
.home-net-when { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.home-net-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.home-net-when.soon { color: var(--signal); }
.home-net-when.soon .home-net-dot { background: var(--signal); }
.home-net-when.live { color: #7fd99a; font-weight: 600; }
.home-net-when.live .home-net-dot { background: #7fd99a; box-shadow: 0 0 0 3px rgba(127, 217, 154, .25); }
.home-net-watch { font-size: .9rem; }
.home-dash { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px 32px; align-items: start;
  margin-bottom: 28px; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--signal); border-radius: 10px; }
@media (max-width: 760px) { .home-dash { grid-template-columns: minmax(0, 1fr); } }
.home-dash-text h2 { margin: 0 0 8px; font: 700 1.4rem/1.2 var(--head-font); }
.home-dash-text p { margin: 0 0 12px; }
.home-dash-btn { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--signal); color: var(--bg);
  font: 600 1rem/1.2 var(--head-font); text-decoration: none; }
.home-dash-btn:hover { filter: brightness(1.1); }
.home-dash-peek { margin-left: 12px; font-size: .92rem; }
.home-dash-note { color: var(--muted); font-size: .82rem; }
.home-dash-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; }
.home-dash-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line); }
.home-dash-list strong { font: 600 1rem/1.2 var(--head-font); color: var(--text); }
.home-dash-list span { color: var(--muted); font-size: .88rem; }
.home-about p { max-width: 760px; margin: 0 0 12px; font-size: 1.05rem; }

@media (max-width: 640px) {
  main { padding-top: 24px; }
}

/* Weather widget (widgets/weather) */
.wx-body { display: flex; flex-direction: column; gap: 10px; }
.wx-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.wx-where { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wx-where strong { font: 600 1.1rem/1.2 var(--head-font); }
.wx-where .muted { font-size: .8rem; }
.wx-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wx-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wx-alert { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid; }
.wx-alert-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wx-alert-text span { font-size: .82rem; opacity: .9; }
.wx-alert-red { background: #5c1418; border-color: #e5484d; color: #ffe1e1; }
.wx-alert-red strong { color: #ff8a8d; }
.wx-alert-red .tb { border-color: #e5484d; color: #ffe1e1; }
.wx-alert-amber { background: rgba(255, 185, 56, .10); border-color: #7a5a1c; }
.wx-alert-amber strong { color: var(--signal); }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 4px; }
.wx-day img { border-radius: 8px; }
.wx-dname { font: 600 1rem/1.2 var(--head-font); }
.wx-dtext { font-size: .8rem; color: var(--muted); line-height: 1.25; }
.wx-chart { align-self: stretch; width: 100%; max-width: 400px; margin: 0 auto; height: auto; display: block; flex: none; }
.wx-chart text { font: 600 13px/1 system-ui, sans-serif; fill: var(--text); }
.wx-chart .wx-row { font-size: 9px; letter-spacing: .08em; fill: var(--muted); }
.wx-chart .wx-val { text-anchor: middle; font-size: 12px; }
.wx-sep { stroke: var(--line); }
.wx-trange { fill: #ff9f43; opacity: .85; }
.wx-hi { fill: #ffb27a !important; }
.wx-lo { fill: #7cc4ff !important; }
.wx-track { fill: var(--panel-alt); stroke: var(--line); }
.wx-pop { fill: #3fa7ff; }
.wx-wind { fill: #6fd3a8; }
.wx-gust { fill: var(--text); }
.wx-arrow { fill: #6fd3a8; }
.wx-small { font-size: .78rem; margin: 0; }
.wx-zip p { margin: 0 0 8px; }
.wx-zip-row { display: flex; gap: 8px; }
.wx-zip-row input { width: 8em; }
.wx-zip-err { color: #ff8a8d; min-height: 1.2em; }
/* popup */
.wx-dialog { width: min(760px, 94vw); max-height: 92vh; padding: 0; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; }
.wx-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.wx-dialog.wx-red { border-color: #e5484d; }
.wx-dialog.wx-red .wx-dlg-head { background: #5c1418; }
.wx-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--panel-alt); border-bottom: 1px solid var(--line); }
.wx-dlg-head h2 { margin: 0; font: 600 1.2rem/1.2 var(--head-font); }
.wx-dlg-body { padding: 14px; overflow: auto; max-height: calc(92vh - 60px); }
.wx-al-headline { margin: 0 0 12px; font-weight: 600; }
.wx-al-h { margin: 12px 0 6px; font: 600 1rem/1.2 var(--head-font); }
.wx-al-text { margin: 0; white-space: pre-wrap; font: .9rem/1.5 ui-monospace, Consolas, monospace; color: var(--text); }
.wx-map-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.wx-map-view { margin: 0; }
.wx-map-view img { display: block; width: 100%; height: auto; min-height: 200px; background: #000; border-radius: 8px; }
.wx-map-view img.loading { opacity: .4; }
.wx-map-view figcaption { margin-top: 6px; font-size: .82rem; }
