/* Meshcast: readable light palette; dark.css provides the optional dark palette. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #d0d4da;
  --text: #20242b;
  --muted: #4b5563;
  --red: #b11f29;
  --accent: #a81d27;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #71141b; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible { outline: 3px solid #1d5cab; outline-offset: 4px; }
[hidden] { display: none !important; }
.topbar {
  max-width: 1200px; margin: auto; padding: 1rem 2rem;
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand { font-size: 1.4rem; font-weight: 750; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: .65rem 1.35rem; }
nav a { font-size: 16px; color: var(--text); text-decoration: none; }
nav a:hover, nav a[aria-current=page] { text-decoration: underline; }
main { max-width: 1120px; margin: auto; padding: 0 2rem 3rem; }
.hero { padding: 1.8rem 0 1rem; }
.hero h1, .page-title h1 { font-size: 2.3rem; line-height: 1.2; margin: 0 0 .75rem; }
.lead { font-size: 1.15rem; color: var(--text); }
.antenna-photo { margin: 0 0 2rem; }
.antenna-photo img { display: block; width: 528px; max-width: 100%; height: auto; }
.antenna-photo figcaption { font-size: 16px; color: var(--muted); margin-top: .5rem; }
h2 { font-size: 1.65rem; line-height: 1.25; margin: .5rem 0 1rem; }
h3 { font-size: 1.25rem; line-height: 1.3; margin: .4rem 0 .9rem; }
p { margin: .7rem 0 1rem; }
p:last-child { margin-bottom: 0; }
.section { padding: 2rem 0; border-top: 1px solid var(--border); scroll-margin-top: 1rem; }
.section-heading { max-width: 750px; margin-bottom: 1.5rem; }
.section-heading > p:last-child { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools h3 { display: flex; align-items: center; gap: .65rem; }
.tool-icon { width: 32px; height: 32px; flex-shrink: 0; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card p { color: var(--muted); }
.card .button { margin-top: .5rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.3rem; }
.button, button {
  display: inline-block; background: var(--red); border: 1px solid var(--red);
  color: #fff; text-decoration: none; font-weight: 650; padding: .65rem 1rem;
  border-radius: 6px; min-height: 46px;
}
.button:hover, button:hover:not(:disabled) { background: #8b1821; color: #fff; }
.secondary { background: #fff; border-color: #737b87; color: var(--text); }
.secondary:hover, button.secondary:hover:not(:disabled) { background: #f0f2f5; color: var(--text); }
.text-link { font-weight: 650; }
.note { color: var(--muted); font-size: 16px; }
.notice { background: #fff7f7; border-left: 3px solid var(--accent); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.notice p { margin: 0; }
.join { max-width: 790px; }
.join > p { color: var(--muted); }
dl { margin: 0; }
dl > div { display: flex; justify-content: space-between; gap: 1.2rem; border-bottom: 1px solid var(--border); padding: .6rem 0; }
dl > div:last-child { border: 0; }
dt { color: var(--muted); }
dd { text-align: right; margin: 0; max-width: 65%; }
footer { max-width: 1200px; margin: auto; border-top: 1px solid var(--border); padding: 1.5rem 2rem 2rem; display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; font-size: 16px; color: var(--muted); }
footer p { margin: 0 auto 0 0; }
.page-title { padding: 2rem 0 1.5rem; max-width: 800px; }
.page-title > p:last-child { color: var(--muted); }
label { display: block; font-weight: 600; margin: .8rem 0 .35rem; }
input, textarea, select { width: 100%; min-width: 0; padding: .65rem .8rem; background: #fff; border: 1px solid #737b87; border-radius: 6px; color: var(--text); }
textarea { resize: vertical; min-height: 110px; overflow-wrap: anywhere; }
input[type=checkbox] { width: auto; margin-right: .5rem; }
input[type=file] { font-size: 16px; }
code, .mono { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; font-size: 16px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f4f5f7; padding: 1rem; border-radius: 6px; font-size: 16px; }
.status { min-height: 1.65em; overflow-wrap: anywhere; color: var(--accent); }
.field-note { font-size: 16px; color: var(--muted); margin: .3rem 0 .8rem; }
.profile { display: flex; gap: 1.1rem; align-items: flex-start; }
.avatar { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; background: #f0f2f5; flex-shrink: 0; }
.profile > div { min-width: 0; }
.profile-links { display: flex; gap: .5rem 1rem; flex-wrap: wrap; }
.badge { display: inline-block; border: 1px solid #737b87; color: var(--muted); border-radius: 4px; padding: .1rem .5rem; font-size: 16px; }
.stack { display: grid; gap: 1rem; }
.part { background: #f4f5f7; padding: 1rem; border-radius: 6px; border: 1px solid var(--border); }
.part textarea { min-height: 85px; }
.part-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.part-head button { font-size: 16px; padding: .3rem .7rem; }
.inline-check { display: flex; align-items: flex-start; gap: .5rem; font-size: 16px; font-weight: 400; }
.inline-check input { margin-top: .4rem; }
.flow { padding-left: 1.4rem; }
.flow li { padding: .3rem 0; }
.developer { margin-top: 2rem; }
summary { cursor: pointer; font-weight: 650; padding: .5rem 0; }
.tool-frame { width: 100%; height: 820px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
details code { word-break: break-word; }
.call-launch { margin: 1rem 0; }
.topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.topbar nav { justify-content: flex-end; }
.site-theme { width: auto; min-height: 44px; max-width: 125px; padding: .35rem .5rem; font-size: 16px; }
@media (max-width: 850px) {
  .tools { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .topbar { grid-template-columns: 1fr auto; align-items: center; }
  .topbar nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .site-theme { grid-column: 2; grid-row: 1; }
}
@media (max-width: 620px) {
  main { padding: 0 1rem 2rem; }
  .topbar, footer { padding: 1rem; }
  .grid { grid-template-columns: 1fr; }
  .hero h1, .page-title h1 { font-size: 2rem; }
  .card { padding: 1.1rem; }
  .profile { flex-direction: column; }
  nav { gap: .5rem 1rem; }
  dl > div { flex-direction: column; gap: 0; }
  dd { text-align: left; max-width: 100%; }
  .tool-frame { height: 850px; }
}
