:root {
  --app-bg: #f7f4ef;
  --surface: #fffefa;
  --surface-muted: #f2ede5;
  --ink: #1f2b34;
  --muted: #7d858c;
  --line: #dedbd5;
  --line-strong: #cbb79c;
  --accent: #2f7d65;
  --accent-soft: #e5f3ed;
  --warn: #f0b44d;
  --danger: #ef755f;
  --radius: 8px;
  --shadow: 0 12px 30px rgba(31, 43, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--app-bg);
}

body {
  margin: 0;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  background-color: var(--app-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
.module-card {
  touch-action: manipulation;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.42rem 0.78rem;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.btn-sm {
  min-height: 30px;
  padding: 0.34rem 0.66rem;
  font-size: 0.875rem;
}

.btn-dark {
  border-color: #1f2b34;
  background: #1f2b34;
  color: #fff;
}

.btn-dark:hover {
  background: #11191f;
}

.btn-outline-secondary {
  border-color: #c8c3bb;
  background: rgba(255, 255, 255, 0.6);
  color: #3f4b53;
}

.btn-outline-secondary:hover {
  background: #fff;
  border-color: #a9a197;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfc8bc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 101, 0.14);
  outline: none;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0 1.25rem;
  padding: max(28px, env(safe-area-inset-top)) 0 max(44px, env(safe-area-inset-bottom));
}

.main-pane {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.context-rail {
  position: sticky;
  grid-column: 1;
  grid-row: 2;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.72);
  box-shadow: 0 1px 0 rgba(31, 43, 52, 0.03);
  padding: 14px;
}

.rail-title,
.rail-group-title {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-title {
  margin: 0 0 10px 4px;
}

.rail-list {
  display: grid;
  gap: 12px;
}

.rail-jump {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 760;
}

.rail-jump:hover,
.rail-jump:focus {
  border-color: #d6d0c7;
  background: var(--surface);
  color: var(--accent);
  outline: none;
}

.rail-jump span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-group {
  display: grid;
  gap: 5px;
}

.rail-group-title {
  margin: 6px 0 2px 4px;
}

.rail-item {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.rail-item:hover,
.rail-item:focus,
.rail-item.is-active {
  border-color: #d6d0c7;
  background: var(--surface);
  outline: none;
}

.rail-item.is-active {
  box-shadow: 0 1px 0 rgba(31, 43, 52, 0.04);
}

.rail-favicon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
}

.rail-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.topbar {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 4px;
}

.title-stack {
  position: absolute;
  left: 50%;
  width: min(720px, calc(100vw - 520px));
  transform: translateX(-50%);
  min-width: 0;
  text-align: center;
}

.eyebrow-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-title-row {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.view-title {
  max-width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  padding: 3px 8px 5px;
  border-radius: 6px;
}

.concept-trigger {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.concept-trigger:hover,
.concept-trigger:focus {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent);
  outline: none;
}

.concept-trigger.has-content {
  position: relative;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(47, 125, 101, 0.16);
}

.concept-trigger.has-content:hover,
.concept-trigger.has-content:focus {
  border-color: #24654f;
  background: #24654f;
  color: #fff;
}

.concept-trigger.has-content::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--warn);
}

.view-title:focus,
.view-title:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  outline: none;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
}

.add-button,
.ghost-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
}

.add-button:hover,
.add-button:focus,
.ghost-action:hover,
.ghost-action:focus {
  border-color: var(--line-strong);
  background: var(--surface);
  color: #24654f;
  outline: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

.icon-button:hover {
  background: rgba(31, 43, 52, 0.08);
}

.icon-button.sidebar-toggle {
  display: none;
}

.workspace {
  min-width: 0;
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.7);
  box-shadow: 0 1px 0 rgba(31, 43, 52, 0.03);
  padding: clamp(18px, 2.2vw, 28px);
}

.shortcut-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.shortcut-strip:empty {
  display: none;
}

.version-info {
  margin-left: auto;
  color: #9a9fa3;
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
}

kbd {
  display: inline-grid;
  min-width: 1.55em;
  min-height: 1.45em;
  place-items: center;
  border: 1px solid #cfc8bc;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(31, 43, 52, 0.08);
  padding: 0 0.34em;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.btn kbd {
  margin-left: 0.38rem;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
  box-shadow: none;
}

.space-row + .space-row {
  margin-top: 32px;
}

.space-row[data-type="group"] {
  cursor: default;
}

.space-row[data-type="group"].is-dragging {
  opacity: 0.56;
}

.row-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.row-heading h2 {
  grid-column: 2;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #4f5960;
  text-transform: uppercase;
  text-align: center;
}

.group-drag-handle {
  grid-column: 1;
  justify-self: start;
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #8b9399;
  cursor: grab;
}

.group-drag-handle:hover,
.group-drag-handle:focus {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent);
  outline: none;
}

.group-drag-handle:active {
  cursor: grabbing;
}

.ghost-action {
  grid-column: 3;
  justify-self: end;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, calc((100% - 72px) / 7)));
  gap: 12px;
  min-height: 116px;
}

.module-card {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(58px, auto) auto;
  gap: 12px 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(31, 43, 52, 0.04);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: min-height 150ms ease, transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.module-card:hover,
.module-card:focus-within {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: #cfc7bc;
  outline: none;
}

.module-card:focus-visible {
  outline: 3px solid rgba(47, 125, 101, 0.24);
  outline-offset: 2px;
}

.module-card.is-dragging {
  opacity: 0.45;
}

.module-card.is-drop-target {
  outline: 3px solid rgba(47, 125, 101, 0.22);
}

.module-card.color-green {
  border-top-color: #5fc47a;
  background: #f5fbf2;
}

.module-card.color-red {
  border-top-color: #ff715f;
  background: #fff6f3;
}

.module-card.color-gray {
  border-top-color: #a5adb2;
  background: #f7f8f8;
}

.module-card.color-gold {
  border-top-color: #c7a77c;
  background: #fffaf1;
}

.module-card.color-blue {
  border-top-color: #66a5c7;
  background: #f4fbfe;
}

.module-card.color-teal {
  border-top-color: #4db7a8;
  background: #f1fbf8;
}

.module-card.color-purple {
  border-top-color: #9b82d8;
  background: #f8f5ff;
}

.module-card.color-pink {
  border-top-color: #df7ea7;
  background: #fff5fa;
}

.module-card.color-orange {
  border-top-color: #f19a5b;
  background: #fff7ef;
}

.module-card.color-lime {
  border-top-color: #9bc85a;
  background: #f8fdec;
}

.module-card.color-cyan {
  border-top-color: #54bfd2;
  background: #f0fbfd;
}

.module-card.color-navy {
  border-top-color: #5577a8;
  background: #f3f7fd;
}

.module-card.color-slate {
  border-top-color: #7f91a1;
  background: #f5f7f8;
}

.module-card h3 {
  max-width: calc(100% - 74px);
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.module-card p {
  display: -webkit-box;
  margin: 7px 0 0;
  color: #47525a;
  cursor: text;
  font-size: 0.9rem;
  line-height: 1.28;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.star-button {
  position: absolute;
  top: 15px;
  right: 48px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #f7bd3f;
  font-size: 1.35rem;
  line-height: 1;
}

.star-button.is-off {
  color: #c6c2bc;
}

.color-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(31, 43, 52, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 254, 250, 0.88);
  cursor: pointer;
}

.color-button.is-inherited::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(31, 43, 52, 0.28);
  border-radius: 50%;
}

.color-menu {
  position: absolute;
  top: 46px;
  right: 18px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, 24px);
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 43, 52, 0.16);
  padding: 8px;
}

.color-menu[hidden] {
  display: none;
}

.color-choice {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  color: #7d858c;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.color-choice:hover,
.color-choice:focus,
.color-choice.is-active {
  border-color: #1f2b34;
  outline: none;
}

.swatch-none {
  background: #fffefa;
}

.swatch-green {
  background: #5fc47a;
}

.swatch-gold {
  background: #c7a77c;
}

.swatch-blue {
  background: #66a5c7;
}

.swatch-red {
  background: #ff715f;
}

.swatch-gray {
  background: #a5adb2;
}

.swatch-teal {
  background: #4db7a8;
}

.swatch-purple {
  background: #9b82d8;
}

.swatch-pink {
  background: #df7ea7;
}

.swatch-orange {
  background: #f19a5b;
}

.swatch-lime {
  background: #9bc85a;
}

.swatch-cyan {
  background: #54bfd2;
}

.swatch-navy {
  background: #5577a8;
}

.swatch-slate {
  background: #7f91a1;
}

.card-footerline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 24px;
}

.count-label {
  min-width: 28px;
  border: 1px solid rgba(47, 125, 101, 0.22);
  border-radius: 999px;
  background: rgba(229, 243, 237, 0.7);
  color: var(--accent);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.25;
  text-align: center;
}

.empty-state {
  width: min(100%, 520px);
  min-height: 210px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px dashed #cfc8bc;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.service-toolbar,
.component-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 16px;
}

.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}

.subsection-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1.15;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.76);
  padding: 6px;
}

.icon-tool {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.icon-tool--wide {
  width: 54px;
  grid-auto-flow: column;
  gap: 6px;
}

.icon-tool:hover {
  background: rgba(47, 125, 101, 0.1);
  border-color: rgba(47, 125, 101, 0.18);
}

.toolbar-spacer {
  flex: 1 1 auto;
}

.tool-menu {
  position: relative;
}

.tool-menu__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 45;
  min-width: 220px;
  border: 1px solid #8fc7ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 43, 52, 0.14);
  padding: 6px;
}

.tool-menu__panel[hidden] {
  display: none;
}

.tool-menu__panel button {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}

.tool-menu__panel button:hover,
.tool-menu__panel button:focus {
  background: #d7ebff;
  outline: none;
}

.tool-menu__panel--colors {
  width: 452px;
  display: grid;
  grid-template-columns: repeat(9, 42px);
  gap: 8px;
  padding: 8px;
}

.tool-menu__panel--colors button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-grid;
  grid-template-columns: 1fr;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0;
  font-weight: 760;
}

.text-swatch {
  background: #fff;
}

.highlight-swatch {
  color: var(--ink);
}

.tool-menu__panel--colors .clear-color-swatch {
  grid-column: 1 / -1;
  width: 100%;
  height: 36px;
  min-height: 36px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  justify-items: start;
  border-top: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px;
}

.concept-editor {
  min-height: 220px;
  border: 1px solid #cfc8bc;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  padding: 18px;
  color: var(--ink);
  line-height: 1.45;
  outline: none;
}

.concept-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 101, 0.14);
}

.concept-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.concept-editor h3 {
  margin: 0.8em 0 0.35em;
  font-size: 1.08rem;
}

.concept-editor h2 {
  margin: 0.9em 0 0.4em;
  font-size: 1.28rem;
}

.concept-editor h4 {
  margin: 0.8em 0 0.35em;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.concept-editor p {
  margin: 0 0 0.7em;
}

.concept-editor blockquote {
  margin: 0 0 0.8em;
  border-left: 4px solid var(--line-strong);
  padding-left: 12px;
  color: #52606a;
}

.concept-editor pre {
  overflow-x: auto;
  border-radius: 6px;
  background: #f1f4f5;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
}

.concept-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.8em;
}

.concept-editor td,
.concept-editor th {
  border: 1px solid var(--line);
  padding: 8px;
}

.detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(480px, 100vw);
  background: var(--surface);
  box-shadow: -20px 0 44px rgba(31, 43, 52, 0.16);
  transform: translateX(105%);
  transition: transform 180ms ease;
  z-index: 20;
}

.detail-panel.is-open {
  transform: translateX(0);
}

.detail-panel__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  overflow-y: auto;
}

.detail-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-panel h2 {
  margin: 2px 0 0;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f5f0;
  color: #4d5960;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 4px 9px;
}

.field-label {
  margin-top: 8px;
  color: #516069;
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.concept-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 30;
}

.concept-modal.is-open {
  display: grid;
}

.concept-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(31, 43, 52, 0.36);
  cursor: pointer;
}

.concept-modal__dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto auto minmax(240px, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(31, 43, 52, 0.24);
  padding: 22px;
}

.concept-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.concept-modal__header h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.12;
}

.concept-modal .concept-editor {
  min-height: 240px;
  overflow-y: auto;
}

.concept-modal__actions {
  display: flex;
  justify-content: flex-end;
}

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

  .topbar {
    grid-template-columns: 210px minmax(0, 1fr) auto;
  }

  .title-stack {
    width: min(560px, calc(100vw - 520px));
  }

  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .context-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, calc(100vw - 44px));
    border-radius: 0;
    box-shadow: 18px 0 42px rgba(31, 43, 52, 0.18);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    z-index: 25;
    overflow-y: auto;
  }

  .app-shell.is-sidebar-open .context-rail {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(31, 43, 52, 0.28);
    z-index: 24;
  }

  .app-shell.is-sidebar-open .sidebar-backdrop {
    display: block;
  }

  .icon-button.sidebar-toggle {
    display: inline-grid;
    font-size: 1.12rem;
  }

  .topbar {
    grid-template-columns: 40px 40px minmax(0, 1fr);
  }

  .title-stack {
    position: static;
    grid-column: 3;
    width: auto;
    transform: none;
    text-align: left;
  }

  .eyebrow-row,
  .view-title-row {
    justify-content: start;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-toolbar,
  .component-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-card {
    min-height: 112px;
    padding: 16px 17px 14px;
  }

  .concept-modal {
    padding: 10px;
  }

  .concept-modal__dialog {
    max-height: calc(100vh - 20px);
    padding: 18px;
  }
}
