/* ============ Grind — interactive demo =============================
   A browser replica of the desktop app (PySide6/Qt). The tokens below are
   lifted from app/ui/theme_refined.qss and app/ui/theme.qss so the demo
   reads as the real thing; --accent is the user's colour, exactly like
   %ACCENT% is substituted at app startup.
   ================================================================== */

:root {
  --accent: #4CC0AD;
  --accent-soft: rgba(76, 192, 173, 0.12);

  /* Refinada (default skin) */
  --bg: #0B0C0F;
  --sidebar: #101216;
  --card: #15171C;
  --hover: #1B1E24;
  --border: #262A31;
  --border-hi: #333842;
  --t1: #F2F3F5;
  --t2: #9AA0A8;
  --t3: #5C6068;
  --danger: #C25252;
  --warn: #FFD84D;
  --r-card: 12px;
  --r-btn: 9px;
  --r-small: 8px;
  --app-font: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

/* theme.qss opens with `* { border-radius: 0px; }` — in Brute nothing is
   rounded, not even the pills the Refined skin uses. */
[data-skin="bruta"] .navbtn__badge,
[data-skin="bruta"] .chal__track,
[data-skin="bruta"] .chal__fill,
[data-skin="bruta"] .msg,
[data-skin="bruta"] .task__go,
[data-skin="bruta"] .toggle { border-radius: 0; }

[data-skin="bruta"] {
  /* Bruta: square, monochrome, the accent paints TEXT instead of surfaces */
  --bg: #0A0A0A;
  --sidebar: #131313;
  --card: #1A1A1A;
  --hover: #242424;
  --border: #3A3A3A;
  --border-hi: #555;
  --t1: #EDEDED;
  --t2: #8A8A8A;
  --t3: #5A5A5A;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --r-card: 0px;
  --r-btn: 0px;
  --r-small: 0px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body.demo-body {
  background: #060608;
  color: var(--t1);
  font-family: var(--app-font);
  font-size: 15px;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

/* ---------- page chrome (this is the WEBSITE, not the app) ---------- */
.demo-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

.demo-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px;
  background: #0A0A0C;
  border-bottom: 1px solid #1E1E22;
}
.demo-bar__brand { display: flex; align-items: center; gap: 10px; }
.demo-bar__mark { font-weight: 700; letter-spacing: 0.18em; font-size: 15px; }
.demo-bar__icon { width: 20px; height: auto; opacity: .95; }
.demo-bar__tag {
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  color: #8A8A8A; border: 1px solid #2A2A2E; padding: 4px 10px;
}
.demo-bar__note { font-size: 12px; color: #6A6A70; }
.demo-bar__spacer { flex: 1; }
.demo-bar__btn {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid #3A3A3A; color: #C9C9C9;
  transition: border-color .18s, color .18s, background .18s;
}
.demo-bar__btn:hover { border-color: #EDEDED; color: #EDEDED; }
.demo-bar__cta {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 18px; background: #EDEDED; color: #0A0A0A; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .18s, background .18s;
}
.demo-bar__cta:hover { background: #fff; transform: translateY(-1px); }

@media (max-width: 860px) {
  .demo-bar__note, .demo-bar__tag { display: none; }
}

/* ---------- the app window ---------- */
.app {
  flex: 1 1 auto; min-height: 0;
  display: flex;
  background: var(--bg);
  font-size: 13px;
}

/* ---------- sidebar (MainWindow._build_ui) ---------- */
.side {
  flex: 0 0 216px;
  display: flex; flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.side__logo { display: flex; align-items: center; gap: 8px; padding: 18px 18px 14px; }
.side__logo b { font-size: 17px; font-weight: 700; letter-spacing: 0.16em; }
.side__logo img { width: 18px; height: auto; opacity: .9; }
.side__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

.navbtn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 11px 18px;
  color: var(--t2);
  border-left: 2px solid transparent;
  font-weight: 600; letter-spacing: 0.03em;
  transition: color .15s, background .15s;
}
.navbtn:hover { color: var(--t1); background: var(--hover); }
.navbtn.is-on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
[data-skin="bruta"] .navbtn.is-on { color: var(--t1); border-left-color: var(--t1); }
.navbtn__badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: var(--warn); color: #0A0A0A; border-radius: 999px; padding: 1px 6px;
}

.side__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--t2); padding: 16px 18px 6px; text-transform: uppercase;
}
.side__projects { overflow-y: auto; flex: 1 1 auto; min-height: 40px; }
.side__projects .navbtn { font-weight: 500; padding: 8px 18px; font-size: 12.5px; }
.side__proj-dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.side__bottom { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); }
.side__bottom .navbtn { padding: 9px 10px; border-left: none; border-radius: var(--r-small); }

/* ---------- screens ---------- */
.screens { flex: 1 1 auto; min-width: 0; overflow: auto; position: relative; }
.screen { display: none; padding: 26px 30px 34px; }
.screen.is-on { display: block; }
.screen__title { font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.screen__sub { color: var(--t2); font-size: 12.5px; margin-bottom: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--t2); text-transform: uppercase;
}

.btn {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-btn);
  color: var(--t1); padding: 9px 20px; font-weight: 600; letter-spacing: 0.02em;
  transition: background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { background: var(--hover); border-color: var(--border-hi); }
.btn:disabled { color: var(--t3); border-color: var(--hover); cursor: default; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #0B0C0F; }
.btn--primary:hover:not(:disabled) { background: var(--t1); border-color: var(--t1); }
[data-skin="bruta"] .btn--primary { background: var(--t1); border-color: var(--t1); color: #0A0A0A; }
.btn--mini {
  padding: 0; width: 22px; height: 22px; font-size: 13px; font-weight: 700;
  border-radius: var(--r-small); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
[data-skin="bruta"] .btn--mini { color: var(--t1); }
.btn--mini:hover { border-color: var(--accent); }
.btn--wide { padding: 7px 12px; width: auto; }

.field {
  background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-small);
  color: var(--t1); padding: 7px 10px; font: inherit; font-size: 12.5px;
}
.field:focus { outline: none; border-color: var(--accent); }
select.field { cursor: pointer; }
input[type="number"].field { width: 74px; }

/* ---------- Work screen ---------- */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 16px; }
.work__main { display: flex; flex-direction: column; gap: 14px; }

.row { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.row--head { display: flex; align-items: center; gap: 6px; }

.today__list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.today__row { display: flex; align-items: center; gap: 8px; }
.today__row label { display: flex; align-items: center; gap: 9px; flex: 1; cursor: pointer; color: var(--t2); font-size: 12.5px; font-weight: 600; }
.today__row label:hover { color: var(--t1); }
.today__row input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.today__row.is-done label { color: var(--t3); text-decoration: line-through; }
.today__reset { font-size: 10px; font-weight: 600; color: var(--danger); letter-spacing: 0.04em; }
.today__agenda { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.today__agenda span { font-size: 12px; font-weight: 600; }
.empty { color: var(--t3); font-size: 12px; font-weight: 600; }

/* timer */
.timer { padding: 10px 18px 20px; display: flex; flex-direction: column; align-items: center; }
.timer__corner { width: 100%; display: flex; justify-content: flex-end; }
.ring { width: min(340px, 42vh); aspect-ratio: 1; position: relative; margin: 6px 0 2px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: #2A2A2A; stroke-width: 7; }
.ring__arc {
  fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round;
  transition: stroke-dashoffset .3s linear;
}
.ring.is-break .ring__arc { stroke: #8A8A8A; }
.ring__mid {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 0 12%;
}
.ring__time { font-size: clamp(38px, 7vh, 62px); font-weight: 600; letter-spacing: 0.01em; color: var(--accent); line-height: 1; }
[data-skin="bruta"] .ring__time { color: var(--t1); }
.ring__phase { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--t2); text-transform: uppercase; }
.ring__task { font-size: 12px; color: var(--t3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer__info { width: 100%; display: flex; justify-content: space-between; margin: 6px 0 12px; }
.timer__btns { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }

/* stats strip + challenge bar */
.strip { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.chal { flex: 1; min-width: 120px; cursor: pointer; }
.chal__track { height: 8px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.chal__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
[data-skin="bruta"] .chal__fill { background: var(--t1); }
.chal__text { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--t2); margin-top: 5px; }

/* tasks panel (right side of Work) */
.panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; }
.panel__proj { display: flex; flex-direction: column; gap: 4px; }
.panel__head { display: flex; align-items: center; gap: 7px; }
.panel__head b { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; flex: 1; }
.task {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--r-small);
  font-size: 12px; color: var(--t2);
}
.task:hover { background: var(--hover); border-color: var(--border); color: var(--t1); }
.task__dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.task__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__blocks { font-size: 10px; color: var(--t3); font-weight: 600; }
.task__go {
  background: var(--accent); color: #0B0C0F; border-radius: 6px;
  padding: 1px 7px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  opacity: 0; transition: opacity .15s;
}
[data-skin="bruta"] .task__go { background: var(--t1); }
.task:hover .task__go { opacity: 1; }

/* ---------- project board ---------- */
.board__controls { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-btn); overflow: hidden; }
.toggle button { padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--t2); }
.toggle button.is-on { background: var(--accent-soft); color: var(--accent); }
[data-skin="bruta"] .toggle button.is-on { background: var(--hover); color: var(--t1); }

.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.board--matrix { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: start; }
.matrix__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.col {
  flex: 0 0 218px; min-height: 190px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.board--matrix .col { flex: 1 1 auto; }
.col__head { display: flex; align-items: center; gap: 6px; }
.col__head .label { flex: 1; }
.col__drop { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 110px; border-radius: var(--r-small); transition: background .15s, box-shadow .15s; padding: 2px; }
.col__drop.is-over { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.chip {
  background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-small);
  padding: 8px 10px; font-size: 12px; cursor: grab; display: flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--border-hi); }
.chip.is-drag { opacity: .4; }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }

/* ---------- calendar ---------- */
.cal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal__head b { font-size: 15px; font-weight: 600; min-width: 170px; }
.cal__dows, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dows { margin-bottom: 6px; }
.cal__dows span { font-size: 10.5px; font-weight: 600; color: var(--t2); text-align: center; letter-spacing: 0.05em; }
.day {
  min-height: 84px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-small); padding: 6px; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; gap: 3px; color: var(--t2);
}
.day:hover { border-color: var(--border-hi); }
.day.is-out { color: var(--t3); opacity: .45; }
.day.is-today { border-color: var(--accent); color: var(--t1); }
.day.is-sel { background: var(--accent-soft); border-color: var(--accent); }
.day__n { font-size: 11px; font-weight: 700; }
.day__ev { font-size: 10px; font-weight: 600; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.day__ev i { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }

/* ---------- notes ---------- */
.notes { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; }
.notes__list { padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.notes__item { text-align: left; padding: 8px 10px; border-radius: var(--r-small); color: var(--t2); font-size: 12.5px; }
.notes__item:hover { background: var(--hover); color: var(--t1); }
.notes__item.is-on { background: var(--accent-soft); color: var(--accent); }
[data-skin="bruta"] .notes__item.is-on { background: var(--hover); color: var(--t1); }
.notes__folder { font-size: 10.5px; letter-spacing: 0.06em; color: var(--t3); padding: 10px 10px 4px; text-transform: uppercase; font-weight: 700; }
.notes__editor { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 60vh; }
.notes__title { font-size: 19px; font-weight: 600; background: none; border: none; color: var(--t1); font-family: inherit; }
.notes__title:focus { outline: none; }
.notes__body {
  flex: 1; background: none; border: none; resize: none; color: var(--t2);
  font-family: inherit; font-size: 13.5px; line-height: 1.65;
}
.notes__body:focus { outline: none; }

/* ---------- skyline / garden ----------
   skyline_screen.py: title + subtitle on the left, the names/expand/toggle
   buttons on the right, and the Garden as the landing page. */
.sky__header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.sky__header > div:first-child { flex: 1; min-width: 0; }
.sky__header .screen__sub { margin-bottom: 0; }

/* stat_box(): a big value over a small tracked label. No card frame —
   in the app these sit bare on the page, spaced apart. */
.statrow { display: flex; gap: 36px; flex-wrap: wrap; margin-bottom: 12px; }
.statbox b { display: block; font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--t1); }

.sky { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; align-items: stretch; }
.sky__side { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sky__side > #skySide { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sky__hint { font-size: 11px; color: var(--t3); line-height: 1.55; }

.canvaswrap { position: relative; overflow: hidden; border-radius: var(--r-card);
  border: 1px solid var(--border); height: 54vh; min-height: 380px; }
.canvaswrap canvas { display: block; width: 100%; height: 100%; background: #07070b; cursor: grab; }
.canvaswrap--plain { height: 60vh; min-height: 420px; }
.canvaswrap--plain canvas { background: #080809; cursor: default; }
.canvaswrap__tip {
  position: absolute; pointer-events: none; opacity: 0;
  background: #0A0A0Cf2; border: 1px solid var(--border); border-radius: var(--r-small);
  padding: 8px 11px; font-size: 11.5px; line-height: 1.5; transition: opacity .12s;
  max-width: 200px; color: var(--t2);
}
.canvaswrap__tip b { color: var(--t1); }
.canvaswrap__tip i { color: var(--t3); font-style: normal; }
.canvaswrap__tip.is-on { opacity: 1; }
.canvaswrap__legend {
  position: absolute; left: 12px; bottom: 12px; font-size: 11px; color: #7A7F88;
  background: #07070bcc; border: 1px solid var(--border); border-radius: var(--r-small);
  padding: 6px 10px; pointer-events: none;
}

/* the Garden's legend: what a bloom and a scar actually mean */
.sky__key { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.sky__key span { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--t3); }
.key { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.key--bloom { background: rgb(255,248,224); box-shadow: 0 0 9px 3px rgba(240,195,90,.55); }
.key--scar { background: rgb(120,100,70); border-radius: 1px; width: 11px; height: 3px; }
.key--limb { background: rgb(180,180,178); border-radius: 1px; width: 11px; height: 4px; }

/* expanded city: skyline_screen._toggle_expanded — the view takes over,
   Esc gets out. */
body.is-expanded .demo-bar,
body.is-expanded .side,
body.is-expanded .sky__header .screen__sub,
body.is-expanded .statrow { display: none; }
body.is-expanded .canvaswrap { height: calc(100vh - 118px); }
body.is-expanded .canvaswrap--plain { height: calc(100vh - 118px); }

/* ---------- friends / rooms ---------- */
.friends { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 14px; }
.flist { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.frow { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-small); text-align: left; width: 100%; color: var(--t2); }
.frow:hover { background: var(--hover); color: var(--t1); }
.frow.is-on { background: var(--accent-soft); color: var(--t1); box-shadow: inset 2px 0 0 var(--accent); }
[data-skin="bruta"] .frow.is-on { box-shadow: inset 2px 0 0 var(--t1); }
.ava {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--hover); border: 1px solid var(--border); color: var(--t1);
}
[data-skin="bruta"] .ava { border-radius: 0; }
.frow__meta { flex: 1; min-width: 0; }
.frow__meta b { display: block; font-size: 12.5px; font-weight: 600; color: var(--t1); }
.frow__meta span { font-size: 10.5px; color: var(--t3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t3); flex: 0 0 auto; }
.dot.is-on { background: #4CC0AD; }
.dot.is-focus { background: var(--warn); }

/* Chat. The app's message list is plain rows — "Name · HH:MM" over the text,
   right-aligned when it is yours, with a centred date separator. No bubbles:
   see online_screen._append_message. */
.chat { display: flex; flex-direction: column; height: 62vh; min-height: 400px; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat__body { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.msgsep {
  align-self: center; font-size: 10.5px; letter-spacing: 0.06em; color: var(--t3);
  padding: 2px 0 4px;
}
.msgrow { display: flex; flex-direction: column; gap: 2px; max-width: 80%; align-self: flex-start; }
.msgrow--me { align-self: flex-end; text-align: right; }
.msgrow__who { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--t3); }
.msgrow__text { font-size: 13.5px; line-height: 1.5; color: var(--t1); white-space: pre-wrap; }
.chat__foot { border-top: 1px solid var(--border); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat__emoji { display: flex; gap: 4px; }
.chat__emoji__b {
  width: 26px; height: 26px; border-radius: var(--r-small); font-size: 14px; line-height: 1;
  border: 1px solid transparent;
}
.chat__emoji__b:hover { background: var(--hover); border-color: var(--border); }
.chat__send { display: flex; gap: 8px; }
.chat__send .field { flex: 1; }

.room__top { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.room__clock { flex: 1 1 260px; padding: 18px; text-align: center; }
.room__clock b { display: block; font-size: 44px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent); line-height: 1.25; margin: 4px 0; }
[data-skin="bruta"] .room__clock b { color: var(--t1); }
.room__clock .sky__hint { margin-top: 10px; }
.room__members { flex: 1 1 320px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.rmember { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-small); }
.rmember__task { font-size: 11px; color: var(--t3); }
.room__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.chip.is-readonly { opacity: .66; cursor: default; }

/* ---------- settings ---------- */
.set { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.set__group { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.set__line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.set__line .label { min-width: 130px; }
.swatches { display: flex; gap: 7px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; }
.swatch.is-on { border-color: var(--t1); }
[data-skin="bruta"] .swatch { border-radius: 0; }
.switchrow { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--t2); font-weight: 600; cursor: pointer; }
.switchrow input { accent-color: var(--accent); width: 15px; height: 15px; }
.slider { accent-color: var(--accent); width: 180px; }

/* ---------- tour ---------- */
.tour { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
.tour.is-on { display: block; }
.tour__veil { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.72); pointer-events: auto; }
.tour__hole {
  position: absolute; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(4, 4, 6, 0.72), 0 0 0 2px var(--accent);
  transition: all .32s cubic-bezier(.4, 0, .2, 1);
}
.tour__hole.is-hidden { display: none; }
/* The tour is the SITE talking about the app, so it wears the site's
   language: square, hairline, monochrome — never the app's rounded cards. */
.tour__box {
  position: absolute; width: min(380px, calc(100vw - 32px)); pointer-events: auto;
  background: #0A0A0A; border: 1px solid #333333;
  padding: 22px 24px 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  transition: top .32s cubic-bezier(.4, 0, .2, 1), left .32s cubic-bezier(.4, 0, .2, 1);
}
.tour__step {
  display: block;
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif;
  font-size: 10px; letter-spacing: 0.16em; color: #5A5A5A;
  font-weight: 600; text-transform: uppercase;
}
.tour__title {
  font-size: 19px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.15; color: #EDEDED; margin: 10px 0 9px;
}
.tour__text { font-size: 13.5px; line-height: 1.62; color: #8A8A8A; }
.tour__text b { color: #EDEDED; font-weight: 600; }
.tour__foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid #1E1E1E;
}
.tour__bar { flex: 1; height: 1px; background: #262626; overflow: hidden; }
.tour__bar i { display: block; height: 100%; background: #EDEDED; transition: width .3s; }
.tour__foot .btn {
  border-radius: 0; background: transparent; border: 1px solid #3A3A3A; color: #EDEDED;
  padding: 9px 16px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.tour__foot .btn:hover:not(:disabled) { background: transparent; border-color: #EDEDED; }
.tour__foot .btn:disabled { color: #4A4A4A; border-color: #232323; }
.tour__foot .btn--primary { background: #EDEDED; border-color: #EDEDED; color: #0A0A0A; font-weight: 600; }
.tour__foot .btn--primary:hover:not(:disabled) { background: #FFFFFF; border-color: #FFFFFF; }
.tour__hole { border-radius: 0; }

/* Start card, before the tour begins. Square, monochrome, hairline rules —
   the same language as the rest of the site (styles.css), not the app's
   rounded cards: this screen belongs to grindfocus.com, not to Grind. */
.gate { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(6, 6, 8, .92); padding: 20px; overflow-y: auto; }
.gate.is-off { display: none; }
.gate__card {
  width: min(560px, 100%);
  background: #0A0A0A;
  border: 1px solid #262626;
  padding: 40px 40px 34px;
}
.gate__eyebrow {
  display: block;
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8A8A8A; font-weight: 600;
}
.gate__card h1 {
  font-size: clamp(26px, 3.4vw, 34px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.06; color: #EDEDED;
  margin: 14px 0 14px;
}
.gate__card p { color: #8A8A8A; font-size: 15px; line-height: 1.62; }

.gate__spec { margin: 26px 0 28px; border-top: 1px solid #1E1E1E; }
.gate__spec__grid { display: grid; grid-template-columns: 1fr 1fr; }
.gate__spec__row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 0 10px;
  border-bottom: 1px solid #1E1E1E;
}
.gate__spec__grid > .gate__spec__row:nth-child(odd) { padding-right: 18px; }
.gate__spec__row i {
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif;
  font-style: normal; font-size: 10px; letter-spacing: 0.1em;
  color: #4A4A4A; min-width: 18px;
}
.gate__spec__row span { font-size: 13.5px; color: #C9C9C9; letter-spacing: -0.005em; }

.gate__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.gate__btn {
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 15px 26px; border: 1px solid #3A3A3A; background: transparent; color: #EDEDED;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.gate__btn:hover { border-color: #EDEDED; transform: translateY(-1px); }
.gate__btn--solid { background: #EDEDED; color: #0A0A0A; border-color: #EDEDED; font-weight: 600; }
.gate__btn--solid:hover { background: #FFFFFF; }
.gate__foot {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid #1E1E1E;
  font-size: 12px; color: #5A5A5A; letter-spacing: 0.01em;
}

@media (max-width: 520px) {
  .gate__card { padding: 28px 22px 24px; }
  .gate__spec__grid { grid-template-columns: 1fr; }
  .gate__spec__grid > .gate__spec__row:nth-child(odd) { padding-right: 0; }
  .gate__btn { flex: 1 1 100%; text-align: center; }
}

/* toast (alarm, saves, sync) */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 88; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  background: #0A0A0A; border: 1px solid #333333; border-left: 2px solid #EDEDED;
  padding: 13px 16px; font-size: 13px; line-height: 1.5; color: #8A8A8A; max-width: 320px;
  animation: toast-in .25s ease both;
}
.toast b {
  display: block; margin-bottom: 4px;
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif;
  font-size: 10px; letter-spacing: 0.16em; color: #EDEDED;
  font-weight: 600; text-transform: uppercase;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }


/* ---------- dashboard (the GRIND logo opens it) ---------- */
.side__logo { width: 100%; text-align: left; }
.side__logo:hover b { color: var(--accent); }
[data-skin="bruta"] .side__logo:hover b { color: var(--t1); }

.dash__profile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 14px; }
.dash__profile .ava { width: 52px; height: 52px; font-size: 18px; }
.dash__profile__meta { flex: 1; min-width: 0; }
.dash__profile__meta b { display: block; font-size: 17px; font-weight: 600; color: var(--t1); }
.dash__profile__meta span { font-size: 12px; color: var(--t3); }
.dash__profile__nums { display: flex; gap: 26px; text-align: right; }
.dash__profile__nums div b { display: block; font-size: 19px; font-weight: 600; color: var(--t1); }

.dash__reportrow { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.dash__numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 14px; }
.stat { padding: 14px 20px; }
.stat b { display: block; font-size: 30px; font-weight: 600; line-height: 1.2; color: var(--t1); margin-top: 2px; }

.chartcard { padding: 12px 16px 14px; margin-bottom: 14px; }
.chartbox { margin-top: 8px; width: 100%; }
.chartbox canvas { display: block; width: 100%; }
.dash__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash__pair > .chartcard { margin-bottom: 14px; }
.dash__head { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.dash__tabs { margin-bottom: 14px; }

/* ---------- emulator notice ---------- */
.demo-bar__note b { color: #A8A8A8; font-weight: 600; }
.gate__note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #2A2A2A;
  border-left: 2px solid #8A8A8A;
  background: #0E0E0E;
  font-size: 12.5px; line-height: 1.6; color: #8A8A8A;
}
.gate__note b { color: #EDEDED; font-weight: 600; }
.demo-note {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.6; color: var(--t3);
}
.demo-note b { color: var(--t2); font-weight: 600; }

@media (max-width: 1020px) {
  .dash__numbers, .dash__pair { grid-template-columns: minmax(0, 1fr); }
  .dash__profile { flex-wrap: wrap; }
  .dash__profile__nums { width: 100%; text-align: left; }
}

/* small screens: the app layout collapses to one column */
@media (max-width: 1020px) {
  .work, .notes, .sky, .friends { grid-template-columns: minmax(0, 1fr); }
  .work__side, .sky__side, .notes__list, .flist { order: 2; }
  .statrow { gap: 22px; }
  .statbox b { font-size: 24px; }
  .board--matrix { grid-template-columns: minmax(0, 1fr); }
  .canvaswrap, .canvaswrap--plain { height: 44vh; min-height: 300px; }
}
@media (max-width: 760px) {
  .side { flex: 0 0 62px; }
  .side__logo b, .navbtn span, .side__label, .side__proj-dot { display: none; }
  .navbtn { justify-content: center; padding: 12px 0; }
  .screen { padding: 18px 14px 28px; }
  .matrix__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
