/*
 * This is a manifest file that'll be compiled into application.css.
 */

/* ========================================
   Buildory Design System
   ======================================== */

:root {
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.18);
  --visibility-public: #078c78;
  --visibility-public-soft: rgba(7, 140, 120, 0.11);
  --visibility-public-line: rgba(7, 140, 120, 0.34);
  --visibility-private: #7557c7;
  --visibility-private-soft: rgba(117, 87, 199, 0.11);
  --visibility-private-line: rgba(117, 87, 199, 0.34);
}

html[data-mode="dark"],
html:not([data-mode="light"]) {
  --bg: #0c0e11;
  --bg-1: #111418;
  --bg-2: #161a20;
  --bg-3: #1d2229;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-hard: rgba(255, 255, 255, 0.22);
  --text: #e8eaee;
  --text-2: #a4adb9;
  --text-3: #6c7480;
  --text-4: #4a5260;
  --grid: rgba(255, 255, 255, 0.035);
  --grid-strong: rgba(255, 255, 255, 0.06);
  --shine: rgba(255, 255, 255, 0.04);
}

html[data-mode="light"] {
  --bg: #f4f3ee;
  --bg-1: #ebe9e2;
  --bg-2: #ffffff;
  --bg-3: #faf8f3;
  --line: rgba(15, 18, 23, 0.08);
  --line-strong: rgba(15, 18, 23, 0.16);
  --line-hard: rgba(15, 18, 23, 0.28);
  --text: #14181d;
  --text-2: #4a5260;
  --text-3: #6c7480;
  --text-4: #98a0ac;
  --grid: rgba(15, 18, 23, 0.045);
  --grid-strong: rgba(15, 18, 23, 0.08);
  --shine: rgba(0, 0, 0, 0.02);
}

/* App shell — applied to all pages */
.bry-shell {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
}

/* Marketing page body */
.marketing-page {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.marketing-page h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.marketing-page h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.marketing-page h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}
.marketing-page p { line-height: 1.55; }
.marketing-page ::selection { background: var(--accent); color: #1a0d05; }

/* ChatGPT integration page — deliberately calmer than the main marketing hero. */
.chatgpt-hero { padding: 64px 0 72px; }
.chatgpt-hero-content { max-width: 760px; }
.marketing-page .chatgpt-hero-title {
  max-width: 720px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.chatgpt-hero-intro {
  max-width: 660px;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.6;
}
.marketing-page .marketing-home-hero-title {
  font-size: clamp(36px, 3.5vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.marketing-home-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 920px;
  margin-top: 42px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-1) 88%, transparent);
}
.marketing-home-highlight {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  min-height: 108px;
  padding: 18px;
  border-right: 1px dashed var(--line-strong);
}
.marketing-home-highlight:last-child { border-right: 0; }
.marketing-home-highlight-number {
  padding-top: 2px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .12em;
}
.marketing-home-highlight strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}
.marketing-home-highlight span:not(.marketing-home-highlight-number) {
  display: block;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
}
@media (max-width: 760px) {
  .marketing-home-highlights { grid-template-columns: 1fr; }
  .marketing-home-highlight {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px dashed var(--line-strong);
  }
  .marketing-home-highlight:last-child { border-bottom: 0; }
}

/* Utilities */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-feature-settings: "ss02", "ss03";
}

.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
}

.plate {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  position: relative;
}
.plate::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--shine), transparent 30%);
  border-radius: inherit;
  pointer-events: none;
}

.rivet {
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6a7280 0%, #2b3038 60%, #0a0c10 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 1px 1px rgba(255,255,255,.05);
  flex: 0 0 6px;
  display: inline-block;
}
html[data-mode="light"] .rivet {
  background: radial-gradient(circle at 30% 30%, #c9c5b8 0%, #6a6558 60%, #3a3530 100%);
}

.crosshair { position: relative; }
.crosshair::before, .crosshair::after,
.crosshair > .ch-tl, .crosshair > .ch-tr {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1px solid var(--line-hard);
  pointer-events: none;
}
.crosshair::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.crosshair::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.crosshair > .ch-tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.crosshair > .ch-tl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }

/* Design buttons (bry- prefix to avoid DaisyUI conflicts) */
.bry-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 6px; font-weight: 600; font-size: 14px; line-height: 1;
  letter-spacing: -0.005em; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: all .15s ease; font-family: inherit;
  white-space: nowrap;
}
.bry-btn-primary {
  background: var(--accent); color: #1a0d05 !important;
  border-color: color-mix(in oklab, var(--accent), black 20%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2) inset,
              0 1px 0 rgba(255,255,255,0.18) inset,
              0 4px 14px var(--accent-glow);
}
.bry-btn-primary:hover {
  transform: translateY(-1px); filter: brightness(1.05);
  color: #1a0d05; text-decoration: none;
}
.bry-btn-ghost {
  background: var(--bg-2); color: var(--text);
  border-color: var(--line-strong);
}
.bry-btn-ghost:hover {
  border-color: var(--line-hard); background: var(--bg-3);
  color: var(--text); text-decoration: none;
}
.bry-btn-sm {
  height: 36px; padding: 0 14px; font-size: 13px;
}

/* Tag pill */
.bry-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  font: 500 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-2); border: 1px solid var(--line-strong);
  border-radius: 4px; background: var(--bg-2);
}
.bry-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  flex: 0 0 6px;
}

/* Project visibility language */
.project-visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 999px;
  font: 700 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .035em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.project-visibility-badge svg { flex: 0 0 16px; }
.project-visibility-badge--public {
  color: var(--visibility-public);
  border-color: var(--visibility-public-line);
  background: color-mix(in oklab, var(--bg-2) 88%, var(--visibility-public) 12%);
}
.project-visibility-badge--private {
  color: var(--visibility-private);
  border-color: var(--visibility-private-line);
  background: color-mix(in oklab, var(--bg-2) 88%, var(--visibility-private) 12%);
}
.project-visibility-badge--compact {
  min-height: 23px;
  padding: 0 8px;
  font-size: 9px;
  text-transform: uppercase;
  box-shadow: none;
}

.section-label {
  font: 500 11px/1 'JetBrains Mono', monospace;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3);
}

/* Container */
.bry-container { max-width: 1600px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .bry-container { padding: 0 20px; } }

/* App nav */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.app-nav-inner {
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 24px;
}

.app-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.app-nav-brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.app-nav-env {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: #dc2626;
  color: white;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.buildory-tip-dropdown { position: relative; }
.buildory-tip-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 9px; list-style: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 4px;
  background: var(--bg-2); color: var(--text-3);
  font-size: 12px; font-weight: 600;
}
.buildory-tip-trigger::-webkit-details-marker { display: none; }
.buildory-tip-trigger:hover, .buildory-tip-dropdown[open] .buildory-tip-trigger { color: var(--text); border-color: var(--accent); }
.buildory-tip-trigger-count {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font: 700 9px/1 'JetBrains Mono', monospace;
}
.buildory-tip-panel {
  z-index: 70; top: calc(100% + 8px); right: 0; width: min(370px, calc(100vw - 24px));
  padding: 18px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--bg-1); box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.buildory-tip-eyebrow { display: flex; justify-content: space-between; gap: 10px; color: var(--text-4); font: 600 9px/1 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
.buildory-tip-plan { color: var(--accent); }
.buildory-tip-panel h2 { margin: 10px 0 0; color: var(--text); font-size: 17px; line-height: 1.25; }
.buildory-tip-panel p { margin: 7px 0 16px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.buildory-tip-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.buildory-tip-actions form { display: inline; margin: 0; }
.buildory-tip-text-action { padding: 3px 0; border: 0; background: transparent; color: var(--text-4); font-size: 11px; cursor: pointer; }
.buildory-tip-text-action:hover { color: var(--text-2); text-decoration: underline; }

.app-nav-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.app-nav-switcher-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.app-nav-switcher-label > span:first-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav-switcher-meta {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
}

.app-nav-project-switcher {
  max-width: min(320px, 100%);
  overflow: hidden;
  gap: 8px;
}
.app-nav-project-switcher--public { border-color: var(--visibility-public-line); }
.app-nav-project-switcher--private { border-color: var(--visibility-private-line); }
.app-nav-project-switcher-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.app-nav-project-switcher--public .app-nav-project-switcher-icon { color: var(--visibility-public); }
.app-nav-project-switcher--private .app-nav-project-switcher-icon { color: var(--visibility-private); }
.app-nav-project-switcher-copy,
.app-nav-project-option-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.app-nav-project-switcher-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav-project-switcher-meta {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
}
.app-nav-project-menu {
  max-height: min(420px, calc(100vh - 84px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.app-nav-project-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 10px !important;
  border-left: 2px solid transparent;
}
.app-nav-project-option--public:hover { border-left-color: var(--visibility-public); }
.app-nav-project-option--private:hover { border-left-color: var(--visibility-private); }
.app-nav-project-option-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.app-nav-project-option--public .app-nav-project-option-icon,
.app-nav-project-option--public .app-nav-project-option-meta { color: var(--visibility-public); }
.app-nav-project-option--private .app-nav-project-option-icon,
.app-nav-project-option--private .app-nav-project-option-meta { color: var(--visibility-private); }
.app-nav-project-option-title {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav-project-option-meta {
  margin-top: 3px;
  font: 600 9px/1 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.app-nav-workspace-dropdown { z-index: 101; }
.app-nav-dropdown-menu {
  width: min(420px, calc(100vw - 32px)) !important;
  max-height: min(320px, calc(100vh - 84px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.app-nav-workspace-option { display:flex !important; align-items:baseline; gap:12px; padding:9px 10px !important; }
.app-nav-workspace-name { flex:1; color:var(--text); font-size:13.5px; font-weight:600; }
.app-nav-workspace-meta { flex:0 0 auto; color:var(--text-3); font-size:11px; white-space:nowrap; }

.app-nav-locale {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}

.app-nav-theme-form {
  display: flex;
}

.app-nav-theme-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-2);
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}

.app-nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-nav-avatar-image,
.app-nav-avatar-fallback {
  width: 34px;
  height: 34px;
}

.app-nav-avatar-image {
  object-fit: cover;
}

.app-nav-avatar-fallback {
  background: var(--accent);
  color: #1a0d05;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .app-nav-inner {
    min-height: unset;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .app-nav-center {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-nav-center::-webkit-scrollbar {
    display: none;
  }

  .app-nav-switcher,
  .app-nav-project-switcher {
    flex: 0 0 auto;
  }

  .app-nav-right {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .app-nav-inner {
    gap: 12px;
  }

  .app-nav-brand-name {
    font-size: 16px;
  }

  .app-nav-locale {
    max-width: 124px;
    overflow: hidden;
    white-space: nowrap;
  }

  .buildory-tip-trigger-label { display: none; }
}

/* Project show hero */
.project-back-link-wrap {
  margin-bottom: 16px;
}

.project-back-link {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .04em;
}

.project-show-shell {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
}
.project-show-shell--public {
  border-top: 3px solid var(--visibility-public);
  background: linear-gradient(145deg, var(--visibility-public-soft), var(--bg-1) 32%);
}
.project-show-shell--private {
  border-top: 3px solid var(--visibility-private);
  background: linear-gradient(145deg, var(--visibility-private-soft), var(--bg-1) 32%);
}
.project-show-shell--public > .mono:first-of-type {
  background: color-mix(in oklab, var(--bg-2) 91%, var(--visibility-public) 9%) !important;
}
.project-show-shell--private > .mono:first-of-type {
  background: color-mix(in oklab, var(--bg-2) 91%, var(--visibility-private) 9%) !important;
}

.project-show-body {
  padding: 24px;
}

.project-hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 1100px) {
  .project-hero-split {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  }
}

.project-hero-media {
  height: clamp(240px, 34vw, 420px);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
}

.project-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-hero-media-empty {
  border-style: dashed;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.project-hero-empty-label {
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--text-4);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-hero-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.project-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.project-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.project-visibility-context {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 0 16px;
  padding: 9px 11px;
  border: 1px solid;
  border-radius: 6px;
}
.project-visibility-context--public {
  color: var(--visibility-public);
  border-color: var(--visibility-public-line);
  background: var(--visibility-public-soft);
}
.project-visibility-context--private {
  color: var(--visibility-private);
  border-color: var(--visibility-private-line);
  background: var(--visibility-private-soft);
}
.project-visibility-context-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.project-visibility-context strong,
.project-visibility-context span { display: block; }
.project-visibility-context strong {
  font-size: 12px;
  line-height: 1.25;
}
.project-visibility-context span {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.35;
}

.project-hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.15;
}

.project-hero-description {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
  margin: 0;
}

.project-hero-description-empty {
  color: var(--text-4);
}

.project-hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: var(--line-strong);
}

@media (min-width: 640px) {
  .project-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-hero-stat {
  padding: 16px;
  background: var(--bg-1);
}

.project-hero-stat-label {
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.project-hero-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Public project detail uses the same visual language as the owner view. */
.public-project-filebar {
  padding: 9px 16px;
  border-bottom: 1px dashed var(--line-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-2);
}

.public-project-filebar-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-3);
  line-height: 1;
}

.public-project-filebar-meta > span { display: inline-flex; align-items: center; }
.public-project-filebar-label { font-size: 9px; color: var(--text-2); letter-spacing: .13em; }
.public-project-filebar-title { font-size: 11px; color: var(--text); font-weight: 600; letter-spacing: .04em; }
.public-project-filebar-status { font-size: 9px; color: var(--accent); letter-spacing: .1em; }

.public-project-maker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-3);
  font-size: 12px;
}

.public-content-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.public-content-count { margin-top: 4px; color: var(--text-4); font-size: 10px; }
.public-content-empty { padding: 24px; color: var(--text-3); font-size: 13px; text-align: center; }
.public-project-sections { margin-top: 28px; }
.public-project-footer { margin: 48px 0 8px; color: var(--text-3); font-size: 12px; text-align: center; }
.public-section-page { width: 100%; }

.public-todo-list { margin: 24px 0 28px; }
.public-todo-items { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-1); }
.public-todo-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.public-todo-item + .public-todo-item { border-top: 1px dashed var(--line); }
.public-todo-dot { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 9px; border-radius: 999px; background: var(--text-4); }
.public-todo-dot--in_progress { background: var(--accent); }
.public-todo-dot--blocked { background: #ef4444; }
.public-todo-dot--completed { background: #22c55e; }
.public-todo-dot--cancelled { background: var(--text-4); }
.public-todo-image-link { flex: 0 0 auto; padding: 0; border: 0; background: none; }
.public-todo-image { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 4px; }
.public-todo-copy { min-width: 0; flex: 1; }
.public-todo-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.public-todo-title { color: var(--text); font-size: 14px; font-weight: 600; }
.public-todo-title--completed { color: var(--text-4); text-decoration: line-through; }
.public-todo-copy p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.todo-priority--high { color: #f87171; border-color: rgba(248, 113, 113, .25); background: rgba(248, 113, 113, .08); }
.todo-priority--normal { color: #f59e0b; border-color: rgba(245, 158, 11, .25); background: rgba(245, 158, 11, .08); }
.todo-priority--low { color: #60a5fa; border-color: rgba(96, 165, 250, .25); background: rgba(96, 165, 250, .08); }
.todo-due--completed { color: var(--text-4); }
.todo-due--due { color: #ef4444; }
.todo-due--soon { color: #f59e0b; }
.todo-due--later { color: #22c55e; }

/* Projects index */
.project-card {
  border: 1px solid var(--line-strong);
  border-top-width: 3px;
}
.project-card--public {
  border-top-color: var(--visibility-public);
  background: linear-gradient(165deg, var(--visibility-public-soft), var(--bg-2) 28%);
}
.project-card--private {
  border-top-color: var(--visibility-private);
  background: linear-gradient(165deg, var(--visibility-private-soft), var(--bg-2) 28%);
}
.project-card-visibility {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 12px;
}
.project-card--has-cover .project-card-visibility .project-visibility-badge {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
}
.project-card:not(.project-card--has-cover) .card-body { padding-top: 56px; }
.projects-index-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.projects-index-title {
  font-size: 1.875rem;
  line-height: 1;
  font-weight: 700;
  margin: 0;
}

.projects-index-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.projects-index-action-link,
.projects-index-new-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .projects-index-header {
    align-items: flex-start;
  }

  .projects-index-title {
    font-size: 1.35rem;
    line-height: 1.05;
    max-width: 130px;
  }

  .projects-index-actions {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }

  .projects-index-action-link {
    font-size: 12px;
    padding-inline: 10px;
  }

  .projects-index-new-btn {
    font-size: 12px;
    padding-inline: 10px;
  }
}

/* Section photo uploads */
.section-photo-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1100px) {
  .section-photo-upload-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: start;
  }
}

.mobile-upload-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-upload-disclosure {
  display: block;
}

.mobile-upload-disclosure-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}

.mobile-upload-disclosure-toggle::-webkit-details-marker {
  display: none;
}

.mobile-upload-disclosure[open] .mobile-upload-disclosure-toggle {
  border-color: var(--line-hard);
}

.mobile-upload-disclosure-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.photo-caption-editor {
  margin-top: 8px;
}

.photo-caption-editor-float {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.group:hover .photo-caption-editor-float,
.photo-caption-editor-float[open] {
  opacity: 1;
}

.photo-caption-editor-icon {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 18, 23, 0.12);
  color: #111111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.photo-caption-editor-icon::-webkit-details-marker {
  display: none;
}

.photo-caption-editor-panel {
  margin-top: 10px;
  width: min(280px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.mobile-upload-qr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  min-height: 224px;
  text-align: center;
  box-sizing: border-box;
}

.mobile-upload-qr-art {
  width: min(100%, 224px);
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 0;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.mobile-upload-qr-art svg {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.mobile-upload-current-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-1);
  box-sizing: border-box;
}

.mobile-upload-current-image-tag {
  display: block;
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
}

.photo-lightbox {
  z-index: 9999;
  background: rgba(0, 0, 0, .9);
  color: #ffffff;
}

.photo-lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 76px 40px;
  pointer-events: none;
}

.photo-lightbox-viewport {
  pointer-events: auto;
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
}

.photo-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(90vw, 1600px);
  max-height: calc(100vh - 150px);
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .7);
}

.photo-lightbox-close,
.photo-lightbox-nav {
  position: fixed;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(15, 18, 23, .7);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.photo-lightbox-close { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 44px; height: 44px; font-size: 26px; line-height: 1; }
.photo-lightbox-nav { top: 50%; width: 48px; height: 64px; transform: translateY(-50%); font-size: 42px; line-height: 1; }
.photo-lightbox-nav--previous { left: 16px; }
.photo-lightbox-nav--next { right: 16px; }
.photo-lightbox-close:hover,
.photo-lightbox-nav:hover { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .18); }

.photo-lightbox-caption { max-width: min(800px, 85vw); margin: 12px 0 0; color: rgba(255, 255, 255, .78); font-size: 13px; text-align: center; }
.photo-lightbox-footer { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 24px; margin-top: 8px; }
.photo-lightbox-counter,
.photo-lightbox-full-link { color: rgba(255, 255, 255, .55); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .06em; }
.photo-lightbox-full-link { text-decoration: none; }
.photo-lightbox-full-link:hover { color: rgba(255, 255, 255, .85); }

@media (max-width: 640px) {
  .photo-lightbox-stage { padding: 64px 12px 84px; }
  .photo-lightbox-image { max-width: calc(100vw - 24px); max-height: calc(100vh - 190px); }
  .photo-lightbox-nav { top: auto; bottom: 16px; width: 52px; height: 48px; transform: none; }
  .photo-lightbox-nav--previous { left: calc(50% - 62px); }
  .photo-lightbox-nav--next { right: calc(50% - 62px); }
  .photo-lightbox-footer { margin-bottom: 4px; }
}

.section-card-shell {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.section-card-open-link {
  position: absolute;
  inset: 0 72px 0 0;
  z-index: 2;
}

.section-card-open-link--full { inset: 0; }
.section-card-shell--no-stats .section-card-layout { grid-template-columns: minmax(0, 1fr); }

.section-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.project-storage-compact {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--text-4);
  font-size: 9px;
  letter-spacing: .06em;
}

.project-storage-compact strong { color: var(--text-3); font-weight: 600; }
.crosshair .project-storage-compact { margin-top: 0; }
.project-storage-compact-track { width: 48px; height: 2px; overflow: hidden; border-radius: 2px; background: var(--line-strong); }
.project-storage-compact-track span { display: block; height: 100%; min-width: 1px; background: var(--accent); }

.starter-preview-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.starter-preview-heading h2 { margin:7px 0 4px; }
.starter-preview-heading p { margin:0; color:var(--text-3); }
.starter-preview-heading .starter-preview-category { margin-top:8px; font-size:12px; font-weight:600; color:var(--text-2); }
.starter-preview-summary { flex:0 0 auto; margin-top:8px; padding:6px 8px; border:1px solid var(--line-strong); border-radius:999px; color:var(--text-3); font:10px/1 "JetBrains Mono", monospace; }
.starter-tree { margin:20px 0; padding:0; list-style:none; border:1px solid var(--line-strong); border-radius:6px; overflow:hidden; }
.starter-tree ul { margin:8px 0 0 21px; padding:0; list-style:none; border-left:1px dashed var(--line-strong); }
.starter-tree-node { padding:12px; border-top:1px dashed var(--line-strong); }
.starter-tree > .starter-tree-node:first-child { border-top:0; }
.starter-tree-row { display:flex; gap:9px; align-items:center; }
.starter-tree-title { flex:1; min-width:0; border:0; border-bottom:1px solid transparent; background:transparent; color:var(--text); font:600 14px/1.3 Inter,sans-serif; }
.starter-tree-title:focus { outline:0; border-color:var(--accent); }
.starter-tree-node p { margin:5px 0 0 25px; color:var(--text-3); font-size:12px; }
.starter-task-list { margin-left:25px !important; border-left:0 !important; color:var(--text-2); font-size:12px; }
.starter-task-list li { margin-top:4px; }.starter-task-list li::before { content:"✓"; color:var(--accent); margin-right:6px; }
.starter-preview-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.starter-cover-preview { margin-top:18px; }.starter-cover-preview .section-label { margin-bottom:7px; }.starter-cover-preview img { display:block; width:100%; max-height:300px; object-fit:cover; border:1px solid var(--line-strong); border-radius:6px; }
.starter-cover-option { display:flex; gap:10px; align-items:flex-start; margin-top:14px; padding:11px 12px; border:1px solid var(--line-strong); border-radius:6px; background:var(--bg-2); }.project-resource-form .starter-cover-option input.starter-cover-option-checkbox { flex:0 0 auto; width:17px; height:17px; margin:2px 0 0; padding:0; accent-color:var(--accent); }.starter-cover-option-label { display:block; color:var(--text-2) !important; font-weight:600; cursor:pointer; }.starter-cover-option p { margin:3px 0 0; color:var(--text-3); font-size:11px; line-height:1.4; }
.project-ai-assist { display:grid; gap:9px; padding:14px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--bg-2); }
.project-ai-assist label { display:flex; gap:8px; align-items:center; color:var(--text-2); font-size:13px; }.project-ai-assist label:has(textarea) { display:grid; gap:5px; align-items:initial; }.project-ai-assist p { margin:0; color:var(--text-3); font-size:12px; }.project-ai-assist textarea { width:100%; padding:8px; border:1px solid var(--line-strong); border-radius:4px; background:var(--bg-1); color:var(--text); }
.project-money-settings { display:grid; gap:10px; padding:14px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--bg-2); }
.project-money-settings legend { padding:0 6px; color:var(--text); font-size:13px; font-weight:700; }
.project-money-rate { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:8px; }
.project-money-rate span { color:var(--text-3); font-size:13px; }
.project-money-check { display:flex; align-items:flex-start; gap:9px; color:var(--text-2); font-size:13px; }
.project-money-check input { margin-top:3px; }
.project-money-check span { display:grid; gap:2px; }
.project-money-check small { color:var(--text-3); font-size:11px; font-weight:400; }
@media (max-width: 640px) { .starter-preview-heading { flex-direction:column; gap:4px; }.starter-preview-summary { margin-top:0; } }

@media (min-width: 640px) {
  .section-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
  }
}

.section-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  grid-template-rows: 126px minmax(92px, 1fr);
  min-height: 218px;
  height: 100%;
}

.section-card-media {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 126px;
  display: block;
}

.section-card-image,
.section-card-image-fallback {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  display: block;
}

.section-card-image-fallback {
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card-level-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--accent);
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 107, 53, .2);
  border-radius: 3px;
  padding: 2px 6px;
}

.section-card-copy {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.section-card-copy {
  padding: 16px 16px 12px;
}

.section-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.section-card-description {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.section-card-stats {
  grid-column: 2;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  border-left: 1px dashed var(--line-strong);
  position: relative;
  z-index: 1;
}

.section-card-stat {
  flex: 1;
  min-height: 0;
  padding: 4px;
  text-align: center;
  border-left: 0 !important;
}

.section-card-stat + .section-card-stat { border-top: 1px dashed var(--line-strong); }

.section-card-stat-link {
  display: flex;
  flex-direction: row;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding-left: 15px;
  color: var(--text-3);
  text-decoration: none;
}

.section-card-stat-link:hover { color: var(--accent); }
.section-card-stat-icon { width: 17px; height: 17px; flex: 0 0 17px; }

.section-card-stat-value {
  font-size: 12px;
  font-weight: 600;
}

.section-card-actions {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 3;
  pointer-events: none;
}
.section-card-actions a { pointer-events: auto; }

@media (max-width: 720px) {
  .section-card-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .section-card-media,
  .section-card-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .section-card-stats {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    min-height: 48px;
    border-top: 1px dashed var(--line-strong);
    border-left: 0;
  }

  .section-card-stat + .section-card-stat {
    border-top: 0;
    border-left: 1px dashed var(--line-strong) !important;
  }

  .section-card-stat-link { justify-content: center; padding-left: 0; }

  .section-card-open-link { inset: 0 0 48px; }
  .section-card-open-link--full { inset: 0; }

  .section-card-image,
  .section-card-image-fallback {
    min-height: 150px;
  }
}

.mobile-upload-qr-fallback {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-3);
}

@media (max-width: 760px) {
  .marketing-ai-grid,
  .chatgpt-setup-grid {
    grid-template-columns: 1fr !important;
  }

  .marketing-ai-intro {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
}

.mobile-upload-link-block {
  min-width: 0;
}

.mobile-upload-link {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-size: 12px;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .02em;
}

/* Mobile photo upload page */
.mobile-photo-upload-page {
  display: flex;
  justify-content: center;
  padding: 8px 0 32px;
}

.mobile-photo-upload-shell {
  width: 100%;
  max-width: 560px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 20px;
}

.mobile-photo-upload-kicker {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.mobile-photo-upload-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: 700;
}

.mobile-photo-upload-body {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}

.mobile-photo-upload-context {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-2);
}

.mobile-photo-upload-context-label {
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.mobile-photo-upload-context-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.mobile-photo-upload-form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-photo-upload-help {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

.mobile-photo-upload-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Mockup window */
.mockup-shell {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.3),
    0 50px 100px -20px rgba(0,0,0,0.55),
    0 30px 60px -30px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
html[data-mode="light"] .mockup-shell {
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 30px 80px -20px rgba(15,18,23,0.18),
    0 20px 40px -20px rgba(15,18,23,0.12);
}

/* Scan-line texture */
.scan {
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    var(--shine) 2px, var(--shine) 3px
  );
}

/* Hover lift */
.lift { transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.lift:hover { transform: translateY(-2px); border-color: var(--line-hard); }

/* App section tab bar */
.bry-tabs {
  display: flex; border-bottom: 1px solid var(--line-strong); gap: 0;
  margin-bottom: 24px; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none;
}
.bry-tabs::-webkit-scrollbar { display: none; }
.bry-tab {
  padding: 10px 16px; font-size: 10.5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  color: var(--text-3); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.bry-tab:hover { color: var(--text-2); text-decoration: none; }
.bry-tab.bry-tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.bry-tab.bry-tab-has-items { color: var(--text-2); font-weight: 700; }
.bry-tab.bry-tab-has-items .bry-tab-count { color: var(--text-2); font-weight: 700; }
.bry-tab-count {
  font-size: 9px; font-family: 'JetBrains Mono', monospace;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: 3px; padding: 1px 5px; color: var(--text-3);
}
.bry-tab-active .bry-tab-count { background: rgba(255,107,53,.15); border-color: rgba(255,107,53,.3); color: var(--accent); }

/* BOM status badges */
.bom-table { min-width: 820px; }
.bom-table-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 60px 90px 90px 110px 104px 86px;
  gap: 0;
}
.bom-table-status { min-width: 0; padding-right: 10px; }
.bom-table-status .bry-status { max-width: 100%; white-space: nowrap; }
.bom-table-actions {
  min-width: 86px; display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: nowrap; gap: 4px;
}
.bom-table-actions form { display: flex; margin: 0; }
.bry-status { display: inline-block; padding: 2px 7px; border-radius: 3px; border: 1px solid; font-size: 9.5px; font-family: 'JetBrains Mono', monospace; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.bry-status-received  { color: #4ade80; border-color: #4ade8030; background: #4ade8010; }
.bry-status-in_stock  { color: #4ade80; border-color: #4ade8030; background: #4ade8010; }
.bry-status-ordered   { color: #fbbf24; border-color: #fbbf2430; background: #fbbf2410; }
.bry-status-low_stock { color: #f87171; border-color: #f8717130; background: #f8717110; }
.bry-status-planned   { color: var(--text-3); border-color: var(--line); background: var(--bg-2); }

/* Task list metadata */
.todo-list .bry-tab { padding-top: 11px; padding-bottom: 11px; font-size: 11.5px; }
.todo-list .bry-tab-count { font-size: 9.5px; }
.todo-list .bry-status { font-size: 10.5px; padding: 3px 7px; }
.todo-list .bry-tag { height: 24px; font-size: 11px; }
.todo-add-link { min-height:0; height:auto; padding:4px 0; border:0; background:transparent; box-shadow:none; color:var(--text-3); }.todo-add-link:hover { color:var(--accent); background:transparent; }
.photo-sort-item[draggable="true"] { cursor:grab; }.photo-sort-item.is-dragging { opacity:.45; }.photo-sort-handle, .photo-first-badge { position:absolute; z-index:2; top:6px; border:1px solid var(--line-strong); border-radius:4px; background:var(--bg-1); color:var(--text-3); font:600 10px/1 "JetBrains Mono", monospace; }.photo-sort-handle { left:6px; padding:4px 6px; cursor:grab; }.photo-first-badge { left:30px; padding:4px 6px; color:var(--accent); border-color:rgba(255,107,53,.35); background:rgba(255,107,53,.1); }
.todo-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.todo-filter-all,
.todo-filter-dropdown summary {
  display: inline-flex; align-items: center; height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--bg-2); color: var(--text-3);
  font: 500 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .07em; text-transform: uppercase; cursor: pointer;
}
.todo-filter-all:hover,
.todo-filter-dropdown summary:hover { color: var(--text); border-color: var(--line-hard); text-decoration: none; }
.todo-filter-all.todo-filter-active { color: var(--accent); border-color: rgba(255,107,53,.45); background: rgba(255,107,53,.09); }
.todo-filter-dropdown { position: relative; }
.todo-filter-dropdown summary { list-style: none; gap: 7px; }
.todo-filter-dropdown summary::-webkit-details-marker { display: none; }
.todo-filter-dropdown summary::after { content: "⌄"; font-size: 14px; line-height: 1; color: var(--text-4); }
.todo-filter-dropdown.todo-filter-selected summary { color: var(--accent); border-color: rgba(255,107,53,.45); background: rgba(255,107,53,.09); }
.todo-filter-dropdown[open] summary { color: var(--text); border-color: var(--accent); }
.todo-filter-dropdown.todo-filter-selected[open] summary { color: var(--accent); }
.todo-filter-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  min-width: 205px; padding: 7px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg-2); box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.todo-filter-menu label {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  color: var(--text-2); cursor: pointer;
  font: 500 11px/1 'JetBrains Mono', monospace; text-transform: uppercase;
}
.todo-filter-menu label:hover { background: var(--bg-3); }
.todo-filter-menu input { accent-color: var(--accent); }
.todo-filter-menu small { margin-left: auto; color: var(--text-4); font-size: 10px; }
.todo-filter-apply {
  width: 100%; height: 31px; margin-top: 5px; border: 1px solid rgba(255,107,53,.45);
  border-radius: 4px; background: rgba(255,107,53,.1); color: var(--accent);
  font: 600 10px/1 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase;
}
.todo-sort-form select {
  height: 34px; padding: 0 30px 0 11px; border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--bg-2); color: var(--text-3);
  font: 500 10.5px/1 'JetBrains Mono', monospace; letter-spacing: .07em; text-transform: uppercase;
}
.todo-sort-form select:hover,
.todo-sort-form select:focus { border-color: var(--line-hard); color: var(--text); outline: none; }
.todo-priority {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border: 1px solid; border-radius: 999px;
  font: 600 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .07em;
}
.todo-due {
  font: 500 11px/1 'JetBrains Mono', monospace;
  letter-spacing: .02em;
}

/* Project search */
.project-search-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-search-form input[type="search"] {
  flex: 1 1 360px; height: 36px; min-width: 220px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--bg-2); color: var(--text); font-size: 13px;
}
.project-search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }
.project-search-scope { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; cursor: pointer; white-space: nowrap; }
.project-search-scope input { accent-color: var(--accent); }
.project-search-form-compact { justify-content: flex-end; }
.project-search-form-compact input[type="search"] { flex: 0 1 380px; }
.project-search-results { margin: 22px 0; }
.project-search-results .section-label span { color: var(--text-4); }
.project-search-result {
  display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px;
  border-top: 1px dashed var(--line); color: inherit; text-decoration: none;
}
.project-search-result:hover { background: var(--bg-2); text-decoration: none; }
.project-search-result-title { color: var(--text); font-size: 13px; font-weight: 600; }
.project-search-result-excerpt { margin-top: 3px; color: var(--text-3); font-size: 12px; }
.project-search-result-context { flex: 0 0 auto; color: var(--text-4); font: 10px/1.4 'JetBrains Mono', monospace; text-align: right; }
.cockpit-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }
.cockpit-card { display:block; padding:16px; border:1px solid var(--line-strong); border-left:3px solid var(--text-4); border-radius:6px; background:var(--bg-1); color:var(--text); }
.cockpit-critical { border-left-color:#ef4444; }.cockpit-attention { border-left-color:#f59e0b; }.cockpit-healthy { border-left-color:#22c55e; }
.cockpit-new { border-left-color:#60a5fa; }
.cockpit-status { flex:0 0 auto; color:var(--text-3); font:10px/1.15 'JetBrains Mono',monospace; letter-spacing:.07em; text-align:right; }
.cockpit-metrics { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; color:var(--text-3); font:10px/1 'JetBrains Mono',monospace; }
.cockpit-reason { min-height:20px; margin:9px 0 0; color:var(--text-3); font-size:12px; line-height:1.35; }.cockpit-action { display:inline-block; margin-top:14px; color:var(--accent); font-size:12px; font-weight:600; text-decoration:none; }.cockpit-action:hover { text-decoration:underline; }
.notification-row { display:grid; grid-template-columns:180px 1fr auto; gap:14px; align-items:center; padding:14px; border-top:1px dashed var(--line); color:var(--text-3); text-decoration:none; }.notification-row:hover { background:var(--bg-2); text-decoration:none; }.notification-row strong { color:var(--text); }.notification-row small { color:var(--text-4); }.notification-unread { border-left:3px solid var(--accent); background:rgba(255,107,53,.05); }
.ai-check-spinner { display:inline-block; width:12px; height:12px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:ai-check-spin .7s linear infinite; vertical-align:-2px; }
.ai-project-check summary { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; }.ai-project-check summary::-webkit-details-marker { display:none; }.ai-project-check summary::after { content:"›"; color:var(--accent); font-size:19px; line-height:1; transition:transform .15s ease; }.ai-project-check[open] summary::after { transform:rotate(90deg); }.ai-project-check-toggle { color:var(--text-4); font-size:11px; }.ai-project-check-content { margin-top:8px; }
.ai-project-check-launcher { margin-left:8px; }.ai-project-check-count { display:inline-grid; place-items:center; min-width:17px; height:17px; margin-left:6px; padding:0 4px; border-radius:999px; background:var(--accent); color:#fff; font:600 10px/1 'JetBrains Mono',monospace; }.ai-project-check-modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:20px 22px 15px; border-bottom:1px solid var(--line); }.ai-project-check-modal-header p { margin:5px 0 0; color:var(--text-3); font-size:12px; }.ai-project-check-modal-body { padding:18px 22px 22px; }.ai-project-check-history { margin-top:18px; border-top:1px dashed var(--line-strong); }.ai-project-check-history-item { padding:15px 0; border-bottom:1px dashed var(--line); }.ai-project-check-history-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--text-4); font:10px/1 'JetBrains Mono',monospace; }.ai-project-check-history-item p { margin:8px 0; color:var(--text-2); font-size:13px; line-height:1.45; }.ai-project-check-history-item ol { margin:0; padding-left:18px; color:var(--text-3); font-size:12px; line-height:1.45; }.ai-project-check-empty { margin:18px 0 0; color:var(--text-3); font-size:13px; }

/* Project workspace and linked external resources */
.project-workspace-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-end; margin-bottom:18px; }.project-workspace-header h1 { margin:5px 0 0; }.project-workspace-layout { display:grid; grid-template-columns:minmax(220px, .7fr) minmax(0, 2fr); gap:16px; align-items:start; }.project-workspace-tree { position:sticky; top:76px; max-height:calc(100vh - 96px); overflow:auto; padding:10px; }.project-workspace-tree-heading { display:flex; justify-content:space-between; padding:5px 6px 10px; color:var(--text-3); border-bottom:1px dashed var(--line-strong); font:10px/1 'JetBrains Mono',monospace; letter-spacing:.1em; text-transform:uppercase; }.project-workspace-tree-branch { margin:4px 0; padding:0 0 0 14px; list-style:none; }.project-workspace-tree-branch:first-child { padding-left:0; }.project-workspace-tree-branch li { margin:2px 0; }.project-workspace-tree-branch details > summary { cursor:pointer; list-style:none; }.project-workspace-tree-branch details > summary::-webkit-details-marker { display:none; }.project-workspace-tree-branch details > summary::before { content:"›"; display:inline-block; width:12px; color:var(--text-4); transition:transform .12s ease; }.project-workspace-tree-branch details[open] > summary::before { transform:rotate(90deg); }.project-workspace-tree-row { display:inline-flex; align-items:center; gap:7px; width:calc(100% - 14px); }.project-workspace-tree-row a { flex:1; min-width:0; padding:6px; border-radius:4px; overflow:hidden; color:var(--text-2); font-size:12px; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }.project-workspace-tree-row a:hover, .project-workspace-tree-row a.is-selected { background:var(--bg-3); color:var(--text); }.project-workspace-tree-row a.is-selected { box-shadow:inset 2px 0 0 var(--accent); }.project-workspace-tree-row small { color:var(--text-4); font:10px/1 'JetBrains Mono',monospace; }.project-workspace-detail { min-width:0; padding:20px; }.project-workspace-breadcrumb { display:flex; flex-wrap:wrap; gap:6px; color:var(--text-4); font-size:11px; }.project-workspace-breadcrumb a { color:var(--text-3); text-decoration:none; }.project-workspace-breadcrumb a.is-current { color:var(--text); font-weight:600; }.project-workspace-detail-header { display:flex; justify-content:space-between; gap:16px; align-items:start; margin-top:12px; }.project-workspace-detail-header h2 { margin:0; font-size:24px; }.project-workspace-detail-header p, .project-workspace-resources-header p { margin:6px 0 0; color:var(--text-3); font-size:13px; }.project-workspace-actions, .project-workspace-manage { display:flex; gap:6px; flex-wrap:wrap; }.project-workspace-manage { margin:18px 0; padding:10px 0; border-top:1px dashed var(--line-strong); border-bottom:1px dashed var(--line-strong); }.project-workspace-move-form { display:flex; gap:6px; }.bry-select { min-height:32px; max-width:280px; padding:0 8px; border:1px solid var(--line-strong); border-radius:4px; background:var(--bg-2); color:var(--text-2); font-size:12px; }.project-workspace-children { margin:20px 0; }.project-workspace-child { display:inline-block; margin:8px 8px 0 0; padding:7px 9px; border:1px solid var(--line-strong); border-radius:4px; color:var(--text-2); font-size:12px; text-decoration:none; }.project-workspace-child:hover { background:var(--bg-2); color:var(--text); }.project-workspace-resources-header { margin-top:24px; }.project-resource-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:10px; margin-top:14px; }.project-resource-card { padding:14px; border:1px solid var(--line-strong); border-radius:5px; background:var(--bg-2); }.project-resource-card-meta { display:flex; justify-content:space-between; gap:8px; color:var(--text-4); font:10px/1 'JetBrains Mono',monospace; letter-spacing:.07em; text-transform:uppercase; }.project-resource-card h3 { margin:10px 0 0; font-size:14px; }.project-resource-card p { min-height:34px; margin:6px 0 12px; color:var(--text-3); font-size:12px; line-height:1.45; }.project-resource-card-footer { display:flex; justify-content:space-between; align-items:end; gap:10px; color:var(--text-4); font-size:10px; }.project-resource-card-footer > div { display:flex; gap:4px; }.project-resource-add { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }.project-resource-add details { border:1px dashed var(--line-strong); border-radius:5px; padding:11px; }.project-resource-add summary { cursor:pointer; color:var(--accent); font-size:12px; font-weight:600; }.project-resource-form { display:grid; gap:9px; margin-top:12px; }.project-resource-form input, .project-resource-form textarea { width:100%; padding:8px 9px; border:1px solid var(--line-strong); border-radius:4px; background:var(--bg-1); color:var(--text); font:12px/1.35 Inter, sans-serif; }.project-resource-form label { color:var(--text-3); font-size:12px; }.project-workspace-empty { padding:24px 8px; color:var(--text-3); font-size:13px; }.project-workspace-empty h2 { color:var(--text); }
@media (max-width: 760px) { .project-workspace-layout { grid-template-columns:1fr; }.project-workspace-tree { position:static; max-height:260px; }.project-workspace-header, .project-workspace-detail-header { align-items:flex-start; flex-direction:column; }.project-resource-add { grid-template-columns:1fr; }.project-resource-card-footer { align-items:flex-start; flex-direction:column; } }
@keyframes ai-check-spin { to { transform:rotate(360deg); } }
@media (max-width: 720px) {
  .project-search-form-compact { justify-content: flex-start; }
  .project-search-result { display: block; }
  .project-search-result-context { margin-top: 6px; text-align: left; }
}

/* Sidebar tree nav */
.sidebar-section-link {
  display: block; font-size: 12px; line-height: 1.3;
  color: var(--text-3); text-decoration: none;
  padding: 6px 12px; border-left: 2px solid transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .12s, border-color .12s, background .12s;
}
.sidebar-section-link:hover { color: var(--text-2); text-decoration: none; background: var(--bg-3); }
.sidebar-section-link.current { color: var(--accent); border-left-color: var(--accent); background: rgba(255,107,53,.07); }
.sidebar-section-link.ancestor { color: var(--text-2); }

/* Marquee */
@keyframes bry-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex; gap: 12px; width: max-content;
  animation: bry-marquee 90s linear infinite;
}
.marquee-track-reverse {
  display: flex; gap: 12px; width: max-content;
  animation: bry-marquee 110s linear infinite reverse;
}
.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* Project-wide resources */
.project-level-resources { margin:20px 0; padding:16px; }
.project-level-resources-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.project-level-resources-heading p,
.project-level-resources-empty { margin:5px 0 0; color:var(--text-3); font-size:12px; }
.project-level-resources .project-resource-add { margin-top:12px; }
.project-level-resources .project-resource-grid { grid-template-columns:repeat(auto-fit, minmax(260px, 360px)); }
