/* =========================================================
   Thm-OS base — theme variables + reset + shared primitives
   ========================================================= */

:root {
  --font-ui: system-ui, "Segoe UI", Roboto, "Cantarell", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Debian Sans Mono", "Ubuntu Mono", monospace;

  /* accents (overridable per [data-accent]) */
  --accent: #d70a53;
  --accent-strong: #b00845;
  --accent-soft: rgba(215, 10, 83, 0.14);

  /* GNOME shell chrome: the top bar stays dark in both modes */
  --panel-bg: rgba(14, 14, 14, 0.86);
  --panel-fg: #ffffff;

  /* window chrome — light */
  --win-bg: #fafafa;
  --win-head: #ebe9e7;
  --win-head-max: #e0dedb;
  --win-border: rgba(0, 0, 0, 0.22);
  --text: #241f31;
  --text-dim: #77767b;
  --border: #d9d9d9;
  --bg-alt: #f3f2f1;
  --hover: rgba(0, 0, 0, 0.06);
  --active: rgba(0, 0, 0, 0.1);
  --entry-bg: #ffffff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42), 0 4px 14px rgba(0, 0, 0, 0.18);
  --shadow-flat: 0 4px 16px rgba(0, 0, 0, 0.18);

  --term-bg: #1e2223;
  --term-fg: #eeeeec;

  /* wallpaper — light */
  --wall-a: #dfe6ee;
  --wall-b: #c7d3e2;
  --wall-c: #eef1f6;
}

:root[data-mode="dark"] {
  --win-bg: #242424;
  --win-head: #2f2f2f;
  --win-head-max: #292929;
  --win-border: rgba(0, 0, 0, 0.62);
  --text: #ffffff;
  --text-dim: #9a999a;
  --border: #3a3a3a;
  --bg-alt: #1c1c1c;
  --hover: rgba(255, 255, 255, 0.08);
  --active: rgba(255, 255, 255, 0.14);
  --entry-bg: #383838;
  --term-bg: #17191a;

  --wall-a: #10121f;
  --wall-b: #1d2033;
  --wall-c: #0c0e18;
}

:root[data-accent="debian-red"]   { --accent: #d70a53; --accent-strong: #b00845; --accent-soft: rgba(215,10,83,.14); }
:root[data-accent="blue"]         { --accent: #3584e4; --accent-strong: #1c6dcc; --accent-soft: rgba(53,132,228,.14); }
:root[data-accent="green"]        { --accent: #2ec27e; --accent-strong: #1d9c64; --accent-soft: rgba(46,194,126,.14); }
:root[data-accent="purple"]       { --accent: #9141ac; --accent-strong: #76328e; --accent-soft: rgba(145,65,172,.14); }
:root[data-accent="orange"]       { --accent: #ed5b00; --accent-strong: #c64b00; --accent-soft: rgba(237,91,0,.14); }
:root[data-accent="teal"]         { --accent: #0f9d9d; --accent-strong: #0b7d7d; --accent-soft: rgba(15,157,157,.14); }

* { box-sizing: border-box; }

/* the hidden attribute must always win over display rules */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  background: #000;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: default; }

input, select {
  font: inherit;
  color: var(--text);
}

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

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-block;
  vertical-align: -3px;
}
.icon.big { width: 42px; height: 42px; }

/* thin, quiet scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, 0.45); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(128, 128, 128, 0.7); border: 2px solid transparent; background-clip: content-box; }

::selection { background: var(--accent-soft); }

/* generic buttons inside apps */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--entry-bg);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--hover); }
.btn:active { background: var(--active); }
.btn.suggested {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.btn.suggested:hover { background: var(--accent-strong); }

/* -------- noscript fallback (also the SEO payload) -------- */
noscript .noscript { display: block; }

.noscript {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  background: #fff;
  color: #241f31;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
}
.noscript h1 { font-size: 28px; margin: 0 0 4px; }
.noscript h2 { font-size: 20px; margin: 28px 0 8px; color: #444; }
.ns-sub { color: #666; margin: 0 0 12px; }
.ns-hint {
  border-left: 3px solid #d70a53;
  background: #faf3f6;
  padding: 8px 12px;
  color: #555;
  font-size: 14px;
  border-radius: 0 6px 6px 0;
}
.ns-list { list-style: none; margin: 0; padding: 0; }
.ns-list li {
  display: flex;
  gap: 14px;
  padding: 7px 4px;
  border-bottom: 1px solid #eee;
}
.ns-list time { color: #888; font-variant-numeric: tabular-nums; flex: none; }
.ns-list a { color: #b00845; font-weight: 500; }
.ns-tags em { font-style: normal; color: #777; margin-left: 8px; font-size: 13px; }
