/* ============================================================
   Node1 Security — cyber threat dashboard concept sketch
   Brand: cyan #39C2D7 → indigo #314EA2, low-poly node motif
   Type:  Chakra Petch (display) / IBM Plex Sans / IBM Plex Mono
   ============================================================ */

:root {
  --cyan: #39c2d7;
  --indigo: #314ea2;
  --grad: linear-gradient(120deg, var(--cyan), var(--indigo));

  /* light (public) surfaces */
  --paper: #f5f8fc;
  --card: #ffffff;
  --line: #dce5f0;
  --ink: #101c33;
  --slate: #52627e;

  /* severity / weather */
  --storm: #d64560;
  --front: #dd9531;
  --clear: #2fae84;

  --display: "Chakra Petch", sans-serif;
  --body: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;

  --r: 10px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- eyebrow: access-level :: component ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.eyebrow b {
  font-weight: 600;
  color: var(--indigo);
}
.eyebrow .sep { color: var(--cyan); font-weight: 700; padding: 0 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 248, 252, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-img { height: 34px !important; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.02em; white-space: nowrap;
}
.brand-name .colons { color: var(--cyan); }
.brand-name small {
  display: block; font-family: var(--mono); font-weight: 400;
  font-size: 9px; letter-spacing: 0.42em; color: var(--slate);
  text-transform: uppercase;
}

.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a {
  text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--slate); padding: 8px 12px; border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: #eaf0f8; }
.site-nav a.active { color: var(--indigo); background: #e6edf9; }
.site-nav a.locked::after {
  content: "🔒"; font-size: 11px; margin-left: 5px; filter: grayscale(1) opacity(0.7);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 14px;
  letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: 8px; border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.btn-primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 6px 18px rgba(49, 78, 162, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(49, 78, 162, 0.34); }
.btn-ghost {
  color: var(--indigo); background: #fff; border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--indigo); }

/* ---------- hero (landing) ---------- */
.hero { padding: 72px 0 40px; }
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5.4vw, 54px); line-height: 1.08;
  letter-spacing: -0.01em; margin: 14px 0 18px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { max-width: 560px; color: var(--slate); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- app map: the three components, wired together ---------- */
.appmap { padding: 40px 0 72px; }
.appmap-board {
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  padding: 34px clamp(18px, 4vw, 44px) 26px;
  box-shadow: 0 14px 40px rgba(16, 28, 51, 0.06);
}
.appmap-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch; gap: 0;
}
.map-node {
  border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 18px 18px 16px; background: #fbfdff;
  text-decoration: none; display: block; position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.map-node:hover { border-color: var(--cyan); transform: translateY(-2px); }
.map-node h3 { font-family: var(--display); font-size: 16px; margin: 8px 0 6px; }
.map-node p { font-size: 13.5px; color: var(--slate); line-height: 1.5; }
.map-node .access {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 99px;
}
.access.public { background: #e4f6ef; color: #1c7d5c; }
.access.secure { background: #101c33; color: #9fd8e4; }
.map-node.secure { background: linear-gradient(180deg, #101c33, #182a52); border-color: #2a3d68; }
.map-node.secure h3, .map-node.secure p { color: #e8eefb; }
.map-node.secure p { color: #a9b8d6; }

.map-link {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 20px;
  color: var(--cyan); padding: 0 10px; user-select: none;
}

.map-rail { margin-top: 26px; text-align: center; position: relative; }
.map-rail::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: -14px;
  border-top: 2px dashed #bfd6e6;
}
.map-rail-bar {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  color: #eaf6fa; background: var(--grad);
  border-radius: 99px; padding: 10px 22px;
}
.map-rail-bar .dot {
  width: 8px; height: 8px; border-radius: 99px; background: #d9f6ff;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.map-rail small { display: block; margin-top: 10px; font-size: 12.5px; color: var(--slate); }

/* ---------- spirit: what Node1 is ---------- */
.spirit { padding: 40px 0 72px; }
.spirit-board {
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  padding: 44px clamp(22px, 5vw, 56px) 40px;
  box-shadow: 0 14px 40px rgba(16, 28, 51, 0.06);
}
.spirit-quote {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(24px, 3.8vw, 38px); line-height: 1.2;
  letter-spacing: -0.005em; max-width: 720px; margin: 16px 0 22px;
}
.spirit-quote .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.spirit-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  max-width: 900px; margin-bottom: 34px;
}
.spirit-body p { color: #3c4a63; font-size: 15.5px; }
.spirit-principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  border-top: 1px dashed #bfd6e6; padding-top: 28px;
}
.principle h3 {
  font-family: var(--display); font-size: 16px; margin-bottom: 6px;
}
.principle h3 .sep { color: var(--cyan); font-family: var(--mono); font-weight: 700; }
.principle p { font-size: 14px; color: var(--slate); }

@media (max-width: 760px) {
  .spirit-body, .spirit-principles { grid-template-columns: 1fr; }
}

/* ---------- generic sections ---------- */
.section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(24px, 3.4vw, 32px);
  margin: 10px 0 10px;
}
.section-head p { color: var(--slate); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
}
.card h3 { font-family: var(--display); font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--slate); }

.cta-band {
  margin: 32px 0 72px; border-radius: 16px; padding: 44px clamp(22px, 5vw, 52px);
  background-color: #101c33; color: #eef3fb;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between;
  background-image: radial-gradient(600px 220px at 85% 20%, rgba(57, 194, 215, 0.24), transparent 70%);
  background-repeat: no-repeat;
}
.cta-band h2 { font-family: var(--display); font-size: clamp(20px, 3vw, 28px); max-width: 520px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 13px; color: var(--slate);
}
.site-footer .mono { font-family: var(--mono); font-size: 12px; }

/* ============================================================
   WEATHER REPORT
   ============================================================ */
.report-head { padding: 60px 0 28px; }
.report-head h1 { font-family: var(--display); font-size: clamp(30px, 4.6vw, 44px); margin: 12px 0 12px; }
.report-head .lede { color: var(--slate); max-width: 600px; }
.week-stamp {
  font-family: var(--mono); font-size: 13px; color: var(--indigo);
  background: #e6edf9; display: inline-block; border-radius: 99px;
  padding: 5px 14px; margin-top: 16px;
}

.forecast-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 26px 0 10px;
}
.forecast-cell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.forecast-cell svg { flex: none; }
.forecast-cell .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--slate); text-transform: uppercase; }
.forecast-cell .v { font-family: var(--display); font-weight: 600; font-size: 15px; }
.v.storm { color: var(--storm); } .v.front { color: var(--front); } .v.clear { color: var(--clear); }

.report-list { display: grid; gap: 18px; padding-bottom: 28px; }
.report-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; display: grid; grid-template-columns: 56px 1fr; gap: 18px;
}
.report-card .glyph {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.glyph.storm { background: #fbe9ed; } .glyph.front { background: #faf1e0; } .glyph.clear { background: #e4f6ef; }
.report-card h3 { font-family: var(--display); font-size: 18px; margin: 2px 0 8px; }
.report-card .meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px;
}
.sev {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 99px; text-transform: uppercase;
}
.sev.storm { background: #fbe9ed; color: var(--storm); }
.sev.front { background: #faf1e0; color: #a86d15; }
.sev.clear { background: #e4f6ef; color: #1c7d5c; }
.report-card p { font-size: 15px; color: #3c4a63; }
.report-card .stats {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 14px;
  font-family: var(--mono); font-size: 12.5px; color: var(--slate);
}
.report-card .stats b { color: var(--indigo); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; color: var(--slate);
  border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px;
}

/* ============================================================
   DASHBOARD (dark — crossing the paywall changes the weather)
   ============================================================ */
body.theme-dark {
  --paper: #070d1a;
  --card: #0e1830;
  --line: #1d2c4e;
  --ink: #e8eefb;
  --slate: #93a3c4;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(49, 78, 162, 0.28), transparent 65%),
    radial-gradient(700px 320px at 5% 110%, rgba(57, 194, 215, 0.10), transparent 60%),
    var(--paper);
  min-height: 100vh;
}
body.theme-dark .site-header { background: rgba(7, 13, 26, 0.86); }
body.theme-dark .site-nav a:hover { background: #12203c; }
body.theme-dark .site-nav a.active { background: #14264a; color: var(--cyan); }
body.theme-dark .brand-name small { color: #6d7fa3; }
body.theme-dark .btn-ghost { background: transparent; color: var(--cyan); border-color: #24406b; }

/* auth gate */
.gate {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.gate-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.gate-card h1 { font-family: var(--display); font-size: 24px; margin: 12px 0 6px; }
.gate-card .sub { font-size: 14px; color: var(--slate); margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 8px; font: 14px var(--body);
  color: var(--ink); background: #0a1226; border: 1px solid var(--line);
}
.field input:focus-visible { outline: 2px solid var(--cyan); border-color: transparent; }
.gate-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.gate-alt {
  margin-top: 12px; width: 100%; justify-content: center;
}
.gate-note {
  margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: #6d7fa3;
  line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 14px;
}
.gate-note b { color: var(--cyan); font-weight: 500; }

/* dashboard shell */
.dash { display: none; padding: 28px 0 64px; }
body.authed .dash { display: block; }
body.authed .gate { display: none; }

.dash-top {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px;
}
.dash-top h1 { font-family: var(--display); font-size: 22px; }
.role-badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: #0a1226; background: var(--cyan); padding: 3px 10px; border-radius: 99px;
}
.dash-search {
  margin-left: auto; display: flex; gap: 8px; flex: 1 1 260px; max-width: 420px;
}
.dash-search input {
  flex: 1; padding: 10px 13px; border-radius: 8px; font: 13.5px var(--mono);
  color: var(--ink); background: #0a1226; border: 1px solid var(--line);
}
.dash-search input:focus-visible { outline: 2px solid var(--cyan); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.kpi .v { font-family: var(--display); font-weight: 700; font-size: 28px; margin-top: 4px; }
.kpi .d { font-family: var(--mono); font-size: 11.5px; margin-top: 2px; }
.d.up { color: var(--storm); } .d.down { color: var(--clear); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 20px 16px; margin-bottom: 18px;
}
.panel-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 14px; }
.panel-head h2 { font-family: var(--display); font-size: 16px; }
.panel-head .hint { font-family: var(--mono); font-size: 11.5px; color: var(--slate); margin-left: auto; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter {
  font-family: var(--mono); font-size: 12px; cursor: pointer;
  color: var(--slate); background: #0a1226; border: 1px solid var(--line);
  border-radius: 99px; padding: 5px 13px;
}
.filter.on { color: #071019; background: var(--cyan); border-color: var(--cyan); }

.feed-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.feed-table th {
  text-align: left; font-weight: 500; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--slate); padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.feed-table td { padding: 9px 10px; border-bottom: 1px solid #14203c; color: #c6d2ea; }
.feed-table tr:hover td { background: #101d3a; }
.feed-table .cve { color: var(--cyan); }
.pill { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; }
.pill.zn { background: #3a1420; color: #ff8fa3; }
.pill.hi { background: #3a2a12; color: #f0b45f; }
.pill.md { background: #12293a; color: #7cd0e0; }

.table-scroll { overflow-x: auto; }
.dash-foot {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--slate); padding-top: 12px;
}
.dash-foot .pager { margin-left: auto; display: flex; gap: 6px; }
.pager button {
  font: 12px var(--mono); color: var(--slate); background: #0a1226;
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; cursor: pointer;
}
.pager button:hover { color: var(--cyan); border-color: var(--cyan); }

.chart-svg { width: 100%; height: auto; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .kpis, .forecast-strip { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .appmap-row { grid-template-columns: 1fr; }
  .map-link { transform: rotate(90deg); padding: 6px 0; }
}
@media (max-width: 560px) {
  .site-nav a { padding: 8px 9px; font-size: 13px; }
  .brand-name { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .forecast-strip { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 1fr; }
}

/* ============================================================
   Django app additions
   ============================================================ */
.logout-form { display: inline; }
.logout-form button {
  font: 500 14px var(--body); color: var(--slate); background: none;
  border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.logout-form button:hover { color: var(--ink); background: #eaf0f8; }
body.theme-dark .logout-form button:hover { color: var(--ink); background: #12203c; }

.gate-error {
  font-size: 13.5px; color: #ff8fa3; background: #3a1420;
  border-radius: 8px; padding: 10px 13px; margin-bottom: 16px;
}
.glyph-sm { display: inline-flex; }
.glyph-sm.storm { color: var(--storm); }
.glyph-sm.front { color: var(--front); }
.glyph-sm.clear { color: var(--clear); }

/* dashboard is server-gated in the Django app; no JS gate */
body.theme-dark .dash { display: block; }

/* ---------- weather -> dashboard deep links ---------- */
a.chip-link { text-decoration: none; cursor: pointer; }
a.chip-link:hover { border-color: var(--cyan); color: var(--indigo); }
.raw-link { margin-top: 12px; }
.raw-link a {
  font-family: var(--mono); font-size: 12.5px; color: var(--indigo);
  text-decoration: none; border-bottom: 1px dashed var(--cyan);
}
.raw-link a:hover { color: var(--cyan); }

/* ---------- blog ---------- */
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--indigo); }
.post { max-width: 720px; margin: 0 auto; }
.post-body { padding-bottom: 8px; }
.post-body p { margin-bottom: 1.1em; color: #2e3c55; font-size: 16.5px; }
.post-back { padding: 18px 0 56px; }
.post-back a {
  font-family: var(--mono); font-size: 13px; color: var(--indigo); text-decoration: none;
}
.post-back a:hover { color: var(--cyan); }

/* ---------- blog fixes & covers ---------- */
.post-card { grid-template-columns: 1fr; }
.post-card .cover {
  display: block;                     /* ← the fix */
  margin: -24px -24px 16px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  aspect-ratio: 3 / 1;
  background: #101c33;
}
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-hero {
  border-radius: 16px; overflow: hidden; margin-bottom: 26px;
  max-height: 340px; background: #101c33;
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ---------- split hero with brand card ---------- */
.hero-split .wrap.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-card {
  border-radius: 20px; padding: clamp(28px, 4vw, 56px);
  background:
    radial-gradient(420px 260px at 80% 0%, rgba(57, 194, 215, 0.16), transparent 70%),
    radial-gradient(360px 240px at 10% 100%, rgba(49, 78, 162, 0.14), transparent 70%),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(16, 28, 51, 0.10);
  display: flex; align-items: center; justify-content: center;
}
.hero-card img { width: min(100%, 360px); height: auto; }
@media (max-width: 860px) {
  .hero-split .wrap.hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; padding: 28px; }
  .hero-card img { width: min(60%, 260px); }
}