@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-cyr-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-lat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-cyr-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-lat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Unbounded;
  src: url("fonts/unbounded-cyr-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Unbounded;
  src: url("fonts/unbounded-lat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1c1914;
  --muted: #6d655b;
  --paper: #f4efe6;
  --paper-2: #e9e2d4;
  --chassis: #141810;
  --chassis-2: #1e2518;
  --cream: #f7f3ea;
  --amber: #e2a12b;
  --rust: #8d3b28;
  --green: #2c6b45;
  --blue: #1f5870;
  --line: rgba(28, 25, 20, 0.12);
  --side: rgba(247, 243, 234, 0.62);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Golos Text", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(226, 161, 43, 0.14), transparent 55%),
    var(--chassis);
  color: var(--cream);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.boot { min-height: 100vh; display: grid; place-items: center; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.auth-copy {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), transparent 180px),
    var(--paper);
  color: var(--ink);
}
.mark {
  font-family: Unbounded, "Golos Text", sans-serif;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}
.auth-copy h1 { font-size: clamp(64px, 8vw, 112px); line-height: 0.9; }
.lede { max-width: 460px; font-size: 20px; line-height: 1.45; margin: 18px 0 0; }
.steps { list-style: none; padding: 0; margin: 48px 0 0; }
.steps li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: 16px; }
.steps b { font-family: Unbounded, sans-serif; font-size: 13px; color: var(--rust); }
.fine { color: var(--muted); font-size: 13px; }

.auth-panel {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel h2 { font-family: Unbounded, sans-serif; font-size: 28px; margin: 0 0 8px; font-weight: 500; }
.switch { display: flex; gap: 8px; margin: 18px 0 22px; }
.switch button, .ghost, .btn, .nav button, .chips button, .icon-btn {
  border: 1px solid transparent;
  background: transparent;
}
.switch button {
  color: var(--side);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 6px 0;
  margin-right: 16px;
}
.switch button.on { color: var(--cream); border-color: var(--amber); }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--side); }
input, select, textarea {
  background: #0e120c;
  border: 1px solid rgba(247, 243, 234, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--cream);
}
.sheet input, .sheet select, .sheet textarea {
  background: #fffdf8;
  color: var(--ink);
  border-color: var(--line);
}
.roles { display: flex; flex-wrap: wrap; gap: 8px; }
.roles label { display: block; }
.roles input { position: absolute; opacity: 0; pointer-events: none; }
.roles span {
  display: inline-block;
  border: 1px solid rgba(247, 243, 234, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--cream);
}
.roles input:checked + span { background: var(--amber); color: #1c1406; border-color: var(--amber); }
.roles input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn {
  background: var(--amber);
  color: #1c1406;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.ghost, .ghost {
  background: transparent;
  color: inherit;
  border-color: var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}
.sheet .ghost { border-color: var(--line); color: var(--ink); }
.flash {
  background: #f3d6cf;
  color: #6d2618;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.shell { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.side {
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 100vh;
  overflow: auto;
}
.brand { padding: 6px 8px 2px; }
.brand .mark { font-size: 28px; }
.brand p { margin: 4px 0 0; color: var(--side); font-size: 13px; }
.nav { display: grid; gap: 4px; }
.nav p { margin: 14px 8px 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(247,243,234,0.45); }
.nav button {
  text-align: left;
  color: var(--side);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav button.on, .nav button:hover { background: var(--chassis-2); color: var(--cream); }
.nav b {
  min-width: 22px;
  text-align: center;
  background: rgba(226, 161, 43, 0.18);
  color: var(--amber);
  border-radius: 999px;
  font-size: 12px;
  padding: 2px 6px;
}
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 8px; }
.who { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber); color: #1c1406; font-weight: 600; font-size: 13px; flex: none;
}
.who small, .muted { color: var(--muted); }
.side .who small { color: rgba(247,243,234,0.55); display: block; }
.lamp { display: flex; gap: 8px; align-items: center; font-size: 12px; color: rgba(247,243,234,0.7); }
.lamp i {
  width: 9px; height: 9px; border-radius: 50%; background: #85785f; display: block;
  box-shadow: 0 0 0 4px rgba(133, 120, 95, 0.15);
}
.lamp[data-state="ready"] i { background: #8fbf6a; box-shadow: 0 0 0 4px rgba(143, 191, 106, 0.15); }
.lamp[data-state="loading"] i { background: var(--amber); box-shadow: 0 0 0 4px rgba(226, 161, 43, 0.18); animation: pulse 1.2s ease infinite; }
.lamp[data-state="error"] i { background: #d15b45; }

.stage { min-width: 0; padding: 16px 16px 16px 0; display: flex; }
.sheet {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 32px);
  background:
    linear-gradient(90deg, rgba(141, 59, 40, 0.9) 0 3px, transparent 3px),
    linear-gradient(90deg, transparent 28px, rgba(141, 59, 40, 0.35) 28px 29px, transparent 29px),
    var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 22px 22px 42px;
  overflow: auto;
}
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.kicker { margin: 0; letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; color: var(--rust); }
.top h2 { margin: 4px 0 0; font-family: Unbounded, sans-serif; font-weight: 500; font-size: 32px; letter-spacing: -0.03em; }
.tools { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink); position: relative;
}
.tools em {
  font-style: normal; margin-left: 6px; background: var(--rust); color: white;
  border-radius: 999px; font-size: 11px; padding: 1px 6px;
}
.notes {
  position: absolute; right: 22px; top: 78px; z-index: 3;
  width: min(380px, calc(100% - 64px));
  background: #fffdf8; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px;
}
.notes button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  padding: 10px; border-radius: 10px; color: var(--ink);
}
.notes button:hover { background: var(--paper-2); }
.notes p { margin: 8px; color: var(--muted); }

.chips { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.chips button { border-radius: 999px; padding: 6px 10px; color: var(--muted); }
.chips button.on { background: var(--ink); color: var(--cream); }

.work { display: grid; grid-template-columns: 1fr; gap: 18px; }
.work.split { grid-template-columns: minmax(0, 1fr) 320px; }
.head-row, .task {
  display: grid;
  grid-template-columns: 1fr 150px 130px;
  gap: 12px;
  align-items: center;
}
.head-row { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 12px 8px; }
.task {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px;
  color: var(--ink);
  animation: rise 0.4s ease both;
}
.task:hover, .task.on { background: rgba(255, 253, 248, 0.7); }
.task.on { box-shadow: inset 3px 0 0 var(--amber); }
.task strong { display: block; font-weight: 600; }
.task small { color: var(--muted); }
.person { display: flex; gap: 8px; align-items: center; }
.person .avatar { width: 28px; height: 28px; font-size: 11px; }
.due.late { color: var(--rust); font-weight: 600; }
.lamp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--amber); }
.lamp-dot.progress { background: var(--blue); }
.lamp-dot.done { background: var(--green); }
.empty { padding: 28px 8px; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-family: Unbounded, sans-serif; font-weight: 500; }

.detail {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  align-self: start;
}
.detail h3 { margin: 8px 0; font-size: 20px; line-height: 1.3; }
.meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.status-row, .stack { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.quote { margin: 0 0 12px; padding-left: 10px; border-left: 2px solid var(--amber); color: var(--muted); }

.create, .composer {
  display: grid; gap: 10px; margin-bottom: 16px;
  background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.composer { grid-template-columns: 1fr auto auto; align-items: end; }
.mic.rec { background: var(--rust); color: white; border-color: var(--rust); }
.log { display: grid; gap: 10px; padding-bottom: 12px; }
.bubble { max-width: 640px; padding: 10px 12px; border-radius: 14px; }
.bubble.user { background: #fffdf8; border: 1px solid var(--line); }
.bubble.assistant { background: #1c1914; color: var(--cream); margin-left: 28px; }
.bubble small { display: block; opacity: 0.6; margin-bottom: 4px; }
.people { display: grid; gap: 8px; }
.card {
  display: grid; grid-template-columns: 1.3fr 160px 140px auto; gap: 10px; align-items: center;
  padding: 10px 8px; border-top: 1px solid var(--line);
}
.card.load { box-shadow: inset 4px 0 0 var(--amber); background: rgba(226, 161, 43, 0.08); }
.card.heavy { box-shadow: inset 4px 0 0 var(--rust); background: rgba(141, 59, 40, 0.08); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
@media (max-width: 980px) {
  .auth, .shell { grid-template-columns: 1fr; }
  .auth-copy { padding: 32px 24px; }
  .auth-copy h1 { font-size: 64px; }
  .stage { padding: 0 12px 12px; }
  .sheet { padding: 18px 14px 18px 32px; border-radius: 0; min-height: 100vh; }
  .head-row { display: none; }
  .task, .card, .composer { grid-template-columns: 1fr; }
  .work.split { grid-template-columns: 1fr; }
  .detail { position: fixed; inset: 12px; z-index: 4; overflow: auto; }
  .side { gap: 10px; }
  .nav { grid-template-columns: repeat(2, 1fr); }
}
