/* Original Chumanic workspace skin, inspired by Seko's charcoal and mint UI. */
html[data-studio] {
  color-scheme: dark;
  --studio-bg: #13191a;
  --studio-rail: #101617;
  --studio-surface: #1c2426;
  --studio-raised: #263033;
  --studio-input: #171f21;
  --studio-text: #edf5f3;
  --studio-muted: #a2b2b0;
  --studio-faint: #869995;
  --studio-border: #334244;
  --studio-strong: #516461;
  --studio-accent: #60ead2;
  --studio-selected: #203c37;
  --studio-inverse: #10211d;
  --studio-shadow: #090f10;
  --studio-purple: #b7b4ef;
  --studio-gold: #e9c584;
  --studio-up: #fa9aab;
  --studio-down: #70d3b8;
  --studio-font: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --studio-rail-width: 216px;
  --color-paper: var(--studio-bg);
  --color-surface: var(--studio-surface);
  --color-surface-raised: var(--studio-raised);
  --color-surface-interactive: var(--studio-selected);
  --color-surface-accent: var(--studio-selected);
  --color-ink: var(--studio-text);
  --color-muted: var(--studio-muted);
  --color-subtle: var(--studio-faint);
  --color-border: var(--studio-border);
  --color-border-strong: var(--studio-strong);
  --color-shadow: var(--studio-shadow);
  --color-accent: var(--studio-accent);
  --color-accent-strong: var(--studio-accent);
  --color-focus: var(--studio-accent);
  --color-electric: var(--studio-accent);
  --color-electric-soft: var(--studio-selected);
  --color-inverse: var(--studio-inverse);
  --color-success: var(--studio-down);
  --color-danger: var(--studio-up);
  --color-moon: var(--studio-muted);
  --color-moon-shadow: var(--studio-strong);
  --color-grid: var(--studio-border);
  --color-glow: var(--studio-accent);
  --motion-ambient-scale: 1.01;
  --motion-glow-opacity: 0.14;
  --font-sans: var(--studio-font);
  --font-display: var(--studio-font);
  --font-ui: var(--studio-font);
  --bg: var(--studio-bg);
  --surface: var(--studio-surface);
  --raised: var(--studio-raised);
  --input: var(--studio-input);
  --chart: var(--studio-input);
  --text: var(--studio-text);
  --muted: var(--studio-muted);
  --faint: var(--studio-faint);
  --border: var(--studio-border);
  --strong: var(--studio-strong);
  --grid: var(--studio-surface);
  --accent: var(--studio-accent);
  --teal: var(--studio-accent);
  --purple: var(--studio-purple);
  --gold: var(--studio-gold);
  --up: var(--studio-up);
  --down: var(--studio-down);
  --up-volume: #71424e;
  --down-volume: #2e6656;
  --area-top: #23483f;
  --area-bottom: var(--studio-input);
  --selected: var(--studio-selected);
  --inverse: var(--studio-inverse);
  --shadow: var(--studio-shadow);
  --font: var(--studio-font);
}
html[data-studio][data-theme='light'] {
  color-scheme: light;
  --studio-bg: #f3f7f5;
  --studio-rail: #eaf1ee;
  --studio-surface: #fbfdfc;
  --studio-raised: #e5eeea;
  --studio-input: #f0f5f2;
  --studio-text: #192d29;
  --studio-muted: #526c64;
  --studio-faint: #60796f;
  --studio-border: #d1ded7;
  --studio-strong: #8ea99c;
  --studio-accent: #146c5a;
  --studio-selected: #dceee5;
  --studio-inverse: #f4fcf8;
  --studio-shadow: #b8cec2;
  --studio-up: #b33a52;
  --studio-down: #18795e;
  --studio-gold: #836020;
  --studio-purple: #6f58a1;
  --up-volume: #edbfc9;
  --down-volume: #b5dfcd;
  --area-top: #cce5d8;
}
/* The blog uses a fixed white reading surface; terminal themes stay independent. */
html[data-studio='blog'][data-theme='light'] {
  color-scheme: light;
  --studio-bg: #ffffff;
  --studio-rail: #f5f8f6;
  --studio-surface: #ffffff;
  --studio-raised: #edf3ef;
  --studio-input: #f7faf8;
  --studio-text: #1f2c26;
  --studio-muted: #465d51;
  --studio-faint: #5c7064;
  --studio-border: #cbd8d0;
  --studio-strong: #7b9385;
  --studio-accent: #156548;
  --studio-selected: #e1f1e7;
  --studio-inverse: #ffffff;
  --studio-shadow: #a9bcb0;
  --studio-purple: #72519a;
  --studio-gold: #865c1c;
  --studio-up: #ae3150;
  --studio-down: #146a4c;
}
html[data-studio='blog'] .comment-section {
  --waline-theme-color: var(--studio-accent);
  --waline-active-color: var(--studio-text);
  --waline-color: var(--studio-text);
  --waline-bg-color: var(--studio-surface);
  --waline-bg-color-light: var(--studio-input);
  --waline-bg-color-hover: var(--studio-raised);
  --waline-border-color: var(--studio-border);
  --waline-light-grey: var(--studio-faint);
  --waline-dark-grey: var(--studio-muted);
  --waline-info-color: var(--studio-muted);
  --waline-info-bg-color: var(--studio-raised);
  --waline-disable-bg-color: var(--studio-raised);
  --waline-disable-color: var(--studio-faint);
  --waline-code-bg-color: var(--studio-input);
  --waline-bq-color: var(--studio-strong);
  --waline-white: var(--studio-inverse);
}
html[data-studio] body {
  background: var(--studio-bg);
  font-family: var(--studio-font);
}
html[data-studio] :where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 4px;
}
.studio-icon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
}
.studio-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.studio-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--studio-accent);
  color: var(--studio-inverse);
  font: 750 19px/1 var(--studio-font);
  letter-spacing: -0.05em;
}
.studio-nav-label {
  margin: 24px 12px 9px;
  font: 500 10px/1.6 var(--studio-font);
  color: var(--studio-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Navigation shell. */
html[data-studio='blog'] .site-shell {
  margin-inline-start: var(--studio-rail-width);
}
html[data-studio='blog'] .site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  width: var(--studio-rail-width);
  height: 100dvh;
  border: 0;
  border-right: 1px solid var(--studio-border);
  background: var(--studio-rail);
  padding: 26px 16px 18px;
  overflow-y: auto;
}
html[data-studio='blog'] .header-inner {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
  padding: 0;
  width: 100%;
}
html[data-studio='blog'] .site-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.035em;
  color: var(--studio-text);
  text-decoration: none;
  text-transform: none;
  padding: 0 7px;
}
html[data-studio='blog'] .site-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: visible;
  padding: 0;
}
html[data-studio='blog'] .site-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--studio-muted);
  font: 500 13px/1.4 var(--studio-font);
  text-decoration: none;
  white-space: nowrap;
}
html[data-studio] :is(.site-nav, #navigation) a[aria-current='page'] {
  color: var(--studio-accent);
  background: var(--studio-selected);
  border-color: color-mix(in srgb, var(--studio-accent) 16%, transparent);
}
html[data-studio] :is(.site-nav, #navigation) a:hover {
  background: var(--studio-raised);
  color: var(--studio-text);
}
.studio-agent-card {
  margin-top: 24px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--studio-text);
  font-size: 13px;
}
.studio-agent-card small {
  display: block;
  color: var(--studio-faint);
  font-size: 10px;
  margin-top: 3px;
}
.studio-agent-card .studio-icon {
  color: var(--studio-accent);
}
.studio-agent-card:hover {
  border-color: var(--studio-accent);
  background: var(--studio-surface);
}
.studio-private-entry {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--studio-border);
}
.studio-private-label,
.studio-private-hint {
  margin: 0 12px 8px;
  color: var(--studio-faint);
  font-size: 11px;
}
.studio-private-hint {
  margin-top: 8px;
  margin-bottom: 0;
}
.studio-freshrss-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: var(--studio-surface);
  color: var(--studio-text);
  text-decoration: none;
}
.studio-freshrss-copy {
  flex: 1;
  min-width: 0;
}
.studio-freshrss-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.studio-freshrss-copy small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--studio-muted);
}
.studio-new-window {
  color: var(--studio-muted);
  font-size: 18px;
}
.studio-freshrss-link:hover {
  border-color: var(--studio-accent);
  background: var(--studio-selected);
}
.studio-freshrss-link:focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 3px;
}
/* Collection and reading surfaces. */
html[data-studio='blog'] {
  font-size: 16px;
  --content-width: 1240px;
  --reading-width: 760px;
  --anchor-offset: 32px;
}
html[data-studio='blog'] .page-main {
  padding: 40px clamp(20px, 4vw, 56px) 64px;
  min-height: calc(100vh - 140px);
}
html[data-studio='blog'] .site-container {
  max-width: 1360px;
}
html[data-studio='blog'] .page-header {
  padding-block: 6px 26px;
  gap: 10px;
}
html[data-studio='blog'] .page-header h1 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.045em;
  line-height: 1.25;
}
html[data-studio='blog'][data-page-mode='reading'] h1 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.4;
  letter-spacing: -0.035em;
}
html[data-studio='blog'][data-page-mode='reading'] .page-intro {
  font-size: 15px;
  line-height: 1.9;
}
html[data-studio='blog'][data-page-mode='reading'] .article-page {
  gap: 32px;
}
html[data-studio='blog'] :is(.eyebrow, .card-eyebrow) {
  color: var(--studio-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
html[data-studio='blog']
  :is(
    .content-card,
    .search-panel,
    .search-result-card,
    .empty-state,
    .reader-card
  ) {
  border: 1px solid var(--studio-border);
  background: var(--studio-surface);
  border-radius: 16px;
  box-shadow: none;
}
html[data-studio='blog'] .content-card {
  padding: 24px;
  transition:
    border-color 160ms,
    background-color 160ms;
}
html[data-studio='blog'] .content-card:hover {
  transform: none;
  border-color: var(--studio-strong);
  background: var(--studio-raised);
  box-shadow: none;
}
html[data-studio='blog'] .content-card h2 {
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.025em;
}
html[data-studio='blog'] .card-summary {
  font-size: 14px;
  line-height: 1.85;
}
html[data-studio='blog'] .card-grid {
  gap: 18px;
}
html[data-studio='blog'] :is(button, input, select) {
  font-family: var(--studio-font);
  border-radius: 10px;
}
html[data-studio='blog'] .filter-bar {
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
html[data-studio='blog'] .filter-bar button {
  border: 1px solid var(--studio-border);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 18px;
  background: var(--studio-surface);
  font-size: 13px;
}
html[data-studio='blog'] .filter-bar button[aria-pressed='true'] {
  color: var(--studio-inverse);
  background: var(--studio-accent);
  border-color: var(--studio-accent);
}
.search-guidance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 13px;
}
.search-guidance a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--studio-border);
  border-radius: 9px;
  text-decoration: none;
}
html[data-studio='blog'] .prose {
  font-size: 16px;
  line-height: 1.95;
}
html[data-studio='blog'] .prose h2 {
  margin-top: 2.4em;
  font-size: 24px;
  letter-spacing: -0.025em;
}
html[data-studio='blog'] .prose pre {
  background: var(--studio-rail);
  color: var(--studio-text);
  border-radius: 14px;
  border: 1px solid var(--studio-border);
}
html[data-studio='blog'] .prose blockquote {
  border-left: 3px solid var(--studio-accent);
  background: var(--studio-surface);
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
}
html[data-studio='blog'] .site-footer {
  background: var(--studio-bg);
  border-color: var(--studio-border);
  padding: 22px 32px;
  color: var(--studio-faint);
  font-size: 12px;
}
html[data-studio='blog'] .skip-link {
  z-index: 60;
}
/* The home page is a content workspace, using only the site's actual records. */
/* Trading layout keeps the existing chart and control lifecycle intact. */
@media (max-width: 1200px) {
  html[data-studio] {
    --studio-rail-width: 190px;
  }
}
@media (max-width: 720px) {
  html[data-studio='blog'] .site-shell {
    margin-left: 0;
  }
  html[data-studio='blog'] .site-header {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--studio-border);
    overflow: visible;
  }
  html[data-studio='blog'] .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px 10px;
  }
  html[data-studio='blog'] .site-name {
    padding: 0;
    font-size: 18px;
  }
  .studio-nav-label {
    display: none;
  }
  html[data-studio='blog'] .site-nav {
    grid-column: 1/-1;
    grid-row: 2;
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
  }
  html[data-studio='blog'] .site-nav a {
    min-width: max-content;
    padding: 10px 12px;
    min-height: 44px;
    font-size: 12px;
    gap: 7px;
  }
  html[data-studio='blog'] .studio-agent-card {
    margin: 0;
    padding: 9px 11px;
    min-height: 44px;
    font-size: 12px;
    grid-row: 1;
    grid-column: 2;
  }
  .studio-agent-card small {
    display: none;
  }
  .studio-private-entry {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0;
    padding-top: 12px;
  }
  .studio-private-label {
    display: none;
  }
  .studio-private-hint {
    margin: 6px 12px 0;
  }
  html[data-studio='blog'] .page-main {
    padding: 24px 16px 40px;
  }
  html[data-studio='blog'] .site-footer {
    padding-inline: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-studio] * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
