:root {
  /* Digital Curator tokens - aligned to style/the-digital-curator-style-board.png */
  --primary: #30395c;
  --primary-soft: #3d4668;
  --secondary: #64748b;
  --tertiary: #002939;
  --accent: #33b1e4;
  --surface: #eef1f3;
  --surface-low: #f7f9fb;
  --surface-lowest: #ffffff;
  --surface-high: #e0e3e5;
  --page-bg: #f8fafc;
  --text: #1b2230;
  --text-soft: #5f6777;
  --outline: rgba(100, 116, 139, 0.16);
  --outline-strong: rgba(100, 116, 139, 0.3);
  --danger: #b63d2f;
  --success: #2e6d51;
  --shadow: 0 12px 32px rgba(25, 28, 30, 0.06);
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page-width: 1200px;
  --header-height: 4.5rem;
}

html {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(51, 177, 228, 0.07), transparent 28rem),
    linear-gradient(180deg, var(--page-bg) 0%, #eaedef 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

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

p,
li,
dd,
dt,
label,
input,
select,
textarea,
button {
  font-family: "Inter", sans-serif;
}

p {
  margin: 0 0 1rem;
  max-width: 72ch;
  line-height: 1.65;
  color: var(--text-soft);
}

ul {
  padding-left: 0;
  margin: 0;
}

li {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1,
div h1 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 0.98;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin: 0 0 0.9rem;
}

strong {
  font-size: inherit;
}

main {
  width: min(var(--page-width), 100%);
  margin: 0;
  padding: 2rem 1.5rem 4rem;
}

/* Useby page uses the full viewport so table rows have room to breathe. */
main.useby-page {
  width: 100%;
  max-width: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.85rem 0 0.5rem;
  backdrop-filter: blur(16px);
  background: rgba(248, 250, 252, 0.82);
}

.site-header-inner,
.site-nav-inner,
.site-footer-inner {
  width: min(var(--page-width), 100%);
  margin: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.site-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(48, 57, 92, 0.18);
}

.site-wordmark {
  display: inline-block;
}

.site-tagline {
  margin: 0;
  margin-left: calc(2.15rem + 0.65rem);
  font-size: 0.88rem;
  max-width: 32rem;
  color: var(--text-soft);
}

@media (max-width: 750px) {
  .site-tagline {
    display: none;
  }
}

.mobile-only {
  display: none;
}

.site-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-status-link,
.site-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--surface-lowest);
  box-shadow: var(--shadow);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.burger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-lowest);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.burger-icon,
.burger-icon::before,
.burger-icon::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-icon {
  position: relative;
}

.burger-icon::before,
.burger-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger-icon::before {
  top: -5px;
}

.burger-icon::after {
  top: 5px;
}

.burger-btn[aria-expanded="true"] .burger-icon {
  background: transparent;
}

.burger-btn[aria-expanded="true"] .burger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.burger-btn[aria-expanded="true"] .burger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Hierarchical nav --- */

.site-nav {
  padding: 0 0 0.85rem;
}

.site-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.nav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.nav-group-secondary {
  gap: 0.2rem;
}

.nav-group-secondary::before {
  content: "";
  display: block;
  width: 1px;
  height: 1.4rem;
  margin: 0 0.35rem 0 0.15rem;
  background: var(--outline-strong);
  opacity: 0.55;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: transparent;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-group-secondary .nav-link {
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
}

.nav-link-primary {
  background: var(--surface-lowest);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.nav-link-primary:hover {
  color: var(--primary);
  background: var(--surface-lowest);
  box-shadow: 0 14px 28px rgba(25, 28, 30, 0.08);
}

/* More dropdown */

.nav-more {
  position: relative;
}

.nav-more-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px var(--outline);
}

.nav-more-summary::-webkit-details-marker {
  display: none;
}

.nav-more-summary::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.7;
}

.nav-more[open] .nav-more-summary {
  color: var(--primary);
  background: var(--surface-lowest);
  box-shadow: var(--shadow);
}

.nav-more-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 12.5rem;
  padding: 0.45rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(100, 116, 139, 0.08);
}

.nav-more-panel .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 2.4rem;
  color: var(--text);
}

.nav-more-panel .nav-link:hover {
  background: var(--surface-low);
  color: var(--primary);
}

/* Legacy nav selectors (pages that still emit bare nav a) */
.site-nav a,
nav a,
nav span {
  /* base styles live on .nav-link; keep soft fallback */
}

.guest-banner,
#message,
.errors {
  width: min(var(--page-width), 100%);
  margin: 0 0 1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.guest-banner {
  background: rgba(48, 57, 92, 0.08);
  color: var(--primary);
  text-align: left;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(48, 57, 92, 0.08);
}

.guest-banner a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 700;
  text-decoration-color: rgba(51, 177, 228, 0.55);
}

#message {
  background: rgba(51, 177, 228, 0.1);
  color: var(--primary);
}

.errors {
  background: rgba(182, 61, 47, 0.08);
  color: var(--danger);
}

header,
footer,
nav {
  margin: 0;
}

form {
  margin: 0 0 1.5rem;
}

label {
  display: block;
  margin: 1.1rem 0 0.45rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

input,
select,
textarea,
button {
  font-size: 1rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea,
.input-box {
  width: min(100%, 42rem);
  min-height: 3.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-lowest);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--outline);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus,
.input-box:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(26, 35, 69, 0.35), 0 0 0 4px rgba(51, 177, 228, 0.12);
}

textarea {
  min-height: 10rem;
  width: min(100%, 52rem);
  resize: vertical;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--secondary) 50%),
    linear-gradient(135deg, var(--secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 1.2rem) calc(1.5rem),
    calc(100% - 0.85rem) calc(1.5rem);
  background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

button,
input[type="submit"],
.prominent-link,
.secondary-link,
button.user,
button.sweetSpot,
button.get-rid-of-btn,
button.restore-btn,
button.snooze-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.2rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

button,
input[type="submit"],
.prominent-link {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: #f8fbff;
}

button:hover,
input[type="submit"]:hover,
.prominent-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.secondary-link {
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow);
}

button#editFormDisplayButton,
button#display_filters,
button.user,
button.sweetSpot {
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
}

button.get-rid-of-btn {
  background: linear-gradient(135deg, #8b2d22 0%, var(--danger) 100%);
}

button.restore-btn {
  background: linear-gradient(135deg, #244e3b 0%, var(--success) 100%);
}

button.snooze-btn {
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow);
}

button.snooze-btn:hover {
  color: var(--primary);
}

button.untrack-btn {
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.82rem;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.3);
}

button.untrack-btn:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.55);
}

table#useBy td.get-rid-of .get-rid-of-form {
  display: block;
}

table#useBy td.get-rid-of .untrack-form {
  display: block;
  margin-top: 0.4rem;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0 0.5rem 0 0;
  accent-color: var(--primary);
  vertical-align: middle;
}

section#kept label,
section#kept input {
  display: inline-block;
}

table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-lowest);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

table.list {
  background: var(--surface-lowest);
}

table.list tr td,
table.list tr th,
td,
th {
  border: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.95rem 1rem;
  background: var(--surface-low);
  color: var(--text-soft);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(100, 116, 139, 0.1);
}

td {
  padding: 0.95rem 1rem;
  vertical-align: top;
  color: var(--text);
  background: var(--surface-lowest);
}

tbody tr:nth-child(even) td {
  background: rgba(247, 249, 251, 0.92);
}

tbody tr:hover td {
  background: rgba(51, 177, 228, 0.05);
}

tr#headerRow,
tr.header-row,
tr#header {
  position: sticky;
  top: 0;
}

td.playerName {
  min-width: 18ch;
  max-width: 20ch;
}

td.type {
  max-width: 12ch;
}

td.date {
  min-width: 10ch;
}

td.name {
  width: 18ch;
}

td.name div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

td.name.artifact.edit {
  width: 23rem;
}

.table-header {
  padding: 0.3rem 0.5rem;
}

.table-action,
a.action,
.name a {
  color: var(--primary);
  font-weight: 600;
}

a.action {
  display: block;
  width: fit-content;
}

table a.action {
  margin-bottom: 0;
}

dt {
  margin-top: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

dd {
  margin-left: 0;
  margin-top: 0.55rem;
  font-size: 1.08rem;
  color: var(--text);
}

dl {
  margin-bottom: 1.6rem;
}

section.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.objects .listing,
#main-menu {
  padding-left: 0;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.auth-main {
  padding-top: 1.25rem;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.auth-layout-compact {
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.85fr);
}

.auth-intro,
.auth-panel {
  padding: 1.75rem;
  background: rgba(247, 249, 251, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-intro {
  display: grid;
  gap: 1.5rem;
}

.auth-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  padding: 1rem;
  border-radius: calc(var(--radius-lg) - 6px);
  background:
    radial-gradient(circle at top, rgba(51, 177, 228, 0.14), transparent 12rem),
    rgba(255, 255, 255, 0.78);
}

.auth-mark img {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
}

.auth-hero {
  margin: -0.25rem -0.25rem 0;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(26, 35, 69, 0.06);
}

.auth-hero img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.auth-copy {
  display: grid;
  gap: 0.75rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.auth-panel {
  align-self: stretch;
}

.auth-form {
  margin-bottom: 0;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
}

.checkbox-row input {
  margin-right: 0;
}

.auth-submit.auth-submit {
  width: 100%;
  margin-top: 1.25rem;
  font-size: 1rem;
  min-height: unset;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm, 8px);
}

.auth-text-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--secondary);
  font-weight: 600;
}

.dashboard-hero,
.menu-card,
#editArtifact,
#interactionsList,
#recordedUseList,
.object.edit,
.objects.listing,
main > form,
main > div:not(#dataTableImports):not(.guest-banner):not(#message):not(.errors):not(.toast) {
  background: rgba(247, 249, 251, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.9fr);
  gap: 1.5rem;
  padding: 1.75rem;
}

.section-label,
.metric-label,
.footer-label {
  margin: 0 0 0.65rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dashboard-intro,
.menu-support,
.menu-about {
  color: var(--text-soft);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.dashboard-hero-aside {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-card {
  padding: 1.15rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
}

.metric-card-link {
  display: block;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.metric-card-link:hover {
  background: var(--surface-low);
  transform: translateY(-1px);
}

.metric-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--primary);
}

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

.menu-card,
#editArtifact,
#interactionsList,
#recordedUseList,
.objects.listing,
.object.edit,
.object.new,
main > form,
main > div:not(#dataTableImports):not(.guest-banner):not(#message):not(.errors):not(.toast) {
  padding: 1.5rem;
}

.menu-card-title {
  margin-bottom: 0.65rem;
  font-size: 1.45rem;
}

.menu-link {
  display: block;
  width: fit-content;
  padding: 0.45rem 0;
  color: var(--primary);
  font-weight: 600;
}

.menu-about {
  margin-top: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.08);
  font-size: 0.98rem;
  max-width: 64ch;
}

.dashboard-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.dashboard-search-form input[type="search"] {
  flex: 1 1 16rem;
  width: auto;
}

.dashboard-search-results {
  position: relative;
}

.dashboard-search-results-list,
ul.searchResults,
ul.userResults {
  margin-top: 0;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
  box-shadow: var(--shadow);
}

.searchResults li,
.user li,
.userResults li {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  color: var(--text);
}

.searchResults li:hover,
.user li:hover,
.userResults li:hover {
  background: rgba(48, 57, 92, 0.08);
  cursor: pointer;
}

.overdue-card {
  margin-bottom: 0;
}

.overdue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
  padding: 0;
  list-style: none;
}

/* Cards 6–8 only appear when the grid has room for 4 columns. */
@media (max-width: 1199px) {
  .overdue-list > .overdue-item-card:nth-child(n+6) {
    display: none;
  }
}

.overdue-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.08);
}

.overdue-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.overdue-item-title {
  font-weight: 700;
  color: var(--primary);
  word-break: break-word;
}

.overdue-item-date {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text);
}

.overdue-item-date-last {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.overdue-item-date-label {
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.overdue-past {
  color: var(--danger);
  font-weight: 700;
}

.overdue-past .overdue-item-date-label {
  color: var(--danger);
}

.overdue-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.overdue-item-actions .menu-link {
  padding: 0;
}

.overdue-item-getridof,
.overdue-item-snooze {
  margin: 0;
}

.overdue-item-getridof button.get-rid-of-btn,
.overdue-item-snooze button.snooze-btn {
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 41, 57, 0.08);
  color: var(--tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snoozed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(108, 117, 140, 0.16);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  vertical-align: middle;
}

.back-link {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

#operations {
  padding-left: 0;
}

button.user,
button.sweetSpot {
  display: inline-flex;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

div.user,
div.sweetSpot {
  margin-top: 0.5rem;
}

input.user,
input.sweetSpot {
  display: inline-block;
  margin-right: 0.5rem;
}

#interactorControls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

#interactorControls button.user {
  margin-top: 0;
}

.new-interactor-toggle {
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow);
}

.new-interactor-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px var(--outline);
}

.new-interactor-form input[type="text"] {
  flex: 1 1 12rem;
  width: auto;
  min-width: 0;
  min-height: 2.8rem;
  margin: 0;
}

.new-interactor-form button {
  min-height: 2.8rem;
  padding: 0.6rem 1rem;
  margin: 0;
}

.new-interactor-cancel {
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow);
}

.new-interactor-msg {
  flex-basis: 100%;
  color: var(--text-soft);
  font-size: 0.9rem;
}

#type input[type="checkbox"] {
  margin-right: 0.6rem;
  margin-top: auto;
  margin-bottom: auto;
}

#type label {
  display: inline-flex;
  align-items: center;
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  margin-right: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px var(--outline);
}

section#legend {
  max-width: 70ch;
}

div#intro {
  display: flex;
  gap: 1.5rem;
}

.clipboard {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.7;
}

.clipboard:hover {
  cursor: pointer;
  opacity: 1;
}

.copied_message,
p.copied_message {
  position: fixed;
  left: 50%;
  top: 1.25rem;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--surface-lowest);
  color: var(--primary);
  padding: 0.9rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 1rem);
  z-index: 9999;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #1a2345;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(10, 16, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.toast-success {
  background: #1a2345;
  color: #ffffff;
  border: 2px solid #2f7d4f;
}

.toast.toast-error {
  background: #b63d2f;
  color: #ffffff;
  border: 2px solid #7a1d12;
}

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 38, 0.55);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 56px rgba(10, 16, 32, 0.45);
  padding: 1.5rem 1.5rem 1.25rem;
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: var(--primary);
}

.modal-subtitle {
  margin: 0 0 1rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  background: transparent;
  border: none;
  font-size: 1.7rem;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.55rem;
  min-height: 0;
}

.modal-close:hover { color: var(--text); }

.modal-panel label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.modal-panel input[type="date"],
.modal-panel input[type="text"],
.modal-panel textarea {
  width: 100%;
  box-sizing: border-box;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.modal-actions .modal-link {
  margin-right: auto;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.modal-cancel {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.25);
}

.modal-save {
  background: var(--primary);
  color: #ffffff;
}

#record-modal-users {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.35rem 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px var(--outline);
  font-size: 0.9rem;
}

.modal-user-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(80, 95, 118, 0.16);
  color: var(--text);
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
}

.modal-user-remove:hover {
  background: rgba(80, 95, 118, 0.3);
  color: var(--text);
  transform: none;
}

#record-modal-add-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.modal-user-search-wrap {
  position: relative;
  flex: 1 1 14rem;
  min-width: 0;
}

#record-modal-user-search {
  width: 100%;
}

.modal-user-results {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow);
  max-height: 12rem;
  overflow-y: auto;
}

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

.modal-user-results li {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.modal-user-results li:hover {
  background: rgba(80, 95, 118, 0.1);
}

body.modal-open {
  overflow: hidden;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.analysis-card .chart-wrap {
  position: relative;
  height: 260px;
  margin-top: 0.75rem;
}

table.analysis-list {
  width: 100%;
  margin-top: 0.5rem;
}

table.analysis-list th,
table.analysis-list td {
  padding: 0.55rem 0.65rem;
}

table.analysis-list th.num,
table.analysis-list td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

ul.fun-facts {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 0.65rem;
}

ul.fun-facts li {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.08);
  font-size: 0.98rem;
  line-height: 1.4;
}

ul.fun-facts .fact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

ul.fun-facts .fact-aside {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.dashboard-record-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.85rem 0 0;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #1a2345 0%, #30395c 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.02rem;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(20, 32, 54, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-record-btn:hover,
.dashboard-record-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(20, 32, 54, 0.3);
  color: #ffffff;
}

.dashboard-record-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.white-space {
  height: 300px;
}

.submit {
  font-size: clamp(2rem, 6vw, 3.25rem);
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: 999px;
}

.reset-password-button {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.action {
  line-height: 1.3rem;
}

.actions {
  padding-left: 0;
}

.bullet {
  list-style-type: disc;
  margin-left: 1.3rem;
  font-size: 1.05rem;
}

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

.site-footer {
  margin-top: 1rem;
  padding: 0 0 1.5rem;
}

.site-footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--surface-high);
}

.site-footer h2 {
  margin: 0;
  font-size: 1.1rem;
}

.footer-meta {
  margin: 0;
  white-space: nowrap;
  font-size: 0.92rem;
}

.footer-meta a {
  color: var(--primary);
  font-weight: 600;
}

.hideOnPrint {
  display: block;
}

.displayOnPrint {
  display: none;
}

.dataTables_wrapper {
  margin-top: 0.5rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin: 0.85rem 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  min-height: 2.5rem;
  margin-left: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px var(--outline);
  color: var(--text);
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(48, 57, 92, 0.35), 0 0 0 4px rgba(51, 177, 228, 0.12);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 999px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--primary) !important;
  padding: 0.35rem 0.75rem !important;
  margin: 0 0.1rem !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(48, 57, 92, 0.08) !important;
  color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--surface-lowest) !important;
  color: var(--primary) !important;
  box-shadow: var(--shadow) !important;
  font-weight: 700 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--text-soft) !important;
  opacity: 0.45;
}

/* --- Page shell --- */

.page-header {
  margin-bottom: 1.25rem;
}

.page-header .section-label {
  margin-bottom: 0.45rem;
}

.page-header h1 {
  margin-bottom: 0.55rem;
}

.page-lede {
  margin: 0;
  max-width: 62ch;
  color: var(--text-soft);
  line-height: 1.6;
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.page-header-row h1 {
  margin-bottom: 0;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.page-header-actions button {
  font-size: 0.85rem;
  min-height: unset;
  padding: 0.45rem 0.95rem;
}

.surface-panel {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(247, 249, 251, 0.82);
  box-shadow: var(--shadow);
}

.empty-state {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08);
}

.empty-state .section-label {
  margin-bottom: 0;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.35rem;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
}

.filter-panel {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.1);
}

.type-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.35rem 0 0.75rem;
}

.type-chip-group label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(48, 57, 92, 0.05);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}

.table-scroll table {
  margin-top: 0;
  box-shadow: none;
}

.objects.listing > .page-header,
.objects.listing > .page-header-row {
  margin-top: 0;
}

.objects.listing > .page-header.page-header-row {
  margin-bottom: 1rem;
}

.page-header h1 a {
  color: inherit;
}

.page-header h1 a:hover {
  color: var(--accent);
}

.list-2 {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
}

.list-2 li {
  list-style: none;
}

.surface-panel > h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.surface-panel .dashboard-actions {
  margin-top: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

/* Prefer subtle row separation over heavy zebra when possible */
tbody tr:nth-child(even) td {
  background: var(--surface-low);
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-md);
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-md);
}

@media (max-width: 900px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .auth-layout,
  .auth-layout-compact {
    grid-template-columns: 1fr;
  }

  .site-header-inner,
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-status {
    width: 100%;
  }
}

@media (max-width: 750px) {
  main,
  .site-header-inner,
  .site-nav-inner,
  .guest-banner,
  #message,
  .errors,
  .site-footer-inner {
    width: 100%;
  }

  main {
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .mobile-only {
    display: revert;
  }

  .desktop-only {
    display: none;
  }

  .burger-btn {
    display: inline-flex;
  }

  .site-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .site-status {
    width: auto;
    flex: 0 0 auto;
  }

  .site-status .site-status-link.mobile-only {
    display: none;
  }

  .site-nav {
    display: none;
    padding: 0;
  }

  .site-nav.nav-open {
    display: block;
    position: fixed;
    top: var(--header-height, 4.5rem);
    left: 0;
    right: 0;
    z-index: 45;
    max-height: calc(100vh - var(--header-height, 4.5rem));
    overflow-y: auto;
  }

  .site-nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.9rem;
    margin-top: 0.5rem;
    background: rgba(248, 250, 252, 0.97);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
  }

  .nav-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }

  .nav-group-secondary::before {
    display: none;
  }

  .nav-group-primary::before,
  .nav-group-secondary::after,
  .nav-group-more::before {
    content: none;
  }

  .nav-group-primary::after {
    content: "Primary";
    order: -1;
    margin: 0 0 0.2rem;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .nav-group-secondary::after {
    content: "Browse";
    order: -1;
    margin: 0.15rem 0 0.2rem;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .nav-more {
    width: 100%;
  }

  .nav-more-summary {
    width: 100%;
    justify-content: space-between;
  }

  .nav-more-panel {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08);
  }

  .site-nav a,
  nav a,
  nav span {
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-hero,
  .menu-card,
  #editArtifact,
  #interactionsList,
  #recordedUseList,
  .objects.listing,
  .object.edit,
  main > form {
    padding: 1.1rem;
  }

  .dashboard {
    gap: 0.75rem;
  }

  .dashboard-intro,
  .dashboard-actions {
    display: none;
  }

  .dashboard-hero-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .metric-card {
    padding: 0.75rem;
  }

  .metric-card strong {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  select,
  textarea,
  .input-box,
  .dashboard-search-form input[type="search"] {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-search-form input[type="search"] {
    min-height: 3rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .dashboard-search-form button {
    width: 100%;
    min-height: 3rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .auth-intro,
  .auth-panel {
    padding: 1.1rem;
  }

  .menu-about {
    padding: 1rem 1.1rem;
  }

  td.playerName {
    min-width: 9ch;
  }

  td.date {
    min-width: 5ch;
  }

  p {
    margin-right: 0;
  }

  .submit {
    width: 100%;
    box-sizing: border-box;
  }

  .overdue-card {
    padding-left: 0;
    padding-right: 0;
  }

  .overdue-card > .section-label,
  .overdue-card > .menu-card-title,
  .overdue-card > .menu-link {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .overdue-list {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.view-toggle {
  display: inline-flex;
  align-items: stretch;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(80, 95, 118, 0.08);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.12);
  gap: 0.1rem;
}

.view-toggle .view-toggle-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  cursor: pointer;
  min-height: 2rem;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.view-toggle .view-toggle-btn:hover {
  color: var(--text);
}

.view-toggle .view-toggle-btn.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(20, 32, 54, 0.12), inset 0 0 0 1px rgba(20, 32, 54, 0.05);
}

.view-toggle .view-toggle-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

table#useBy {
  transition: opacity 0.18s ease;
}

table#useBy.view-switching {
  opacity: 0.35;
}

table#useBy.cards-view {
  display: block;
  width: 100%;
  background: transparent;
  box-shadow: none;
}

table#useBy.cards-view thead {
  display: none;
}

table#useBy.cards-view tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 0.85rem;
  width: 100%;
}

table#useBy.cards-view tbody tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "name    name"
    "type    type"
    "date    date"
    "last    last"
    "record  getrid";
  row-gap: 0.55rem;
  column-gap: 0.75rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--surface-lowest);
  box-shadow: inset 0 0 0 1px rgba(80, 95, 118, 0.08);
}

table#useBy.cards-view tbody td {
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

table#useBy.cards-view tbody td.overdue,
table#useBy.cards-view tbody td.acquisitionDate,
table#useBy.cards-view tbody td.SwS,
table#useBy.cards-view tbody td.AvgT,
table#useBy.cards-view tbody td.Age,
table#useBy.cards-view tbody td.SwSs,
table#useBy.cards-view tbody td.MnP,
table#useBy.cards-view tbody td.MxP,
table#useBy.cards-view tbody td.candidate {
  display: none;
}

table#useBy.cards-view tbody td.interval {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  color: var(--text-soft);
}

table#useBy.cards-view tbody td.interval::before {
  content: 'Interval';
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

table#useBy.cards-view tbody td.name {
  grid-area: name;
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

table#useBy.cards-view tbody td.name > div {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

table#useBy.cards-view tbody td.name a.action.edit {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  overflow-wrap: anywhere;
}

table#useBy.cards-view tbody td.name .clipboard {
  position: static;
  flex: 0 0 auto;
}

table#useBy.cards-view tbody td.name .snoozed-badge {
  flex: 0 1 100%;
  max-width: max-content;
  margin-left: 0;
}

table#useBy.cards-view tbody td.type {
  grid-area: type;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 41, 57, 0.08);
  color: var(--tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table#useBy.cards-view tbody td.useByDate {
  grid-area: date;
  font-size: 0.96rem;
  color: var(--text);
}

table#useBy.cards-view tbody td.useByDate.overdue-past {
  color: var(--danger);
  font-weight: 700;
}

table#useBy.cards-view tbody td.mostRecentUse {
  grid-area: last;
  font-size: 0.92rem;
  color: var(--text-soft);
}

table#useBy.cards-view tbody td.useByDate::before,
table#useBy.cards-view tbody td.mostRecentUse::before {
  content: attr(data-label);
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

table#useBy.cards-view tbody td.useByDate.overdue-past::before {
  color: var(--danger);
}

table#useBy.cards-view tbody td.record {
  grid-area: record;
  align-self: center;
}

table#useBy.cards-view tbody td.get-rid-of {
  grid-area: getrid;
  justify-self: end;
  align-self: center;
}

table#useBy.cards-view tbody td.get-rid-of button.get-rid-of-btn {
  min-height: 2.4rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}

@media print {
  .hideOnPrint {
    display: none;
  }

  .displayOnPrint {
    display: block;
  }

  body,
  html {
    background: white;
  }

  .dashboard-hero,
  .menu-card,
  #editArtifact,
  #interactionsList,
  #recordedUseList,
  .objects.listing,
  .object.edit,
  main > form,
  table,
  .site-footer-inner {
    box-shadow: none;
    background: white;
  }

  td {
    max-width: 29ch;
  }
}

/* --- Edit entity page: action bar + non-overlapping form controls (2026-06-16) --- */
#editArtifact .edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0 1.5rem;
}

#editArtifact .edit-actions .back-link {
  margin-top: 0;
}

/* Stack every control on its own row so submit buttons never overlap the
   textarea (they were inline-flex and flowed beside it). */
#editForm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0;
}

#editForm label {
  margin: 0.95rem 0 0;
}

#editForm label:first-of-type {
  margin-top: 0.25rem;
}

#editForm input[type="submit"] {
  align-self: flex-start;
  margin: 1.1rem 0 0.35rem;
}

/* keep sweet-spot value + remove button on one line */
#editForm #sweetSpots > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
