:root {
  --bg: #d9e2e8;
  --ink: #0b1520;
  --muted: #445463;
  --panel: #102033;
  --accent: #1f9a9a;
  --warn: #d97706;
  --font-d: "Bricolage Grotesque", sans-serif;
  --font-b: "IBM Plex Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-b);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,21,32,.06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(11,21,32,.06) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(900px 500px at 80% 0%, rgba(31,154,154,.2), transparent 60%),
    linear-gradient(180deg, #e8eef2, #cfd9e1);
}
a { color: inherit; text-decoration: none; }
.bar, .block, footer, .hero {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}
.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 0 0;
}
.logo, .mark, h1, h2, .meta strong {
  font-family: var(--font-d);
  letter-spacing: -0.03em;
}
.logo { font-weight: 700; font-size: 1.2rem; }
nav { display: flex; gap: 1.2rem; align-items: center; color: var(--muted); }
.go { color: var(--ink); border-bottom: 2px solid var(--accent); font-weight: 600; }
.hero {
  min-height: calc(100svh - 5rem);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
  padding: 2rem 0 3rem;
}
.mark { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0; font-weight: 600; max-width: 14ch; }
.lead { color: var(--muted); max-width: 38ch; margin: 1rem 0 1.5rem; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; padding: .8rem 1.15rem;
  font-weight: 600; border: 1px solid transparent; transition: transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.solid { background: var(--ink); color: #e8eef2; }
.line { border-color: rgba(11,21,32,.2); background: rgba(255,255,255,.35); }
.rack {
  background: linear-gradient(160deg, #173049, #0b1520);
  color: #d7e6ef; padding: .9rem; border-radius: 4px;
  box-shadow: 0 28px 60px rgba(11,21,32,.28);
  animation: up .9s ease both;
}
.rack-head {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(215,230,239,.55); margin-bottom: .6rem;
}
.scope { position: relative; background: #071018; min-height: 180px; }
.scope canvas, .viewer canvas { width: 100%; display: block; opacity: .9; }
.tc {
  position: absolute; left: .7rem; bottom: .6rem;
  font-variant-numeric: tabular-nums; font-size: .8rem; letter-spacing: .06em;
}
.meters { display: grid; grid-template-columns: repeat(5,1fr); gap: .35rem; margin-top: .7rem; }
.meters i {
  display: block; height: 6px; background: var(--accent);
  transform-origin: left; animation: meter 2.4s ease-in-out infinite;
}
.meters i:nth-child(2) { animation-delay: .2s; background: #4db6ac; }
.meters i:nth-child(3) { animation-delay: .4s; background: var(--warn); }
.meters i:nth-child(4) { animation-delay: .6s; }
.meters i:nth-child(5) { animation-delay: .8s; background: #64748b; }
.block { padding: 3.5rem 0 1rem; }
.block h2 { margin: 0; font-size: 1.8rem; }
.block > p { color: var(--muted); max-width: 50ch; }
ol { padding: 0; margin: 1.5rem 0 0; list-style: none; display: grid; gap: 1rem; }
ol li { border-top: 1px solid rgba(11,21,32,.12); padding-top: .9rem; color: var(--muted); }
ol strong { display: block; color: var(--ink); margin-bottom: .2rem; }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin: 1.5rem 0 0; }
dl div { border-top: 1px solid rgba(11,21,32,.12); padding-top: .8rem; }
dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
dd { margin: .2rem 0 0; font-family: var(--font-d); font-size: 1.3rem; }
footer {
  display: flex; justify-content: space-between; padding: 3rem 0 2rem; color: var(--muted); font-size: .9rem;
}
.desk { background: #c9d4dc; }
.desk-bar {
  width: min(1240px, calc(100% - 1.2rem)); margin: .8rem auto;
  display: flex; gap: 1rem; align-items: center;
}
.meta { flex: 1; display: grid; }
.meta span, .pill { font-size: .82rem; color: var(--muted); }
.pill { border: 1px solid rgba(11,21,32,.15); padding: .3rem .7rem; background: rgba(255,255,255,.4); }
.desk-grid {
  width: min(1240px, calc(100% - 1.2rem)); margin: 0 auto 1rem;
  display: grid; grid-template-columns: 220px 1fr 210px; gap: .7rem; min-height: calc(100svh - 5rem);
}
.desk-grid aside, .desk-grid > section {
  background: rgba(255,255,255,.42); border: 1px solid rgba(11,21,32,.1); padding: .9rem;
}
.desk-grid h2 { margin: 0 0 .7rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--font-b); }
#bin, #log { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .88rem; }
#bin li, #log li { border-top: 1px solid rgba(11,21,32,.1); padding-top: .45rem; color: var(--muted); }
#bin em { display: block; color: var(--accent); font-style: normal; font-size: .78rem; }
.viewer { position: relative; background: #071018; color: #d7e6ef; }
.tl { position: relative; margin-top: .7rem; background: #0b1520; padding: .55rem; display: grid; gap: .35rem; }
.track { height: 18px; background: rgba(255,255,255,.06); position: relative; }
.track::before {
  content: ""; position: absolute; inset: 2px auto 2px 8%; width: 40%;
  background: linear-gradient(90deg, var(--accent), #4db6ac);
}
.track.a::before { left: 8%; width: 62%; background: linear-gradient(90deg, var(--warn), #f59e0b); }
.head {
  position: absolute; top: .4rem; bottom: .4rem; width: 2px; background: #fff; left: 22%; z-index: 2;
  animation: scrub 8s ease-in-out infinite;
}
.row { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; }
.row button {
  width: 2.6rem; height: 2.6rem; border: 0; background: var(--ink); color: #fff; cursor: pointer;
}
#rate { margin-left: auto; font-size: .82rem; color: var(--muted); }
.legal { width: min(720px, calc(100% - 2rem)); margin: 2rem auto 3rem; color: var(--muted); }
.legal h1 { color: var(--ink); }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes meter { 0%,100% { transform: scaleX(.35); opacity: .5; } 50% { transform: scaleX(1); opacity: 1; } }
@keyframes scrub { 0%,100% { left: 14%; } 50% { left: 70%; } }
@media (max-width: 900px) {
  .hero, .desk-grid, dl { grid-template-columns: 1fr; }
  nav a:not(.go) { display: none; }
  .hero { min-height: auto; }
}

/* i18n + cabinet */
.lang { display:inline-flex; gap:.15rem; padding:.15rem; border:1px solid rgba(0,0,0,.12); background:rgba(255,255,255,.4); }
.lang button { border:0; background:transparent; font:inherit; font-size:.72rem; text-transform:uppercase; padding:.2rem .35rem; cursor:pointer; opacity:.7; }
.lang button.is-active { background:#111; color:#fff; opacity:1; }
.auth-wrap,.cab-wrap{ width:min(1040px, calc(100% - 2rem)); margin:2rem auto 3rem; }
.auth-card,.cab-card{ background:rgba(255,255,255,.55); border:1px solid rgba(0,0,0,.1); padding:1.25rem; max-width:480px; }
.tabs{ display:flex; gap:.4rem; margin:1rem 0; }
.tabs button{ flex:1; border:1px solid rgba(0,0,0,.12); background:transparent; padding:.6rem; font:inherit; cursor:pointer; }
.tabs button.is-active{ background:#111; color:#fff; }
.auth-card label,.cab-card label{ display:grid; gap:.25rem; margin-bottom:.75rem; font-size:.9rem; }
.auth-card input{ border:1px solid rgba(0,0,0,.18); padding:.65rem .7rem; font:inherit; }
.auth-note{ min-height:1.2em; font-size:.9rem; }
.auth-note[data-state="err"]{ color:#a11; }
.auth-note[data-state="ok"]{ color:#0a7; }
.hint{ font-size:.85rem; opacity:.75; }
.cab-grid{ display:grid; grid-template-columns:1.2fr .8fr; gap:1rem; }
@media (max-width:900px){ .cab-grid{ grid-template-columns:1fr; } }
.projects{ list-style:none; margin:0; padding:0; }
.projects li{ border-top:1px solid rgba(0,0,0,.1); padding:.5rem 0; }
.cab-actions{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:1rem; }
.stats{ display:grid; gap:.6rem; }
.stats div{ border-top:1px solid rgba(0,0,0,.1); padding-top:.5rem; }
.stats dt{ font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; opacity:.7; }
.stats dd{ margin:.15rem 0 0; font-size:1.15rem; }