/* Shared finish for the existing interface. Inter is served with the site. */
:root {
  --font-body: "Inter Variable", Inter, system-ui, sans-serif;
  --shadow-resting: 0 1px 2px #0002, inset 0 1px #ffffff04;
  --shadow-raised: 0 8px 24px -16px #0009, inset 0 1px #ffffff06;
  --shadow-floating: 0 14px 40px -12px #0009, 0 2px 8px #0004;
  --radius-control: 10px;
  --radius-panel: 14px;
  --ch-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18 9s-4.4189 6-6 6-6-6-6-6' stroke='%23a8a8a8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] {
  --border: #303030;
  --border-subtle: #262626;
  --border-strong: #4a4a4a;
}
body { font-family: var(--font-body); }
button, input, select, textarea { font-family: var(--font-body); }
:is(.ch-app-page, .ch-team-page, .ch-team-card, .vps-setup) :is(button, input, select, textarea),
.ch-app-button, .ch-app-sidebar {
  font-family: var(--font-body);
}
:is(.ch-app-page, .ch-team-page, .ch-team-card) :is(h1, h2, h3),
.ch-app-source > strong { font-family: var(--font-body); }
.ch-app-page h1 { font-weight: 600; letter-spacing: -.035em; }
.ch-app-page h2 { font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.ch-app-page :is(p, small) { line-height: 1.65; }
.ch-app-page :is(textarea, pre, code), .ch-app-log-box, .ch-app-log-line {
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

/* Softer outlines and a small amount of depth, without changing the layout. */
:is(.ch-app-panel, .ch-team-card, .ch-metric, .ch-resource, .ch-app-chart, .ch-app-project, .vps-setup) {
  border-color: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-resting);
}
.ch-app-panel { background: #1b1b1b; padding: 24px; }
.ch-app-create { gap: 24px; }
.ch-app-create > .ch-app-panel + .ch-app-panel { margin-top: 0; }
.ch-app-section-head { margin-bottom: 24px; gap: 12px; }
.ch-app-section-head > svg { margin-top: 2px; width: 20px; height: 20px; }
.ch-app-section-head p { font-size: 13px; }
.ch-app-button { font-size: 13px; font-weight: 500; min-height: 38px; border-radius: 10px; }
.ch-app-button:not(.primary):not(.danger):not(.ch-app-sidebar) { border-color: #3a3a3a; }
.ch-app-button:not(.primary):not(.danger):hover:not(:disabled) { background-color: #ffffff08; border-color: #505050; }
.ch-app-button.primary { box-shadow: 0 1px 2px #0002; }
.ch-app-page .ch-app-button.primary {
  color: #fff;
  background: var(--blue, #2879ed);
  border-color: var(--blue, #2879ed);
  box-shadow: var(--shadow-resting);
}
.ch-app-page .ch-app-button.primary:hover:not(:disabled) {
  background: var(--blue-hover, #3687f6);
  border-color: var(--blue-hover, #3687f6);
  opacity: 1;
}
.ch-app-field { font-size: 13px; gap: 9px; }
.ch-app-fields { gap: 20px; }
:is(.ch-app-field input, .ch-app-field select, .ch-app-field textarea, .ch-app-page select, .ch-app-env, .ch-gh-search, .ch-team-input, .vps-setup input, .vps-setup select) {
  border: 1px solid #353535;
  border-radius: 10px;
  background-color: #121212;
  color: #e6e6e6;
  font-size: 13px;
  line-height: 1.5;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.ch-app-field :is(input, select) { min-height: 42px; padding: 10px 12px; }
.ch-app-field :is(input, textarea)::placeholder { color: #858585; opacity: 1; }
.ch-app-field :is(input, select, textarea):hover:not(:disabled) { border-color: #484848; }
.ch-app-field :is(input, select, textarea):focus, .ch-app-env:focus, .ch-gh-search:focus-within {
  border-color: var(--blue, #2879ed);
  box-shadow: 0 0 0 3px #2879ed18;
  outline: none;
}
.ch-app-toggle { padding: 20px 0; }
.ch-app-toggle strong { font-size: 14px; font-weight: 500; }
.ch-app-toggle small, .ch-app-hint { font-size: 12px !important; }
.ch-app-note { border-radius: 10px; font-size: 13px; }
.ch-app-config-note { background: #2879ed0c; border-color: #2879ed44; color: #aacafa; }
.ch-app-source { border-color: #333; box-shadow: var(--shadow-resting); }
.ch-app-source > .ch-app-source-description { font-size: 13px; color: #aaa; }
.ch-app-source-footer > small { font-size: 12px; color: #939393; }
.ch-app-source-action { font-size: 12px; }
.ch-app-source-number { font-size: 11px; }
.ch-app-source-icon { border-radius: 14px; }
.ch-app-source-icon svg { width: 24px; height: 24px; }
.ch-app-readiness p, .ch-app-readiness strong { font-size: 13px; }
.ch-app-readiness-action { font-size: 12px; }
.ch-app-tabs .ch-app-button { font-size: 13px; }
.ch-app-console-toolbar .ch-app-button { font-size: 12px; }
.ch-app-log-box { font-size: 12px; line-height: 1.75; }
.ch-app-summary code, .ch-app-summary-top code { font-size: 11px; }
.ch-app-metrics small, .ch-app-chart small { font-size: 11px; }
.ch-gh-source .ch-app-button { font-size: 12px; }
.ch-gh-account small, .ch-gh-selected small, .ch-gh-selected div > span,
.ch-gh-options .ch-app-field small, .ch-gh-repo small { font-size: 12px; }
.ch-gh-selected strong { font-size: 14px; }
.ch-gh-text-button.ch-app-button { font-size: 12px; }
.ch-app-page svg:not(.ch-app-chart svg), .ch-profile-menu svg { shape-rendering: geometricPrecision; }

/* Keep native select/summary semantics and keyboard support; use vector chevrons. */
select:not([multiple]):not([size]), select[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--ch-chevron);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 38px !important;
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}
summary::marker, summary::-webkit-details-marker { display: none; content: ""; }
summary::after {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: var(--ch-chevron) center / contain no-repeat;
  transition: transform 180ms ease;
}
details[open] > summary::after { transform: rotate(180deg); }
summary:focus-visible { outline: 2px solid #999; outline-offset: 4px; border-radius: 4px; }
.ch-app-advanced summary, .ch-billing-details summary { font-size: 13px; }
@media (forced-colors: active) {
  summary::after { background: CanvasText; mask: var(--ch-chevron) center / contain no-repeat; }
  select:not([multiple]):not([size]), select[size="1"] { appearance: auto; background-image: none; }
}

/* Choose an entry file directly from the ZIP, without losing its relative path. */
.ch-app-file { min-height: 270px; background: #141414; border-color: #303030; border-radius: 12px; }
.ch-app-file > svg { width: 44px; height: 44px; color: #b8b8b8; }
.ch-app-file-browser { margin-top: 14px; }
.ch-app-file-search {
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1px solid #323232; border-radius: 9px; background: #151515; color: #929292;
}
.ch-app-file-search > svg { width: 16px; height: 16px; }
.ch-app-file-search input {
  width: 100%; min-width: 0; min-height: 36px; border: 0; background: transparent;
  color: #ddd; font-size: 12px; outline: none;
}
.ch-app-file-search:focus-within { border-color: #898989; box-shadow: 0 0 0 3px #ffffff0b; }
.ch-app-file-help { margin: 10px 0 8px; font-size: 12px !important; color: #929292; }
.ch-app-file-explorer { min-width: 0; border: 1px solid #303030; border-radius: 10px; background: #141414; overflow: hidden; }
.ch-app-file-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #ffffff08; }
.ch-app-file-toolbar > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: #bcbcbc; font: 500 11px/1.5 var(--font-body); }
.ch-app-file-toolbar small { color: #7a7a7a; font-size: 10px; font-weight: 400; }
.ch-app-file-collapse { flex: none; padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: #aaa; font: 11px/1.5 var(--font-body); cursor: pointer; }
.ch-app-file-collapse:hover:not(:disabled) { background: #ffffff08; color: #eee; }
.ch-app-file-collapse:disabled { opacity: .4; cursor: default; }
.ch-app-file-tree { height: 280px; margin: 0; padding: 6px; border: 0; border-radius: 0; background: transparent; overflow: auto; list-style: none; scrollbar-width: thin; scrollbar-color: #494949 transparent; }
.ch-app-file-tree li { display: block; padding: 0; margin: 1px 0; min-height: 0; }
.ch-app-file-tree .ch-app-file-children { list-style: none; margin: 2px 0 3px 15px; padding: 0 0 0 8px; border-left: 1px solid #ffffff0b; }
.ch-app-file-children[hidden] { display: none; }
.ch-app-file-entry, .ch-app-file-static, .ch-app-folder-toggle {
  box-sizing: border-box; min-width: 0; width: 100%; display: flex; align-items: center; gap: 7px; padding: 7px 8px;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: #b4b4b4; font: 12px/1.5 var(--font-body); text-align: left;
}
.ch-app-file-entry, .ch-app-file-static { padding-left: 29px; }
.ch-app-folder-toggle { color: #d2d2d2; cursor: pointer; }
.ch-app-file-tree svg { width: 16px; height: 16px; flex: none; color: #929292; }
.ch-app-file-tree .ch-app-file-name { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
.ch-app-folder-chevron { display: flex; flex: none; width: 14px; color: #8b8b8b; transition: transform .18s ease; }
.ch-app-folder-chevron > svg { width: 14px; height: 14px; }
.ch-app-folder-toggle[aria-expanded="true"] .ch-app-folder-chevron { transform: rotate(90deg); }
.ch-app-folder-toggle > svg { color: #b3b3b3; }
.ch-app-file-entry > small { display: flex; flex: none; align-items: center; gap: 4px; margin-left: auto; color: #bbb; font-size: 10px; white-space: nowrap; }
.ch-app-file-entry > small svg { width: 13px; height: 13px; color: inherit; }
.ch-app-file-entry.is-selected > small, .ch-app-file-entry.is-selected svg { color: #90bfff; }
.ch-app-file-entry:hover:not(:disabled), .ch-app-folder-toggle:hover:not(:disabled) { background: #ffffff07; color: #eee; }
.ch-app-file-entry.is-selected { background: #16345e; border-color: var(--blue, #2879ed); color: #e3efff; }
.ch-app-file-entry:focus-visible, .ch-app-folder-toggle:focus-visible, .ch-app-file-collapse:focus-visible, .ch-app-file-more:focus-visible { outline: 2px solid #999; outline-offset: -2px; }
.ch-app-file-entry:disabled, .ch-app-folder-toggle:disabled { cursor: not-allowed; opacity: .6; }
.ch-app-file-static { color: #818181; }
.ch-app-file-tree .ch-app-file-empty { padding: 18px 12px; font: 12px/1.5 var(--font-body); }
.ch-app-file-more { margin: 4px 0; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: #ffffff04; color: #b0b0b0; font: 11px/1.5 var(--font-body); cursor: pointer; }
.ch-app-file-more:hover:not(:disabled) { background: #ffffff09; }
.ch-app-file-selection { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #353535; border-radius: 8px; background: #ffffff03; font-size: 11px !important; color: #999 !important; overflow-wrap: anywhere; }
.ch-app-file-selection svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: #bbb; }
.ch-app-file-selection strong { display: block; margin-top: 2px; color: #d1d1d1; font: 500 11px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 480px) { .ch-app-file-toolbar { padding: 8px; gap: 5px; } .ch-app-file-tree { height: 260px; } .ch-app-file-tree .ch-app-file-children { margin-left: 10px; padding-left: 5px; } }
@media (prefers-reduced-motion: reduce) { .ch-app-folder-chevron { transition: none; } }

/* Profile uses the same accessible menu and curved SVG as the workspace. */
.ch-profile-menu-trigger.profile-button {
  display: flex; gap: 10px; align-items: center; min-height: 64px; padding: 12px 8px 8px;
  border: 0; border-top: 1px solid #292929; border-radius: 0;
  background: transparent; box-shadow: none;
}
.ch-profile-menu-trigger.profile-button:hover,
.ch-profile-menu-trigger.profile-button[data-state="open"] { background: #ffffff04; border-top-color: #353535; box-shadow: none; }
.ch-profile-menu-trigger > [class*="_label_"] { flex: 1; width: auto !important; min-width: 0; }
.ch-profile-copy { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.ch-profile-copy strong { font-weight: 550; font-size: 13px; }
.ch-profile-copy small { color: #929292; font-size: 12px; }
.ch-profile-menu-trigger > svg { width: 13px; height: 13px; color: #919191; margin-left: auto; }
.ch-profile-menu { width: var(--radix-dropdown-menu-trigger-width, 240px); min-width: 220px; padding: 6px; border-radius: 12px; box-shadow: var(--shadow-floating); }
.ch-profile-menu [role="menuitem"] { min-height: 39px; font-size: 13px; gap: 10px; }

@media (max-width: 620px) {
  .ch-app-panel { padding: 18px; }
  .ch-app-console { padding: 0; }
  .ch-app-create { gap: 18px; }
  .ch-app-fields { gap: 16px; }
  .ch-app-field :is(input, select, textarea), .ch-gh-search input, .ch-app-file-search input { font-size: 16px; }
  .ch-app-file { min-height: 210px; }
  .ch-app-tabs .ch-app-button { font-size: 12px; }
  .ch-app-log-box { font-size: 11px; }
  .ch-app-file-entry, .ch-app-file-static { padding: 9px 7px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  summary::after, .ch-app-field :is(input, select, textarea), .ch-app-env { transition: none; }
}

/* Free application offer: a quiet strip above the landing header. */
.ch-free-offer{min-height:44px;padding:10px 24px;display:flex;align-items:center;justify-content:center;gap:26px;background:#151515;color:#fff;border-bottom:1px solid #ffffff0d;font-size:12px;line-height:1.5}
.ch-free-offer-copy{display:flex;align-items:center;gap:10px}.ch-free-offer svg{flex-shrink:0;color:#fff}.ch-free-offer strong{font-weight:650}
.ch-free-offer button{display:inline-flex;align-items:center;gap:8px;background:none;border:0;border-bottom:1px solid #ffffff40;padding:2px 0;color:#fff;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}.ch-free-offer button:hover{border-color:#fff}.ch-free-offer button:focus-visible{outline:2px solid #fff;outline-offset:5px}
.ch-app-free-callout{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px!important}
@media(max-width:540px){.ch-free-offer{padding:10px 16px;gap:8px;flex-wrap:wrap;text-align:center;font-size:11px}.ch-free-offer-copy{gap:7px}.ch-app-free-callout{align-items:flex-start;flex-direction:column}}

/* Blue scrollbar thumbs follow the site's action color; keep each scroller's sizing. */
:root, *, .ch-app-file-tree, .ch-gh-repos {
  scrollbar-color: var(--blue, #2879ed) transparent;
}
*::-webkit-scrollbar-thumb { background-color: var(--blue, #2879ed); }
*::-webkit-scrollbar-thumb:hover { background-color: var(--blue-hover, #3687f6); }
@media (forced-colors: active) {
  :root, *, .ch-app-file-tree, .ch-gh-repos { scrollbar-color: auto; }
  *::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb:hover { background-color: revert; }
}

/* Gray panels follow the server summary: a solid surface, without a pale frame. */
:is(.ch-app-panel,.ch-team-card:not(.ch-billing-card),.ch-metric,.ch-resource,.ch-app-chart,.ch-app-project,.vps-setup,.ch-app-source,.resource-row-card,.principle-card,.ch-bot-card,.ch-bot-purchase,.ch-bot-plan,.ch-bot-contract,.ch-bot-empty,.ch-gh-connect,.ch-gh-selected,.ch-gh-repos,.ch-aside-plan-card,.ch-aside-resource-list,.ch-aside-storage-links,.ch-aside-empty,.ch-admin-panel,.ch-admin-tile,.ch-admin-node,.ch-servers-overview,.ch-servers-empty,.ch-servers-loading,.ch-server-card:not([data-kind="vps"])) {
  border-color: transparent;
  box-shadow: none;
}
:is(.ch-app-panel,.ch-team-card:not(.ch-billing-card),.ch-metric,.ch-resource,.ch-app-chart,.ch-app-project,.vps-setup,.ch-app-source,.ch-aside-plan-card,.ch-aside-resource-list,.ch-aside-storage-links) {
  background: var(--card, #232323);
}
.ch-bot-offer-featured { border-color: transparent; box-shadow: none; }
.ch-app-source:is(:hover,.is-pointer-tilt),.ch-resource:is(:hover,:focus-within),.ch-app-project:hover { border-color: transparent; }
@media (forced-colors: active) {
  :is(.ch-app-panel,.ch-team-card,.ch-metric,.ch-resource,.ch-app-chart,.ch-app-project,.vps-setup,.ch-app-source,.resource-row-card,.ch-aside-plan-card,.ch-aside-resource-list,.ch-aside-storage-links,.ch-bot-offer-featured) { border-color: CanvasText; }
}
