:root {
  color-scheme: light;
  --page-bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: #f7fafd;
  --text: #10233b;
  --muted: #5f7390;
  --line: #d7e2f0;
  --line-strong: #b8c9de;
  --accent: #1f66d1;
  --accent-strong: #114ca3;
  --accent-soft: #e7f0ff;
  --danger: #c94e4e;
  --success: #1d7a46;
  --shadow: 0 18px 40px rgba(28, 56, 97, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(64, 151, 255, 0.2), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

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

.site-nav {
  background: rgba(247, 251, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(183, 201, 222, 0.7);
}

.site-shell,
.shell {
  width: min(1380px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 1.2rem;
  display: grid;
  gap: 1.2rem;
}

.site-header-shell,
.comparison-shell {
  max-width: 1380px;
}

.item-shell {
  max-width: 1040px;
}

.site-header-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 0 1.35rem;
}

.brand {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: clamp(4rem, 7vw, 5.7rem);
  height: auto;
  display: block;
}

.primary-nav {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.primary-nav a {
  color: var(--accent-strong);
  text-decoration: none;
}

.primary-nav a:hover {
  text-decoration: underline;
}

.account-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.account-actions form {
  margin: 0;
}

.account-actions button {
  justify-self: auto;
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.account-actions button:hover {
  background: #fff;
}

.mobile-menu {
  display: none;
}

.mobile-menu summary {
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.burger-lines {
  position: relative;
  display: block;
  width: 1.25rem;
  height: 0.9rem;
}

.burger-lines::before,
.burger-lines::after,
.burger-lines {
  border-top: 2px solid currentColor;
}

.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
}

.burger-lines::before {
  top: 0.35rem;
}

.burger-lines::after {
  top: 0.7rem;
}

.menu-label {
  font-size: 0.88rem;
  font-weight: 900;
}

.brand-wordmark {
  position: relative;
  display: inline-block;
  min-width: 0;
  margin-bottom: 0.45rem;
}

.brand-text-logo {
  width: clamp(15rem, 35vw, 23rem);
  height: auto;
  display: block;
}

.brand-stakeholder-label {
  position: absolute;
  right: 0;
  bottom: -0.95rem;
  color: #d82228;
  font-size: clamp(0.72rem, 1.35vw, 0.96rem);
  font-weight: 800;
  line-height: 1;
}

.card,
.preview-card,
.announcement-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-shell {
  min-height: 100vh;
  place-content: center;
  max-width: 32rem;
}

.auth-card h1 {
  margin: 0;
}

.auth-link {
  margin: 0;
  color: var(--muted);
}

.auth-link a {
  color: var(--accent-strong);
  font-weight: 800;
}

.page-action-link {
  margin: 0.8rem 0 0;
}

.page-action-link a,
.copy-link a {
  color: var(--accent-strong);
  font-weight: 800;
}

.copy-link {
  overflow-wrap: anywhere;
}

.plain-link-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.plain-link-copy p {
  min-width: 0;
  margin: 0;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
  background: var(--panel-soft);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
}

.invite-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.invite-link-copy {
  display: inline-grid;
  grid-template-columns: auto minmax(0, auto);
  justify-self: start;
  align-items: center;
  max-width: 100%;
  background: var(--panel-soft);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  overflow: hidden;
}

.invite-link-copy p {
  min-width: 0;
  max-width: min(46rem, 100%);
  margin: 0;
  padding: 0.72rem 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.item-invite-card {
  gap: 0;
  padding: 1rem 1.15rem;
  border-color: var(--line);
  border-left: 4px solid var(--accent);
  background: rgba(247, 251, 255, 0.82);
  box-shadow: none;
}

.item-invite-card summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.55;
}

.item-invite-card summary::-webkit-details-marker {
  display: none;
}

.item-invite-card summary:focus-visible {
  outline: 3px solid rgba(31, 102, 209, 0.16);
  outline-offset: 0.25rem;
}

.item-invite-trigger {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.item-invite-panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.icon-copy-button {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 2.7rem;
  min-height: 2.7rem;
  padding: 0;
  color: var(--accent-strong);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: none;
}

.icon-copy-button:hover {
  color: #fff;
  background: var(--accent-strong);
}

.icon-copy-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.65rem 1rem;
  color: #fff;
  border-radius: 0.45rem;
  background: var(--success);
  font-weight: 800;
  text-decoration: none;
}

.button-link-secondary {
  color: var(--accent-strong);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.button-link-secondary:hover {
  color: #fff;
  background: var(--accent-strong);
}

.button-link-accent {
  background: var(--accent);
}

.button-link-accent:hover {
  background: var(--accent-strong);
}

.positive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.auth-form,
.comment-form,
.discussion {
  display: grid;
  gap: 1rem;
}

.form-section {
  display: grid;
  gap: 0.9rem;
  padding-top: 0;
}

.form-section h2 {
  margin: 0;
  font-size: 1.05rem;
}

.form-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form label,
.comment-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 800;
}

.field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  width: fit-content;
}

.required-marker {
  color: var(--danger);
}

.checkbox-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
  width: fit-content;
  column-gap: 0.6rem;
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  accent-color: var(--success);
  cursor: pointer;
}

.auth-form input:not([type="checkbox"]),
.auth-form textarea,
.comment-form textarea {
  width: 100%;
  min-height: 2.9rem;
  font-size: 16px;
  line-height: 1.35;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: #fff;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

.auth-form input:not([type="checkbox"]):focus,
.auth-form textarea:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 102, 209, 0.18);
  outline-offset: 0;
}

.auth-form ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--danger);
}

.discussion h2 {
  margin: 0.25rem 0 0;
}

.discussion p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.comment-list {
  display: grid;
  gap: 1rem;
}

.comment {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.68);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: baseline;
  color: var(--text);
}

.comment-meta time {
  color: var(--muted);
  font-size: 0.88rem;
}

.comment p {
  margin: 0;
  color: var(--text);
}

.comment-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  min-height: 1.35rem;
  padding: 0.05rem 0.35rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  align-items: center;
}

.comment-actions > :not(:first-child) {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.comment-actions > :not(:first-child)::before {
  content: "|";
  color: var(--line-strong);
  font-weight: 500;
}

.comment-action-toggle,
.vote-form {
  margin: 0;
}

.comment-action-toggle,
.vote-form button {
  justify-self: auto;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 800;
}

.comment-action-toggle:hover,
.vote-form button:hover,
.comment-action-toggle[aria-expanded="true"] {
  color: var(--accent-strong);
  background: transparent;
}

.vote-form button.vote-up.is-active {
  color: #0f8a45;
}

.vote-form button.vote-down.is-active {
  color: #b42318;
}

.reply-list {
  display: grid;
  gap: 0.7rem;
  margin-left: 0;
  padding-left: min(1.05rem, 3vw);
  padding-top: 0.2rem;
  border-left: 1px solid var(--line-strong);
}

.reply-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.25rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.reply-row .comment-meta {
  gap: 0.35rem 0.55rem;
}

.reply-row p {
  color: var(--muted);
}

.reply-form,
.edit-form {
  margin-top: 0.6rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line-strong);
}

.reply-panel {
  width: 100%;
  overflow: hidden;
}

.reply-panel.is-open {
  animation: comment-panel-in 160ms ease-out;
}

.reply-form {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.06);
}

.inline-edit-form {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-edit-form textarea {
  min-height: 5.5rem;
}

@keyframes comment-panel-in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.changelog {
  margin-top: 0.35rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.page-header {
  gap: 0.35rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.page-intro {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.stakeholder-home-shell .page-intro {
  width: 100%;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.simulator,
.controls,
.comparison-list {
  display: grid;
  gap: 1rem;
}

.review-group {
  display: grid;
  gap: 0.75rem;
}

.review-group h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.section-stack {
  display: grid;
  gap: 1rem;
}

.empty-group {
  margin: 0;
  padding: 1rem 1.1rem;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.55);
}

.public-discussion-prompt a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.section-card {
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.section-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 44px rgba(28, 56, 97, 0.12);
  transform: translateY(-1px);
}

.section-card-disabled {
  opacity: 0.78;
}

.section-card-disabled:hover {
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: none;
}

.section-card h3 {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.section-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-status {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-status-ready {
  color: var(--success);
}

.section-status-pending {
  color: #38526f;
  opacity: 0.78;
}

.section-status-archived {
  color: #64748b;
  opacity: 0.82;
}

.section-arrow {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 2.35rem;
  height: 2.35rem;
  color: #fff;
  border-radius: 50%;
  background: var(--success);
  font-size: 1.35rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.preview-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.preview-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.preview-heading p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.video-review {
  padding: 0;
  overflow: hidden;
}

.image-review {
  padding: 0;
  overflow: hidden;
}

.review-image {
  display: block;
  width: 100%;
  height: auto;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111820;
}

.video-frame-vertical {
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 100 / 178.218;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.touchscreen-review {
  display: grid;
  justify-items: center;
  overflow: hidden;
}

.touchscreen-device-window {
  width: min(100%, 920px);
  padding: clamp(0.45rem, 1.8vw, 0.9rem);
  border-radius: 0.35rem;
  background: linear-gradient(135deg, #252525, #070707);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(16, 35, 59, 0.16);
}

.touchscreen-screen {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(15, 35, 58, 0.35);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(180deg, #effcff 0%, #e9fbff 58%, #effcff 100%);
}

.touchscreen-slide-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 360ms cubic-bezier(0.22, 0.78, 0.26, 1);
}

.touchscreen-screen.is-detail .touchscreen-slide-track {
  transform: translateX(-50%);
}

.touchscreen-page {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
}

.touchscreen-page-menu {
  display: grid;
  grid-template-columns: 43% 57%;
  align-items: center;
}

.touchscreen-brand-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8%;
  height: 100%;
  padding: 11% 5% 8% 10%;
}

.touchscreen-robin {
  width: 34%;
  min-width: 0;
}

.touchscreen-wordmark {
  width: 72%;
  min-width: 0;
  filter: drop-shadow(0 2px 1px rgba(136, 30, 48, 0.16));
}

.touchscreen-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8% 7%;
  width: 78%;
  height: 70%;
}

.touchscreen-menu-button {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 3%;
  min-height: 0;
  padding: 9% 7% 8%;
  color: #fff;
  border: 0;
  border-radius: 16%;
  cursor: pointer;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #bc1747, #9e143e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -10px 20px rgba(82, 5, 31, 0.12),
    0 2px 5px rgba(70, 0, 24, 0.1);
}

.touchscreen-menu-button:active,
.touchscreen-menu-button:focus-visible {
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #bc1747, #9e143e);
  outline: none;
  transform: none;
}

.touchscreen-menu-button svg {
  width: min(42%, 4.9rem);
  height: auto;
  filter: drop-shadow(2px 3px 0 rgba(43, 46, 66, 0.35));
}

.touchscreen-menu-button span {
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(0.42rem, 3cqw, 1.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-shadow: 2px 3px 0 rgba(43, 46, 66, 0.28);
}

.touchscreen-page-detail {
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
}

.touchscreen-detail-content {
  display: grid;
  grid-template-columns: minmax(4.4rem, 12.5%) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #10233b;
  text-align: left;
}

.touchscreen-sidebar {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 4.5%;
  min-height: 0;
  padding: 10% 8%;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(180deg, #effcff 0%, #e9fbff 58%, #effcff 100%);
  border-right: clamp(0.22rem, 1cqw, 0.44rem) solid #6f0d2a;
}

.touchscreen-sidebar-brand {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  min-width: 0;
}

.touchscreen-sidebar-home {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.touchscreen-sidebar-home:active,
.touchscreen-sidebar-home:focus-visible {
  outline: 2px solid rgba(158, 20, 62, 0.24);
  outline-offset: 2px;
}

.touchscreen-sidebar-robin {
  width: min(72%, 3.4rem);
  min-width: 0;
}

.touchscreen-sidebar-nav {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0.48rem;
  min-height: 0;
}

.touchscreen-sidebar-button {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 3%;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 6% 7% 9%;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  white-space: normal;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #bc1747, #9e143e);
  border: 0;
  border-radius: 16%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -8px 18px rgba(82, 5, 31, 0.12),
    0 2px 4px rgba(70, 0, 24, 0.12);
  font-size: clamp(0.38rem, 1.55cqw, 0.66rem);
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 1px 2px 0 rgba(43, 46, 66, 0.24);
  cursor: pointer;
}

.touchscreen-sidebar-button svg {
  width: min(45%, 2rem);
  height: auto;
  filter: drop-shadow(1px 2px 0 rgba(43, 46, 66, 0.35));
}

.touchscreen-sidebar-button span {
  min-width: 0;
  color: inherit;
}

.touchscreen-sidebar-button.is-active {
  color: #9e143e;
  background:
    radial-gradient(circle at 70% 18%, rgba(158, 20, 62, 0.08), transparent 32%),
    linear-gradient(145deg, #ffffff, #f5fbff);
  border: clamp(0.12rem, 0.42cqw, 0.18rem) solid #9e143e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 2px 4px rgba(70, 0, 24, 0.12);
  text-shadow: none;
}

.touchscreen-sidebar-button.is-active svg {
  filter: none;
}

.touchscreen-detail-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
}

.route-library-workspace {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2.5%;
  height: 100%;
  min-height: 0;
  padding: 2.1% 2.3% 2.1% 3.4%;
  transition: transform 320ms cubic-bezier(0.22, 0.78, 0.26, 1);
}

.touchscreen-detail-main.is-route-open .route-library-workspace {
  transform: translateX(-105%);
}

.touchscreen-detail-main.is-display-open .route-library-workspace {
  transform: translateX(-210%);
}

.route-search-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8%;
}

.route-search-control {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  color: #5f7390;
  font-size: clamp(0.58rem, 1.7cqw, 0.78rem);
  font-weight: 900;
  line-height: 1;
}

.route-search-control input {
  width: 100%;
  min-height: clamp(1.75rem, 5.8cqw, 2.5rem);
  padding: 0.28rem 0.44rem;
  color: #10233b;
  background: #fff;
  border: 1px solid rgba(158, 20, 62, 0.2);
  border-radius: 0.28rem;
  font-size: clamp(0.74rem, 2.2cqw, 1rem);
  font-weight: 900;
  line-height: 1;
}

.route-search-control input:focus {
  outline: 2px solid rgba(158, 20, 62, 0.24);
  outline-offset: 1px;
}

.route-library-list {
  display: grid;
  align-content: start;
  gap: 0.34rem;
  min-height: 0;
  overflow: auto;
  padding-right: 0.12rem;
  padding-bottom: 1.2rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6rem), transparent);
}

.route-library-workspace.is-keyboard-open .route-library-list {
  padding-bottom: 32%;
}

.route-library-list button {
  display: grid;
  gap: 0.16rem;
  width: 100%;
  min-width: 0;
  min-height: clamp(2.45rem, 7.6cqw, 3.35rem);
  margin: 0;
  padding: 0.74rem 0.88rem;
  color: #10233b;
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 102, 209, 0.14);
  border-radius: 0.3rem;
  box-shadow: none;
  cursor: pointer;
}

.route-library-list button:focus-visible,
.route-library-list button:active {
  outline: 2px solid rgba(158, 20, 62, 0.24);
  outline-offset: 1px;
}

.route-library-list strong {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  overflow-wrap: anywhere;
  font-size: clamp(0.86rem, 2.46cqw, 1.14rem);
  line-height: 1.05;
}

.route-library-list strong span {
  padding: 0.18rem 0.38rem;
  color: #fff;
  background: #9e143e;
  border-radius: 0.22rem;
  font-size: clamp(0.8rem, 2.1cqw, 1rem);
  line-height: 1;
}

.route-library-list em,
.route-library-empty {
  color: #5f7390;
  font-size: clamp(0.7rem, 2.09cqw, 0.92rem);
  font-weight: 900;
  font-style: normal;
  line-height: 1.05;
}

.route-library-empty {
  justify-self: center;
  color: #9e143e;
}

.route-touch-keyboard {
  position: absolute;
  right: 2%;
  bottom: 2%;
  left: 3%;
  z-index: 4;
  display: grid;
  gap: 15px;
  padding: 0.7rem 0.5rem 0.42rem;
  background: rgba(16, 35, 59, 0.94);
  border-radius: 0.36rem;
  box-shadow: 0 -8px 18px rgba(16, 35, 59, 0.18);
}

.route-keyboard-row {
  display: grid;
  grid-template-columns: repeat(10, 38px);
  gap: 12px;
  width: min(100%, 24rem);
  justify-content: center;
  justify-self: center;
}

.route-keyboard-row-middle {
  grid-template-columns: repeat(9, 38px);
  padding: 0;
}

.route-keyboard-row:nth-of-type(3) {
  grid-template-columns: repeat(7, 38px);
}

.route-keyboard-row-actions {
  grid-template-columns: minmax(0, 19.5rem) 38px;
  width: min(100%, 24rem);
  justify-content: center;
  padding: 0;
}

.route-touch-keyboard button {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 38px;
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0.18rem 0.2rem;
  color: #10233b;
  background: #fff;
  border: 0;
  border-radius: 0.22rem;
  box-shadow: none;
  font-size: clamp(0.72rem, 2cqw, 0.92rem);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.route-touch-keyboard .route-key-action {
  color: #fff;
  background: #9e143e;
}

.route-key-backspace svg,
.route-keyboard-close svg {
  width: 72%;
  height: 72%;
}

.route-touch-keyboard .route-key-space {
  width: 100%;
  min-height: 38px;
  height: 38px;
  background: #e8eef7;
}

.route-keyboard-close {
  position: absolute;
  top: -0.55rem;
  right: -0.45rem;
  width: clamp(1.25rem, 4.2cqw, 1.8rem);
  height: auto;
  min-height: 0 !important;
  aspect-ratio: 1;
  padding: 0 !important;
  color: #fff !important;
  background: #9e143e !important;
}

.route-detail-workspace {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2.2%;
  min-height: 0;
  padding: 2.1% 2.3% 2.1% 3.4%;
  transform: translateX(105%);
  transition: transform 320ms cubic-bezier(0.22, 0.78, 0.26, 1);
}

.touchscreen-detail-main.is-route-open .route-detail-workspace {
  transform: translateX(0);
}

.touchscreen-detail-main.is-display-open .route-detail-workspace {
  transform: translateX(-105%);
}

.route-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.route-detail-header h2,
.route-stop-dialog-header h3 {
  margin: 0;
}

.route-detail-header h2 {
  color: #9e143e;
  font-size: clamp(1rem, 2.85cqw, 1.32rem);
  line-height: 1.05;
}

.route-detail-back,
.route-add-stop-button,
.route-stop-dialog-header button {
  display: grid;
  place-items: center;
  min-width: 0;
  margin: 0;
  color: #fff;
  background: #9e143e;
  border: 0;
  border-radius: 0.28rem;
  box-shadow: none;
  font-weight: 900;
  cursor: pointer;
}

.route-detail-back {
  width: clamp(1.7rem, 5.4cqw, 2.3rem);
  aspect-ratio: 1;
  padding: 0;
}

.route-detail-back svg,
.route-stop-dialog-header button svg {
  width: 68%;
  height: 68%;
}

.route-add-stop-button {
  min-height: clamp(1.7rem, 5.4cqw, 2.3rem);
  padding: 0.36rem 0.56rem;
  font-size: clamp(0.58rem, 1.7cqw, 0.76rem);
}

.route-detail-footer {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  gap: 0.5rem;
}

.route-start-button,
.route-reset-button {
  min-height: clamp(2.15rem, 6.8cqw, 3rem);
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.36rem;
  font-size: clamp(0.84rem, 2.5cqw, 1.12rem);
  font-weight: 900;
  line-height: 1.05;
  cursor: pointer;
}

.route-start-button {
  min-width: min(45%, 12rem);
  color: #fff;
  background: linear-gradient(145deg, #bc1747, #9e143e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 4px rgba(70, 0, 24, 0.12);
}

.route-reset-button {
  min-width: min(28%, 7rem);
  color: #9e143e;
  background: #fff;
  border: 1px solid rgba(158, 20, 62, 0.22);
  box-shadow: none;
}

.route-stop-list {
  display: grid;
  align-content: start;
  gap: 0.34rem;
  min-height: 0;
  margin: 50px 0 0;
  padding: 0 0.1rem 1rem 0;
  overflow: auto;
  list-style: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.4rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 1.4rem), transparent);
}

.route-stop-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  min-height: clamp(1.8rem, 5.8cqw, 2.6rem);
  padding: 0.44rem 0.54rem;
  color: #10233b;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 102, 209, 0.14);
  border-radius: 0.3rem;
}

.route-stop-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(0.72rem, 2.05cqw, 0.95rem);
  font-weight: 900;
  line-height: 1.08;
}

.route-stop-crs {
  display: inline-grid;
  place-items: center;
  margin-left: 0.35rem;
  padding: 0.14rem 0.34rem;
  color: #fff;
  background: #9e143e;
  border-radius: 0.2rem;
  font-size: clamp(0.72rem, 1.95cqw, 0.9rem);
  line-height: 1;
}

.route-stop-controls {
  display: grid;
  grid-template-columns: repeat(3, clamp(1.8rem, 5.6cqw, 2.45rem));
  gap: 0.3rem;
}

.route-stop-controls button {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #9e143e;
  background: #fff;
  border: 1px solid rgba(158, 20, 62, 0.22);
  border-radius: 0.24rem;
  box-shadow: none;
  font-size: clamp(0.95rem, 2.55cqw, 1.2rem);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.route-stop-controls svg {
  width: 68%;
  height: 68%;
}

.route-stop-controls .route-stop-delete {
  color: #fff;
  background: #9e143e;
}

.route-stop-dialog {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 3%;
  background: rgba(16, 35, 59, 0.3);
}

.route-stop-dialog-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.45rem;
  width: min(88%, 24rem);
  height: min(86%, 17rem);
  max-height: none;
  min-height: 0;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(158, 20, 62, 0.18);
  border-radius: 0.42rem;
  box-shadow: 0 12px 28px rgba(16, 35, 59, 0.2);
}

.route-stop-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.route-stop-dialog-header h3 {
  color: #9e143e;
  font-size: clamp(1.05rem, 3cqw, 1.34rem);
  line-height: 1.05;
}

.route-stop-dialog-header button {
  width: clamp(1.45rem, 4.6cqw, 2rem);
  aspect-ratio: 1;
  padding: 0;
}

.route-stop-search {
  display: grid;
  gap: 0.2rem;
  color: #5f7390;
  font-size: clamp(0.72rem, 2.05cqw, 0.9rem);
  font-weight: 900;
}

.route-stop-search input {
  min-height: clamp(1.7rem, 5.4cqw, 2.3rem);
  padding: 0.3rem 0.45rem;
  color: #10233b;
  background: #fff;
  border: 1px solid rgba(158, 20, 62, 0.2);
  border-radius: 0.28rem;
  font-size: clamp(0.92rem, 2.6cqw, 1.16rem);
  font-weight: 900;
}

.route-stop-results {
  display: grid;
  align-content: start;
  gap: 0.28rem;
  min-height: 0;
  overflow: auto;
}

.route-stop-results button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  min-height: clamp(1.5rem, 4.8cqw, 2.1rem);
  margin: 0;
  padding: 0.32rem 0.44rem;
  color: #10233b;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(31, 102, 209, 0.14);
  border-radius: 0.28rem;
  box-shadow: none;
  font-size: clamp(0.92rem, 2.6cqw, 1.14rem);
  font-weight: 900;
  cursor: pointer;
}

.route-stop-results span {
  padding: 0.14rem 0.32rem;
  color: #fff;
  background: #9e143e;
  border-radius: 0.2rem;
  font-size: clamp(0.86rem, 2.3cqw, 1.04rem);
}

.route-display-workspace {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3%;
  min-height: 0;
  padding: 2.1% 2.3% 2.1% 3.4%;
  transform: translateX(105%);
  transition: transform 320ms cubic-bezier(0.22, 0.78, 0.26, 1);
}

.touchscreen-detail-main.is-display-open .route-display-workspace {
  transform: translateX(0);
}

.route-display-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}

.route-display-header h2 {
  margin: 0;
  color: #9e143e;
  font-size: clamp(1rem, 2.85cqw, 1.32rem);
  line-height: 1.05;
}

.route-train-line {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0.35rem 0.1rem 1.4rem 1.7rem;
  overflow: auto;
  list-style: none;
}

.route-train-line::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  bottom: 1.8rem;
  left: 2.08rem;
  width: 0.36rem;
  background: #9e143e;
  border-radius: 999px;
}

.route-train-line li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  color: #10233b;
  font-size: clamp(1.64rem, 4.7cqw, 2rem);
  font-weight: 900;
  line-height: 1.08;
}

.route-line-dot {
  position: relative;
  z-index: 1;
  width: clamp(1.44rem, 4.4cqw, 1.9rem);
  aspect-ratio: 1;
  background: #fff;
  border: 0.36rem solid #9e143e;
  border-radius: 999px;
}

.route-train-line li:first-child .route-line-dot {
  background: #9e143e;
}

.touchscreen-popup {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 5%;
  padding: 10%;
  background: rgba(15, 35, 58, 0.28);
  text-align: center;
}

.touchscreen-popup p {
  max-width: 70%;
  margin: 0;
  padding: 5% 6%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(158, 20, 62, 0.18);
  border-radius: 0.7rem;
  box-shadow: 0 12px 28px rgba(16, 35, 59, 0.18);
  font-size: clamp(0.66rem, 2.45cqw, 1.05rem);
  font-weight: 800;
  line-height: 1.35;
}

.journey-stage {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.journey-stage h2 {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.journey-stage p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.journey-stage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: end;
  justify-self: end;
}

.display-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  padding: 8px;
  background: #e02a2a;
  border: 1px solid #111820;
  border-radius: 0.225rem;
  overflow: hidden;
  box-shadow: none;
}

.display-play-button {
  position: absolute;
  justify-self: auto;
  left: 50%;
  top: 50%;
  width: 4.1rem;
  height: 4.1rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(16, 35, 59, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.display-play-button span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 0.24rem;
  border-top: 0.72rem solid transparent;
  border-bottom: 0.72rem solid transparent;
  border-left: 1.04rem solid #fff;
}

.display-play-button:hover {
  background: rgba(16, 35, 59, 0.98);
}

.display-play-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  background: rgba(16, 35, 59, 0.74);
  box-shadow: none;
}

.display-pause-button {
  position: absolute;
  justify-self: auto;
  right: 0.7rem;
  top: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.32rem 0.62rem;
  color: #eef4ff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(16, 35, 59, 0.82);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  z-index: 3;
}

.display-pause-button:hover {
  background: rgba(16, 35, 59, 0.94);
}

.preview-card.is-playing .display-play-button {
  display: none;
}

.preview-card.is-playing .display-pause-button {
  display: inline-flex;
}

.led-display {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
  image-rendering: auto;
  aspect-ratio: 6 / 1;
  background: #030404;
  border: 1px solid #111820;
  box-shadow: none;
}

.display-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.display-meta span,
.notice,
.history li,
.preview-status {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 0.5rem;
}

.display-meta span {
  padding: 7px 10px;
}

.performance-warning {
  padding: 10px 12px;
  color: #5b4205;
  background: #fff7dd;
  border: 1px solid #e8c767;
  border-radius: 0.5rem;
  font-size: 0.92rem;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

textarea,
select,
input[type="range"] {
  width: 100%;
}

textarea,
select {
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 10px 12px;
  touch-action: manipulation;
}

textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 102, 209, 0.18);
  outline-offset: 0;
}

textarea {
  resize: vertical;
  min-height: 86px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 16px;
  align-items: end;
}

button {
  justify-self: end;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 0.5rem;
  padding: 0.9rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(31, 102, 209, 0.22);
}

button:disabled {
  cursor: not-allowed;
  background: var(--line-strong);
  box-shadow: none;
}

.preview-status,
.notice {
  padding: 12px;
  color: var(--muted);
}

.notice-heading {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 10px;
}

.warning-text {
  margin: 0;
  color: #8a5c00;
}

.notice.success {
  border-color: color-mix(in srgb, var(--success) 45%, var(--line));
}

.notice.error {
  color: var(--text);
  border-color: var(--danger);
}

audio {
  width: 100%;
}

.changelog h2 {
  margin: 0;
  font-size: 1rem;
}

.changelog ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.changelog li + li {
  margin-top: 6px;
}

.history {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.history li {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  color: var(--muted);
}

.history span {
  color: var(--text);
  overflow-wrap: anywhere;
}

.history small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.activity-list {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row h2 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  line-height: 1.25;
}

.activity-row h2 a {
  color: var(--text);
  text-decoration: none;
}

.activity-row h2 a:hover {
  text-decoration: underline;
}

.activity-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.invite-log-card h2 {
  margin: 0.25rem 0 0;
}

.invite-log-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.invite-log {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}

.invite-log-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.invite-log-row:last-child {
  border-bottom: 0;
}

.invite-log-heading {
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.invite-log-row strong,
.invite-log-row small {
  display: block;
}

.invite-log-row small,
.invite-log-row time,
.invite-log-row span {
  color: var(--muted);
}

.activity-type {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-meta {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 800;
}

.pagination a {
  color: var(--accent-strong);
}

@media (max-width: 680px) {
  .site-shell,
  .shell {
    width: min(100vw - 20px, 1180px);
    padding: 16px 0;
  }

  .site-header-shell {
    padding: 0 10px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: center;
    gap: 0.6rem;
  }

  .brand {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
  }

  .brand a {
    gap: 0.5rem;
  }

  .desktop-nav,
  .desktop-account-actions {
    display: none;
  }

  .mobile-menu {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    z-index: 10;
    display: block;
  }

  .mobile-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.45rem 0.65rem;
    color: var(--accent-strong);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line-strong);
    border-radius: 0.5rem;
    box-shadow: 0 10px 22px rgba(28, 56, 97, 0.08);
  }

  .mobile-menu summary:focus-visible {
    outline: 3px solid rgba(31, 102, 209, 0.2);
    outline-offset: 3px;
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    display: grid;
    gap: 0.2rem;
    min-width: 12rem;
    padding: 0.55rem;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 0.5rem;
    box-shadow: 0 18px 36px rgba(28, 56, 97, 0.18);
  }

  .mobile-menu-panel a,
  .mobile-menu-panel button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.55rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0.4rem;
    box-shadow: none;
    font-weight: 900;
  }

  .mobile-menu-panel a:hover,
  .mobile-menu-panel button:hover {
    background: var(--accent-soft);
  }

  .mobile-menu-panel form {
    margin: 0;
  }

  .brand-logo {
    flex: 0 0 auto;
    width: 3rem;
  }

  .brand-text-logo {
    width: min(42vw, 12rem);
  }

  .brand-stakeholder-label {
    font-size: 0.72rem;
    bottom: -0.78rem;
  }

  .display-frame {
    width: fit-content;
    max-width: 100%;
    padding: 6px;
    overflow: hidden;
  }

  .led-display {
    max-width: none;
  }

  .field-row,
  .invite-log-row,
  .plain-link-copy,
  .invite-link-actions,
  .preview-heading,
  .journey-stage,
  .activity-row {
    grid-template-columns: 1fr;
  }

  .invite-link-copy {
    justify-self: stretch;
  }

  .activity-meta {
    justify-items: start;
  }

  .journey-stage-controls {
    justify-content: end;
  }

  .preview-heading {
    display: grid;
  }
}

@media (max-width: 420px) {
  .site-header-shell {
    padding: 0 8px;
  }

  .topbar {
    gap: 0.45rem;
  }

  .brand-logo {
    width: 2.8rem;
  }

  .brand-text-logo {
    width: min(38vw, 9.5rem);
  }

  .mobile-menu summary {
    gap: 0;
    width: 2.85rem;
    justify-content: center;
    padding: 0.45rem;
  }

  .mobile-menu summary .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
