/* ------------------------------------------------------------------
   Canectic BBS site styles
   Loaded after bootstrap.css with data-bs-theme="dark" on <html>.
   Dark, terminal-flavoured: ANSI bright cyan and amber on deep navy.
   Shares the Tranqsoft navy-900 base so the two sites are siblings.
   ------------------------------------------------------------------ */

:root {
	--bg: #070b14;
	--bg-panel: #0d1526;
	--bg-panel-2: #111c31;
	--line: rgba(127, 200, 240, 0.14);
	--line-strong: rgba(127, 200, 240, 0.32);
	--ink: #dfe8f3;
	--muted: #a5b4c8;
	--soft: #7b8aa0;
	--cyan: #5fd7ff;
	--cyan-dim: rgba(95, 215, 255, 0.14);
	--amber: #ffb454;
	--amber-dim: rgba(255, 180, 84, 0.14);
	--green: #8ce99a;
	--red: #ff7b7b;
	--white: #ffffff;

	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius: 12px;
	--radius-sm: 8px;

	--bs-body-bg: var(--bg);
	--bs-body-color: var(--ink);
	--bs-body-font-family: var(--font-body);
	--bs-link-color: var(--cyan);
	--bs-link-hover-color: #9be6ff;
	--bs-border-color: var(--line);
	--bs-secondary-color: var(--muted);
	--bs-tertiary-color: var(--soft);
}

/* ---------- base ---------- */

html { scroll-behavior: smooth; }

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

h1, h2, h3, .h1, .h2, .h3 {
	font-family: var(--font-mono);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--white);
}
h4, h5, h6, .h4, .h5, .h6 { font-weight: 600; color: var(--white); }
h1, .h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2, .h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3, .h3 { font-size: 1.3rem; }
h1, h2, h3, .h1, .h2, .h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

.lead { font-size: 1.15rem; line-height: 1.65; color: var(--muted); }
.text-muted { color: var(--muted) !important; }
.text-soft { color: var(--soft); }
.text-warn { color: var(--amber); }
.measure { max-width: 60ch; }
.mono { font-family: var(--font-mono); }

a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code, pre, kbd {
	font-family: var(--font-mono);
	font-size: 0.92em;
}
code {
	color: var(--amber);
	background: rgba(255, 180, 84, 0.08);
	padding: 0.1em 0.4em;
	border-radius: 4px;
}
code.fp {
	color: var(--cyan);
	background: none;
	padding: 0;
	letter-spacing: 0.04em;
	/* pre-wrap, not pre: kept as gpg prints it, but free to wrap, since on one
	   line it is wider than a phone and pushed every page sideways */
	white-space: pre-wrap;
}
code.wrap { word-break: break-all; white-space: normal; }

.eyebrow {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cyan);
	margin-bottom: 0.9rem;
}

/* ---------- sections ---------- */

.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }
.section-panel { background: var(--bg-panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-panel + .section-panel { border-top: 0; }
.section-heading { margin-bottom: 3rem; max-width: 64ch; }
.section-heading h2 { margin-bottom: 0.75rem; }
.section-heading p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.page-hero { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 0.9rem; }
.page-hero .lead { max-width: 64ch; margin: 0; }

.strip { background: var(--bg-panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-value { font-family: var(--font-mono); font-weight: 600; color: var(--white); font-size: 1.1rem; }
.stat-label { color: var(--soft); font-size: 0.85rem; margin-top: 0.2rem; }

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: rgba(7, 11, 20, 0.88);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .navbar { padding: 0.7rem 0; }
.navbar-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white); }
.navbar-brand:hover { text-decoration: none; color: var(--white); }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand-word { font-family: var(--font-mono); font-weight: 600; font-size: 1.3rem; letter-spacing: 0.02em; }
.brand-sub { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); letter-spacing: 0.15em; align-self: flex-end; padding-bottom: 0.35rem; }
@keyframes blink { 50% { opacity: 0; } }

.hero-logo-wrap { display: flex; align-items: center; justify-content: center; }
.hero-logo {
	width: min(100%, 400px); height: auto;
	filter: drop-shadow(0 0 40px rgba(95, 215, 255, 0.35)) drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
}
.m-hero .hero-logo { width: 200px; margin: 0 auto 1.5rem; display: block; }

.navbar-nav .nav-link { color: var(--muted); font-weight: 500; font-size: 0.95rem; padding: 0.5rem 0.85rem; position: relative; }
.navbar-nav .nav-link:hover { color: var(--white); text-decoration: none; }
.navbar-nav .nav-link.active { color: var(--white); }
.navbar-nav .nav-link.active::after {
	content: ''; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.15rem;
	height: 2px; border-radius: 2px; background: var(--cyan);
}
.navbar-toggler { border-color: var(--line-strong); }
.navbar-toggler-icon { filter: invert(1); }

/* ---------- buttons ---------- */

.btn { font-weight: 600; border-radius: var(--radius-sm); padding: 0.7rem 1.3rem; }
.btn:hover { text-decoration: none; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.88rem; }

.btn-accent { background: var(--cyan); border-color: var(--cyan); color: #04101e; }
.btn-accent:hover, .btn-accent:focus { background: #9be6ff; border-color: #9be6ff; color: #04101e; box-shadow: 0 6px 20px rgba(95, 215, 255, 0.3); }
.btn-outline-light { border-color: var(--line-strong); color: var(--ink); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.5); color: var(--white); }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--cyan); }
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.15s ease; }
.link-arrow:hover { text-decoration: none; color: #9be6ff; }
.link-arrow:hover .icon { transform: translateX(3px); }

.btn-copy {
	font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
	background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.15rem 0.6rem;
}
.btn-copy:hover { color: var(--white); border-color: var(--cyan); }

/* ---------- icons ---------- */

.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-badge {
	display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 10px;
	background: var(--cyan-dim); color: var(--cyan); margin-bottom: 1.1rem;
}

/* ---------- hero ---------- */

.hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(800px 480px at 80% 20%, rgba(95, 215, 255, 0.12), transparent 60%),
		radial-gradient(600px 400px at 5% 100%, rgba(255, 180, 84, 0.08), transparent 60%),
		var(--bg);
	border-bottom: 1px solid var(--line);
}
.hero::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 80%);
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 80%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-body { padding: 5.5rem 0 5rem; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin-bottom: 1.25rem; }
.hero .lead { max-width: 54ch; margin-bottom: 2rem; }

/* ---------- faux terminal ---------- */

.term {
	background: #020914;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(95, 215, 255, 0.05), 0 0 48px rgba(95, 215, 255, 0.12);
	overflow: hidden;
}
.term-bar {
	display: flex; align-items: center; gap: 0.4rem;
	padding: 0.55rem 0.8rem; background: #0b1424; border-bottom: 1px solid var(--line);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a3a55; }
.term-dot:first-child { background: var(--amber); }
.term-title { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--soft); }
.term-screen {
	margin: 0; padding: 1.1rem 1.25rem;
	font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.45;
	color: #b9c7da; background: transparent; overflow-x: auto;
}
.term-screen .b { font-weight: 600; }
.c-cyan { color: var(--cyan); }
.c-amber { color: var(--amber); }
.c-white { color: var(--white); }
.c-dim { color: var(--soft); }
.cursor { color: var(--cyan); animation: blink 1s steps(1) infinite; }

/* ---------- cards and panels ---------- */

.feature-card {
	background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 1.75rem; height: 100%; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.feature-card:hover { border-color: var(--line-strong); background: var(--bg-panel-2); text-decoration: none; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--muted); margin-bottom: 0.9rem; }
.feature-card .link-arrow { font-size: 0.93rem; }

.panel { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.panel-accent { border-color: rgba(95, 215, 255, 0.35); background: linear-gradient(180deg, rgba(95, 215, 255, 0.06), transparent 70%), var(--bg-panel); }
.panel.latest h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

.cta-band {
	background: radial-gradient(600px 260px at 10% 0%, rgba(95, 215, 255, 0.14), transparent 60%), var(--bg-panel-2);
	border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3rem 2.5rem;
}
.cta-band h2 { margin-bottom: 0.6rem; }
.cta-band p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- lists ---------- */

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.7rem; color: var(--ink); }
.check-list .check {
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 20px; height: 20px; border-radius: 50%; margin-top: 0.2rem;
	background: var(--cyan-dim); color: var(--cyan);
}
.check-list .check .icon { width: 12px; height: 12px; stroke-width: 3; }
@media (min-width: 992px) {
	.check-list.two-col { columns: 2; column-gap: 2.5rem; }
	.check-list.two-col li { break-inside: avoid; }
}

.status-list { list-style: none; padding: 0; margin: 0; font-family: var(--font-mono); font-size: 0.9rem; }
.status-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; }
.status-list li::before { content: '●'; font-size: 0.7rem; }
.status-list li.ok::before { color: var(--green); }
.status-list li.missing::before { color: var(--soft); }
.status-list li.missing a { color: var(--soft); }

.chip-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }
.chip:hover { color: var(--white); border-color: var(--cyan); text-decoration: none; }

.badge-soft { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; padding: 0.2rem 0.55rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); white-space: nowrap; }

.notice-list, .step-list { list-style: none; padding: 0; margin: 0; }
.notice-list li { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.6rem; background: var(--bg-panel); }
.notice-list .level { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.2rem; min-width: 5.5em; }
.notice-list .level-info .level { color: var(--cyan); }
.notice-list .level-warning .level { color: var(--amber); }
.notice-list .level-critical .level { color: var(--red); }
.step-list li { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.6rem; background: var(--bg-panel); }
.step-list pre { font-size: 0.85rem; color: var(--amber); background: #020914; padding: 0.6rem 0.8rem; border-radius: 6px; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; }
dl.kv dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); padding-top: 0.2rem; }
dl.kv dd { margin: 0; color: var(--ink); min-width: 0; }

/* ---------- code blocks ---------- */

.codeblock { background: #020914; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.codeblock-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.8rem; background: #0b1424; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; color: var(--soft); }
.codeblock pre { margin: 0; padding: 1rem 1.1rem; color: var(--ink); font-size: 0.86rem; line-height: 1.55; overflow-x: auto; }
.feature-block { padding: 4rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 5rem; }

/* ---------- tables ---------- */

.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-panel); }
.table-releases th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); font-weight: 500; padding: 0.8rem 1rem; }
.table-releases td { padding: 0.9rem 1rem; vertical-align: middle; }
.table-flags td { padding: 0.45rem 0.4rem; border-color: var(--line); font-size: 0.92rem; }
.table-flags td:first-child { white-space: nowrap; }

/* ---------- rendered markdown ---------- */

.doc { color: var(--ink); }
.doc a { overflow-wrap: anywhere; } /* a bare URL in the notes is wider than a phone */
.doc > h1:first-child { display: none; }
.doc h1 { font-size: 1.9rem; margin-top: 2.5rem; }
.doc .anchor { position: absolute; margin-left: -1.2em; color: var(--soft); opacity: 0; text-decoration: none; }
.doc h1:hover .anchor, .doc h2:hover .anchor, .doc h3:hover .anchor, .doc h4:hover .anchor { opacity: 1; }
.doc h2, .doc h3, .doc h4 { position: relative; scroll-margin-top: 5rem; }
.doc h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.doc h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.15rem; }
.doc h4 { margin-top: 1.25rem; font-size: 1rem; }
.doc p, .doc li { color: var(--muted); }
.doc pre { background: #020914; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 1rem 1.1rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.55; color: var(--ink); }
.doc pre code { color: inherit; background: none; padding: 0; }
.doc table { width: 100%; margin: 1rem 0 1.5rem; border-collapse: collapse; font-size: 0.93rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
.doc th { color: var(--white); background: var(--bg-panel); }
.doc blockquote { border-left: 3px solid var(--cyan); padding-left: 1rem; color: var(--muted); }
.doc hr { border-color: var(--line); margin: 2.5rem 0; }

/* ---------- footer ---------- */

.site-footer { background: #040810; border-top: 1px solid var(--line); color: var(--muted); padding: 4rem 0 2rem; margin-top: auto; }
.site-footer h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--white); }
.site-footer p { color: var(--muted); font-size: 0.95rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; font-size: 0.85rem; color: var(--soft); }

/* ---------- mobile ---------- */

.m-hero { padding: 3rem 0 2.5rem; }
.m-hero h1 { font-size: 2rem; }
.m-section { padding: 2.75rem 0; }

@media (max-width: 991.98px) {
	.section { padding: 3.25rem 0; }
	.hero-body { padding: 3.5rem 0 3rem; }
	.cta-band { padding: 2.25rem 1.5rem; }
	.navbar-collapse { padding: 0.75rem 0 0.5rem; }
	.navbar-nav .nav-link.active::after { display: none; }
	.feature-block { padding: 2.75rem 0; }
	dl.kv { grid-template-columns: 1fr; gap: 0.2rem; }
	dl.kv dd { margin-bottom: 0.75rem; }
	/* A g-5 row reaches 12px past the container's padding on each side, which
	   scrolls a phone sideways; stacked columns do not need the wide gutter */
	.row.g-5 { --bs-gutter-x: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.link-arrow .icon { transition: none; }
}

/* ---------- release tabs ---------- */

.tab-bar { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.tab-bar a { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; padding: 0.7rem 1.1rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-bar a:hover { color: var(--white); text-decoration: none; }
.tab-bar a.active { color: var(--cyan); border-bottom-color: var(--cyan); }
