/**
 * Vril Code design system — oxide teal on charcoal/slate, IBM Plex.
 * Themes via html[data-theme="light"|"dark"].
 */

:root,
[data-theme="dark"] {
  --vc-bg: #0e1214;
  --vc-bg-elevated: #161c1f;
  --vc-bg-muted: #1c2428;
  --vc-border: #2a353a;
  --vc-border-strong: #3a4a50;
  --vc-text: #e8eef0;
  --vc-text-muted: #8a9aa2;
  --vc-text-faint: #5c6d75;
  --vc-accent: #2a9d8f;
  --vc-accent-hover: #34b3a3;
  --vc-accent-soft: rgba(42, 157, 143, 0.14);
  --vc-danger: #e07a5f;
  --vc-ok: #52b788;
  --vc-hero-glow: rgba(42, 157, 143, 0.18);
  --vc-hero-mesh: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(42, 157, 143, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(58, 90, 100, 0.35), transparent 50%),
    linear-gradient(165deg, #0a0e10 0%, #12181b 45%, #0e1416 100%);
  --vc-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --vc-radius: 10px;
  --vc-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --vc-mono: "IBM Plex Mono", ui-monospace, monospace;
  --vc-header-h: 3.5rem;
  color-scheme: dark;
}

[data-theme="light"] {
  --vc-bg: #f4f7f6;
  --vc-bg-elevated: #ffffff;
  --vc-bg-muted: #e8eeec;
  --vc-border: #d0dbd7;
  --vc-border-strong: #b5c4bf;
  --vc-text: #152024;
  --vc-text-muted: #4a5c62;
  --vc-text-faint: #7a8c92;
  --vc-accent: #1f7a70;
  --vc-accent-hover: #18665e;
  --vc-accent-soft: rgba(31, 122, 112, 0.12);
  --vc-danger: #c45c45;
  --vc-ok: #2d6a4f;
  --vc-hero-glow: rgba(31, 122, 112, 0.12);
  --vc-hero-mesh: radial-gradient(ellipse 80% 60% at 70% 15%, rgba(31, 122, 112, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 85%, rgba(100, 130, 140, 0.12), transparent 50%),
    linear-gradient(165deg, #eef3f1 0%, #f7faf9 50%, #e8efec 100%);
  --vc-shadow: 0 12px 36px rgba(21, 32, 36, 0.08);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--vc-font);
  background: var(--vc-bg);
  color: var(--vc-text);
  line-height: 1.55;
}

a {
  color: var(--vc-accent);
  text-decoration: none;
}

a:hover {
  color: var(--vc-accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--vc-header-h);
  border-bottom: 1px solid var(--vc-border);
  background: color-mix(in srgb, var(--vc-bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--vc-text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--vc-text);
  text-decoration: none;
}

.brand__mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  background: var(--vc-accent);
  box-shadow: 0 0 0 3px var(--vc-accent-soft);
}

.brand__text {
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.site-nav__link {
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  color: var(--vc-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav__link:hover {
  color: var(--vc-text);
  background: var(--vc-accent-soft);
  text-decoration: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-chip {
  font-size: 0.85rem;
  color: var(--vc-text-muted);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--vc-border);
  border-radius: 8px;
  background: var(--vc-bg-elevated);
  cursor: pointer;
  position: relative;
  color: var(--vc-text);
}

.theme-toggle__icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle__icon--sun {
  background: radial-gradient(circle at center, #f0c75e 40%, transparent 42%),
    conic-gradient(from 0deg, #f0c75e, #f0c75e);
  box-shadow: 0 0 0 2px transparent;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: #e8b84a;
}

.theme-toggle__icon--moon {
  background: var(--vc-text-muted);
  border-radius: 50%;
  box-shadow: inset -0.25rem 0 0 0 var(--vc-bg-elevated);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.6);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
}

[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 1;
}

[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.6);
}

/* —— Main / footer —— */
.site-main {
  flex: 1;
  width: 100%;
}

.site-main:not(.site-main--bleed) {
  padding: 1.75rem 0 3rem;
}

.site-footer {
  border-top: 1px solid var(--vc-border);
  padding: 1.25rem 0;
  color: var(--vc-text-faint);
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--vc-font);
  font-weight: 560;
  font-size: 0.925rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--vc-accent);
  color: #041210;
  border-color: var(--vc-accent);
}

.btn--primary:hover {
  background: var(--vc-accent-hover);
  color: #041210;
}

[data-theme="light"] .btn--primary {
  color: #fff;
}

[data-theme="light"] .btn--primary:hover {
  color: #fff;
}

.btn--outline {
  background: transparent;
  border-color: var(--vc-border-strong);
  color: var(--vc-text);
}

.btn--outline:hover {
  border-color: var(--vc-accent);
  color: var(--vc-accent);
  background: var(--vc-accent-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--vc-text-muted);
  border-color: transparent;
}

.btn--ghost:hover {
  color: var(--vc-text);
  background: var(--vc-bg-muted);
}

.btn--sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn--danger {
  background: color-mix(in srgb, var(--vc-danger) 18%, transparent);
  color: var(--vc-danger);
  border-color: color-mix(in srgb, var(--vc-danger) 45%, var(--vc-border));
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--vc-danger) 28%, transparent);
  color: var(--vc-danger);
  border-color: var(--vc-danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.form-callout {
  padding: 0.85rem 1rem;
  border-radius: var(--vc-radius);
  border: 1px solid var(--vc-border);
  background: var(--vc-bg-muted);
  margin-bottom: 1.25rem;
}

.form-callout p {
  margin: 0;
  color: var(--vc-text-muted);
  font-size: 0.925rem;
}

.form-callout--danger {
  border-color: color-mix(in srgb, var(--vc-danger) 40%, var(--vc-border));
  background: color-mix(in srgb, var(--vc-danger) 10%, transparent);
}

.form-callout--danger p {
  color: var(--vc-danger);
}

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

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--vc-header-h) - 1px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  background: var(--vc-hero-mesh);
  z-index: -1;
  animation: heroPulse 14s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  from {
    filter: saturate(1) brightness(1);
  }
  to {
    filter: saturate(1.15) brightness(1.05);
  }
}

.hero__content {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  animation: heroRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__brand {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--vc-text);
}

.hero__headline {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  color: var(--vc-text-muted);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.hero__lede {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--vc-text-faint);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-strip {
  border-top: 1px solid var(--vc-border);
  background: var(--vc-bg-elevated);
  padding: 3rem 0;
}

.home-strip__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.home-strip__item h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home-strip__item p {
  margin: 0;
  color: var(--vc-text-muted);
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .home-strip__inner {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

/* —— Pages —— */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page--narrow {
  max-width: 640px;
}

.page-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.page-header__lede {
  margin: 0;
  color: var(--vc-text-muted);
}

.section {
  margin-bottom: 2.5rem;
}

.section__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.empty {
  color: var(--vc-text-muted);
  padding: 1.25rem;
  border: 1px dashed var(--vc-border);
  border-radius: var(--vc-radius);
}

/* —— Project list —— */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  background: var(--vc-bg-elevated);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--vc-accent);
  box-shadow: var(--vc-shadow);
  text-decoration: none;
  color: inherit;
}

.project-card__name {
  font-family: var(--vc-mono);
  font-size: 0.95rem;
  color: var(--vc-text-muted);
}

.project-card__name strong {
  color: var(--vc-text);
  font-weight: 600;
}

.project-card__meta {
  font-size: 0.8rem;
  color: var(--vc-text-faint);
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--vc-text-muted);
  margin-top: 0.25rem;
}

/* —— Auth —— */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  background: var(--vc-bg-elevated);
  box-shadow: var(--vc-shadow);
}

.auth-card--wide {
  max-width: 560px;
}

.auth-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.auth-card__lede {
  margin: 0 0 1.5rem;
  color: var(--vc-text-muted);
  font-size: 0.95rem;
}

.auth-card__foot {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--vc-text-muted);
  font-size: 0.9rem;
}

/* —— Forms —— */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--vc-text-muted);
}

.field__input {
  font-family: var(--vc-font);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg);
  color: var(--vc-text);
}

.field__input:focus {
  outline: 2px solid var(--vc-accent-soft);
  border-color: var(--vc-accent);
}

.field__input--area {
  resize: vertical;
  min-height: 5rem;
}

.field__hint {
  font-size: 0.8rem;
  color: var(--vc-text-faint);
}

.field__error,
.field-validation-valid,
.field-validation-error,
.validation-summary-errors,
.form-errors {
  font-size: 0.85rem;
  color: var(--vc-danger);
}

.field-validation-valid {
  display: none;
}

.field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--vc-text-muted);
}

.field--check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--vc-accent);
}

/* —— Dropzone —— */
.dropzone {
  position: relative;
}

.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.dropzone__surface {
  border: 1.5px dashed var(--vc-border-strong);
  border-radius: var(--vc-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  background: var(--vc-bg-muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-dragover .dropzone__surface,
.dropzone:hover .dropzone__surface {
  border-color: var(--vc-accent);
  background: var(--vc-accent-soft);
}

.dropzone__title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.dropzone__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--vc-text-faint);
}

.dropzone__file {
  margin: 0.75rem 0 0;
  font-family: var(--vc-mono);
  font-size: 0.85rem;
  color: var(--vc-accent);
}

/* —— Repo header —— */
.repo-header {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.repo-header__title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-family: var(--vc-mono);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.repo-header__slash {
  color: var(--vc-text-faint);
  margin: 0 0.15rem;
}

.repo-header__desc {
  margin: 0 0 0.5rem;
  color: var(--vc-text-muted);
}

.repo-header__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--vc-text-faint);
}

.repo-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--vc-mono);
  font-size: 0.9rem;
}

.breadcrumbs__sep {
  color: var(--vc-text-faint);
}

/* —— File table —— */
.file-table {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  overflow: hidden;
  background: var(--vc-bg-elevated);
}

.file-table li + li {
  border-top: 1px solid var(--vc-border);
}

.file-table__row {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  color: inherit;
  text-decoration: none;
}

.file-table__row:hover {
  background: var(--vc-accent-soft);
  text-decoration: none;
  color: inherit;
}

.file-table__icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  background: var(--vc-text-faint);
}

.file-table__icon[data-kind="dir"] {
  background: var(--vc-accent);
  opacity: 0.85;
}

.file-table__name {
  font-family: var(--vc-mono);
  font-size: 0.875rem;
}

.file-table__size {
  font-size: 0.8rem;
  color: var(--vc-text-faint);
  font-variant-numeric: tabular-nums;
}

/* —— Versions —— */
.version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.version-list__item {
  display: grid;
  grid-template-columns: minmax(3.25rem, auto) minmax(4.5rem, auto) minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--vc-border);
  border-radius: 8px;
  background: var(--vc-bg-elevated);
  font-size: 0.9rem;
}

.version-list__num {
  font-family: var(--vc-mono);
  font-weight: 500;
  white-space: nowrap;
}

.version-list__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vc-ok);
  background: color-mix(in srgb, var(--vc-ok) 16%, transparent);
  white-space: nowrap;
}

.version-list__status[data-status="failed"] {
  color: var(--vc-danger);
  background: color-mix(in srgb, var(--vc-danger) 16%, transparent);
}

.version-list__msg {
  color: var(--vc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.version-list__meta {
  color: var(--vc-text-faint);
  font-size: 0.8rem;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .version-list__item {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .version-list__status {
    justify-self: start;
  }

  .version-list__msg,
  .version-list__meta {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

/* —— Browse layout —— */
.page--browse {
  max-width: 1280px;
}

.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  min-height: 28rem;
  align-items: start;
}

@media (max-width: 900px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }
}

.browse-tree {
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  background: var(--vc-bg-elevated);
  padding: 0.65rem 0.4rem;
  max-height: 70vh;
  overflow: auto;
  position: sticky;
  top: calc(var(--vc-header-h) + 0.75rem);
}

.browse-main {
  min-width: 0;
}

/* —— File tree —— */
.tree {
  font-family: var(--vc-mono);
  font-size: 0.8rem;
}

.tree__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.65rem;
}

.tree > .tree__list {
  padding-left: 0;
}

.tree__item {
  position: relative;
}

.tree__item--dir > .tree__list {
  display: none;
}

.tree__item--dir.is-open > .tree__list {
  display: block;
}

.tree__twist {
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  padding: 0;
}

.tree__twist::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0.3rem auto 0;
  border-left: 0.3rem solid transparent;
  border-right: 0.3rem solid transparent;
  border-top: 0.35rem solid var(--vc-text-faint);
  transition: transform 0.15s ease;
}

.tree__item.is-open > .tree__twist::before {
  transform: rotate(0deg);
}

.tree__item:not(.is-open) > .tree__twist::before {
  transform: rotate(-90deg);
}

.tree__twist--spacer {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
}

.tree__link {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: var(--vc-text-muted);
  text-decoration: none;
  max-width: calc(100% - 1.4rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.tree__link:hover {
  color: var(--vc-text);
  background: var(--vc-accent-soft);
  text-decoration: none;
}

.tree__item.is-active > .tree__link {
  color: var(--vc-accent);
  background: var(--vc-accent-soft);
}

/* —— Code viewer —— */
.code-viewer {
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  background: var(--vc-bg-elevated);
  overflow: hidden;
}

.code-viewer__toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--vc-border);
  background: var(--vc-bg-muted);
}

.code-viewer__path {
  font-family: var(--vc-mono);
  font-size: 0.85rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-viewer__size {
  font-size: 0.8rem;
  color: var(--vc-text-faint);
}

.code-viewer__pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  max-height: 70vh;
  font-family: var(--vc-mono);
  font-size: 0.825rem;
  line-height: 1.55;
  tab-size: 2;
}

.code-viewer__pre code {
  font-family: inherit;
  white-space: pre;
  color: var(--vc-text);
}

.code-viewer__notice {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--vc-text-muted);
}

.code-viewer__notice p {
  margin: 0 0 1rem;
}

.code-editor {
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  background: var(--vc-bg-elevated);
  overflow: hidden;
}

.code-editor .code-viewer__toolbar {
  margin: 0;
  border-bottom: 1px solid var(--vc-border);
}

.code-editor__textarea {
  display: block;
  width: 100%;
  min-height: min(70vh, 42rem);
  margin: 0;
  padding: 1rem 1.1rem;
  border: 0;
  resize: vertical;
  background: var(--vc-bg);
  color: var(--vc-text);
  font-family: var(--vc-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  tab-size: 2;
}

.code-editor__textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--vc-accent) 45%, transparent);
}
