@font-face {
  font-family: DM;
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Space;
  src: url("/assets/space-grotesk.woff2") format("woff2");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f8fa;
  color: #242831;
  font:
    14px/1.5 DM,
    system-ui,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #436aff;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: Space, sans-serif;
  letter-spacing: -0.04em;
}
h1 {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 10px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
p {
  color: #717580;
}
.muted,
small {
  color: #7d818b;
}
.eyebrow,
.nav-label,
.workspace-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.wordmark {
  font: bold 28px Space;
  letter-spacing: -0.06em;
}
.wordmark:first-letter {
  color: #325cff;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 31px 20px 15px;
  border-right: 1px solid #e7e9ee;
  background: #fff;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.workspace-label {
  margin: 33px 8px 23px;
  line-height: 2.4;
  color: #959aa6;
}
.workspace-label span {
  display: block;
  background: #edf1ff;
  width: max-content;
  color: #4564c8;
  padding: 0 6px;
  border-radius: 3px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 7px;
  padding: 10px 12px;
  color: #737782;
  font-size: 17px;
}
.sidebar nav button span {
  font-size: 13px;
}
.sidebar nav button:hover {
  background: #f5f6fa;
}
.sidebar nav button[aria-current="page"] {
  color: #315bff;
  background: #edf1ff;
}
.nav-label {
  margin: 23px 10px 9px;
  color: #aaaeb7;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
  font-size: 12px;
  color: #777d89;
}
.sidebar-bottom > a {
  padding: 12px;
  display: block;
}
.owner {
  border-top: 1px solid #eceef2;
  padding: 18px 0 0;
  display: flex;
  gap: 9px;
  align-items: center;
  color: #252a35;
  font-size: 12px;
}
.owner img {
  border-radius: 50%;
  background: #eff0f5;
}
.owner small {
  display: block;
  font-size: 10px;
}
.owner button {
  border: 0;
  background: none;
  margin-left: auto;
}
.topbar {
  height: 78px;
  padding: 0 42px;
  border-bottom: 1px solid #e7e9ee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  font-size: 12px;
  color: #6d7380;
}
.topbar strong {
  font-weight: 500;
  color: #232a34;
}
.slash {
  margin: 0 17px;
  color: #c2c6cf;
}
.owner-badge {
  font-size: 10px;
  color: #75827f;
}
.main-shell {
  min-width: 0;
}
main {
  padding: 40px 42px;
  max-width: 1580px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.heading p {
  margin: 0;
  font-size: 13px;
}
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.controls select {
  padding: 9px 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dfe3ea;
  font-size: 12px;
}
.button,
button.secondary,
button.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #e0e3e9;
  background: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 12px;
  gap: 7px;
}
.primary,
button.primary {
  background: #315bff;
  color: #fff;
  border-color: #315bff;
}
.danger {
  color: #b12b3d;
}
.globe-panel {
  position: relative;
  background: #fff;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  overflow: hidden;
  min-height: 398px;
}
.globe-head {
  position: absolute;
  top: 23px;
  left: 26px;
  z-index: 1;
}
.live-tag {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #707784;
  font-size: 11px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4db393;
  box-shadow: 0 0 0 4px #eaf8f2;
}
.live-number {
  display: block;
  font: 500 40px Space;
  margin: 10px 0 0;
}
.globe-caption {
  font-size: 11px;
  color: #9a9eaa;
}
.globe-wrap {
  width: min(100%, 560px);
  height: 390px;
  margin: auto;
  position: relative;
}
.globe-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.globe-buttons {
  position: absolute;
  right: 20px;
  top: 22px;
  display: flex;
  gap: 8px;
  z-index: 1;
}
.globe-buttons button {
  border: 1px solid #e9ebf0;
  background: #fff;
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 10px;
}
.globe-note {
  position: absolute;
  bottom: 13px;
  left: 24px;
  font-size: 10px;
  color: #9198a6;
  max-width: 65%;
}
.active-list {
  padding: 0 25px 17px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.active-chip {
  border: 1px solid #e7eaf0;
  background: #fafbfe;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 11px;
}
.active-chip span {
  color: #8d939f;
  margin-left: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.stat {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 9px;
  min-width: 0;
}
.stat span {
  font-size: 11px;
  color: #818693;
}
.stat strong {
  display: block;
  font: 500 29px Space;
  margin-top: 7px;
}
.stat small {
  font-size: 10px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.panel {
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 10px;
  padding: 23px;
  min-width: 0;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 16px;
  margin-bottom: 24px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
}
.panel-title span {
  font-size: 10px;
  color: #939aaa;
}
.bars {
  display: grid;
  gap: 12px;
}
.bar-row {
  font-size: 12px;
  position: relative;
  min-height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 5px 9px;
}
.bar-row:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--bar);
  background: #edf1ff;
  border-radius: 4px;
}
.bar-row span {
  z-index: 1;
  overflow-wrap: anywhere;
}
.bar-row small {
  z-index: 1;
}
.chart {
  display: flex;
  height: 125px;
  gap: 5px;
  align-items: flex-end;
  border-bottom: 1px solid #eceef2;
}
.chart div {
  flex: 1;
  min-width: 3px;
  background: #cbd6ff;
  border-radius: 4px 4px 0 0;
  position: relative;
}
.chart div:hover {
  background: #315bff;
}
.chart-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #959aa5;
  margin-top: 10px;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
.data-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9096a3;
  font-weight: 500;
  padding: 10px;
  border-bottom: 1px solid #e8ebf0;
}
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid #f0f1f5;
}
.data-table tr:last-child td {
  border: 0;
}
.row-link {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: #315bff;
}
.pill {
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f3fa;
  font-size: 10px;
}
.pill.published,
.pill.confirmed,
.pill.sent {
  background: #eaf6f0;
  color: #288363;
}
.pill.unread {
  background: #eef1ff;
  color: #315bff;
}
.empty {
  padding: 34px 10px;
  text-align: center;
  color: #9ba0ab;
  font-size: 12px;
}
.empty strong {
  display: block;
  color: #69717f;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 500;
}
.admin-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 42px 30px;
  color: #a0a6b1;
  font-size: 9px;
  letter-spacing: 0.04em;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
}
.login-card {
  max-width: 470px;
  padding: 44px;
  border: 1px solid #e3e7f1;
  background: #fff;
  border-radius: 15px;
  margin: 30px 0;
}
.login-card h1 {
  margin: 15px 0;
}
.login-card p {
  font-size: 13px;
}
.login-card label {
  font-size: 11px;
}
.login-card input {
  margin: 7px 0 12px;
}
.login-card .primary {
  width: 100%;
}
.login-foot {
  font-size: 11px;
  color: #949aa7;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe4ed;
  background: #fff;
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #315bff;
  box-shadow: 0 0 0 3px #edf1ff;
}
textarea {
  resize: vertical;
}
label {
  display: block;
  font-size: 11px;
  color: #717986;
  margin-bottom: 16px;
}
label input,
label select,
label textarea {
  margin-top: 6px;
  color: #252a35;
}
input[type="checkbox"] {
  width: auto;
  accent-color: #315bff;
  box-shadow: none;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.form-actions p {
  font-size: 11px;
  margin: 0;
}
.editor-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
}
.post-list {
  display: grid;
  align-content: start;
  gap: 10px;
}
.post-select {
  border: 1px solid #e2e6ef;
  background: #fff;
  border-radius: 7px;
  padding: 15px;
  text-align: left;
}
.post-select strong {
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.post-select[aria-pressed="true"] {
  border-color: #315bff;
  background: #f2f5ff;
}
.editor-area {
  font:
    13px/1.75 ui-monospace,
    monospace;
  min-height: 340px;
}
.editor-preview {
  min-height: 250px;
  overflow-wrap: anywhere;
}
.editor-preview pre {
  background: #f2f4f8;
  padding: 15px;
  overflow: auto;
}
.editor-preview a {
  color: #315bff;
  text-decoration: underline;
}
.editor-preview blockquote {
  margin-left: 0;
  border-left: 3px solid #315bff;
  padding-left: 18px;
}
.editor-tabs {
  display: flex;
  gap: 9px;
  margin-bottom: 15px;
}
.editor-tabs button {
  border: 0;
  background: #f2f4f9;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 11px;
}
.editor-tabs button[aria-selected="true"] {
  color: #315bff;
  background: #edf1ff;
}
.inbox-list {
  display: grid;
  gap: 8px;
}
.mail-row {
  width: 100%;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 95px;
  gap: 15px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 7px;
  padding: 19px;
}
.mail-row.unread {
  border-left: 3px solid #315bff;
  background: #fcfcff;
}
.mail-sender {
  font-size: 13px;
}
.mail-sender small {
  display: block;
  font-size: 10px;
}
.mail-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #89909c;
  font-size: 12px;
}
.mail-date {
  font-size: 10px;
  color: #959ba6;
  text-align: right;
}
.inbox-controls {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.inbox-controls button {
  border: 1px solid #e1e5ed;
  border-radius: 20px;
  padding: 7px 14px;
  background: white;
  font-size: 11px;
}
.inbox-controls button[aria-pressed="true"] {
  background: #252c3b;
  color: #fff;
  border-color: #252c3b;
}
dialog {
  border: 1px solid #dde2ee;
  border-radius: 12px;
  padding: 36px;
  width: min(660px, calc(100vw - 32px));
  max-height: 85dvh;
  color: #252a35;
}
dialog::backdrop {
  background: #141d33aa;
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  top: 8px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 28px;
  color: #9199a7;
}
.letter-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  margin: 25px 0;
  color: #424b5b;
}
.timeline {
  display: grid;
  gap: 16px;
  margin: 25px 0;
}
.timeline-item {
  border-left: 2px solid #dce4ff;
  padding-left: 15px;
  font-size: 12px;
}
.timeline-item small {
  display: block;
  margin-top: 5px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #202736;
  color: #fff;
  border-radius: 7px;
  padding: 12px 22px;
  font-size: 12px;
  z-index: 20;
  box-shadow: 0 5px 35px #0002;
  max-width: calc(100vw - 30px);
}
.helper {
  font-size: 11px;
  color: #818a9b;
  line-height: 1.7;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.error-text {
  color: #ae3042;
}
.link-list {
  display: grid;
  gap: 10px;
}
.link-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border: 1px solid #e4e8ef;
  border-radius: 7px;
  padding: 17px;
}
.link-item div {
  min-width: 0;
}
.link-item strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.link-item small {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}
.security-note {
  font-size: 11px;
  padding: 12px 15px;
  background: #f1f4fc;
  color: #66748c;
  border-radius: 7px;
  margin-top: 15px;
}
.loading {
  padding: 50px;
  color: #7b8597;
  text-align: center;
}
.controls select {
  width: auto;
}
@media (min-width: 1700px) {
  main {
    padding-top: 50px;
  }
  .globe-panel {
    min-height: 460px;
  }
  .globe-wrap {
    height: 450px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px;
  }
  .workspace-label {
    font-size: 8px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-three {
    grid-template-columns: 1fr;
  }
  .main-shell main {
    padding: 30px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .mail-row {
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .mail-date {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #e5e8ef;
  }
  .sidebar .wordmark {
    font-size: 25px;
  }
  .workspace-label,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin-top: 17px;
    padding-bottom: 3px;
  }
  .sidebar nav button {
    flex-shrink: 0;
    padding: 9px 11px;
    font-size: 13px;
  }
  .sidebar nav button span {
    font-size: 11px;
  }
  .topbar {
    height: 55px;
    padding: 0 18px;
    font-size: 10px;
  }
  .main-shell main {
    padding: 25px 16px;
  }
  .owner-badge {
    font-size: 9px;
  }
  .heading {
    align-items: flex-start;
    gap: 14px;
  }
  .heading h1 {
    font-size: 27px;
  }
  .heading p {
    font-size: 11px;
  }
  .heading .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .heading .controls button,
  .heading .controls select {
    font-size: 10px;
    padding: 8px;
  }
  .globe-head {
    top: 20px;
    left: 20px;
  }
  .live-number {
    font-size: 30px;
  }
  .globe-wrap {
    padding-top: 40px;
    height: 350px;
  }
  .globe-buttons {
    top: 20px;
    right: 12px;
  }
  .globe-buttons button {
    font-size: 9px;
    padding: 5px 8px;
  }
  .globe-caption {
    font-size: 9px;
  }
  .globe-note {
    position: static;
    padding: 0 20px;
    max-width: none;
  }
  .globe-panel {
    min-height: 390px;
  }
  .active-list {
    padding: 10px 16px 16px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat span {
    font-size: 10px;
  }
  .stats {
    gap: 10px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .mail-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .mail-sender {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    overflow-wrap: anywhere;
  }
  .mail-sender small {
    max-width: 60%;
  }
  .admin-footer {
    padding: 0 18px 25px;
    flex-direction: column;
  }
  .login-card {
    padding: 28px 23px;
  }
  .login-card h1 {
    font-size: 30px;
  }
  .post-list {
    grid-template-columns: 1fr;
  }
  .post-select {
    padding: 11px;
  }
  .post-select strong {
    margin-bottom: 3px;
  }
  dialog {
    padding: 30px 22px;
  }
  .owner-badge {
    white-space: nowrap;
  }
  .bar-row {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.theme-toggle {
  border: 0;
  background: #f2f4f9;
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 12px;
}
.theme-toggle .theme-sun {
  display: none;
}
[data-theme="dark"] .theme-sun {
  display: inline;
}
[data-theme="dark"] .theme-moon {
  display: none;
}
[data-theme="dark"] body {
  background: #101620;
  color: #e2e9f7;
}
[data-theme="dark"] .sidebar,
[data-theme="dark"] .topbar {
  background: #151e2d;
  border-color: #2e3b51;
}
[data-theme="dark"] .topbar,
[data-theme="dark"] p,
[data-theme="dark"] .muted,
[data-theme="dark"] small,
[data-theme="dark"] label {
  color: #a3b3cb;
}
[data-theme="dark"] .topbar strong,
[data-theme="dark"] .owner {
  color: #dce7f9;
}
[data-theme="dark"] .sidebar nav button {
  color: #a9b9d4;
}
[data-theme="dark"] .sidebar nav button[aria-current="page"] {
  background: #263b64;
  color: #c6d6ff;
}
[data-theme="dark"] .sidebar nav button:hover {
  background: #24334c;
}
[data-theme="dark"] .panel,
[data-theme="dark"] .stat,
[data-theme="dark"] .globe-panel,
[data-theme="dark"] .login-card,
[data-theme="dark"] .post-select,
[data-theme="dark"] .mail-row,
[data-theme="dark"] .link-item {
  background: #192435;
  border-color: #34445f;
  color: #e1eafb;
}
[data-theme="dark"] .stat span,
[data-theme="dark"] .globe-caption,
[data-theme="dark"] .globe-note,
[data-theme="dark"] .helper,
[data-theme="dark"] .live-tag {
  color: #a5b6d1;
}
[data-theme="dark"] .globe-buttons button,
[data-theme="dark"] .active-chip,
[data-theme="dark"] .button,
[data-theme="dark"] button.secondary,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .inbox-controls button,
[data-theme="dark"] .controls select {
  background: #24334c;
  border-color: #425576;
  color: #cfddf5;
}
[data-theme="dark"] .primary,
[data-theme="dark"] button.primary {
  background: #466ae8;
  border-color: #466ae8;
  color: #fff;
}
[data-theme="dark"] .row-link {
  color: #a8c0ff;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #111b2b;
  border-color: #425575;
  color: #dce8fe;
}
[data-theme="dark"] .pill {
  background: #2a3e60;
  color: #c1d4f7;
}
[data-theme="dark"] .security-note {
  background: #253956;
  color: #b2c8e9;
}
[data-theme="dark"] .bar-row:before {
  background: #293d63;
}
[data-theme="dark"] .chart div {
  background: #6982c6;
}
[data-theme="dark"] .chart,
[data-theme="dark"] .data-table td,
[data-theme="dark"] .data-table th,
[data-theme="dark"] .owner {
  border-color: #33445f;
}
[data-theme="dark"] .empty strong {
  color: #c0d0e8;
}
[data-theme="dark"] .empty {
  color: #a3b5d0;
}
[data-theme="dark"] .editor-tabs button {
  background: #22344f;
  color: #a6bfef;
}
[data-theme="dark"] .editor-preview pre {
  background: #111b2d;
}
[data-theme="dark"] .post-select[aria-pressed="true"] {
  background: #2c426a;
  border-color: #7493d6;
}
[data-theme="dark"] .mail-row.unread {
  background: #20314e;
  border-left-color: #8daaff;
}
[data-theme="dark"] .mail-preview,
[data-theme="dark"] .mail-date,
[data-theme="dark"] .mail-sender small,
[data-theme="dark"] .letter-body {
  color: #afc0db;
}
[data-theme="dark"] dialog {
  background: #1b293d;
  border-color: #405676;
  color: #e1ebfb;
}
.globe-note {
  position: static;
  max-width: none;
  margin: 0;
  padding: 0 25px 13px;
  line-height: 1.6;
}
.active-list {
  padding-top: 0;
}
.grid-two > .panel {
  align-self: start;
}
/* A quiet observatory, with an immersive globe when you want to wander. */
.globe-panel {
  background:
    radial-gradient(ellipse at 50% 48%, #eef3ff55, transparent 65%), #fff;
}
.globe-wrap {
  width: min(100%, 760px);
  height: 460px;
}
.globe-wrap canvas {
  cursor: grab;
  touch-action: pan-y;
}
.globe-wrap canvas.is-dragging {
  cursor: grabbing !important;
}
.globe-wrap canvas:focus-visible {
  outline: 2px solid #6484ed;
  outline-offset: -4px;
  border-radius: 12px;
}
.globe-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 20px;
}
.globe-tools span {
  font-size: 10px;
  color: #929aaa;
  margin-right: 10px;
}
.globe-tools button {
  border: 1px solid #e0e6f0;
  background: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
}
.globe-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.globe-open {
  overflow: hidden;
}
dialog.globe-immersive {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  border-radius: 0;
  background: #f4f7fc;
}
.globe-immersive .globe-panel {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at center, #fff, #e7edf9);
}
.globe-immersive .globe-wrap {
  width: 100%;
  height: max(470px, calc(100dvh - 140px));
  padding-top: 0;
}
.globe-immersive canvas {
  touch-action: none;
}
.globe-immersive .globe-head {
  padding: 18px 22px;
  border: 1px solid #e0e7f2;
  border-radius: 12px;
  background: #ffffffdb;
  backdrop-filter: blur(12px);
  pointer-events: none;
}
.globe-immersive .globe-buttons {
  top: 28px;
  right: 28px;
}
.globe-immersive .active-list {
  max-height: 100px;
  overflow: auto;
}
[data-theme="dark"] .globe-panel {
  background:
    radial-gradient(ellipse at 50% 48%, #26487544, transparent 65%), #192435;
}
[data-theme="dark"] .globe-tools button {
  background: #24334c;
  border-color: #425576;
  color: #cfddf5;
}
[data-theme="dark"] .globe-tools span {
  color: #a5b6d1;
}
[data-theme="dark"] .globe-immersive .globe-panel {
  background: radial-gradient(ellipse at center, #172c51, #080f1e 75%);
}
[data-theme="dark"] .globe-immersive .globe-head {
  background: #182438db;
  border-color: #34445f;
}
@media (max-width: 640px) {
  .globe-wrap {
    height: 380px;
    padding-top: 76px;
  }
  .globe-head {
    top: 17px;
    left: 16px;
  }
  .globe-buttons {
    max-width: 145px;
    right: 12px;
    top: 17px;
    gap: 5px;
  }
  .globe-immersive .globe-head {
    left: 12px;
    top: 14px;
    padding: 12px;
  }
  .globe-immersive .globe-head .globe-caption {
    display: block;
    max-width: 135px;
  }
  .globe-immersive .globe-buttons {
    right: 12px;
    top: 20px;
  }
  .globe-immersive .globe-wrap {
    height: max(430px, calc(100dvh - 160px));
    padding-top: 90px;
  }
}
/* The observatory: restrained hierarchy, readable numbers, compact live detail. */
.analytics-heading h1 {
  font-size: clamp(25px, 2.4vw, 32px);
  margin: 8px 0;
}
.analytics-heading .eyebrow {
  color: #9299a6;
}
.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #e3e7ef;
  border-radius: 10px;
  overflow: hidden;
  margin: 22px 0;
  background: #fff;
}
.metric-card {
  padding: 20px;
  min-width: 0;
  text-align: left;
  border: 0;
  border-right: 1px solid #e9edf3;
  background: transparent;
  position: relative;
  color: inherit;
}
.metric-card:last-child {
  border: 0;
}
.metric-card > span {
  display: block;
  font-size: 11px;
  color: #7a8494;
}
.metric-card strong {
  display: block;
  font:
    500 31px/1.3 Space,
    sans-serif;
  letter-spacing: -0.055em;
  margin: 10px 0 9px;
  font-variant-numeric: tabular-nums;
}
.metric-card em {
  font-size: 19px;
  font-style: normal;
  margin-left: 3px;
  color: #8f9baa;
}
.metric-card small {
  display: block;
  font-size: 9px;
  line-height: 1.6;
}
.metric-card.selected {
  background: #f6f8ff;
}
.metric-card.selected:after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  background: #5b7ee3;
}
.analytics-main-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}
.analytics-breakdowns {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 20px;
}
.live-sync {
  display: block;
  margin-top: 12px;
  font-size: 9px;
  color: #338669;
}
.live-sync.is-stale {
  color: #b57c32;
}
.globe-head {
  pointer-events: none;
}
.globe-buttons button {
  padding: 7px 10px;
}
.globe-buttons button[aria-pressed="true"] {
  border-color: #859be1;
  color: #4567c6;
}
.active-list {
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
}
.active-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 10px 12px;
  flex: 0 1 235px;
  text-align: left;
}
.active-chip .visitor-chip-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}
.visitor-chip-copy strong {
  font-size: 11px;
  font-weight: 500;
  color: #3c4d68;
}
.visitor-chip-copy small {
  font-size: 9px;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.visitor-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8edfd;
  color: #6280cd;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-style: normal;
}
.chip-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4bac8b;
  flex-shrink: 0;
  margin-left: auto;
}
.live-empty {
  margin: 0;
  font-size: 11px;
  padding: 0 0 6px;
}
.live-feed {
  max-height: 278px;
  overflow-y: auto;
}
.feed-event {
  background: none;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  padding: 12px 0;
  display: flex;
  gap: 9px;
  width: 100%;
  text-align: left;
  align-items: flex-start;
}
.feed-event:first-child {
  padding-top: 0;
}
.feed-event:last-child {
  border: 0;
}
.event-symbol {
  color: #7c94d8;
  width: 20px;
  font-style: normal;
  padding-top: 2px;
}
.feed-event > span {
  min-width: 0;
  flex: 1;
}
.feed-event strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.feed-event span span {
  display: block;
  color: #8a94a3;
  font-size: 10px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.feed-event b {
  color: #61718c;
  font-weight: 400;
}
.feed-event time {
  font-size: 9px;
  color: #8992a2;
  flex-shrink: 0;
}
.chart-plot {
  position: relative;
  padding-top: 12px;
}
.chart-plot svg {
  display: block;
  width: 100%;
  min-height: 160px;
}
.chart-gridline {
  stroke: #e7ecf5;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-max {
  font-size: 9px;
  color: #8b95a5;
}
.chart-data {
  font-size: 10px;
  color: #8b95a5;
  margin-top: 16px;
}
.chart-data summary {
  cursor: pointer;
}
.daily-values {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 10px;
}
.daily-values span {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.breakdown-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e9edf5;
  margin-bottom: 18px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.breakdown-tabs button {
  border: 0;
  background: none;
  padding: 5px 8px;
  font-size: 10px;
  color: #8792a3;
  border-radius: 5px;
}
.breakdown-tabs button[aria-pressed="true"] {
  background: #edf2ff;
  color: #4c6bc2;
}
.breakdown-legend {
  display: flex;
  justify-content: space-between;
  color: #929bab;
  font-size: 9px;
  margin-bottom: 12px;
}
.analytics-breakdowns .bar-row {
  font-size: 11px;
}
.analytics-breakdowns .bar-row > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row small {
  white-space: nowrap;
}
.bar-row small em {
  font-style: normal;
  color: #919bab;
  padding-left: 8px;
  font-size: 9px;
}
.engagement-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #e7ecf3;
  padding-top: 18px;
  margin-top: 20px;
  font-size: 10px;
  color: #8490a3;
}
.conversion-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid #e3e8f0;
  border-radius: 9px;
  font-size: 11px;
}
.conversion-strip strong {
  font-size: 14px;
  margin-right: 4px;
}
.conversion-strip small {
  margin-left: auto;
  font-size: 10px;
}
.conversion-strip .cleanup-note {
  margin-left: auto;
  color: var(--studio-muted, #8d97a7);
}
.conversion-strip .cleanup-note strong {
  font-size: 11px;
}
.analytics-note {
  font-size: 10px;
  line-height: 1.8;
  margin-top: 18px;
}
.visitor-now {
  display: grid;
  gap: 7px;
  padding: 18px;
  background: #f2f5fb;
  border-radius: 9px;
  margin: 22px 0;
}
.visitor-now strong {
  font: 500 19px Space;
  overflow-wrap: anywhere;
}
.visitor-now > span {
  font-size: 10px;
}
.online {
  color: #389572;
}
.offline {
  color: #8a93a3;
}
.visitor-now small {
  font-size: 10px;
}
.visitor-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 0 0 24px;
  color: #919bab;
  font-size: 10px;
}
.visitor-facts strong {
  font-weight: 400;
  margin-left: 5px;
  color: #5e6c80;
}
.timeline-item > strong {
  display: block;
  overflow-wrap: anywhere;
  margin: 5px 0;
  font-weight: 500;
}
.timeline-item > span {
  font-size: 10px;
  color: #8692a5;
}
.share-builder > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
.share-builder > summary span {
  font-size: 10px;
  color: #909aad;
  margin-left: 10px;
}
.share-builder p {
  font-size: 11px;
  margin: 16px 0;
}
.share-builder form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.share-builder label {
  flex: 1;
  margin: 0;
  min-width: 120px;
}
.share-builder output {
  display: block;
  padding: 15px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}
[data-theme="dark"] .analytics-metrics {
  background: #192435;
  border-color: #34445f;
}
[data-theme="dark"] .metric-card {
  border-color: #34445f;
}
[data-theme="dark"] .metric-card.selected {
  background: #21324f;
}
[data-theme="dark"] .metric-card > span,
[data-theme="dark"] .visitor-chip-copy strong {
  color: #becee8;
}
[data-theme="dark"] .chart-gridline {
  stroke: #34445f;
}
[data-theme="dark"] .feed-event,
[data-theme="dark"] .breakdown-tabs,
[data-theme="dark"] .engagement-note,
[data-theme="dark"] .conversion-strip {
  border-color: #34445f;
}
[data-theme="dark"] .feed-event b,
[data-theme="dark"] .visitor-facts strong {
  color: #b7c8e5;
}
[data-theme="dark"] .visitor-avatar {
  background: #2c4269;
  color: #b3cafa;
}
[data-theme="dark"] .breakdown-tabs button[aria-pressed="true"] {
  background: #2a4065;
  color: #c0d4fc;
}
[data-theme="dark"] .visitor-now {
  background: #233450;
}
@media (prefers-reduced-motion: no-preference) {
  .just-arrived {
    animation: visitor-arrive 0.5s ease-out;
  }
  @keyframes visitor-arrive {
    from {
      opacity: 0;
      transform: translateY(6px);
      border-color: #7b9bef;
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 1150px) {
  .analytics-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analytics-breakdowns {
    grid-template-columns: 1fr 1fr;
  }
  .analytics-main-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card {
    padding: 16px;
    border-bottom: 1px solid #e9edf3;
  }
  .metric-card strong {
    font-size: 28px;
  }
  .analytics-breakdowns {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .analytics-main-grid {
    gap: 0;
  }
  .globe-buttons {
    max-width: 155px;
  }
  .globe-buttons button {
    font-size: 9px;
    padding: 6px 8px;
  }
  .globe-head .globe-caption {
    max-width: 105px;
    display: block;
  }
  .live-sync {
    max-width: 125px;
    font-size: 8px;
  }
  .active-chip {
    flex: 1 1 200px;
  }
  .conversion-strip {
    gap: 12px;
  }
  .conversion-strip small {
    margin-left: 0;
  }
  .share-builder > summary span {
    display: block;
    margin: 8px 0 0;
  }
}
[data-theme="dark"] .globe-buttons button[aria-pressed="true"] {
  color: #c6d8ff;
}
.visitor-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  margin-bottom: 20px;
}
.visitor-filters label {
  margin: 0;
  flex: 1 1 150px;
}
.visitor-filters label:first-child {
  flex: 2 1 240px;
}
.visitor-filters > span {
  margin-left: auto;
  font-size: 11px;
  color: #8d97a7;
  padding-bottom: 12px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .visitor-filters {
    flex-wrap: wrap;
  }
  .visitor-filters label {
    min-width: 120px;
  }
  .visitor-filters > span {
    width: 100%;
    padding: 0;
  }
}

.referral-panel {
  margin-top: 24px;
}
.referral-panel > p,
.referral-panel > small {
  color: var(--referral-muted, #667185);
  line-height: 1.7;
}
.referral-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}
.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.referral-table th,
.referral-table td {
  text-align: right;
  padding: 14px 12px;
  border-bottom: 1px solid var(--referral-line, #e2e6ed);
  white-space: nowrap;
}
.referral-table th:first-child {
  text-align: left;
}
.referral-table thead th {
  color: var(--referral-muted, #667185);
  font-size: 12px;
  font-weight: 500;
}
.referral-table tbody th {
  font-weight: 500;
}
.visitor-avatar {
  background: hsl(var(--avatar-hue, 220) 50% 86%);
  overflow: hidden;
}
.visitor-avatar img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  transform: scale(1.15);
}

[data-theme="dark"] .referral-panel {
  --referral-muted: #a3b0c7;
  --referral-line: #344057;
}
[data-theme="dark"] .active-chip .visitor-avatar {
  background: hsl(var(--avatar-hue, 220) 35% 68%);
}

.pill.accepted {
  color: #167b5c;
  background: #e3f6ec;
}
[data-theme="dark"] .pill.accepted {
  color: #83d8ad;
  background: #203b35;
}

/* Visitor identity and journey share the same profile from list and live globe. */
.visitor-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  min-width: 300px;
}
.visitor-identity small {
  display: block;
  margin-top: 8px;
  color: var(--muted, #94a3b8);
  font-weight: 400;
  line-height: 1.7;
}
.emoji-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.12);
  font-size: 29px;
}
.emoji-avatar.large {
  width: 88px;
  height: 88px;
  font-size: 52px;
  margin-bottom: 22px;
}
.visitor-badge {
  border: 1px solid #b17448;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  color: #bb865e;
}
#detail {
  width: min(1160px, 95vw);
  max-width: 1160px;
}
.visitor-profile {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 38px;
}
.profile-card {
  border-right: 1px solid rgba(128, 128, 128, 0.2);
  padding-right: 25px;
}
.profile-card h1 {
  font-size: 27px;
  overflow-wrap: anywhere;
}
.profile-device {
  line-height: 2;
}
.profile-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px 12px;
  margin: 18px 0;
}
.profile-card dt {
  color: var(--muted, #94a3b8);
  font-size: 12px;
  margin-top: 0;
}
.profile-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.journey-date {
  padding: 12px 16px;
  background: rgba(128, 128, 128, 0.08);
  border-radius: 8px;
  font-size: 14px;
}
.journey-event {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}
.journey-event code {
  display: inline;
  overflow-wrap: anywhere;
}
.journey-event time {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted, #94a3b8);
}
/* Keep visitor information in view; only the trail scrolls. */
#detail:has(.visitor-profile) {
  height: min(760px, 92dvh);
  max-height: 92dvh;
  padding: 28px;
  overflow: hidden;
}
#detail:has(.visitor-profile) #detail-content {
  height: 100%;
  min-height: 0;
}
.visitor-profile {
  height: 100%;
  min-height: 0;
  gap: 26px;
  grid-template-columns: 300px minmax(0, 1fr);
}
.profile-card {
  font-size: 13px;
  padding-right: 20px;
}
.profile-card .emoji-avatar.large {
  width: 64px;
  height: 64px;
  font-size: 36px;
}
.profile-card h1 { font-size: 23px; margin: 12px 0 4px; }
.profile-card p { margin: 6px 0; }
.profile-card .profile-device { line-height: 1.5; margin: 12px 0; }
.profile-card form { display: grid; gap: 8px; margin-bottom: 10px; }
.profile-card label { font-size: 12px; }
.profile-card input { padding: 8px 10px; }
.profile-card button { padding: 8px 12px; }
.profile-journey {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.profile-journey h2 { margin: 0 28px 8px 0; }
.profile-journey > .helper { margin: 0 0 12px; font-size: 12px; }
.profile-journey > .helper:last-child { margin: 12px 0 0; }
.profile-journey .timeline {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin: 0;
  padding-right: 10px;
}
.profile-journey .journey-date { margin: 0; padding: 10px 12px; }
.profile-journey .journey-event { padding: 14px 0; font-size: 14px; }
.insight-copy {
  white-space: pre-wrap;
  line-height: 1.8;
  max-width: 80ch;
}
@media (max-width: 700px) {
  .visitor-profile {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(100px, 1fr);
    gap: 12px;
  }
  #detail:has(.visitor-profile) { padding: 20px 16px; height: 95dvh; max-height: 95dvh; }
  .profile-card {
    border-right: 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    padding: 0 0 12px;
  }
  .profile-card .emoji-avatar.large { width: 36px; height: 36px; font-size: 24px; }
  .profile-card h1 { margin: 5px 0 2px; font-size: 20px; }
  .profile-card dl { margin: 10px 0; gap: 4px 10px; font-size: 12px; }
  .profile-card .profile-device { margin: 6px 0; font-size: 12px; }
  .profile-card form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 6px; }
  .journey-event {
    gap: 8px;
  }
}

#visitor-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
#visitor-pages [aria-current="page"] {
  opacity: 1;
  font-weight: bold;
  border-color: currentColor;
}

#visitor-name-form {
  display: grid;
  gap: 10px;
  margin: 20px 0 12px;
}
#visitor-name-form label {
  display: grid;
  gap: 6px;
}
#visitor-name-form input {
  width: 100%;
  min-width: 0;
}

.link-drag {
  cursor: grab;
  touch-action: none;
  padding: 8px;
  font-size: 24px;
  background: transparent;
  border: 0;
  flex-shrink: 0;
}
.link-drag:active {
  cursor: grabbing;
}
.link-fixed {
  padding: 8px;
  flex-shrink: 0;
}
.link-item.dragging {
  opacity: 0.65;
  outline: 2px solid #788bff;
}
.link-item > div {
  flex: 1;
  min-width: 0;
}
.link-drag:focus-visible {
  outline: 2px solid #788bff;
  border-radius: 6px;
}

.activity-more {
  display: block;
  margin: 12px auto 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
}
.activity-more[hidden] {
  display: none;
}

/* One globe surface, following the dashboard theme in both views. */
.globe-panel {
  --map-surface: #ffffffed;
  --map-ink: #34445d;
  --map-muted: #76859b;
  --map-border: #dbe3ef;
  --map-button: #f5f8fd;
  --map-active: #e8efff;
  background: #dde4ef;
  color: var(--map-ink);
  overflow: hidden;
  border-color: var(--map-border);
}
[data-theme="dark"] .globe-panel {
  --map-surface: #141d2bea;
  --map-ink: #e0e8f5;
  --map-muted: #9aaac0;
  --map-border: #344155;
  --map-button: #1c293c;
  --map-active: #2c4163;
  background: #090e17;
  color: var(--map-ink);
  border-color: var(--map-border);
}
.globe-panel .globe-wrap {
  width: 100%;
  height: 490px;
  padding: 0;
}
.globe-wrap canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}
.globe-panel .globe-head,
.globe-immersive .globe-head,
[data-theme="dark"] .globe-immersive .globe-head {
  z-index: 2;
  background: var(--map-surface);
  border: 1px solid var(--map-border);
  border-radius: 14px;
  padding: 13px 15px;
  backdrop-filter: blur(16px);
  color: var(--map-ink);
  pointer-events: auto;
}
.globe-panel .live-tag {
  color: var(--map-ink);
}
.globe-panel .live-number {
  font-size: 32px;
}
.globe-panel .globe-caption,
.globe-panel .globe-note,
.globe-panel .globe-tools span {
  color: var(--map-muted);
}
.globe-panel .globe-buttons {
  z-index: 4;
  max-width: 360px;
  align-items: flex-start;
  gap: 6px;
}
.globe-panel .globe-buttons button,
.globe-panel .globe-tools button {
  background: var(--map-surface);
  border: 1px solid var(--map-border);
  color: var(--map-ink);
  border-radius: 9px;
  transition:
    background 0.18s,
    border-color 0.18s;
  font-size: 11px;
}
.globe-panel .globe-buttons button:hover,
.globe-panel .globe-tools button:hover {
  background: var(--map-button);
}
.globe-panel .globe-buttons button[aria-pressed="true"] {
  color: var(--map-ink);
  background: var(--map-active);
  border-color: #7695ca;
}
.globe-panel > .globe-tools {
  position: absolute;
  bottom: 16px;
  right: 18px;
  z-index: 3;
  padding: 0;
}
.globe-panel > .globe-note,
.globe-panel > .active-list {
  display: none;
}
.music-control {
  display: inline-flex;
  position: relative;
}
.map-music {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 190px;
  padding: 12px;
  z-index: 5;
  background: var(--map-surface);
  color: var(--map-ink);
  border: 1px solid var(--map-border);
  border-radius: 11px;
  box-shadow: 0 8px 24px #00000012;
  backdrop-filter: blur(16px);
  font-size: 11px;
  transform-origin: top right;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.18s,
    transform 0.18s,
    display 0.18s allow-discrete;
}
.map-music[hidden] {
  display: none;
  opacity: 0;
  transform: scale(0.88);
}
@starting-style {
  .map-music {
    opacity: 0;
    transform: scale(0.88);
  }
}
.map-music input {
  width: 115px;
  min-width: 0;
  accent-color: #7799d7;
}
.map-music-source {
  position: absolute;
  width: 320px;
  height: 200px;
  left: -10000px;
  pointer-events: none;
}
.globe-immersive .globe-panel,
[data-theme="dark"] .globe-immersive .globe-panel {
  height: 100dvh;
  min-height: 100%;
  position: relative;
  background: transparent;
}
.globe-immersive .globe-panel .globe-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
  padding: 0;
}
.globe-immersive .globe-head {
  top: 22px;
  left: 22px;
}
.globe-immersive .globe-buttons {
  top: 22px;
  right: 22px;
}
.globe-immersive .globe-panel > .globe-note {
  display: block;
  position: absolute;
  top: 175px;
  left: 22px;
  max-width: 280px;
  z-index: 2;
  margin: 0;
  font-size: 10px;
}
.globe-immersive .globe-panel > .active-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  position: absolute;
  bottom: 22px;
  left: 22px;
  width: 280px;
  max-height: none;
  overflow: visible;
  z-index: 2;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.globe-immersive .globe-panel > .active-list .active-chip {
  flex: none;
  width: 100%;
}
.globe-panel .active-chip {
  background: var(--map-button);
  border-color: var(--map-border);
  color: var(--map-ink);
}
.globe-panel .active-chip strong {
  color: var(--map-ink);
}
.globe-panel .active-chip small {
  color: var(--map-muted);
}
@media (max-width: 640px) {
  .globe-panel .globe-wrap {
    height: 450px;
  }
  .globe-panel .globe-head,
  .globe-immersive .globe-head {
    left: 12px;
    top: 12px;
    padding: 10px;
    max-width: 140px;
  }
  .globe-panel .live-number {
    font-size: 25px;
  }
  .globe-panel .globe-buttons {
    right: 12px;
    top: 12px;
    max-width: 145px;
    gap: 5px;
  }
  .globe-panel .globe-buttons button {
    font-size: 10px;
    padding: 5px 7px;
  }
  .globe-immersive .globe-panel > .globe-note {
    top: 168px;
    left: 12px;
    max-width: 175px;
  }
  .globe-immersive .globe-panel > .active-list {
    bottom: 60px;
    left: 12px;
    width: 190px;
    max-height: none;
  }
  .globe-immersive .globe-panel .globe-wrap {
    height: 100%;
  }
  .globe-panel > .globe-tools {
    right: 12px;
  }
  .globe-tools span {
    display: none;
  }
}
/* Range controls must not inherit text-field padding and focus treatment. */
.music-control .map-music {
  width: 235px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 30px;
  gap: 10px;
}
.music-control .map-music[hidden] {
  display: none;
}
.map-music output {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--map-muted);
  font-size: 10px;
}
.music-control .map-music input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  touch-action: none;
}
.map-music input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #7799d7 var(--volume, 30%),
    var(--map-border) var(--volume, 30%)
  );
}
.map-music input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid var(--map-surface);
  background: #7799d7;
  box-shadow: 0 1px 4px #0003;
}
.map-music input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--map-border);
}
.map-music input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #7799d7;
}
.map-music input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--map-surface);
  background: #7799d7;
}
.map-music input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #7799d7;
  outline-offset: 3px;
}
.map-music input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid #7799d7;
  outline-offset: 3px;
}

/* Space stays behind Earth; the floating controls retain the selected UI theme. */
.globe-panel, [data-theme="dark"] .globe-panel { background: #050913; }
.globe-panel .globe-tools span, .globe-immersive .globe-panel > .globe-note { color: #a8b8d1; }

/* Quiet glass overlays keep the Earth visible in either dashboard theme. */
.globe-panel, [data-theme="dark"] .globe-panel {
  --map-surface: #101c2f91;
  --map-ink: #e3ecf9;
  --map-muted: #a8bad2;
  --map-border: #a6bddb36;
  --map-button: #273c565e;
  --map-active: #41618c66;
}
.globe-panel .globe-head,
.globe-panel .globe-buttons button,
.globe-panel .globe-tools button,
.globe-immersive .globe-panel > .active-list .active-chip,
.globe-panel .map-music {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px #00000014;
}
.globe-panel .globe-buttons button[aria-pressed="true"] { border-color: #91b5e25c; }
.globe-panel .live-dot { box-shadow: 0 0 0 4px #60d7ad16; }
.globe-panel .globe-note:empty { display: none; }
.globe-panel .globe-head { padding: 10px 12px; border-radius: 11px; }
.globe-panel .live-tag { font-size: 10px; gap: 6px; }
.globe-panel .live-number { font-size: 25px; margin-top: 6px; }
.globe-panel .globe-caption { font-size: 10px; }
.globe-panel .live-sync { font-size: 9px; margin-top: 6px; }
@media (max-width: 640px) {
  .globe-panel .globe-head { padding: 8px 10px; }
  .globe-panel .live-number { font-size: 22px; }
}

.quote-admin-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.quote-admin-item p { line-height: 1.7; margin: 0 0 8px; }
.quote-admin-item small { color: var(--muted); }
.quote-admin-item .form-actions { margin-top: 12px; }

.quote-search-label { max-width: 420px; margin-bottom: 20px; }
.quote-sheet .data-table td { border: 1px solid var(--border); vertical-align: top; }
.quote-sheet .data-table th { border: 1px solid var(--border); }
.quote-sheet .data-table td:first-child { width: 45px; }
.quote-sheet .data-table td:nth-child(2) { width: 65%; }
.quote-cell { display: block; background: transparent; border: 0; text-align: left; color: inherit; padding: 0; font: inherit; line-height: 1.6; cursor: pointer; width: 100%; }
.quote-sheet tr { cursor: pointer; }
.quote-sheet tr.selected { background: #627cf51a; }
.quote-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 18px; }
#quote-selection { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
#quote-selection[hidden] { display: none; }
.quote-sheet .table-wrap { max-height: 58vh; overflow: auto; }
.quote-sheet .data-table th { position: sticky; top: 0; background: var(--panel, var(--surface)); z-index: 1; }
.quote-sheet .data-table td, .quote-sheet .data-table th { border: 1px solid #e6e8ed; }
.quote-sheet .data-table th { background: #fff; }
[data-theme="dark"] .quote-sheet .data-table td, [data-theme="dark"] .quote-sheet .data-table th { border-color: #303744; }
[data-theme="dark"] .quote-sheet .data-table th { background: #171d28; }

.brand-portrait { width:26px;height:26px;object-fit:cover;border-radius:50%;vertical-align:middle; }
.quote-author-actions {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.quote-sheet td,.quote-sheet th {border:1px solid #cbd1db;}
[data-theme="dark"] .quote-sheet td,[data-theme="dark"] .quote-sheet th {border-color:#48515f;}
/* Quotes wrap within the page instead of inheriting compact analytics tables. */
.quote-sheet { min-width:0; max-width:100%; }
.quote-sheet .table-wrap { max-height:none; overflow:visible; }
.quote-sheet .data-table { table-layout:fixed; white-space:normal; }
.quote-sheet .data-table th:first-child,.quote-sheet .data-table td:first-child { width:42px; }
.quote-sheet .data-table th:nth-child(2),.quote-sheet .data-table td:nth-child(2) { width:auto; }
.quote-sheet .data-table th:nth-child(3),.quote-sheet .data-table td:nth-child(3) { width:210px; }
.quote-sheet .data-table td,.quote-sheet .data-table th { overflow-wrap:anywhere; border:1px solid #cbd1db; }
.quote-sheet .data-table th { position:static; }
.quote-author-actions { flex-wrap:wrap; align-items:flex-start; }
.quote-author-actions span { flex:1 1 100px; min-width:0; }
.quote-author-actions button { flex:0 0 auto; }
.quote-pagination { flex-wrap:wrap; }
@media(max-width:650px) {
 .quote-sheet { padding:12px; }
 .quote-sheet .data-table th:nth-child(3),.quote-sheet .data-table td:nth-child(3) { width:105px; }
 .quote-sheet .data-table td,.quote-sheet .data-table th { padding:10px 7px; }
 .quote-sheet .data-table th:first-child,.quote-sheet .data-table td:first-child { width:30px; }
 .quote-author-actions { gap:8px; }
 .quote-author-actions span { flex-basis:100%; }
}

.daily-quotes { padding: 16px 20px; margin-bottom: 16px; }
.daily-quotes-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.daily-quotes-heading h2 { font-size: 14px; margin: 0; }
.daily-quotes-heading h2 span { font-weight: 400; opacity: .55; margin-left: 5px; }
.daily-quotes-heading > span { font-size: 11px; opacity: .65; }
.daily-quotes-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 28px; padding-left: 18px; margin: 12px 0 0; }
.daily-quotes-list li { padding-left: 3px; font-size: 12px; line-height: 1.45; }
.daily-quotes-list small { display: block; font-size: 10px; opacity: .6; margin-top: 2px; }
@media (max-width: 720px) { .daily-quotes-list { grid-template-columns: 1fr; } }

/* Studio dashboard: neutral surfaces and compact inset cards.
   Globe/map selectors intentionally retain their existing visual rules. */
:root { --studio-paper:#fafafa; --studio-card:#fff; --studio-inset:#f5f5f5; --studio-line:#e8e8e8; --studio-ink:#292929; --studio-muted:#858585; }
/* Fonts the share-card drawing (share.js) reads, matching the website. */
:root { --display: DM, Arial, sans-serif; --nb-serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif; }
[data-theme="dark"] { --studio-paper:#151515; --studio-card:#1c1c1c; --studio-inset:#202020; --studio-line:#303030; --studio-ink:#eee; --studio-muted:#999; }
body,[data-theme="dark"] body { background:var(--studio-paper); color:var(--studio-ink); }
.shell { grid-template-columns:190px minmax(0,1fr); }
.sidebar,[data-theme="dark"] .sidebar { background:var(--studio-paper); border-color:var(--studio-line); padding:30px 14px 16px; }
.wordmark { font:900 31px/1.1 Georgia,serif; letter-spacing:-1.8px; display:flex; align-items:center; gap:7px; }
.wordmark:first-letter { color:inherit; }
.workspace-label { color:var(--studio-muted); font-size:8px; font-weight:500; margin:27px 10px 22px; }
.workspace-label span { background:var(--studio-inset); color:var(--studio-muted); border:1px solid var(--studio-line); border-radius:4px; line-height:1.8; }
.sidebar nav { gap:4px; }
.sidebar nav button,[data-theme="dark"] .sidebar nav button { color:var(--studio-muted); font-size:15px; border:1px solid transparent; border-radius:9px; padding:9px 10px; gap:10px; }
.sidebar nav button span { font-size:12px; }
.sidebar nav button:hover,[data-theme="dark"] .sidebar nav button:hover { background:var(--studio-inset); }
.sidebar nav button[aria-current="page"],[data-theme="dark"] .sidebar nav button[aria-current="page"] { background:var(--studio-card); color:var(--studio-ink); border-color:var(--studio-line); box-shadow:0 1px 2px #00000008; }
.nav-label { font-size:8px; font-weight:500; color:var(--studio-muted); margin:20px 10px 8px; }
.sidebar-bottom { font-size:11px; color:var(--studio-muted); }
.owner,[data-theme="dark"] .owner { color:var(--studio-ink); border-color:var(--studio-line); }
.topbar,[data-theme="dark"] .topbar { background:var(--studio-paper); border-color:var(--studio-line); color:var(--studio-muted); min-height:65px; padding-inline:32px; font-size:11px; }
.topbar strong,[data-theme="dark"] .topbar strong { color:var(--studio-ink); font-weight:500; }
.topbar .theme-toggle { background:var(--studio-inset); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:9px; }
.owner-badge { font-size:9px; color:var(--studio-muted); }
main { max-width:none; padding:32px clamp(20px,2.5vw,40px); }
.heading { margin-bottom:24px; align-items:center; }
.heading h1 { font:500 24px/1.3 DM,Arial,sans-serif; letter-spacing:-.8px; margin-bottom:6px; }
.heading p,[data-theme="dark"] .heading p { font-size:12px; color:var(--studio-muted); }
.controls { gap:7px; }
.controls select,[data-theme="dark"] .controls select { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:8px; padding:7px 10px; font-size:11px; }
#content > .heading button,.panel button.secondary,.panel .button,.form-actions .secondary,.login-card .secondary,[data-theme="dark"] #content > .heading button,[data-theme="dark"] .panel button.secondary,[data-theme="dark"] .form-actions .secondary { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:8px; box-shadow:0 1px 2px #00000008; padding:7px 11px; font-size:11px; }
#content > .heading button.primary,.panel button.primary,.form-actions .primary,.login-card .primary,[data-theme="dark"] .panel button.primary,[data-theme="dark"] .form-actions .primary { background:linear-gradient(#3c3c3c,#242424); color:#fff; border:1px solid #242424; border-radius:8px; box-shadow:inset 0 1px 0 #ffffff25,0 1px 2px #0002; padding:8px 12px; font-size:11px; }
.stats { gap:7px; padding:6px; border:1px solid var(--studio-line); border-radius:17px; background:var(--studio-inset); margin:20px 0 24px; }
.stat,[data-theme="dark"] .stat { background:var(--studio-card); border:1px solid var(--studio-line); border-radius:11px; padding:17px; box-shadow:0 1px 2px #00000004; }
.stat strong { font:500 27px/1.25 DM,Arial,sans-serif; letter-spacing:-1px; color:var(--studio-ink); margin:8px 0 5px; }
.stat span,.stat small,[data-theme="dark"] .stat span,[data-theme="dark"] .stat small { color:var(--studio-muted); font-size:10px; }
.panel,[data-theme="dark"] .panel { background:var(--studio-card); border:1px solid var(--studio-line); border-radius:14px; padding:22px; box-shadow:0 0 0 5px var(--studio-inset),0 0 0 6px var(--studio-line); margin-bottom:24px; }
.panel h2 { font:500 14px/1.5 DM,Arial,sans-serif; letter-spacing:-.2px; margin-bottom:18px; }
.grid-two,.grid-three { gap:20px; }
.panel p,.panel small,.helper,[data-theme="dark"] .panel p,[data-theme="dark"] .panel small,[data-theme="dark"] .helper { color:var(--studio-muted); }
.panel label,[data-theme="dark"] .panel label { color:var(--studio-muted); font-size:11px; }
.panel input,.panel textarea,.panel select,#detail input,#detail textarea,#detail select,[data-theme="dark"] .panel input,[data-theme="dark"] .panel textarea,[data-theme="dark"] .panel select { background:var(--studio-paper); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:8px; font-size:12px; }
.panel input:focus,.panel textarea:focus { border-color:var(--studio-muted); }
.data-table { font-size:11px; }
.data-table th,[data-theme="dark"] .data-table th { font-size:9px; font-weight:500; color:var(--studio-muted); background:var(--studio-inset); }
.data-table td,[data-theme="dark"] .data-table td { border-color:var(--studio-line); color:var(--studio-ink); }
.quote-sheet .data-table td,.quote-sheet .data-table th,[data-theme="dark"] .quote-sheet .data-table td,[data-theme="dark"] .quote-sheet .data-table th { border-color:var(--studio-line); }
.bar-row::before { background:var(--studio-inset); }
.post-select,[data-theme="dark"] .post-select { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:10px; }
.post-select[aria-pressed="true"],[data-theme="dark"] .post-select[aria-pressed="true"] { background:var(--studio-inset); border-color:var(--studio-muted); }
.admin-footer { color:var(--studio-muted); border-color:var(--studio-line); font-size:9px; padding:20px 32px; }
.login-card,[data-theme="dark"] .login-card { background:var(--studio-card); border:1px solid var(--studio-line); border-radius:16px; box-shadow:0 0 0 6px var(--studio-inset),0 0 0 7px var(--studio-line); }
#detail,[data-theme="dark"] #detail { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:16px; box-shadow:0 20px 70px #0003; }
@media(max-width:900px) { .shell { grid-template-columns:160px minmax(0,1fr); } main { padding:24px; } .sidebar,[data-theme="dark"] .sidebar { padding-inline:10px; } .topbar,[data-theme="dark"] .topbar { padding-inline:24px; } }
@media(max-width:680px) { .shell { display:block; } .sidebar,[data-theme="dark"] .sidebar { height:auto; position:relative; padding:20px; border-right:0; border-bottom:1px solid var(--studio-line); } .sidebar nav { display:flex; flex-wrap:wrap; gap:5px; margin-top:16px; } .sidebar nav button,[data-theme="dark"] .sidebar nav button { padding:7px 9px; } .sidebar .workspace-label,.sidebar .nav-label { display:none; } .sidebar-bottom { padding-top:16px; } main { padding:24px 16px; } .topbar,[data-theme="dark"] .topbar { padding-inline:16px; } .heading { flex-wrap:wrap; gap:12px; } .stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .grid-two,.grid-three { grid-template-columns:1fr; } .panel,[data-theme="dark"] .panel { padding:17px; } .admin-footer { padding-inline:16px; } }
.analytics-metrics,[data-theme="dark"] .analytics-metrics { gap:7px; padding:6px; background:var(--studio-inset); border:1px solid var(--studio-line); border-radius:17px; overflow:visible; }
.metric-card,[data-theme="dark"] .metric-card { background:var(--studio-card); border:1px solid var(--studio-line); border-radius:11px; padding:17px; }
.metric-card.selected,[data-theme="dark"] .metric-card.selected { background:var(--studio-card); border-color:var(--studio-muted); box-shadow:0 1px 2px #00000008; }
.metric-card.selected:after { display:none; }
.metric-card strong { font:500 27px/1.3 DM,Arial,sans-serif; letter-spacing:-1px; color:var(--studio-ink); }
.metric-card > span,.metric-card small,[data-theme="dark"] .metric-card > span { color:var(--studio-muted); font-size:10px; }

/* Vishnu Deepak shared dashboard typography and controls. */
@font-face {
  font-family: DM;
  src: url('/assets/dm-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
body { font-family:Arial,Helvetica,sans-serif; }
h1,h2,h3 { font-family:DM,Arial,sans-serif; font-weight:900; letter-spacing:-.025em; line-height:1.15; }
h2 { text-transform:uppercase; }
.button,button.secondary,button.primary {
  font-family:Arial,Helvetica,sans-serif;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0;
  border-radius:8px;
  padding:12px 18px;
}
.sidebar nav button span { font-family:DM,Arial,sans-serif; font-weight:700; }
.heading h1,.panel h2 { font-family:DM,Arial,sans-serif; font-weight:900; letter-spacing:-.025em; line-height:1.15; }
.wordmark { font-family:DM,Arial,sans-serif; font-weight:900; letter-spacing:-.025em; }
.stat strong,.metric-card strong { font-family:DM,Arial,sans-serif; font-weight:900; letter-spacing:-.025em; }

/* Use one touch-scroll surface for visitor details on small screens. */
.profile-card { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.journey-event > div { min-width:0; overflow-wrap:anywhere; }
.profile-card > p { overflow-wrap:anywhere; }
@media(max-width:700px) {
  #detail:has(.visitor-profile) { padding-top:48px; }
  #detail:has(.visitor-profile) #detail-content {
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
  }
  .visitor-profile { display:block; height:auto; }
  .profile-card { overflow:visible; }
  .profile-journey { margin-top:20px; }
  .profile-journey .timeline { flex:none; overflow:visible; padding-right:0; }
  .journey-event { grid-template-columns:24px minmax(0,1fr); }
  .journey-event time { grid-column:2; }
}

/* Project requests from the public Work with me page. */
:root { --req-new:#315bff; --req-new-bg:#eef1ff; --req-replied:#8a5a00; --req-replied-bg:#fdf3df; --req-quoted:#6b3fc4; --req-quoted-bg:#f2ecff; --req-won:#22785a; --req-won-bg:#e7f5ee; --req-lost:#9a3a3a; --req-lost-bg:#f8eaea; }
[data-theme="dark"] { --req-new:#9db2ff; --req-new-bg:#22305a; --req-replied:#f0c674; --req-replied-bg:#3a2f17; --req-quoted:#c9b2ff; --req-quoted-bg:#2f2550; --req-won:#86d9b4; --req-won-bg:#183a2d; --req-lost:#f0a3a3; --req-lost-bg:#3d1f1f; }
.req-filters button,[data-theme="dark"] .req-filters button { display:inline-flex; align-items:center; gap:7px; background:var(--studio-card); color:var(--studio-ink); border-color:var(--studio-line); }
.req-filters button[aria-pressed="true"],[data-theme="dark"] .req-filters button[aria-pressed="true"] { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }
.req-count { font-size:10px; min-width:18px; padding:1px 5px; border-radius:9px; background:var(--studio-inset); color:var(--studio-muted); text-align:center; }
.req-filters button[aria-pressed="true"] .req-count { background:#ffffff26; color:inherit; }
[data-theme="dark"] .req-filters button[aria-pressed="true"] .req-count { background:#00000026; }
.req-list { display:grid; gap:6px; }
.req-item { background:var(--studio-card); border:1px solid var(--studio-line); border-radius:12px; overflow:hidden; transition:box-shadow .15s,border-color .15s; }
.req-item.open { border-color:var(--studio-muted); box-shadow:0 6px 24px #0000000d; margin:4px 0; }
.req-row { width:100%; display:grid; grid-template-columns:32px minmax(0,1fr) minmax(0,190px) 86px 64px 12px; gap:14px; align-items:center; text-align:left; border:0; background:none; padding:11px 16px; color:var(--studio-ink); }
.req-row:hover { background:var(--studio-inset); }
.req-row:focus-visible { outline:2px solid var(--studio-ink); outline-offset:-2px; }
.req-avatar { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:700; background:var(--studio-inset); color:var(--studio-ink); border:1px solid var(--studio-line); }
.req-item.new .req-avatar { background:var(--req-new-bg); color:var(--req-new); border-color:transparent; }
.req-who,.req-budget { display:grid; gap:2px; min-width:0; }
.req-who strong { font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.req-who small,.req-budget small { font-size:11px; color:var(--studio-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.req-budget { font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.req-date { font-size:11px; color:var(--studio-muted); text-align:right; white-space:nowrap; }
.req-chevron { width:7px; height:7px; border-right:1.5px solid var(--studio-muted); border-bottom:1.5px solid var(--studio-muted); transform:rotate(45deg) translateY(-2px); transition:transform .15s; }
.req-item.open .req-chevron { transform:rotate(225deg) translate(-1px,-1px); }
.req-status-pill { justify-self:start; font-size:9.5px; font-weight:700; padding:3px 8px; border-radius:20px; background:var(--studio-inset); color:var(--studio-muted); text-transform:uppercase; letter-spacing:.05em; }
.req-status-pill.new { background:var(--req-new-bg); color:var(--req-new); }
.req-status-pill.replied { background:var(--req-replied-bg); color:var(--req-replied); }
.req-status-pill.quoted { background:var(--req-quoted-bg); color:var(--req-quoted); }
.req-status-pill.won { background:var(--req-won-bg); color:var(--req-won); }
.req-status-pill.lost { background:var(--req-lost-bg); color:var(--req-lost); }

/* Opened request: brief + details table on the left, contact/status/notes cards on the right. */
.req-detail { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:10px; padding:10px; border-top:1px solid var(--studio-line); background:var(--studio-inset); }
.req-main,.req-side { display:grid; gap:8px; align-content:start; min-width:0; }
.req-card { margin:0; padding:10px 12px; background:var(--studio-card); border:1px solid var(--studio-line); border-radius:12px; min-width:0; }
.req-card-flush { padding:0; overflow:hidden; }
.req-brief { padding:10px 12px; }
.req-card h3,.req-card-title,[data-theme="dark"] .req-card-title { display:block; margin:0 0 6px; font:700 9.5px/1.3 Arial,Helvetica,sans-serif; letter-spacing:.1em; text-transform:uppercase; color:var(--studio-muted); }
.req-text,[data-theme="dark"] .req-text { margin:0; font-size:13px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--studio-ink); }
.req-more { margin-top:6px; padding-top:6px; border-top:1px solid var(--studio-line); color:var(--studio-muted); }
.req-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.req-table th,.req-table td { padding:6px 12px; border-top:1px solid var(--studio-line); text-align:left; vertical-align:top; }
.req-table th { width:120px; font-weight:500; color:var(--studio-muted); white-space:nowrap; }
.req-table td { color:var(--studio-ink); overflow-wrap:anywhere; }
.req-chips { display:flex; flex-wrap:wrap; gap:4px; }
.req-chips span { font-size:11.5px; padding:1px 8px; border-radius:20px; background:var(--studio-inset); border:1px solid var(--studio-line); }
.req-none { color:var(--studio-muted); }
.req-links a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
.req-contact-line { display:flex; flex-wrap:wrap; gap:2px 10px; margin:0; font-size:12.5px; color:var(--studio-ink); overflow-wrap:anywhere; }
.req-contact-line a { color:inherit; font-weight:600; text-decoration:none; }
.req-contact-line a:hover { text-decoration:underline; }
.req-contact-line span { color:var(--studio-muted); }
.req-reply { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-top:8px; }
.req-reply .req-action.primary:only-child { grid-column:1 / -1; }
.req-reply .req-action { justify-content:center; }
.req-action,[data-theme="dark"] .req-action { display:inline-flex; align-items:center; justify-content:center; padding:5px 8px; border-radius:7px; font-size:11.5px; font-weight:600; text-decoration:none; text-transform:none; letter-spacing:0; background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); box-shadow:none; white-space:nowrap; }
.req-action:hover { border-color:var(--studio-muted); }
.req-action.primary { background:linear-gradient(#3c3c3c,#242424); color:#fff; border-color:#242424; }
[data-theme="dark"] .req-action.primary { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }
.req-action.danger,[data-theme="dark"] .req-action.danger { background:var(--req-lost); color:#fff; border-color:var(--req-lost); }
[data-theme="dark"] .req-action.danger { color:#1c1c1c; }
.req-status-select,[data-theme="dark"] .req-status-select { width:100%; margin:0 0 6px; padding:5px 8px; font-size:12.5px; font-weight:600; border-radius:8px; border:1px solid var(--studio-line); background-color:var(--studio-card); color:var(--studio-ink); cursor:pointer; }
.req-status-select.new { color:var(--req-new); }
.req-status-select.replied { color:var(--req-replied); }
.req-status-select.quoted { color:var(--req-quoted); }
.req-status-select.won { color:var(--req-won); }
.req-status-select.lost { color:var(--req-lost); }
.req-notes textarea,[data-theme="dark"] .req-notes textarea { width:100%; background:var(--studio-inset); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:8px; font-size:12.5px; line-height:1.45; padding:6px 8px; margin:0; resize:vertical; }
.req-notes textarea:focus { border-color:var(--studio-muted); box-shadow:none; }
.req-notes-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; }
.req-notes-state { font-size:11px; color:var(--studio-muted); }
.req-notes .secondary,[data-theme="dark"] .req-notes .secondary { padding:4px 10px; font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:8px; }
.req-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; padding:0 4px; }
.req-foot.confirming { display:grid; padding:10px; border:1px solid var(--req-lost); border-radius:12px; background:var(--req-lost-bg); }
.req-meta { margin:0; font-size:10.5px; line-height:1.5; color:var(--studio-muted); }
.req-meta strong { color:var(--studio-ink); font-weight:600; }
.req-confirm-text { margin:0; font-size:12.5px; line-height:1.5; color:var(--req-lost); }
.req-confirm-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.req-delete,[data-theme="dark"] .req-delete { padding:4px 8px; margin-right:-8px; font-size:11.5px; font-weight:600; border-radius:8px; border:1px solid transparent; background:none; color:var(--req-lost); box-shadow:none; text-transform:none; letter-spacing:0; }
.req-delete:hover { border-color:var(--req-lost); background:var(--req-lost-bg); }
@media(max-width:1100px) {
  .req-row { grid-template-columns:32px minmax(0,1fr) 86px 12px; }
  .req-budget,.req-date { display:none; }
  .req-detail { grid-template-columns:1fr; }
}
@media(max-width:760px) {
  .req-row { gap:10px; padding:10px 12px; }
  .req-detail { padding:10px; gap:10px; }
  .req-table th { width:auto; padding-right:8px; }
  .req-table th,.req-table td { padding:9px 12px; }
}
@media (prefers-reduced-motion:reduce) { .req-chevron,.req-item { transition:none; } }

/* ── Live globe stage (globe-stage.js + live-globe.js) ─────────────────────
   A dark, immersive map globe with frosted panels, in both dashboard themes.
   MapLibre's own stylesheet is not loaded (CSP), so its few structural rules live here. */
.maplibregl-map { position:relative; overflow:hidden; -webkit-tap-highlight-color:transparent; }
.maplibregl-canvas { position:absolute; left:0; top:0; outline:none; }
.maplibregl-canvas-container.maplibregl-interactive { cursor:grab; }
.maplibregl-canvas-container.maplibregl-interactive:active { cursor:grabbing; }
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-drag-pan { touch-action:pan-x pan-y; }
.maplibregl-marker { position:absolute; left:0; top:0; will-change:transform; }
.maplibregl-ctrl-attrib,.maplibregl-ctrl-logo { display:none !important; }

.og-stage { --og-ink:#eef2f8; --og-muted:#9aa6b8; --og-line:rgba(255,255,255,.09); --og-glass:rgba(14,19,28,.66); --og-live:#3ccf7e;
  position:relative; isolation:isolate; height:clamp(540px,74vh,780px); margin:0 0 18px; overflow:hidden; border-radius:18px; color:var(--og-ink);
  background:radial-gradient(ellipse at 50% 55%,#10213d 0%,#070d19 55%,#03060c 100%); border:1px solid #0d1626; box-shadow:0 24px 60px -30px #000c; font-family:Arial,Helvetica,sans-serif; }
.og-stars,.og-map,.og-canvas { position:absolute; inset:0; width:100%; height:100%; }
.og-stars { z-index:0; opacity:.9; }
.og-map { z-index:1; background:transparent; }
.og-vignette { position:absolute; inset:0; z-index:2; pointer-events:none; background:radial-gradient(ellipse at center,transparent 55%,rgba(2,5,10,.55) 100%); }
.og-stage[data-renderer="loading"]::after { content:"Loading the globe…"; position:absolute; left:50%; top:50%; translate:-50% -50%; z-index:3; font-size:12px; letter-spacing:.08em; color:var(--og-muted); }

/* Icons are bare 24px line drawings; give them a stroke in the stage's colour. */
.og-stage svg,.og-immersive svg { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.og-glass { background:var(--og-glass); -webkit-backdrop-filter:blur(16px) saturate(140%); backdrop-filter:blur(16px) saturate(140%); border:1px solid var(--og-line); border-radius:14px; box-shadow:0 12px 30px -12px rgba(0,0,0,.6); }

/* Top-left summary */
.og-hud { position:absolute; z-index:5; top:16px; left:16px; width:min(370px,calc(100% - 32px)); padding:14px 16px 14px; }
.og-hud-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.og-live-tag { display:inline-flex; align-items:center; gap:8px; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--og-muted); }
.og-pulse { position:relative; width:8px; height:8px; border-radius:50%; background:var(--og-live); }
.og-pulse::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:1px solid var(--og-live); animation:og-pulse 2.2s ease-out infinite; }
@keyframes og-pulse { from { transform:scale(.4); opacity:.9; } to { transform:scale(1.8); opacity:0; } }
.og-tools { display:flex; gap:2px; }
.og-tool { position:relative; display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:8px; background:transparent; color:#c3ccd9; cursor:pointer; transition:background .15s,color .15s; }
.og-tool svg { width:16px; height:16px; }
.og-tool:hover,.og-tool:focus-visible { background:rgba(255,255,255,.09); color:#fff; }
.og-tool:focus-visible { outline:2px solid #fff; outline-offset:1px; }
.og-tool[aria-pressed="true"] { color:#fff; }
.og-tool[data-tip]:hover::after,.og-tool[data-tip]:focus-visible::after { content:attr(data-tip); position:absolute; top:calc(100% + 6px); left:50%; translate:-50% 0; z-index:9; padding:4px 8px; border-radius:6px; background:#0b1018; border:1px solid var(--og-line); color:#fff; font-size:10px; white-space:nowrap; pointer-events:none; }
.og-zoom .og-tool[data-tip]:hover::after,.og-zoom .og-tool[data-tip]:focus-visible::after { top:50%; left:auto; right:calc(100% + 8px); translate:0 -50%; }
.og-count { margin:12px 0 2px; font-size:14px; color:var(--og-muted); }
.og-count strong { font-size:26px; font-weight:700; color:#fff; letter-spacing:-.02em; margin-right:2px; }
.og-count b { color:#fff; font-weight:700; }
.og-sync { margin:0; font-size:11px; color:var(--og-muted); }
.og-sync.is-stale { color:#f0c674; }
.og-summary { display:grid; gap:9px; margin:12px 0 0; padding-top:12px; border-top:1px solid var(--og-line); }
.og-row { display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; align-items:start; }
.og-row dt { padding-top:4px; font-size:11px; color:var(--og-muted); }
.og-row dd { display:flex; flex-wrap:wrap; gap:4px; margin:0; min-width:0; }
.og-chip { display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:3px 8px; border-radius:6px; background:rgba(255,255,255,.07); color:var(--og-ink); font:600 11px/1.4 Arial,Helvetica,sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.og-chip em { font-style:normal; font-weight:400; color:var(--og-muted); }
.og-chip svg { width:12px; height:12px; flex-shrink:0; }
.og-chip-button { border:0; cursor:pointer; }
.og-chip-button:hover { background:rgba(255,255,255,.14); }
.og-chip-more { color:var(--og-muted); }
.og-flag { font-size:13px; line-height:1; }
.og-empty { margin:0; font-size:12px; color:var(--og-muted); }

/* Music popover */
.og-music { position:relative; }
.og-music-pop { position:absolute; top:calc(100% + 8px); right:0; z-index:9; display:flex; align-items:center; gap:8px; padding:8px 10px; font-size:11px; color:var(--og-muted); white-space:nowrap; }
.og-music-pop[hidden] { display:none; }
.og-music-pop input { width:110px; accent-color:#fff; }

/* Bottom-left live activity */
.og-feed { position:absolute; z-index:5; left:16px; bottom:16px; width:min(370px,calc(100% - 32px)); max-height:min(42%,330px); display:flex; flex-direction:column; overflow:hidden; }
.og-feed-head { display:flex; align-items:center; justify-content:space-between; padding:11px 14px 6px; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--og-muted); }
.og-feed-clear { display:grid; place-items:center; width:22px; height:22px; padding:0; border:0; border-radius:6px; background:rgba(255,255,255,.08); color:#fff; cursor:pointer; }
.og-feed-clear svg { width:12px; height:12px; }
.og-feed-list { flex:1; min-height:0; margin:0; padding:0 6px 8px; list-style:none; overflow:auto; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.18) transparent; }
.og-feed-row { display:flex; gap:10px; width:100%; padding:8px; border:0; border-radius:9px; background:none; color:inherit; text-align:left; cursor:pointer; font:inherit; }
.og-feed-row:hover,.og-feed-row:focus-visible { background:rgba(255,255,255,.06); }
.og-feed-icon { flex-shrink:0; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:rgba(255,255,255,.08); color:#cfd7e3; }
.og-feed-icon svg { width:12px; height:12px; }
.og-feed-text { min-width:0; font-size:12px; line-height:1.45; color:var(--og-muted); overflow-wrap:anywhere; }
.og-feed-text strong,.og-feed-text b { color:#fff; font-weight:700; }
.og-feed-text code { font:11px/1.4 ui-monospace,Menlo,monospace; color:#fff; background:rgba(255,255,255,.08); padding:1px 5px; border-radius:4px; }
.og-feed-text time { display:block; margin-top:2px; font-size:10px; color:#7f8a9c; }
.og-feed-empty { padding:10px 8px; font-size:12px; color:var(--og-muted); }
.og-feed-item.is-new { animation:og-feed-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes og-feed-in { from { opacity:0; transform:translateY(-6px); } }

/* Zoom, attribution, demo badge, hint */
.og-zoom { position:absolute; z-index:5; right:16px; bottom:16px; display:grid; gap:2px; padding:4px; }
.og-attrib { position:absolute; z-index:4; right:66px; bottom:10px; margin:0; font-size:9px; color:#7f8a9c; }
.og-attrib a { color:inherit; }
.og-attrib[hidden],.og-demo-badge[hidden],.og-card[hidden] { display:none; }
.og-demo-badge { position:absolute; z-index:5; top:16px; left:50%; translate:-50% 0; margin:0; padding:6px 12px; border-radius:99px; background:rgba(240,198,116,.16); border:1px solid rgba(240,198,116,.4); color:#f6d58e; font-size:11px; font-weight:700; }
.og-hint { position:absolute; z-index:6; left:50%; bottom:22px; translate:-50% 0; margin:0; padding:7px 12px; border-radius:99px; background:rgba(8,12,20,.8); color:#fff; font-size:11px; opacity:0; transition:opacity .25s; pointer-events:none; }
.og-hint.is-visible { opacity:1; }
.og-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Visitor markers */
.og-marker { display:grid; justify-items:center; gap:4px; padding:0; border:0; background:none; color:#fff; cursor:pointer; transition:opacity .4s; }
.og-marker:focus-visible { outline:none; }
.og-marker-body { position:relative; width:40px; height:40px; }
.og-marker-avatar { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:hsl(var(--avatar-hue,210) 55% 52%); border:2px solid #fff; box-shadow:0 6px 16px rgba(0,0,0,.55); font-size:20px; line-height:1; overflow:hidden; transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s; }
.og-marker-avatar img { width:100%; height:100%; object-fit:cover; }
.og-marker-dot { position:absolute; top:-1px; right:-1px; width:11px; height:11px; border-radius:50%; background:var(--og-live); border:2px solid #0b1220; }
.og-marker-ripple { position:absolute; inset:-6px; border-radius:50%; border:2px solid var(--og-live); opacity:0; }
.og-marker-label { max-width:150px; padding:2px 7px; border-radius:5px; background:rgba(8,12,20,.72); font-size:10px; font-weight:700; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 2px #000; }
.og-marker:hover .og-marker-avatar,.og-marker:focus-visible .og-marker-avatar,.og-marker.is-selected .og-marker-avatar { transform:scale(1.12); box-shadow:0 0 0 3px rgba(255,255,255,.35),0 8px 20px rgba(0,0,0,.6); }
.og-marker.is-demo .og-marker-dot { background:#f0c674; }
.og-marker.is-entering .og-marker-body { animation:og-pop .55s cubic-bezier(.3,1.6,.5,1); }
.og-marker.is-arriving .og-marker-ripple { animation:og-ripple 1.4s ease-out 2; }
.og-marker.is-leaving { opacity:0; pointer-events:none; }
@keyframes og-pop { from { transform:scale(.2); opacity:0; } }
@keyframes og-ripple { from { transform:scale(.8); opacity:.9; } to { transform:scale(1.9); opacity:0; } }

/* Visitor card */
.og-card { position:absolute; z-index:7; top:16px; right:16px; width:296px; max-width:calc(100% - 32px); padding:14px 14px 12px; }
.og-card.is-open { animation:og-card-in .25s cubic-bezier(.2,.8,.2,1); }
@keyframes og-card-in { from { opacity:0; transform:translateY(6px) scale(.98); } }
.og-card.is-covered { opacity:.55; }
.og-card.is-docked { top:auto; left:12px; right:12px; bottom:12px; width:auto; max-width:none; }
.og-card-close { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:26px; height:26px; padding:0; border:0; border-radius:7px; background:rgba(255,255,255,.08); color:#fff; cursor:pointer; }
.og-card-close svg { width:12px; height:12px; }
.og-card-head { display:flex; align-items:center; gap:11px; padding-right:28px; }
.og-avatar { flex-shrink:0; display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:hsl(var(--avatar-hue,210) 55% 52%); border:2px solid rgba(255,255,255,.85); font-size:21px; }
.og-card-head h3 { margin:0; font-size:14px; font-weight:700; color:#fff; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.og-badge { padding:2px 6px; border-radius:5px; background:rgba(255,255,255,.1); font-size:9px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--og-muted); }
.og-card-place { display:flex; align-items:center; gap:5px; margin:3px 0 0; font-size:12px; color:var(--og-muted); }
.og-card-tags { display:flex; flex-wrap:wrap; gap:5px; margin:12px 0 10px; padding:0; list-style:none; }
.og-card-tags li { display:inline-flex; align-items:center; gap:5px; padding:3px 8px; border-radius:6px; background:rgba(255,255,255,.07); font-size:11px; }
.og-card-tags svg { width:12px; height:12px; }
.og-card-facts { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:0; }
.og-card-facts div { min-width:0; padding:8px 9px; border-radius:8px; background:rgba(255,255,255,.05); }
.og-card-facts dt { font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--og-muted); }
.og-card-facts dd { margin:3px 0 0; font-size:12px; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.og-card-facts code { font:11px ui-monospace,Menlo,monospace; }
.og-card-note { margin:10px 0 0; font-size:11px; color:#f6d58e; }
.og-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.og-card-actions:empty { display:none; }
.og-card-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 11px; border-radius:8px; border:1px solid rgba(255,255,255,.14); background:transparent; color:#fff; font:700 11px/1 Arial,Helvetica,sans-serif; cursor:pointer; }
.og-card-btn svg { width:13px; height:13px; }
.og-card-btn:hover { background:rgba(255,255,255,.08); }
.og-card-btn.primary { background:#fff; color:#0b1018; border-color:#fff; }

/* Full screen */
.og-immersive { width:100vw; height:100vh; max-width:none; max-height:none; margin:0; padding:0; border:0; background:#03060c; }
.og-immersive::backdrop { background:#03060c; }
.og-immersive .og-stage,.og-stage.is-expanded { height:100vh; margin:0; border-radius:0; border:0; }
body.globe-open { overflow:hidden; }

@media (max-width:720px) {
  .og-stage { height:640px; border-radius:14px; }
  .og-hud { top:10px; left:10px; width:calc(100% - 20px); padding:12px; }
  .og-summary { gap:6px; }
  .og-feed { left:10px; bottom:10px; width:calc(100% - 64px); max-height:34%; }
  .og-zoom { right:10px; bottom:10px; }
  .og-attrib { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .og-pulse::after,.og-marker.is-entering .og-marker-body,.og-marker.is-arriving .og-marker-ripple,.og-feed-item.is-new,.og-card.is-open { animation:none; }
  .og-marker,.og-marker-avatar,.og-hint,.og-tool { transition:none; }
}

/* Sidebar: one list, one icon style, every item identical. */
.sidebar nav button,[data-theme="dark"] .sidebar nav button { display:flex; align-items:center; gap:11px; font-size:12px; }
.sidebar nav .nav-icon { flex-shrink:0; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.sidebar nav button span { font-size:12px; line-height:1.2; }
.sidebar nav .nav-label { display:none; }

/* Compact live panel and activity feed: more globe, less chrome. */
.og-hud { width:min(300px,calc(100% - 32px)); padding:10px 12px; border-radius:12px; }
.og-tool { width:26px; height:26px; border-radius:7px; }
.og-tool svg { width:14px; height:14px; }
.og-live-tag { font-size:9px; gap:6px; }
.og-count { margin:7px 0 0; font-size:12px; }
.og-count strong { font-size:20px; }
.og-sync { font-size:10px; }
.og-summary { gap:5px; margin-top:8px; padding-top:8px; }
.og-row { grid-template-columns:58px minmax(0,1fr); gap:6px; }
.og-row dt { padding-top:2px; font-size:10px; }
.og-row dd { gap:3px; }
.og-chip { padding:2px 6px; border-radius:5px; font-size:10px; gap:4px; }
.og-chip svg { width:11px; height:11px; }
.og-flag { font-size:11px; }
.og-feed { width:min(300px,calc(100% - 32px)); max-height:min(30%,210px); border-radius:12px; }
.og-feed-head { padding:8px 12px 3px; font-size:9px; }
.og-feed-list { padding:0 4px 6px; }
.og-feed-row { gap:8px; padding:5px 7px; border-radius:7px; }
.og-feed-icon { width:20px; height:20px; }
.og-feed-icon svg { width:10px; height:10px; }
.og-feed-text { font-size:11px; line-height:1.35; }
.og-feed-text code { font-size:10px; padding:0 4px; }
.og-feed-text time { margin-top:1px; font-size:9.5px; }
@media (max-width:720px) { .og-hud { width:calc(100% - 20px); } .og-feed { width:calc(100% - 64px); max-height:28%; } }
.og-unlock { display:flex; align-items:center; gap:6px; margin:8px 0 0; padding:5px 8px; border-radius:7px; background:rgba(240,198,116,.14); color:#f6d58e; font-size:10px; font-weight:700; }
.og-unlock::before { content:""; width:6px; height:6px; border-radius:50%; background:#f0c674; }
.og-unlock[hidden] { display:none; }

/* Phones: a one-row swipeable menu, card-style tables, and a lighter globe panel. */
@media (max-width:680px) {
  .sidebar nav { display:flex; flex-wrap:nowrap; gap:6px; margin:14px 0 0; padding:0 0 4px; max-width:100%; overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .sidebar nav::-webkit-scrollbar { display:none; }
  .sidebar nav button,[data-theme="dark"] .sidebar nav button { flex:0 0 auto; width:auto; padding:8px 12px; white-space:nowrap; scroll-snap-align:start; }
  .og-stage { height:560px; }
  .og-summary,.og-hud .og-sync { display:none; }
  .og-hud { padding:10px 12px; }
  .og-feed { max-height:24%; }
}

/* Tables fit their panel at any width: cells wrap, and a narrow panel (phone, tablet, or a
   desktop window with the sidebar open) shows each row as a card labelled with its columns. */
.table-wrap { container:table / inline-size; overflow-x:auto; }
.data-table { white-space:normal; }
.data-table th { white-space:nowrap; }
.data-table td { overflow-wrap:break-word; }
.data-table td code { overflow-wrap:anywhere; }
.data-table .visitor-identity { min-width:220px; }
@container table (max-width:760px) {
  .data-table,.data-table tbody { display:block; min-width:0 !important; width:100%; max-width:100%; }
  .data-table thead { display:none; }
  .data-table tr { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; padding:12px 2px; border-bottom:1px solid var(--studio-line); }
  .data-table td { display:block; padding:0 !important; border:0 !important; font-size:11px; color:var(--studio-muted); min-width:0; max-width:100%; }
  .data-table td:first-child { flex:1 1 100%; font-size:inherit; color:inherit; }
  .data-table td[data-label]:not([data-label=""]):not(:first-child)::before { content:attr(data-label); margin-right:6px; font-size:9px; letter-spacing:.07em; text-transform:uppercase; opacity:.7; }
  .data-table .visitor-identity,.data-table .row-link,.data-table .row-link > span { min-width:0; max-width:100%; }
  .data-table .row-link small,.data-table .row-link span { white-space:normal; overflow-wrap:anywhere; }
}

/* ── Writing: note rows + pop-up editor ───────────────────────────────── */
/* The list sizes itself from its own width (container wr); the editor opens in a dialog. */
.wr-shell { container:wr / inline-size; }
.wr-shell kbd { display:inline-block; min-width:18px; padding:0 5px; border:1px solid var(--studio-line); border-bottom-width:2px; border-radius:5px; background:var(--studio-card); color:var(--studio-muted); font:600 10px/16px ui-monospace,SFMono-Regular,Menlo,monospace; text-align:center; }
.wr-restore { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; margin-bottom:14px; padding:10px 12px 10px 16px; border:1px solid var(--studio-line); border-radius:12px; background:var(--req-new-bg); }
.wr-restore p,[data-theme="dark"] .wr-restore p { margin:0; font-size:12px; color:var(--req-new); overflow-wrap:anywhere; }
.wr-restore button,[data-theme="dark"] .wr-restore button { padding:5px 11px; border:1px solid currentColor; border-radius:7px; background:none; color:var(--req-new); font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; box-shadow:none; }
.wr-restore [data-restore="keep"],[data-theme="dark"] .wr-restore [data-restore="keep"] { background:var(--req-new); border-color:var(--req-new); color:var(--studio-card); }

/* Filter and search */
.wr-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:14px; }
.wr-filter { display:flex; gap:2px; padding:3px; border:1px solid var(--studio-line); border-radius:10px; background:var(--studio-inset); }
.wr-filter button,[data-theme="dark"] .wr-filter button { display:inline-flex; justify-content:center; align-items:center; gap:6px; padding:6px 12px; border:0; border-radius:7px; background:none; color:var(--studio-muted); font-size:12px; font-weight:600; text-transform:none; letter-spacing:0; box-shadow:none; transition:background-color .15s,color .15s; }
.wr-filter button:hover { color:var(--studio-ink); }
.wr-filter button span { min-width:18px; padding:0 5px; border-radius:6px; background:var(--studio-line); font-size:10px; line-height:16px; text-align:center; font-variant-numeric:tabular-nums; }
.wr-filter button[aria-pressed="true"] { background:var(--studio-card); color:var(--studio-ink); box-shadow:0 1px 2px #0000001a; }
.wr-filter button[aria-pressed="true"] span { background:var(--studio-ink); color:var(--studio-paper); }
.wr-search-box,[data-theme="dark"] .wr-search-box { position:relative; display:block; flex:1 1 220px; max-width:340px; margin:0 0 0 auto; }
.wr-search-box svg { position:absolute; left:10px; top:50%; width:15px; height:15px; translate:0 -50%; fill:none; stroke:var(--studio-muted); stroke-width:2; stroke-linecap:round; pointer-events:none; }
.wr-search,[data-theme="dark"] .wr-search { width:100%; margin:0; padding:8px 30px 8px 31px; border:1px solid var(--studio-line); border-radius:9px; background:var(--studio-card); color:var(--studio-ink); font-size:12.5px; }
.wr-search::placeholder { color:var(--studio-muted); }
.wr-search:focus,[data-theme="dark"] .wr-search:focus { border-color:var(--studio-muted); box-shadow:0 0 0 3px var(--studio-inset); }
.wr-search-box kbd { position:absolute; right:8px; top:50%; translate:0 -50%; pointer-events:none; }
.wr-search:focus ~ kbd,.wr-search:not(:placeholder-shown) ~ kbd { display:none; }

/* Notes as full-width rows, like posts in a feed */
.wr-feed { border:1px solid var(--studio-line); border-radius:14px; background:var(--studio-card); overflow:hidden; }
.wr-row { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto; column-gap:14px; align-items:start; padding:16px 18px; border-bottom:1px solid var(--studio-line); transition:background-color .15s; }
.wr-row:last-child { border-bottom:0; }
.wr-row:hover,.wr-row.open { background:var(--studio-inset); }
.wr-row-open,[data-theme="dark"] .wr-row-open { display:grid; gap:4px; min-width:0; padding:0; border:0; background:none; color:var(--studio-ink); font-weight:400; text-align:left; text-transform:none; letter-spacing:0; box-shadow:none; }
/* The whole row opens the note; its action buttons sit above this layer. */
.wr-row-open::after { content:""; position:absolute; inset:0; }
.wr-row-open:focus-visible { outline:none; }
.wr-row-open:focus-visible::after { outline:2px solid #436aff; outline-offset:-2px; }
.wr-avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; border:1px solid var(--studio-line); }
.wr-row-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:14.5px; font-weight:700; line-height:1.35; color:var(--studio-ink); overflow-wrap:anywhere; }
.wr-row-desc { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13.5px; line-height:1.5; color:var(--studio-ink); }
.wr-row-excerpt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:12.5px; line-height:1.55; color:var(--studio-muted); overflow-wrap:anywhere; }
.wr-row-meta { display:flex; flex-wrap:wrap; align-items:flex-start; row-gap:4px; margin-top:6px; font-size:11.5px; line-height:19px; color:var(--studio-muted); }
.wr-row-meta .wr-chip { margin-right:10px; }
/* Every item starts with a "·"; the list sits one separator to the left and clips that column,
   so the first item on each line (wrapped or not) shows none. */
.wr-meta-list { display:flex; flex-wrap:wrap; flex:1 1 0; min-width:0; row-gap:4px; margin-left:-14px; clip-path:inset(0 0 0 14px); }
.wr-meta-item { white-space:nowrap; }
.wr-meta-item::before { content:"·"; display:inline-block; width:14px; text-align:center; opacity:.7; }
.wr-row mark { padding:0 1px; border-radius:3px; background:#ffe27a; color:inherit; }
[data-theme="dark"] .wr-row mark { background:#665314; }
/* View and Edit: one height, one shape; Edit is the main action. */
.wr-row-actions { position:relative; z-index:1; display:flex; gap:8px; margin-left:10px; }
.wr-row-action { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:34px; padding:0 13px; border-radius:9px; font:600 12.5px/1 Arial,Helvetica,sans-serif; text-transform:none; letter-spacing:0; white-space:nowrap; transition:background-color .15s,border-color .15s,color .15s; }
.wr-row-action svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.wr-row-action.view,[data-theme="dark"] .wr-row-action.view { border:1px solid var(--studio-line); background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.wr-row-action.view:hover { border-color:var(--studio-muted); }
.wr-row-action.edit,[data-theme="dark"] .wr-row-action.edit { border:1px solid var(--studio-ink); background:var(--studio-ink); color:var(--studio-paper); box-shadow:0 1px 2px #0000001a; }
.wr-row-action.edit:hover { opacity:.88; }
.wr-chip { display:inline-flex; align-items:center; gap:5px; padding:0 7px; border:1px solid var(--studio-line); border-radius:999px; background:var(--studio-card); color:var(--studio-muted); font-size:10px; font-weight:600; line-height:17px; white-space:nowrap; }
.wr-chip.published { border-color:transparent; background:var(--req-won-bg); color:var(--req-won); }
.wr-chip.draft { border-color:transparent; background:var(--req-replied-bg); color:var(--req-replied); }
.wr-chip.published::before,.wr-chip.draft::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.wr-chip.draft::before { background:none; box-shadow:inset 0 0 0 1.5px currentColor; }
.wr-empty { display:grid; justify-items:center; gap:4px; padding:44px 14px; text-align:center; }
.wr-empty strong { font-size:14px; font-weight:600; color:var(--studio-ink); overflow-wrap:anywhere; }
.wr-empty span { max-width:280px; font-size:12px; line-height:1.5; color:var(--studio-muted); }
.wr-empty button,[data-theme="dark"] .wr-empty button { margin-top:10px; padding:6px 12px; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); color:var(--studio-ink); font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; box-shadow:0 1px 2px #00000008; }
.wr-empty button:hover { border-color:var(--studio-muted); }
.wr-pages { display:flex; justify-content:center; gap:4px; padding:10px; }
.wr-pages button,[data-theme="dark"] .wr-pages button { min-width:28px; height:28px; padding:0 8px; border-radius:7px; border:1px solid var(--studio-line); background:var(--studio-card); color:var(--studio-muted); font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; box-shadow:none; }
.wr-pages button:hover:not(:disabled) { color:var(--studio-ink); border-color:var(--studio-muted); }
.wr-pages button:disabled { opacity:.4; cursor:default; }
.wr-pages button[aria-current="page"],[data-theme="dark"] .wr-pages button[aria-current="page"] { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }

/* The editor pop-up: status bar, panes and an action bar that stay inside the dialog */
.wr-modal,[data-theme="dark"] .wr-modal { width:min(880px,calc(100vw - 48px)); height:min(920px,calc(100dvh - 48px)); max-width:none; max-height:none; padding:0; border:1px solid var(--studio-line); border-radius:16px; background:var(--studio-card); color:var(--studio-ink); box-shadow:0 30px 90px #00000040; overflow:hidden; }
.wr-modal:has(.wr-editor[data-mode="split"]) { width:min(1280px,calc(100vw - 48px)); }
.wr-modal[open] { display:flex; animation:wr-pop .2s ease-out; }
.wr-modal::backdrop { background:#10131a73; backdrop-filter:blur(4px); animation:wr-fade .2s ease-out; }
@keyframes wr-pop { from { opacity:0; transform:translateY(10px) scale(.985); } }
@keyframes wr-fade { from { opacity:0; } }
html:has(.wr-modal[open]) { overflow:hidden; }
.wr-editor { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.wr-bar { flex:none; display:flex; align-items:center; gap:10px; min-width:0; padding:10px 12px 10px 18px; border-bottom:1px solid var(--studio-line); background:var(--studio-inset); }
.wr-state { flex:none; font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:3px 8px; border-radius:20px; background:var(--studio-card); color:var(--studio-muted); border:1px solid var(--studio-line); }
.wr-state.published { color:var(--req-won); background:var(--req-won-bg); border-color:transparent; }
.wr-state.draft { color:var(--req-replied); background:var(--req-replied-bg); border-color:transparent; }
.wr-saved { display:inline-flex; align-items:center; gap:6px; min-width:0; overflow:hidden; font-size:11px; color:var(--studio-muted); white-space:nowrap; }
.wr-saved[data-state="new"] { display:none; }
.wr-saved::before { content:""; flex:none; width:6px; height:6px; border-radius:50%; background:var(--studio-line); transition:background-color .2s; }
.wr-saved[data-state="saved"]::before { background:var(--req-won); }
.wr-saved[data-state="dirty"]::before { background:#e2a300; }
.wr-saved[data-state="saving"]::before { background:var(--studio-ink); animation:wr-pulse .8s ease-in-out infinite alternate; }
.wr-saved[data-state="error"] { color:var(--req-lost); }
.wr-saved[data-state="error"]::before { background:var(--req-lost); }
.wr-saved.flash { animation:wr-flash .7s ease; }
@keyframes wr-pulse { to { opacity:.2; } }
@keyframes wr-flash { 25% { color:var(--studio-ink); } }
.wr-mode { display:inline-flex; flex:none; gap:2px; margin-left:auto; padding:2px; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); }
.wr-mode button,[data-theme="dark"] .wr-mode button { padding:4px 10px; border:0; border-radius:6px; background:none; color:var(--studio-muted); font-size:11px; font-weight:600; text-transform:none; letter-spacing:0; box-shadow:none; transition:background-color .15s,color .15s; }
.wr-mode button:hover { color:var(--studio-ink); }
.wr-mode button[aria-pressed="true"] { background:var(--studio-inset); color:var(--studio-ink); box-shadow:inset 0 0 0 1px var(--studio-line); }
.wr-editor[data-wide="false"] [data-wr-mode="split"] { display:none; }
.wr-close,[data-theme="dark"] .wr-close { display:inline-grid; place-items:center; flex:none; width:32px; height:32px; padding:0; border:1px solid transparent; border-radius:8px; background:none; color:var(--studio-muted); box-shadow:none; }
.wr-close:hover { background:var(--studio-card); border-color:var(--studio-line); color:var(--studio-ink); }
.wr-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.wr-panes { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr); }
.wr-editor[data-mode="split"] .wr-panes { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.wr-editor[data-mode="write"] .wr-preview-pane,.wr-editor[data-mode="preview"] .wr-paper { display:none; }

/* Writing pane */
.wr-paper { display:grid; align-content:start; gap:6px; min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; padding:30px max(24px,calc((100% - 700px) / 2)) 32px; }
.wr-paper:focus { outline:none; }
.wr-editor[data-mode="split"] .wr-paper { padding:26px 28px 28px; border-right:1px solid var(--studio-line); }
.wr-paper textarea,.wr-paper input,[data-theme="dark"] .wr-paper textarea,[data-theme="dark"] .wr-paper input { margin:0; background:none; color:var(--studio-ink); border:0; box-shadow:none; resize:none; overflow:hidden; }
.wr-paper textarea:focus,.wr-paper input:focus { outline:none; box-shadow:none; }
.wr-paper ::placeholder { color:var(--studio-muted); opacity:.8; }
.wr-title { width:100%; padding:0; font:900 clamp(26px,3vw,34px)/1.18 DM,Arial,sans-serif; letter-spacing:-.025em; }
.wr-subtitle { width:100%; padding:0; font:400 16px/1.5 DM,Arial,sans-serif; color:var(--studio-muted) !important; }
.wr-slug,[data-theme="dark"] .wr-slug { display:flex; flex-wrap:wrap; align-items:baseline; min-width:0; margin:0; padding:12px 0 14px; border-bottom:1px solid var(--studio-line); font-size:11.5px; font-weight:500; color:var(--studio-muted); text-transform:none; letter-spacing:0; }
.wr-slug span { white-space:nowrap; }
.wr-slug input,[data-theme="dark"] .wr-slug input { flex:1; min-width:120px; padding:2px 0; border-radius:0; font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--studio-ink); border-bottom:1px dashed var(--studio-line) !important; }
.wr-slug input:focus { border-bottom-color:var(--studio-muted) !important; }
.wr-slug input:invalid:not(:placeholder-shown),[data-theme="dark"] .wr-slug input:invalid:not(:placeholder-shown) { color:var(--req-lost); border-bottom-color:var(--req-lost) !important; }
.wr-tools { position:sticky; top:0; z-index:2; display:flex; flex-wrap:wrap; align-items:center; gap:2px; margin:0 -8px 10px; padding:6px 8px; border-bottom:1px solid var(--studio-line); background:var(--studio-card); }
.wr-tools button,[data-theme="dark"] .wr-tools button { display:inline-grid; place-items:center; width:30px; height:28px; padding:0; border:0; border-radius:7px; background:none; color:var(--studio-muted); font:700 12px/1 DM,Arial,sans-serif; text-transform:none; letter-spacing:0; box-shadow:none; }
.wr-tools button:hover { background:var(--studio-inset); color:var(--studio-ink); }
.wr-tools button:focus-visible { outline-width:2px; outline-offset:0; }
.wr-tools b { font-size:13px; font-weight:900; }
.wr-tools i { font:italic 500 14px/1 Georgia,serif; }
.wr-tools svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.wr-sep { width:1px; height:16px; margin:0 4px; background:var(--studio-line); }
.wr-count { margin-left:auto; padding-left:8px; font-size:11px; color:var(--studio-muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.wr-body { width:100%; min-height:40dvh; padding:0; font:400 16px/1.8 DM,Arial,sans-serif; }

/* Preview pane: styled like the published note */
.wr-preview-pane { min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; background:var(--studio-paper); }
.wr-editor[data-mode="preview"] .wr-preview-pane { background:var(--studio-card); }
.wr-sheet { max-width:720px; margin:0 auto; padding:34px clamp(18px,6%,56px) 44px; transition:opacity .2s; }
.wr-preview-pane.rendering .wr-sheet { opacity:.55; }
.wr-pv-topic { display:block; margin-bottom:10px; font-size:10px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--studio-muted); }
.wr-pv-title,[data-theme="dark"] .wr-pv-title { margin:0 0 10px; color:var(--studio-ink); font:900 clamp(26px,3vw,34px)/1.15 DM,Arial,sans-serif; letter-spacing:-.025em; text-transform:none; overflow-wrap:anywhere; }
.wr-pv-title.placeholder,[data-theme="dark"] .wr-pv-title.placeholder { color:var(--studio-muted); }
.wr-pv-deck,[data-theme="dark"] .wr-pv-deck { margin:0; font-size:16px; line-height:1.5; color:var(--studio-muted); }
.wr-prose { margin-top:22px; padding-top:22px; border-top:1px solid var(--studio-line); color:var(--studio-ink); font:400 16px/1.8 DM,Arial,sans-serif; overflow-wrap:anywhere; }
.wr-prose > :first-child { margin-top:0; }
.wr-prose p,.wr-prose li,[data-theme="dark"] .wr-prose p,[data-theme="dark"] .wr-prose li { color:var(--studio-ink); }
.wr-prose p,.wr-prose ul,.wr-prose ol,.wr-prose blockquote,.wr-prose pre,.wr-prose table { margin:0 0 1.1em; }
.wr-prose h2,.wr-prose h3,.wr-prose h4,.wr-prose h5,.wr-prose h6 { margin:1.6em 0 .5em; color:var(--studio-ink); font-family:DM,Arial,sans-serif; font-weight:800; letter-spacing:-.015em; line-height:1.25; text-transform:none; }
.wr-prose h2 { font-size:1.45em; }
.wr-prose h3 { font-size:1.2em; }
.wr-prose h4,.wr-prose h5,.wr-prose h6 { font-size:1em; }
.wr-prose a { color:inherit; text-decoration:underline; text-decoration-color:var(--studio-muted); text-underline-offset:3px; }
.wr-prose blockquote { padding:2px 0 2px 18px; border-left:3px solid var(--studio-ink); font-style:italic; }
.wr-prose blockquote p,[data-theme="dark"] .wr-prose blockquote p { color:var(--studio-muted); }
.wr-prose blockquote > :last-child { margin-bottom:0; }
.wr-prose ul,.wr-prose ol { padding-left:1.3em; }
.wr-prose li + li { margin-top:.3em; }
.wr-prose code { padding:.1em .35em; border-radius:5px; background:var(--studio-inset); font:.86em/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.wr-prose pre { padding:14px 16px; border:1px solid var(--studio-line); border-radius:10px; background:var(--studio-inset); overflow:auto; }
.wr-prose pre code { padding:0; background:none; }
.wr-prose hr { margin:2em 0; border:0; border-top:1px solid var(--studio-line); }
.wr-prose table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; font-size:.92em; }
.wr-prose th,.wr-prose td { padding:6px 10px; border:1px solid var(--studio-line); text-align:left; }
.wr-prose th { background:var(--studio-inset); }
.wr-pv-empty,[data-theme="dark"] .wr-pv-empty { color:var(--studio-muted) !important; font-style:italic; }

.wr-actions { flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-top:1px solid var(--studio-line); background:var(--studio-card); }
.wr-actions.confirming { background:var(--req-lost-bg); border-top-color:var(--req-lost); }
.wr-actions-start { display:flex; align-items:center; gap:12px; min-width:0; }
.wr-hint { font-size:11px; color:var(--studio-muted); white-space:nowrap; }
.wr-buttons { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.wr-actions .button,.wr-actions button { text-transform:none; letter-spacing:0; font-weight:600; }
.wr-delete,[data-theme="dark"] .wr-delete { padding:6px 10px; font-size:11px; font-weight:600; border-radius:8px; border:1px solid transparent; background:none; color:var(--req-lost); box-shadow:none; }
.wr-delete:hover { border-color:var(--req-lost); background:var(--req-lost-bg); }
.wr-confirm,[data-theme="dark"] .wr-confirm { margin:0; font-size:12px; color:var(--req-lost); }
.wr-actions .primary,[data-theme="dark"] .wr-actions .primary { background:linear-gradient(#3c3c3c,#242424); color:#fff; border:1px solid #242424; border-radius:8px; box-shadow:inset 0 1px 0 #ffffff25,0 1px 2px #0002; padding:7px 14px; font-size:12px; }
[data-theme="dark"] .wr-actions .primary { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }
.wr-actions .secondary,.wr-actions .button,[data-theme="dark"] .wr-actions .secondary,[data-theme="dark"] .wr-actions .button { padding:7px 12px; font-size:12px; border-radius:8px; background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); box-shadow:0 1px 2px #00000008; }
.wr-actions .secondary:hover:not(:disabled,.danger-solid),.wr-actions .button:hover { border-color:var(--studio-muted); }
.wr-actions .danger-solid,[data-theme="dark"] .wr-actions .danger-solid { background:var(--req-lost); border-color:var(--req-lost); color:#fff; }
[data-theme="dark"] .wr-actions .danger-solid { color:#1c1c1c; }

/* Undo, redo and images */
.wr-tools button:disabled,[data-theme="dark"] .wr-tools button:disabled { opacity:.35; cursor:default; background:none; }
.wr-paper.dropping { box-shadow:inset 0 0 0 2px var(--req-new); background:var(--req-new-bg); }
.wr-upload { flex:none; display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; padding:10px 14px; border-top:1px solid var(--studio-line); background:var(--studio-inset); }
.wr-upload-thumb { flex:none; width:48px; height:48px; border-radius:8px; object-fit:cover; background:var(--studio-line); }
.wr-upload-info { display:grid; gap:2px; flex:1 1 200px; min-width:0; }
.wr-upload-info strong { overflow:hidden; font-size:12px; color:var(--studio-ink); text-overflow:ellipsis; white-space:nowrap; }
.wr-upload-info small,[data-theme="dark"] .wr-upload-info small { font-size:11px; color:var(--studio-muted); }
.wr-upload-info small.error,[data-theme="dark"] .wr-upload-info small.error { color:var(--req-lost); }
.wr-upload-alt,[data-theme="dark"] .wr-upload-alt { flex:2 1 240px; width:auto; margin:0; padding:7px 10px; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); color:var(--studio-ink); font-size:12.5px; }
.wr-upload-alt:focus,[data-theme="dark"] .wr-upload-alt:focus { border-color:var(--studio-muted); box-shadow:0 0 0 3px var(--studio-card); }
.wr-upload button,[data-theme="dark"] .wr-upload button { padding:7px 12px; border-radius:8px; font-size:12px; font-weight:600; text-transform:none; letter-spacing:0; }
.wr-upload .secondary,[data-theme="dark"] .wr-upload .secondary { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); box-shadow:none; }
.wr-upload .primary,[data-theme="dark"] .wr-upload .primary { background:var(--studio-ink); color:var(--studio-paper); border:1px solid var(--studio-ink); box-shadow:none; }
.wr-prose img { display:block; max-width:100%; height:auto; margin:1.4em auto; border-radius:10px; }

/* Phone: compact rows; the pop-up fills the screen. */
@container wr (max-width:560px) {
  .wr-toolbar { flex-direction:column; align-items:stretch; }
  .wr-filter button { flex:1; }
  .wr-search-box,[data-theme="dark"] .wr-search-box { flex:auto; max-width:none; margin:0; }
  .wr-search-box kbd { display:none; }
  .wr-row { grid-template-columns:auto minmax(0,1fr); column-gap:10px; padding:14px 12px; }
  .wr-avatar { width:34px; height:34px; }
  /* The buttons get their own line under the note instead of squeezing it. */
  .wr-row-actions { grid-column:2; justify-self:end; margin:10px 0 0; }
}
@media (max-width:640px) {
  .wr-modal,[data-theme="dark"] .wr-modal { width:100vw; height:100dvh; border:0; border-radius:0; }
  .wr-modal:has(.wr-editor[data-mode="split"]) { width:100vw; }
  .wr-bar { flex-wrap:wrap; gap:8px; padding:8px 8px 8px 14px; }
  .wr-saved { order:5; flex-basis:100%; }
  .wr-paper { padding:20px 16px 24px; }
  .wr-sheet { padding:24px 16px 32px; }
  .wr-tools button,[data-theme="dark"] .wr-tools button { width:34px; height:32px; }
  .wr-hint { display:none; }
  .wr-actions { flex-wrap:wrap; gap:8px; padding:8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .wr-actions-start:not(:has(.wr-delete)) { display:none; }
  .wr-actions.confirming { flex-direction:column; align-items:stretch; }
  .wr-buttons { flex:1 1 200px; }
  .wr-buttons > * { flex:1 1 auto; justify-content:center; text-align:center; }
}
@media (prefers-reduced-motion:reduce) {
  .wr-modal[open],.wr-modal::backdrop,.wr-saved::before,.wr-saved.flash { animation:none; }
  .wr-sheet { transition:none; }
}

/* ── Bio links: one compact list, inline editing ───────────────────────── */
.bl-panel { max-width:760px; background:var(--studio-card); border:1px solid var(--studio-line); border-radius:14px; padding:6px; }
.bl-panel .link-list { display:grid; gap:2px; }
.link-item.bl-row,[data-theme="dark"] .link-item.bl-row { display:block; padding:0; border:1px solid transparent; border-radius:10px; background:none; box-shadow:none; }
.bl-row:hover { background:var(--studio-inset); }
.bl-row.editing,[data-theme="dark"] .bl-row.editing { background:var(--studio-inset); border-color:var(--studio-line); margin:4px 0; }
.bl-row + .bl-row:not(.editing)::before { content:""; display:block; height:1px; margin:0 12px 0 52px; background:var(--studio-line); }
.bl-row.editing + .bl-row::before,.bl-row:hover::before,.bl-row:hover + .bl-row::before { background:transparent; }
.bl-line { display:flex; align-items:center; gap:10px; padding:7px 10px 7px 4px; }
.bl-row .link-drag,[data-theme="dark"] .bl-row .link-drag { padding:4px 6px; font-size:16px; line-height:1; color:var(--studio-muted); box-shadow:none; }
.bl-mono { flex:none; width:30px; height:30px; border-radius:8px; display:grid; place-items:center; font:700 12px/1 DM,Arial,sans-serif; background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); }
.link-item .bl-text { flex:1; display:grid; gap:1px; min-width:0; }
.link-item .bl-text strong { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.link-item .bl-text small { font-size:11px; color:var(--studio-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
.bl-row.is-hidden .bl-text,.bl-row.is-hidden .bl-mono { opacity:.55; }
.bl-badge { flex:none; font-size:9.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:2px 7px; border-radius:20px; background:var(--studio-inset); color:var(--studio-muted); border:1px solid var(--studio-line); }
.bl-edit,[data-theme="dark"] .bl-edit { flex:none; padding:5px 10px; font-size:11px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:7px; border:1px solid var(--studio-line); background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.bl-edit:hover { border-color:var(--studio-muted); }
.bl-new { margin-bottom:6px; border:1px solid var(--studio-line); border-radius:10px; background:var(--studio-inset); }
.bl-form { padding:4px 12px 12px 52px; }
.bl-new .bl-form { padding:12px; }
.bl-fields { display:grid; grid-template-columns:1fr 1.4fr; gap:8px 10px; }
.bl-fields label { display:grid; gap:4px; margin:0; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--studio-muted); }
.bl-fields .bl-wide { grid-column:1 / -1; }
.bl-optional { font-weight:500; text-transform:none; letter-spacing:0; opacity:.8; }
.bl-fields input,[data-theme="dark"] .bl-fields input { margin:0; padding:7px 10px; font-size:12.5px; font-weight:400; letter-spacing:0; text-transform:none; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.bl-fields input:focus { border-color:var(--studio-muted); box-shadow:none; }
.bl-form-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; }
.bl-form-foot.confirming { padding:8px 10px; border:1px solid var(--req-lost); border-radius:9px; background:var(--req-lost-bg); }
.bl-confirm { margin:0; font-size:12px; color:var(--req-lost); }
.bl-buttons { display:flex; flex-wrap:wrap; gap:6px; margin-left:auto; }
.bl-buttons button,[data-theme="dark"] .bl-buttons button { padding:6px 12px; font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:8px; }
.bl-buttons .secondary,[data-theme="dark"] .bl-buttons .secondary { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); box-shadow:none; }
.bl-buttons .primary,[data-theme="dark"] .bl-buttons .primary { background:linear-gradient(#3c3c3c,#242424); color:#fff; border:1px solid #242424; }
[data-theme="dark"] .bl-buttons .primary { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }
.bl-buttons .danger-solid,[data-theme="dark"] .bl-buttons .danger-solid { background:var(--req-lost); border-color:var(--req-lost); color:#fff; }
[data-theme="dark"] .bl-buttons .danger-solid { color:#1c1c1c; }
.bl-delete,[data-theme="dark"] .bl-delete { background:none !important; border:1px solid transparent !important; color:var(--req-lost) !important; box-shadow:none !important; }
.bl-delete:hover { border-color:var(--req-lost) !important; }
.bl-switch { display:inline-flex; align-items:center; gap:8px; margin:0; font-size:12px; font-weight:500; color:var(--studio-ink); text-transform:none; letter-spacing:0; cursor:pointer; }
.bl-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.bl-switch span { position:relative; width:28px; height:16px; border-radius:16px; background:var(--studio-line); transition:background .15s; }
.bl-switch span::after { content:""; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:#fff; box-shadow:0 1px 2px #0003; transition:transform .15s; }
.bl-switch input:checked + span { background:#2f9e6e; }
.bl-switch input:checked + span::after { transform:translateX(12px); }
.bl-switch input:focus-visible + span { outline:2px solid var(--studio-ink); outline-offset:2px; }
#content > .heading .controls { display:flex; flex-wrap:wrap; gap:6px; }
@media(max-width:560px) {
  .bl-form { padding:4px 10px 10px; }
  .bl-fields { grid-template-columns:1fr; }
  .bl-buttons { width:100%; }
  .bl-buttons button { flex:1; }
  .bl-row + .bl-row:not(.editing)::before { margin-left:12px; }
}
@media (prefers-reduced-motion:reduce) { .bl-switch span,.bl-switch span::after { transition:none; } }
#content > .heading .controls .button,#content > .heading .controls button,[data-theme="dark"] #content > .heading .controls .button { padding:7px 12px; font-size:11px; border-radius:8px; }
#content > .heading .controls .button:not(.primary),[data-theme="dark"] #content > .heading .controls .button:not(.primary) { background:var(--studio-card); color:var(--studio-ink); border:1px solid var(--studio-line); box-shadow:0 1px 2px #00000008; }

.site-picker select { font-size: 12px; padding: 6px 28px 6px 10px; border-radius: 8px; }
.og-site { opacity: .7; font-size: .92em; }
.og-card-site,[data-theme="dark"] .og-card-site { display:flex; align-items:center; margin:5px 0 0; font-size:12px; color:var(--og-muted); }
.og-card-site strong,[data-theme="dark"] .og-card-site strong { margin-left:4px; color:#fff; font-weight:700; }
.og-site-dot { display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:50%; background:var(--site-color); vertical-align:baseline; box-shadow:0 0 0 1.5px rgba(255,255,255,.5); }
.og-feed-icon .og-site-dot { width:10px; height:10px; margin:0; }
.og-marker.has-site .og-marker-avatar { border:3px solid var(--site-color); }
.og-marker.has-site .og-marker-dot { background:var(--site-color); }
.site-badge { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:20px; border:1px solid var(--studio-line); background:var(--studio-inset); color:var(--studio-ink); font-size:11px; font-weight:600; white-space:nowrap; }
.site-badge i { width:8px; height:8px; border-radius:50%; background:var(--site-color); }
.profile-card .site-badge { margin:6px 0 2px; }
/* Sites page */
.st-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; margin-bottom:12px; }
.st-setup { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:12px; margin-bottom:20px; align-items:start; }
@media (max-width: 900px) { .st-setup { grid-template-columns:1fr; } }
.st-card { display:flex; flex-direction:column; gap:12px; padding:14px 16px; border:1px solid var(--studio-line); border-radius:12px; background:var(--studio-card); color:var(--studio-ink); position:relative; overflow:hidden; }
.st-card::before { content:""; position:absolute; inset:0 0 auto; height:3px; background:var(--site-color, transparent); }
.st-card-head { display:flex; align-items:flex-start; gap:9px; }
.st-card-head > div { min-width:0; flex:1; }
.st-card h2,[data-theme="dark"] .st-card h2 { margin:0; font-size:14px; line-height:1.3; text-transform:none; letter-spacing:-.01em; }
.st-card-head a, .st-card-head p { display:block; margin:1px 0 0; font-size:11px; color:var(--studio-muted); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.st-card-head a:hover { color:var(--studio-ink); text-decoration:underline; }
.st-dot { flex:none; width:10px; height:10px; margin-top:4px; border-radius:50%; background:var(--site-color); box-shadow:0 0 0 3px color-mix(in srgb, var(--site-color) 18%, transparent); }
.st-badge { flex:none; padding:1px 7px; border-radius:20px; border:1px solid var(--studio-line); background:var(--studio-inset); color:var(--studio-muted); font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.st-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0; }
.st-stats div { padding:7px 10px; border-radius:8px; background:var(--studio-inset); }
.st-stats dt { white-space:nowrap; font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--studio-muted); }
.st-stats dd { display:flex; align-items:center; gap:6px; margin:2px 0 0; font-size:17px; font-weight:800; letter-spacing:-.02em; }
.st-pulse { width:7px; height:7px; border-radius:50%; background:var(--site-color); box-shadow:0 0 0 0 color-mix(in srgb, var(--site-color) 55%, transparent); animation:st-pulse 1.8s infinite; }
@keyframes st-pulse { 70% { box-shadow:0 0 0 6px transparent; } 100% { box-shadow:0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .st-pulse { animation:none; } }
.st-card-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; font-size:10.5px; color:var(--studio-muted); }
.st-open,[data-theme="dark"] .st-open { white-space:nowrap; padding:5px 9px; font-size:10.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:7px; border:1px solid var(--studio-line); background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.st-open:hover { border-color:var(--studio-muted); }
.st-add { border-style:dashed; background:var(--studio-inset); }
.st-actions { display:flex; align-items:center; gap:2px; }
.st-link,[data-theme="dark"] .st-link { white-space:nowrap; padding:5px 7px; font-size:10.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:7px; border:1px solid transparent; background:none; color:var(--studio-muted); box-shadow:none; }
.st-link:hover { color:var(--studio-ink); border-color:var(--studio-line); }
.st-link-danger,[data-theme="dark"] .st-link-danger { color:var(--req-lost); }
.st-link-danger:hover { color:var(--req-lost); border-color:var(--req-lost); background:var(--req-lost-bg); }
.st-confirm { display:grid; gap:8px; margin-top:auto; padding:10px; border:1px solid var(--req-lost); border-radius:10px; background:var(--req-lost-bg); }
.st-confirm p { margin:0; font-size:11.5px; line-height:1.5; color:var(--req-lost); }
.st-confirm span { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.st-danger,[data-theme="dark"] .st-danger { padding:5px 9px; font-size:10.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:7px; border:1px solid var(--req-lost); background:var(--req-lost); color:#fff; box-shadow:none; }
.st-edit label { display:grid; gap:4px; margin:0; font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--studio-muted); }
.st-edit input,[data-theme="dark"] .st-edit input { margin:0; padding:7px 9px; font-size:12.5px; font-weight:400; letter-spacing:0; text-transform:none; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.st-edit input:focus { border-color:var(--studio-muted); outline:none; }
.st-edit input:disabled { color:var(--studio-muted); background:var(--studio-inset); }
.st-edit .st-fields { grid-template-columns:1fr; }
.st-edit-foot { display:flex; justify-content:flex-end; gap:6px; margin-top:auto; }
.st-edit-foot .st-link-danger { margin-right:auto; margin-left:-7px; }
.st-plus { flex:none; display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:var(--studio-ink); color:var(--studio-card); font-size:13px; font-weight:700; line-height:1; }
.st-fields { display:grid; grid-template-columns:1fr 1.3fr; gap:8px; }
.st-add label { display:grid; gap:4px; margin:0; font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--studio-muted); }
.st-add input,[data-theme="dark"] .st-add input { margin:0; padding:7px 9px; font-size:12.5px; font-weight:400; letter-spacing:0; text-transform:none; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-card); color:var(--studio-ink); box-shadow:none; }
.st-add input:focus { border-color:var(--studio-muted); outline:none; }
.st-add-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.st-add-foot small { font-size:10.5px; color:var(--studio-muted); }
.st-submit,[data-theme="dark"] .st-submit { flex:none; padding:7px 13px; font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:8px; background:linear-gradient(#3c3c3c,#242424); color:#fff; border:1px solid #242424; }
[data-theme="dark"] .st-submit { background:var(--studio-ink); color:var(--studio-paper); border-color:var(--studio-ink); }
.st-steps { display:grid; gap:7px; margin:0; padding:0; list-style:none; counter-reset:step; }
.st-steps li { position:relative; padding-left:26px; font-size:11.5px; line-height:1.5; color:var(--studio-muted); counter-increment:step; }
.st-steps li::before { content:counter(step); position:absolute; left:0; top:0; display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--studio-inset); border:1px solid var(--studio-line); color:var(--studio-ink); font-size:10px; font-weight:700; }
.st-steps strong { color:var(--studio-ink); font-weight:700; }
.st-steps code { font-size:10.5px; overflow-wrap:anywhere; }
.st-code { display:flex; align-items:center; gap:10px; padding:8px 8px 8px 12px; border-radius:9px; background:#17181c; color:#e8eaf0; }
.st-code code { flex:1; min-width:0; overflow-x:auto; white-space:nowrap; font-size:11.5px; }
.st-code button,[data-theme="dark"] .st-code button { flex:none; padding:5px 11px; font-size:10.5px; font-weight:600; text-transform:none; letter-spacing:0; border-radius:7px; border:1px solid #ffffff2e; background:#ffffff14; color:#fff; box-shadow:none; }
.st-code button:hover { background:#ffffff26; }
@media (max-width: 560px) {
  .st-grid { grid-template-columns:1fr; gap:8px; }
  .st-card { padding:12px 14px; gap:9px; }
  .st-stats div { padding:6px 9px; }
  .st-stats dd { font-size:15px; }
  .st-fields { grid-template-columns:1fr; }
  .st-add-foot { flex-direction:column; align-items:stretch; }
  .st-submit { align-self:stretch; padding:10px 13px; }
  .st-card-foot { flex-wrap:wrap; }
  .st-open { flex:1; text-align:center; }
  .st-code { flex-direction:column; align-items:stretch; }
  .st-code button { padding:8px 11px; }
}

/* Note tags: chips, then a box that suggests tags already in use or creates a new one. */
.wr-tags { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; padding:10px 0 12px; border-bottom:1px solid var(--studio-line); cursor:text; }
.wr-tags-label { margin-right:4px; font-size:11.5px; font-weight:500; color:var(--studio-muted); }
.wr-tag-chips { display:contents; }
.wr-tag { display:inline-flex; align-items:center; gap:2px; padding:2px 3px 2px 9px; border:1px solid var(--studio-line); border-radius:999px; background:var(--studio-inset); color:var(--studio-ink); font-size:12px; font-weight:500; line-height:18px; cursor:default; }
.wr-tag button { display:grid; place-items:center; width:18px; height:18px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--studio-muted); cursor:pointer; }
.wr-tag button:hover,.wr-tag button:focus-visible { background:var(--studio-line); color:var(--studio-ink); }
.wr-tag button svg { width:11px; height:11px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
.wr-tag-input,[data-theme="dark"] .wr-tag-input { flex:1; min-width:110px; padding:3px 0; border:0 !important; background:transparent !important; box-shadow:none !important; font-size:12.5px; color:var(--studio-ink); outline:none; }
.wr-tag-input::placeholder { color:var(--studio-muted); }
.wr-tag-suggest { position:absolute; z-index:20; top:calc(100% + 4px); left:0; display:grid; gap:1px; min-width:240px; max-width:min(360px, 100%); max-height:280px; overflow:auto; padding:6px; border:1px solid var(--studio-line); border-radius:12px; background:var(--studio-card); box-shadow:0 12px 30px -12px #0003, 0 2px 6px #00000010; }
.wr-tag-suggest[hidden] { display:none; }
.wr-tag-suggest-label { padding:4px 8px 6px; font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--studio-muted); }
.wr-tag-option { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 9px; border:0; border-radius:8px; background:transparent; color:var(--studio-ink); font-size:12.5px; text-align:left; cursor:pointer; }
.wr-tag-option small { font-size:11px; color:var(--studio-muted); }
.wr-tag-option:hover,.wr-tag-option[aria-selected="true"] { background:var(--studio-inset); }
.wr-tag-option.create { color:var(--studio-muted); }
.wr-tag-option.create[aria-selected="true"],.wr-tag-option.create:hover { color:var(--studio-ink); }

/* Likely bots: a muted badge on the row and a notice above the visitor table. */
.visitor-badge.bot { border-color:var(--studio-line); color:var(--studio-muted); }
.bot-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:0 0 16px; padding:12px 14px; border:1px solid var(--studio-line); border-radius:8px; background:var(--studio-inset); }
.bot-notice[hidden] { display:none; }
.bot-notice p { margin:0; font-size:13px; flex:1 1 320px; }
/* Waiting lists (Minions) above the project requests: a compact grid that never hides a row or a button.
   Email | date | Remove on wide cards; under 440px the date and Remove sit on a second line. */
.waitlist-card { margin:0 0 12px; padding:10px 12px 6px; container-type:inline-size; }
.waitlist-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-bottom:4px; }
.waitlist-head .req-card-title { margin:0; }
.waitlist-head strong { font-size:12.5px; margin-right:auto; white-space:nowrap; }
.waitlist-list { list-style:none; margin:0; padding:0; }
.waitlist-list li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:2px 12px; padding:5px 0; border-top:1px solid var(--studio-line); font-size:12.5px; line-height:1.35; min-width:0; }
.waitlist-list li a { color:inherit; text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.waitlist-list li a:hover { text-decoration:underline; }
.waitlist-date { color:var(--studio-muted); font-size:11.5px; white-space:nowrap; }
.waitlist-remove,[data-theme="dark"] .waitlist-remove { padding:3px 7px; margin:0; font-size:11px; font-weight:600; border-radius:6px; border:1px solid transparent; background:none; color:var(--req-lost); box-shadow:none; text-transform:none; letter-spacing:0; white-space:nowrap; }
.waitlist-remove:hover,.waitlist-remove:focus-visible { border-color:var(--req-lost); background:var(--req-lost-bg); }
.waitlist-more,[data-theme="dark"] .waitlist-more { display:block; width:100%; margin:2px 0 0; padding:6px 0; border:0; border-top:1px solid var(--studio-line); border-radius:0; background:none; box-shadow:none; color:var(--studio-muted); font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0; text-align:center; }
.waitlist-more:hover { color:var(--studio-ink); }
@container (max-width:440px) {
  .waitlist-list li { grid-template-columns:minmax(0,1fr) auto; }
  .waitlist-list li a { grid-column:1 / -1; white-space:normal; overflow-wrap:anywhere; }
  .waitlist-date { grid-column:1; }
  .waitlist-remove { grid-column:2; justify-self:end; }
}
