:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #64717f;
  --line: #d9e1e6;
  --paper: #f7f9f8;
  --panel: #ffffff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --gold: #b7791f;
  --rust: #b45309;
  --blue: #2563eb;
  --green: #15803d;
  --rose: #be123c;
  --shadow: 0 18px 50px rgba(20, 31, 41, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  letter-spacing: 0;
}

.nav-stack {
  display: grid;
  gap: 6px;
}

.nav-item,
.icon-button,
.primary-action,
.secondary-action,
.segmented button {
  border: 0;
  min-height: 42px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #536170;
  text-align: left;
}

.nav-item.is-active,
.nav-item:hover {
  background: #e8f3f1;
  color: var(--teal-dark);
}

.rail-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(21, 128, 61, 0.11);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 26px;
  background: rgba(247, 249, 248, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 225, 230, 0.78);
}

.search-wrap {
  flex: 1;
  max-width: 760px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.topbar-actions,
.hero-actions,
.composer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  border-radius: 8px;
  background: #edf2f2;
  color: #34424f;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 700;
}

.primary-action {
  background: var(--teal);
  color: #fff;
}

.secondary-action {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px 26px 14px;
}

.hero-copy {
  padding: 16px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  max-width: 760px;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  color: #475565;
  font-size: 17px;
  line-height: 1.65;
}

.hero-media {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  background: #dce6e2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
  padding: 18px 26px 34px;
}

.tech-directory {
  padding: 18px 26px 8px;
}

.directory-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff4dc;
  color: #7c4a03;
  font-size: 12px;
  font-weight: 800;
}

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

.directory-category {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 31, 41, 0.05);
  overflow: hidden;
}

.directory-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  cursor: pointer;
  list-style: none;
}

.directory-category-head::-webkit-details-marker {
  display: none;
}

.directory-category-head::after {
  content: "+";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f3f1;
  color: var(--teal-dark);
  font-weight: 800;
}

.directory-category[open] .directory-category-head::after {
  content: "-";
}

.directory-category h3 {
  margin: 0;
  font-size: 16px;
}

.directory-category-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.directory-links {
  display: grid;
  max-height: 390px;
  overflow: auto;
}

.directory-links a {
  display: grid;
  gap: 4px;
  padding: 11px 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #edf1f2;
}

.directory-links a:hover {
  background: #eef6f4;
}

.directory-links span {
  color: var(--muted);
  font-size: 12px;
}

.main-column,
.side-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.composer,
.panel,
.feed-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 31, 41, 0.05);
}

.composer {
  padding: 18px;
}

.composer-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.composer h2,
.panel h2,
.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.composer p,
.feed-meta,
.project-card p,
.panel-subtext {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.avatar-rv {
  background: var(--blue);
}

.composer textarea,
.modal textarea,
.modal input,
.composer select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
  outline-color: var(--teal);
}

.composer textarea,
.modal textarea {
  resize: vertical;
  min-height: 88px;
  padding: 12px;
}

.composer select,
.modal input {
  min-height: 42px;
  padding: 0 12px;
}

.composer-controls {
  margin-top: 12px;
}

.section-head,
.panel-head,
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  background: #eaf0f1;
  border-radius: 8px;
}

.segmented button {
  padding: 0 12px;
  background: transparent;
  border-radius: 7px;
  color: #52606d;
  font-weight: 700;
}

.segmented .is-selected {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 31, 41, 0.11);
}

.feed {
  display: grid;
  gap: 12px;
}

.feed-card {
  padding: 16px;
}

.feed-head {
  align-items: flex-start;
}

.feed-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.feed-card p {
  color: #435160;
  line-height: 1.55;
}

.tag-row,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.type-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.type-question {
  background: #e8f3f1;
  color: var(--teal-dark);
}

.type-opportunity {
  background: #fff4dc;
  color: #7c4a03;
}

.type-project {
  background: #e9efff;
  color: #1d4ed8;
}

.stat-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stat-row button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f6;
  color: #44515e;
  font-weight: 700;
}

.panel {
  padding: 16px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.category-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: #455360;
  font-weight: 700;
}

.category-tabs .is-selected {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e8f3f1;
  color: var(--teal-dark);
}

.tech-list {
  display: grid;
  gap: 10px;
}

.tech-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfc;
}

.tech-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  font-weight: 800;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
}

.tech-items a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e4df;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  background: #fff;
  color: #435160;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.tech-page {
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 56px) 44px;
}

.updates-page {
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 56px) 44px;
}

.tech-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.tech-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: stretch;
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.updates-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: stretch;
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.updates-hero h1 {
  font-size: clamp(38px, 7vw, 78px);
}

.updates-hero p:not(.eyebrow) {
  max-width: 820px;
  color: #475565;
  font-size: 18px;
  line-height: 1.65;
}

.tech-detail-hero h1 {
  font-size: clamp(38px, 7vw, 78px);
}

.tech-detail-hero p:not(.eyebrow) {
  max-width: 820px;
  color: #475565;
  font-size: 18px;
  line-height: 1.65;
}

.tech-signal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f7f9f8;
}

.tech-signal-panel h2 {
  margin: 0 0 12px;
}

.tech-signal-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.tech-signal-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.tech-signal-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.tech-signal-panel dd {
  margin: 0;
  font-weight: 800;
}

.tech-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.tech-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tech-topic-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.resource-section,
.qa-section {
  margin-top: 18px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.resource-card,
.question-panel,
.ai-panel,
.question-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 31, 41, 0.05);
}

.inline-ai-answer {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  color: #435160;
  font-size: 13px;
  line-height: 1.5;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.update-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 31, 41, 0.05);
}

.update-card h2 {
  margin: 0 0 8px;
}

.update-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.resource-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
}

.resource-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  background: #fbfdfc;
}

.resource-card span {
  color: var(--rust);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-card p,
.ai-panel p,
.question-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.qa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}

.question-panel,
.ai-panel,
.question-card {
  padding: 16px;
}

.question-panel label {
  display: grid;
  gap: 8px;
  color: #455360;
  font-size: 13px;
  font-weight: 800;
}

.question-panel textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  outline-color: var(--teal);
}

.question-panel button {
  margin-top: 12px;
}

.ai-panel h3 {
  margin: 0 0 8px;
}

.ai-answer-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9f8;
  border: 1px solid var(--line);
}

.ai-answer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.question-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.question-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.project-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.project-card h3 {
  margin: 0;
  font-size: 15px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  color: #435160;
  font-size: 13px;
  font-weight: 700;
}

.project-card button {
  width: 100%;
}

.live-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffe9e9;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
}

.modal {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(23, 33, 43, 0.42);
}

.modal form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal label {
  display: grid;
  gap: 7px;
  color: #455360;
  font-size: 13px;
  font-weight: 800;
}

.bid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.full-width {
  width: 100%;
}

[data-view-panel="taxonomy"] {
  display: none;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .brand span:last-child,
  .nav-item span,
  .rail-footer span:last-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
  }

  .content-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .directory-grid,
  .resource-grid,
  .qa-grid,
  .updates-grid,
  .updates-hero,
  .tech-detail-hero,
  .tech-detail-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .rail {
    position: sticky;
    z-index: 20;
    height: auto;
    top: 0;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    overflow-x: auto;
  }

  .nav-stack {
    display: flex;
    min-width: max-content;
  }

  .rail-footer {
    display: none;
  }

  .topbar,
  .content-grid,
  .tech-directory,
  .hero-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .hero-panel {
    gap: 14px;
  }

  h1 {
    font-size: 36px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 15px;
  }

  .content-grid,
  .side-column {
    grid-template-columns: 1fr;
  }

  .composer-controls,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .category-tabs {
    grid-template-columns: 1fr;
  }

  .bid-grid {
    grid-template-columns: 1fr;
  }
}
