:root {
  color-scheme: dark;
  --bg: #090a0e;
  --panel: #101116;
  --panel-raised: #15161c;
  --panel-soft: #191a21;
  --line: #272933;
  --line-strong: #343642;
  --text: #f4f3f5;
  --muted: #a09fa9;
  --faint: #6d6d77;
  --accent: #ff6f78;
  --accent-soft: rgba(255, 111, 120, 0.13);
  --accent-strong: #ff8d94;
  --violet: #9d83ff;
  --violet-soft: rgba(157, 131, 255, 0.13);
  --green: #72d6a0;
  --green-soft: rgba(114, 214, 160, 0.12);
  --amber: #efbd63;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --radius: 12px;
  --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 760px;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 58% -30%, rgba(157, 131, 255, 0.08), transparent 34%),
    var(--bg);
}

.topbar {
  height: 58px;
  display: grid;
  grid-template-columns: 120px minmax(230px, 1fr) minmax(260px, 420px) minmax(260px, 1fr);
  align-items: center;
  border-bottom: 1px solid #202127;
  background: rgba(13, 14, 18, 0.96);
  padding: 0 16px;
  position: relative;
  z-index: 30;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #3d3e46;
}

.window-controls span:first-child {
  background: #ff6b65;
}

.window-controls span:nth-child(2) {
  background: #eeb74d;
}

.window-controls span:nth-child(3) {
  background: #65c875;
}

.product-lockup,
.repository-switcher,
.topbar-actions,
.sync-state {
  display: flex;
  align-items: center;
}

.product-lockup {
  gap: 10px;
  min-width: 0;
}

.product-name {
  font-weight: 720;
  letter-spacing: -0.01em;
}

.concept-badge {
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 5px;
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.concept-mark {
  width: 23px;
  height: 23px;
  position: relative;
  display: inline-block;
  border-radius: 7px;
  background: linear-gradient(145deg, #ff7c83, #b279f5);
  box-shadow: 0 0 20px rgba(255, 111, 120, 0.2);
}

.concept-mark span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #18141c;
}

.concept-mark span:first-child {
  left: 5px;
  top: 5px;
}

.concept-mark span:nth-child(2) {
  right: 5px;
  top: 5px;
}

.concept-mark span:nth-child(3) {
  left: 9.5px;
  bottom: 5px;
}

.repository-switcher {
  justify-self: center;
  min-width: 255px;
  justify-content: center;
  gap: 10px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121319;
}

.repository-switcher small,
.repository-switcher strong {
  display: block;
}

.repository-switcher small {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.repository-switcher strong {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 620;
}

.repo-glyph {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.06);
}

.chevron {
  margin-left: 8px;
  color: var(--faint);
}

.topbar-actions {
  justify-content: flex-end;
  gap: 18px;
}

.sync-state {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot,
.summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.desktop-layout {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 232px minmax(510px, 1fr) 354px;
  min-height: 620px;
}

.tour-rail,
.guide-panel {
  background: rgba(15, 16, 21, 0.98);
}

.tour-rail {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 28px 18px 18px;
  min-width: 0;
}

.rail-heading {
  padding: 0 8px 26px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--faint);
  font: 10px/1.2 var(--font-mono);
  letter-spacing: 0.09em;
}

.rail-heading h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.rail-heading > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.step-navigation ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-button {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 11px 9px;
  cursor: pointer;
  position: relative;
}

.step-button::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 38px;
  width: 1px;
  height: 20px;
  background: var(--line);
}

.step-navigation li:last-child .step-button::after {
  display: none;
}

.step-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.025);
}

.step-button[aria-current="step"] {
  background: var(--accent-soft);
}

.step-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--faint);
  font: 10px/1 var(--font-mono);
  background: var(--panel);
  position: relative;
  z-index: 1;
}

.step-button[aria-current="step"] .step-index {
  color: #1d1115;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 111, 120, 0.1);
}

.step-button.is-complete .step-index {
  color: #10251a;
  border-color: var(--green);
  background: var(--green);
}

.step-copy {
  min-width: 0;
}

.step-copy strong,
.step-copy span {
  display: block;
}

.step-copy strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.step-copy span {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
}

.step-button[aria-current="step"] .step-copy strong,
.step-button.is-complete .step-copy strong {
  color: var(--text);
}

.mental-model {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121319;
}

.mental-model strong,
.mental-model span {
  display: block;
}

.mental-model strong {
  font-size: 10px;
  line-height: 1.4;
}

.mental-model span {
  color: var(--faint);
  font-size: 9px;
  margin-top: 2px;
}

.mini-worktree {
  width: 34px;
  height: 36px;
  position: relative;
  flex: 0 0 auto;
}

.mini-worktree .trunk,
.mini-worktree .branch-path {
  position: absolute;
  width: 2px;
  border-radius: 2px;
}

.mini-worktree .trunk {
  left: 7px;
  top: 5px;
  height: 26px;
  background: var(--faint);
}

.mini-worktree .branch-path-one,
.mini-worktree .branch-path-two {
  left: 8px;
  width: 19px;
  height: 11px;
  border-top: 2px solid;
  border-right: 2px solid;
  background: transparent;
  border-radius: 0 8px 0 0;
}

.mini-worktree .branch-path-one {
  top: 8px;
  border-color: var(--accent);
}

.mini-worktree .branch-path-two {
  top: 20px;
  border-color: var(--violet);
}

.mini-worktree .node {
  position: absolute;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mini-worktree .node-one {
  top: 6px;
  background: var(--accent);
}

.mini-worktree .node-two {
  top: 18px;
  background: var(--violet);
}

.workspace {
  min-width: 0;
  overflow: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #0c0d11;
  background-size: 22px 22px;
}

.workspace-toolbar {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 18, 0.9);
  position: sticky;
  top: 0;
  z-index: 12;
}

.breadcrumb {
  margin: 0 0 4px;
  color: var(--faint);
  font: 10px/1.2 var(--font-mono);
}

.breadcrumb span {
  color: var(--muted);
}

.breadcrumb b {
  padding: 0 6px;
  color: #4b4c55;
}

.workspace-toolbar h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.workspace-summary {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
}

.workspace-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace-summary strong {
  color: var(--text);
  font-weight: 650;
}

.summary-dot.changes {
  background: var(--amber);
}

.workspace-canvas {
  display: grid;
  grid-template-columns: minmax(246px, 0.72fr) minmax(335px, 1.28fr);
  gap: 16px;
  padding: 22px;
  min-height: calc(100% - 80px);
}

.changes-column,
.branches-column {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 17, 22, 0.97);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.changes-column {
  padding: 20px;
}

.branches-column {
  padding: 20px;
}

.section-title-row,
.branches-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.count-badge {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font: 10px/1 var(--font-mono);
}

.section-intro {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.file-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-raised);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.file-card.is-highlighted {
  border-color: rgba(255, 111, 120, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 111, 120, 0.08);
}

.file-main {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
}

.file-status {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  color: var(--amber);
  background: rgba(239, 189, 99, 0.1);
  font: 11px/1 var(--font-mono);
}

.file-name {
  min-width: 0;
  flex: 1;
}

.file-name strong,
.file-name small {
  display: block;
}

.file-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font: 11px/1.35 var(--font-mono);
  white-space: nowrap;
}

.file-name small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
}

.diff-stat {
  display: flex;
  gap: 6px;
  font: 10px/1 var(--font-mono);
}

.diff-stat .added {
  color: var(--green);
}

.diff-stat .removed {
  color: var(--accent);
}

.file-actions {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #121319;
  border-radius: 0 0 9px 9px;
}

.file-actions .button {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 10px;
}

.file-actions .button-muted {
  color: var(--faint);
}

.empty-changes {
  min-height: 174px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
}

.empty-changes[hidden] {
  display: none;
}

.empty-check {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border: 1px solid rgba(114, 214, 160, 0.35);
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
}

.empty-changes strong {
  font-size: 12px;
}

.empty-changes p {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.action-legend {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.action-legend > p {
  margin: 0 0 8px;
  color: var(--faint);
  font: 9px/1.2 var(--font-mono);
  letter-spacing: 0.07em;
}

.legend-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 47px;
  padding: 7px;
  border-radius: 7px;
  color: var(--muted);
}

.legend-row.is-recommended {
  color: var(--text);
  background: var(--accent-soft);
}

.legend-row strong,
.legend-row small {
  display: block;
}

.legend-row strong {
  font-size: 10px;
}

.legend-row small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.legend-row em {
  color: var(--accent-strong);
  font: normal 8px/1 var(--font-mono);
  letter-spacing: 0.06em;
}

.legend-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font: 12px/1 var(--font-mono);
}

.branch-icon {
  position: relative;
}

.branch-icon::before,
.branch-icon::after {
  content: "";
  position: absolute;
}

.branch-icon::before {
  width: 2px;
  height: 11px;
  left: 6px;
  top: 5px;
  background: var(--accent);
}

.branch-icon::after {
  width: 7px;
  height: 7px;
  right: 5px;
  top: 4px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 5px 0 0;
}

.applied-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 10px;
}

.applied-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.shared-directory-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(157, 131, 255, 0.3);
  border-radius: 9px;
  background: linear-gradient(90deg, var(--violet-soft), rgba(255, 111, 120, 0.06));
}

.shared-directory-note[hidden] {
  display: none;
}

.shared-directory-note strong {
  font-size: 11px;
}

.shared-directory-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.shared-visual {
  width: 38px;
  height: 34px;
  flex: 0 0 auto;
  position: relative;
}

.shared-visual i {
  position: absolute;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.shared-visual i:first-child {
  top: 4px;
  background: var(--accent);
}

.shared-visual i:nth-child(2) {
  bottom: 4px;
  background: var(--violet);
}

.shared-visual::before,
.shared-visual::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 18px;
  height: 11px;
  border-right: 2px solid var(--line-strong);
}

.shared-visual::before {
  top: 8px;
  border-top: 2px solid var(--accent);
  border-radius: 0 8px 0 0;
}

.shared-visual::after {
  bottom: 8px;
  border-bottom: 2px solid var(--violet);
  border-radius: 0 0 8px 0;
}

.shared-visual span {
  position: absolute;
  right: 1px;
  top: 9px;
  width: 10px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--panel-soft);
}

.branch-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.branch-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-raised);
  overflow: visible;
  transition: border-color 160ms ease, transform 160ms ease;
}

.branch-card.is-selected {
  border-color: rgba(255, 111, 120, 0.68);
  box-shadow: 0 0 0 3px rgba(255, 111, 120, 0.07);
}

.branch-card.is-parallel {
  border-color: rgba(157, 131, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(157, 131, 255, 0.06);
}

.branch-card-main {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
}

.branch-color {
  width: 23px;
  height: 23px;
  position: relative;
  border-radius: 6px;
  background: var(--accent-soft);
}

.branch-color::before,
.branch-color::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
}

.branch-color::before {
  width: 5px;
  height: 5px;
  left: 5px;
  top: 5px;
  box-shadow: 0 8px 0 var(--accent);
}

.branch-color::after {
  width: 5px;
  height: 5px;
  right: 5px;
  top: 5px;
}

.branch-color i {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  border-radius: 0 5px 0 0;
}

.branch-card.is-parallel .branch-color {
  background: var(--violet-soft);
}

.branch-card.is-parallel .branch-color::before,
.branch-card.is-parallel .branch-color::after {
  background: var(--violet);
}

.branch-card.is-parallel .branch-color::before {
  box-shadow: 0 8px 0 var(--violet);
}

.branch-card.is-parallel .branch-color i {
  border-color: var(--violet);
}

.branch-info {
  min-width: 0;
}

.branch-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 11px/1.4 var(--font-mono);
  white-space: nowrap;
}

.branch-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}

.branch-meta .meta-separator {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--faint);
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(114, 214, 160, 0.28);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  white-space: nowrap;
}

.state-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.branch-files {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.08);
  font: 9px/1.2 var(--font-mono);
  border-radius: 0 0 9px 9px;
}

.branch-files .file-mini-status {
  color: var(--amber);
}

.branch-files .no-files {
  color: var(--faint);
  font-family: var(--font-ui);
  font-style: italic;
}

.branch-card-actions {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #121319;
  border-radius: 0 0 9px 9px;
}

.create-branch-card {
  position: relative;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
}

.create-branch-card.is-highlighted {
  border-style: solid;
  border-color: rgba(255, 111, 120, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 111, 120, 0.08);
}

.create-branch-card.is-violet-highlight {
  border-style: solid;
  border-color: rgba(157, 131, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(157, 131, 255, 0.08);
}

.create-card-copy {
  display: flex;
  gap: 10px;
  align-items: center;
}

.create-card-copy strong,
.create-card-copy p {
  display: block;
}

.create-card-copy strong {
  font-size: 11px;
}

.create-card-copy p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.add-branch-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 17px;
}

.branch-form {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.branch-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text);
  background: #0c0d11;
  font: 10px/1.2 var(--font-mono);
}

.branch-form input::selection {
  color: white;
  background: rgba(255, 111, 120, 0.55);
}

.branch-empty-state {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
}

.branch-empty-state strong {
  display: block;
  font-size: 11px;
}

.branch-empty-state p {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.empty-branch-lines {
  width: 52px;
  height: 36px;
  margin: 0 auto 10px;
  position: relative;
  opacity: 0.55;
}

.empty-branch-lines i {
  position: absolute;
  left: 7px;
  width: 38px;
  height: 1px;
  background: var(--line-strong);
}

.empty-branch-lines i:first-child {
  top: 5px;
}

.empty-branch-lines i:nth-child(2) {
  top: 17px;
}

.empty-branch-lines i:nth-child(3) {
  top: 29px;
}

.empty-branch-lines i::before,
.empty-branch-lines i::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.empty-branch-lines i::before {
  left: -2px;
}

.empty-branch-lines i::after {
  right: -2px;
}

.unapplied-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.unapplied-section[hidden] {
  display: none;
}

.shelf-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.shelf-heading h4 {
  margin: 0;
  font-size: 11px;
}

.shelf-heading span {
  color: var(--faint);
  font-size: 9px;
}

.unapplied-card {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(157, 131, 255, 0.32);
  border-radius: 9px;
  background: var(--violet-soft);
}

.unapplied-card .state-pill {
  color: var(--muted);
  border-color: var(--line-strong);
  background: rgba(0, 0, 0, 0.12);
}

.unapply-confirmation {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgba(114, 214, 160, 0.38);
  border-radius: 9px;
  background: var(--green-soft);
}

.confirmation-copy {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.confirmation-check {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #0b1d12;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.confirmation-copy strong,
.confirmation-copy span {
  display: block;
}

.confirmation-copy strong {
  color: var(--green);
  font-size: 10px;
}

.confirmation-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.reapply-button {
  flex: 0 0 auto;
}

.reapply-button.is-required {
  box-shadow:
    0 0 0 3px rgba(114, 214, 160, 0.16),
    0 8px 22px rgba(114, 214, 160, 0.12);
}

.reapply-confirmation {
  margin-top: 10px;
}

.callout-slot {
  position: relative;
}

.context-callout {
  position: absolute;
  z-index: 25;
  right: -10px;
  top: calc(100% + 14px);
  width: min(248px, calc(100vw - 60px));
  padding: 11px 12px;
  border: 1px solid rgba(255, 111, 120, 0.58);
  border-radius: 9px;
  background: #21171c;
  box-shadow: var(--shadow);
  animation: callout-in 220ms ease-out;
}

.context-callout.violet {
  border-color: rgba(157, 131, 255, 0.64);
  background: #1d1928;
}

.context-callout.green {
  border-color: rgba(114, 214, 160, 0.54);
  background: #132019;
}

.context-callout::before {
  content: "";
  position: absolute;
  right: 26px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(255, 111, 120, 0.58);
  border-top: 1px solid rgba(255, 111, 120, 0.58);
  background: inherit;
  transform: rotate(45deg);
}

.context-callout.violet::before {
  border-color: rgba(157, 131, 255, 0.64);
}

.context-callout.green::before {
  border-color: rgba(114, 214, 160, 0.54);
}

.context-callout b,
.context-callout span {
  display: block;
}

.context-callout b {
  margin-bottom: 4px;
  color: var(--accent-strong);
  font: 9px/1.2 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.context-callout.violet b {
  color: #b8a7ff;
}

.context-callout.green b {
  color: var(--green);
}

.context-callout span {
  color: #e0dde2;
  font-size: 10px;
  line-height: 1.45;
}

.button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  color: #241317;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 7px 20px rgba(255, 111, 120, 0.12);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  border-color: #484a56;
  background: #202128;
}

.button-quiet {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.button-danger-subtle {
  color: #ff9da3;
  border-color: rgba(255, 111, 120, 0.33);
  background: rgba(255, 111, 120, 0.08);
}

.button-compact {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}

.guide-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 26px 25px 22px;
  position: relative;
  z-index: 20;
  box-shadow: -16px 0 38px rgba(0, 0, 0, 0.16);
}

.guide-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 34px;
}

.progress-segment {
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 180ms ease;
}

.progress-segment.is-current {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 111, 120, 0.28);
}

.progress-segment.is-complete {
  background: var(--green);
}

.guide-step-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.guide-step-label span:first-child {
  color: var(--accent-strong);
  font: 10px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
}

.guide-step-label span:last-child {
  color: var(--faint);
  font: 10px/1.2 var(--font-mono);
}

.guide-panel h2 {
  max-width: 290px;
  margin: 0;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.guide-lede {
  margin: 15px 0 0;
  color: #b5b3bc;
  font-size: 13px;
  line-height: 1.65;
}

.term-card {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-raised);
}

.term-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.term-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.term-card strong {
  font-size: 11px;
}

.term-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.why-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(157, 131, 255, 0.28);
  border-radius: 9px;
  background: var(--violet-soft);
}

.why-card > span {
  color: #b8a7ff;
  font: 9px/1.2 var(--font-mono);
  letter-spacing: 0.07em;
}

.why-card p {
  margin: 7px 0 0;
  color: #c5c0cf;
  font-size: 11px;
  line-height: 1.55;
}

.success-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.success-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.success-list i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0b1d12;
  background: var(--green);
  font-style: normal;
  font-size: 10px;
}

.guide-footer {
  margin-top: auto;
  padding-top: 22px;
}

.completion-hint {
  min-height: 32px;
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.completion-hint.is-complete {
  color: var(--green);
}

.guide-controls {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
}

.button-next {
  justify-content: space-between;
}

.skip-button {
  width: 100%;
  margin-top: 13px;
  border: 0;
  padding: 6px;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.skip-button:hover {
  color: var(--muted);
  text-decoration-color: currentColor;
}

.completion-panel {
  padding-top: 22px;
}

.completion-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(114, 214, 160, 0.36);
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 22px;
}

.resume-button {
  width: 100%;
  margin-top: 22px;
}

.toast-region {
  position: fixed;
  right: 376px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #1b1c22;
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in 180ms ease-out;
}

.toast i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0b1d12;
  background: var(--green);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

@keyframes callout-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .desktop-layout {
    grid-template-columns: 78px minmax(500px, 1fr) 330px;
  }

  .rail-heading {
    padding: 0 2px 18px;
    text-align: center;
  }

  .rail-heading h1,
  .rail-heading > p:last-child,
  .rail-heading .eyebrow,
  .step-copy,
  .mental-model > div:last-child {
    display: none;
  }

  .step-button {
    display: flex;
    justify-content: center;
    padding: 11px 0;
  }

  .step-button::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .mental-model {
    justify-content: center;
    padding: 10px 4px;
  }

  .topbar {
    grid-template-columns: 90px minmax(185px, 1fr) 270px minmax(200px, 1fr);
  }

  .concept-badge,
  .sync-state {
    display: none;
  }

  .workspace-canvas {
    padding: 16px;
    gap: 12px;
  }

  .changes-column,
  .branches-column {
    padding: 16px;
  }

  .toast-region {
    right: 350px;
  }
}

@media (max-width: 940px) {
  body {
    overflow: auto;
  }

  .topbar {
    grid-template-columns: 80px minmax(185px, 1fr) minmax(230px, 300px) 110px;
  }

  .topbar-actions .button {
    font-size: 0;
    width: 34px;
  }

  .topbar-actions .reset-symbol {
    font-size: 15px;
  }

  .desktop-layout {
    height: auto;
    min-height: calc(100vh - 58px);
    grid-template-columns: 72px minmax(520px, 1fr);
    grid-template-rows: minmax(620px, auto) auto;
  }

  .tour-rail {
    grid-row: 1 / span 2;
  }

  .workspace {
    min-height: 620px;
    overflow: visible;
  }

  .guide-panel {
    grid-column: 2;
    min-height: 430px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 28px max(30px, calc((100% - 650px) / 2));
  }

  .guide-panel h2 {
    max-width: 520px;
  }

  .guide-footer {
    margin-top: 30px;
  }

  .toast-region {
    right: 22px;
  }
}

@media (max-width: 800px) {
  .product-name {
    font-size: 12px;
  }

  .repository-switcher {
    min-width: 220px;
  }

  .workspace-canvas {
    grid-template-columns: 250px minmax(320px, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
