:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e2936;
  background: #f4f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #1e2936;
  --muted: #788595;
  --line: #e5e9ee;
  --accent: #226c65;
  --accent-light: #e7f2f0;
  --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
a { color: inherit; }
.app-frame { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 18px 20px;
  background: var(--white);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #1f615b;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
}
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.45px; }
.sidebar-label { margin: 48px 0 12px 12px; color: #9aa4b1; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
.navigation { display: grid; gap: 5px; }
.navigation-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border-radius: 8px;
  color: #758192;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.navigation-item.is-current { background: var(--accent-light); color: var(--accent); font-weight: 700; }
.navigation-icon { width: 18px; color: #81909e; font-size: 16px; text-align: center; }
.is-current .navigation-icon { color: var(--accent); }
.coming-soon { margin-left: auto; color: #a2acb8; font-size: 10px; }
.sidebar-note { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 14px 10px 2px; color: #8995a3; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d4a75a; }

.main-content { min-height: 100vh; margin-left: 248px; }
.topbar {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { color: #8591a0; font-size: 12px; }
.breadcrumb span { padding: 0 9px; color: #b7c0ca; }
.preview-badge { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #e7d8b7; border-radius: 999px; background: #fbf7ee; color: #937241; font-size: 10px; font-weight: 700; letter-spacing: .35px; }
.preview-badge span { color: #d2a64e; font-size: 8px; }
.content-wrap { width: min(100% - 96px, 900px); margin: 0 auto; padding: 66px 0 36px; }
.welcome { margin-bottom: 34px; }
.eyebrow { margin: 0 0 12px; color: #84919f; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: inherit; }
h1 { max-width: 580px; margin-bottom: 12px; color: #1c2935; font-size: clamp(30px, 4vw, 42px); font-weight: 700; letter-spacing: -1.65px; line-height: 1.17; }
.welcome-copy { max-width: 585px; margin-bottom: 0; color: #738191; font-size: 14px; line-height: 1.7; }
.workspace-card { padding: 28px 30px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 5px 20px rgba(29, 46, 64, .025); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.card-heading .eyebrow { margin-bottom: 8px; }
.card-heading h2 { margin-bottom: 0; font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.empty-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #f0f5f4; color: var(--accent); font-size: 20px; }
.card-copy { max-width: 610px; margin: 13px 0 22px; color: #7c8998; font-size: 12px; line-height: 1.7; }
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 19px; border-top: 1px solid #edf0f3; }
.feature-row { display: flex; align-items: flex-start; gap: 8px; color: #5f6d7c; font-size: 11px; line-height: 1.5; }
.feature-check { display: grid; width: 15px; height: 15px; flex: 0 0 15px; place-items: center; border-radius: 50%; background: #eaf3f1; color: var(--accent); font-size: 9px; font-weight: 700; }
.privacy-note { display: flex; gap: 14px; margin-top: 18px; padding: 18px 20px; border: 1px solid #e1ecea; border-radius: 10px; background: #f0f6f5; }
.privacy-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; background: #dcebe8; color: var(--accent); font-size: 19px; }
.privacy-note h2 { margin: 1px 0 5px; color: #345c57; font-size: 12px; font-weight: 700; letter-spacing: -.1px; }
.privacy-note p { max-width: 650px; margin-bottom: 0; color: #6c827f; font-size: 11px; line-height: 1.65; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; color: #9aa4af; font-size: 10px; }
.page-footer a { color: #65817d; text-decoration: none; }
.page-footer a:hover { color: var(--accent); text-decoration: underline; }

.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; color: #435365; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; }
.button:hover { border-color: #9ab9b3; color: var(--accent); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { background: #174e49; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #9dcac3; outline-offset: 2px; }
.section-card { margin-top: 18px; }
.section-card > .card-heading { align-items: center; margin-bottom: 18px; }
.section-card > .card-heading h2 { font-size: 18px; }
.workspace-toolbar, .action-row, .control-filters { display: flex; align-items: end; gap: 10px; }
.workspace-toolbar { justify-content: space-between; margin: 22px 0 18px; }
.action-row { align-items: center; flex-wrap: wrap; }
.form-field { display: grid; gap: 6px; min-width: 0; color: #526273; font-size: 11px; font-weight: 650; }
.form-field input, .form-field select, .form-field textarea, .control-filters input, .control-filters select { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #dfe5ea; border-radius: 7px; background: white; color: var(--ink); font: inherit; font-size: 12px; }
.form-field textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
.form-field small { color: #83909d; font-size: 10px; font-weight: 400; line-height: 1.45; }
.form-field.compact { width: min(280px, 48%); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.stat-card { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid #e9edf0; border-radius: 8px; background: #fbfcfc; }
.stat-card strong { color: #2f5c56; font-size: 18px; }
.stat-card span, .muted { color: #84909d; font-size: 11px; }
.catalog-provenance { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; margin-top: 15px; padding: 15px 16px; border: 1px solid #e1ecea; border-radius: 9px; background: #f7faf9; color: #455e5a; font-size: 11px; }
.catalog-provenance strong { font-size: 13px; }
.catalog-provenance p { margin: 5px 0 0; color: #778782; font-size: 10px; line-height: 1.5; }
.catalog-provenance a { grid-column: 2; grid-row: 1; align-self: center; color: var(--accent); font-weight: 650; text-decoration: none; }
.catalog-provenance .digest, .catalog-provenance .source-note { grid-column: 1 / -1; overflow-wrap: anywhere; }
.catalog-provenance .digest { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.catalog-provenance .source-note { color: #84909d; font-size: 10px; }
.framework-row, .tool-row, .control-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #edf0f3; }
.framework-row strong, .tool-row strong { color: #405466; font-size: 12px; }
.framework-row p, .tool-row p { margin: 5px 0 0; color: #8793a0; font-size: 10px; line-height: 1.5; }
.tool-row > div:first-child { max-width: 650px; }
.control-filters { display: grid; grid-template-columns: minmax(200px, 1fr) 180px 180px; margin: 4px 0 15px; }
.result-count { margin: 0 0 8px; }
.control-row { align-items: flex-start; }
.control-copy { min-width: 0; }
.control-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #788695; font-size: 10px; }
.control-meta strong { color: var(--accent); font-size: 11px; }
.control-meta span { padding: 3px 7px; border-radius: 99px; background: #f0f4f4; }
.control-row h3 { margin: 7px 0 4px; color: #344656; font-size: 13px; }
.control-row p { max-width: 700px; margin: 0; color: #7d8996; font-size: 10px; line-height: 1.55; }
.notice { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #c7e2dc; border-radius: 8px; background: #f0f8f6; color: #315d56; font-size: 12px; line-height: 1.5; }
.notice.is-error { border-color: #ecc9c5; background: #fff6f5; color: #8a3c34; }
dialog { width: min(620px, calc(100% - 28px)); max-height: min(88vh, 900px); padding: 0; overflow: auto; border: 1px solid #dce3e8; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(30,45,60,.25); }
dialog::backdrop { background: rgba(20, 34, 45, .42); }
.dialog-form { padding: 22px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dialog-heading .eyebrow { margin-bottom: 6px; }
.dialog-heading h2 { margin: 0; font-size: 19px; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: #f1f4f5; color: #596b78; cursor: pointer; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .form-field:has(textarea), .form-grid .form-field:only-child { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #edf0f3; }
.dialog-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0f3; }
.record-details { margin-top: 14px; padding: 13px 14px; border-radius: 8px; background: #f7f9fa; }
.record-details h3 { margin: 0 0 8px; color: #435666; font-size: 12px; }
.record-details p { margin: 5px 0; color: #73818e; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.preview-summary { margin: 0 22px 18px; padding: 14px; border: 1px solid #dce9e6; border-radius: 8px; background: #f5f9f8; }
.preview-summary h3 { margin: 0 0 6px; font-size: 13px; }
.preview-summary p, .preview-summary li { color: #71817e; font-size: 10px; line-height: 1.55; }
.preview-summary ul { margin: 8px 0 0; padding-left: 18px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #526273; }
.checkbox-field input { width: 16px; height: 16px; }
.checkbox-field small { display: block; color: #83909d; font-size: 10px; font-weight: 400; line-height: 1.45; }

@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-label, .sidebar-note { display: none; }
  .navigation { display: flex; gap: 4px; margin-top: 17px; overflow-x: auto; }
  .navigation-item { min-height: 36px; flex: 0 0 auto; padding: 0 10px; font-size: 11px; }
  .navigation-icon { display: none; }
  .coming-soon { display: none; }
  .main-content { margin-left: 0; }
  .topbar { height: 54px; padding: 0 20px; }
  .content-wrap { width: min(100% - 40px, 600px); padding: 44px 0 28px; }
  .feature-list { grid-template-columns: 1fr; gap: 10px; }
  .workspace-card { padding: 23px 20px; }
  .page-footer { flex-direction: column; margin-top: 30px; }
  .workspace-toolbar, .tool-row, .framework-row { align-items: flex-start; flex-direction: column; }
  .form-field.compact { width: 100%; }
  .stat-grid { grid-template-columns: 1fr; }
  .control-filters { grid-template-columns: 1fr; }
  .catalog-provenance { grid-template-columns: 1fr; }
  .catalog-provenance a { grid-column: 1; grid-row: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .form-field { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
