:root {
  --bg: #e9dfc4;
  --bg2: #f3ead2;
  --panel: #fff8e7;
  --line: #c0a878;
  --line2: #e0cfae;
  --text: #3b2f1e;
  --fg: #3b2f1e;
  --muted: #8a744f;
  --accent: #8a2b2b;
  --accent2: #b07f2e;
  --font-d: "Dancing Script", "Brush Script MT", cursive;
  --font-b: Georgia, "Times New Roman", serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(90, 60, 20, .14);
  --glow: 0 0 0 1px var(--accent), 0 0 14px rgba(138, 43, 43, .35);
}

[data-theme="webring"] {
  --bg: #e9dfc4; --bg2: #f3ead2; --panel: #fff8e7;
  --line: #c0a878; --line2: #e0cfae;
  --text: #3b2f1e; --fg: #3b2f1e; --muted: #8a744f;
  --accent: #8a2b2b; --accent2: #b07f2e;
  --font-d: "Dancing Script", "Brush Script MT", cursive;
  --font-b: Georgia, "Times New Roman", serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 8px; --shadow: 0 2px 10px rgba(90, 60, 20, .14);
  --glow: 0 0 0 1px var(--accent), 0 0 14px rgba(138, 43, 43, .35);
}

[data-theme="tqg"] {
  --bg: #040404; --bg2: #080808; --panel: #0a0a0a;
  --line: #1f1f1f; --line2: #2a2a2a;
  --text: #d6d6d6; --fg: #d6d6d6; --muted: #5f5f5f;
  --accent: #00dc00; --accent2: #0a5c1d;
  --font-d: "VT323", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 2px; --shadow: 0 0 24px rgba(0, 0, 0, .8);
}

[data-theme="tst"] {
  --bg: #140c02; --bg2: #1c1204; --panel: #1f1606;
  --line: #3a2a10; --line2: #4a3616;
  --text: #e8d9b8; --fg: #e8d9b8; --muted: #a98f55;
  --accent: #ffb020; --accent2: #7a4a0a;
  --font-d: "VT323", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 4px; --shadow: 0 4px 0 rgba(0, 0, 0, .55);
}

[data-theme="normidian"] {
  --bg: #f2e4c4; --bg2: #fbf3dd; --panel: #fbf3dd;
  --line: #c9a96b; --line2: #e2cd9e;
  --text: #3f2c0f; --fg: #3f2c0f; --muted: #8a6a35;
  --accent: #7a2a1a; --accent2: #5c3d16;
  --font-d: Georgia, "Times New Roman", serif;
  --font-b: Georgia, "Times New Roman", serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 4px; --shadow: 0 4px 0 rgba(60, 34, 8, .35);
}

[data-theme="dos"] {
  --bg: #02021a; --bg2: #060630; --panel: #0a0a3a;
  --line: #2a2a6a; --line2: #3a3a8a;
  --text: #e0e0ff; --fg: #e0e0ff; --muted: #8a8acc;
  --accent: #00d8ff; --accent2: #0a0a5a;
  --font-d: "VT323", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 0px; --shadow: 0 0 24px rgba(0, 60, 160, .45);
}

[data-theme="neptuneos"] {
  --bg: #0b1526; --bg2: #0f1c33; --panel: #12203a;
  --line: #1e3354; --line2: #29406a;
  --text: #dbe7ff; --fg: #dbe7ff; --muted: #7b93c4;
  --accent: #4fa4ff; --accent2: #245edb;
  --font-d: "Trebuchet MS", "Tahoma", sans-serif;
  --font-b: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 8px; --shadow: 0 10px 30px rgba(0, 0, 20, .45);
}

[data-theme="dropchat"] {
  --bg: #0b1320; --bg2: #0e1a2c; --panel: #111c2c;
  --line: #22334a; --line2: #2c415e;
  --text: #dbe6f5; --fg: #dbe6f5; --muted: #7c92ad;
  --accent: #7bb0f6; --accent2: #3ddc84;
  --font-d: "Trebuchet MS", "Tahoma", sans-serif;
  --font-b: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 10px; --shadow: 0 8px 24px rgba(0, 0, 20, .4);
}

[data-theme="bakugo"] {
  --bg: #050b06; --bg2: #07130b; --panel: #0a140c;
  --line: #17301f; --line2: #1f3d29;
  --text: #d8ffe2; --fg: #d8ffe2; --muted: #6f9a7d;
  --accent: #3ddc84; --accent2: #ff7a18;
  --font-d: "VT323", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 4px; --shadow: 0 0 24px rgba(61, 220, 132, .25);
}

[data-theme="suspicion"] {
  --bg: #0a0a0a; --bg2: #111; --panel: #141414;
  --line: #1a1a1a; --line2: #222;
  --text: #0f0; --fg: #0f0; --muted: #555;
  --accent: #ffb000; --accent2: #0f0;
  --font-d: "JetBrains Mono", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 2px; --shadow: 0 0 24px rgba(0, 255, 0, .15);
}

[data-theme="gnulte"] {
  --bg: #030708; --bg2: #070d0e; --panel: #0a1212;
  --line: #10201f; --line2: #1a2e2c;
  --text: #d6f2ee; --fg: #d6f2ee; --muted: #5f8a86;
  --accent: #00e5ff; --accent2: #0092b5;
  --font-d: "VT323", ui-monospace, monospace;
  --font-b: "IBM Plex Mono", ui-monospace, monospace;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 2px; --shadow: 0 0 24px rgba(0, 229, 255, .22);
}

[data-theme="dark"] {
  --bg: #0e0e13; --bg2: #14141c; --panel: #17171f;
  --line: #262633; --line2: #31313f;
  --text: #e6e6ee; --fg: #e6e6ee; --muted: #8b8b9a;
  --accent: #7c8cf0; --accent2: #4a5bd8;
  --font-d: "Trebuchet MS", "Tahoma", sans-serif;
  --font-b: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 10px; --shadow: 0 8px 24px rgba(0, 0, 10, .5);
}

[data-theme="neon"] {
  --bg: #0a0a16; --bg2: #101024; --panel: #131322;
  --line: #2a2a4a; --line2: #3a3a5e;
  --text: #eeeeff; --fg: #eeeeff; --muted: #8f8fc0;
  --accent: #ff2fd6; --accent2: #00ffd8;
  --font-d: "Trebuchet MS", "Tahoma", sans-serif;
  --font-b: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px; --shadow: 0 0 24px rgba(255, 47, 214, .25);
}

[data-theme="paper"] {
  --bg: #f7f7f4; --bg2: #ffffff; --panel: #ffffff;
  --line: #d9d9cf; --line2: #e8e8e0;
  --text: #1c1c1c; --fg: #1c1c1c; --muted: #6f6f66;
  --accent: #245edb; --accent2: #123a8f;
  --font-d: "Trebuchet MS", "Tahoma", sans-serif;
  --font-b: Georgia, "Times New Roman", serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 8px; --shadow: 0 2px 12px rgba(0, 0, 20, .08);
}

[data-theme] {
  --radius: 10px;
  --shadow: 0 2px 14px rgba(0, 0, 0, .16);
  --glow: 0 0 0 1px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 45%, transparent);
}

[data-theme] { --scale-d: 1; }
[data-theme="tqg"], [data-theme="tst"], [data-theme="dos"], [data-theme="bakugo"], [data-theme="gnulte"] { --scale-d: 1.35; }
[data-theme="webring"] { --scale-d: 1.06; }

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .45s ease, color .45s ease;
  display: flex;
  flex-direction: column;
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'12'%20height%3D'12'%20viewBox%3D'0%200%2012%2012'%3E%3Ccircle%20cx%3D'6'%20cy%3D'6'%20r%3D'4'%20fill%3D'%238a2b2b'%2F%3E%3Ccircle%20cx%3D'6'%20cy%3D'6'%20r%3D'1.7'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E") 6 6, auto;
}

a, button, select, input, label, .wcard, .tpreview, .m-item, .ctl, .ov-close, .set-row {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'7.5'%20fill%3D'none'%20stroke%3D'%230a0a0a'%20stroke-width%3D'1.3'%2F%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'6.2'%20fill%3D'none'%20stroke%3D'%23ffffff'%20stroke-width%3D'2.2'%2F%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'2.1'%20fill%3D'%238a2b2b'%2F%3E%3C%2Fsvg%3E") 12 12, auto;
}

button, a, select, input, label, .wcard, .tpreview, .m-item, .ctl, .ov-close, .chip {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; font-size: inherit; }
::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.bgfx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 12% 8%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(700px 500px at 88% 90%, color-mix(in srgb, var(--accent2) 16%, transparent), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
  transition: background .45s ease;
}
@keyframes drift {
  from { transform: translate3d(-12px, -8px, 0) scale(1); }
  to { transform: translate3d(12px, 10px, 0) scale(1.06); }
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background .45s ease, border-color .45s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 8px 8px 0;
  margin: -8px 0 -8px -8px;
  border-radius: var(--radius);
  transition: background .15s, transform .12s;
}
.brand:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.brand:active { transform: scale(.97); }
.brand-mark {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-m);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--glow);
  animation: markidle 7s ease-in-out infinite;
}
@keyframes markidle {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-2px) rotate(3deg); }
}
.brand-text { min-width: 0; }
.brand-name {
  display: block;
  font-family: var(--font-d);
  font-size: 20px;
  letter-spacing: .05em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-tag {
  display: block;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions { flex: none; display: flex; align-items: center; gap: 10px; }

.home-btn {
  flex: none;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  transition: color .25s, border-color .25s, background .25s, transform .2s;
}
.home-btn svg { width: 18px; height: 18px; }
.home-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.home-btn.active { color: var(--bg); background: var(--accent); border-color: var(--accent); box-shadow: var(--glow); }

.menu-btn {
  flex: none;
  height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  transition: border-color .25s, color .25s, background .25s, transform .2s;
}
.menu-btn svg { width: 18px; height: 18px; }
.menu-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.menu-btn:active { transform: translateY(0); }

/* ---------- stage / views ---------- */

.stage { position: relative; z-index: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 30px 20px 60px; flex: 1; }

.view { display: none; }
.view.active { display: block; animation: viewin .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes viewin {
  from { opacity: 0; transform: translateY(24px) scale(.98); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.hero { text-align: center; padding: 20px 0 10px; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-d);
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 16px;
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-d);
  font-size: calc(clamp(44px, 9vw, 96px) * var(--scale-d, 1));
  line-height: .98;
  letter-spacing: .02em;
  color: var(--accent);
  text-shadow: 0 4px 0 var(--line);
  animation: herowarm 8s ease-in-out infinite alternate;
}
@keyframes herowarm {
  from { text-shadow: 0 4px 0 var(--line), 0 0 0 rgba(0, 0, 0, 0); }
  to { text-shadow: 0 4px 0 var(--line), 0 0 26px color-mix(in srgb, var(--accent) 55%, transparent); }
}
.hero-sub {
  margin: 18px auto 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.section-title {
  font-family: var(--font-d);
  font-size: calc(30px * var(--scale-d, 1));
  letter-spacing: .05em;
  color: var(--text);
  margin: 44px 0 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  background-size: 200% 100%;
  animation: linewash 7s ease-in-out infinite alternate;
}
@keyframes linewash {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}
.section-tag { font-family: var(--font-m); color: var(--muted); font-size: 12px; letter-spacing: .06em; margin-bottom: 18px; }

.webring {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.wcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
  transition: border-color .25s, box-shadow .25s, transform .2s;
  animation: floaty 7s ease-in-out infinite;
}
.wcard:nth-child(3n+2) { animation-delay: .6s; }
.wcard:nth-child(3n+3) { animation-delay: 1.2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.wcard:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-4px); }
.wcard:active { transform: translateY(-1px) scale(.98); }
.wcard-paused { opacity: .55; }
.wcard-paused:hover { opacity: 1; }
.wcard-pause { font-style: normal; font-family: var(--font-m); font-size: 9px; letter-spacing: .08em; border: 1px solid var(--accent); border-radius: 4px; padding: 1px 5px; margin-left: 6px; color: var(--accent); vertical-align: 2px; }
.arch-section { margin-top: 30px; }
.arch-title { font-family: var(--font-m); font-size: 12px; letter-spacing: .14em; color: var(--muted); border-bottom: 1px solid var(--line2); padding-bottom: 6px; }
.arch-note { font-family: var(--font-b); font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wcard-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.wcard-ico svg, .pv-ico svg { width: 100%; height: 100%; }
.wcard-body { flex: 1; min-width: 0; }
.wcard-name { font-family: var(--font-m); font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.wcard-tag {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.wcard-launch { flex-shrink: 0; font-family: var(--font-m); font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--accent); background: transparent; color: var(--accent); text-decoration: none; transition: background .2s, color .2s; }
.wcard-launch:hover { background: var(--accent); color: var(--bg2); }

.news { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.nitem {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nitem b { font-family: var(--font-m); font-size: 12px; letter-spacing: .08em; color: var(--accent); flex: none; }
.nitem p { font-size: 13.5px; line-height: 1.7; }

/* ---------- project view ---------- */

.pv-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pv-ico {
  width: 74px; height: 74px;
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  color: var(--accent);
  box-shadow: var(--shadow);
}
.pv-name {
  font-family: var(--font-d);
  font-size: calc(clamp(34px, 5vw, 56px) * var(--scale-d, 1));
  line-height: 1;
  letter-spacing: .03em;
  color: var(--accent);
  text-shadow: 0 3px 0 var(--line);
}
.pv-tag {
  margin-top: 8px;
  font-family: var(--font-m);
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .06em;
}
.pv-launch {
  margin-left: auto;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  box-shadow: var(--glow);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.3), filter .2s;
}
.pv-launch:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); }

.pv-desc {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.75;
}

.view[data-view="tqg"] .pv-desc, .view[data-view="tst"] .pv-desc, .view[data-view="dos"] .pv-desc,
.view[data-view="bakugo"] .pv-desc { position: relative; overflow: hidden; }
.view[data-view="tqg"] .pv-desc::after, .view[data-view="tst"] .pv-desc::after, .view[data-view="dos"] .pv-desc::after,
.view[data-view="bakugo"] .pv-desc::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
}
.view[data-view="normidian"] .pv-desc { position: relative; overflow: hidden; }
.view[data-view="normidian"] .pv-desc::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  background-image: radial-gradient(rgba(90, 50, 10, .18) 1px, transparent 1px);
  background-size: 5px 5px;
}

.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--text);
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: .04em;
}

.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.pcell {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pcell span { display: block; font-family: var(--font-m); font-size: 10.5px; letter-spacing: .16em; color: var(--muted); margin-bottom: 3px; }
.pcell b { font-family: var(--font-m); font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .04em; word-break: break-word; }

.pv-release {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.pv-release .rl-title { font-family: var(--font-m); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.pv-release b { font-family: var(--font-m); font-size: 13px; font-weight: 700; color: var(--accent); }
.pv-release a { font-family: var(--font-m); font-size: 12.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); padding: 7px 12px; letter-spacing: .06em; }
.pv-release a:hover { background: var(--accent); color: var(--bg); }

.pv-links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.plink {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-m);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--text);
  background: var(--panel);
  transition: border-color .2s, color .2s, transform .2s;
}
.plink:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.about-collapse { border: 0; padding: 0; }
.about-summary {
  display: block;
  cursor: pointer;
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  padding: 10px 0;
  list-style: none;
  transition: color .2s;
}
.about-summary::-webkit-details-marker { display: none; }
.about-summary::marker { display: none; content: ""; }
.about-summary:hover { color: var(--accent2); }
.about-collapse[open] .about-summary { margin-bottom: 4px; }

.pv-gh-desc { margin-top: 10px; font-family: var(--font-m); font-size: 12px; line-height: 1.65; color: var(--muted); font-style: italic; letter-spacing: .02em; padding: 8px 12px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 4px; }

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

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 0;
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
  line-height: 1.5;
  background: var(--bg2);
  transition: border-color .45s ease;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
  gap: 24px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--line);
}
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-logo {
  font-family: var(--font-m);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--accent);
}
.foot-name {
  font-family: var(--font-m);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--fg);
}
.foot-tagline {
  font-family: var(--font-b);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}
.foot-col-title {
  font-family: var(--font-m);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 4px;
}
.foot-col-links a,
.foot-col-links .foot-tldr {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.foot-col-links a:hover { color: var(--accent); text-decoration: underline; }
.foot-tldr { font-size: 11px; line-height: 1.4; }
.foot-tldr strong { color: var(--fg); font-weight: 700; }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  opacity: .7;
}

/* ---------- site entry notification ---------- */

.notify-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.notify-overlay.open { opacity: 1; pointer-events: auto; }
.notify-box {
  width: min(480px, 88vw);
  background: #2563eb;
  color: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(37, 99, 235, .45), 0 0 0 1px rgba(255, 255, 255, .12);
  transform: scale(.92);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1.2);
}
.notify-overlay.open .notify-box { transform: scale(1); }
.notify-box h2 {
  font-family: var(--font-d);
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: .04em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.notify-box p {
  font-family: var(--font-m);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: .03em;
  opacity: .88;
}
.notify-box p b { color: #fbbf24; font-weight: 700; }
.notify-arrow {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin: 18px 0 8px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  position: relative;
  animation: notifypulse 1.8s ease-in-out infinite;
}
.notify-arrow::after {
  content: "\2190";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
@keyframes notifypulse {
  0%, 100% { transform: translateX(0); opacity: .7; }
  50% { transform: translateX(-8px); opacity: 1; }
}
.notify-dismiss {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: .14em;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.notify-dismiss:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .5); }
.notify-settings-hint {
  margin-top: 14px;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: .08em;
  opacity: .6;
}
.notify-settings-hint b { color: #fbbf24; }

/* ---------- overlays ---------- */

.menu-overlay, .settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.menu-overlay.open, .settings-overlay.open { opacity: 1; pointer-events: auto; }

.menu-overlay { justify-content: flex-end; }
.menu-panel {
  width: min(420px, 92vw);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(0, 0, 0, .25);
  padding: 16px;
  overflow-y: auto;
  transform: translateX(30px);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-overlay.open .menu-panel { transform: none; }

.menu-list { display: flex; flex-direction: column; gap: 8px; }
.m-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.m-item svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.m-item b { font-family: var(--font-m); font-size: 12px; letter-spacing: .08em; display: block; }
.m-item small { display: block; font-family: var(--font-m); font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.m-item:hover { border-color: var(--accent); color: var(--accent); transform: translateX(3px); }
.m-item.active { border-color: var(--accent); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.m-sep { height: 1px; background: var(--line); margin: 6px 2px; flex: none; }

.settings-overlay { justify-content: center; align-items: flex-start; padding: 36px 16px; }
.settings-panel {
  width: min(720px, 100%);
  max-height: min(780px, 88vh);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.settings-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.settings-head h2 { font-family: var(--font-d); font-size: 26px; letter-spacing: .05em; color: var(--accent); }
.settings-body { padding: 18px 20px 28px; }

.ov-close {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  transition: color .2s, border-color .2s;
}
.ov-close:hover { color: var(--accent); border-color: var(--accent); }

.set-section { margin-bottom: 24px; }
.set-section-title {
  font-family: var(--font-d);
  font-size: 19px;
  letter-spacing: .08em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.set-section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.set-hint { font-family: var(--font-m); color: var(--muted); font-size: 12px; letter-spacing: .03em; margin-bottom: 14px; }

.tprev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tpreview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  padding: 8px;
  text-align: left;
  color: inherit;
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.2), border-color .2s, box-shadow .2s;
}
.tpreview:hover { transform: translateY(-3px); border-color: var(--accent); }
.tpreview.active { border-color: var(--accent); box-shadow: var(--glow); }
.tprev-ui {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  border-radius: calc(var(--radius) * .6);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 8px;
  overflow: hidden;
}
.tprev-bar { display: block; height: 9px; border-radius: 2px; background: var(--accent); margin-bottom: 7px; }
.tprev-panel { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 7px; }
.tprev-t { display: block; font-family: var(--font-m); font-size: 12px; line-height: 1; color: var(--accent); white-space: nowrap; overflow: hidden; }
.tprev-line { display: block; height: 4px; width: 70%; background: var(--line2); border-radius: 2px; margin: 6px 0; }
.tprev-btn { display: inline-block; font-family: var(--font-m); font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--bg); background: var(--accent); border-radius: 2px; padding: 2px 9px; }
.tprev-name { display: block; margin-top: 7px; font-family: var(--font-m); font-size: 11px; letter-spacing: .08em; color: var(--text); }
.tpreview.active .tprev-name { color: var(--accent); }

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  margin-bottom: 8px;
}
.set-row > span { font-family: var(--font-m); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--text); }
.set-row small { display: block; font-family: var(--font-m); font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: .02em; margin-top: 2px; }

.ctl { display: flex; align-items: center; gap: 7px; user-select: none; flex: none; }
.ctl-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ctl-box {
  position: relative;
  width: 34px; height: 19px;
  border-radius: 10px;
  background: var(--line2);
  transition: background .3s;
  flex: none;
}
.ctl-box::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--panel);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.3);
}
.ctl-toggle input:checked + .ctl-box { background: var(--accent); }
.ctl-toggle input:checked + .ctl-box::after { transform: translateX(15px); }

/* ---------- swap overlay ---------- */

.swap {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, background .45s ease;
  font-family: var(--font-m);
}
.swap.open { opacity: 1; pointer-events: auto; }

.swap-piece {
  position: relative;
  width: min(400px, 88vw);
  height: 230px;
  display: grid;
  place-items: center;
}

.swap-title {
  font-family: var(--font-d);
  font-size: calc(clamp(26px, 6vw, 44px) * var(--scale-d, 1));
  letter-spacing: .12em;
  color: var(--accent);
  text-align: center;
  text-shadow: 0 3px 0 var(--line);
}

.swap-progress {
  width: min(340px, 80vw);
  height: 3px;
  border-radius: 2px;
  background: var(--line2);
  overflow: hidden;
}
.swap-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: var(--glow);
}
.swap.open .swap-progress span { animation: swapfill 3s cubic-bezier(.35, 0, .3, 1) forwards; }
@keyframes swapfill { to { width: 100%; } }

.swap-skip {
  position: absolute;
  bottom: 16px;
  right: 18px;
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--muted);
}

.sw-cv { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; filter: grayscale(1) contrast(1.1); }
.sw-crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
  animation: swapflicker .12s steps(2) infinite;
}
.sw-pct {
  position: relative;
  z-index: 2;
  font-family: "VT323", ui-monospace, monospace;
  font-size: clamp(40px, 8vw, 64px);
  color: var(--accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: swapflicker .1s steps(3) infinite;
}
.sw-line {
  position: relative;
  z-index: 2;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--muted);
  margin-top: 10px;
}
@keyframes swapflicker { 0% { opacity: .86; } 50% { opacity: 1; } 100% { opacity: .9; } }

.sw-drive {
  position: relative;
  width: 230px;
  height: 96px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--panel), #0c0c0c);
  border: 2px solid var(--line);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.sw-drive::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 24px; height: 2px;
  background: var(--line2);
}
.sw-disk {
  position: absolute;
  left: 16px; top: 16px;
  width: 112px; height: 64px;
  border-radius: 4px;
  background: linear-gradient(180deg, #3b3b44, #23232a);
  border: 1px solid #555;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, .5);
  transform: translateX(-150px);
}
.sw-disk b { position: absolute; left: 8px; top: 5px; font-size: 8px; letter-spacing: .05em; color: #bbb; }
.sw-disk i { position: absolute; left: 8px; bottom: 8px; width: 26px; height: 6px; background: #8a6d1a; border-radius: 1px; }
.sw-led {
  position: absolute;
  right: 10px; top: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e04532;
  box-shadow: 0 0 8px #e04532;
}
.sw-caption {
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
  margin-top: 16px;
  opacity: 0;
}
#swap[data-t="tst"] .swap-piece .sw-disk { animation: swdisk 1s cubic-bezier(.3, .8, .4, 1.2) .3s both; }
@keyframes swdisk { to { transform: translateX(0); } }
#swap[data-t="tst"] .swap-piece .sw-led { animation: swblink 1s steps(1) infinite 1.5s; }
#swap[data-t="tst"] .swap-piece .sw-caption { animation: swapfade .6s ease 1.7s both; }
@keyframes swblink { 50% { opacity: .15; } }
@keyframes swapfade { from { opacity: 0; transform: translateY(8px); } }

.sw-parch {
  position: relative;
  width: min(360px, 86vw);
  padding: 24px 26px 30px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f2e4c4, #e0c185);
  box-shadow: 0 4px 0 rgba(60, 34, 8, .35);
}
.sw-parch::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px; background: rgba(92, 61, 22, .25); }
.sw-old {
  position: absolute; left: 26px; top: 24px;
  font-family: Georgia, serif;
  font-size: 26px;
  color: rgba(63, 44, 15, .55);
}
.sw-rune {
  position: relative;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #3f2c0f;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  height: 34px;
}
#swap[data-t="normidian"] .swap-piece .sw-old { animation: swfadeout 1.4s ease .8s both; }
#swap[data-t="normidian"] .swap-piece .sw-rune { animation: swtype 1.5s steps(4) .8s both; }
@keyframes swfadeout { to { opacity: 0; } }
@keyframes swtype { to { width: 100%; } }

.sw-term {
  width: min(400px, 88vw);
  border-radius: 6px;
  overflow: hidden;
  background: #0a0a0a;
  border: 2px solid #333;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .4);
  text-align: left;
}
.sw-term-bar {
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: linear-gradient(180deg, #1a1a22, #0e0e14);
  color: #999;
  font-size: 10px;
  letter-spacing: .18em;
  border-bottom: 1px solid #222;
}
.sw-term-body {
  position: relative;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: clamp(12px, 2vw, 15px);
  color: #fff;
}
.sw-term-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.sw-tl { opacity: 0; }
.sw-tl b { color: #ffff55; font-weight: 400; }
.sw-cur { color: #fff; animation: swblink .8s steps(1) infinite; }
#swap[data-t="dos"] .swap-piece .sw-term { animation: swapfade .5s ease .2s both; }
#swap[data-t="dos"] .swap-piece .sw-tl { animation: swl 1s ease both; }
#swap[data-t="dos"] .swap-piece .sw-tl:nth-child(2) { animation-delay: .7s; }
#swap[data-t="dos"] .swap-piece .sw-tl:nth-child(3) { animation-delay: 1.4s; }
#swap[data-t="dos"] .swap-piece .sw-tl:nth-child(4) { animation-delay: 2s; }
@keyframes swl { to { opacity: 1; } }

.sw-win {
  width: min(360px, 86vw);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--accent2);
  box-shadow: 0 10px 30px rgba(0, 0, 20, .5);
}
.sw-win-bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: linear-gradient(180deg, #4fa4ff, #245edb);
}
.sw-win-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .65); }
.sw-win-bar span { margin-left: auto; font-family: var(--font-m); font-weight: 700; font-size: 10px; color: #fff; letter-spacing: .12em; }
.sw-win-body {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f8;
}
.sw-win-body b {
  font-family: var(--font-m);
  font-weight: 900;
  font-size: 22px;
  color: #0a2463;
  letter-spacing: .04em;
}
.sw-dots { display: flex; gap: 8px; margin-top: 14px; }
.sw-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: swdot 1s ease-in-out infinite; }
.sw-dots i:nth-child(2) { animation-delay: .15s; }
.sw-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes swdot { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
#swap[data-t="neptuneos"] .swap-piece .sw-win { animation: swwin 1s cubic-bezier(.2, .8, .3, 1.1) .3s both; }
#swap[data-t="neptuneos"] .swap-piece .sw-win-body b { animation: swapfade .7s cubic-bezier(.2, .9, .3, 1.3) 1.1s both; }
@keyframes swwin { from { opacity: 0; transform: translateY(-26px) scale(.92); } }

.sw-conn { position: relative; width: min(380px, 88vw); height: 210px; }
.sw-node {
  position: absolute;
  top: 50%;
  width: 44px; height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-m);
  font-weight: 700;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.sw-node.a { left: 8px; background: var(--accent); color: var(--bg); }
.sw-node.b { right: 8px; background: var(--accent2); color: var(--bg); }
.sw-link {
  position: absolute;
  left: 60px; right: 60px; top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
  animation: swlink 1s ease .4s both;
}
@keyframes swlink { from { transform: scaleX(0); } }
.sw-msg {
  position: absolute;
  max-width: 150px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  opacity: 0;
}
.sw-msg.m1 { left: 58px; top: 26px; }
.sw-msg.m2 { right: 58px; top: 118px; }
#swap[data-t="dropchat"] .swap-piece .sw-msg.m1 { animation: swapfade .45s cubic-bezier(.2, .9, .3, 1.3) 1.1s both; }
#swap[data-t="dropchat"] .swap-piece .sw-msg.m2 { animation: swapfade .45s cubic-bezier(.2, .9, .3, 1.3) 1.8s both; }

.sw-net { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sw-spin {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  animation: swspin 2s steps(20) infinite;
}
@keyframes swspin { to { transform: rotate(360deg); } }
.sw-flat { width: 120px; height: 26px; position: relative; }
.sw-flat i {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--accent);
  animation: swflat 1.2s steps(4) infinite;
}
@keyframes swflat {
  0% { transform: scaleX(1); }
  25% { transform: scaleX(.5); }
  50% { transform: scaleX(1); }
  75% { transform: scaleX(.2); }
  100% { transform: scaleX(1); }
}
.sw-lag {
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
  animation: swblink 1.1s steps(1) infinite;
}

.sw-cam {
  position: relative;
  width: min(380px, 88vw);
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #14321f, #060d08 75%);
  border: 2px solid var(--accent);
}
.sw-camrec {
  position: absolute;
  top: 8px; left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: #ff3b30;
  animation: swblink 1.4s steps(1) infinite;
}
.sw-cross {
  position: absolute;
  left: 50%; top: 50%;
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  border: 1px solid rgba(63, 220, 132, .55);
  border-radius: 50%;
  animation: swlock 1.4s ease .8s both;
}
.sw-cross::before, .sw-cross::after { content: ""; position: absolute; background: rgba(63, 220, 132, .55); }
.sw-cross::before { left: 50%; top: -6px; bottom: -6px; width: 1px; }
.sw-cross::after { top: 50%; left: -6px; right: -6px; height: 1px; }
.sw-target {
  position: absolute;
  font-size: 20px;
  color: #3ddc84;
  text-shadow: 0 0 14px rgba(61, 220, 132, .8);
  animation: swtrack 3s ease-in-out .6s both;
}
@keyframes swlock { from { transform: scale(1.6); opacity: 0; } }
@keyframes swtrack {
  0% { left: 22%; top: 22%; }
  30% { left: 66%; top: 32%; }
  60% { left: 58%; top: 66%; }
  100% { left: 22%; top: 22%; }
}

/* ---------- cursor ring ---------- */

.cur-ring {
  position: fixed;
  left: 0; top: 0;
  width: 34px; height: 34px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-200px, -200px, 0);
  will-change: transform;
}
.cur-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: scale(.6);
  opacity: .85;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.3), border-color .18s;
}
.cur-ring.on { opacity: 1; }
.cur-ring.on::after { transform: scale(1); }
.cur-ring.big::after { transform: scale(1.55); border-color: var(--accent2); }

/* ---------- reduced motion ---------- */

html.rm *, html.rm *::before, html.rm *::after {
  animation-duration: .001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001s !important;
}
html.rm .cur-ring { display: none; }
html.rm .bgfx { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .swap.open .swap-progress span { animation: none; width: 100%; }
  .cur-ring { display: none; }
  .bgfx { animation: none; }
}

/* ---------- responsive / touch ---------- */

@media (hover: none) {
  * { cursor: auto !important; }
  .cur-ring { display: none; }
}

@media (max-width: 760px) {
  .top { padding: 0 14px; height: 60px; }
  .brand-mark { width: 36px; height: 36px; font-size: 15px; }
  .brand-name { font-size: 16px; }
  .brand-tag { display: none; }
  .menu-btn { height: 40px; padding: 0 14px; }
  .menu-btn span { display: none; }
  .stage { padding: 22px 14px 48px; }
  .pv-head { flex-direction: column; align-items: flex-start; }
  .pv-launch { margin-left: 0; width: 100%; }
  .swap-piece { height: 200px; }
  .settings-overlay { padding: 20px 10px; }
  .settings-head { padding: 13px 14px; }
  .settings-head h2 { font-size: 22px; }
  .settings-body { padding: 14px 14px 22px; }
  .tprev-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
}

/* ---------- hero kicker idle cursor ---------- */

.hero-kicker::after {
  content: "";
  display: inline-block;
  width: 8px; height: 14px;
  margin-left: 6px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blip 1s steps(1) infinite;
}

/* ---------- macOS window cards ---------- */

.pv-card {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--panel) 40%, transparent);
  border-bottom: 1px solid var(--line2);
}
.win-bar i { width: 11px; height: 11px; border-radius: 50%; }
.win-bar .w-r { background: #ff5f57; }
.win-bar .w-y { background: #febc2e; }
.win-bar .w-g { background: #28c840; }
.win-bar span { margin-left: 10px; font-family: var(--font-m); font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-body { padding: 16px 18px; }
.pv-card .pv-desc {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}
.pv-card .pv-grid, .pv-card .pv-chips, .pv-card .pv-release, .pv-card .pv-links { margin-top: 0; }

.pv-launch {
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, #ffffff 18%, var(--accent)), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, var(--shadow);
}

.ai-note {
  margin-top: 12px;
  padding: 8px 12px;
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- rail (left-edge switcher) ---------- */

.rail-wrap { position: fixed; left: 0; top: 0; bottom: 0; width: 0; z-index: 130; pointer-events: none; }
.rail-wrap > * { pointer-events: auto; }
.rail-zone { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; }
.rail {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 4;
  width: 232px;
  max-height: 86vh;
  overflow-y: auto;
  transform: translateY(-50%) translateX(-108%);
  transition: transform .45s cubic-bezier(.22, 1.18, .35, 1), width .35s cubic-bezier(.22, 1.18, .35, 1);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 4px 8px 28px rgba(0, 0, 0, .25);
  padding: 12px 12px 14px;
}
.rail-wrap:hover .rail { transition-delay: .08s; }
.rail-wrap:not(:hover) .rail { transition-delay: .18s; }
.rail-wrap:hover .rail, .rail.open { transform: translateY(-50%) translateX(0); }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.rail-title { font-family: var(--font-m); font-size: 10px; letter-spacing: .24em; color: var(--muted); margin: 0 0 0 10px; }
.r-collapse {
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .5);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.r-collapse:hover { color: var(--accent); border-color: var(--accent); }
.rail.collapsed { width: 64px; padding: 12px 8px 14px; }
.rail.collapsed .rail-title { display: none; }
.rail.collapsed .rail-head { justify-content: center; }
.rail.collapsed .rail-list { gap: 4px; }
.rail.collapsed .r-item { justify-content: center; padding: 9px 0; }
.rail.collapsed .r-item b, .rail.collapsed .r-sep { display: none; }
.r-item.dockbounce { animation: dockbounce .65s cubic-bezier(.3, 1.1, .4, 1); }
@keyframes dockbounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-9px) scale(1.15); }
  55% { transform: translateY(2px) scale(.98); }
  75% { transform: translateY(-4px) scale(1.06); }
}
.rail-list { display: flex; flex-direction: column; gap: 2px; }
.r-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: calc(var(--radius) * .7);
  text-align: left;
  transition: background .2s, color .2s;
}
.r-item svg { width: 19px; height: 19px; flex: none; color: var(--accent); }
.r-item b { font-family: var(--font-m); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.r-item:hover, .r-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.r-item.active b { color: var(--accent); }
.r-sep { height: 1px; background: var(--line); margin: 7px 10px; }

.rail-tab {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 26px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, .2);
  color: var(--accent);
  animation: tabnudge 5s ease-in-out infinite;
  transition: background .2s, border-color .2s;
}
.rail-tab span { display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.rail-wrap:hover .rail-tab, .rail-tab:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@keyframes tabnudge { 0%, 90%, 100% { transform: translateY(-50%) translateX(0); } 94% { transform: translateY(-50%) translateX(3px); } }
.rail-wrap:hover .rail-tab, .rail.open .rail-tab { animation: none; }
@media (hover: none) {
  .rail-zone { display: none; }
}
@media (hover: hover) {
  .rail-tab { display: none; }
}

/* ---------- news broadcast ---------- */

.news-masthead { text-align: center; padding: 8px 0 16px; border-bottom: 3px solid var(--accent); }
.news-logo { font-family: var(--font-d); font-size: calc(clamp(34px, 6vw, 54px) * var(--scale-d, 1)); letter-spacing: .02em; color: var(--accent); }
.news-tag { display: block; margin-top: 4px; font-family: var(--font-m); font-size: 11px; letter-spacing: .22em; color: var(--muted); }
.news-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.news-nav span {
  cursor: pointer;
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}
.news-nav span:hover { color: var(--accent); border-color: var(--accent); }
.news-nav span.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.ticker {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  overflow: hidden;
}
.tick-live { display: inline-flex; align-items: center; gap: 6px; flex: none; font-family: var(--font-m); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blip 1.8s ease-in-out infinite; }
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.tick-track { flex: 1; white-space: nowrap; overflow: hidden; }
.tick-track .tt { display: inline-block; padding-left: 100%; animation: marq 48s linear infinite; font-family: var(--font-m); font-size: 12.5px; letter-spacing: .03em; }
@keyframes marq { to { transform: translateX(-100%); } }

.breaking {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: var(--glow);
}

.news-feature {
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel) 60%);
  box-shadow: var(--shadow);
}
.nf-body { padding: 20px 22px; }
.ncat { display: inline-block; font-family: var(--font-m); font-size: 10px; letter-spacing: .2em; color: var(--bg); background: var(--accent); padding: 3px 9px; border-radius: 4px; }
.nf-body h3 { font-family: var(--font-d); font-size: calc(26px * var(--scale-d, 1)); color: var(--accent); margin: 10px 0 6px; line-height: 1.1; }
.nf-body p { font-size: 14px; line-height: 1.7; }
.nmeta { display: block; margin-top: 10px; font-family: var(--font-m); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.nmeta b { color: var(--accent); font-weight: 500; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 14px; }
.ncard {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ncard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.ncard h3 { font-family: var(--font-d); font-size: calc(19px * var(--scale-d, 1)); color: var(--text); margin: 8px 0 6px; line-height: 1.15; }
.ncard p { font-size: 13px; line-height: 1.65; color: var(--muted); }

.news-note { margin-top: 18px; text-align: center; font-family: var(--font-m); font-size: 11px; color: var(--muted); letter-spacing: .06em; }

/* ---------- contact ---------- */

.contact-head { text-align: center; padding: 14px 0 4px; }
.contact-head h2 { font-family: var(--font-d); font-size: calc(clamp(30px, 5vw, 48px) * var(--scale-d, 1)); color: var(--accent); }
.contact-head p { font-family: var(--font-m); font-size: 12px; letter-spacing: .16em; color: var(--muted); margin-top: 6px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.contact-card { padding: 16px 18px; }
.contact-card .cc-label { font-family: var(--font-m); font-size: 10px; letter-spacing: .22em; color: var(--muted); }
.contact-card .cc-value { font-family: var(--font-b); font-size: 16px; letter-spacing: .03em; color: var(--accent); margin-top: 6px; word-break: break-word; }
.contact-card .cc-value a { color: var(--accent); }
.contact-card .cc-value a:hover { text-decoration: underline; }
.contact-card .cc-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

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

.news-go { display: block; margin: 18px auto 0; }
.menu-now { font-family: var(--font-m); font-size: 11px; letter-spacing: .1em; color: var(--muted); padding: 2px 6px 8px; }
.menu-now b { color: var(--accent); font-weight: 500; }
.contact-grid .pv-card { margin-top: 0; }

.foot-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  font-family: var(--font-m);
  font-size: 11.5px;
  letter-spacing: .05em;
}
.foot-contacts a { color: var(--accent); }
.foot-contacts a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .news-nav span { font-size: 11px; padding: 5px 9px; }
  .rail { width: 210px; }
  .contact-head h2 { font-size: calc(30px * var(--scale-d, 1)); }
}

.ncard.hide { display: none; }

/* ---------- onboarding toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  width: min(420px, calc(100vw - 32px));
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35), var(--glow);
  padding: 14px 16px;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2, .8, .3, 1), opacity .35s;
}
.toast.open { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.toast-head b { font-family: var(--font-m); font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.toast-x {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: .12em;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.toast-x:hover { color: var(--accent); border-color: var(--accent); }
.toast p { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.toast p b { color: var(--accent); }

/* ---------- investors (NEPT INC) ---------- */

.inv-head { text-align: center; padding: 14px 0 4px; }
.inv-head h2 { font-family: var(--font-d); font-size: calc(clamp(30px, 5vw, 48px) * var(--scale-d, 1)); color: var(--accent); }
.inv-head p { font-family: var(--font-m); font-size: 12px; letter-spacing: .16em; color: var(--muted); margin-top: 6px; }

.inv-corp { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 18px 0 16px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .3s; }
.inv-corp:hover { border-color: var(--accent); }
.inv-corp-item { text-align: center; }
.inv-corp-item span { display: block; font-family: var(--font-m); font-size: 10px; letter-spacing: .18em; color: var(--muted); }
.inv-corp-item b { display: block; font-family: var(--font-b); font-size: 16px; font-weight: 700; letter-spacing: .04em; color: var(--accent); margin-top: 2px; }

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.inv-stat { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.inv-stat:hover { border-color: var(--accent); box-shadow: var(--glow); }
.inv-stat span { display: block; font-family: var(--font-m); font-size: 10px; letter-spacing: .18em; color: var(--muted); margin-bottom: 4px; }
.inv-stat b { font-family: var(--font-b); font-size: 18px; font-weight: 700; letter-spacing: .03em; color: var(--accent); }

.inv-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 13px; }
.inv-table th { font-family: var(--font-m); font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--line); }
.inv-table td { padding: 9px 10px; border-bottom: 1px dashed var(--line); font-family: var(--font-b); font-size: 13px; line-height: 1.5; vertical-align: top; }
.inv-table td b { font-weight: 700; color: var(--accent); }
.inv-table td.grn { color: #43d97a; font-weight: 700; }
.inv-table td.red { color: #ff5c5c; font-weight: 700; }
.inv-table tr:last-child td { border-bottom: 0; }
.inv-consensus { margin-top: 12px; font-family: var(--font-m); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.inv-consensus b { color: var(--accent); font-weight: 700; }
.inv-footnote { margin-top: 12px; font-family: var(--font-m); font-size: 11px; letter-spacing: .04em; color: var(--muted); font-style: italic; }

.stock { padding: 6px 0 2px; }
.stock-price { display: flex; align-items: baseline; gap: 12px; }
.stock-price b { font-family: var(--font-b); font-size: clamp(36px, 6vw, 52px); font-weight: 700; color: var(--accent); line-height: 1; }
.stock-price span { font-family: var(--font-m); font-size: 14px; letter-spacing: .14em; color: var(--muted); }
.stock-change { font-family: var(--font-m); font-size: 15px; letter-spacing: .08em; color: var(--accent); margin-top: 4px; }
.stock-change.red { color: #ff5c5c; }
.stock-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-family: var(--font-m); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.stock-facts b { color: var(--accent); font-weight: 500; }
.inv-chart-wrap { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 6px; overflow: hidden; transition: border-color .3s; }
.inv-chart-wrap:hover { border-color: var(--accent); }
.nep-chart { width: 100%; height: auto; display: block; }
.inv-chart-ranges { display: flex; gap: 3px; margin-bottom: 8px; }
.inv-range { font-family: var(--font-m); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.inv-range:hover { background: var(--line2); border-color: var(--accent); }
.inv-range.on { background: var(--accent); color: var(--bg2); border-color: var(--accent); }
.inv-range:active { transform: scale(.95); }

.nep-chart { cursor: crosshair; }
.chart-tooltip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-family: var(--font-m); font-size: 11px; color: var(--fg); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 10; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.chart-tooltip.show { opacity: 1; }
.tt-row { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.tt-row b { letter-spacing: .02em; }
.tt-row span { color: var(--muted); font-size: 11px; }
.tt-lbl { font-size: 9px; letter-spacing: .08em; font-weight: 700; color: var(--muted); min-width: 36px; }
.chart-crosshair-v { position: absolute; top: 0; width: 1px; height: 100%; background: var(--muted); opacity: .35; pointer-events: none; display: none; z-index: 5; }

.filing-list, .board-list { list-style: none; margin: 0; }
.filing-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-family: var(--font-m); font-size: 12px; letter-spacing: .03em; }
.filing-list li:last-child, .board-list li:last-child { border-bottom: 0; }
.filing-list li b { color: var(--accent); font-weight: 500; flex: none; }
.filing-list li span { color: var(--muted); text-align: right; }
.board-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.board-list li b { color: var(--accent); font-weight: 500; flex: none; }
.board-list li span { color: var(--muted); text-align: right; font-family: var(--font-m); font-size: 11px; }

.tl-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-item .tl-yr { flex: none; width: 64px; font-family: var(--font-m); font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.tl-item .tl-txt { font-size: 13.5px; line-height: 1.6; }

.disf-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; line-height: 1.6; }
.disf-item:last-child { border-bottom: 0; }
.disf-item .d-marker { flex: none; color: var(--accent); font-family: var(--font-m); }
.disf-item b { color: var(--accent); font-weight: 500; }

/* ---------- entrance (slide + typed titles) ---------- */

.view.active > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2, .8, .3, 1) var(--ed, 0s), transform .55s cubic-bezier(.2, .8, .3, 1) var(--ed, 0s);
}
.view.active.entered > * { opacity: 1; transform: none; }
.rm .view.active > * { transition: none; opacity: 1; transform: none; }

/* ---------- forum ---------- */

.forum-head { text-align: center; padding: 14px 0 4px; }
.forum-head h2 { font-family: var(--font-d); font-size: calc(clamp(30px, 5vw, 48px) * var(--scale-d, 1)); color: var(--accent); }
.forum-head p { font-family: var(--font-m); font-size: 12px; letter-spacing: .16em; color: var(--muted); margin-top: 6px; }
.forum { display: flex; flex-direction: column; gap: 10px; }
.forum-name { display: flex; gap: 8px; }
.forum-name input, .forum-send input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .7);
  padding: 10px 12px;
  font-family: var(--font-m);
  font-size: 13px;
  letter-spacing: .03em;
}
.forum-name input:focus, .forum-send input:focus { outline: none; border-color: var(--accent); }
.forum-status { font-family: var(--font-m); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.forum-status.live { color: var(--accent); }
.forum-msgs {
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .7);
  padding: 12px;
}
.chat-msg {
  padding: 8px 10px;
  border-radius: calc(var(--radius) * .7);
  background: var(--panel);
  border: 1px solid var(--line);
  animation: chatpop .25s ease both;
}
@keyframes chatpop { from { opacity: 0; transform: translateY(6px); } }
.chat-msg.me { border-color: var(--accent); }
.chat-msg b { font-family: var(--font-m); font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.chat-msg .t { float: right; font-family: var(--font-m); font-size: 10px; color: var(--muted); }
.chat-msg p { margin-top: 4px; font-size: 13px; line-height: 1.55; word-break: break-word; }
.forum-send { display: flex; gap: 8px; }
.forum-send button {
  flex: none;
  height: 42px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: calc(var(--radius) * .7);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: .14em;
}
.forum-send button:hover { filter: brightness(1.1); }
.forum .pv-launch { height: 42px; padding: 0 14px; }

/* ---------- previews ---------- */

.preview-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ppick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: .05em;
  transition: border-color .2s, color .2s, background .2s;
}
.ppick svg { width: 17px; height: 17px; color: var(--accent); }
.ppick:hover { border-color: var(--accent); color: var(--accent); }
.ppick.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.ppick.active svg { color: var(--bg); }
.preview-card { margin-top: 0; }
.preview-body { padding: 10px; }
.preview-body iframe {
  width: 100%;
  height: 480px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .6);
  background: #111;
  display: block;
}
.preview-actions { padding: 10px 14px 14px; display: flex; justify-content: flex-end; gap: 8px; }
.preview-actions .pv-launch { margin-left: auto; }
@media (max-width: 760px) { .preview-body iframe { height: 340px; } }

/* ---------- live market ---------- */

.stock-change.grn { color: #43d97a; }
.stock-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blip 1.8s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: 1px;
}
.tick-nep { color: var(--accent); }

/* ---------- simple mode ---------- */

.simple .foot-contacts { display: none; }

/* ---------- tqg swap remake ---------- */

.sw-tty {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.sw-tty-pct {
  font-family: "VT323", ui-monospace, monospace;
  font-size: clamp(34px, 7vw, 56px);
  color: var(--accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: swapflicker .1s steps(3) infinite;
  line-height: 1;
}
.sw-tty-lines {
  min-height: 18px;
  text-align: center;
  font-family: "VT323", ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: .14em;
  color: var(--text);
}
.sw-blk {
  display: inline-block;
  width: 9px;
  height: 16px;
  background: var(--accent);
  animation: swblink .8s steps(1) infinite;
  margin-left: 2px;
  vertical-align: -2px;
}
.sw-tear {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: .5;
  mix-blend-mode: screen;
  animation: tear 1.4s steps(2) infinite;
}
@keyframes tear { 0%, 100% { top: 34%; } 25% { top: 58%; } 50% { top: 22%; } 75% { top: 72%; } }

.fly-ico {
  position: fixed;
  z-index: 320;
  pointer-events: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}
.fly-ico svg { width: 34px; height: 34px; color: var(--accent); filter: drop-shadow(0 0 10px var(--accent)); }

.idle .wcard { animation: floatybig 3.2s ease-in-out infinite; }
.idle .wcard:nth-child(odd) { animation-delay: .15s; }
@keyframes floatybig { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.idle .hero-title { animation: herowarm 2.6s ease-in-out infinite alternate; }
.idle .section-title::after { animation: linewash 2.6s ease-in-out infinite alternate; }
.idle .live-dot, .idle .stock-live { animation-duration: .55s; }
.idle .hero-kicker { animation: kickglow 2.2s ease-in-out infinite alternate; }
@keyframes kickglow { to { box-shadow: var(--glow); } }
.idle .brand-mark { animation: brandpulse 2.4s ease-in-out infinite alternate; }
@keyframes brandpulse { to { filter: drop-shadow(0 0 10px var(--accent)); } }

.notif-stack { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none; max-width: 360px; }
.notif { pointer-events: all; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 14px 16px; box-shadow: 0 8px 32px rgba(0,0,0,.55); opacity: 1; transform: translateY(0); transition: opacity .4s, transform .4s; }
.notif.notif-out { opacity: 0; transform: translateY(16px); pointer-events: none; }
.notif-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notif-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }
.notif-icon svg { width: 100%; height: 100%; }
.notif-title { font-family: var(--font-b); font-size: 13px; color: var(--fg); letter-spacing: .02em; flex: 1; }
.notif-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 2px; line-height: 1; transition: color .2s; }
.notif-x:hover { color: var(--fg); }
.notif-body { font-family: var(--font-m); font-size: 11px; color: var(--muted); line-height: 1.5; margin: 0; letter-spacing: .02em; }
@media (max-width: 600px) { .notif-stack { right: 12px; bottom: 12px; max-width: 280px; } }

.home-ticker { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 auto 20px; max-width: 560px; transition: border-color .3s; }
.home-ticker:hover { border-color: var(--accent); }
.home-ticker-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.home-ticker-label { font-family: var(--font-b); font-size: 12px; letter-spacing: .06em; color: var(--fg); display: flex; align-items: center; gap: 6px; }
.home-ticker-label .stock-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: blip 1.8s ease-in-out infinite; }
.home-ticker-price { font-family: var(--font-m); font-size: 22px; font-weight: 700; color: var(--fg); letter-spacing: .02em; }
.home-ticker-chg { font-family: var(--font-m); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.home-ticker-chg.grn { color: #43d97a; }
.home-ticker-go { margin-left: auto; font-family: var(--font-m); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.home-ticker-go:hover { background: var(--accent); color: var(--bg2); border-color: var(--accent); }
.home-chart { width: 100%; height: 60px; display: block; }

.home-updates { max-width: 560px; margin: 0 auto 20px; }
.home-updates-title { font-family: var(--font-m); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.home-updates-list { display: flex; flex-direction: column; gap: 6px; }
.home-update { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, background .2s; cursor: pointer; }
.home-update:hover { border-color: var(--accent); background: var(--line2); }
.home-update-icon { width: 28px; height: 28px; flex-shrink: 0; color: var(--accent); }
.home-update-icon svg { width: 100%; height: 100%; }
.home-update-info { flex: 1; min-width: 0; }
.home-update-name { font-family: var(--font-b); font-size: 12px; color: var(--fg); letter-spacing: .02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-update-text { font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .03em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-update-time { font-family: var(--font-m); font-size: 9px; color: var(--muted); letter-spacing: .04em; flex-shrink: 0; opacity: .7; }
@media (max-width: 600px) { .home-ticker { margin: 0 12px 16px; } .home-updates { margin: 0 12px 16px; } }

/* ---------- scroll to top ---------- */

.scroll-top { position: fixed; bottom: 28px; right: 28px; z-index: 900; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-family: var(--font-m); font-size: 18px; font-weight: 700; cursor: pointer; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .35s, transform .35s, background .2s, color .2s, border-color .2s; box-shadow: var(--shadow); }
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { background: var(--accent); color: var(--bg2); border-color: var(--accent); }

/* ---------- page transitions ---------- */

.view { opacity: 0; transition: opacity .3s ease; }
.view.active { opacity: 1; }
.view.entering { animation: viewFadeIn .3s ease forwards; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- update badge on wcard ---------- */

.wcard-updated { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); animation: updatePulse 2s ease-in-out infinite; pointer-events: none; }
@keyframes updatePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(138, 43, 43, .5); } 50% { box-shadow: 0 0 0 5px rgba(138, 43, 43, 0); } }
.wcard { position: relative; }

/* ---------- recently visited section ---------- */

.home-recent { max-width: 560px; margin: 0 auto 20px; }
.home-recent-title { font-family: var(--font-m); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.home-recent-list { display: flex; gap: 8px; flex-wrap: wrap; }
.home-recent-chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-family: var(--font-m); font-size: 11px; color: var(--fg); transition: border-color .2s, background .2s; }
.home-recent-chip:hover { border-color: var(--accent); background: var(--line2); }
.home-recent-chip svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* ---------- project changelog card ---------- */

.pv-changelog { margin-top: 8px; }
.pv-changelog-title { font-family: var(--font-m); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.pv-changelog-entry { padding: 8px 0; border-bottom: 1px solid var(--line); font-family: var(--font-m); font-size: 11px; line-height: 1.5; color: var(--fg); }
.pv-changelog-entry:last-child { border-bottom: none; }
.pv-changelog-entry b { color: var(--accent); }
.pv-changelog-entry .cl-date { font-size: 9px; color: var(--muted); letter-spacing: .04em; }
.pv-changelog-entry .cl-body { color: var(--muted); margin-top: 2px; }

/* ---------- 404 page ---------- */

.error-404 { text-align: center; padding: 60px 20px; }
.error-404 h1 { font-family: var(--font-m); font-size: 72px; font-weight: 700; color: var(--accent); opacity: .25; margin: 0 0 8px; }
.error-404 h2 { font-family: var(--font-b); font-size: 18px; color: var(--fg); margin: 0 0 12px; letter-spacing: .04em; }
.error-404 p { font-family: var(--font-m); font-size: 12px; color: var(--muted); max-width: 400px; margin: 0 auto 20px; line-height: 1.6; }
.error-404 .err-code { font-family: var(--font-m); font-size: 10px; letter-spacing: .1em; color: var(--muted); opacity: .5; margin-top: 24px; }
.error-404 .err-links { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.error-404 .err-links a { font-family: var(--font-m); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 8px 18px; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); text-decoration: none; transition: background .2s, color .2s; }
.error-404 .err-links a:hover { background: var(--accent); color: var(--bg2); }

/* ---------- lite mode (weak hardware) ---------- */

.lite .home-chart { display: none; }
.lite .stock-live, .lite .live-dot { animation: none !important; }
.lite .idle .wcard { animation: none !important; }
.lite .idle .hero-title { animation: none !important; }
.lite .idle .brand-mark { animation: none !important; }
.lite .bgfx { display: none; }
.lite .inv-chart-wrap { display: none; }
.lite .wcard-updated { animation: none; }
.lite .view { transition: none; }
.lite .view.entering { animation: none; }
.lite .fly-ico { display: none; }

/* ---------- floating particles ---------- */

.bg-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- 3D card tilt ---------- */

.wcard { perspective: 700px; transform-style: preserve-3d; will-change: transform; }
.wcard:hover { transform: none; }

/* ---------- scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ---------- news ticker faster scroll ---------- */

.tick-track .tt { animation-duration: 32s; }

/* ---------- ripple ---------- */

.ripple-ring { position: fixed; z-index: 9998; pointer-events: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); opacity: .6; transform: scale(0); animation: ripplePop .5s ease-out forwards; }
@keyframes ripplePop { to { transform: scale(5); opacity: 0; } }

/* ---------- card stagger entrance ---------- */

.wcard { animation: cardIn .45s ease backwards; }
.wcard:nth-child(1) { animation-delay: .04s; }
.wcard:nth-child(2) { animation-delay: .09s; }
.wcard:nth-child(3) { animation-delay: .14s; }
.wcard:nth-child(4) { animation-delay: .19s; }
.wcard:nth-child(5) { animation-delay: .24s; }
.wcard:nth-child(6) { animation-delay: .29s; }
.wcard:nth-child(7) { animation-delay: .34s; }
.wcard:nth-child(8) { animation-delay: .39s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- brand clock ---------- */

.brand-clock { font-family: var(--font-m); font-size: 9px; letter-spacing: .08em; color: var(--muted); opacity: .6; margin-left: 6px; animation: clockBlink 1s steps(1) infinite; }
@keyframes clockBlink { 0%, 49% { opacity: .6; } 50%, 100% { opacity: .2; } }

/* ---------- intel overlay (easter egg) ---------- */

.intel-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 16px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.intel-overlay.open { opacity: 1; pointer-events: auto; }
.intel-panel {
  width: min(800px, 100%);
  max-height: min(800px, 88vh);
  overflow-y: auto;
  background: #0a0a0a;
  border: 1px solid #1a3a1a;
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(0, 220, 0, .1);
  transition: transform .3s ease;
  transform: translateY(20px);
}
.intel-overlay.open .intel-panel { transform: translateY(0); }
.intel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #1a3a1a;
  background: #0d0d0d;
  border-radius: var(--radius) var(--radius) 0 0;
}
.intel-head h2 { font-family: "VT323", monospace; font-size: 18px; color: #00dc00; letter-spacing: .1em; }
.intel-head .ov-close { background: none; border: 1px solid #1a3a1a; color: #5f5f5f; font-family: "VT323", monospace; font-size: 14px; padding: 4px 12px; border-radius: 4px; cursor: pointer; transition: color .2s, border-color .2s; }
.intel-head .ov-close:hover { color: #00dc00; border-color: #00dc00; }
.intel-body {
  padding: 16px 20px;
  font-family: "VT323", monospace;
  font-size: 14px;
  color: #00dc00;
  line-height: 1.6;
  letter-spacing: .02em;
}
.intel-section { margin-bottom: 16px; }
.intel-section-title { color: #0a5c1d; font-size: 13px; letter-spacing: .12em; margin-bottom: 6px; border-bottom: 1px solid #0a2a0a; padding-bottom: 4px; }
.intel-row { display: flex; gap: 8px; padding: 2px 0; }
.intel-key { color: #5f5f5f; min-width: 180px; flex-shrink: 0; }
.intel-val { color: #00dc00; word-break: break-all; }
.intel-val.warn { color: #ff5252; }
.intel-val.accent { color: #ffaa00; }

/* ---------- legal overlays ---------- */

.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 16px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.legal-overlay.open { opacity: 1; pointer-events: auto; }
.legal-panel {
  width: min(700px, 100%);
  max-height: min(800px, 88vh);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease;
  transform: translateY(20px);
}
.legal-overlay.open .legal-panel { transform: translateY(0); }
.legal-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.legal-head h2 { font-family: var(--font-b); font-size: 18px; color: var(--fg); letter-spacing: .06em; }
.legal-updated { font-family: var(--font-m); font-size: 11px; color: var(--muted); margin-left: auto; }
.legal-body {
  padding: 20px 24px 28px;
  font-family: var(--font-b);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.legal-body h3 { font-family: var(--font-m); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin: 20px 0 8px; text-transform: uppercase; }
.legal-body h3:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { margin: 0 0 10px; padding-left: 20px; }
.legal-body li { margin-bottom: 4px; }
.legal-body a { color: var(--accent); }
.legal-body a:hover { text-decoration: underline; }
.legal-pre {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: var(--font-m);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ---------- legal consent popup ---------- */

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.consent-overlay.open { opacity: 1; pointer-events: auto; }
.consent-panel {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 60px rgba(0, 0, 0, .3);
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
  overflow: hidden;
}
.consent-overlay.open .consent-panel { transform: translateY(0) scale(1); }
.consent-head {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.consent-logo {
  display: inline-block;
  font-family: var(--font-m);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  line-height: 48px;
  text-align: center;
  margin-bottom: 12px;
}
.consent-head h2 {
  font-family: var(--font-m);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .1em;
  color: var(--fg);
  margin: 0 0 4px;
}
.consent-sub {
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}
.consent-body { padding: 24px 28px 28px; }
.consent-intro {
  font-family: var(--font-b);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 20px;
}
.consent-docs { margin-bottom: 24px; }
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .2s, background .2s;
}
.consent-check:hover { border-color: var(--accent); }
.consent-check input[type="checkbox"] { display: none; }
.consent-checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 4px;
  margin-top: 1px;
  position: relative;
  transition: border-color .2s, background .2s;
}
.consent-check input:checked ~ .consent-checkmark {
  border-color: var(--accent);
  background: var(--accent);
}
.consent-check input:checked ~ .consent-checkmark::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-label {
  font-family: var(--font-b);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.consent-label a { color: var(--accent); font-weight: 700; }
.consent-label a:hover { text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.consent-btn {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
}
.consent-btn:disabled { opacity: .35; cursor: not-allowed; }
.consent-btn-agree {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.consent-btn-agree:hover:not(:disabled) { filter: brightness(1.15); }
.consent-btn-disagree {
  background: transparent;
  color: var(--muted);
}
.consent-btn-disagree:hover { border-color: var(--muted); color: var(--fg); }
.consent-note {
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  text-align: center;
  margin: 0;
}

/* ---------- consent denied error ---------- */

.consent-error-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: #0a0a0a;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.consent-error-overlay.open { opacity: 1; pointer-events: auto; }
.consent-error-panel {
  width: min(520px, 100%);
  background: #111;
  border: 1px solid #331111;
  border-radius: var(--radius);
  box-shadow: 0 0 80px rgba(255, 30, 30, .08);
  overflow: hidden;
}
.consent-error-head {
  padding: 20px 28px;
  border-bottom: 1px solid #331111;
  background: #0d0d0d;
}
.consent-error-code {
  font-family: var(--font-m);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #ff3333;
}
.consent-error-body {
  padding: 28px;
  text-align: center;
}
.consent-error-body h2 {
  font-family: var(--font-m);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #ff3333;
  margin: 0 0 16px;
}
.consent-error-body p {
  font-family: var(--font-b);
  font-size: 14px;
  line-height: 1.6;
  color: #999;
  margin: 0 0 12px;
}
.consent-error-sub { font-size: 12px !important; color: #666 !important; }
.consent-error-actions {
  display: flex;
  gap: 10px;
  margin: 24px 0 20px;
}
.consent-error-actions .consent-btn-agree {
  background: #222;
  color: #ccc;
  border-color: #444;
}
.consent-error-actions .consent-btn-agree:hover { background: #333; color: #fff; }
.consent-error-actions .consent-btn-disagree {
  background: transparent;
  color: #666;
  border-color: #333;
}
.consent-error-actions .consent-btn-disagree:hover { border-color: #ff3333; color: #ff3333; }
.consent-error-footer {
  padding-top: 16px;
  border-top: 1px solid #222;
  font-family: var(--font-m);
  font-size: 10px;
  color: #444;
  letter-spacing: .04em;
}

/* ---------- lite mode animation overrides ---------- */

.lite .bg-particles { display: none; }
.lite .ripple-ring { display: none; }
.lite .wcard { animation: none; }
.lite .reveal { transition: none; }
.lite .reveal.vis { opacity: 1; transform: none; }

@media (orientation: portrait), (max-width: 600px) {
  .stage { padding: 18px 12px 40px; max-width: 100%; }
  .hero { padding: 14px 0 8px; }
  .hero-title { font-size: clamp(28px, 8vw, 44px); }
  .hero-sub { font-size: 11px; letter-spacing: .1em; }
  .webring { grid-template-columns: 1fr; gap: 10px; }
  .wcard { padding: 14px 14px; }
  .wcard-ico { width: 36px; height: 36px; }
  .wcard-name { font-size: 13px; }
  .wcard-tag { font-size: 11px; }
  .wcard-launch { font-size: 9px; padding: 5px 10px; }
  .home-ticker { margin: 0 0 16px; padding: 12px 14px; }
  .home-ticker-head { gap: 8px; }
  .home-ticker-price { font-size: 18px; }
  .home-ticker-chg { font-size: 12px; }
  .home-ticker-go { font-size: 10px; padding: 4px 10px; }
  .home-chart { height: 50px; }
  .home-updates { margin: 0 0 16px; }
  .home-update { padding: 8px 10px; gap: 8px; }
  .home-update-icon { width: 24px; height: 24px; }
  .home-update-name { font-size: 11px; }
  .home-update-text { font-size: 9px; }
  .pv-head { padding: 10px 0 8px; }
  .pv-head h2 { font-size: clamp(22px, 6vw, 32px); }
  .pv-head p { font-size: 11px; }
  .pv-card { margin-top: 12px; }
  .win-bar { height: 30px; padding: 0 10px; font-size: 11px; }
  .pv-body { padding: 12px 14px; font-size: 12.5px; line-height: 1.65; }
  .pv-chips { gap: 6px; }
  .chip { font-size: 10px; padding: 4px 10px; }
  .pv-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pv-launch { width: 100%; text-align: center; }
  .stock-price b { font-size: clamp(28px, 8vw, 40px); }
  .stock-facts { gap: 6px 14px; font-size: 10px; }
  .inv-corp { gap: 6px 14px; padding: 12px 14px; }
  .inv-corp-item b { font-size: 14px; }
  .inv-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .inv-stat { padding: 10px 12px; }
  .inv-stat span { font-size: 9px; }
  .inv-stat b { font-size: 15px; }
  .inv-table { font-size: 11px; }
  .inv-table th { font-size: 9px; padding: 6px 8px; }
  .inv-table td { font-size: 11px; padding: 7px 8px; }
  .inv-chart-wrap { padding: 8px 8px 4px; }
  .inv-range { font-size: 10px; padding: 4px 10px; }
  .news-masthead { padding: 12px 0 6px; }
  .news-logo { font-size: clamp(20px, 6vw, 30px); }
  .news-nav { gap: 4px; flex-wrap: wrap; }
  .news-nav span { font-size: 10px; padding: 4px 8px; }
  .breaking { font-size: 11px; padding: 8px 12px; }
  .nf-body { padding: 12px; }
  .nf-body h3 { font-size: 16px; }
  .news-grid { grid-template-columns: 1fr; gap: 10px; }
  .ncard { padding: 12px; }
  .ncard h3 { font-size: 14px; }
  .contact-grid { grid-template-columns: 1fr; }
  .forum-head h2 { font-size: clamp(24px, 6vw, 36px); }
  .forum-name, .forum-send { flex-direction: column; }
  .forum-name input, .forum-send input { width: 100%; }
  .rail { width: 100%; max-width: 260px; }
  .inv-corp { flex-direction: column; gap: 8px; }
  .inv-corp-item { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .inv-corp-item b { margin-top: 0; }
  .tt-row { gap: 10px; }
  .chart-tooltip { font-size: 10px; padding: 8px 10px; max-width: 160px; }
  .tt-lbl { font-size: 8px; min-width: 28px; }
  .status-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .status-meta { flex-direction: row; gap: 12px; text-align: left; }
  .compare-wrap { margin: 0 -12px; padding: 0 12px; }
  .compare-table { font-size: 10px; }
  .compare-table th, .compare-table td { padding: 8px 8px; }
  .help-panel { max-height: 80vh; overflow-y: auto; }
  .card-tip { display: none; }
}

/* ---------- theme transition ---------- */

:root { transition: background-color .45s ease, color .45s ease; }
:root *:not(.fly-ico):not(.notif):notif-icon { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease; }

/* ---------- rail collapse smooth ---------- */

.rail { will-change: width, transform; }
.rail.collapsed { transition: transform .45s cubic-bezier(.22, 1.18, .35, 1), width .35s cubic-bezier(.22, 1.18, .35, 1); }
.r-item b { transition: opacity .2s ease, max-width .3s ease, margin .3s ease; white-space: nowrap; overflow: hidden; }
.rail.collapsed .r-item b { max-width: 0; opacity: 0; margin: 0; }

/* ---------- keyboard help overlay ---------- */

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.help-overlay.open { opacity: 1; pointer-events: auto; }
.help-panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
  overflow: hidden;
}
.help-overlay.open .help-panel { transform: translateY(0) scale(1); }
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.help-head h2 { font-family: var(--font-m); font-size: 16px; font-weight: 900; letter-spacing: .1em; color: var(--fg); }
.help-body { padding: 20px 24px 24px; }
.help-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line2);
}
.help-row:last-child { border-bottom: none; }
.help-key {
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--fg);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 8px;
}
.help-desc {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--text);
}

/* ---------- card hover preview tooltip ---------- */

.wcard { position: relative; }
.card-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 240px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 20;
}
.wcard:hover .card-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.card-tip-name { font-family: var(--font-m); font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--fg); }
.card-tip-tag { font-family: var(--font-b); font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.card-tip-stats { display: flex; gap: 12px; font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.card-tip-stats b { color: var(--accent); }
.card-tip-desc {
  font-family: var(--font-b);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- home sparkline inline ---------- */

.home-ticker-spark {
  display: inline-block;
  width: 60px;
  height: 20px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ---------- project status dashboard ---------- */

.status-view .status-head { margin-bottom: 20px; }
.status-view .status-head h2 { font-family: var(--font-m); font-size: 18px; font-weight: 900; letter-spacing: .08em; color: var(--fg); margin: 0 0 4px; }
.status-view .status-head p { font-family: var(--font-b); font-size: 13px; color: var(--muted); margin: 0; }
.status-grid { display: flex; flex-direction: column; gap: 10px; }
.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.status-card:hover { border-color: var(--accent); }
.status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}
.status-dot.up { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .4); }
.status-dot.down { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, .4); }
.status-dot.checking { background: #f59e0b; animation: statusPulse 1s ease infinite; }
@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.status-info { flex: 1; min-width: 0; }
.status-name { font-family: var(--font-m); font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--fg); }
.status-url { font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.status-meta {
  flex-shrink: 0;
  display: flex;
  gap: 16px;
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  text-align: right;
}
.status-meta b { color: var(--fg); display: block; font-size: 12px; }

/* ---------- project comparison table ---------- */

.compare-wrap { overflow-x: auto; margin-top: 16px; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-m);
  font-size: 12px;
}
.compare-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 2px solid var(--line);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.compare-table th:hover { color: var(--accent); }
.compare-table th.sorted { color: var(--accent); }
.compare-table th .sort-arrow { margin-left: 4px; font-size: 8px; }
.compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line2);
  color: var(--text);
  white-space: nowrap;
}
.compare-table tr:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.compare-table .proj-name { font-weight: 800; color: var(--fg); }
.compare-table .proj-name a { color: inherit; text-decoration: none; }
.compare-table .proj-name a:hover { color: var(--accent); text-decoration: underline; }
.compare-table .lang-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ---------- changelog / timeline ---------- */

.changelog-head { margin-bottom: 20px; }
.changelog-head h2 { font-family: var(--font-m); font-size: 18px; font-weight: 900; letter-spacing: .08em; color: var(--fg); margin: 0 0 4px; }
.changelog-head p { font-family: var(--font-b); font-size: 13px; color: var(--muted); margin: 0; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 24px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 2px var(--line);
}
.tl-item:first-child .tl-dot { background: #22c55e; box-shadow: 0 0 0 2px var(--line), 0 0 8px rgba(34, 197, 94, .3); }
.tl-ver { font-family: var(--font-m); font-size: 14px; font-weight: 900; letter-spacing: .06em; color: var(--fg); }
.tl-date { font-family: var(--font-m); font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-left: 8px; }
.tl-body { font-family: var(--font-b); font-size: 13px; color: var(--text); line-height: 1.6; margin-top: 6px; }
.tl-body ul { margin: 4px 0 0; padding-left: 18px; }
.tl-body li { margin-bottom: 3px; }

/* ---------- touch: swipe indicator ---------- */

.swipe-indicator {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: var(--font-m);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 16px;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.swipe-indicator.show { opacity: 1; }
@media (hover: none) and (pointer: coarse) { .swipe-indicator { display: block; } }

/* ---------- touch: bottom nav bar ---------- */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--accent); }
.bn-item:active { opacity: .7; }
.bn-more {
  position: relative;
}
.bn-more-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px 0;
  min-width: 160px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.bn-more-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.bn-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.bn-more-item:active { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bn-more-item svg { width: 16px; height: 16px; color: var(--muted); }
@media (hover: none) and (pointer: coarse) { .bottom-nav { display: block; } .stage { padding-bottom: 120px; } }

/* ---------- touch: swipeable cards carousel ---------- */

.home-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 12px;
  scrollbar-width: none;
}
.home-carousel::-webkit-scrollbar { display: none; }
.home-carousel .wcard {
  flex: 0 0 260px;
  scroll-snap-align: start;
}
.carousel-indicator {
  display: none;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background .2s, width .2s;
}
.carousel-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }
@media (hover: none) and (pointer: coarse) {
  .home-carousel { gap: 10px; padding: 0 14px 10px; }
  .home-carousel .wcard { flex: 0 0 220px; }
  .home-recent, .home-updates { display: none; }
  .carousel-indicator { display: flex; }
}

/* ---------- touch: long-press context menu ---------- */

.ctx-menu {
  position: fixed;
  z-index: 300;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 8px 32px rgba(0,0,0,.25);
  padding: 6px 0;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: scale(.92);
  transition: opacity .15s, transform .15s;
}
.ctx-menu.open { opacity: 1; pointer-events: auto; transform: scale(1); }
.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.ctx-item:active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ctx-item svg { width: 15px; height: 15px; color: var(--muted); }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 0; }
.ctx-hint {
  padding: 6px 16px;
  font-family: var(--font-m);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .06em;
}
.ctx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
}

/* ---------- touch: haptic feedback ---------- */

.haptic-light { -webkit-tap-highlight-color: transparent; }
.haptic-light:active { animation: hapticFlash .12s ease; }
@keyframes hapticFlash { 0% { opacity: 1; } 50% { opacity: .85; } 100% { opacity: 1; } }

/* ---------- touch: pull-to-refresh ---------- */

.pull-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  z-index: 120;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
  pointer-events: none;
}
.pull-indicator.visible { transform: translateX(-50%) translateY(20px); }
.pull-indicator.refreshing { transform: translateX(-50%) translateY(20px); }
.pull-indicator svg { width: 20px; height: 20px; color: var(--accent); }
.pull-indicator.refreshing svg { animation: pullSpin .8s linear infinite; }
@keyframes pullSpin { to { transform: rotate(360deg); } }

/* ---------- touch: swipe-to-dismiss ---------- */

.swipe-dismiss {
  transition: transform .25s cubic-bezier(.22, 1.18, .35, 1);
}
.swipe-dismiss.dragging { transition: none; }

/* ---------- touch: bottom sheet settings ---------- */

@media (hover: none) and (pointer: coarse) {
  .settings-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .settings-panel {
    width: 100% !important;
    max-height: 85vh !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    transform: translateY(100%) !important;
  }
  .settings-overlay.open .settings-panel { transform: translateY(0) !important; }
  .settings-head::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 0 auto 12px;
  }
}

/* ---------- touch: momentum / rubber-band scroll ---------- */

@supports (-webkit-overflow-scrolling: touch) {
  .stage { -webkit-overflow-scrolling: touch; }
}
.touch-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; overscroll-behavior-y: contain; }

/* ---------- touch: general tap optimizations ---------- */

@media (hover: none) and (pointer: coarse) {
  .wcard, .r-item, .ncard, .inv-range, .news-nav span, .chip, .btn, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .wcard { min-height: 56px; }
  .r-item { min-height: 44px; }
  .inv-range { min-width: 44px; min-height: 36px; }
  .news-nav span { min-height: 36px; padding: 8px 14px; }
}

/* ============================================================
   GNOME HIG / Adwaita override layer
   ============================================================ */

/* --- disable decorative effects --- */
body, a, button, select, input, label, .wcard, .tpreview, .m-item, .ctl, .ov-close, .set-row { cursor: auto !important; }
.brand-mark { animation: none !important; }
.hero-title { animation: none !important; text-shadow: none !important; }
.section-title::after { animation: none !important; background: var(--line) !important; }
.wcard { animation: none !important; }
.wcard:hover { transform: none; }
.bg-particles, .sw-crt, .sw-tear, .cur-ring { display: none !important; }

/* --- reset all font-d references to system font --- */
.hero-title,
.hero-kicker,
.section-title,
.set-section-title,
.settings-head h2,
.brand-name,
.pv-name,
.foot-logo,
.foot-col-title,
.foot-name,
.pv-changelog-title,
.inv-head,
.status-head,
.news-masthead,
.contact-head,
.forum-title,
.inv-corp-item,
.timeline .tl-ver {
  font-family: var(--font-b);
}

/* --- body --- */
body {
  font-family: var(--font-b);
  font-size: 14px;
  line-height: 1.5;
}

/* --- header bar (GNOME style) --- */
.top {
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: 56px;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.brand-mark {
  box-shadow: none;
  border-radius: var(--radius);
}
.home-btn, .menu-btn {
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text);
}
.home-btn:hover, .menu-btn:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transform: none;
}
.home-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

/* --- hero --- */
.hero-title {
  font-size: clamp(36px, 8vw, 72px);
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-kicker {
  border: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .08em;
  font-size: 11px;
  text-transform: uppercase;
}
.hero-sub { color: var(--muted); font-size: 14px; }

/* --- section headings --- */
.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-title::after { height: 1px; }
.section-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* --- webring cards (GNOME boxed list) --- */
.webring { gap: 8px; }
.wcard {
  border: none;
  background: color-mix(in srgb, var(--bg2) 60%, var(--panel));
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transition: background .15s;
}
.wcard:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg2));
  border-color: transparent;
  box-shadow: none;
}
.wcard-name { color: var(--text); font-weight: 700; }
.wcard-launch {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 12px;
  padding: 8px 16px;
  font-weight: 600;
}
.wcard-launch:hover {
  background: var(--accent2);
  color: #fff;
}

/* --- news items --- */
.news { gap: 6px; }
.nitem {
  border: none;
  background: color-mix(in srgb, var(--bg2) 60%, var(--panel));
  border-radius: var(--radius);
  padding: 14px 16px;
}
.nitem b { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

/* --- overlays (GNOME modal style) --- */
.menu-overlay, .settings-overlay {
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
}
.menu-panel {
  background: var(--panel);
  border: none;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
}
.m-item {
  border: none;
  background: transparent;
  border-radius: var(--radius);
  min-height: 44px;
}
.m-item:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: transparent;
  transform: none;
}
.m-item.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.settings-panel {
  border: none;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.settings-head {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.set-section-title { font-size: 16px; font-weight: 700; }
.set-section-title::after { background: var(--line); }

/* --- ov-close button --- */
.ov-close {
  border: none;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}
.ov-close:hover {
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
}

/* --- rail (GNOME sidebar style) --- */
.rail {
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--line);
}
.r-item { border-radius: var(--radius); min-height: 40px; }
.r-item:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.r-item.active { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* --- project view --- */
.pv-head { gap: 16px; }
.pv-ico {
  border: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: none;
  border-radius: var(--radius);
}
.pv-name { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.pv-tag { color: var(--muted); }
.pv-desc { color: var(--text); line-height: 1.7; }
.pv-chips { gap: 8px; }
.pv-chips .chip {
  border: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--radius);
  font-size: 12px;
  padding: 6px 14px;
}
.pv-launch {
  border: none;
  background: #33d17a;
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-weight: 700;
  font-size: 14px;
}
.pv-launch:hover { background: #26a269; color: #fff; }

/* --- investor/stock section --- */
.inv-grid { gap: 8px; }
.inv-stat {
  background: color-mix(in srgb, var(--bg2) 60%, var(--panel));
  border: none;
  border-radius: var(--radius);
  padding: 16px;
}
.inv-table { border-collapse: collapse; }
.inv-table th, .inv-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 13px;
}

/* --- contact section --- */
.contact-card {
  border: none;
  background: color-mix(in srgb, var(--bg2) 60%, var(--panel));
  border-radius: var(--radius);
  padding: 20px;
}

/* --- status cards --- */
.status-card {
  border: none;
  background: color-mix(in srgb, var(--bg2) 60%, var(--panel));
  border-radius: var(--radius);
  padding: 16px;
}

/* --- forum --- */
.forum-msgs {
  background: color-mix(in srgb, var(--bg2) 40%, var(--panel));
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.forum-send {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg2);
}

/* --- footer --- */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg2);
  font-size: 12px;
}
.foot-inner { border-bottom: 1px solid var(--line); }
.foot-logo { font-size: 14px; }
.foot-col-title { text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }

/* --- notify overlay --- */
.notif-overlay {
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px);
}

/* --- toast --- */
.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  font-size: 13px;
}

/* --- changelog --- */
.tl-item { border-left: 2px solid var(--line); }
.tl-dot { background: var(--accent); }

/* --- compare --- */
.compare-table th, .compare-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

/* --- consent overlay --- */
#consentOverlay {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
}

/* --- theme preview cards --- */
.tpreview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
}
.tprev-bar { background: var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.tprev-panel { background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); }
.tprev-btn { background: var(--accent); color: #fff; border-radius: 6px; }

/* --- chip / button base --- */
.chip, .btn, button {
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: .02em;
}

/* --- scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* --- selection --- */
::selection { background: var(--accent); color: #fff; }

/* --- view transitions (simplify) --- */
@keyframes viewin {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* --- light mode (webring is pastel/light already — keep pastel theme colors) --- */
@media (prefers-color-scheme: light) {
  [data-theme="webring"] {
    --bg: #e9dfc4; --bg2: #f3ead2; --panel: #fff8e7;
    --line: #c0a878; --line2: #e0cfae;
    --text: #3b2f1e; --fg: #3b2f1e; --muted: #8a744f;
    --accent: #8a2b2b; --accent2: #b07f2e;
    --font-d: "Dancing Script", "Brush Script MT", cursive;
    --font-b: Georgia, "Times New Roman", serif;
    --font-m: "IBM Plex Mono", ui-monospace, monospace;
    --radius: 8px; --shadow: 0 2px 10px rgba(90, 60, 20, .14);
    --glow: 0 0 0 1px var(--accent), 0 0 14px rgba(138, 43, 43, .35);
  }
  :root {
    --bg: #e9dfc4;
    --bg2: #f3ead2;
    --panel: #fff8e7;
    --line: #c0a878;
    --line2: #e0cfae;
    --text: #3b2f1e;
    --fg: #3b2f1e;
    --muted: #8a744f;
    --accent: #8a2b2b;
    --accent2: #b07f2e;
    --shadow: 0 2px 10px rgba(90, 60, 20, .14);
    --glow: 0 0 0 1px var(--accent), 0 0 14px rgba(138, 43, 43, .35);
  }
  .top, .rail, .settings-head {
    background: color-mix(in srgb, var(--panel) 92%, transparent);
  }
  .menu-panel {
    background: var(--panel);
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
  }
  .settings-panel { box-shadow: 0 12px 48px rgba(0,0,0,.15); }
  .m-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  .r-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
}
