:root {
  --bg: #101c1c;
  --bg-soft: #172625;
  --panel: #f5f1e8;
  --panel-strong: #fffaf0;
  --ink: #162120;
  --muted: #64716f;
  --line: rgba(16, 28, 28, 0.14);
  --accent: #d14f2c;
  --accent-2: #16a085;
  --warning: #d49a26;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(209, 79, 44, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(22, 160, 133, 0.22), transparent 24rem),
    var(--bg);
  padding-bottom: 2rem;
  overflow-x: hidden;
}

.hero-shell {
  color: #f7f3ea;
  padding: 0.85rem 1rem;
}

.hud-bar {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0.55rem 0 0.8rem;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.75rem, 8vw, 4.2rem);
  line-height: 0.95;
  margin-bottom: 0;
  max-width: none;
  white-space: nowrap;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.1;
  margin-bottom: 0;
}

h3 {
  font-size: 1.02rem;
  line-height: 1.2;
  margin-bottom: 0;
}

.status-pill {
  align-items: center;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 999px;
  color: #dce7e3;
  display: none;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  white-space: nowrap;
}

.status-pill span {
  background: var(--accent-2);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(22, 160, 133, 0.9);
  height: 0.55rem;
  width: 0.55rem;
}

.search-panel {
  margin: 0 auto;
  max-width: 1180px;
}

.search-input-wrap {
  align-items: center;
  background: rgba(245, 241, 232, 0.96);
  border: 1px solid rgba(255, 250, 240, 0.35);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 0.75rem;
  padding: 0.78rem 0.9rem;
}

.search-input-wrap svg {
  color: var(--accent);
  flex: 0 0 auto;
}

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

.clear-search {
  background: rgba(16, 28, 28, 0.08);
  border: 1px solid rgba(16, 28, 28, 0.12);
  border-radius: 8px;
  color: var(--ink);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 0.45rem 0.65rem;
}

.quick-row {
  display: none;
  gap: 0.55rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.quick-row button,
.phase-tabs button,
.view-tabs button,
.session-tabs button,
.lookup-tabs button,
.perspective-toggle button {
  background: rgba(245, 241, 232, 0.12);
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 999px;
  color: #f5f1e8;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.62rem 0.85rem;
}

.control-band,
.dashboard-grid,
.data-footer {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 1rem;
}

.control-band {
  color: #f7f3ea;
}

.view-tabs,
.session-tabs,
.lookup-tabs,
.perspective-toggle {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.view-tabs {
  margin-bottom: 0.85rem;
}

.setup-summary,
.setup-card {
  background: rgba(245, 241, 232, 0.08);
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.setup-summary {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.78rem 0.85rem;
}

.setup-summary h2,
.setup-card h2 {
  color: #fffaf0;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.setup-summary span {
  color: #b9c5c1;
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
}

.setup-summary button,
.setup-card-top button {
  background: var(--panel);
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.62rem 0.75rem;
}

.setup-card {
  padding: 0.85rem;
}

.setup-card-top {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.session-tabs {
  margin-bottom: 0.75rem;
}

.lookup-tabs {
  margin-bottom: 0.75rem;
}

.perspective-toggle {
  margin-bottom: 0.75rem;
}

.view-tabs button.selected,
.session-tabs button.selected,
.lookup-tabs button.selected,
.perspective-toggle button.selected {
  background: var(--panel);
  color: var(--ink);
}

.selector-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.85rem;
}

.setup-card .selector-grid {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 0.35rem;
}

label span {
  color: #b9c5c1;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

select {
  appearance: none;
  background: rgba(245, 241, 232, 0.1);
  border: 1px solid rgba(245, 241, 232, 0.2);
  border-radius: 8px;
  color: #fffaf0;
  min-height: 2.65rem;
  outline: 0;
  padding: 0 0.8rem;
}

select option {
  color: var(--ink);
}

.phase-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.phase-tabs button.selected {
  background: var(--panel);
  color: var(--ink);
}


.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.primary-column,
.side-column {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.side-column {
  order: -1;
}

.section-heading {
  align-items: end;
  color: #f7f3ea;
  display: flex;
  justify-content: space-between;
}

.section-heading span {
  color: #b9c5c1;
  font-size: 0.82rem;
  font-weight: 800;
}

.rule-list,
.mini-list,
.reminder-list,
.unit-list,
.active-surface,
.lookup-content,
.session-content {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.rule-card,
.panel,
.unit-list article {
  background: var(--panel);
  border: 1px solid rgba(255, 250, 240, 0.55);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.13);
}

.rule-card {
  cursor: pointer;
  padding: 1rem;
}

.rule-card.compact {
  background: var(--panel-strong);
  box-shadow: none;
  padding: 0.82rem;
}

.rule-card-top,
.rule-title-row,
.panel-title {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
}

.rule-card button {
  cursor: pointer;
}

.type-pill {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  gap: 0.35rem;
  text-transform: uppercase;
}

.rule-meta {
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rule-title-row {
  margin-top: 0.65rem;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.icon-button.active {
  background: rgba(22, 160, 133, 0.12);
  border-color: rgba(22, 160, 133, 0.3);
  color: var(--accent-2);
}

.summary {
  color: #33413f;
  font-size: 0.93rem;
  font-weight: 750;
  line-height: 1.35;
  margin: 0.55rem 0 0;
}

.unit-count {
  color: var(--accent);
  font-size: 0.82em;
  font-weight: 850;
  white-space: nowrap;
}

.body-copy {
  color: #465351;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.65rem 0 0;
  white-space: pre-line;
}

.keyword-link {
  background: rgba(22, 160, 133, 0.12);
  border: 0;
  border-radius: 5px;
  color: #087b66;
  font-weight: 850;
  padding: 0.08rem 0.2rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag-row span {
  background: rgba(16, 28, 28, 0.07);
  border-radius: 999px;
  color: #53615f;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.32rem 0.5rem;
}

.detail-block {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.detail-block h3 {
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 0.55rem;
}

.detail-list article {
  background: rgba(16, 28, 28, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem;
}

.detail-list .ability-card {
  background: rgba(16, 28, 28, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ability-card summary {
  cursor: pointer;
  display: grid;
  gap: 0.25rem;
  list-style: none;
  padding: 0.7rem;
}

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

.ability-card summary::after {
  align-self: start;
  background: rgba(16, 28, 28, 0.08);
  border-radius: 999px;
  color: var(--muted);
  content: "+";
  font-size: 0.86rem;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1;
  height: 1.5rem;
  line-height: 1.45rem;
  text-align: center;
  width: 1.5rem;
}

.ability-card[open] summary::after {
  content: "−";
}

.ability-card summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ability-card summary strong,
.ability-card summary span {
  grid-column: 1;
}

.ability-card summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ability-card-body {
  border-top: 1px solid rgba(16, 28, 28, 0.1);
  padding: 0 0.7rem 0.7rem;
}

.detail-list strong {
  display: block;
  font-size: 0.9rem;
}

.detail-list span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: 0.22rem;
}

.detail-list p {
  color: #465351;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0.45rem 0 0;
  white-space: pre-line;
}

.ability-link {
  margin-top: 0.55rem;
  width: fit-content;
}

.choice-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.choice-link {
  background: rgba(22, 160, 133, 0.1);
  border: 1px solid rgba(22, 160, 133, 0.25);
  border-radius: 999px;
  color: #27685e;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.32rem 0.52rem;
}

.choice-link:hover,
.choice-link:focus-visible {
  background: rgba(22, 160, 133, 0.18);
  outline: none;
}

.datasheet-stat-block {
  background: rgba(16, 28, 28, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding: 0.65rem;
}

.datasheet-stat-row {
  display: grid;
  gap: 0.45rem;
}

.datasheet-stat-row > strong {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.datasheet-stat-grid {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
}

.datasheet-stat-chip {
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(16, 28, 28, 0.08);
  border-radius: 7px;
  display: grid;
  gap: 0.06rem;
  min-height: 2.65rem;
  padding: 0.36rem 0.42rem;
}

.datasheet-stat-chip b {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1;
  text-transform: uppercase;
}

.datasheet-stat-chip em {
  color: var(--ink);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.05;
}

.weapon-table-wrap {
  overflow-x: auto;
}

.weapon-table {
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 42rem;
  width: 100%;
}

.weapon-table thead th {
  background: var(--panel);
}

.weapon-table th,
.weapon-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.weapon-table tbody tr:nth-child(odd) {
  --weapon-row-bg: #f0ece4;
}

.weapon-table tbody tr:nth-child(even) {
  --weapon-row-bg: #fffaf0;
}

.weapon-table tbody td {
  background: var(--weapon-row-bg);
}

.weapon-table th:nth-child(2),
.weapon-table td:nth-child(2) {
  background: var(--weapon-row-bg, var(--panel));
  box-shadow: 8px 0 12px rgba(16, 28, 28, 0.18);
  left: 0;
  max-width: 9.25rem;
  min-width: 9.25rem;
  position: sticky;
  z-index: 2;
}

.weapon-table th:nth-child(2) {
  z-index: 3;
}

.weapon-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.weapon-keyword-list,
.datasheet-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.28rem;
}

.weapon-keyword-list span,
.weapon-keyword-chip,
.datasheet-keyword-list span,
.datasheet-keyword-chip {
  background: rgba(16, 28, 28, 0.08);
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.15;
  padding: 0.18rem 0.34rem;
}

.datasheet-keyword-list {
  gap: 0.35rem;
}

.datasheet-keyword-list span,
.datasheet-keyword-chip {
  font-size: 0.72rem;
  padding: 0.26rem 0.46rem;
}

.weapon-keyword-chip,
.datasheet-keyword-chip {
  cursor: pointer;
}

.weapon-keyword-chip:hover,
.weapon-keyword-chip:focus-visible,
.datasheet-keyword-chip:hover,
.datasheet-keyword-chip:focus-visible {
  background: rgba(22, 160, 133, 0.14);
  color: var(--accent-2);
  outline: none;
}

.panel {
  padding: 1rem;
}

.empty-pinned-panel {
  gap: 0.2rem;
  padding: 0.8rem 1rem;
}

.empty-pinned-panel .panel-title {
  margin-bottom: 0.15rem;
}

.empty-pinned-panel .empty-state {
  font-size: 0.82rem;
}

.phase-group,
.empty-panel,
.data-status-panel {
  background: rgba(245, 241, 232, 0.96);
  border: 1px solid rgba(255, 250, 240, 0.55);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.13);
  padding: 1rem;
}

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

.phase-group-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.phase-group-heading h3 {
  font-size: 0.92rem;
  text-transform: uppercase;
}

.phase-group-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.lookup-browser {
  background: rgba(245, 241, 232, 0.96);
  border: 1px solid rgba(255, 250, 240, 0.55);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.13);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.lookup-control-block {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.lookup-control-block h3,
.lookup-browser-heading h3 {
  color: var(--ink);
  font-size: 0.9rem;
}

.lookup-chip-row {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.lookup-select-label {
  display: grid;
  gap: 0.35rem;
}

.lookup-select-label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lookup-select-label select {
  background: #fffaf0;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  width: 100%;
}

.lookup-chip-row-fallback {
  display: none;
}

.lookup-mode-row {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
}

.lookup-mode-row button {
  background: rgba(16, 28, 28, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.62rem 0.7rem;
}

.lookup-mode-row button.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf0;
}

.lookup-chip-row button {
  align-items: center;
  background: rgba(16, 28, 28, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 850;
  gap: 0.35rem;
  padding: 0.48rem 0.65rem;
}

.lookup-chip-row button.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf0;
}

.lookup-chip-row span {
  color: inherit;
  font-size: 0.7rem;
  opacity: 0.72;
}

.patrol-chip-row button {
  border-radius: 8px;
}

.lookup-browser-heading {
  align-items: end;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding-top: 0.85rem;
}

.lookup-browser-heading > span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 850;
}

.lookup-unit-list {
  grid-template-columns: 1fr;
}

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

.list-panel {
  background: rgba(245, 241, 232, 0.96);
  border: 1px solid rgba(255, 250, 240, 0.55);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.13);
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.list-panel-heading {
  align-items: end;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.list-panel-heading h3 {
  color: var(--ink);
  font-size: 0.98rem;
}

.list-panel-heading > span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 850;
}

.list-create-grid,
.list-create-form,
.list-url-form,
.list-toolbar {
  display: grid;
  gap: 0.65rem;
}

.list-create-form,
.list-url-form,
.list-toolbar {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
}

.list-url-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.list-create-form label,
.list-url-form label {
  display: grid;
  gap: 0.35rem;
}

.list-create-form span,
.list-url-form span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.list-create-form input,
.list-url-form input,
.list-toolbar input {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.62rem 0.7rem;
  width: 100%;
}

.list-create-form button,
.list-url-form button,
.list-card-actions button,
.quiet-danger {
  background: rgba(16, 28, 28, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 0.58rem 0.7rem;
}

.list-create-form button,
.list-url-form button {
  align-self: end;
}

.list-import-button {
  align-items: center;
  background: rgba(16, 28, 28, 0.06);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem;
}

.list-import-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.list-import-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  margin: 0.4rem 0 0;
}

.quiet-danger {
  align-self: end;
  color: #a63f28;
}

.list-builder-units {
  grid-template-columns: 1fr;
}

.list-pool-section {
  display: grid;
  gap: 0.65rem;
}

.list-pool-section + .list-pool-section {
  border-top: 1px solid rgba(16, 28, 28, 0.1);
  padding-top: 0.85rem;
}

.list-pool-heading {
  align-items: end;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.list-pool-heading h4 {
  color: var(--ink);
  font-size: 0.86rem;
  margin: 0;
}

.list-pool-heading p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
  margin: 0.2rem 0 0;
}

.list-pool-heading > span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
}

.allied-pool {
  background: rgba(31, 129, 113, 0.05);
  border-radius: 8px;
  margin: 0 -0.15rem;
  padding: 0.75rem;
}

.list-unit-card {
  gap: 0.55rem;
}

.list-config-line {
  color: #465351;
  display: grid;
  font-size: 0.78rem;
  gap: 0.18rem;
  line-height: 1.35;
  margin: 0;
}

.list-config-line strong {
  color: var(--ink);
}

.allied-line {
  background: rgba(31, 129, 113, 0.1);
  border: 1px solid rgba(31, 129, 113, 0.18);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
}

.list-selected-enhancements button,
.selected-enhancement-row button,
.list-enhancement-card button,
.list-rule-mini-card {
  cursor: pointer;
}

.list-selected-enhancements button {
  background: rgba(31, 129, 113, 0.12);
  border: 1px solid rgba(31, 129, 113, 0.22);
  border-radius: 999px;
  color: #176f62;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  padding: 0.28rem 0.45rem;
}

.list-setup-panel {
  background: rgba(255, 250, 240, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  padding: 0.82rem;
}

.list-rule-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  padding-top: 0.7rem;
}

.list-rule-section h4,
.list-rule-section summary {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.list-rule-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.list-rule-grid,
.list-enhancement-grid {
  display: grid;
  gap: 0.5rem;
}

.list-rule-mini-card,
.list-enhancement-card,
.selected-enhancement-row {
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.62rem;
}

.list-rule-mini-card {
  display: grid;
  gap: 0.25rem;
}

.list-rule-mini-card div,
.list-enhancement-card > div,
.selected-enhancement-row {
  align-items: start;
  display: flex;
  gap: 0.55rem;
  justify-content: space-between;
}

.list-rule-mini-card strong,
.list-enhancement-card button,
.selected-enhancement-row button:first-child {
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 950;
  padding: 0;
  text-align: left;
}

.list-rule-mini-card span,
.list-enhancement-card span,
.selected-enhancement-row span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
}

.list-rule-mini-card p,
.list-enhancement-card p,
.panel-note.compact {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.selected-enhancement-list,
.list-enhancement-card {
  display: grid;
  gap: 0.45rem;
}

.selected-enhancement-row {
  align-items: center;
}

.selected-enhancement-row button:last-child,
.list-enhancement-bearers button {
  background: rgba(16, 28, 28, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.28rem 0.48rem;
}

.list-enhancement-bearers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.list-enhancement-bearers button:disabled {
  cursor: default;
  opacity: 0.44;
}

.list-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.list-card-actions button {
  position: relative;
  z-index: 2;
}

.empty-panel h3,
.data-status-panel h3 {
  margin-bottom: 0.45rem;
}

.empty-panel p,
.data-status-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.data-status-panel {
  display: grid;
  gap: 0.65rem;
}

.data-footer {
  margin-top: 1rem;
}

.data-status-panel .offline-status {
  color: #27685e;
  font-size: 0.84rem;
  font-weight: 850;
}

.data-status-panel button {
  background: rgba(16, 28, 28, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.65rem;
  width: fit-content;
}

.panel-title {
  justify-content: flex-start;
  margin-bottom: 0.8rem;
}

.panel-title svg {
  color: var(--accent);
}

.empty-state,
.panel-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.panel-note {
  margin: -0.3rem 0 0.75rem;
}

.reminder-list button {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  text-align: left;
}

.reminder-list span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.unit-list article {
  box-shadow: none;
  padding: 0.85rem;
}

.unit-list article.clickable-unit {
  cursor: pointer;
}

.unit-list article.clickable-unit:hover,
.unit-list article.clickable-unit:focus-visible {
  border-color: rgba(22, 160, 133, 0.55);
  outline: none;
}

.unit-list article > div:first-child {
  align-items: start;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

.unit-list article > div:first-child span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.unit-list p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  margin: 0.55rem 0 0;
}

.session-unit-list article {
  background: var(--panel-strong);
}

.popover-scrim {
  align-items: end;
  background: rgba(9, 14, 14, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 20;
}

.keyword-popover {
  background: var(--panel-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: min(80vh, 48rem);
  max-width: 34rem;
  overflow: auto;
  padding: 1rem;
  width: 100%;
}

.keyword-popover h2 {
  font-size: 1.5rem;
  margin-top: 0.8rem;
}

.keyword-popover p {
  color: #465351;
  line-height: 1.55;
  margin: 0.65rem 0 1rem;
  white-space: pre-line;
}

.popover-meta {
  justify-content: flex-start;
  margin-top: 0.65rem;
}

.close-button,
.pin-action {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fffaf0;
  font-weight: 850;
  padding: 0.65rem 0.8rem;
}

.close-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.pin-action {
  width: 100%;
}

@media (min-width: 680px) {
  .status-pill {
    display: inline-flex;
  }

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

@media (max-width: 979px) {
  .list-create-grid,
  .list-create-form,
  .list-url-form,
  .list-toolbar {
    grid-template-columns: 1fr;
  }

  .list-create-form button,
  .list-url-form button,
  .quiet-danger {
    justify-self: start;
  }

  main.search-active .control-band,
  main.search-active .side-column,
  main.search-active .data-footer {
    display: none;
  }

  main.search-active .hero-shell {
    padding-bottom: 0.75rem;
  }

  main.search-active .dashboard-grid {
    margin-top: 0;
  }

  main.search-active .search-results-panel {
    background: rgba(245, 241, 232, 0.08);
    border: 1px solid rgba(245, 241, 232, 0.18);
    border-radius: 8px;
    padding: 0.85rem;
  }

  main.search-active .search-results-panel .section-heading {
    align-items: center;
    margin-bottom: 0.2rem;
  }
}

@media (min-width: 980px) {
  .hero-shell {
    padding-top: 1.5rem;
  }

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

  .dashboard-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem);
  }

  .dashboard-grid.lookup-only-grid,
  .dashboard-grid.search-results-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-column {
    order: 0;
    position: sticky;
    top: 1rem;
  }

  .popover-scrim {
    align-items: center;
  }
}
