:root {
  --bg: #1e1e1e;
  --border: #3d3d3d;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --row: #252525;
  --row-alt: #2f2f2f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.tg-app-header {
  background: #161616;
  border-bottom: 1px solid #3d3d3d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tg-app-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 6px 14px 6px 6px;
}

.tg-app-header .brand img.logo {
  height: 72px;
  width: 72px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  background: #0a0a0a;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  padding: 2px;
  box-sizing: border-box;
}

.brand-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; }

.app-title {
  margin: 0;
  font-family: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: #ffd60a;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(255, 214, 10, 0.25);
}

.tg-app-header .tag {
  color: #9a9a9a;
  font-size: 12px;
  display: block;
  margin-top: 4px;
  font-family: "Oswald", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-meta .tag { margin-top: 0; }

.header-meta .version-check { display: contents; }

/* Build hash: small, beside the version. */
.header-meta .commit {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 10px;
  color: #6f6f6f;
  letter-spacing: .04em;
  margin-left: -8px;
}

.header-meta .commit[hidden],
#new-build[hidden] { display: none; }

#new-build,
#check-updates,
#update-status,
#update-action {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  color: #9a9a9a;
  letter-spacing: .08em;
  text-transform: none;
}

#update-status {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#update-status[hidden],
#update-action[hidden] { display: none; }

#new-build,
#check-updates,
#update-action {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  min-height: 0;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#check-updates:hover,
#update-action:hover { background: transparent; color: #c8c8c8; }

#sign-out-btn {
  background: #3a3a3a;
  border: 1px solid #3d3d3d;
  color: #e8e8e8;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: normal;
  min-height: 0;
}

#sign-out-btn:hover { background: #484848; color: #e8e8e8; }

main { padding: 16px; max-width: 980px; margin: 0 auto; }

.login-card {
  width: min(420px, 100%);
  margin: 24px auto;
  background: #161616;
  border: 1px solid #3d3d3d;
  border-radius: 10px;
  padding: 22px 22px 18px;
}

.login-card h2 {
  margin: 0 0 8px;
  font-family: "Bebas Neue", "Oswald", Impact, sans-serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: .08em;
  color: #ffd60a;
}

.login-card p { color: var(--muted); margin: 0 0 12px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

#login-submit {
  background: #3a3a3a;
  border: 1px solid #3d3d3d;
  color: #e8e8e8;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

#login-submit:hover { background: #484848; }

.login-error { color: #f0b4b4; min-height: 1.2em; margin: 8px 0; }

#board[hidden],
#login-card[hidden],
#access[hidden],
#access-panel[hidden],
#sign-out-btn[hidden] { display: none; }

.bot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--row);
  border-bottom: 1px solid var(--border);
}

.bot:nth-child(even) { background: var(--row-alt); }

.bot:first-child { border-radius: 8px 8px 0 0; }

.bot:last-child { border-radius: 0 0 8px 8px; border-bottom: 0; }

.bot.is-waiting { box-shadow: inset 3px 0 0 #e6a100; }
.bot.is-linked { cursor: pointer; }

.bot.is-idle,
.bot.is-idle:nth-child(even) { background: #191919; }

.bot.is-idle .bot-name,
.bot.is-idle .task,
.bot.is-idle .task.is-idle { color: #8d8d8d; }

.bot-name {
  font-family: "Oswald", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 16px;
  color: #e8e8e8;
  padding-top: 2px;
}

.bot-side {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  max-width: 62%;
  position: relative;
}

.task {
  margin: 0;
  color: #e8e8e8;
  text-align: right;
  line-height: 1.35;
}

.task.is-idle { color: #9a9a9a; }

.detail {
  margin: 0;
  color: #9a9a9a;
  text-align: right;
  font-size: 12px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: #9a9a9a;
  font-size: 12px;
}

.chip {
  display: inline-block;
  border: 1px solid #3d3d3d;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.6;
}

.chip-working { color: #b7ebc6; border-color: #3d9a5f; }
.chip-waiting {
  background: #e6a100;
  color: #1a1200;
  border-color: #e6a100;
  font-weight: 650;
}
.chip-idle { color: #8d8d8d; border-color: #4a4a4a; background: transparent; }
.chip-stale { color: #f0b4b4; border-color: #c44; }

.waiting-count {
  background: #e6a100;
  color: #1a1200;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.5;
}

.waiting-count[hidden] { display: none; }

.action-needed {
  margin: 0;
  color: #ffd60a;
  font-weight: 650;
  text-align: right;
  line-height: 1.35;
}

.action-needed a { color: #ffd60a; }

.still-working,
.waiting-for {
  margin: 0;
  color: #d7d7d7;
  font-size: 12px;
  text-align: right;
}

.bar.is-paused > span { background: #e6a100; }

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.bar {
  width: 140px;
  height: 3px;
  background: #111;
  border-radius: 2px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 3px;
  background: #3d9a5f;
}

.pct { color: #e8e8e8; font-variant-numeric: tabular-nums; }

.linkish {
  background: transparent;
  border: none;
  padding: 0;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.linkish:hover { color: #c8c8c8; }

.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, 78vw);
  max-height: 240px;
  overflow: auto;
  background: #161616;
  border: 1px solid #3d3d3d;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  z-index: 4;
}

.popover p { margin: 0 0 8px; color: #9a9a9a; }

.popover li {
  list-style: none;
  margin: 0 0 8px;
  color: #e8e8e8;
}

.popover ul { margin: 0; padding: 0; }

.recheck-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.recheck-btn,
.recheck-text {
  appearance: none;
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  border-radius: 999px;
  padding: 3px 12px;
  cursor: pointer;
  line-height: 1.4;
}

.recheck-text { border: none; padding: 2px 8px; text-decoration: underline; text-underline-offset: 2px; }

.recheck-btn:hover,
.recheck-text:hover,
.recheck-gear:hover { color: #c8c8c8; }

.recheck-gear {
  appearance: none;
  background: transparent;
  border: none;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.recheck-note { min-width: 0; }

.recheck-line {
  margin: 0;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .04em;
}

.recheck-spin {
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border: 1px solid #3a3a3a;
  border-top-color: #9a9a9a;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -1px;
  animation: recheck-spin .9s linear infinite;
}

@keyframes recheck-spin { to { transform: rotate(360deg); } }

.recheck-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  z-index: 20;
}

.recheck-modal[hidden] { display: none; }

.recheck-card {
  width: min(420px, 100%);
  background: #161616;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  padding: 16px 16px 12px;
}

.recheck-card h2 {
  margin: 0 0 8px;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
  color: #e8e8e8;
}

.recheck-help {
  margin: 0 0 12px;
  color: #9a9a9a;
  font-size: 13px;
  line-height: 1.4;
}

.recheck-select {
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.recheck-actions { display: flex; gap: 8px; align-items: center; }

.link-dead {
  display: inline-block;
  margin-left: 8px;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .04em;
}

#needs-help { margin: 0 0 16px; }

#needs-help.is-quiet { margin-bottom: 10px; }

.help-quiet {
  margin: 0;
  color: #8d8d8d;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
}

.help-panel {
  border: 1px solid #e6a100;
  background: #241c0c;
  border-radius: 8px;
  padding: 10px 14px 4px;
}

.help-title {
  margin: 0;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #e6a100;
}

.help-item {
  padding: 10px 0 12px;
  border-top: 1px solid #5c4810;
}

.help-item:first-of-type { border-top: 0; }

.help-name {
  margin: 0;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f4f4f4;
}

.help-task {
  margin: 2px 0 6px;
  color: #d7d7d7;
  font-size: 13px;
}

.help-action {
  margin: 0;
  padding: 6px 8px;
  background: #e6a100;
  color: #1a1200;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.35;
  border-radius: 4px;
}

.help-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 6px 0 0;
  color: #f4f4f4;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .04em;
}

.wait-link {
  color: inherit;
  text-decoration: none;
}

.wait-plain { display: block; }

.wait-cue {
  margin-left: 6px;
  color: #9a9a9a;
  font-size: 11px;
}

.wait-host {
  display: none;
  margin-left: 6px;
  color: #f4f4f4;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .04em;
}

.wait-link:hover .wait-host,
.wait-link:focus-visible .wait-host,
.help-item:hover .wait-host,
.bot.is-linked:hover .wait-host { display: inline; }

.help-action .wait-cue,
.help-action .wait-host { color: #1a1200; }

.no-link {
  color: #8d8d8d;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .04em;
}

.mark-done {
  background: transparent;
  border: 0;
  padding: 0;
  color: #c8c8c8;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.mark-done.is-armed { color: #f4f4f4; }

.help-meta .mark-done { color: #f4f4f4; }

.help-tag {
  color: #1a1200;
  background: #e6a100;
  border-radius: 2px;
  padding: 1px 6px;
  letter-spacing: .04em;
}

.help-tag.is-soft {
  color: #f4f4f4;
  background: #3a3a3a;
  border: 1px solid #6a6a6a;
}

#projects { margin-top: 4px; }

#rows { margin-top: 22px; }

/* Machines: between Projects and the bot rows, same row style as bots. */
#machines { margin-top: 22px; }
#machines[hidden] { display: none; }
#machines h2 {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin: 0 0 8px;
}
.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a5a5a;
  margin-right: 8px;
  vertical-align: middle;
}
.online-dot.is-online { background: #3d9a5f; }
.chip-online { color: #b7ebc6; border-color: #3d9a5f; }
.chip-offline { color: #8d8d8d; border-color: #4a4a4a; background: transparent; }
.bot.machine.is-offline .bot-name { color: #6f6f6f; }
/* Machines carry the Projects bar under the row (same track, labels, tips, time track). */
.bot.machine { flex-wrap: wrap; }
.machine-bar { flex: 1 1 100%; min-width: 0; margin-top: 2px; }
.machine-bar .bar-block { margin: 12px 0 2px; }
.machine-bar .marker-notes,
.machine-bar .time-labels { margin: 4px 0; }
.machine-bar .time-track { margin: 14px 8px 6px 0; }
.machine-bar .work-track.is-frozen .work-fill { background: #e6a100; }
.work-track.is-quiet { opacity: .55; }
/* Shared VM lanes: a quiet Oswald service tag beside the bar, one muted accent per service. */
.service-tag {
  display: inline-block;
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  padding: 3px 7px;
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  background: transparent;
  color: #c8c8c8;
  white-space: nowrap;
  vertical-align: middle;
}
.bot-name .service-tag { margin-right: 8px; font-size: 10px; padding: 2px 6px; }
.service-grok { color: #a9c4e0; border-color: #4f6b88; }
.service-cursor { color: #c9b8e6; border-color: #6c5a8c; }
/* Combined VM card: service names in a left column, each bar lined up to its right. */
.vm-lanes { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.vm-lane {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 8px 0 4px;
  border-top: 1px solid #333;
}
.vm-lane:first-child { border-top: 0; }
.vm-lane-label {
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-top: 1px;
  white-space: nowrap;
}
.vm-lane.lane-grok .vm-lane-label { color: #a9c4e0; }
.vm-lane.lane-cursor .vm-lane-label { color: #c9b8e6; }
.vm-lane-body { min-width: 0; border-left: 2px solid #4f6b88; padding-left: 12px; }
.vm-lane.lane-cursor .vm-lane-body { border-left-color: #6c5a8c; }
.vm-lane.is-waiting .vm-lane-body { border-left-color: #e6a100; }
.vm-lane.is-quiet .vm-lane-label { opacity: .7; }
.vm-lane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.vm-lane-head .task { margin: 0; }
.vm-lane-meta { color: #9a9a9a; font-size: 12px; }
.vm-lane .action-needed { text-align: left; margin-top: 4px; }
.vm-lane .machine-bar .bar-block { margin-top: 10px; }
.chip-cursor-running { color: #c9b8e6; border-color: #6c5a8c; }
.machine-lane {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  min-width: 0;
}
.machine-lane > .service-tag { margin-top: 10px; justify-self: start; }
.machine-lane > .machine-bar { flex: none; }
.machine-lane.lane-grok > .machine-bar { border-left: 2px solid #4f6b88; padding-left: 10px; }
.machine-lane.lane-cursor > .machine-bar { border-left: 2px solid #6c5a8c; padding-left: 10px; }
.machine-now.step-tick::before { background: #f4f4f4; }

#projects h2 {
  margin: 0 0 10px;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.project {
  background: #252525;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  padding: 12px 14px 14px;
  margin-bottom: 10px;
}

.project-name {
  background: transparent;
  border: 0;
  padding: 0;
  color: #e8e8e8;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.project-name:hover { color: #ffd60a; }

.project-owners,
.project-counts,
.marker-notes,
.time-labels {
  margin: 4px 0;
  color: #c8c8c8;
  font-size: 12px;
}

.span {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.span-btn {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .06em;
  cursor: pointer;
}

.span-btn.is-on { color: #e8e8e8; border-bottom-color: #e6a100; }

.span-range {
  margin: 2px 0 8px;
  color: #e8e8e8;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 8px;
  color: #9a9a9a;
  font-size: 11px;
}

.axis-labels span:last-child { text-align: right; }
.axis-labels span:nth-child(2) { text-align: center; }

.bar-block {
  margin: 10px 0 2px;
}

.work-track,
.time-track {
  position: relative;
  height: 8px;
  margin: 22px 8px 6px 0;
  background: #111;
  border-radius: 2px;
}

.bar-block .work-track {
  margin: 0;
}

.stage-labels {
  position: relative;
  height: 16px;
  margin-top: 5px;
}

.stage-label {
  position: absolute;
  top: 0;
  color: #9a9a9a;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}

.stage-label.is-start { transform: none; }
.stage-label.is-center { transform: translateX(-50%); }
.stage-label.is-end { transform: translateX(-100%); }

.stage-labels.is-stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: auto;
  gap: 1px;
}

.stage-labels.is-stacked .stage-label {
  position: static;
  transform: none;
}

.work-fill {
  display: block;
  height: 8px;
  background: #3d9a5f;
  border-radius: 2px;
}

.work-track.is-paused .work-fill { background: #3d9a5f; }

.tick,
.pin {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #e8e8e8;
  pointer-events: none;
}

.tick-usable { background: #8fd0ff; height: 18px; top: -8px; z-index: 1; }
.tick-full { background: #f4f4f4; margin-left: -2px; height: 18px; top: -8px; z-index: 1; }
.tick-paused { background: #e6a100; width: 3px; height: 16px; top: -4px; }

.mile {
  position: absolute;
  top: -18px;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.mile-usable { color: #8fd0ff; transform: translateX(-50%); }
.mile-full { color: #f4f4f4; transform: translateX(-100%); }

.step-tick,
.marker-phrase {
  font-family: "Oswald", system-ui, sans-serif;
}

.step-tick {
  position: absolute;
  top: -10px;
  width: 18px;
  height: 28px;
  margin-left: -9px;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 2;
  cursor: pointer;
}

.step-tick::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 2px;
  height: 12px;
  background: #7a7a7a;
}

.step-tick.is-done::before {
  background: #f4f4f4;
  height: 14px;
  top: 6px;
}

.marker-phrase {
  position: relative;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f4f4;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.marker-phrase.tip-host { position: relative; }

.tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 240px;
  background: #111;
  color: #f4f4f4;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 6px 8px;
  text-align: left;
  text-transform: none;
  letter-spacing: .02em;
  line-height: 1.35;
  font-size: 12px;
  font-weight: 500;
  z-index: 7;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55);
  pointer-events: none;
}

.tip-end .tip { left: auto; right: 0; transform: none; }
.tip-start .tip { left: 0; transform: none; }

.tip-host:hover .tip,
.tip-host:focus-visible .tip,
.tip-host.is-open .tip { display: block; }

.tip-title,
.tip-state { display: block; }

.tip-title { color: #f4f4f4; font-weight: 500; }

.tip-state { color: #ffd60a; margin-top: 2px; }

.pin-today { background: #ffd60a; }
.pin-usable { background: #8fd0ff; }
.pin-full { background: #e8e8e8; }
.pin-projected { background: #d7d7d7; height: 10px; top: -1px; }

.steps { margin: 8px 0 0; padding: 0; list-style: none; }

.step {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid #3d3d3d;
  color: #e8e8e8;
}

.step-mark { width: 1rem; color: #9a9a9a; }
.step-done .step-mark { color: #b7ebc6; }
.step-waiting .step-mark { color: #e6a100; }
.step-title { font-weight: 600; }
.step-owner, .step-state, .usable-tag { color: #c8c8c8; font-size: 12px; }
.usable-tag { color: #8fd0ff; }
.step-action { flex-basis: 100%; color: #ffd60a; }

.project .action-needed,
.project .still-working { text-align: left; }

#access { margin-top: 18px; }

#access-panel { margin-top: 8px; max-width: 360px; }

#grant-list { margin: 8px 0 0; padding: 0; }

#grant-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  padding: 4px 0;
  border-bottom: 1px solid #3d3d3d;
  color: #e8e8e8;
}

@media (max-width: 720px) {
  .app-title { font-size: 28px; letter-spacing: .06em; }
  .tg-app-header .brand img.logo { width: 48px; height: 48px; }
  .bot { flex-direction: column; gap: 8px; }
  .bot-side { margin-left: 0; max-width: none; align-items: flex-start; }
  .task, .detail, .meta-line, .progress { text-align: left; justify-content: flex-start; }
}
