/* Blueberry Linux — site styles
   Flat, square, gray. Orange = brand/CTA, green = Server/rolling,
   purple = Desktop/stable. No gradients, no rounded corners. */

:root {
  --bg:          #ffffff;
  --bg-soft:     #f4f4f3;
  --bg-soft2:    #ebebe9;
  --charcoal:    #262626;
  --charcoal2:   #1c1c1c;
  --text:        #1a1a1a;
  --text-soft:   #5c5c5c;
  --text-faint:  #888888;
  --border:      #d8d8d4;
  --border-dark: #3a3a3a;

  --orange:      #dd4814;   /* brand / CTA / links */
  --orange-dark: #b5380d;
  --green:       #2f8f4e;   /* Server / rolling / ok */
  --green-dark:  #246e3c;
  --purple:      #6a5b9a;   /* Desktop / stable */
  --purple-dark: #534678;

  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; }
h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.9rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft2);
  padding: 0.1em 0.4em;
  color: var(--text);
}

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

.muted { color: var(--text-soft); }

/* ─────────────────────────── Top bar ─────────────────────────── */
.topbar {
  background: var(--charcoal);
  border-bottom: 3px solid var(--orange);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.brand .v { color: var(--orange); font-weight: 700; }

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  height: 100%;
}
.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  color: #cfcfcf;
  font-size: 0.92rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.nav a:hover { color: #fff; text-decoration: none; background: #333; }
.nav a.active { color: #fff; border-bottom-color: var(--orange); }
.nav a.gh { color: var(--text-faint); }

.menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid #555;
  color: #fff;
  font-size: 1.2rem;
  padding: 4px 10px;
  cursor: pointer;
}

/* ─────────────────────────── Hero ─────────────────────────── */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}
.hero h1 { margin-bottom: 16px; }
.hero .lead {
  font-size: 1.2rem;
  color: var(--text-soft);
  max-width: 640px;
  margin-bottom: 28px;
}
.hero-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  margin-bottom: 18px;
}
.hero-flag .tick { width: 10px; height: 10px; background: var(--purple); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ─────────────────────────── Buttons ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text-soft); background: var(--bg-soft); }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: var(--charcoal2); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

/* ─────────────────────────── Sections ─────────────────────────── */
section { padding: 64px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.sec-head { margin-bottom: 36px; max-width: 680px; }
.sec-head .kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 8px;
}
.sec-head h2 { margin-bottom: 10px; }
.sec-head p { color: var(--text-soft); font-size: 1.05rem; margin: 0; }

/* ─────────────────────────── Grid / cards ─────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 24px;
}
.card.soft { background: var(--bg-soft); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 0.95rem; margin: 0; }
.card .ico { font-size: 1.6rem; margin-bottom: 12px; display: block; }

/* edition accent strips */
.edge-top { border-top: 3px solid var(--border); }
.edge-purple { border-top: 3px solid var(--purple); }
.edge-green  { border-top: 3px solid var(--green); }
.edge-orange { border-top: 3px solid var(--orange); }

/* feature list */
.flist { list-style: none; }
.flist li {
  position: relative;
  padding: 7px 0 7px 26px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.flist li:last-child { border-bottom: none; }
.flist li::before {
  content: "";
  position: absolute;
  left: 2px; top: 14px;
  width: 9px; height: 9px;
  background: var(--orange);
}
.flist.green li::before { background: var(--green); }
.flist.purple li::before { background: var(--purple); }

/* ─────────────────────────── Tags / pills ─────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.tag-orange { background: #fbe9e2; border-color: #f0c4b3; color: var(--orange-dark); }
.tag-green  { background: #e3f2e8; border-color: #bcdfc7; color: var(--green-dark); }
.tag-purple { background: #ebe8f3; border-color: #cfc8e3; color: var(--purple-dark); }
.tag-gray   { background: var(--bg-soft2); }

/* ─────────────────────────── Tables ─────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th {
  text-align: left;
  background: var(--bg-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-soft); }

/* ─────────────────────────── Terminal / code blocks ─────────────────────────── */
.term { border: 1px solid var(--border-dark); background: var(--charcoal2); margin: 16px 0; }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--charcoal); padding: 8px 12px;
  border-bottom: 1px solid var(--border-dark);
}
.term-bar .t { font-size: 0.78rem; color: #aaa; flex: 1; font-family: var(--mono); }
.copy {
  font-family: var(--mono); font-size: 0.72rem;
  background: transparent; border: 1px solid #555; color: #bbb;
  padding: 2px 9px; cursor: pointer;
}
.copy:hover { color: #fff; border-color: #888; }
.copy.ok { color: var(--green); border-color: var(--green); }
.term pre {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.6; color: #e4e4e4;
}
.term .c { color: #8a8a8a; }   /* comment */
.term .p { color: #5fd28a; }   /* prompt */
.term .o { color: #9aa0b4; }   /* output */
.term .k { color: #e8a87c; }   /* highlight */

/* ─────────────────────────── Boot diagram ─────────────────────────── */
.diagram {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 20px;
  overflow-x: auto;
}
.diagram pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
}
.diagram .hi { color: var(--orange); font-weight: 600; }
.diagram .gr { color: var(--green); }
.diagram .pu { color: var(--purple); font-weight: 600; }
.diagram .dim { color: var(--text-faint); }

/* ─────────────────────────── Release list ─────────────────────────── */
.rel {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  background: var(--bg);
  padding: 22px 24px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 20px;
  align-items: start;
}
.rel.current { border-left-color: var(--purple); }
.rel.lts { border-left-color: var(--green); }
.rel.upcoming { border-left-color: var(--border); opacity: 0.82; }
.rel .ver { font-size: 1.5rem; font-weight: 700; }
.rel .code { color: var(--text-soft); font-size: 0.95rem; }
.rel .body h4 { margin-bottom: 4px; }
.rel .body p { font-size: 0.92rem; color: var(--text-soft); margin: 0; }
.rel .meta { text-align: right; font-size: 0.85rem; color: var(--text-soft); white-space: nowrap; }
.rel .meta .big { display: block; font-size: 1.1rem; font-weight: 600; color: var(--text); }

/* ─────────────────────────── Commit feed ─────────────────────────── */
.commits { border: 1px solid var(--border); }
.commit {
  display: flex; gap: 16px; align-items: baseline;
  padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.commit:last-child { border-bottom: none; }
.commit .sha { font-family: var(--mono); color: var(--orange); flex-shrink: 0; width: 62px; }
.commit .msg { flex: 1; }
.commit .when { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; }

/* ─────────────────────────── Notices ─────────────────────────── */
.note { border-left: 4px solid var(--purple); background: var(--bg-soft); padding: 12px 16px; font-size: 0.92rem; margin: 16px 0; }
.note.warn { border-left-color: var(--orange); }
.note strong { color: var(--text); }

/* ─────────────────────────── Stat strip ─────────────────────────── */
.stats { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border); }
.stat { flex: 1; min-width: 120px; padding: 18px 20px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .n { font-size: 1.5rem; font-weight: 700; }
.stat .l { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }

/* CI badge */
.ci { display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text-soft); }
.ci .dot { width: 8px; height: 8px; background: var(--text-faint); border-radius: 50%; }
.ci .dot.ok { background: var(--green); }
.ci .dot.bad { background: var(--orange); }
.ci .dot.run { background: #d8a800; }

/* ─────────────────────────── Footer ─────────────────────────── */
footer {
  background: var(--charcoal2);
  color: #b8b8b8;
  padding: 48px 0 28px;
  font-size: 0.9rem;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h4 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 7px; }
.foot-grid a { color: #b8b8b8; }
.foot-grid a:hover { color: #fff; }
.foot-brand .name { color: #fff; font-weight: 600; font-size: 1.05rem; margin-bottom: 6px; }
.foot-bottom { border-top: 1px solid var(--border-dark); margin-top: 32px; padding-top: 20px; font-size: 0.8rem; color: var(--text-faint); }

/* ─────────────────────────── Responsive ─────────────────────────── */
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .rel { grid-template-columns: 1fr; }
  .rel .meta { text-align: left; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; height: auto;
    background: var(--charcoal); border-top: 1px solid var(--border-dark);
    z-index: 50;
  }
  .nav.open { display: flex; }
  .nav a { height: 48px; padding: 0 24px; border-bottom: 1px solid var(--border-dark); margin: 0; }
  .nav a.active { border-bottom-color: var(--border-dark); border-left: 3px solid var(--orange); }
  .topbar .wrap { position: relative; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ─────────────────────────── Wiki (in-site docs) ─────────────────────────── */
.wiki-top { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.wiki-crumb { padding: 12px 0; font-size: 0.82rem; color: var(--text-soft); }
.wiki-crumb a { color: var(--text-soft); }
.wiki-crumb a:hover { color: var(--orange); }
.wiki-crumb span { color: var(--text-faint); margin: 0 2px; }

.wiki-shell { display: grid; grid-template-columns: 232px 1fr; gap: 40px; align-items: start; padding-top: 36px; padding-bottom: 64px; }

.wiki-side { position: sticky; top: 76px; align-self: start; }
.wiki-side-head { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 8px; }
.wiki-side ul { list-style: none; border-left: 1px solid var(--border); }
.wiki-side li a { display: block; padding: 5px 14px; font-size: 0.88rem; color: var(--text-soft); border-left: 2px solid transparent; margin-left: -1px; }
.wiki-side li a:hover { color: var(--text); text-decoration: none; border-left-color: var(--border); }
.wiki-side li.on a { color: var(--orange); border-left-color: var(--orange); font-weight: 600; }

.wiki-main { min-width: 0; padding-top: 4px; }
.wiki-main-wide { padding-top: 24px; }
.wiki-main > *:first-child { margin-top: 0; }
.wiki-main h1 { font-size: 2rem; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.wiki-main h2 { font-size: 1.4rem; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.wiki-main h3 { font-size: 1.12rem; margin: 26px 0 10px; }
.wiki-main h4 { font-size: 0.98rem; margin: 20px 0 8px; }
.wiki-main p { margin: 0 0 14px; color: #2b2b2b; }
.wiki-main a { color: var(--orange); }
.wiki-main ul, .wiki-main ol { margin: 0 0 14px; padding-left: 22px; }
.wiki-main li { margin-bottom: 5px; }
.wiki-main code { background: var(--bg-soft2); padding: 0.12em 0.42em; font-size: 0.86em; color: var(--text); }
.wiki-main pre { background: var(--charcoal2); border: 1px solid var(--border-dark); padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
.wiki-main pre code { background: transparent; color: #e4e4e4; padding: 0; font-size: 0.85rem; line-height: 1.6; }
.wiki-main blockquote { border-left: 4px solid var(--purple); background: var(--bg-soft); padding: 12px 16px; margin: 0 0 16px; color: var(--text-soft); }
.wiki-main blockquote strong { color: var(--text); }
.wiki-main hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.wiki-main table { font-size: 0.88rem; }
.wiki-main img { max-width: 100%; height: auto; border: 1px solid var(--border); margin: 8px 0 16px; }
.wiki-main .tbl-wrap { margin: 0 0 16px; }

@media (max-width: 860px) {
  .wiki-shell { grid-template-columns: 1fr; gap: 8px; }
  .wiki-side { position: static; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
  .wiki-side ul { display: flex; flex-wrap: wrap; border-left: none; gap: 2px; }
  .wiki-side li a { border-left: none; padding: 4px 10px; }
  .wiki-side li.on a { border-left: none; }
}

/* ─────────────────────────── Theme toggle ─────────────────────────── */
.theme-toggle {
  flex-shrink: 0;
  width: 34px; height: 34px;
  padding: 0;
  background: none;
  border: 1px solid #555;
  color: #cfcfcf;
  font-size: 1.05rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { color: #fff; border-color: #888; }

/* ─────────────────────────── Dark mode ─────────────────────────── */
html[data-theme="dark"] {
  --bg:          #15161b;
  --bg-soft:     #1c1e25;
  --bg-soft2:    #272a33;
  --text:        #e6e7ea;
  --text-soft:   #a2a6b0;
  --text-faint:  #71757f;
  --border:      #2c2f39;
}
html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .edition-card,
html[data-theme="dark"] .download-card { background: var(--bg-soft); }
html[data-theme="dark"] .edge-top { border-top-color: var(--border); }

/* accent chips: translucent on dark instead of pastel */
html[data-theme="dark"] .tag-orange { background: rgba(221,72,20,.16);  border-color: rgba(221,72,20,.42); color: #f0875b; }
html[data-theme="dark"] .tag-green  { background: rgba(47,143,78,.16);  border-color: rgba(47,143,78,.42); color: #5fc27e; }
html[data-theme="dark"] .tag-purple { background: rgba(106,91,154,.22); border-color: rgba(106,91,154,.5);  color: #a99bd6; }
html[data-theme="dark"] .tag-gray   { background: var(--bg-soft2); color: var(--text-soft); }

/* wiki prose links/text readability on dark */
html[data-theme="dark"] .wiki-main p { color: var(--text); }
html[data-theme="dark"] .wiki-main a { color: #ef6b3d; }
html[data-theme="dark"] .btn-outline { color: var(--text); }
