:root {
  --bg: #08070a;
  --surface: #121116;
  --surface-2: #17151c;
  --surface-3: #1f1b24;
  --ink: #fff7fb;
  --muted: #aaa2ab;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #ff2f92;
  --accent-strong: #ff68b2;
  --warn: #f4c462;
  --danger: #ff667c;
  --ok: #75dda2;
  --soft: rgba(255, 47, 146, 0.13);
  --focus: rgba(255, 47, 146, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--ink);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:hover {
  color: var(--ink);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 16px 0 7px;
  font-size: 14px;
  letter-spacing: 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 34px 20px;
  border-bottom: 1px solid var(--line);
  background: #0b0a0d;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(178px, 16vw, 236px);
  height: 72px;
  object-fit: cover;
  object-position: center;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

nav,
.badge-row,
.card-actions,
.pdf-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link,
.button,
button,
.attachment-button,
.attachment-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  text-align: left;
}

.button,
button {
  border-color: var(--accent);
  background: var(--accent);
  color: #12070d;
}

.button.secondary,
button.secondary,
.nav-link {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.nav-link.active,
.button.secondary:hover,
button.secondary:hover,
.attachment-button:hover,
.attachment-download:hover {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--ink);
}

.attachment-button,
.attachment-download {
  min-height: 32px;
  margin: 0;
  color: var(--accent-strong);
}

.primary-action {
  border-color: var(--accent);
  color: var(--ink);
}

.quiet-action {
  color: var(--muted);
}

.mail-open-fallback {
  max-width: 230px;
}

main {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 24px 32px 52px;
}

.panel,
.detail-header,
.technical-details,
.decision-strip > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel,
.detail-header,
.technical-details {
  margin-bottom: 18px;
  padding: 18px;
}

.overview-panel {
  padding: 16px;
}

.toolbar,
.section-heading,
.detail-header,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.muted,
.metric p {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.metrics,
.decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.decision-strip > div {
  padding: 15px;
}

.metric span,
.decision-strip span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 26px;
  font-weight: 850;
  line-height: 1.1;
}

.metric p,
.decision-strip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.seminar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}

.seminar-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main price"
    "stats stats";
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
}

.seminar-card:hover {
  border-color: var(--accent);
  background: #1a151d;
  color: var(--ink);
}

.seminar-card-main {
  grid-area: main;
  min-width: 0;
}

.seminar-city {
  display: block;
  overflow-wrap: anywhere;
  font-size: 25px;
  font-weight: 880;
  line-height: 1.05;
}

.seminar-date {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.seminar-stats,
.seminar-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seminar-stats {
  grid-area: stats;
}

.seminar-stats span,
.seminar-price,
.review-dot,
.badge,
.source-badge,
.status-select-shell {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  white-space: normal;
}

.status-select-form {
  display: inline-flex;
  margin: 0;
}

.status-select-shell {
  position: relative;
  padding-right: 24px;
}

.status-select-shell::after {
  content: "⌄";
  position: absolute;
  right: 9px;
  top: 50%;
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-55%);
}

.status-select {
  width: auto;
  min-width: 0;
  min-height: 0;
  max-width: 210px;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  cursor: pointer;
}

.status-select option {
  background: var(--surface);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seminar-price {
  grid-area: price;
  align-self: start;
  justify-self: end;
  max-width: 145px;
  flex-direction: column;
  align-items: flex-end;
  color: var(--accent-strong);
  text-align: right;
}

.seminar-price span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.review-dot {
  color: var(--warn);
}

.status-selected,
.status-booked,
.status-offer_received,
.status-offer,
.status-approved_for_request,
.status-research_found,
.status-results_added,
.status-completed {
  border-color: rgba(117, 221, 162, 0.34);
  background: rgba(117, 221, 162, 0.12);
  color: var(--ok);
}

.status-clarification_needed,
.status-draft_ready,
.status-in_progress,
.status-question,
.status-needs_review,
.status-needs_enrichment,
.status-manual_entry,
.status-waiting,
.status-handoff_ready {
  border-color: rgba(244, 196, 98, 0.35);
  background: rgba(244, 196, 98, 0.12);
  color: var(--warn);
}

.status-running {
  border-color: rgba(255, 47, 146, 0.35);
  background: var(--soft);
  color: var(--accent-strong);
}

.status-rejected,
.status-rejection,
.status-failed {
  border-color: rgba(255, 102, 124, 0.35);
  background: rgba(255, 102, 124, 0.12);
  color: var(--danger);
}

.status-unclear,
.status-needs_location,
.status-not_contacted,
.status-ignored {
  color: var(--muted);
}

.source-badge {
  color: var(--muted);
}

.source-pdf,
.source-link,
.source-mail {
  border-color: rgba(255, 47, 146, 0.35);
  background: var(--soft);
  color: var(--accent-strong);
}

.location-list,
.mail-card-list,
.review-case-list {
  display: grid;
  gap: 10px;
}

.locations-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.locations-panel .section-heading {
  margin-bottom: 12px;
}

.research-start-form {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.research-start-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 760;
}

.research-start-form input {
  width: 86px;
}

.research-panel {
  border-color: rgba(255, 47, 146, 0.22);
}

.overnight-panel {
  border-color: rgba(117, 221, 162, 0.24);
}

.cockpit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(180px, 0.65fr);
  gap: 12px;
  margin-bottom: 18px;
}

.cockpit-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.cockpit-card.is-ready {
  border-color: rgba(117, 221, 162, 0.24);
}

.cockpit-card.is-empty {
  color: var(--muted);
}

.cockpit-card h3 {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
}

.cockpit-price {
  margin: 8px 0 10px;
  color: var(--accent-strong);
  font-weight: 850;
}

.protocol-panel {
  background: #111015;
}

.protocol-details {
  margin: 12px 0 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.manual-hotel-entry {
  margin: 12px 0 0;
  padding: 12px;
  background: rgba(117, 221, 162, 0.045);
}

.manual-hotel-entry summary {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(117, 221, 162, 0.34);
  border-radius: 999px;
  color: var(--ok);
  cursor: pointer;
  font-weight: 850;
}

.manual-hotel-entry[open] summary {
  margin-bottom: 14px;
}

.overnight-booked-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(117, 221, 162, 0.26);
  border-radius: 8px;
  background: rgba(117, 221, 162, 0.08);
}

.overnight-booked-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

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

.overnight-run-list {
  display: grid;
  gap: 14px;
}

.overnight-candidate-list {
  gap: 7px;
  margin-top: 12px;
}

.overnight-row-details {
  grid-template-columns: minmax(0, 1.25fr) minmax(74px, 0.5fr) minmax(95px, 0.65fr) minmax(95px, 0.65fr) minmax(80px, 0.5fr) minmax(80px, 0.5fr);
}

.overnight-row-actions {
  max-width: 520px;
}

.compact-details {
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-details summary {
  color: var(--muted);
  font-size: 12px;
}

.compact-details[open] summary {
  margin-bottom: 9px;
}

.research-run {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.research-run:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.research-run + .research-run {
  margin-top: 22px;
}

.research-run-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.research-run-summary > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.research-run-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.research-run-summary dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-run-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 16px;
  margin-bottom: 12px;
}

.research-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin: 0;
}

.research-meta > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.research-meta dt,
.research-dl dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.research-meta dd,
.research-dl dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.research-progress {
  height: 9px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0d0c10;
}

.research-progress > div {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.2s ease;
}

.handoff-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(244, 196, 98, 0.35);
  border-radius: 8px;
  background: rgba(244, 196, 98, 0.08);
}

.handoff-box h3 {
  margin: 0;
}

.handoff-box textarea[readonly] {
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.research-candidate-list {
  gap: 7px;
  margin-top: 12px;
}

.research-result-row {
  box-sizing: border-box;
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.research-row-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.research-row-main {
  min-width: 0;
}

.research-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.research-row-title h3 {
  flex: 1 1 130px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-row-title .badge,
.research-row-title .source-badge {
  min-height: 20px;
  padding: 2px 6px;
  font-size: 10px;
}

.research-row-links,
.research-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.research-row-links {
  margin-top: 4px;
}

.research-link {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.research-link:hover {
  text-decoration: underline;
}

.research-row-details {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 8px;
  min-width: 0;
}

.research-row-details > div {
  min-width: 0;
}

.research-row-details span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.research-row-details strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-row-actions {
  justify-content: flex-end;
}

.compact-button,
.research-row-actions .attachment-download {
  min-height: 26px;
  padding: 5px 8px;
  font-size: 11px;
}

.research-entry {
  margin-top: 14px;
}

.research-actions {
  margin-top: 12px;
}

.location-card,
.mail-card,
.empty-card,
.review-case-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.location-card,
.mail-card,
.review-case-card {
  padding: 14px;
}

.compact-location-card {
  padding: 12px;
}

.empty-card {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.location-main,
.mail-card-main,
.review-case-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.compact-location-main {
  align-items: center;
}

.location-title-block {
  min-width: 0;
}

.location-main h3,
.mail-card h3,
.review-case-card h3 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.2;
}

.location-address {
  margin: 7px 0 0;
}

.location-price-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 8px;
  min-width: 310px;
}

.price-block {
  min-width: 170px;
  text-align: right;
}

.location-price-pair .price-block {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.price-block > span,
.decision-price span {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.18;
}

.location-price-pair .price-block > span {
  font-size: 13px;
}

.price-block small,
.location-facts small,
.decision-price small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.location-facts {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(130px, 0.75fr) minmax(110px, 0.6fr) minmax(180px, 1.35fr);
  gap: 10px;
  margin: 14px 0;
}

.location-facts > div {
  min-width: 0;
}

.location-facts span,
.mail-summary {
  overflow-wrap: anywhere;
}

.open-points span,
.mail-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mail-sender {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.mail-summary {
  margin: 10px 0 12px;
  color: var(--ink);
}

.mail-card-attachments {
  margin-bottom: 12px;
}

.decision-panel {
  border-color: rgba(255, 47, 146, 0.28);
  background: #141116;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(120px, 0.7fr) minmax(180px, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.decision-grid > div,
.decision-notes > div {
  min-width: 0;
}

.decision-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.decision-notes h3 {
  margin-top: 0;
}

.compact-actions {
  justify-content: flex-end;
}

.compact-card-actions {
  align-items: center;
  margin-top: 11px;
}

.inline-status-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.candidate-command-panel {
  border-color: rgba(255, 47, 146, 0.24);
}

.candidate-command-grid {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(120px, 0.6fr) minmax(180px, 1fr);
  margin-bottom: 12px;
}

.detail-accordion {
  margin-bottom: 12px;
}

.embedded-panel {
  margin-bottom: 12px;
  padding: 12px;
}

.embedded-panel:last-child {
  margin-bottom: 0;
}

.review-case-main {
  align-items: center;
}

.review-case-card h3 {
  margin-bottom: 5px;
}

.secondary-grid .panel {
  background: var(--surface);
}

.panel.warning {
  border-color: rgba(244, 196, 98, 0.45);
  background: rgba(244, 196, 98, 0.08);
}

.panel.narrow {
  max-width: 860px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.actions {
  text-align: right;
}

.empty {
  color: var(--muted);
  text-align: center;
}

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

.form-grid.wide {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #0d0c10;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
  white-space: pre-wrap;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 102, 124, 0.35);
  border-radius: 7px;
  color: var(--danger);
  background: rgba(255, 102, 124, 0.1);
  font-weight: 750;
}

.details dl,
.compact-dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
}

.compact-dl.one-col {
  grid-template-columns: 1fr;
}

.details dt,
.compact-dl dt,
.decision-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.details dd,
.compact-dl dd,
.decision-grid dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.notes {
  margin-bottom: 0;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.technical-details {
  color: var(--ink);
}

.technical-details summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.technical-details[open] summary {
  margin-bottom: 14px;
  color: var(--accent-strong);
}

.message-body {
  max-height: 520px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d0c10;
  color: var(--ink);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.inline-list {
  margin: 0;
  padding-left: 18px;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0d0c10;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.split,
.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.split .panel {
  margin-bottom: 0;
}

.draft-form textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.pdf-modal[hidden] {
  display: none;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.pdf-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 96vw);
  height: min(840px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.55);
}

.pdf-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.pdf-dialog h2 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #1c1c1c;
}

.team-body {
  background: #08070a;
}

.team-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.team-main {
  width: min(980px, 100%);
}

.team-intro {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.team-card-grid {
  display: grid;
  gap: 14px;
}

.team-seminar-card,
.team-info-card,
.team-note-panel,
.team-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.team-seminar-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 20px;
  color: var(--ink);
}

.team-seminar-card:hover {
  border-color: var(--accent);
  background: #1a151d;
  color: var(--ink);
}

.team-card-date {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.team-card-city {
  overflow-wrap: anywhere;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.team-card-line {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-card-line span,
.team-card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.team-card-line strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.team-detail-hero {
  margin-bottom: 18px;
}

.team-back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.team-detail-hero h2 {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
  font-size: 38px;
  line-height: 1;
}

.team-calendar {
  min-height: 44px;
}

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

.team-info-card,
.team-note-panel,
.team-empty {
  padding: 18px;
}

.team-info-card h2 {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  font-size: 25px;
}

.team-address,
.team-note,
.team-note-panel p {
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
}

.team-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.team-action {
  min-height: 46px;
  text-align: center;
}

.team-action.disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
  opacity: 0.72;
}

.team-note-panel {
  margin-top: 14px;
}

.team-empty {
  text-align: center;
}

@media (max-width: 1040px) {
  .decision-grid,
  .decision-notes,
  .cockpit-grid,
  .location-facts,
  .research-run-head,
  .overnight-booked-card,
  .overnight-row-details,
  .location-price-pair {
    grid-template-columns: 1fr;
  }

  .price-block,
  .location-price-pair {
    min-width: 140px;
  }

  .research-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  .topbar,
  .detail-header,
  .section-heading,
  .location-main,
  .mail-card-main,
  .review-case-main {
    align-items: flex-start;
    flex-direction: column;
  }

  main,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: min(180px, 58vw);
    height: 56px;
  }

  .locations-panel .section-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  .locations-panel .section-heading h2 {
    margin-bottom: 0;
    font-size: 28px;
  }

  .compact-location-card {
    padding: 14px;
  }

  .compact-location-main {
    gap: 10px;
  }

  .location-main h3 {
    margin-bottom: 8px;
    font-size: 22px;
  }

  .status-select-shell {
    max-width: 100%;
    min-height: 30px;
    padding: 4px 26px 4px 10px;
  }

  .status-select {
    max-width: 100%;
    font-size: 13px;
  }

  .location-price-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    width: 100%;
  }

  .location-price-pair .price-block {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .location-price-pair .price-block > span {
    font-size: 14px;
  }

  .location-price-pair .price-block small {
    margin-top: 1px;
    font-size: 10px;
  }

  .metrics,
  .decision-strip,
  .seminar-grid,
  .split,
  .notes-grid,
  .details dl,
  .compact-dl,
  .research-meta,
  .research-run-summary,
  .form-grid,
  .form-grid.wide {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: span 1;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .header-actions .button,
  .header-actions button,
  .header-actions form {
    width: 100%;
  }

  .research-start-form {
    align-items: stretch;
    flex-direction: column;
  }

  .research-start-form input {
    width: 100%;
  }

  .research-row-top,
  .research-row-details {
    grid-template-columns: 1fr;
  }

  .research-row-title {
    align-items: center;
  }

  .research-row-details strong {
    white-space: nowrap;
  }

  .research-row-details > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  .research-row-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .overnight-row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .research-row-actions .compact-button,
  .research-row-actions .attachment-download {
    width: 100%;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
  }

  .compact-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .compact-card-actions > .attachment-download,
  .compact-card-actions > .attachment-button,
  .compact-card-actions .inline-status-form button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .compact-location-card .compact-card-actions > .attachment-download {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
  }

  .compact-card-actions > .inline-status-form {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .seminar-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "price"
      "stats";
  }

  .seminar-price,
  .price-block {
    justify-self: start;
    text-align: left;
  }

  .seminar-price {
    align-items: flex-start;
  }

  .pdf-modal {
    padding: 10px;
  }

  .pdf-dialog {
    width: 100%;
    height: 94vh;
  }

  .pdf-dialog header,
  .pdf-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .team-detail-grid,
  .team-actions {
    grid-template-columns: 1fr;
  }

  .team-seminar-card {
    min-height: 0;
  }
}
