:root {
  --ink: #17243a;
  --muted: #66758b;
  --paper: #f4f7fb;
  --card: #ffffff;
  --line: #dbe2ec;
  --accent: #2059c7;
  --accent-strong: #163c82;
  --accent-soft: #e5efff;
  --success: #11764a;
  --success-soft: #dff5e9;
  --warning: #9a4a00;
  --warning-soft: #fff0d8;
  --danger: #a52b24;
  --danger-soft: #ffe5e1;
  --sidebar: #edf2f8;
  --shadow: 0 10px 30px rgba(23, 36, 58, .07);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; min-width: 0; line-height: 1.5; background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.platform-body { min-height: 100vh; }
.portal-shell, .project-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.portal-sidebar, .project-sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 22px 14px 16px; background: var(--sidebar); border-right: 1px solid var(--line); }
.platform-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--accent-strong); font-size: .86rem; }
.portal-nav { display: grid; gap: 5px; }
.portal-nav-link { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: #41526b; font-size: .91rem; text-decoration: none; }
.portal-nav-link > span:first-child { width: 20px; text-align: center; color: #75849a; }
.portal-nav-link small { margin-left: auto; padding: 2px 6px; border-radius: 999px; color: #718096; background: #dfe6ef; font-size: .65rem; }
.portal-nav-link.active { color: #123b78; background: #dce8fb; box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
.portal-nav-link.muted, .portal-nav-link.locked { cursor: default; opacity: .72; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user > div { min-width: 0; flex: 1; display: grid; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.sidebar-user small { color: var(--muted); font-size: .7rem; }
.user-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #123f96; background: #c7dcff; font-size: .72rem; font-weight: 800; }
.user-avatar.small { width: 30px; height: 30px; }
.icon-button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; color: #5d6c80; background: transparent; cursor: pointer; }
.icon-button:hover { background: #dfe6ef; }
.portal-workspace { grid-column: 2; min-width: 0; }
.platform-topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.platform-topbar > div:first-child { display: grid; line-height: 1.25; }
.platform-topbar strong { font-size: .93rem; }
.topbar-kicker { color: var(--muted); font-size: .68rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.baseline-chip, .status-chip { display: inline-flex; align-items: center; width: max-content; padding: 4px 9px; border-radius: 999px; color: #4f3b89; background: #ece3ff; border: 1px solid #d7c7ff; font-size: .72rem; font-weight: 750; }
.status-chip.success { color: var(--success); background: var(--success-soft); border-color: #aee1c5; }
.status-chip.info { color: #174fa8; background: #e0edff; border-color: #b9d3ff; }
.status-chip.warning { color: var(--warning); background: var(--warning-soft); border-color: #ffd596; }
.status-chip.neutral { color: #59687d; background: #edf1f5; border-color: #d9e0e8; }
.portal-main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 34px 34px 72px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.page-heading h1 { margin: 3px 0 7px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); }
.section-kicker { color: #3f5f8d !important; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid #c6d1df; border-radius: 8px; color: #263750; background: white; font-weight: 720; text-decoration: none; cursor: pointer; }
.button.primary { color: white; background: var(--accent-strong); border-color: var(--accent-strong); }
.button.full { width: 100%; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }
.stat-card { display: grid; gap: 4px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(23, 36, 58, .035); }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card span { font-size: .78rem; }
.stat-card strong { font-size: 1.8rem; letter-spacing: -.04em; }
.stat-card small { font-size: .7rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 28px 0 14px; }
.section-heading h2 { margin: 0 0 4px; font-size: 1.25rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .87rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.project-card { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.project-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.project-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #12469f; background: #d6e5ff; font-size: .76rem; font-weight: 850; }
.project-kind { margin: 0; color: #3f5f8d !important; font-size: .72rem !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.project-card h2 { margin: 6px 0; font-size: 1.15rem; }
.project-card > p { min-height: 58px; color: var(--muted); font-size: .82rem; }
.project-meta { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.quiet-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 18px 20px; border: 1px dashed #bfc9d6; border-radius: 12px; background: #f8fafc; }
.quiet-panel p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.project-identity { display: flex; align-items: center; gap: 10px; margin: 0 6px 18px; padding: 14px 5px 18px; border-bottom: 1px solid var(--line); }
.project-identity > div { min-width: 0; display: grid; }
.project-identity small { color: var(--muted); font-size: .66rem; }
.project-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.project-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #5520c5; background: #e4d6ff; font-size: .7rem; font-weight: 850; }
.all-projects-link { margin-top: auto; padding: 11px; border-radius: 9px; color: #40516a; text-decoration: none; font-size: .84rem; }
.all-projects-link:hover { background: #dfe6ef; }

/* EDUCATIONAL PROJECT SIDEBAR — fixed context + scrollable workflow + fixed utilities */
.project-sidebar-structured .project-workflow-nav {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  margin-right: -4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 132, 154, .38) transparent;
  box-shadow:
    inset 0 12px 14px -16px rgba(23, 36, 58, .35),
    inset 0 -12px 14px -16px rgba(23, 36, 58, .35);
}
.project-sidebar-structured .project-workflow-nav::-webkit-scrollbar {
  width: 6px;
}
.project-sidebar-structured .project-workflow-nav::-webkit-scrollbar-track {
  background: transparent;
}
.project-sidebar-structured .project-workflow-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(117, 132, 154, .34);
}
.project-sidebar-structured .project-workflow-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 110, 135, .5);
}
.project-nav-group {
  border-radius: 10px;
}
.project-nav-group > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  color: #526279;
  font-size: .78rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.project-nav-group > summary::-webkit-details-marker { display: none; }
.project-nav-group > summary:hover { background: #e8edf3; }
.project-nav-group.current > summary { color: #244f91; background: #edf4ff; }
.project-nav-group-icon { width: 20px; flex: 0 0 auto; text-align: center; color: #75849a; }
.project-nav-chevron { margin-left: auto; color: #8a98aa; transition: transform .15s ease; }
.project-nav-group[open] > summary .project-nav-chevron { transform: rotate(180deg); }
.project-nav-group-body { display: grid; gap: 3px; padding: 2px 0 6px 14px; }
.project-nav-group-body .portal-nav-link { min-height: 36px; padding-block: 7px; font-size: .86rem; }
.project-sidebar-structured .project-utility-nav {
  flex: 0 0 auto;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.project-sidebar-structured .all-projects-link {
  flex: 0 0 auto;
  margin-top: 8px;
}
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .85fr); gap: 14px; }
.focus-card, .decision-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.card-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.focus-card h2, .decision-card h2 { margin: 15px 0 8px; font-size: 1.35rem; }
.focus-card p, .decision-card p { color: var(--muted); }
.progress-track { height: 8px; margin: 20px 0 9px; overflow: hidden; border-radius: 999px; background: #e7ecf2; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.focus-card small { color: var(--muted); }
.lifecycle-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.lifecycle-card { min-height: 92px; display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.lifecycle-card > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #e8edf3; color: #66758b; font-size: .68rem; font-weight: 800; }
.lifecycle-card > div { display: grid; gap: 5px; }
.lifecycle-card strong { font-size: .78rem; }
.lifecycle-card small { color: var(--muted); font-size: .67rem; }
.lifecycle-card.done > span { color: var(--success); background: var(--success-soft); }
.lifecycle-card.current { border-color: #9bbcff; background: #f5f9ff; }
.lifecycle-card.current > span { color: white; background: var(--accent); }
.lifecycle-card.locked { opacity: .67; }
.locked-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.locked-modules article { display: flex; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.locked-modules p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.fast-track-stats { margin-top: 14px; margin-bottom: 28px; }
.status-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.empty-state { min-height: 150px; align-items: center; }
.sync-error { margin-top: 18px; padding: 16px 18px; border: 1px solid #efb8b2; border-radius: 11px; color: var(--danger); background: var(--danger-soft); }
.sync-error p { margin: 4px 0 0; }
.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 20% 10%, #e5efff 0, transparent 35%), var(--paper); }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 800; }
.auth-card h1 { margin: 0 0 8px; font-size: 2rem; }
.auth-card > p { color: var(--muted); }
.auth-card form { display: grid; gap: 8px; }
.auth-card label { margin-top: 8px; font-size: .82rem; font-weight: 720; }
.auth-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.form-error { color: var(--danger) !important; }
.auth-footnote { margin-top: 18px; font-size: .75rem; }
@media (max-width: 1120px) {
  .portal-shell, .project-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .portal-sidebar, .project-sidebar { width: 220px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .lifecycle-grid { grid-template-columns: repeat(3, 1fr); }
  .status-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Codex Knowledge OS content inside the shared project shell. */
.knowledge-main { max-width: 1320px; }
.knowledge-main .hero { padding-top: 12px; }
.knowledge-main .hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.knowledge-main .stage, .knowledge-main .team-card, .knowledge-main .discovery-panel,
.knowledge-main .discovery-history, .knowledge-main .run-summary,
.knowledge-main .candidate-card, .knowledge-main .status-form {
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 5px 18px rgba(23, 36, 58, .04);
}
.knowledge-main button:not(.filter-button) { background: var(--accent-strong); }
.knowledge-main button.secondary { color: var(--accent); background: var(--accent-soft); }
.knowledge-main .reader { max-width: 860px; }
.knowledge-main .material-header h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.knowledge-avatar { color: #12469f; background: #d6e5ff; }
.project-footer { margin: 0 34px; padding: 18px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }

/* FAST TRACK DASHBOARD V1 */
.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.filter-form label {
  color: #64748b;
  font-size: .82rem;
  font-weight: 700;
}
.filter-form select {
  min-width: 180px;
  padding: 9px 34px 9px 11px;
  border: 1px solid #d3dce8;
  border-radius: 9px;
  background: #fff;
  color: #17243a;
}
.filter-result {
  margin-left: auto;
  color: #697991;
  font-size: .82rem;
}
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.chart-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d6deea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 50, 81, .04);
}
.chart-card h3 {
  margin: 0 0 18px;
  color: #17243a;
  font-size: 1rem;
}
.donut-layout {
  display: flex;
  align-items: center;
  gap: 24px;
}
.donut-chart {
  position: relative;
  flex: 0 0 190px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
}
.donut-chart::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
}
.donut-chart > div {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.donut-chart strong {
  display: block;
  color: #17243a;
  font-size: 2rem;
}
.donut-chart span {
  color: #697991;
  font-size: .78rem;
}
.chart-legend {
  display: grid;
  flex: 1;
  gap: 8px;
}
.chart-legend > div {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #566983;
  font-size: .8rem;
}
.chart-legend strong {
  color: #17243a;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.bar-chart {
  display: grid;
  gap: 13px;
}
.chart-row {
  min-width: 0;
}
.chart-row-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: #566983;
  font-size: .8rem;
}
.chart-row-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-row-label strong {
  color: #17243a;
}
.chart-row small {
  display: block;
  margin-top: 4px;
  color: #8190a5;
  font-size: .7rem;
}
.chart-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}
.chart-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: #2864d7;
}
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d6deea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 50, 81, .04);
}
.data-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  color: #24334a;
  font-size: .78rem;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px;
  border-bottom: 1px solid #d6deea;
  background: #f3f6fa;
  color: #61718a;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  max-width: 280px;
  padding: 12px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: top;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #f8faff;
}
.task-cell {
  min-width: 260px;
  color: #17243a;
  font-weight: 650;
}
.comment-cell {
  min-width: 220px;
}
.table-status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f8;
  color: #4e6078;
  white-space: nowrap;
}
.artifact-link {
  color: #1f5ec7;
  font-weight: 700;
  text-decoration: none;
}
.artifact-link:hover {
  text-decoration: underline;
}
.compact-note {
  margin-bottom: 16px;
  padding: 12px 15px;
  color: #65758d;
  font-size: .8rem;
}
.muted {
  color: #7a899e;
}

@media (max-width: 1050px) {
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .filter-form {
    align-items: stretch;
    flex-direction: column;
  }
  .filter-result {
    margin-left: 0;
  }
  .donut-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* FAST TRACK GOOGLE DASHBOARD V1 */
.dashboard-heading { margin-top: 8px; }
.google-donut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.google-bar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.google-chart-card { min-width: 0; padding: 18px; border: 1px solid #d6deea; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(31, 50, 81, .04); }
.google-chart-card h3 { margin: 0; color: #17243a; font-size: .92rem; line-height: 1.35; }
.google-donut-layout { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.google-donut { position: relative; flex: 0 0 142px; width: 142px; height: 142px; border-radius: 50%; }
.google-donut::after { content: ""; position: absolute; inset: 27px; border-radius: 50%; background: #fff; }
.google-donut > div { position: absolute; z-index: 1; inset: 0; display: grid; place-content: center; text-align: center; }
.google-donut strong { display: block; color: #17243a; font-size: 1.65rem; }
.google-donut span { color: #7a899e; font-size: .7rem; }
.google-chart-legend { display: grid; flex: 1; gap: 6px; }
.google-chart-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; color: #60718a; font-size: .72rem; }
.google-chart-legend strong { color: #17243a; }
.google-chart-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.google-chart-title small { max-width: 190px; color: #8492a6; font-size: .68rem; text-align: right; }
.google-bar-legend, .google-line-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; color: #65758d; font-size: .72rem; }
.google-bar-legend span, .google-line-legend span { display: inline-flex; align-items: center; gap: 6px; }
.google-bar-legend i, .google-line-legend i { width: 9px; height: 9px; border-radius: 50%; }
.google-bar-list { display: grid; gap: 13px; }
.google-bar-row { display: grid; gap: 6px; }
.google-bar-row > strong { color: #52647e; font-size: .75rem; }
.google-bar-series { display: grid; grid-template-columns: 54px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.google-bar-series-name { color: #8390a2; font-size: .67rem; }
.google-bar-series b { color: #17243a; font-size: .72rem; text-align: right; }
.google-bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e6ebf2; }
.google-bar-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; }
.google-line-card { margin-bottom: 28px; }
.google-line-scroll { width: 100%; overflow-x: auto; }
.google-line-svg { display: block; width: 100%; min-width: 820px; height: auto; }
.line-grid { stroke: #e6ebf2; stroke-width: 1; }
.line-y-label, .line-x-label { fill: #7e8da2; font-size: 10px; }
.line-y-label { text-anchor: end; }
.line-x-label { text-anchor: middle; }
@media (max-width: 1180px) { .google-donut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .google-donut-grid, .google-bar-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .google-donut-layout { align-items: flex-start; flex-direction: column; }
  .google-chart-title { flex-direction: column; }
  .google-chart-title small { max-width: none; text-align: left; }
}


/* FAST TRACK MULTI FILTER V1 */
.fast-track-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto auto;
  align-items: end;
  gap: 12px;
}
.fast-track-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #61728a;
  font-size: .8rem;
  font-weight: 700;
}
.fast-track-filter-field select {
  width: 100%;
  min-width: 0;
}
.fast-track-filter-form .filter-result {
  align-self: center;
  margin-left: 0;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .fast-track-filter-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}
@media (max-width: 640px) {
  .fast-track-filter-form {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* PROJECT WORKSPACE: collapsible navigation and mobile drawer */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.project-shell {
  transition: grid-template-columns .2s ease;
}
.project-sidebar {
  transition: width .2s ease, transform .2s ease;
  z-index: 24;
}
.portal-workspace {
  transition: margin-left .2s ease;
}
.topbar-project {
  min-width: 0;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 12px;
}
.topbar-project > div {
  min-width: 0;
  display: grid;
  line-height: 1.25;
}
.topbar-project strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-toggle {
  position: fixed;
  top: 82px;
  left: 230px;
  z-index: 26;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c6d1df;
  border-radius: 999px;
  color: #40516a;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 36, 58, .14);
  cursor: pointer;
  transition: left .2s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.sidebar-toggle:hover {
  color: #163c82;
  background: #f2f6fb;
  box-shadow: 0 10px 28px rgba(23, 36, 58, .18);
}
.sidebar-toggle-icon {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-1px);
}
html.project-sidebar-collapsed .sidebar-toggle {
  left: 58px;
}
@media (min-width: 821px) and (max-width: 1120px) {
  .sidebar-toggle { left: 202px; }
  html.project-sidebar-collapsed .sidebar-toggle { left: 58px; }
}
.project-sidebar-scrim {
  display: none;
}
html.project-sidebar-collapsed .project-shell {
  grid-template-columns: 76px minmax(0, 1fr);
}
html.project-sidebar-collapsed .project-sidebar {
  width: 76px;
  padding-inline: 10px;
}
html.project-sidebar-collapsed .project-sidebar .sidebar-label,
html.project-sidebar-collapsed .project-sidebar .portal-nav-link small {
  display: none;
}
html.project-sidebar-collapsed .project-sidebar .platform-brand {
  justify-content: center;
  padding-inline: 0;
}
html.project-sidebar-collapsed .project-sidebar .project-identity {
  justify-content: center;
  margin-inline: 0;
  padding-inline: 0;
}
html.project-sidebar-collapsed .project-sidebar .portal-nav-link {
  width: 48px;
  justify-content: center;
  gap: 0;
  padding-inline: 0;
  margin-inline: auto;
  overflow: hidden;
}
html.project-sidebar-collapsed .project-sidebar .portal-nav-link > span:first-child {
  width: auto;
  flex: 0 0 auto;
}
html.project-sidebar-collapsed .project-sidebar .project-nav-group > summary {
  width: 48px;
  justify-content: center;
  gap: 0;
  padding-inline: 0;
  margin-inline: auto;
}
html.project-sidebar-collapsed .project-sidebar .project-nav-group-body { display: none; }
html.project-sidebar-collapsed .project-sidebar .project-nav-group-icon { width: auto; }
html.project-sidebar-collapsed .project-sidebar .all-projects-link {
  width: 48px;
  display: grid;
  place-items: center;
  padding-inline: 0;
  margin-inline: auto;
}

@media (max-width: 820px) {
  .project-shell,
  html.project-sidebar-collapsed .project-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar-toggle,
  html.project-sidebar-collapsed .sidebar-toggle {
    top: 11px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: none;
  }
  .topbar-project {
    padding-left: 44px;
  }
  .portal-workspace {
    grid-column: 1;
  }
  .project-sidebar,
  html.project-sidebar-collapsed .project-sidebar {
    width: min(280px, 86vw);
    padding: 18px 14px 16px;
    transform: translateX(-102%);
    box-shadow: 18px 0 40px rgba(23, 36, 58, .16);
  }
  body.project-sidebar-open .project-sidebar {
    transform: translateX(0);
  }
  .project-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 23;
    display: block;
    border: 0;
    background: rgba(23, 36, 58, .28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
  }
  body.project-sidebar-open .project-sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }
  html.project-sidebar-collapsed .project-sidebar .sidebar-label {
    display: inline;
  }
  html.project-sidebar-collapsed .project-sidebar .project-identity .sidebar-label {
    display: grid;
  }
  html.project-sidebar-collapsed .project-sidebar .portal-nav-link small {
    display: inline-flex;
  }
  html.project-sidebar-collapsed .project-sidebar .platform-brand,
  html.project-sidebar-collapsed .project-sidebar .project-identity,
  html.project-sidebar-collapsed .project-sidebar .portal-nav-link,
  html.project-sidebar-collapsed .project-sidebar .all-projects-link {
    width: auto;
    justify-content: flex-start;
    margin-inline: 0;
    padding-inline: 11px;
  }
  html.project-sidebar-collapsed .project-sidebar .platform-brand {
    padding-inline: 10px;
  }
  html.project-sidebar-collapsed .project-sidebar .project-identity {
    padding-inline: 5px;
  }
  html.project-sidebar-collapsed .project-sidebar .portal-nav-link {
    gap: 10px;
  }
  html.project-sidebar-collapsed .project-sidebar .portal-nav-link > span:first-child {
    width: 20px;
  }
  html.project-sidebar-collapsed .project-sidebar .project-nav-group > summary {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
    padding-inline: 11px;
    margin-inline: 0;
  }
  html.project-sidebar-collapsed .project-sidebar .project-nav-group[open] .project-nav-group-body { display: grid; }
  html.project-sidebar-collapsed .project-sidebar .project-nav-group-icon { width: 20px; }
  .platform-topbar {
    height: 58px;
    padding: 0 14px;
  }
  .topbar-project {
    gap: 9px;
  }
  .topbar-actions .baseline-chip {
    display: none;
  }
  .portal-main {
    padding: 22px 14px 58px;
  }
  .page-heading {
    display: grid;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-shell,
  .project-sidebar,
  .portal-workspace,
  .project-sidebar-scrim,
  .sidebar-toggle {
    transition: none;
  }
}

/* EDUCATIONAL PROJECT CREATION V1 */
.project-create-card {
  max-width: 760px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.project-create-form { display: grid; gap: 18px; }
.project-create-form > div { display: grid; gap: 7px; }
.project-create-form label { font-size: .82rem; font-weight: 760; color: #31445f; }
.project-create-form input,
.project-create-form textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #1f2f46;
  background: white;
  font: inherit;
}
.project-create-form textarea { min-height: 150px; resize: vertical; }
.project-create-form input:focus,
.project-create-form textarea:focus {
  outline: 3px solid rgba(70, 119, 202, .15);
  border-color: #6f9ee7;
}
.project-create-actions { display: flex !important; grid-template-columns: none !important; justify-content: flex-end; flex-direction: row; gap: 10px !important; }
.project-form-errors {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #efb4b4;
  border-radius: 9px;
  color: #9b2929;
  background: #fff0f0;
}
.project-form-errors p { margin: 0; }
.education-route-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 16px 0 10px; }
.education-route-dots span { height: 7px; border-radius: 999px; background: #dfe5ec; }
.education-route-dots span.done { background: #4caf6a; }
.education-route-dots span.current { background: #4f86e8; }
.education-route-dots span.stopped { background: #dc625b; }
.education-route-dots span.locked { background: #dfe5ec; }
.education-card-stage { display: grid; gap: 3px; }
.education-card-stage strong { color: #31445f; font-size: .82rem; }
.education-card-stage small { color: var(--muted); font-size: .73rem; }
@media (max-width: 640px) {
  .project-create-card { padding: 18px; }
  .project-create-actions { flex-direction: column-reverse; }
  .project-create-actions .button { width: 100%; }
}

/* Compact dashboard summary v1 */
.dashboard-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #d8e1ee;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #60718c;
  font-size: 0.9rem;
}

.dashboard-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.dashboard-summary span + span::before {
  content: "·";
  margin-right: 0.35rem;
  color: #9aa9bd;
}

.dashboard-summary strong {
  color: #15243d;
  font-size: 1rem;
}

.dashboard-summary-ok {
  color: #237a48;
  font-weight: 700;
}

@media (max-width: 720px) {
  .dashboard-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-summary span + span::before {
    content: none;
  }
}


/* Dashboard UX V2 */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid #d7e2f0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(60, 113, 210, .13), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 58%, #eef4ff 100%);
  box-shadow: 0 8px 28px rgba(23, 36, 58, .055);
}
.dashboard-hero h1 {
  margin-top: 2px;
  font-size: clamp(2.1rem, 4vw, 3rem);
}
.dashboard-hero > div {
  max-width: 760px;
}
.dashboard-hero .button {
  flex: 0 0 auto;
}

.dashboard-summary-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  background: transparent;
}
.dashboard-summary-v2 .dashboard-metric {
  display: grid;
  gap: 2px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(23, 36, 58, .035);
}
.dashboard-summary-v2 .dashboard-metric + .dashboard-metric::before {
  content: none;
}
.dashboard-summary-v2 .dashboard-metric small {
  color: #6a7890;
  font-size: .72rem;
  font-weight: 700;
}
.dashboard-summary-v2 .dashboard-metric strong {
  color: #17243a;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.dashboard-projects-heading {
  margin-top: 18px;
}

.project-card-v2 {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}
.project-card-v2::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2b67c8, #7c9fe0 58%, #c5d7f3);
}
.project-card-v2:hover {
  transform: translateY(-2px);
  border-color: #c9d7e8;
  box-shadow: 0 14px 34px rgba(23, 36, 58, .095);
}
.project-card-v2 .project-card-head {
  margin: 2px 0 12px;
}
.project-card-v2 h2 {
  margin: 7px 0 8px;
  font-size: 1.12rem;
  line-height: 1.3;
}
.project-card-v2 > .project-card-description {
  display: -webkit-box;
  min-height: 2.95em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.project-card-stage {
  gap: 3px;
  margin-top: 2px;
  padding: 12px 13px;
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #f7f9fd;
}
.project-card-stage-label {
  margin-bottom: 2px;
  color: #718097;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.project-card-v2 .education-route-dots {
  margin: 2px 0 10px;
}
.project-card-v2 .project-meta {
  margin: 12px 0;
  padding-top: 11px;
}
.project-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: auto;
}
.project-card-actions form {
  margin: 0;
}
.project-card-actions .button {
  width: 100%;
  min-height: 42px;
}
.project-card-actions .archive-action {
  min-width: 96px;
  padding-inline: 12px;
}
.project-open-action {
  white-space: nowrap;
}
.archive-count-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #d7e1ee;
  border-radius: 999px;
  color: #5f6f86;
  background: #fff;
  font-size: .72rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  .dashboard-summary-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }
  .dashboard-hero .button {
    width: 100%;
  }
  .dashboard-summary-v2 {
    grid-template-columns: 1fr 1fr;
  }
  .project-card-v2 {
    min-height: 0;
  }
  .project-card-actions {
    grid-template-columns: 1fr;
  }
  .project-card-actions .archive-action {
    min-width: 0;
  }
  .archive-count-chip {
    margin-top: 8px;
  }
}

/* Public identity v1 */
.public-body {
  min-height: 100vh;
  margin: 0;
  color: #17243a;
  background:
    radial-gradient(circle at 8% 5%, rgba(80,132,232,.14), transparent 31%),
    radial-gradient(circle at 92% 12%, rgba(77,189,166,.11), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 52%, #eef3f9 100%);
}
.public-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: linear-gradient(rgba(46,83,142,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(46,83,142,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 58%);
}
.public-shell { position: relative; width: min(1180px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; }
.public-header { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.public-brand { display: inline-flex; align-items: center; gap: 12px; color: #17243a; text-decoration: none; }
.public-brand > span:last-child { display: grid; gap: 2px; }
.public-brand strong { font-size: 1rem; letter-spacing: -.02em; }
.public-brand small { color: #71819a; font-size: .67rem; letter-spacing: .05em; text-transform: uppercase; }
.public-nav { display: flex; align-items: center; gap: 26px; }
.public-nav > a:not(.button) { color: #52647e; font-size: .82rem; font-weight: 700; text-decoration: none; }
.public-nav > a:hover { color: #174da9; }
.button.compact { min-height: 36px; padding: 8px 15px; }
.public-main { padding: 46px 0 70px; }
.public-hero { min-height: 580px; display: grid; grid-template-columns: minmax(0,1.03fr) minmax(420px,.97fr); align-items: center; gap: 58px; }
.public-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #315f9f; font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.public-eyebrow span { width: 24px; height: 2px; border-radius: 10px; background: #2f6ed7; }
.public-hero h1, .public-page-hero h1, .public-login-intro h1 { max-width: 760px; margin: 0; color: #122039; font-size: clamp(2.45rem,5vw,4.7rem); line-height: 1.02; letter-spacing: -.055em; }
.public-lead, .public-page-hero > p:last-child { max-width: 700px; margin: 25px 0 0; color: #5a6b83; font-size: 1.05rem; line-height: 1.72; }
.public-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.public-primary-action, .public-secondary-action { min-height: 48px; padding: 13px 20px; }
.public-owner { display: flex; align-items: center; gap: 12px; margin-top: 38px; }
.public-owner-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #164b9d; background: #dce9ff; font-size: .7rem; font-weight: 900; }
.public-owner > div { display: grid; gap: 3px; }
.public-owner strong { font-size: .8rem; }
.public-owner span, .public-owner a { color: #71819a; font-size: .75rem; }
.public-hero-visual { position: relative; min-height: 480px; display: grid; place-items: center; }
.public-glow { position: absolute; border-radius: 50%; filter: blur(2px); }
.public-glow-one { width: 360px; height: 360px; background: rgba(71,124,226,.14); }
.public-glow-two { width: 240px; height: 240px; right: 12%; bottom: 4%; background: rgba(62,183,156,.12); }
.public-visual-card { position: absolute; border: 1px solid rgba(173,192,220,.72); background: rgba(255,255,255,.88); box-shadow: 0 28px 70px rgba(35,67,113,.14); backdrop-filter: blur(14px); }
.public-visual-main { width: min(410px,88%); min-height: 240px; padding: 30px; border-radius: 24px; transform: rotate(-2deg); }
.public-visual-main > div:nth-child(2) { display: grid; gap: 8px; margin-top: 26px; }
.public-visual-main small, .public-visual-small small { color: #73839a; font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.public-visual-main strong { max-width: 280px; font-size: 1.35rem; line-height: 1.25; }
.public-visual-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(145deg,#2f72e4,#17499f); font-weight: 900; box-shadow: 0 12px 28px rgba(39,102,213,.28); }
.public-route { display: flex; align-items: center; margin-top: 34px; }
.public-route span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #7d8ca1; background: #e9eef5; font-size: .65rem; font-weight: 850; }
.public-route span.done { color: #176f48; background: #d9f2e6; }
.public-route span.current { color: white; background: #2869d4; box-shadow: 0 0 0 5px #e0ebff; }
.public-route i { height: 2px; flex: 1; background: #dce4ee; }
.public-visual-small { min-width: 235px; display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-radius: 16px; }
.public-visual-small > div { display: grid; gap: 4px; }
.public-visual-small strong { font-size: .79rem; }
.public-visual-top { top: 10%; right: -2%; transform: rotate(3deg); }
.public-visual-bottom { left: -2%; bottom: 10%; transform: rotate(2deg); }
.public-status-dot { width: 12px; height: 12px; border-radius: 50%; background: #34a46f; box-shadow: 0 0 0 6px #dcf4e8; }
.public-check { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #176f48; background: #dff4e9; font-weight: 900; }
.public-trust-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 44px; }
.public-trust-grid article, .public-content-card { border: 1px solid rgba(191,204,223,.78); border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 0 12px 35px rgba(35,67,113,.055); }
.public-trust-grid article { min-height: 210px; padding: 28px; }
.public-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #2358ad; background: #e2ecff; font-size: 1.1rem; }
.public-trust-grid h2 { margin: 24px 0 9px; font-size: 1.05rem; }
.public-trust-grid p, .public-content-card p, .public-policy p { margin: 0; color: #63738a; line-height: 1.67; }
.public-trust-grid p { font-size: .84rem; }
.public-security-note { display: flex; align-items: flex-start; gap: 16px; margin-top: 18px; padding: 22px 24px; border: 1px solid #d8e3f2; border-radius: 16px; background: rgba(246,250,255,.9); }
.public-security-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #a56010; background: #fff0d7; font-weight: 900; }
.public-security-note strong { font-size: .85rem; }
.public-security-note p { margin: 5px 0 0; color: #6a7a90; font-size: .78rem; }
.public-footer { display: flex; justify-content: space-between; gap: 30px; padding: 30px 0 40px; border-top: 1px solid rgba(183,198,220,.75); color: #71819a; font-size: .74rem; }
.public-footer > div:first-child { display: grid; gap: 5px; }
.public-footer strong { color: #20314b; }
.public-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.public-footer a { color: #5f718a; text-decoration: none; }
.public-page-hero { max-width: 920px; padding: 70px 0 45px; }
.public-page-hero h1 { font-size: clamp(2.3rem,5vw,4.25rem); }
.public-page-hero-narrow { max-width: 780px; }
.public-content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.public-content-card { min-height: 230px; padding: 30px; }
.public-content-card-wide { min-height: 260px; grid-column: 1/-1; background: linear-gradient(120deg,rgba(225,237,255,.72),rgba(255,255,255,.88)); }
.public-content-number { display: block; color: #3d70bd; font-size: .7rem; font-weight: 900; letter-spacing: .1em; }
.public-content-card h2 { margin: 20px 0 12px; font-size: 1.22rem; }
.public-content-card a, .public-policy a { color: #245eb6; }
.public-page-cta { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-top: 18px; padding: 28px 30px; border-radius: 18px; color: white; background: linear-gradient(115deg,#173e83,#2567cf); box-shadow: 0 20px 50px rgba(33,87,176,.2); }
.public-page-cta h2 { margin: 5px 0 0; font-size: 1.35rem; }
.public-page-cta .section-kicker { color: #cddfff; }
.public-page-cta .button { color: #174da9; background: white; border-color: white; }
.public-policy { display: grid; overflow: hidden; border: 1px solid rgba(185,201,222,.8); border-radius: 20px; background: rgba(255,255,255,.84); box-shadow: 0 16px 48px rgba(35,67,113,.055); }
.public-policy section { display: grid; grid-template-columns: 55px 1fr; gap: 20px; padding: 30px; }
.public-policy section + section { border-top: 1px solid #e1e8f1; }
.public-policy section > span { color: #3970c0; font-size: .72rem; font-weight: 900; }
.public-policy h2 { margin: 0 0 10px; font-size: 1.08rem; }
.public-login-shell { min-height: 650px; display: grid; grid-template-columns: minmax(0,1fr) minmax(390px,470px); align-items: center; gap: 74px; padding: 42px 0 70px; }
.public-login-intro h1 { font-size: clamp(2.4rem,4.7vw,4.3rem); }
.public-login-points { display: grid; gap: 13px; margin-top: 32px; }
.public-login-points article { display: flex; align-items: flex-start; gap: 13px; }
.public-login-points article > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: #215cad; background: #e0ebff; font-size: .66rem; font-weight: 900; }
.public-login-points article > div { display: grid; gap: 3px; }
.public-login-points strong { font-size: .82rem; }
.public-login-points p { margin: 0; color: #6b7b91; font-size: .76rem; }
.public-contact-link { max-width: 390px; display: flex; align-items: center; gap: 12px; margin-top: 30px; padding: 15px 16px; border: 1px solid #d6e1ef; border-radius: 14px; color: #20314b; background: rgba(255,255,255,.7); text-decoration: none; }
.public-contact-link > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e5edfa; }
.public-contact-link > div { display: grid; gap: 3px; }
.public-contact-link small { color: #71819a; font-size: .66rem; }
.public-contact-link strong { font-size: .78rem; }
.public-login-card { padding: 34px; border: 1px solid rgba(175,193,218,.8); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 30px 80px rgba(35,67,113,.15); backdrop-filter: blur(16px); }
.public-login-card-head { display: flex; align-items: center; gap: 13px; }
.public-login-card-head > div { display: grid; gap: 3px; }
.public-login-card-head small { color: #71819a; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.public-login-card-head h2 { margin: 0; font-size: 1.45rem; }
.public-login-card > p { margin: 20px 0 0; color: #69798f; font-size: .8rem; }
.public-login-form { display: grid; gap: 8px; margin-top: 24px; }
.public-login-form label { margin-top: 8px; color: #445772; font-size: .73rem; font-weight: 800; }
.public-login-form input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #cbd7e6; border-radius: 10px; color: #18263d; background: #fbfdff; }
.public-login-form input:focus { outline: 3px solid rgba(47,110,215,.14); border-color: #4b7fd4; }
.public-login-form .button { min-height: 47px; margin-top: 14px; }
.public-form-error { padding: 12px 14px; border: 1px solid #efb8b2; border-radius: 10px; background: #fff0ee; }
.public-login-help { margin-top: 22px; padding: 14px 15px; border-radius: 11px; background: #f3f6fa; }
.public-login-help strong { font-size: .76rem; }
.public-login-help p { margin: 4px 0 0; color: #708097; font-size: .7rem; line-height: 1.5; }
.public-login-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; }
.public-login-links a { color: #5f718a; font-size: .7rem; font-weight: 700; text-decoration: none; }
@media (max-width: 980px) {
  .public-hero, .public-login-shell { grid-template-columns: 1fr; }
  .public-hero { padding-top: 40px; }
  .public-hero-visual { min-height: 430px; }
  .public-login-shell { gap: 45px; }
  .public-login-card { width: min(520px,100%); }
}
@media (max-width: 720px) {
  .public-shell { width: min(100% - 28px,1180px); }
  .public-header { min-height: 72px; }
  .public-nav > a:not(.button) { display: none; }
  .public-main { padding-top: 20px; }
  .public-hero { min-height: auto; gap: 30px; }
  .public-hero h1, .public-page-hero h1, .public-login-intro h1 { font-size: 2.45rem; }
  .public-lead { font-size: .95rem; }
  .public-actions .button { width: 100%; }
  .public-hero-visual { min-height: 390px; }
  .public-visual-main { width: 94%; }
  .public-visual-top { top: 2%; right: 0; }
  .public-visual-bottom { left: 0; bottom: 2%; }
  .public-trust-grid, .public-content-grid { grid-template-columns: 1fr; }
  .public-content-card-wide { grid-column: auto; }
  .public-footer, .public-page-cta { align-items: flex-start; flex-direction: column; }
  .public-footer-links { justify-content: flex-start; }
  .public-page-hero { padding-top: 42px; }
  .public-policy section { grid-template-columns: 1fr; gap: 10px; padding: 24px; }
  .public-login-shell { padding-top: 28px; }
  .public-login-card { padding: 25px; }
}

/* System project archive v1 */
.button.archive-action {
  color: #244f84;
  border-color: #b9cde6;
  background: #e7f0fb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42);
}

.button.archive-action:hover {
  color: #183f70;
  border-color: #9fb9d8;
  background: #d9e8f8;
}

/* RESPONSIVE SITE V1 — 2026-08-07 */
img, svg, video, canvas { max-width: 100%; }
.page-heading > *, .section-heading > *, .quiet-panel > *, .platform-topbar > * { min-width: 0; }
.project-meta { flex-wrap: wrap; }

@media (max-width: 820px) {
  /* The global dashboard shell has no drawer JS, so it becomes a compact top shell. */
  .portal-shell { grid-template-columns: minmax(0, 1fr); }
  .portal-shell .portal-sidebar {
    position: static;
    inset: auto;
    width: 100%;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .portal-shell .platform-brand { padding: 0 0 10px; }
  .portal-shell .portal-nav { grid-template-columns: 1fr; }
  .portal-shell .portal-nav-link.muted { display: none; }
  .portal-shell .sidebar-user {
    margin-top: 10px;
    padding: 10px 0 0;
  }
  .portal-shell .portal-workspace { grid-column: 1; }
  .portal-shell .platform-topbar {
    height: auto;
    min-height: 58px;
    padding: 9px 14px;
  }
  .portal-shell .platform-topbar > .baseline-chip { display: none; }

  /* Knowledge OS uses the project shell but not the project drawer controls. */
  .knowledge-project-body .project-shell { grid-template-columns: minmax(0, 1fr); }
  .knowledge-project-body .project-sidebar,
  html.project-sidebar-collapsed .knowledge-project-body .project-sidebar {
    position: static;
    inset: auto;
    width: 100%;
    padding: 12px 14px;
    transform: none;
    box-shadow: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .knowledge-project-body .project-sidebar .platform-brand { padding: 0 0 10px; }
  .knowledge-project-body .project-sidebar .project-identity {
    margin: 0 0 10px;
    padding: 10px 0;
  }
  .knowledge-project-body .project-sidebar .portal-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .knowledge-project-body .project-sidebar .portal-nav-link,
  html.project-sidebar-collapsed .knowledge-project-body .project-sidebar .portal-nav-link {
    width: auto;
    justify-content: flex-start;
    margin-inline: 0;
    padding-inline: 11px;
  }
  .knowledge-project-body .project-sidebar .all-projects-link,
  html.project-sidebar-collapsed .knowledge-project-body .project-sidebar .all-projects-link {
    width: auto;
    display: flex;
    justify-content: flex-start;
    margin: 10px 0 0;
    padding-inline: 11px;
  }
  .knowledge-project-body .portal-workspace { grid-column: 1; }
  .knowledge-project-body .platform-topbar {
    height: auto;
    min-height: 58px;
    padding: 9px 14px;
  }
  .knowledge-project-body .topbar-actions .baseline-chip { display: none; }
  .knowledge-project-body .project-footer { margin: 0 14px; }

  .overview-grid,
  .locked-modules { grid-template-columns: 1fr; }
  .lifecycle-grid,
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .quiet-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .quiet-panel form .button { width: 100%; }
  .section-heading { align-items: flex-start; }
}

@media (max-width: 640px) {
  .project-grid,
  .stat-grid,
  .lifecycle-grid,
  .status-grid { grid-template-columns: 1fr; }
  .knowledge-project-body .project-sidebar .portal-nav { grid-template-columns: 1fr; }
  .page-heading .button { width: 100%; }
  .project-meta { align-items: flex-start; flex-direction: column; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .fast-track-filter-form .filter-result { white-space: normal; }
  .google-bar-series { grid-template-columns: 46px minmax(0, 1fr) 38px; gap: 6px; }
  .data-table-wrap, .google-line-scroll { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .portal-main { padding-inline: 12px; }
  .project-card, .focus-card, .decision-card, .chart-card, .google-chart-card { padding: 16px; }
  .platform-topbar strong { overflow-wrap: anywhere; }

  .public-shell { width: calc(100% - 20px); }
  .public-header { gap: 12px; }
  .public-brand > span:last-child small { display: none; }
  .public-hero h1, .public-page-hero h1, .public-login-intro h1 { font-size: 2rem; }
  .public-visual-main { width: 100%; padding: 22px; }
  .public-visual-small { min-width: 0; width: 88%; padding: 13px 14px; }
  .public-security-note { gap: 12px; padding: 16px; }
  .public-login-card { padding: 20px; }
}

/* Input Course V1 */
.project-create-card-compact { max-width: 760px; }
.project-create-form small,.input-field small { color:var(--muted);font-size:.72rem;line-height:1.45; }
.input-overview,.input-data-page { max-width:1220px;margin:0 auto;display:grid;gap:18px; }
.input-overview-hero,.input-data-hero,.input-check-head { display:flex;align-items:flex-start;justify-content:space-between;gap:28px; }
.input-overview-hero h1,.input-data-hero h1 { margin:4px 0 8px;font-size:clamp(2.1rem,4.4vw,4rem);line-height:1;letter-spacing:-.045em; }
.input-overview-hero p,.input-data-hero p,.input-check-head p { max-width:800px;margin:0;color:var(--muted); }
.input-stage-card { display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:18px;align-items:center;padding:22px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow); }
.input-stage-card.info { border-color:#9dbcf2;background:#f7faff; }
.input-stage-card.success,.input-stage-card.ready { border-color:#b9ddc7;background:#f5fbf7; }
.input-stage-card.warning { border-color:#edc690;background:#fffaf2; }
.input-stage-card.locked,.input-stage-card.neutral { opacity:.78; }
.input-stage-number { width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#164f9e;background:#e1ebff;font-weight:900; }
.input-stage-copy h2 { margin:2px 0 7px; }.input-stage-copy>p { margin:0;color:var(--muted); }
.input-stage-next { display:grid;gap:3px;margin-top:14px; }.input-stage-next span { color:var(--muted);font-size:.8rem; }
.input-data-form { display:grid;gap:16px; }
.input-form-section,.input-check-panel,.input-next-stage,.input-history,.input-summary-panel { border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow); }
.input-form-section,.input-check-panel { padding:22px; }
.input-form-section-head { display:grid;gap:5px;margin-bottom:18px; }.input-form-section-head h2 { margin:0;font-size:1.08rem; }.input-form-section-head p { margin:0;color:var(--muted);font-size:.82rem; }
.input-field-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }.input-field { display:grid;gap:7px; }.input-field.wide { grid-column:1/-1; }
.input-field label,.input-approval-form label { color:#263b58;font-size:.8rem;font-weight:800; }
.input-field input,.input-field textarea,.input-approval-form textarea { width:100%;border:1px solid #cbd7e6;border-radius:10px;color:var(--ink);background:#fbfdff;font:inherit; }
.input-field input { min-height:44px;padding:10px 12px; }.input-field textarea { min-height:130px;padding:12px;resize:vertical;line-height:1.5; }.input-approval-form textarea { min-height:220px;padding:13px;resize:vertical;line-height:1.55; }
.input-field input:focus,.input-field textarea:focus,.input-approval-form textarea:focus { outline:3px solid rgba(47,110,215,.13);border-color:#4b7fd4; }
.input-summary-panel { overflow:hidden; }.input-summary-panel summary { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px;cursor:pointer;list-style:none;user-select:none; }.input-summary-panel summary::-webkit-details-marker { display:none; }
.input-summary-panel summary>span:first-child { display:grid;gap:3px; }.input-summary-panel summary small { color:var(--muted);font-size:.72rem;font-weight:500; }.input-summary-toggle { color:#225baa;font-size:.75rem;font-weight:800; }.input-summary-panel[open] .input-summary-toggle::after { content:" / скрыть"; }
.input-summary-content { padding:0 20px 20px; }.input-summary-content pre,.input-approved-result pre { margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.82rem;line-height:1.58; }.input-summary-content pre { padding:16px;border:1px solid #dfe7f2;border-radius:10px;background:#f7f9fc; }
.input-sticky-actions { position:sticky;bottom:14px;z-index:5;display:flex;justify-content:flex-end;gap:10px;padding:12px;border:1px solid rgba(190,204,224,.9);border-radius:13px;background:rgba(255,255,255,.94);box-shadow:0 14px 35px rgba(25,55,97,.12);backdrop-filter:blur(10px); }
.input-save-note { width:max-content;padding:9px 12px;border-radius:9px;color:#176b3d;background:#e6f5ec;font-size:.78rem;font-weight:800; }
.input-check-head h2 { margin:4px 0 7px; }.input-check-meta { display:flex;flex-wrap:wrap;gap:8px;margin:16px 0; }.input-check-meta span { padding:6px 9px;border-radius:999px;color:#53657d;background:#eef3f8;font-size:.7rem;font-weight:750; }
.input-approval-form { display:grid;gap:8px;margin-top:16px; }.input-approval-form small { color:var(--muted);font-size:.7rem; }.input-check-actions { display:flex;justify-content:flex-end;margin-top:7px; }
.input-empty-result { margin-top:16px;padding:18px;border:1px dashed #c8d5e6;border-radius:11px;background:#f8fafc; }.input-empty-result p { margin:4px 0 0;color:var(--muted); }
.input-approved-result { display:grid;gap:12px;margin-top:16px;padding:16px;border-radius:11px; }.input-approved-result.current { border:1px solid #b9ddc7;background:#f2fbf5; }.input-approved-result.stale { border:1px solid #edc690;background:#fff8ec; }
.input-approved-result>div { display:flex;justify-content:space-between;gap:14px;align-items:baseline; }.input-approved-result>div span { color:var(--muted);font-size:.72rem; }
.input-next-stage { display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 22px; }.input-next-stage.ready { border-color:#b9ddc7;background:#f5fbf7; }.input-next-stage.locked { background:#fafbfc; }.input-next-stage h2 { margin:4px 0 6px; }.input-next-stage p { margin:0;color:var(--muted); }
.button.disabled { pointer-events:none;opacity:.62; }
.input-history { overflow:hidden; }.input-history summary { padding:15px 18px;cursor:pointer;font-size:.78rem;font-weight:800; }.input-history>div { display:grid;border-top:1px solid var(--line); }
.input-history a { display:flex;justify-content:space-between;gap:12px;padding:11px 18px;color:var(--ink);text-decoration:none;border-bottom:1px solid #edf1f5; }.input-history a:last-child { border-bottom:0; }.input-history span { color:var(--muted);font-size:.72rem; }
.education-card-stage-real { margin-top:8px;padding:11px 12px;border:1px solid #d6e2f1;border-radius:10px;background:#f6f9fd; }
@media (max-width:760px) {
  .input-overview-hero,.input-data-hero,.input-check-head,.input-next-stage { flex-direction:column;align-items:stretch; }
  .input-stage-card { grid-template-columns:1fr; }.input-field-grid { grid-template-columns:1fr; }.input-field.wide { grid-column:auto; }
  .input-sticky-actions { position:static;flex-direction:column; }.input-sticky-actions .button,.input-next-stage .button { width:100%; }
  .input-approved-result>div { flex-direction:column; }
}


/* Input Course stale-result emphasis */
.input-approved-result > div {
  align-items: center;
}

.input-result-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.input-result-status.current {
  color: #176b3d;
  font-size: .75rem;
  font-weight: 800;
}

.input-result-status.stale {
  max-width: 520px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d69a3a;
  border-radius: 9px;
  color: #7a3f00;
  background: #fff3d8;
  box-shadow: inset 4px 0 0 #c87800;
}

.input-result-status.stale strong {
  font-size: .76rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.input-result-status.stale small {
  color: #7a4e18;
  font-size: .74rem;
  line-height: 1.35;
  font-weight: 650;
}

@media (max-width: 760px) {
  .input-result-status.stale {
    max-width: none;
    width: 100%;
  }
}


/* Input Questions V1 */
.questions-page { max-width:1220px; margin:0 auto; display:grid; gap:18px; }
.questions-lock-card,.questions-generation-panel,.questions-context { border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow); }
.questions-lock-card { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:24px; border-color:#edc690; background:#fffaf2; }
.questions-lock-card h2,.questions-panel-head h2 { margin:4px 0 7px; }
.questions-lock-card p,.questions-panel-head p { margin:0; color:var(--muted); }
.questions-context { overflow:hidden; }
.questions-context summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 20px; cursor:pointer; list-style:none; }
.questions-context summary::-webkit-details-marker { display:none; }
.questions-context summary>span:first-child { display:grid; gap:3px; }
.questions-context summary small { color:var(--muted); font-size:.72rem; font-weight:500; }
.questions-context-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:0 20px 20px; }
.questions-context-grid>div { min-width:0; padding:15px; border:1px solid #dfe7f2; border-radius:10px; background:#f7f9fc; }
.questions-context-grid h3 { margin:0 0 9px; font-size:.82rem; }
.questions-context-grid pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:.76rem; line-height:1.55; }
.questions-generation-panel { padding:22px; }
.questions-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; }
.questions-stale-warning { display:grid; gap:4px; margin:16px 0; padding:12px 14px; border:1px solid #d69a3a; border-radius:10px; color:#7a3f00; background:#fff3d8; box-shadow:inset 4px 0 0 #c87800; }
.questions-stale-warning span { font-size:.78rem; line-height:1.4; }
.questions-answer-form { display:grid; gap:16px; margin-top:16px; }
.questions-progress { display:grid; gap:4px; padding:12px 14px; border-radius:10px; background:#f3f6fa; }
.questions-progress strong { font-size:.82rem; }
.questions-progress span { color:var(--muted); font-size:.72rem; }
.questions-list { display:grid; gap:14px; }
.question-card { padding:18px; border:1px solid #dfe6ef; border-radius:12px; background:#fff; }
.question-card.answered { border-color:#b9ddc7; box-shadow:inset 4px 0 0 #4caf6a; }
.question-card-head { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; align-items:start; }
.question-card-head>span { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:#164f9e; background:#e1ebff; font-size:.8rem; font-weight:900; }
.question-card-head h3 { margin:2px 0 0; font-size:.96rem; line-height:1.4; }
.question-hint { margin:8px 0 10px 46px; color:var(--muted); font-size:.7rem; }
.question-options { display:grid; gap:8px; margin-left:46px; }
.question-option { display:grid; grid-template-columns:20px minmax(0,1fr); gap:9px; align-items:start; padding:10px 11px; border:1px solid #e1e7ef; border-radius:9px; background:#fafbfd; cursor:pointer; }
.question-option:hover { border-color:#b8c9df; background:#f5f8fc; }
.question-option input { margin-top:2px; }
.question-option span { font-size:.8rem; line-height:1.4; }
.question-other { display:grid; gap:6px; margin:12px 0 0 46px; }
.question-other>span { color:#263b58; font-size:.76rem; font-weight:800; }
.question-other textarea { min-height:78px; padding:10px 12px; border:1px solid #cbd7e6; border-radius:9px; background:#fbfdff; font:inherit; resize:vertical; }
.questions-summary { margin-top:0; }
@media (max-width:760px) {
  .questions-lock-card,.questions-panel-head { flex-direction:column; align-items:stretch; }
  .questions-context-grid { grid-template-columns:1fr; }
  .question-card-head { grid-template-columns:30px minmax(0,1fr); }
  .question-hint,.question-options,.question-other { margin-left:0; }
}


/* Final Brief V1 */
.final-brief-page { max-width: 1220px; margin: 0 auto; display: grid; gap: 18px; }
.brief-generation-panel { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.brief-preview-grid, .brief-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.brief-preview-row, .brief-result-grid > div { min-width: 0; display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #dfe7f2; border-radius: 10px; background: #f8fafc; }
.brief-preview-row strong, .brief-result-grid strong { color: #39506f; font-size: .7rem; letter-spacing: .02em; text-transform: uppercase; }
.brief-preview-row span, .brief-result-grid span { overflow-wrap: anywhere; font-size: .8rem; line-height: 1.45; }
.brief-preview-row.missing { border-color: #e0a34a; background: #fff7e8; }
.brief-approval-form { margin-top: 16px; }
.brief-approval-form textarea { min-height: 360px; line-height: 1.55; }
.brief-approved-result { display: grid; gap: 4px; padding: 18px; border: 1px solid #b9ddc7; border-radius: 13px; background: #f3fbf5; }
.brief-approved-result.stale { border-color: #e4b55f; background: #fff8e9; }
.brief-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.brief-result-grid { margin-top: 10px; }
@media (max-width: 760px) { .brief-preview-grid, .brief-result-grid { grid-template-columns: 1fr; } .brief-result-head { flex-direction: column; } }


/* Final Brief manual correction continuity */
.brief-continuity-note {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid #a9d7b7;
  border-radius: 10px;
  background: #f1faf4;
}

.brief-continuity-note strong {
  color: #236b3a;
}

.brief-continuity-note span,
.brief-continuity-note small,
.brief-continuity-note li {
  line-height: 1.45;
}

.brief-continuity-note ul,
.questions-stale-warning ul {
  margin: 2px 0 0 18px;
  padding: 0;
}


/* Audience V1A */
.audience-v1a-page {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.audience-generation-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.audience-card-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.audience-segment-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe7f2;
  border-radius: 13px;
  background: #fbfcfe;
}

.audience-segment-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.audience-segment-head h3 {
  margin: 1px 0 0;
}

.audience-segment-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  font-weight: 800;
  color: #315a9d;
}

.audience-description-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.audience-description-grid > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}

.audience-description-grid strong {
  color: #405674;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.audience-description-grid span {
  overflow-wrap: anywhere;
  font-size: .78rem;
  line-height: 1.4;
}

.audience-description-grid .missing {
  border-color: #e0a34a;
  background: #fff7e8;
}

.audience-feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.audience-feedback-grid label {
  display: grid;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: #405674;
}

.audience-feedback-grid textarea {
  min-height: 88px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid #ccd7e5;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  font: inherit;
  line-height: 1.45;
}

.audience-review-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .audience-description-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .audience-feedback-grid {
    grid-template-columns: 1fr;
  }

  .audience-review-actions {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Audience V1B */
.audience-v1b-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.audience-v1b-panel.locked { background: #f8fafc; }
.audience-selective-plan {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.audience-plan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fbfcfe;
}
.audience-plan-row > div { display: grid; gap: 2px; }
.audience-plan-row span { font-size: .78rem; color: #60738f; }
.audience-v2-card-grid { display: grid; gap: 16px; margin-top: 16px; }
.audience-change-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.audience-change-badges span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff0df;
  color: #95510b;
  font-size: .68rem;
  font-weight: 800;
}
.audience-change-badges .stable { background: #edf8f1; color: #257248; }
.audience-change-badges .dependency { background: #eef4ff; color: #315a9d; }
.audience-jtbd {
  border: 1px solid #dfe7f2;
  border-radius: 9px;
  background: #fff;
}
.audience-jtbd summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 800;
  color: #405674;
}
.audience-jtbd pre,
.audience-approved-text {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: .8rem;
  line-height: 1.55;
}
.audience-final-approval {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}
.audience-final-approval label { display: grid; gap: 8px; }
.audience-final-approval label > span { display: grid; gap: 3px; }
.audience-final-approval small { color: #6a7d97; font-weight: 500; }
.audience-final-approval textarea {
  min-height: 520px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #ccd7e5;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  line-height: 1.5;
}


/* Vacancies V1A */
.vacancies-page { display: grid; gap: 18px; }
.vacancy-source-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vacancy-source-strip details { padding: 14px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.vacancy-source-strip summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.vacancy-source-strip summary span { color: var(--muted); font-size: .75rem; }
.vacancy-source-strip pre { margin: 14px 0 0; max-height: 300px; overflow: auto; white-space: pre-wrap; font: inherit; font-size: .8rem; }
.vacancy-mode-note { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid #ffd596; border-radius: 12px; background: var(--warning-soft); }
.vacancy-mode-note.blocked { border-color: var(--line); background: #f7f9fc; }
.vacancy-mode-note h2 { margin: 2px 0 4px; font-size: 1.05rem; }
.vacancy-mode-note p { margin: 0; color: var(--muted); }
.market-track-candidates, .vacancy-approved-tracks > div { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.market-track-candidates span, .vacancy-approved-tracks span { padding: 7px 10px; border: 1px solid #cbd9ee; border-radius: 999px; background: #f2f7ff; color: #294c7d; font-size: .78rem; font-weight: 700; }
.market-track-approval { display: grid; gap: 12px; margin-top: 16px; }
.market-track-approval label { display: grid; gap: 6px; }
.market-track-approval label > span { display: grid; }
.market-track-approval small { color: var(--muted); font-weight: 400; }
.market-track-approval textarea { min-height: 118px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.vacancy-approved-tracks { margin-top: 16px; padding: 14px; border: 1px solid #b9ddc9; border-radius: 10px; background: #f4fbf7; }
.vacancy-section-locked { opacity: .7; }
.vacancy-search-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, .55fr) auto; gap: 12px; align-items: end; }
.vacancy-search-form label { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.vacancy-search-form input { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.vacancy-table-panel { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.vacancy-stub-warning { display: flex; gap: 12px; margin: 12px 0; padding: 12px 14px; border: 1px solid #ffd596; border-radius: 9px; background: var(--warning-soft); color: #74400d; font-size: .8rem; }
.vacancy-sheet-wrap { width: 100%; margin-top: 14px; overflow-x: auto; border: 1px solid #ccd5e2; border-radius: 8px; background: white; }
.vacancy-sheet { width: 100%; min-width: 1700px; border-collapse: collapse; table-layout: fixed; font-size: .76rem; }
.vacancy-sheet th, .vacancy-sheet td { border-right: 1px solid #d7dee8; border-bottom: 1px solid #d7dee8; vertical-align: top; }
.vacancy-sheet th { position: sticky; top: 0; z-index: 1; padding: 9px 8px; background: #eef3f8; color: #34465f; text-align: left; font-weight: 800; }
.vacancy-sheet th:not(.vacancy-include-col) { width: 235px; }
.vacancy-sheet .vacancy-include-col { width: 42px; text-align: center; }
.vacancy-sheet td textarea { width: 100%; min-height: 112px; padding: 8px; border: 0; resize: vertical; background: transparent; color: inherit; font: inherit; line-height: 1.35; }
.vacancy-sheet td textarea:focus { outline: 2px solid #7ea9ef; outline-offset: -2px; background: #f7fbff; }
.vacancy-sheet tr.excluded { opacity: .48; background: #f7f8fa; }
.vacancy-table-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 820px) {
  .vacancy-source-strip { grid-template-columns: 1fr; }
  .vacancy-mode-note { align-items: flex-start; flex-direction: column; }
  .vacancy-search-form { grid-template-columns: 1fr; }
  .vacancy-table-panel { padding: 14px; }
}


/* Vacancies V1A — spreadsheet UX correction */
.vacancy-table-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.vacancy-sheet-expand { white-space: nowrap; }
.vacancy-sheet-wrap {
  /* Collapsed mode: keep the page compact; the table scrolls inside its own work area. */
  max-height: 380px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.vacancy-sheet {
  min-width: 1500px;
}
.vacancy-sheet th:not(.vacancy-include-col) { width: auto; }
.vacancy-sheet th:nth-child(2), .vacancy-sheet td:nth-child(2) { width: 185px; min-width: 185px; }
.vacancy-sheet th:nth-child(3), .vacancy-sheet td:nth-child(3) { width: 220px; min-width: 220px; }
.vacancy-sheet th:nth-child(4), .vacancy-sheet td:nth-child(4) { width: 220px; min-width: 220px; }
.vacancy-sheet th:nth-child(n+5), .vacancy-sheet td:nth-child(n+5) { width: 215px; min-width: 215px; }
.vacancy-sheet td textarea {
  min-height: 84px;
  resize: vertical;
}
.vacancy-sheet th:first-child,
.vacancy-sheet td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
}
.vacancy-sheet th:first-child {
  z-index: 7;
  background: #eef3f8;
}
.vacancy-sheet th:nth-child(2),
.vacancy-sheet td:nth-child(2) {
  position: sticky;
  left: 42px;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 #d7dee8;
}
.vacancy-sheet th:nth-child(2) {
  z-index: 6;
  background: #eef3f8;
}
.vacancy-sheet tr.excluded td:first-child,
.vacancy-sheet tr.excluded td:nth-child(2) { background: #f7f8fa; }
body.vacancy-sheet-open { overflow: hidden; }
.vacancy-table-panel.sheet-expanded {
  position: fixed;
  inset: 12px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(21, 39, 67, .22);
}
.vacancy-table-panel.sheet-expanded .vacancy-table-head { flex: 0 0 auto; }
.vacancy-table-panel.sheet-expanded .vacancy-stub-warning,
.vacancy-table-panel.sheet-expanded .questions-stale-warning,
.vacancy-table-panel.sheet-expanded .input-save-note { flex: 0 0 auto; }
.vacancy-table-panel.sheet-expanded form {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.vacancy-table-panel.sheet-expanded .vacancy-sheet-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-top: 10px;
}
.vacancy-table-panel.sheet-expanded .vacancy-table-actions { flex: 0 0 auto; }
.vacancy-table-panel.sheet-expanded > details { display: none; }
@media (max-width: 820px) {
  .vacancy-table-head-actions { justify-content: flex-start; }
  .vacancy-table-panel.sheet-expanded { inset: 6px; padding: 10px; }
}

/* Vacancies V1A — true collapsed preview: no page-width spreadsheet overflow. */
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet-wrap {
  overflow-x: hidden;
}
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet {
  width: 100%;
  min-width: 0;
}
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet th:nth-child(n+5),
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet td:nth-child(n+5) {
  display: none;
}
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet th:nth-child(2),
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet td:nth-child(2) {
  width: 24%;
  min-width: 0;
}
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet th:nth-child(3),
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet td:nth-child(3) {
  width: 34%;
  min-width: 0;
}
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet th:nth-child(4),
.vacancy-table-panel:not(.sheet-expanded) .vacancy-sheet td:nth-child(4) {
  width: 42%;
  min-width: 0;
}
.vacancy-table-panel.sheet-expanded .vacancy-sheet th:nth-child(n+5),
.vacancy-table-panel.sheet-expanded .vacancy-sheet td:nth-child(n+5) {
  display: table-cell;
}
.vacancy-table-panel.sheet-expanded .vacancy-sheet {
  min-width: 1500px;
}


/* Snapshot V1A — spreadsheet UX, intentionally mirrors proven Vacancies behavior. */
.snapshot-page { display: grid; gap: 18px; }
.snapshot-source-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.snapshot-source-strip details { padding: 14px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.snapshot-source-strip summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.snapshot-source-strip summary span { color: var(--muted); font-size: .75rem; }
.snapshot-source-strip pre { margin: 14px 0 0; max-height: 280px; overflow: auto; white-space: pre-wrap; font: inherit; font-size: .8rem; }
.snapshot-source-list { display: grid; gap: 8px; margin-top: 12px; max-height: 320px; overflow: auto; }
.snapshot-source-list > div { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.snapshot-source-list span { color: var(--muted); font-size: .76rem; }
.snapshot-source-list a { font-size: .76rem; }
.snapshot-source-warning { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid #ffd596; border-radius: 9px; background: var(--warning-soft); color: #74400d; font-size: .8rem; }
.snapshot-table-panel { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.snapshot-table-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.snapshot-sheet-expand { white-space: nowrap; }
.snapshot-sheet-wrap { width: 100%; max-height: 360px; margin-top: 14px; overflow: auto; border: 1px solid #ccd5e2; border-radius: 8px; background: white; }
.snapshot-sheet { width: 100%; min-width: 2600px; border-collapse: collapse; table-layout: fixed; font-size: .76rem; }
.snapshot-sheet th, .snapshot-sheet td { border-right: 1px solid #d7dee8; border-bottom: 1px solid #d7dee8; vertical-align: top; }
.snapshot-sheet th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; background: #eef3f8; color: #34465f; text-align: left; font-weight: 800; }
.snapshot-sheet th:not(.snapshot-include-col) { width: 220px; min-width: 220px; }
.snapshot-sheet .snapshot-include-col { width: 42px; min-width: 42px; text-align: center; }
.snapshot-sheet td { padding: 8px; line-height: 1.35; }
.snapshot-sheet td textarea { width: 100%; min-height: 94px; padding: 7px; border: 1px solid #d7dee8; border-radius: 6px; resize: vertical; background: white; color: inherit; font: inherit; line-height: 1.35; }
.snapshot-sheet td pre { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.35; }
.snapshot-sheet tr.excluded { opacity: .48; background: #f7f8fa; }
.snapshot-process-title { font-weight: 700; }
.snapshot-sheet td small { display: block; margin-top: 5px; color: var(--muted); }
.snapshot-evidence { min-width: 170px; }
.snapshot-evidence summary { cursor: pointer; font-weight: 700; }
.snapshot-evidence a { display: block; margin-top: 6px; font-size: .72rem; }
.snapshot-row-actions { display: grid; align-content: start; gap: 7px; min-width: 180px; }
.snapshot-row-actions .button { width: 100%; }
.snapshot-table-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font-size: .78rem; }
.snapshot-table-actions > div { display: flex; gap: 10px; flex: 0 0 auto; }
.snapshot-result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.snapshot-copy-source { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
body.snapshot-sheet-open { overflow: hidden; }
.snapshot-table-panel.sheet-expanded { position: fixed; inset: 12px; z-index: 80; display: flex; flex-direction: column; max-width: none; padding: 14px; overflow: hidden; background: #f8fafc; }
.snapshot-table-panel.sheet-expanded .snapshot-table-head { flex: 0 0 auto; }
.snapshot-table-panel.sheet-expanded form { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.snapshot-table-panel.sheet-expanded .snapshot-sheet-wrap { flex: 1 1 auto; min-height: 0; max-height: none !important; margin-top: 10px; }
.snapshot-table-panel.sheet-expanded .snapshot-table-actions { flex: 0 0 auto; }
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet { min-width: 0; table-layout: fixed; }
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet th:nth-child(n+5),
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet td:nth-child(n+5) { display: none; }
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet th:nth-child(2),
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet td:nth-child(2) { width: 24%; min-width: 0; }
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet th:nth-child(3),
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet td:nth-child(3) { width: 46%; min-width: 0; }
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet th:nth-child(4),
.snapshot-table-panel:not(.sheet-expanded) .snapshot-sheet td:nth-child(4) { width: 30%; min-width: 0; }
.snapshot-table-panel.sheet-expanded .snapshot-sheet th:nth-child(2),
.snapshot-table-panel.sheet-expanded .snapshot-sheet td:nth-child(2) { width: 190px; min-width: 190px; }
.snapshot-table-panel.sheet-expanded .snapshot-sheet th:nth-child(3),
.snapshot-table-panel.sheet-expanded .snapshot-sheet td:nth-child(3) { width: 250px; min-width: 250px; }
.snapshot-table-panel.sheet-expanded .snapshot-sheet th:nth-child(4),
.snapshot-table-panel.sheet-expanded .snapshot-sheet td:nth-child(4) { width: 190px; min-width: 190px; }
@media (max-width: 820px) {
  .snapshot-source-strip { grid-template-columns: 1fr; }
  .snapshot-table-panel { padding: 14px; }
  .snapshot-table-head-actions { justify-content: flex-start; }
  .snapshot-table-actions { align-items: stretch; flex-direction: column; }
  .snapshot-table-actions > div { flex-wrap: wrap; }
  .snapshot-table-panel.sheet-expanded { inset: 6px; padding: 10px; }
}
.snapshot-desc-stale { display: inline-block; margin-top: 6px; padding: 3px 6px; border-radius: 999px; background: #fff0cc; color: #8a5300; font-size: .68rem; font-weight: 800; }

/* Snapshot UX pilot — separate input, work and service context into tabs. */
.snapshot-sticky-header {
  position: sticky;
  top: 58px;
  z-index: 12;
  display: grid;
  gap: 10px;
  padding: 12px 0 10px;
  background: #f5f7fa;
}
.snapshot-page .snapshot-hero { margin: 0; }
.snapshot-page .snapshot-hero > div { width: 100%; max-width: none; }
.snapshot-page .snapshot-hero p { max-width: none; }
.snapshot-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px; }
.snapshot-title-row h1 { margin: 0; }
.snapshot-model-label { font-size: 1.08rem; font-weight: 850; }
.snapshot-model-label.ai { color: #18864b; }
.snapshot-model-label.no-ai { color: #c73832; }

.snapshot-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #eef2f7;
}
.snapshot-workspace-tab {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #617087;
  font: inherit;
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
}
.snapshot-workspace-tab:hover { color: #27364b; background: rgba(255,255,255,.65); }
.snapshot-workspace-tab.active { color: #244fc4; background: #fff; box-shadow: 0 1px 3px rgba(23,36,58,.08); }

.snapshot-workspace-panel { display: none; gap: 18px; }
.snapshot-workspace-panel.active { display: grid; }

.snapshot-input-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.snapshot-input-copy h2 { margin: 0; }
.snapshot-input-copy p:last-child { margin: 8px 0 0; color: var(--muted); }
.snapshot-input-heading-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 2px; }
.snapshot-input-details { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
.snapshot-input-details > summary { cursor: pointer; color: #334766; font-weight: 750; }
.snapshot-input-details .snapshot-source-list { margin-top: 12px; }

.snapshot-technical-summary {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.snapshot-technical-summary strong { color: #27364b; font-size: 1rem; }
.snapshot-technical-summary p { margin: 0; color: var(--muted); }
.snapshot-provenance-compact {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.snapshot-provenance-compact > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.snapshot-provenance-compact > summary::-webkit-details-marker { display: none; }
.snapshot-provenance-compact > summary span:first-child { display: grid; gap: 2px; }
.snapshot-provenance-compact > summary small { color: var(--muted); font-weight: 500; }
.snapshot-provenance-compact > summary span:last-child { color: #244fc4; font-size: .82rem; font-weight: 750; white-space: nowrap; }
.snapshot-provenance-details { padding: 0 14px 14px; }
.snapshot-provenance-details > * { margin: 0 !important; box-shadow: none !important; }

.snapshot-history-panel { display: grid; gap: 14px; }
.snapshot-history-heading h2 { margin: 2px 0 5px; }
.snapshot-history-heading p:last-child { margin: 0; color: var(--muted); line-height: 1.5; }
.snapshot-history-list { display: grid; }
.snapshot-history-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.snapshot-history-list > a:hover { background: #f7f9fc; }
.snapshot-history-version { display: grid; gap: 3px; }
.snapshot-history-version strong { color: #27364b; }
.snapshot-history-version small { color: var(--muted); }
.snapshot-history-action { color: #244fc4; font-size: .8rem; font-weight: 750; white-space: nowrap; }
.snapshot-help-expanded > summary { display: none; }

.snapshot-empty-tab {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.snapshot-empty-tab h2 { margin: 0 0 6px; }
.snapshot-empty-tab p { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .snapshot-sticky-header { top: 58px; }
  .snapshot-workspace-tabs { padding-bottom: 4px; }
  .snapshot-input-card { grid-template-columns: 1fr; }
  .snapshot-history-list > a { align-items: flex-start; flex-direction: column; gap: 6px; }
}

/* Skillset V1A — mirrors the proven Snapshot/Vacancies spreadsheet interaction. */
.skillset-page { display: grid; gap: 18px; }
.skillset-source-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skillset-source-strip details { padding: 14px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.skillset-source-strip summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.skillset-source-strip summary span { color: var(--muted); font-size: .75rem; }
.skillset-source-strip pre { margin: 14px 0 0; max-height: 300px; overflow: auto; white-space: pre-wrap; font: inherit; font-size: .8rem; }
.skillset-source-list { display: grid; gap: 8px; margin-top: 12px; max-height: 320px; overflow: auto; }
.skillset-source-list > div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.skillset-source-list span, .skillset-source-list small { color: var(--muted); font-size: .76rem; }
.skillset-source-warning { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid #ffd596; border-radius: 9px; background: var(--warning-soft); color: #74400d; font-size: .8rem; }
.skillset-generation-chain { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.skillset-generation-chain summary { cursor: pointer; font-weight: 800; }
.skillset-generation-chain div { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: .78rem; }
.skillset-table-panel { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.skillset-table-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.skillset-sheet-expand { white-space: nowrap; }
.skillset-sheet-wrap { width: 100%; max-height: 360px; margin-top: 14px; overflow: auto; border: 1px solid #ccd5e2; border-radius: 8px; background: white; }
.skillset-sheet { width: 100%; min-width: 2050px; border-collapse: collapse; table-layout: fixed; font-size: .76rem; }
.skillset-sheet th, .skillset-sheet td { border-right: 1px solid #d7dee8; border-bottom: 1px solid #d7dee8; vertical-align: top; }
.skillset-sheet th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; background: #eef3f8; color: #34465f; text-align: left; font-weight: 800; }
.skillset-sheet th:not(.skillset-include-col) { width: 220px; min-width: 220px; }
.skillset-sheet .skillset-include-col { width: 42px; min-width: 42px; text-align: center; }
.skillset-sheet td { padding: 8px; line-height: 1.35; }
.skillset-sheet td textarea { width: 100%; min-height: 94px; padding: 7px; border: 1px solid #d7dee8; border-radius: 6px; resize: vertical; background: white; color: inherit; font: inherit; line-height: 1.35; }
.skillset-sheet td pre { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.35; }
.skillset-sheet tr.excluded { opacity: .48; background: #f7f8fa; }
.skillset-skill-title { font-weight: 700; }
.skillset-sheet td small { display: block; margin-top: 5px; color: var(--muted); }
.skillset-evidence summary { cursor: pointer; font-weight: 700; }
.skillset-evidence span { display: block; margin-top: 6px; font-size: .72rem; }
.skillset-source-ref { display: grid; gap: 2px; margin-bottom: 7px; }
.skillset-source-ref span { color: var(--muted); font-size: .7rem; }
.skillset-vacancy-link { display: block; margin-bottom: 7px; font-size: .72rem; }
.skillset-row-actions { display: grid; align-content: start; gap: 7px; min-width: 180px; }
.skillset-row-actions .button { width: 100%; }
.skillset-table-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font-size: .78rem; }
.skillset-table-actions > div { display: flex; gap: 10px; flex: 0 0 auto; }
.skillset-result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.skillset-copy-source { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
body.skillset-sheet-open { overflow: hidden; }
.skillset-table-panel.sheet-expanded { position: fixed; inset: 58px 12px 12px; z-index: 80; display: flex; flex-direction: column; max-width: none; padding: 14px; overflow: hidden; background: #f8fafc; }
.skillset-table-panel.sheet-expanded .skillset-table-head { flex: 0 0 auto; }
.skillset-table-panel.sheet-expanded form { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.skillset-table-panel.sheet-expanded .skillset-sheet-wrap { flex: 1 1 auto; min-height: 0; max-height: none !important; margin-top: 10px; }
.skillset-table-panel.sheet-expanded .skillset-table-actions { flex: 0 0 auto; }
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet { min-width: 0; table-layout: fixed; }
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet th:nth-child(n+5),
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet td:nth-child(n+5) { display: none; }
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet th:nth-child(2),
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet td:nth-child(2) { width: 27%; min-width: 0; }
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet th:nth-child(3),
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet td:nth-child(3) { width: 43%; min-width: 0; }
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet th:nth-child(4),
.skillset-table-panel:not(.sheet-expanded) .skillset-sheet td:nth-child(4) { width: 30%; min-width: 0; }
.skillset-table-panel.sheet-expanded .skillset-sheet th:nth-child(2),
.skillset-table-panel.sheet-expanded .skillset-sheet td:nth-child(2) { width: 210px; min-width: 210px; }
.skillset-table-panel.sheet-expanded .skillset-sheet th:nth-child(3),
.skillset-table-panel.sheet-expanded .skillset-sheet td:nth-child(3) { width: 280px; min-width: 280px; }
.skillset-table-panel.sheet-expanded .skillset-sheet th:nth-child(4),
.skillset-table-panel.sheet-expanded .skillset-sheet td:nth-child(4) { width: 210px; min-width: 210px; }
@media (max-width: 820px) {
  .skillset-source-strip { grid-template-columns: 1fr; }
  .skillset-table-panel { padding: 14px; }
  .skillset-table-head-actions { justify-content: flex-start; }
  .skillset-table-actions { align-items: stretch; flex-direction: column; }
  .skillset-table-actions > div { flex-wrap: wrap; }
  .skillset-table-panel.sheet-expanded { inset: 58px 6px 6px; padding: 10px; }
}


/* Educational Project Help Layer V1 */
.project-help { margin:-10px 0 24px; overflow:hidden; border:1px solid #d8e3f0; border-radius:13px; background:#f8fbff; box-shadow:0 4px 16px rgba(23,36,58,.025); }
.project-help > summary { display:flex; align-items:center; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; user-select:none; }
.project-help > summary::-webkit-details-marker { display:none; }
.project-help-icon { width:30px; height:30px; flex:0 0 auto; display:grid; place-items:center; border-radius:9px; color:#174fa8; background:#e3edff; font-weight:900; }
.project-help-summary-copy { min-width:0; display:grid; gap:2px; }
.project-help-summary-copy strong { color:#263750; font-size:.84rem; }
.project-help-summary-copy small { color:var(--muted); font-size:.7rem; }
.project-help-toggle { margin-left:auto; color:#225baa; font-size:.74rem; font-weight:800; }
.project-help-toggle::after { content:" ↓"; }
.project-help[open] .project-help-toggle { font-size:0; }
.project-help[open] .project-help-toggle::before { content:"Скрыть ↑"; font-size:.74rem; }
.project-help-body { display:grid; gap:14px; padding:0 16px 16px 58px; }
.project-help-copy { max-width:980px; color:#34465f; font-size:.86rem; line-height:1.65; }
.project-help-copy > :first-child { margin-top:0; }
.project-help-copy > :last-child { margin-bottom:0; }
.project-help-copy p { margin:0 0 11px; }
.project-help-copy h3 { margin:20px 0 8px; color:#263750; font-size:.92rem; line-height:1.35; font-weight:850; }
.project-help-copy ul,
.project-help-copy ol { margin:0 0 13px; padding-left:1.35rem; }
.project-help-copy li { margin:4px 0; padding-left:2px; }
.project-help-copy strong { color:#263750; font-weight:850; }
.project-help-callout { margin:17px 0 2px; padding:12px 14px; border-left:3px solid #4b7fd4; border-radius:0 10px 10px 0; background:#edf4ff; }
.project-help-callout p { margin:0; color:#2f4768; }
.project-help-placeholder { max-width:980px; padding:15px 16px; border:1px dashed #b8c9df; border-radius:10px; background:#fff; }
.project-help-placeholder-label { display:inline-flex; margin-bottom:6px; color:#315d9a; font-size:.7rem; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.project-help-placeholder p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.55; }
.project-help-editor { max-width:980px; border-top:1px solid #dce6f2; padding-top:12px; }
.project-help-editor > summary { width:max-content; color:#225baa; cursor:pointer; font-size:.78rem; font-weight:800; }
.project-help-editor form { display:grid; gap:8px; margin-top:12px; }
.project-help-editor label { color:#40516a; font-size:.76rem; font-weight:800; }
.project-help-editor-hint { margin:0; color:var(--muted); font-size:.72rem; line-height:1.5; }
.project-help-editor-hint code { padding:1px 4px; border-radius:4px; background:#edf3fb; color:#315d9a; font-family:inherit; font-size:.95em; }
.project-help-editor textarea { width:100%; min-height:220px; padding:12px; border:1px solid #cbd7e6; border-radius:10px; color:var(--ink); background:#fff; font:inherit; line-height:1.55; resize:vertical; }
.project-help-editor textarea:focus { outline:3px solid rgba(47,110,215,.13); border-color:#4b7fd4; }
.project-help-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media (max-width:720px) {
  .project-help { margin-top:-6px; }
  .project-help-body { padding-left:16px; }
  .project-help-summary-copy small { display:none; }
  .project-help-actions .button { flex:1 1 140px; }
}



/* Educational Project Help Center + Agent Playbook V1 */
.project-help-tabs { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:end; gap:0; max-width:980px; }
.project-help-tab-input { position:absolute; inline-size:1px; block-size:1px; opacity:0; pointer-events:none; }
.project-help-tab-label { padding:8px 12px; border-bottom:2px solid transparent; color:#64748b; cursor:pointer; font-size:.78rem; font-weight:800; }
.project-help-tab-input:focus-visible + .project-help-tab-label { outline:3px solid rgba(47,110,215,.16); outline-offset:2px; }
.project-help-tab-panel { display:none; grid-column:1 / -1; width:100%; padding-top:14px; }
.project-help-tabs > .project-help-tab-input:nth-of-type(1):checked ~ .project-help-human-panel,
.project-help-tabs > .project-help-tab-input:nth-of-type(2):checked ~ .project-help-agent-panel { display:block; }
.project-help-tabs > .project-help-tab-input:nth-of-type(1):checked + .project-help-tab-label,
.project-help-tabs > .project-help-tab-input:nth-of-type(2):checked + .project-help-tab-label { border-bottom-color:#315ef6; color:#1746bc; }
.project-help-agent-placeholder { border-color:#c8b9e8; background:#fbf9ff; }
.project-help-admin-link { max-width:980px; padding-top:2px; }
.project-help-admin-link .button { min-height:34px; padding:6px 10px; font-size:.76rem; }
.help-library { display:grid; gap:18px; max-width:1280px; }
.help-library-heading h1 { margin:3px 0 7px; }
.help-library-heading p:last-child { margin:0; max-width:820px; color:var(--muted); }
.help-library-intro { padding:16px 18px; border:1px solid #d9e2f1; border-radius:12px; background:#f8faff; }
.help-library-intro p { margin:4px 0 0; color:#5f6d82; font-size:.9rem; }
.help-library-list { display:grid; gap:14px; }
.help-library-card { scroll-margin-top:82px; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:#fff; }
.help-library-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:17px 18px 14px; border-bottom:1px solid var(--line); background:#fafbfd; }
.help-library-card-heading h2 { margin:3px 0 0; font-size:1.08rem; }
.help-library-card-heading small, .help-library-key { color:#7a8799; font-size:.72rem; }
.help-library-key { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.help-library-editor { padding:18px; }
.help-library-editor-grid, .help-library-reader-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.help-library-editor label { display:grid; align-content:start; gap:6px; }
.help-library-editor label > span { color:#263750; font-size:.86rem; font-weight:850; }
.help-library-editor label > small { min-height:34px; color:#758196; font-size:.72rem; line-height:1.45; }
.help-library-editor textarea { box-sizing:border-box; width:100%; min-height:280px; padding:12px 13px; border:1px solid #cbd7e6; border-radius:10px; background:#fff; color:var(--ink); font:inherit; line-height:1.55; resize:vertical; }
.help-library-editor textarea:focus { border-color:#4b7fd4; outline:3px solid rgba(47,110,215,.13); }
.help-library-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:14px; }
.help-library-actions span { color:#7a8799; font-size:.74rem; }
.help-library-reader-grid { padding:18px; }
.help-library-reader-grid > section { min-width:0; padding:14px; border:1px solid #e3e7ed; border-radius:10px; }
.help-library-reader-grid h3 { margin-top:0; }
.help-library-empty { margin:0; color:#7a8799; font-size:.88rem; }
@media (max-width:820px) { .help-library-editor-grid, .help-library-reader-grid { grid-template-columns:1fr; } .help-library-actions { align-items:stretch; flex-direction:column; } .help-library-actions .button { width:100%; } }

/* AI Spend Panel V1 */
.ai-spend-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -10px 0 26px;
  padding: 11px 14px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(23, 36, 58, .035);
}
.ai-spend-panel-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.ai-spend-panel-copy strong {
  color: #17243a;
  font-size: .84rem;
}
.ai-spend-panel-copy span {
  color: #617089;
  font-size: .8rem;
}
.ai-spend-panel form {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .ai-spend-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .ai-spend-panel .button {
    width: 100%;
  }
}


/* IDEAS V1 VISUAL LAYER */
.ideas-page {
  max-width: 1180px;
}

.ideas-heading {
  margin: 8px 0 24px;
}

.ideas-heading h1 {
  margin: 5px 0 6px;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  letter-spacing: -.055em;
}

.ideas-heading > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.55;
}

.ideas-compose-card,
.ideas-list-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.ideas-compose-card {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(0, 1.55fr);
  gap: 28px;
  padding: 22px;
}

.ideas-compose-copy {
  display: grid;
  align-content: start;
  gap: 6px;
}

.ideas-compose-copy strong {
  font-size: 1rem;
}

.ideas-compose-copy span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.ideas-form {
  display: grid;
  gap: 12px;
}

.ideas-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 126px;
  resize: vertical;
  padding: 14px 15px;
  border: 1px solid #cdd6e2;
  border-radius: 10px;
  outline: none;
  background: #fbfcfe;
  color: #17243a;
  font: inherit;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ideas-form textarea:focus {
  border-color: #7ea7e8;
  box-shadow: 0 0 0 3px rgba(45, 102, 194, .10);
  background: #fff;
}

.ideas-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ideas-form-footer > span {
  color: var(--muted);
  font-size: .76rem;
}

.ideas-form-footer .form-error {
  margin: 0;
  font-size: .78rem;
}

.ideas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 12px;
}

.ideas-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e9eef5;
}

.ideas-tab {
  padding: 8px 14px;
  border-radius: 7px;
  color: #64758d;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 750;
}

.ideas-tab.active {
  color: #183f7d;
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 36, 58, .08);
}

.ideas-toolbar-caption {
  color: var(--muted);
  font-size: .78rem;
}

.ideas-list-card {
  overflow: hidden;
}

.ideas-list-heading {
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.ideas-list-heading h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.ideas-list-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.ideas-table-wrap {
  overflow-x: auto;
}

.ideas-table {
  width: 100%;
  border-collapse: collapse;
}

.ideas-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: #77869a;
  text-align: left;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.ideas-table td {
  padding: 16px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: top;
}

.ideas-table tbody tr:last-child td {
  border-bottom: 0;
}

.ideas-main-cell {
  min-width: 340px;
}

.ideas-title {
  display: block;
  color: #17243a;
  font-size: .92rem;
  line-height: 1.4;
}

.ideas-title-raw {
  font-weight: 650;
}

.ideas-description {
  max-width: 650px;
  margin: 6px 0 0;
  color: #5f7088;
  font-size: .82rem;
  line-height: 1.5;
}

.ideas-ai-chip,
.ideas-raw-chip {
  display: inline-flex;
  margin-top: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 750;
}

.ideas-ai-chip {
  color: #51408f;
  background: #eee9ff;
}

.ideas-raw-chip {
  color: #63748b;
  background: #eef2f6;
}

.ideas-source {
  margin-top: 10px;
  color: #718198;
  font-size: .73rem;
}

.ideas-source summary {
  cursor: pointer;
}

.ideas-source p {
  margin: 7px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f9fc;
  line-height: 1.45;
}

.ideas-meta-cell {
  min-width: 130px;
}

.ideas-meta-cell strong,
.ideas-meta-cell span,
.ideas-date-cell span {
  display: block;
}

.ideas-meta-cell strong {
  font-size: .8rem;
}

.ideas-meta-cell span,
.ideas-date-cell,
.ideas-date-cell span {
  color: #77869a;
  font-size: .72rem;
}

.ideas-actions-column {
  min-width: 220px;
}

.ideas-actions-cell {
  min-width: 220px;
}

.ideas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ideas-actions form {
  margin: 0;
}

.ideas-actions .button {
  white-space: nowrap;
}

.ideas-ai-button {
  color: #3f3a85;
  border-color: #cfc7ee;
  background: #f7f5ff;
}

.ideas-ai-button:hover {
  background: #efebff;
}

.ideas-ai-error {
  max-width: 220px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: .7rem;
  line-height: 1.35;
}

.ideas-empty {
  display: grid;
  justify-items: center;
  padding: 48px 24px 52px;
  text-align: center;
}

.ideas-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 12px;
  color: #456ba6;
  background: #e6eefb;
  font-size: 1.1rem;
}

.ideas-empty strong {
  font-size: .94rem;
}

.ideas-empty p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

@media (max-width: 820px) {
  .ideas-compose-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ideas-toolbar,
  .ideas-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ideas-toolbar-caption {
    display: none;
  }
}

.ideas-edit {
  position: relative;
}

.ideas-edit > summary {
  list-style: none;
  cursor: pointer;
}

.ideas-edit > summary::-webkit-details-marker {
  display: none;
}

.ideas-edit[open] {
  width: 100%;
  flex-basis: 100%;
}

.ideas-edit form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fc;
}

.ideas-edit label {
  display: grid;
  gap: 5px;
  color: #62738b;
  font-size: .72rem;
  font-weight: 700;
}

.ideas-edit input,
.ideas-edit textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cdd6e2;
  border-radius: 8px;
  background: #fff;
  color: #17243a;
  font: inherit;
}

/* Ideas UX-1b: compact AI badge beside title */
.ideas-main-cell > .ideas-title {
  display: inline;
}

.ideas-main-cell > .ideas-ai-chip {
  margin: 0 0 0 7px;
  vertical-align: middle;
}

/* Ideas UX-2: compact actions */
.ideas-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.ideas-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  line-height: 1;
}

.ideas-edit-icon {
  width: 34px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center;
}

/* Ideas UX-3: wide editor */
.ideas-edit[open] {
  width: auto;
  flex-basis: auto;
}

.ideas-edit[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(20, 32, 50, .35);
}

.ideas-edit[open] form {
  position: fixed;
  z-index: 999;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  box-sizing: border-box;
  margin: 0;
  padding: 20px;
  overflow: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 24px 70px rgba(20, 32, 50, .22);
}

.ideas-edit[open] input,
.ideas-edit[open] textarea {
  width: 100%;
  box-sizing: border-box;
}

.ideas-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


/* Ideas Prompt Tab V1 */
.ideas-prompt-panel {
  padding: 18px;
}

.ideas-prompt-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: #64758d;
  font-size: .78rem;
}

.ideas-prompt-meta strong {
  color: #25364d;
}

.ideas-prompt-form {
  display: grid;
  gap: 12px;
}

.ideas-prompt-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 480px;
  padding: 14px;
  border: 1px solid #cbd5e2;
  border-radius: 10px;
  background: #fff;
  color: #17243a;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.ideas-prompt-form textarea:focus {
  border-color: #7ea7e8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 102, 194, .09);
}

.ideas-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ideas-prompt-footer span {
  color: #718096;
  font-size: .74rem;
}

.ideas-prompt-success {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f7f2;
  color: #365f43;
  font-size: .78rem;
}

.ideas-table tbody tr.ideas-priority-row td {
  background: #dff1e3;
}

.ideas-table tbody tr.ideas-priority-row td:first-child {
  box-shadow: inset 4px 0 0 #4f9a63;
}

.ideas-priority-button {
  min-width: 2.5rem;
  width: 2.5rem;
  padding: 0.45rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.ideas-priority-button.is-active {
  background: #e3f3e7;
  border-color: #6aa979;
  color: #2f6b3d;
}


/* Ideas V2: directions, semantic closure, grouped history */
.ideas-list-heading-filter,
.ideas-directions-heading,
.ideas-closed-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ideas-directions {
  display: grid;
  gap: 14px;
}

.ideas-directions-heading {
  padding: 4px 2px;
}

.ideas-directions-heading h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.ideas-directions-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.ideas-directions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ideas-direction-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ideas-direction-card:hover {
  border-color: #b8c7da;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(23, 36, 58, .09);
}

.ideas-direction-card-other {
  border-style: dashed;
  background: #f8fafc;
}

.ideas-direction-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ideas-direction-card-top strong {
  color: #17243a;
  font-size: .98rem;
  line-height: 1.35;
}

.ideas-direction-card-top > span {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 6px;
  border-radius: 10px;
  background: #eef3fa;
  color: #315b91;
  font-size: .78rem;
  font-weight: 800;
}

.ideas-direction-card p {
  margin: 0;
  color: #617289;
  font-size: .79rem;
  line-height: 1.5;
}

.ideas-direction-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  color: #7a899d;
  font-size: .72rem;
}

.ideas-direction-metrics strong {
  color: #334861;
}

.ideas-direction-cell {
  min-width: 260px;
}

.ideas-direction-form {
  display: grid;
  min-width: 250px;
  gap: 7px;
}

.ideas-direction-form select,
.ideas-close select {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #cdd6e2;
  border-radius: 8px;
  background: #fff;
  color: #17243a;
  font: inherit;
  font-size: .76rem;
}

.ideas-direction-form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ideas-direction-form .button {
  justify-self: start;
}

.ideas-direction-saved {
  color: #3e6a4a;
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}

.ideas-direction-chip,
.ideas-closure-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 750;
  line-height: 1.2;
}

.ideas-direction-chip {
  color: #345b75;
  background: #eaf3f8;
}

.ideas-closure-chip {
  margin: 0 0 0 7px;
  color: #6b4f20;
  background: #fff2d8;
  vertical-align: middle;
}

.ideas-closed-groups {
  display: grid;
}

.ideas-closed-group + .ideas-closed-group {
  border-top: 1px solid var(--line);
}

.ideas-closed-group-heading {
  padding: 15px 18px 10px;
  background: #fafbfd;
}

.ideas-closed-group-heading h3 {
  margin: 0;
  color: #2c3f56;
  font-size: .86rem;
}

.ideas-closed-group-heading span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #edf1f6;
  color: #607187;
  font-size: .72rem;
  font-weight: 800;
}

.ideas-close {
  position: relative;
}

.ideas-close > summary {
  list-style: none;
  cursor: pointer;
}

.ideas-close > summary::-webkit-details-marker {
  display: none;
}

.ideas-close[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(20, 32, 50, .35);
}

.ideas-close[open] form {
  position: fixed;
  z-index: 999;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(620px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  box-sizing: border-box;
  gap: 14px;
  margin: 0;
  padding: 20px;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 32, 50, .22);
}

.ideas-close label {
  display: grid;
  gap: 6px;
  color: #62738b;
  font-size: .75rem;
  font-weight: 700;
}

.ideas-close-hint {
  margin: -4px 0 0;
  color: #7c8b9d;
  font-size: .72rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .ideas-directions-grid {
    grid-template-columns: 1fr;
  }

  .ideas-list-heading-filter,
  .ideas-directions-heading,
  .ideas-closed-group-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ========================================================================== */
/* SYCHEVLAB EDUCATIONAL PROJECT UI V2                                        */
/* Approved visual system: work-first, Russian-first, low-noise.              */
/* ========================================================================== */
.educational-project-uiux-v2 {
  --v2-bg: #f6f7f9;
  --v2-surface: #ffffff;
  --v2-sidebar: #f1f3f6;
  --v2-ink: #172033;
  --v2-muted: #647084;
  --v2-line: #e3e7ed;
  --v2-line-strong: #d6dce5;
  --v2-accent: #315ef6;
  --v2-accent-hover: #2448cf;
  --v2-accent-soft: #eef3ff;
  --v2-success: #18794e;
  --v2-success-soft: #e9f7ef;
  --v2-warning: #9a5700;
  --v2-warning-soft: #fff4df;
  --v2-danger: #b42318;
  --v2-danger-soft: #fff0ee;
  color: var(--v2-ink);
  background: var(--v2-bg);
  font-size: 16px;
  line-height: 1.55;
}
.educational-project-uiux-v2 .project-shell { grid-template-columns: 236px minmax(0,1fr); background: var(--v2-bg); }
.educational-project-uiux-v2 .project-sidebar {
  width: 236px;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--v2-line);
  background: var(--v2-sidebar);
  box-shadow: none;
}
.educational-project-uiux-v2 .platform-brand { padding: 0 8px 18px; font-size: 1.08rem; }
.educational-project-uiux-v2 .brand-mark { width: 32px; height: 32px; border-radius: 9px; background: #193f8f; }
.educational-project-uiux-v2 .project-identity { margin: 0 2px 12px; padding: 10px 8px 14px; border-bottom-color: var(--v2-line); }
.educational-project-uiux-v2 .project-identity small { font-size: .8rem; }
.educational-project-uiux-v2 .project-identity strong { font-size: .94rem; }
.educational-project-uiux-v2 .project-avatar { width: 34px; height: 34px; border-radius: 10px; }
.educational-project-uiux-v2 .portal-nav { gap: 3px; }
.educational-project-uiux-v2 .portal-nav-link,
.educational-project-uiux-v2 .project-nav-group > summary {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #536075;
  font-size: .93rem;
  font-weight: 650;
}
.educational-project-uiux-v2 .portal-nav-link.active {
  color: #1746bc;
  background: #e8eefc;
  box-shadow: inset 3px 0 0 var(--v2-accent);
  font-weight: 750;
}
.educational-project-uiux-v2 .project-nav-group.current > summary { background: transparent; color: #46536a; }
.educational-project-uiux-v2 .project-nav-group > summary:hover,
.educational-project-uiux-v2 .portal-nav-link:hover { background: rgba(255,255,255,.68); }
.educational-project-uiux-v2 .project-nav-group-body { padding-left: 12px; }
.educational-project-uiux-v2 .project-nav-group-body .portal-nav-link { font-size: .9rem; min-height: 38px; }
.educational-project-uiux-v2 .project-utility-nav { border-top-color: var(--v2-line); }
.educational-project-uiux-v2 .all-projects-link { font-size: .9rem; }
.educational-project-uiux-v2 .sidebar-toggle {
  width: 30px; height: 38px; border-radius: 9px; border: 1px solid var(--v2-line-strong);
  background: rgba(255,255,255,.96); color: #58657a; box-shadow: 0 4px 12px rgba(23,32,51,.06);
  left: 221px;
}
.educational-project-uiux-v2 .sidebar-toggle:hover { color: var(--v2-accent); border-color: #b9c7ec; }
html.project-sidebar-collapsed .educational-project-uiux-v2 .project-shell { grid-template-columns: 68px minmax(0,1fr); }
html.project-sidebar-collapsed .educational-project-uiux-v2 .project-sidebar { width: 68px; padding-inline: 8px; }
html.project-sidebar-collapsed .educational-project-uiux-v2 .project-sidebar .portal-nav-link,
html.project-sidebar-collapsed .educational-project-uiux-v2 .project-sidebar .project-nav-group > summary,
html.project-sidebar-collapsed .educational-project-uiux-v2 .project-sidebar .all-projects-link { width: 44px; }
html.project-sidebar-collapsed .educational-project-uiux-v2 .sidebar-toggle { left: 53px; }

.educational-project-uiux-v2 .platform-topbar {
  height: 58px; padding: 0 26px; border-bottom-color: var(--v2-line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
}
.educational-project-uiux-v2 .platform-topbar strong { font-size: .9rem; }
.educational-project-uiux-v2 .topbar-kicker { font-size: .72rem; }
.educational-project-uiux-v2 .baseline-chip,
.educational-project-uiux-v2 .status-chip { font-size: .76rem; padding: 4px 9px; border-width: 1px; }
.educational-project-uiux-v2 .portal-main { max-width: none; margin: 0; padding: 28px 32px 72px; }
.educational-project-uiux-v2 h1,
.educational-project-uiux-v2 h2,
.educational-project-uiux-v2 h3 { color: var(--v2-ink); letter-spacing: -.025em; }
.educational-project-uiux-v2 h1 { font-size: clamp(2rem, 3vw, 2.55rem); line-height: 1.12; }
.educational-project-uiux-v2 h2 { font-size: 1.45rem; line-height: 1.22; }
.educational-project-uiux-v2 h3 { font-size: 1.08rem; line-height: 1.3; }
.educational-project-uiux-v2 p,
.educational-project-uiux-v2 li { font-size: 1rem; }
.educational-project-uiux-v2 .section-kicker,
.educational-project-uiux-v2 .eyebrow { color: #52647f !important; font-size: .76rem !important; letter-spacing: .08em; font-weight: 800; }
.educational-project-uiux-v2 .button {
  min-height: 42px; padding: 9px 15px; border-radius: 9px; border-color: #d0d7e2; color: #334155; background: #fff;
  font-size: .9rem; font-weight: 700; box-shadow: none;
}
.educational-project-uiux-v2 .button:hover { border-color: #aebbd0; background: #fafbfc; }
.educational-project-uiux-v2 .button.primary { color: #fff; background: var(--v2-accent); border-color: var(--v2-accent); }
.educational-project-uiux-v2 .button.primary:hover { background: var(--v2-accent-hover); border-color: var(--v2-accent-hover); }
.educational-project-uiux-v2 :focus-visible { outline: 3px solid rgba(49,94,246,.28); outline-offset: 2px; }

/* Contextual help is always available, but never dominates the page. */
.educational-project-uiux-v2 .project-help {
  margin: 14px 0 22px; border: 1px solid #d9e2f1; border-radius: 11px; background: #f8faff; box-shadow: none;
}
.educational-project-uiux-v2 .project-help > summary { min-height: 54px; padding: 11px 14px; gap: 10px; }
.educational-project-uiux-v2 .project-help-icon { width: 28px; height: 28px; border-radius: 8px; font-size: .86rem; }
.educational-project-uiux-v2 .project-help-summary-copy strong { font-size: .9rem; }
.educational-project-uiux-v2 .project-help-summary-copy small { font-size: .78rem; color: #718099; }
.educational-project-uiux-v2 .project-help-toggle { margin-left: auto; font-size: 1rem; color: #748198; }
.educational-project-uiux-v2 .project-help-toggle::after { content: none; }
.educational-project-uiux-v2 .project-help[open] .project-help-toggle { font-size: 0; }
.educational-project-uiux-v2 .project-help[open] .project-help-toggle::before { content: "⌃"; font-size: 1rem; }
.educational-project-uiux-v2 .project-help-body { padding: 4px 16px 16px 52px; }
.educational-project-uiux-v2 .project-help-copy { max-width: 920px; font-size: .94rem; color: #46536a; }

/* Overview */
.educational-project-uiux-v2 .project-overview-v2 { display: grid; gap: 18px; }
.educational-project-uiux-v2 .overview-v2-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding: 2px 0 4px; }
.educational-project-uiux-v2 .overview-v2-hero h1 { margin: 3px 0 7px; }
.educational-project-uiux-v2 .overview-v2-hero p { margin: 0; max-width: 760px; color: var(--v2-muted); }
.educational-project-uiux-v2 .overview-v2-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 13px; background: var(--v2-line); }
.educational-project-uiux-v2 .overview-v2-stat { min-height: 116px; display: grid; align-content: center; gap: 5px; padding: 20px 22px; background: #fff; }
.educational-project-uiux-v2 .overview-v2-stat-label { color: var(--v2-muted); font-size: .82rem; font-weight: 700; }
.educational-project-uiux-v2 .overview-v2-stat strong { font-size: 1.25rem; }
.educational-project-uiux-v2 .overview-v2-stat > span:last-child:not(.status-chip) { color: var(--v2-muted); font-size: .88rem; }
.educational-project-uiux-v2 .overview-v2-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 18px; align-items: start; }
.educational-project-uiux-v2 .overview-v2-main { display: grid; gap: 16px; }
.educational-project-uiux-v2 .overview-v2-panel,
.educational-project-uiux-v2 .overview-v2-side-card { background: #fff; border: 1px solid var(--v2-line); border-radius: 13px; box-shadow: none; }
.educational-project-uiux-v2 .overview-v2-panel { padding: 20px; }
.educational-project-uiux-v2 .overview-v2-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.educational-project-uiux-v2 .overview-v2-panel-head h2 { margin: 2px 0 0; }
.educational-project-uiux-v2 .overview-v2-current { display: flex; gap: 14px; padding: 14px 0 2px; border-top: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .overview-v2-current-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--v2-accent); background: var(--v2-accent-soft); }
.educational-project-uiux-v2 .overview-v2-current p { margin: 4px 0; color: var(--v2-muted); }
.educational-project-uiux-v2 .overview-v2-current small { color: #7a8597; font-size: .82rem; }
.educational-project-uiux-v2 .overview-v2-modules { border-top: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .overview-v2-module { display: grid; grid-template-columns: minmax(0,1fr) 190px auto 20px; gap: 18px; align-items: center; min-height: 72px; padding: 12px 4px; border-bottom: 1px solid var(--v2-line); text-decoration: none; }
.educational-project-uiux-v2 .overview-v2-module:hover { background: #fafbfc; }
.educational-project-uiux-v2 .overview-v2-module > div:first-child { display: grid; gap: 2px; }
.educational-project-uiux-v2 .overview-v2-module > div:first-child span { color: var(--v2-muted); font-size: .86rem; }
.educational-project-uiux-v2 .overview-v2-module-progress { display: flex; align-items: center; gap: 10px; }
.educational-project-uiux-v2 .overview-v2-progress-track { height: 6px; flex: 1; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.educational-project-uiux-v2 .overview-v2-progress-track span { display: block; height: 100%; background: #55a874; border-radius: inherit; }
.educational-project-uiux-v2 .overview-v2-module-progress strong { width: 38px; text-align: right; font-size: .82rem; color: #59667b; }
.educational-project-uiux-v2 .overview-v2-side { display: grid; gap: 14px; }
.educational-project-uiux-v2 .overview-v2-side-card { padding: 17px; }
.educational-project-uiux-v2 .overview-v2-side-card h2 { margin: 4px 0 8px; font-size: 1.05rem; }
.educational-project-uiux-v2 .overview-v2-side-card p { color: var(--v2-muted); font-size: .9rem; }
.educational-project-uiux-v2 .overview-v2-route { display: grid; gap: 2px; }
.educational-project-uiux-v2 .overview-v2-route a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--v2-line); text-decoration: none; font-size: .92rem; }
.educational-project-uiux-v2 .overview-v2-attention-list { border-top: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .overview-v2-attention-item { display: grid; grid-template-columns: 30px minmax(0,1fr) 20px; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--v2-line); text-decoration: none; }
.educational-project-uiux-v2 .overview-v2-attention-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--v2-warning-soft); color: var(--v2-warning); font-weight: 850; }
.educational-project-uiux-v2 .overview-v2-attention-item small { display: block; color: var(--v2-muted); font-size: .82rem; }

/* Modules: the structure is the object; technical provenance stays secondary. */
.educational-project-uiux-v2 .modules-page { display: grid; gap: 16px; }
.educational-project-uiux-v2 .modules-v2-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.educational-project-uiux-v2 .modules-v2-hero h1 { margin: 3px 0 6px; }
.educational-project-uiux-v2 .modules-v2-hero p { margin: 0; max-width: 760px; color: var(--v2-muted); }
.educational-project-uiux-v2 .modules-v2-source { background: transparent; border: 0; padding: 0; box-shadow: none; }
.educational-project-uiux-v2 .modules-v2-source details { border: 1px solid var(--v2-line); border-radius: 10px; background: #fff; }
.educational-project-uiux-v2 .modules-v2-method { padding: 12px 14px; border: 1px solid var(--v2-line); border-radius: 10px; background: #fff; }
.educational-project-uiux-v2 .modules-v2-method h2 { font-size: 1rem; margin: 2px 0 3px; }
.educational-project-uiux-v2 .modules-v2-method p { margin: 0; font-size: .88rem; color: var(--v2-muted); }
.educational-project-uiux-v2 .modules-v2-generate,
.educational-project-uiux-v2 .modules-v2-table,
.educational-project-uiux-v2 .modules-v2-result { border: 1px solid var(--v2-line); border-radius: 13px; background: #fff; box-shadow: none; }
.educational-project-uiux-v2 .modules-v2-list { gap: 0; border-top: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .modules-v2-list .module-card { padding: 18px 2px; border: 0; border-bottom: 1px solid var(--v2-line); border-radius: 0; background: transparent; box-shadow: none; }
.educational-project-uiux-v2 .modules-v2-list .module-card-head { grid-template-columns: 72px minmax(0,1fr); align-items: center; }
.educational-project-uiux-v2 .modules-v2-list .module-card-head input[type="text"] { min-height: 42px; border: 0; border-bottom: 1px solid transparent; border-radius: 6px; background: transparent; font-size: 1rem; }
.educational-project-uiux-v2 .modules-v2-list .module-card-head input[type="text"]:focus { border-color: #c9d5ef; background: #fafbff; }
.educational-project-uiux-v2 .modules-v2-list .module-card textarea { min-height: 122px; padding: 10px 12px; border-color: var(--v2-line); border-radius: 9px; background: #fafbfc; font-size: .95rem; }
.educational-project-uiux-v2 .module-skill-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.educational-project-uiux-v2 .module-skill-list span { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #f1f4f8; color: #58667a; font-size: .78rem; line-height: 1.3; white-space: normal; }
.educational-project-uiux-v2 .modules-actions > span { max-width: 680px; color: var(--v2-muted); font-size: .84rem; }
.educational-project-uiux-v2 .modules-result-preview { margin: 0; padding: 14px 16px; border: 1px solid var(--v2-line); border-radius: 10px; background: #fff; color: var(--v2-ink); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.55; }
.educational-project-uiux-v2 .modules-copy-source { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* Lesson workspace */
.educational-project-uiux-v2 .lesson-workspace-header { margin: 0 0 14px; }
.educational-project-uiux-v2 .lesson-workspace-breadcrumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--v2-muted); font-size: .86rem; }
.educational-project-uiux-v2 .lesson-workspace-breadcrumbs a { color: #3155bb; text-decoration: none; font-weight: 700; }
.educational-project-uiux-v2 .lesson-workspace-heading { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.educational-project-uiux-v2 .lesson-workspace-number { margin: 0 0 3px; color: #536784; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.educational-project-uiux-v2 .lesson-workspace-heading h1 { margin: 0; max-width: 840px; }
.educational-project-uiux-v2 .lesson-workspace-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.educational-project-uiux-v2 .lesson-state { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 750; }
.educational-project-uiux-v2 .lesson-state.accepted { color: var(--v2-success); background: var(--v2-success-soft); }
.educational-project-uiux-v2 .lesson-state.attention { color: var(--v2-warning); background: var(--v2-warning-soft); }
.educational-project-uiux-v2 .lesson-state.pending,
.educational-project-uiux-v2 .lesson-state.reviewer-pass { color: #2456bf; background: #eaf0ff; }
.educational-project-uiux-v2 .lesson-workspace-neighbors { display: flex; gap: 6px; }
.educational-project-uiux-v2 .lesson-workspace-neighbors a { min-height: 34px; display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--v2-line); border-radius: 8px; background: #fff; color: #46536a; font-size: .8rem; font-weight: 700; text-decoration: none; }
.educational-project-uiux-v2 .lesson-module-context { margin: 14px 0 4px; border: 0; }
.educational-project-uiux-v2 .lesson-module-context > summary { width: max-content; cursor: pointer; color: #657287; font-size: .82rem; font-weight: 700; }
.educational-project-uiux-v2 .lesson-module-context > div { max-width: 900px; margin-top: 8px; padding: 12px 14px; border-left: 3px solid #ccd8f3; background: #f8faff; color: #526075; }
.educational-project-uiux-v2 .lesson-module-context p { margin: 3px 0; font-size: .88rem; }
.educational-project-uiux-v2 .lesson-workspace-tabs { display: flex; gap: 26px; margin-top: 18px; border-bottom: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .lesson-workspace-tabs a { position: relative; padding: 10px 2px 11px; color: #59667b; font-size: 1rem; font-weight: 750; text-decoration: none; }
.educational-project-uiux-v2 .lesson-workspace-tabs a.active { color: #244fc4; }
.educational-project-uiux-v2 .lesson-workspace-tabs a.active::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; border-radius:99px; background:var(--v2-accent); }
.educational-project-uiux-v2 .lesson-material-tabs { display: flex; gap: 5px; margin: 10px 0 0; padding: 5px; border-radius: 10px; background: #eef1f5; overflow-x: auto; }
.educational-project-uiux-v2 .lesson-material-tabs a { padding: 8px 12px; border-radius: 7px; color: #5d687b; font-size: .9rem; font-weight: 720; white-space: nowrap; text-decoration: none; }
.educational-project-uiux-v2 .lesson-material-tabs a.active { color: #234db9; background: #fff; box-shadow: 0 1px 3px rgba(23,32,51,.07); }

/* The selected lesson never repeats the full lesson list. */
.educational-project-uiux-v2 .lesson-workspace-selected > .lesson-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .scenario-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .presentation-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .longread-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .test-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .quiz-list,
.educational-project-uiux-v2 .lesson-workspace-selected > .practical_assignment-list { display: none !important; }
.educational-project-uiux-v2 .lesson-development-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .scenario-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .presentation-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .longread-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .test-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .quiz-grid.lesson-workspace-selected,
.educational-project-uiux-v2 .practical_assignment-grid.lesson-workspace-selected { grid-template-columns: minmax(0,1fr) !important; gap: 14px; }

/* Right context panel really gives its space back. */
html.lesson-context-active:not(.lesson-context-collapsed) .educational-project-uiux-v2 .portal-main { padding-right: 338px; }
.educational-project-uiux-v2 .lesson-context-panel {
  position: fixed; top: 58px; right: 0; bottom: 0; z-index: 18; width: 306px; padding: 18px 16px 24px;
  border-left: 1px solid var(--v2-line); background: rgba(248,249,251,.98); overflow-y: auto; transition: transform .18s ease;
}
html.lesson-context-collapsed .educational-project-uiux-v2 .lesson-context-panel { transform: translateX(100%); }
.educational-project-uiux-v2 .lesson-context-toggle { position: absolute; top: 22px; left: -17px; width: 34px; height: 38px; border: 1px solid var(--v2-line-strong); border-radius: 9px; background: #fff; color: #617087; cursor: pointer; }
.educational-project-uiux-v2 .lesson-context-reopen { display: none; position: fixed; top: 82px; right: 8px; z-index: 19; width: 34px; height: 38px; border: 1px solid var(--v2-line-strong); border-radius: 9px; background: #fff; color: #617087; cursor: pointer; }
html.lesson-context-collapsed .educational-project-uiux-v2 .lesson-context-reopen { display: block; }
.educational-project-uiux-v2 .lesson-context-panel-inner { display: grid; gap: 20px; }
.educational-project-uiux-v2 .lesson-context-primary { padding-bottom: 18px; border-bottom: 1px solid var(--v2-line); }
.educational-project-uiux-v2 .lesson-context-primary strong { display: block; margin-top: 5px; font-size: 1.02rem; }
.educational-project-uiux-v2 .lesson-context-primary p { margin: 4px 0 0; color: var(--v2-muted); font-size: .84rem; }
.educational-project-uiux-v2 .lesson-context-label { display: block; margin-bottom: 6px; color: #7a8598; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.educational-project-uiux-v2 .lesson-context-nav { display: grid; gap: 2px; }
.educational-project-uiux-v2 .lesson-context-nav a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 8px; border-radius: 8px; color: #455268; font-size: .88rem; text-decoration: none; }
.educational-project-uiux-v2 .lesson-context-nav a:hover { background: #fff; }
.educational-project-uiux-v2 .lesson-context-nav a.active { color: #244fc4; background: #edf2ff; font-weight: 750; }

/* Page panels: spacing and typography, not borders, create hierarchy. */
.educational-project-uiux-v2 .development-panel,
.educational-project-uiux-v2 .scenario-panel,
.educational-project-uiux-v2 .presentation-panel,
.educational-project-uiux-v2 .longread-panel,
.educational-project-uiux-v2 .test-panel,
.educational-project-uiux-v2 .quiz-panel,
.educational-project-uiux-v2 .practical_assignment-panel {
  border: 1px solid var(--v2-line) !important; border-radius: 12px !important; background: #fff !important; padding: 20px !important; box-shadow: none !important;
}
.educational-project-uiux-v2 .development-panel h2,
.educational-project-uiux-v2 .scenario-panel h2,
.educational-project-uiux-v2 .presentation-panel h2,
.educational-project-uiux-v2 .longread-panel h2,
.educational-project-uiux-v2 .test-panel h2,
.educational-project-uiux-v2 .quiz-panel h2,
.educational-project-uiux-v2 .practical_assignment-panel h2 { margin-top: 0; }
.educational-project-uiux-v2 .result-block,
.educational-project-uiux-v2 .source-card,
.educational-project-uiux-v2 .event-card,
.educational-project-uiux-v2 .review-box,
.educational-project-uiux-v2 .human-box,
.educational-project-uiux-v2 .revision-box {
  border-color: var(--v2-line) !important; box-shadow: none !important;
}
.educational-project-uiux-v2 .quality-meta,
.educational-project-uiux-v2 .source-meta,
.educational-project-uiux-v2 .practical_assignment-meta,
.educational-project-uiux-v2 .longread-meta,
.educational-project-uiux-v2 .test-meta,
.educational-project-uiux-v2 .quiz-meta { color: var(--v2-muted) !important; font-size: .88rem !important; }
.educational-project-uiux-v2 .trace,
.educational-project-uiux-v2 .technical-details { margin-top: 12px; color: #657287; font-size: .84rem; }
.educational-project-uiux-v2 .technical-details > summary,
.educational-project-uiux-v2 .trace > summary { cursor: pointer; font-weight: 700; }

/* Practical assignment: result first, semantic navigation, reading-friendly blocks. */
.educational-project-uiux-v2 .practical-semantic-nav {
  position: sticky; top: 68px; z-index: 12; display: flex; gap: 4px; margin: 10px 0 14px; padding: 6px;
  border: 1px solid var(--v2-line); border-radius: 10px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); overflow-x: auto;
}
.educational-project-uiux-v2 .practical-semantic-nav a { padding: 8px 12px; border-radius: 7px; color: #57647a; font-size: .9rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.educational-project-uiux-v2 .practical-semantic-nav a:hover { color: #214ab7; background: #eef3ff; }
.educational-project-uiux-v2 #practical_assignment-plan.has-result { display: flex; flex-direction: column; }
.educational-project-uiux-v2 #practical_assignment-plan.has-result #practical_assignment-content { order: -30; margin-top: 0 !important; }
.educational-project-uiux-v2 #practical_assignment-plan.has-result #practical_assignment-review { order: -20; }
.educational-project-uiux-v2 #practical_assignment-plan.has-result .practical-assignment-creation-head { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--v2-line); }
.educational-project-uiux-v2 #practical_assignment-plan.has-result .practical-assignment-creation-head h2 { font-size: 1.05rem; color: #5f6b7d; }
.educational-project-uiux-v2 #practical_assignment-plan.has-result .practical_assignment-method { display: none; }
.educational-project-uiux-v2 .practical_assignment-reader { max-width: none !important; }
.educational-project-uiux-v2 .practical_assignment-reader > h2 { max-width: 980px; margin: 4px 0 20px; font-size: 1.55rem; }
.educational-project-uiux-v2 .practical_assignment-content-section { margin-top: 14px !important; padding: 22px !important; border: 0 !important; border-radius: 12px !important; background: #f9fafb; scroll-margin-top: 132px; }
.educational-project-uiux-v2 .practical_assignment-content-section h3 { margin: 0 0 12px; font-size: 1.15rem; }
.educational-project-uiux-v2 .practical_assignment-body { max-width: 980px; }
.educational-project-uiux-v2 .practical_assignment-body p { font-size: 1.02rem; line-height: 1.68; }
.educational-project-uiux-v2 .practical-section-task { background: #fff !important; border: 1px solid var(--v2-line) !important; }
.educational-project-uiux-v2 .practical-section-example { background: #f7f8fb !important; }
.educational-project-uiux-v2 .practical-section-selfcheck { background: #f5f8ff !important; }
.educational-project-uiux-v2 .practical-section-errors { background: #fff9ef !important; }
.educational-project-uiux-v2 .practical_assignment-criteria { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px !important; }
.educational-project-uiux-v2 .practical_assignment-criterion { padding: 13px 14px !important; border-color: var(--v2-line) !important; background: #fff; }

/* Long reading surfaces use available workspace but keep readable text measure. */
.educational-project-uiux-v2 .longread-reader,
.educational-project-uiux-v2 .longread-content,
.educational-project-uiux-v2 .speaker-notes { max-width: 1040px; }
.educational-project-uiux-v2 .longread-body p,
.educational-project-uiux-v2 .longread-reader p { font-size: 1.02rem; line-height: 1.7; }

/* Generation/wait/error share one visual language without changing backend. */
.educational-project-uiux-v2 [class$="-wait"],
.educational-project-uiux-v2 .revision-box[id$="async-status"],
.educational-project-uiux-v2 [id$="async-status"] {
  border: 1px solid #cdd9f4 !important; border-radius: 10px !important; background: #f4f7ff !important; color: #334766;
}
.educational-project-uiux-v2 [class$="-error"] { border-color: #f0c3bd !important; background: var(--v2-danger-soft) !important; color: #7c2921; }

@media (max-width: 1180px) {
  .educational-project-uiux-v2 .overview-v2-layout { grid-template-columns: 1fr; }
  .educational-project-uiux-v2 .overview-v2-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .educational-project-uiux-v2 .overview-v2-module { grid-template-columns: minmax(0,1fr) 150px auto 20px; }
  html.lesson-context-active:not(.lesson-context-collapsed) .educational-project-uiux-v2 .portal-main { padding-right: 318px; }
  .educational-project-uiux-v2 .lesson-context-panel { width: 288px; }
}
@media (max-width: 900px) {
  .educational-project-uiux-v2 .portal-main { padding: 22px 18px 60px; }
  .educational-project-uiux-v2 .overview-v2-summary { grid-template-columns: 1fr; }
  .educational-project-uiux-v2 .overview-v2-module { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .educational-project-uiux-v2 .overview-v2-module-progress { grid-column: 1 / -1; }
  .educational-project-uiux-v2 .overview-v2-side { grid-template-columns: 1fr; }
  html.lesson-context-active:not(.lesson-context-collapsed) .educational-project-uiux-v2 .portal-main { padding-right: 18px; }
  .educational-project-uiux-v2 .lesson-context-panel { display: none; }
  .educational-project-uiux-v2 .lesson-context-reopen { display: none !important; }
  .educational-project-uiux-v2 .lesson-workspace-heading { display: grid; }
  .educational-project-uiux-v2 .lesson-workspace-actions { justify-content: flex-start; }
  .educational-project-uiux-v2 .practical_assignment-criteria { grid-template-columns: 1fr; }
}
.educational-project-uiux-v2 .lesson-development-grid.lesson-workspace-selected > .right-stack > .development-panel:first-child { display: none !important; }
.educational-project-uiux-v2 .practical_assignment-stack > .practical_assignment-panel:first-child,
.educational-project-uiux-v2 .longread-stack > .longread-panel:first-child,
.educational-project-uiux-v2 .test-stack > .test-panel:first-child,
.educational-project-uiux-v2 .quiz-stack > .quiz-panel:first-child,
.educational-project-uiux-v2 .presentation-stack > .presentation-panel:first-child {
  padding: 12px 0 !important; border: 0 !important; border-bottom: 1px solid var(--v2-line) !important; border-radius: 0 !important; background: transparent !important;
}
.educational-project-uiux-v2 .practical_assignment-stack > .practical_assignment-panel:first-child > h2,
.educational-project-uiux-v2 .longread-stack > .longread-panel:first-child > h2,
.educational-project-uiux-v2 .test-stack > .test-panel:first-child > h2,
.educational-project-uiux-v2 .quiz-stack > .quiz-panel:first-child > h2,
.educational-project-uiux-v2 .presentation-stack > .presentation-panel:first-child > h2 { display: none; }
.educational-project-uiux-v2 .practical_assignment-details,
.educational-project-uiux-v2 .longread-details,
.educational-project-uiux-v2 .test-details,
.educational-project-uiux-v2 .quiz-details { border-color: var(--v2-line) !important; border-radius: 9px !important; background: #fafbfc !important; }
.educational-project-uiux-v2 .practical_assignment-details > summary,
.educational-project-uiux-v2 .longread-details > summary,
.educational-project-uiux-v2 .test-details > summary,
.educational-project-uiux-v2 .quiz-details > summary { font-size: .88rem; }

/* UI/UX V2.1 visual polish */
.educational-project-uiux-v2 .overview-v2-continue { white-space: nowrap; align-self: flex-start; }
.educational-project-uiux-v2 .development-head > div:first-child { max-width: 900px; }
.educational-project-uiux-v2 .development-method { margin-left: auto; }

/* UI/UX V2.1 localized visual recovery */
body.educational-project-uiux-v2 { overflow-x: clip; }
.educational-project-uiux-v2 .portal-workspace { min-width: 0; overflow-x: clip; }

/* Ideas filters V1: active direction; closed direction + reason */
.ideas-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ideas-filters select {
  box-sizing: border-box;
  min-width: 180px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: .76rem;
}

@media (max-width: 820px) {
  .ideas-filters {
    justify-content: flex-start;
  }
}

/* Skillset & Modules V2 */
.skillset-manual-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.skillset-manual-add-grid label {
  display: grid;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
}
.skillset-manual-add-grid textarea,
.skillset-table-panel .revision-box > textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: inherit;
  font: inherit;
  resize: vertical;
}
.skillset-table-panel .revision-box {
  margin-top: 14px;
}
.skillset-table-panel .revision-box .skillset-source-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-weight: 500;
}
.skillset-row-actions {
  display: grid;
  gap: 8px;
}
.educational-project-uiux-v2 .skillset-row-actions .button.skillset-ai-refine-action {
  color: #0f4fa8;
  background-color: #dcecff;
  border-color: #86b5ee;
  box-shadow: inset 3px 0 0 #3b82f6;
}
.educational-project-uiux-v2 .skillset-row-actions .button.skillset-ai-refine-action:hover {
  color: #0b3f89;
  background-color: #cfe4ff;
  border-color: #5f9ee8;
}
.educational-project-uiux-v2 .skillset-row-actions .button.skillset-split-action {
  color: #7a4100;
  background-color: #ffedc7;
  border-color: #e8ad50;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.educational-project-uiux-v2 .skillset-row-actions .button.skillset-split-action:hover {
  color: #643500;
  background-color: #ffe1a3;
  border-color: #d99226;
}
.skillset-table-panel.sheet-expanded .revision-box {
  display: none;
}
.skillset-table-panel.sheet-expanded .skillset-sheet-wrap {
  flex: 1 1 0;
}
@media (max-width: 760px) {
  .skillset-manual-add-grid { grid-template-columns: 1fr; }
}

/* Skillset & Modules V2 Human Gate recovery */
.skillset-notification-stack {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 140;
  display: grid;
  width: min(520px, calc(100vw - 48px));
  gap: 8px;
  pointer-events: none;
}
.skillset-top-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #b8d6c3;
  border-radius: 11px;
  background: #ecf8f0;
  color: #215c38;
  box-shadow: 0 12px 34px rgba(24, 39, 61, .14);
  pointer-events: auto;
}
.skillset-top-notice.running {
  border-color: #b9cdf5;
  background: #f1f5ff;
  color: #294d8a;
}
.skillset-top-notice strong { display: block; margin-bottom: 2px; }
.skillset-top-notice p { margin: 0; font-size: .82rem; }
.skillset-notice-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.72);
  color: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}
.skillset-sheet .skillset-include-col { width: 74px; min-width: 74px; }
.skillset-sheet tr.ai-changed { background: #f2f7ff; }
.skillset-sheet tr.ai-changed td:first-child { box-shadow: inset 3px 0 0 #4f8cf7; }
.skillset-change-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dcecff;
  color: #0f4fa8;
  font-size: .66rem;
  font-weight: 800;
}
.skillset-manual-add-grid select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.skillset-composition-box,
.skillset-feedback-box {
  padding: 16px !important;
  border-radius: 12px !important;
}
.skillset-composition-box { background: #f7faff !important; }
.skillset-feedback-box { background: #fff8ec !important; }
.skillset-action-block-head p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.educational-project-uiux-v2 .button.skillset-add-action {
  color: #0f4fa8;
  background: #e5efff;
  border-color: #a7c5ee;
}
.educational-project-uiux-v2 .button.skillset-refine-action {
  color: #744400;
  background: #ffedc7;
  border-color: #e8ad50;
}
.skillset-table-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Modules V2 review: usable editing area by default. */
.educational-project-uiux-v2 .modules-v2-list .module-card,
.educational-project-uiux-v2 .modules-v2-list .module-card-head { width: 100%; min-width: 0; }
.educational-project-uiux-v2 .modules-v2-list .module-card-head input[type="text"] {
  box-sizing: border-box;
  width: 100%;
}
.educational-project-uiux-v2 .modules-v2-list .module-card textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 148px;
  resize: vertical;
}

/* Modules V2 review: explicit Module -> Lessons hierarchy. */
.educational-project-uiux-v2 .modules-v2-list .module-card {
  padding: 22px 0;
}
.educational-project-uiux-v2 .modules-v2-list .module-card-head {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.educational-project-uiux-v2 .modules-v2-list .module-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #43536a;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.educational-project-uiux-v2 .module-name-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fff;
}
.educational-project-uiux-v2 .modules-v2-list .module-name-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--v2-ink);
  font-size: 1.02rem !important;
  font-weight: 760;
}
.educational-project-uiux-v2 .modules-v2-list .module-name-input:focus {
  outline: 2px solid #b9c8ea;
  outline-offset: -2px;
}
.educational-project-uiux-v2 .module-lessons-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--v2-line);
  border-radius: 0;
  background: transparent;
  color: #5f6f88;
  font-size: 1.05rem;
  cursor: pointer;
}
.educational-project-uiux-v2 .module-lessons-toggle:hover {
  background: #f0f3f8;
}
.educational-project-uiux-v2 .module-card.lessons-collapsed {
  padding-bottom: 14px;
}
.educational-project-uiux-v2 .module-card.lessons-collapsed .module-lessons-section {
  display: none;
}
.educational-project-uiux-v2 .module-lessons-title {
  margin: 18px 0 8px 144px;
  color: #7a8598;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.educational-project-uiux-v2 .module-lessons-editor {
  display: grid;
  gap: 10px;
  margin-left: 144px;
}
.educational-project-uiux-v2 .module-lesson-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fafbfc;
}
.educational-project-uiux-v2 .module-lesson-content {
  min-width: 0;
}
.educational-project-uiux-v2 .module-lesson-label {
  margin-bottom: 4px;
  color: #6b7890;
  font-size: .76rem;
  font-weight: 800;
}
.educational-project-uiux-v2 .module-lesson-name-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #fff;
  color: var(--v2-ink);
  font-size: .96rem;
  font-weight: 700;
}
.educational-project-uiux-v2 .module-lesson-name-input:hover {
  border-color: #c9d3e4;
}
.educational-project-uiux-v2 .module-lesson-name-input:focus {
  outline: 2px solid #b9c8ea;
  outline-offset: 1px;
  border-color: #b9c8ea;
}
.educational-project-uiux-v2 .module-lesson-skills {
  margin-top: 8px;
}
.educational-project-uiux-v2 .module-lesson-skills-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #6b7890;
  font-size: .74rem;
  font-weight: 800;
}
.educational-project-uiux-v2 .module-lesson-skills-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #315fc8;
  font: inherit;
  cursor: pointer;
}
.educational-project-uiux-v2 .module-skill-empty {
  border-color: #e3b367 !important;
  background: #fff8ea !important;
  color: #8a5b21 !important;
}
.educational-project-uiux-v2 .module-lesson-skill-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dfe5ef;
  border-radius: 9px;
  background: #fff;
}
.educational-project-uiux-v2 .module-lesson-skill-picker[hidden] {
  display: none;
}
.educational-project-uiux-v2 .module-lesson-skill-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 7px;
  color: #43536a;
  font-size: .8rem;
  line-height: 1.3;
}
.educational-project-uiux-v2 .module-lesson-skill-option:hover {
  background: #f4f6fa;
}
.educational-project-uiux-v2 .module-lesson-skill-option input {
  margin-top: 2px;
}
.educational-project-uiux-v2 .module-lesson-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 18px;
}
.educational-project-uiux-v2 .module-lesson-move-label {
  margin-right: 2px;
  color: #6b7890;
  font-size: .76rem;
  font-weight: 700;
}
.educational-project-uiux-v2 .module-lesson-row-actions .button {
  min-height: 34px;
  white-space: nowrap;
}
.educational-project-uiux-v2 .module-lesson-move-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}
.educational-project-uiux-v2 .module-lesson-remove-button {
  margin-left: 4px;
}
.educational-project-uiux-v2 .module-lesson-remove-note {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: #8a5b21;
  font-size: .78rem;
}
.educational-project-uiux-v2 .module-lesson-remove-note[hidden] {
  display: none;
}
.educational-project-uiux-v2 .module-lesson-edit-row.pending-removal {
  background: #fff8ef;
  opacity: .72;
}
.educational-project-uiux-v2 .module-lesson-edit-row.pending-removal .module-lesson-name-input {
  text-decoration: line-through;
}
@media (max-width: 900px) {
  .educational-project-uiux-v2 .modules-v2-list .module-card-head {
    grid-template-columns: 1fr;
  }
  .educational-project-uiux-v2 .module-lessons-title,
  .educational-project-uiux-v2 .module-lessons-editor {
    margin-left: 0;
  }
  .educational-project-uiux-v2 .module-lesson-skill-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .skillset-notification-stack { top: 58px; right: 10px; width: calc(100vw - 20px); }
}

/* Input Data UX V1 — CR-007 */
.input-data-workspace { max-width: 1220px; }
.input-data-sticky-header {
  position: sticky;
  top: 58px;
  z-index: 12;
  display: grid;
  gap: 10px;
  padding: 12px 0 10px;
  background: #f5f7fa;
}
.input-data-workspace .input-data-hero { margin: 0; }
.input-data-workspace .input-data-hero > div { width: 100%; }
.input-data-workspace .input-data-hero p { max-width: none; }
.input-data-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.input-data-title-row h1 { margin: 0; }
.input-data-model-label {
  font-size: 1.08rem;
  font-weight: 850;
}
.input-data-model-label.ai { color: #18864b; }
.input-data-model-label.no-ai { color: #c73832; }

.input-data-workspace-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.input-data-workspace-tab {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #617087;
  font: inherit;
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.input-data-workspace-tab:hover { background: #f2f5f9; color: #27364b; }
.input-data-workspace-tab.active { background: #e9efff; color: #244fc4; }

.input-data-workspace-panel { display: grid; gap: 16px; }
.input-data-workspace-panel[hidden] { display: none !important; }

.input-data-tab-heading {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.input-data-tab-heading h2 { margin: 0; }
.input-data-tab-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.input-data-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 2px;
}

.input-data-technical-summary {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.input-data-technical-summary strong { color: #27364b; font-size: 1rem; }
.input-data-technical-summary p { margin: 0; color: var(--muted); }
.input-data-technical-label {
  display: block;
  margin-bottom: 3px;
  color: #7a8598;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.input-data-technical-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.input-data-technical-meta > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.input-data-technical-meta dt {
  color: #7a8598;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.input-data-technical-meta dd {
  margin: 0;
  color: #455268;
  overflow-wrap: anywhere;
}
.input-data-provenance-compact {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.input-data-provenance-compact > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.input-data-provenance-compact > summary::-webkit-details-marker { display: none; }
.input-data-provenance-compact > summary span:first-child { display: grid; gap: 2px; }
.input-data-provenance-compact > summary small { color: var(--muted); font-weight: 500; }
.input-data-provenance-compact > summary span:last-child {
  color: #244fc4;
  font-size: .82rem;
  font-weight: 750;
  white-space: nowrap;
}
.input-data-provenance-details { padding: 0 14px 14px; }
.input-data-provenance-details > * { margin: 0 !important; box-shadow: none !important; }

.input-data-history-panel { display: grid; gap: 0; overflow: hidden; }
.input-data-history-heading { padding: 18px 20px; }
.input-data-history-heading h2 { margin: 2px 0 5px; }
.input-data-history-heading p:last-child { margin: 0; color: var(--muted); line-height: 1.5; }
.input-data-history-list { display: grid; border-top: 1px solid var(--line); }
.input-data-history-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.input-data-history-list > a:last-child { border-bottom: 0; }
.input-data-history-list > a:hover { background: #f7f9fc; }
.input-data-history-version { display: grid; gap: 3px; }
.input-data-history-version strong { color: #27364b; }
.input-data-history-version small { color: var(--muted); }
.input-data-history-action {
  color: #244fc4 !important;
  font-size: .8rem !important;
  font-weight: 750;
  white-space: nowrap;
}
.input-data-empty-tab {
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: #fafbfc;
}
.input-data-empty-tab p { margin: 5px 0 0; color: var(--muted); }
.input-data-help-expanded > summary { display: none; }

@media (max-width: 900px) {
  .input-data-sticky-header { top: 58px; }
  .input-data-workspace-tabs { padding-bottom: 4px; }
  .input-data-technical-meta { grid-template-columns: 1fr; }
  .input-data-history-list > a {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
