/* meshCOM.us: simple, readable, mobile-first */
:root {
  --navy: #0f2742;
  --navy-2: #173a5e;
  --green: #3ddc97;
  --green-dark: #1f9e6a;
  --bg: #f6f8fa;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5b6b7b;
  --line: #dfe5eb;
  --radius: 12px;
  --max: 980px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--green-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; color: var(--navy); }
h1 { font-size: 2rem; margin: 1.6rem 0 .6rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.3rem; letter-spacing: .3px; }
.brand strong { color: var(--green); }
.brand em { font-style: normal; color: #9fb4c9; font-weight: 400; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: #cfdbe7; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover { background: var(--navy-2); color: #fff; }
.site-nav a.active { color: var(--navy); background: var(--green); font-weight: 600; }
.parent-bar { background: var(--navy-2); font-size: .82rem; color: #9fb4c9; }
.parent-bar .wrap { padding-top: 5px; padding-bottom: 5px; }
.parent-bar a { color: #fff; font-weight: 600; text-decoration: none; }
.parent-bar a:hover { text-decoration: underline; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--navy); padding: 8px 16px 16px; border-top: 1px solid var(--navy-2); }
  .nav-open .site-nav { display: flex; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  h1 { font-size: 1.6rem; }
}

/* Hero */
.hero { padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.4rem; margin-top: .3rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: .78rem; font-weight: 700; color: var(--green-dark); margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; padding: 11px 20px; border-radius: 10px; font-weight: 600; }
.btn:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
@media (max-width: 720px) { .hero h1 { font-size: 1.8rem; } .hero h1 br { display: none; } }

/* Status */
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1rem 0 2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-text { font-weight: 600; color: var(--navy); }
.stat-label { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
@media (max-width: 720px) { .status { grid-template-columns: 1fr; } }

/* Lists */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head a { font-size: .95rem; text-decoration: none; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.post-card, .timeline-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.post-card:hover, .timeline-item:hover { border-color: var(--green); transform: translateY(-2px); }
.post-card h3, .timeline-item h3 { margin: .2rem 0 .3rem; font-size: 1.1rem; }
.post-card p, .timeline-item p { margin: 0; color: var(--muted); font-size: .95rem; }
time { font-size: .82rem; color: var(--muted); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 10px; margin-top: 1.5rem; }
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
@media (max-width: 720px) { .timeline-item { grid-template-columns: 1fr; gap: 0; } }

/* Post */
.post { max-width: 720px; padding-bottom: 2rem; }
.back { display: inline-block; margin-top: 1.5rem; text-decoration: none; font-size: .95rem; }
.post time { display: block; margin-top: 1rem; }
.post h1 { margin-top: .2rem; }
.prose { max-width: 720px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose pre { background: var(--navy); color: #e6edf3; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .9rem; }
.prose code { background: #e9eef3; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.2rem 0; padding: 10px 16px; border-left: 4px solid var(--green); background: #eaf7f1; border-radius: 0 10px 10px 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 1.5rem 0 2rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.step h3 { margin: .4rem 0; }
.step p { margin: 0; color: var(--muted); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: var(--navy); font-weight: 700; }

/* Network */
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; margin: 1.5rem 0 2rem; }
.nodes { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2rem; }
.nodes th, .nodes td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.nodes th { background: var(--navy); color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.badge { padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #e9eef3; }
.badge-active { background: #d6f5e7; color: #12704a; }
.badge-testing { background: #fff3d1; color: #8a6100; }
.badge-offline { background: #fde2e2; color: #9b1c1c; }
@media (max-width: 720px) { .nodes { display: block; overflow-x: auto; } }

/* Footer */
.site-footer { background: var(--navy); color: #9fb4c9; margin-top: 3rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.footer-meta { text-align: right; }
@media (max-width: 720px) { .footer-row { flex-direction: column; } .footer-meta { text-align: left; } }

/* Standards */
.rules-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; margin-top: 1.5rem; align-items: start; }
.toc { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: .92rem; }
.toc strong { color: var(--navy); margin-bottom: 6px; }
.toc a { text-decoration: none; padding: 4px 8px; border-radius: 6px; color: var(--text); }
.toc a:hover { background: #eaf7f1; color: var(--green-dark); }
.rule-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 22px 14px; margin-bottom: 16px; scroll-margin-top: 110px; }
.rule-section > h2 { border-bottom: 2px solid var(--green); padding-bottom: 6px; }
.rule-section .prose { max-width: none; }
.rule-section .prose table { display: block; overflow-x: auto; }
.rule-section .prose th { background: #eef2f6; }
.updated { font-size: .8rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 720px) { .rules-layout { grid-template-columns: 1fr; } .toc { position: static; } .rule-section { padding: 2px 14px 10px; } }

/* Language switch (flag) */
.brand { margin-right: auto; }
.lang-switch { display: inline-flex; align-items: center; margin-left: 14px; padding: 6px; border-radius: 6px; line-height: 0; opacity: .9; }
.lang-switch:hover { background: var(--navy-2); opacity: 1; }
.lang-switch svg { border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
@media (max-width: 720px) { .lang-switch { margin-left: 0; margin-right: 6px; } }
.rule-section .prose td:last-child { white-space: nowrap; }
img.aprs { vertical-align: middle; margin-right: 6px; }

/* Notice box on the home page */
.notice { background: #eaf7f1; border: 1px solid #c6ecd9; border-left: 4px solid var(--green); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 2rem; max-width: 760px; }
.notice p { margin: 0 0 .6rem; }
.notice p:last-child { margin-bottom: 0; }

/* Talk groups table: equal-width Reach / Use columns */
.table-wrap { overflow-x: auto; }
.rule-section .prose table.groups { display: table; width: 100%; table-layout: fixed; min-width: 560px; }
table.groups col.c-num { width: 12%; }
table.groups col.c-name { width: 24%; }
table.groups col.c-half { width: 32%; }
.rule-section .prose table.groups td { white-space: normal; vertical-align: top; }

/* Get Started: full-width steps, one under another */
.steps { grid-template-columns: 1fr; }
.step { display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; align-items: start; }
.step .step-num { grid-row: 1 / span 2; margin-top: 2px; }
.step h3 { margin: 2px 0 .3rem; }
