.product-name,
.product-sub {
  display: block;
}

.workspace {
  grid-template-columns: 210px minmax(300px, 380px) minmax(0, 1fr);
}

.detail {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  overflow-x: hidden;
  overflow-y: auto;
}

.lane-grid {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.error-state strong {
  color: var(--orange);
}

.error-state button {
  border: 1px solid #2c6e50;
  border-radius: 5px;
  background: #153b2c;
  color: #e8fff3;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}

.capability-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.capability-heading button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.capability-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 8px;
}

.capability-filter,
.capability {
  border: 1px solid #245e47;
  border-radius: 4px;
  background: #12281f;
  color: #7be0a7;
  padding: 6px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.capability-filter.active {
  border-color: var(--green);
  background: #1d6845;
  color: white;
}

.product-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 8px;
}

.product-select {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.compare-toggle {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #3a526d;
  border-radius: 4px;
  background: #172235;
  color: var(--blue);
  font-size: 18px;
  line-height: 20px;
  cursor: pointer;
}

.compare-toggle.active {
  border-color: var(--orange);
  color: var(--orange);
}

.claim-list {
  display: grid;
  gap: 8px;
}

.claim {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #121a29;
  padding: 13px;
}

.claim-head {
  display: flex;
  justify-content: space-between;
  color: var(--green);
  font-size: 11px;
  text-transform: uppercase;
}

.claim-head span {
  color: var(--muted);
}

.claim p {
  margin: 9px 0;
  color: #c5d0dc;
  line-height: 1.5;
}

.claim-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.claim-sources a,
.claim-sources span {
  border: 1px solid #2d4d67;
  border-radius: 4px;
  padding: 4px 7px;
  color: var(--blue);
  font-size: 10px;
  text-decoration: none;
}

.compare-tray {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 228px;
  z-index: 20;
  border: 1px solid #4c5d72;
  border-radius: 7px;
  background: #101722;
  box-shadow: 0 14px 40px #000a;
  padding: 12px;
}

.compare-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.compare-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

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

.compare-grid article {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #151e2b;
  padding: 10px;
}

.compare-grid h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.compare-grid article > span {
  color: var(--green);
  font-size: 11px;
}

.compare-grid dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 5px;
  margin: 10px 0 0;
  font-size: 10px;
}

.audit-toggle {
  border: 1px solid #2c6e50;
  border-radius: 5px;
  background: #13261e;
  color: #8ce8b3;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.audit-toggle.active {
  background: #1d6845;
  color: white;
}

.profile-button,
.personal-empty button {
  border: 1px solid #2c6e50;
  border-radius: 5px;
  background: #153b2c;
  color: #e8fff3;
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.scopebar {
  min-height: 52px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.scopebar button {
  min-height: 34px;
  border: 1px solid #344355;
  border-radius: 5px;
  background: #141d2a;
  color: #afbdcc;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.scopebar button.active {
  border-color: #267b52;
  background: #153b2c;
  color: #e8fff3;
}

.personal-status {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 14px;
  border-bottom: 1px solid #245e47;
  background: #10241c;
  color: var(--muted);
  font-size: 10px;
}

.personal-status strong {
  color: var(--green);
  font-size: 11px;
}

.format-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.format-heading button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.format-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 0 8px;
}

.format-filter {
  min-height: 30px;
  border: 1px solid #354761;
  border-radius: 4px;
  background: #152136;
  color: #8fb9ef;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.format-filter.active {
  border-color: var(--blue);
  background: #1e5270;
  color: white;
}

.badge.installed,
.badge.installed-format {
  border: 1px solid #267b52;
  background: #153b2c;
  color: #6be59e;
}

.badge.not-installed {
  border: 1px solid #725127;
  background: #342719;
  color: #f0ad51;
}

.system-coverage {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid #725127;
  border-radius: 7px;
  background: #211b16;
}

.system-coverage.present {
  border-color: #267b52;
  background: #10241c;
}

.system-coverage strong,
.system-coverage span {
  display: block;
}

.system-coverage strong {
  color: var(--orange);
  margin-bottom: 5px;
}

.system-coverage.present strong {
  color: var(--green);
}

.system-coverage span {
  color: var(--muted);
  font-size: 11px;
}

.system-coverage dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 5px 10px;
  margin: 0;
  font-size: 11px;
}

.system-coverage dt { color: var(--muted); }
.system-coverage dd { margin: 0; color: var(--text); }

.personal-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.profile-dialog {
  width: min(460px, calc(100vw - 28px));
  border: 1px solid #42516a;
  border-radius: 7px;
  background: #101722;
  color: var(--text);
  padding: 0;
}

.profile-dialog::backdrop { background: #000b; }
.profile-dialog form { padding: 18px; }
.profile-dialog header,
.profile-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-dialog header strong { font-size: 18px; }
.profile-dialog header button { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.profile-dialog p { color: var(--muted); line-height: 1.5; }
.profile-dialog label { display: grid; gap: 6px; margin: 12px 0; color: #bdc9d6; font-size: 11px; font-weight: 700; }
.profile-dialog input { height: 38px; border: 1px solid #3a4b61; border-radius: 5px; background: #0d1420; color: var(--text); padding: 0 10px; font: inherit; }
.profile-dialog footer { justify-content: flex-end; margin-top: 18px; }
.profile-dialog footer button { min-height: 34px; border-radius: 5px; padding: 0 12px; font: inherit; font-weight: 700; cursor: pointer; }
.profile-dialog .primary { border: 1px solid #267b52; background: #1d6845; color: white; }
.profile-dialog .secondary { border: 1px solid #725127; background: #342719; color: #f0ad51; margin-right: auto; }
.profile-error { min-height: 18px; color: var(--pink); font-size: 11px; }

@media (max-width: 980px) {
  .profile-button { margin-left: auto; }
  .system-coverage { grid-template-columns: 1fr; }
}

.rich-profile {
  max-width: 1120px;
  margin: 0 auto;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.profile-heading .eyebrow,
.freshy-take > span,
.capture-identity > span,
.provenance-grid span {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-heading h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
}

.profile-heading > p {
  max-width: 620px;
  margin: 16px 0 0;
  color: #c4cfda;
  font-size: 16px;
  line-height: 1.55;
}

.profile-visual {
  margin: 0;
  min-width: 0;
}

.profile-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border: 1px solid #38485e;
  border-radius: 7px;
  background: #090d12;
}

.profile-visual figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
  text-transform: uppercase;
}

.trust-strip,
.micro-chips,
.evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trust-strip { margin-top: 18px; }
.trust { padding: 5px 8px; border: 1px solid #38506a; border-radius: 4px; background: #142033; color: #b9cae0; font-size: 10px; font-weight: 750; }
.trust.freshy { border-color: #277653; background: #133526; color: #72e6a3; }
.trust.community { border-color: #745e31; background: #302719; color: #f1bd62; }
.trust.capture { border-color: #485d87; background: #182440; color: #91b8fb; }

.profile-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 20px 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e1623ee;
  backdrop-filter: blur(12px);
}

.profile-nav a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 4px;
  color: #b7c5d5;
  text-decoration: none;
  font-size: 10px;
  font-weight: 750;
}

.profile-nav a:hover { background: #1a293a; color: white; }

.freshy-take {
  margin: 22px 0 34px;
  padding: 22px;
  border-left: 3px solid var(--green);
  background: #10241c;
}

.freshy-take p { margin: 0; color: #d0ddd6; font-size: 16px; line-height: 1.7; }

.profile-section {
  scroll-margin-top: 66px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.section-heading > span { color: var(--green); font-size: 11px; font-weight: 850; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.section-heading > b { color: var(--orange); font-size: 11px; }

.feature-grid,
.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feature-card,
.community-grid article,
.scenario-card,
.provenance-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #121a29;
}

.feature-card { position: relative; min-height: 220px; padding: 22px; }
.feature-number { color: var(--green); font-size: 11px; font-weight: 850; }
.feature-card h3, .community-grid h3, .scenario-card h3 { margin: 34px 0 9px; font-size: 17px; }
.feature-card p, .community-grid p, .scenario-card p { color: #b7c3d1; line-height: 1.6; }

.evidence-links { margin-top: 16px; }
.evidence-links a { color: var(--blue); font-size: 9px; text-decoration: none; }
.evidence-links a:before { content: "↗ "; }

.scenario-grid { display: grid; gap: 8px; }
.scenario-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 17px; }
.scenario-number { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #2a6e50; border-radius: 50%; color: var(--green); font-weight: 850; }
.scenario-card h3 { margin: 2px 0 6px; }
.scenario-card p { margin: 0; }
.micro-chips { margin-top: 12px; }
.micro-chips span { padding: 4px 7px; border-radius: 4px; background: #17243a; color: #8fb9ef; font-size: 9px; font-weight: 750; }

.community-section { background: #111815; margin-inline: -18px; padding-inline: 18px; }
.community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-grid article { padding: 18px; }
.community-grid h3 { margin-top: 14px; }
.tone { color: var(--orange); font-size: 9px; font-weight: 850; text-transform: uppercase; }

.video-review-section {
  margin-inline: -18px;
  padding-inline: 18px;
  background: #121520;
}

.video-review-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(292px, 34%);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2px;
  padding: 2px 2px 14px;
  scrollbar-color: #51627a #171f2b;
  scrollbar-width: thin;
}

.video-review-card {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding: 18px;
  border: 1px solid #39465a;
  border-radius: 7px;
  background: #171d29;
}

.video-review-card header,
.video-channel,
.video-watch {
  display: flex;
  align-items: center;
}

.video-review-card header { justify-content: space-between; gap: 10px; }
.video-type { color: #ffb06d; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.video-duration { color: #9aabc0; font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 750; }
.video-review-card h3 { margin: 18px 0 12px; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }

.video-channel { gap: 9px; color: #cbd5e2; font-size: 11px; }
.video-channel > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #775d36; border-radius: 50%; background: #2c251b; color: #f1bd62; font-size: 9px; font-weight: 850; }
.video-channel strong { overflow-wrap: anywhere; }
.video-why { margin: 16px 0; color: #b7c3d1; line-height: 1.55; }

.video-timestamps { display: grid; gap: 5px; margin-bottom: 16px; }
.video-timestamps a { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding: 7px 9px; border-left: 2px solid #526c91; background: #141f30; color: #b9c8db; text-decoration: none; font-size: 10px; }
.video-timestamps a:hover { border-left-color: var(--blue); background: #19283c; color: white; }
.video-timestamps b { color: #84b8f5; font-variant-numeric: tabular-nums; }
.video-timestamps span { overflow-wrap: anywhere; }

.video-watch { justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid #303b4d; color: #79dca1; text-decoration: none; font-size: 11px; font-weight: 800; }
.video-watch:hover { color: #a6f2c4; }

.capture-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr); gap: 12px; }
.capture-identity, .capture-layout dl { margin: 0; padding: 20px; border: 1px solid #286342; border-radius: 7px; background: #10241c; }
.capture-identity strong { font-size: 18px; }
.capture-identity p { color: #aebfb5; line-height: 1.55; }
.capture-layout dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; }
.capture-layout dt { color: var(--muted); }
.capture-layout dd { margin: 0; color: #d9e6df; }
.capture-section > .capabilities { margin-top: 12px; }

.migration-section dl { display: grid; grid-template-columns: minmax(150px, .45fr) minmax(0, 1.55fr); margin: 0; border: 1px solid #5d4828; border-radius: 7px; overflow: hidden; }
.migration-section dt, .migration-section dd { padding: 12px 14px; border-bottom: 1px solid #493a25; }
.migration-section dt { background: #211b16; color: var(--orange); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.migration-section dd { margin: 0; background: #17191a; color: #c9c4ba; }

.good-to-know { display: grid; gap: 7px; }
.good-to-know > div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #121a29; }
.good-to-know span { color: var(--orange); font-weight: 900; }
.good-to-know p { margin: 0; color: #bec9d5; line-height: 1.5; }

.research-trail { padding-bottom: 70px; }
.provenance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.provenance-grid article { padding: 18px; }
.provenance-grid strong { display: block; font-size: 15px; }
.provenance-grid p { color: var(--muted); line-height: 1.5; }
.research-subtitle { margin: 28px 0 10px; color: var(--green); font-size: 11px; text-transform: uppercase; }
.question-list, .method-list { margin: 0; padding: 0; list-style: none; counter-reset: research; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.question-list li, .method-list li { counter-increment: research; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #121a29; color: #bdc8d5; }
.question-list li:last-child, .method-list li:last-child { border-bottom: 0; }
.question-list li:before, .method-list li:before { content: counter(research, decimal-leading-zero); color: var(--green); font-size: 9px; font-weight: 850; }
.unknown.resolved:before { content: "✓"; color: var(--green); }

@media (max-width: 1180px) {
  .profile-hero { grid-template-columns: 1fr; }
  .profile-visual { max-width: 760px; }
  .community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .feature-grid, .capture-layout, .provenance-grid { grid-template-columns: 1fr; }
  .profile-heading h1 { font-size: 38px; }
  .profile-heading > p, .freshy-take p { font-size: 14px; }
  .section-heading { grid-template-columns: 28px minmax(0, 1fr); }
  .section-heading > b { grid-column: 2; }
  .migration-section dl { grid-template-columns: 1fr; }
  .migration-section dt, .migration-section dd { border-bottom: 0; }
  .migration-section dd { border-bottom: 1px solid #493a25; }
  .profile-nav { position: static; }
  .video-review-strip { grid-auto-columns: minmax(270px, 84%); }
}

@media (max-width: 560px) {
  .scopebar { grid-template-columns: 1fr; }
  .topbar { gap: 10px; }
  .profile-button { padding: 6px 8px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .taxonomy { max-height: 260px; overflow: auto; }
  .taxonomy .method-note { display: none; }
  .system-coverage dl { grid-template-columns: 1fr; }
  .system-coverage dd { margin-bottom: 6px; }
  .video-review-card { min-height: 410px; }
}

.research-mode .taxonomy,
.research-mode .catalog {
  display: none;
}

.research-mode .workspace {
  display: block;
}

.research-mode .detail {
  min-height: calc(100vh - 64px);
  max-width: 1180px;
  margin: 0 auto;
}

.audit-header {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 18px;
  align-items: center;
}

.audit-status {
  padding: 6px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-status.blocked {
  background: #3c2c1c;
  color: #f1ad51;
}

.audit-status.ready {
  background: #153b2c;
  color: #6be59e;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.audit-grid section {
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #121a29;
}

.audit-grid b {
  display: block;
  color: var(--green);
  font-size: 30px;
}

.audit-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-grid.compact section {
  min-height: 88px;
}

.audit-grid.compact b {
  font-size: 22px;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 1fr 1fr;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  background: #121a29;
  color: #b8c3d1;
}

.audit-row b {
  color: var(--text);
}

@media(max-width:700px) {
  .audit-grid { grid-template-columns: 1fr 1fr; }
  .audit-header { grid-template-columns: 50px 1fr; }
  .audit-status { grid-column: 1 / -1; justify-self: start; }
  .audit-row { grid-template-columns: 1fr; }
}

.compare-grid dt {
  color: var(--muted);
}

.compare-grid dd {
  margin: 0;
}

@media (max-width: 980px) {
  .detail {
    height: auto;
    max-height: none;
  }

  .compare-tray {
    left: 12px;
    right: 12px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
    max-height: 45vh;
    overflow: auto;
  }
}
