/* Competition HUB theme. Shared screen styles; clock and print layouts load their own additions. */

/* Referee registration checking workspace */
.check-page-heading, .check-roster-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.check-page-heading p, .check-bridge-help p { color: var(--muted); margin-top: 8px; }
.check-person h2 { margin: 5px 0 20px; overflow-wrap: anywhere; }
.check-person h2:focus { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
.check-person-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 24px; }
.check-person-details > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.check-person-details dt { color: var(--muted); font-size: 13px; }
.check-person-details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.check-person-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: start; }
.check-person-actions > * { min-width: 0; }
.check-manual-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.check-search-name { padding: 14px; background: var(--canvas); border-radius: 8px; }
.check-search-name > div, .check-manual-actions, .check-auto-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.check-search-name input { flex: 1 1 160px; min-width: 0; }
.check-confirm { display: flex; gap: 9px; align-items: start; line-height: 1.5; margin: 18px 0; }
.check-confirm input { flex: 0 0 auto; margin-top: 4px; }
.check-manual-actions { margin: 10px 0 16px; }
.check-person .form-help { font-size: 12px; line-height: 1.65; }
#check-message { margin-top: 16px; font-weight: 600; line-height: 1.6; }
.check-auto-actions { margin: 16px 0; }
.check-roster .table-scroll { margin-top: 18px; }
.check-roster-heading { align-items: start; }
.check-roster-heading p { margin-top: 8px; }
.check-roster-filter { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.check-roster-filter > div { display: grid; gap: 6px; flex: 1 1 160px; min-width: 0; }
.check-roster-filter .check-filter-search { flex: 2 1 220px; }
.check-roster-filter .check-filter-sort { flex-basis: 240px; }
.check-roster-filter label { margin: 0; }
.check-roster-filter input, .check-roster-filter select { width: 100%; }
.check-bridge-help { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 1.7; }
.check-bridge-help summary { cursor: pointer; font-weight: 600; }
.check-roster tr.check-selected-row td { background: #eaf6f2; }
.check-roster td small { display: block; color: var(--muted); }
#check-progress { font-weight: 600; }
.registration-check-page [hidden] { display: none !important; }
@media (max-width: 1100px) {
  .check-person { padding: 18px; }
  .check-person-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .check-person-actions { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .check-page-heading, .check-roster-heading { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .check-manual-inputs { grid-template-columns: minmax(0, 1fr); }
}

/* Design tokens */
.account-contact-picker { margin-bottom: 24px; max-width: 720px; }

:root {
  --ink: #182c38;
  --muted: #6c7c86;
  --accent: #087e69;
  --line: #e2e8ec;
  --canvas: #f4f7f9;
  --sidebar: #112c38;
  --surface: #fff;
  --stripe: #f7f7f7;
  --winner-red: #fbefef;
  --winner-blue: #f0f6fb;
}

/* Base, typography and accessibility */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, p, figure, form, fieldset {
  margin: 0;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

button, input, select, textarea {
  font: inherit;
  margin: 0;
}

button, .button, input[type="submit"] {
  text-align: center;
  text-decoration: none;
  letter-spacing: 0;
}

input:disabled, select:disabled, textarea:disabled, button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

input[type="date"] {
  color-scheme: light;
}

em, i {
  font-style: italic;
}

h5 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 14px;
}

ul {
  margin: 0 0 28px;
  padding-left: 1.5em;
}

li {
  padding-left: .25em;
}

hr {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 28px 0;
}

.align-center {
  text-align: center;
}

.inner {
  width: 100%;
  margin: 0;
  padding: 0;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.flex > article {
  min-width: 0;
}

.flex.flex-2 > article {
  width: calc((100% - 20px) / 2);
}

.printonly {
  display: none;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.25;
}

h1 {
  font-size: clamp(26px, 2.4vw, 34px);
  margin: 0 0 10px;
}

h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

h3 {
  font-size: 17px;
  margin: 0 0 14px;
}

h4 {
  font-size: 18px;
  margin: 0 0 14px;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  border: 0;
}

strong, b {
  color: inherit;
  font-weight: 650;
}

small {
  font-size: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  vertical-align: middle;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  background: white;
  border: 2px solid var(--accent);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #66b6a8;
  outline-offset: 3px;
}

/* Application navigation and page layout */

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 248px;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
  overflow-y: auto;
  color: #d3e0e5;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: white;
  margin: 0 10px 37px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.025em;
}

.brand-mark {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand-name {
  white-space: nowrap;
}

.brand-name strong {
  color: #6de6c8;
  font-weight: 800;
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: .09em;
  font-weight: 400;
  color: #a9bec8;
  margin-top: 3px;
  text-transform: uppercase;
}

.sidebar-section-label {
  color: #7f9ca9;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 0 12px;
  margin: 0 0 12px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
}

.brand, .sidebar-section, .sidebar-section-label, .sidebar-event-name, .sidebar-account {
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 12px;
}

.sidebar-section > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  color: #9db5c0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.sidebar-section > summary::-webkit-details-marker {
  display: none;
}

.sidebar-section > summary > span:first-of-type {
  flex: 1;
  min-width: 0;
}

.sidebar-section > summary > .icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.sidebar-section > summary:hover {
  background: #1b3b48;
  color: white;
}

.sidebar-section.current-section > summary {
  color: #9bebd4;
}

.sidebar-section .sidebar-nav {
  margin: 5px 0 12px;
  gap: 3px;
}

.sidebar-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: 0 2px 3px 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.sidebar-section[open] > summary .sidebar-chevron {
  transform: rotate(225deg);
  margin-bottom: -3px;
}

.sidebar-link {
  color: #b8cbd4;
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
  transition: background .15s;
}

.sidebar-link .icon {
  opacity: .8;
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.sidebar-link:hover {
  background: #1b3b48;
  color: white;
}

.sidebar-link.active {
  background: #1b4c50;
  color: #9bebd4;
  box-shadow: inset 3px 0 #5ecfac;
}

.sidebar-child-link {
  margin-left: 12px;
  padding-left: 16px;
  border-left: 1px solid #35515d;
  font-size: 12px;
}

.sidebar-event-name {
  color: #f0f6f8;
  font-size: 13px;
  font-weight: 600;
  padding: 0 12px 16px;
  overflow-wrap: anywhere;
}

.sidebar-account {
  margin-top: auto;
  border-top: 1px solid #2c4551;
  padding: 20px 8px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #2b4b59;
  color: #d2e6ed;
  border-radius: 10px;
  font-size: 14px;
}

.sidebar-account strong {
  display: block;
  font-size: 12px;
  color: #f2f6f8;
}

.sidebar-account small {
  display: block;
  color: #8faab7;
  font-size: 10px;
}

.account-links {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 15px;
  margin-top: 7px;
}

.account-links a, .account-links button {
  color: #a6c3cd;
  font-size: 11px;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
  min-height: 0;
  line-height: 1.5;
  height: auto;
  font-weight: 400;
}

.account-links form {
  display: flex;
  align-items: center;
  margin: 0;
}

.account-links > a {
  display: inline-flex;
  align-items: center;
}

.public-status {
  font-size: 11px;
  color: #b1c7d0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.public-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5fd1ac;
}

.app-main {
  margin-left: 248px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: 76px;
  flex: 0 0 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 38px;
}

.topbar-location, .topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-location {
  color: #a5b1ba;
  font-size: 12px;
}

.topbar-location a {
  color: var(--muted);
}

.topbar-location strong {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45vw;
}

.role-chip {
  color: #567169;
  background: #edf5f1;
  border: 1px solid #d9e9e2;
  padding: 5px 11px;
  font-size: 11px;
  border-radius: 6px;
}

.page-content {
  padding: 36px 38px 28px;
  flex: 1;
  min-width: 0;
}

.app-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  font-size: 11px;
  color: #91a0a9;
}

.app-footer span {
  color: #bcc8ce;
}

/* Panels, statistics and content headings */

/* Home: brand introduction and connected competition workflow. */

.hub-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  position: relative;
  padding: 42px;
  margin-bottom: 26px;
  border: 1px solid #254752;
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% 0, #235c5b88, transparent 62%), #112e3a;
  color: #f4fbf9;
  overflow: hidden;
}

.hub-intro-copy { min-width: 0; }
.hub-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; color: #a4c9c5; font-size: 11px; font-weight: 650; letter-spacing: .18em; }
.hub-kicker > span { width: 7px; height: 7px; border-radius: 50%; background: #64e6c4; box-shadow: 0 0 0 5px #64e6c414; }
.hub-intro h1 { margin-bottom: 20px; color: #f5fbfa; font-size: clamp(34px, 3.35vw, 55px); font-weight: 750; line-height: 1.12; letter-spacing: -.05em; }
.hub-intro h1 span { color: #6de6c8; }
.hub-intro-description { margin-bottom: 26px; color: #bfd2d6; font-size: 15px; line-height: 1.8; }
.hub-intro-summary { display: block; white-space: nowrap; }
.hub-intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.hub-intro .hub-primary { background: #64e6c4; border-color: #64e6c4; color: #102f3b; font-weight: 700; padding: 12px 18px; }
.hub-intro .hub-primary:hover { background: #92f1d8; border-color: #92f1d8; }
.hub-help-link { display: inline-flex; align-items: center; gap: 8px; color: #ecf8f4; font-size: 12px; }
.hub-help-link:hover { text-decoration: underline; }
.hub-help-link .icon { width: 16px; height: 16px; flex-basis: 16px; color: #9fbfbf; }
.hub-automation-note { display: flex; align-items: flex-start; gap: 12px; padding-top: 21px; border-top: 1px solid #ffffff1c; }
.hub-automation-note > .icon { margin-top: 3px; color: #6de6c8; }
.hub-automation-note strong { font-size: 13px; font-weight: 650; }
.hub-automation-note p { margin: 3px 0 0; color: #a9c1c7; font-size: 12px; }
.hub-audience { display: block; margin-top: 22px; color: #a9c1c7; font-size: 11px; }

.hub-workflow { min-width: 0; position: relative; padding: 22px; border: 1px solid #527e7c70; border-radius: 15px; background: #091f2a80; box-shadow: 0 12px 40px #04131b26; }
.hub-workflow figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 0 0 20px; font-size: 9px; font-weight: 650; letter-spacing: .15em; color: #a6c9c6; }
.hub-workflow-caption-note { font-size: 10px; font-weight: 400; letter-spacing: 0; color: #9bb7be; }
.hub-flow { list-style: none; padding: 0; margin: 0; }
.hub-flow li { position: relative; display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 10px 0; }
.hub-flow li:not(:last-child)::after { content: ''; position: absolute; width: 1px; left: 18px; top: 48px; bottom: -18px; background: #50746f; }
.hub-flow-node { position: relative; z-index: 1; display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border: 1px solid #4b6c75; border-radius: 11px; background: #1b3c48; color: #b5d4d6; }
.hub-flow-node .icon { width: 19px; height: 19px; flex-basis: 19px; }
.hub-flow-content { min-width: 0; flex: 1 1 140px; }
.hub-flow-content > strong { display: block; color: #effaf6; font-size: 13px; font-weight: 650; }
.hub-flow-content > span { display: block; margin-top: 3px; color: #a3bfc5; font-size: 10px; }
.hub-flow-number { color: #7a9aa4; font-size: 10px; font-weight: 650; letter-spacing: .1em; }
.hub-flow-auto .hub-flow-node { border-color: #61d8b980; background: #164f4c; color: #74edcb; }
.hub-auto-label { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #4abb9c60; border-radius: 5px; padding: 3px 5px; color: #91eed1; background: #285d512e; font-size: 8px; white-space: nowrap; }
.hub-auto-label .icon { width: 11px; height: 11px; flex-basis: 11px; }
.hub-flow-finish .hub-flow-node { border-color: #e8cd8190; background: #4d4938; color: #f1d799; }
.hub-flow-finish .hub-flow-content > strong { color: #f1d799; }
.hub-flow-finish .hub-flow-number { color: #e5cd91; }
.hub-workflow-footer { display: flex; align-items: center; gap: 7px; margin-top: 15px; padding-top: 16px; border-top: 1px solid #ffffff12; color: #a9c7c9; font-size: 10px; }
.hub-workflow-footer .icon { width: 13px; height: 13px; flex-basis: 13px; color: #77dabf; }
.competition-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#competitions { scroll-margin-top: 24px; }

@media (max-width: 1250px) {
  .hub-intro { padding: 30px; gap: 24px; }
  .hub-intro-summary { white-space: normal; }
  .hub-intro h1 { font-size: 39px; }
  .hub-workflow { padding: 18px; }
  .hub-flow li { flex-wrap: wrap; column-gap: 10px; }
  .hub-auto-label { margin: -5px 0 0 47px; }
}

@media (max-width: 1000px) {
  .hub-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hub-intro h1 { font-size: clamp(34px, 5vw, 48px); }
  .hub-intro-description { max-width: 54ch; }
  .hub-intro-actions { margin-bottom: 22px; }
  .hub-audience { margin-top: 14px; }
  .hub-flow li { flex-wrap: nowrap; }
  .hub-auto-label { margin: 0; }
}

@media (max-width: 500px) {
  .hub-intro { padding: 25px 20px; border-radius: 14px; gap: 24px; }
  .hub-kicker { margin-bottom: 20px; font-size: 10px; }
  .hub-intro h1 { font-size: clamp(29px, 8vw, 38px); }
  .hub-intro-description { font-size: 13px; }
  .hub-intro-actions { gap: 16px; }
  .hub-workflow { padding: 16px 14px; }
  .hub-flow li { flex-wrap: wrap; }
  .hub-flow-content > strong { font-size: 12px; }
  .hub-auto-label { margin: -5px 0 0 47px; }
  .hub-workflow-caption-note { font-size: 9px; }
  .hub-flow-number { font-size: 8px; }
  .competition-toolbar { width: 100%; }
  .app-footer { flex-wrap: wrap; text-align: center; }
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-heading p {
  margin: 0;
  font-size: 13px;
}

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.dot {
  margin: 0 9px;
  color: #a1aeb5;
}

.panel, .page-content .wrapper {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 3px 8px #152c3703;
  margin-bottom: 24px;
  min-width: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.event-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px 24px;
  min-width: 0;
}

.stat-card > span {
  color: #75848d;
  font-size: 12px;
  display: block;
  padding-right: 24px;
}

.stat-card > strong {
  display: block;
  font-size: 31px;
  line-height: 1.3;
  letter-spacing: -.04em;
  margin-top: 9px;
  color: var(--ink);
}

.stat-card strong small {
  font-size: 17px;
  color: #8fa0a9;
}

.stat-card > .icon {
  position: absolute;
  right: 22px;
  top: 23px;
  color: #4c9d8c;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading p {
  font-size: 12px;
  margin-bottom: 0;
}

/* User guide */
.help-page {
  max-width: 1000px;
}

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.help-page h2 {
  margin-bottom: 18px;
  scroll-margin-top: 90px;
}

.help-page dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 18px;
}

.help-page dd {
  margin: 5px 0 0;
}

.help-page li + li {
  margin-top: 8px;
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.count-label {
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  background: #edf3f5;
  color: #7b909c;
  padding: 3px 8px;
  border-radius: 5px;
  margin-left: 5px;
  letter-spacing: 0;
}

.search-box {
  margin: 0;
  min-width: 200px;
  width: 270px;
}

.search-box input {
  background: #f8fafb;
  font-size: 12px;
}

/* Tables, row states and result badges */

.table-scroll {
  overflow-x: auto;
  width: 100%;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0 0 18px;
  border-spacing: 0;
}

table td, table th {
  padding: 14px 13px;
  text-align: left;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  color: var(--ink);
  line-height: 1.5;
}

table th {
  color: #83909b;
  background: #f8fafb;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

table tr {
  background-color: transparent;
  border: 0;
}

table thead {
  border-bottom: 2px solid var(--line);
}

table tfoot {
  border-top: 2px solid var(--line);
}

table tbody tr:nth-child(odd) {
  background: var(--stripe);
}

table.center :is(td, th):not(:first-child) {
  text-align: center;
}

.category-group + .category-group {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.category-group > h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.round-score {
  display: inline-block;
  white-space: nowrap;
  border-radius: 4px;
  padding: 3px 6px;
}

.round-score.win {
  color: #17643c;
  background: #e5f5eb;
  font-weight: 600;
}

.round-score.loss {
  color: #a12834;
  background: #fdecee;
  font-weight: 600;
}

.manual-bout-heading, .category-bouts-heading {
  margin-top: 48px;
}

a.ok {
  color: #258269;
}

a.nok {
  color: #a34a4a;
}

.empty {
  color: #8a97a0;
  text-decoration: line-through;
}

table tbody tr:hover {
  background: #fbfdfc;
}

table tbody tr.announced {
  background: #fffdf1;
}

table tbody tr.ok {
  background: #f0f8f3;
}

table tbody tr.nok {
  background: #fff6f1;
}

table tbody tr.red {
  background: var(--winner-red);
}

table tbody tr.blue {
  background: var(--winner-blue);
}

tr.withdrawn-entry td {
  color: var(--muted);
}

tr.withdrawn-entry td:not(:last-child) {
  text-decoration: line-through;
}

tr.eliminated-entry td:first-child {
  color: var(--muted);
  text-decoration: line-through;
}

tr.eliminated-entry .badge {
  display: inline-block;
  text-decoration: none;
}

table tr:last-child td {
  border-bottom: 0;
}

table small {
  display: block;
  color: #8a97a0;
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
}

table strong {
  font-size: 13px;
}

.data-table {
  margin-bottom: 0;
}

.event-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 220px;
}

.event-emblem {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  flex: 0 0 40px;
  color: #519787;
  background: #edf6f2;
  border: 1px solid #e2eee9;
  border-radius: 9px;
}

.mat-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #f0f4f6;
  color: #617580;
  border-radius: 6px;
  font-size: 12px;
}

.row-action {
  text-align: right;
  white-space: nowrap;
}

.competition-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  margin-top: 10px;
}

.competition-actions form {
  margin: 0;
}

.event-access-panel .competition-actions {
  justify-content: flex-start;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.badge {
  display: inline-flex;
  padding: 4px 9px;
  font-size: 10px;
  line-height: 1.4;
  border-radius: 5px;
  white-space: nowrap;
}

.badge.positive {
  color: #258269;
  background: #e9f6ef;
}

/* Association membership: labels and receipt icons keep status readable without colour. */
.membership-check { min-width: 155px; }
.membership-check small { display: block; margin-top: 4px; color: var(--muted); }
.badge.membership-paid, .membership-indicator.membership-paid { color: #1d7057; background: #e9f6ef; }
.badge.membership-unpaid, .membership-indicator.membership-unpaid { color: #a32937; background: #fcecee; }
.badge.membership-review, .membership-indicator.membership-review { color: #85601b; background: #fcf4e2; }
.badge.membership-exempt, .membership-indicator.membership-exempt { color: #52646f; background: #edf1f4; }
.membership-check .badge, .membership-counts .badge { gap: 5px; align-items: center; font-size: 12px; }
.membership-check .icon, .membership-counts .icon { width: 16px; height: 16px; flex: none; }
.membership-name { display: inline-flex; align-items: center; gap: 6px; }
.membership-id { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.3; white-space: nowrap; }
.membership-indicator { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 5px; cursor: help; }
.membership-indicator:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.membership-indicator > .icon { width: 16px; height: 16px; }
.membership-tooltip { display: none; }
.membership-tooltip:popover-open { display: block; position: fixed; inset: auto; margin: 0; max-width: min(300px, calc(100vw - 24px)); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.5; white-space: normal; box-shadow: 0 4px 16px #0002; }
.membership-summary { padding: 20px; margin-bottom: 22px; }
.membership-summary p { color: var(--muted); margin-top: 5px; }
.membership-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.membership-summary .membership-attention { color: #a32937; font-weight: 600; margin-top: 12px; }
.membership-fields { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.membership-fields .field-label { display: block; margin-bottom: 8px; font-weight: 600; }
.duplicate-warning { padding: 18px; margin-bottom: 20px; border: 1px solid #dec99b; border-radius: 8px; background: #fffbf1; }
.duplicate-warning h3 { margin-bottom: 8px; }
.duplicate-warning p { margin: 6px 0; overflow-wrap: anywhere; }
.duplicate-candidates { padding-left: 20px; margin: 12px 0 0; }
.duplicate-candidates li + li { margin-top: 14px; }
.duplicate-candidates .form-actions { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.duplicate-confirmation { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }

.badge.muted {
  color: #7d8b96;
  background: #f0f3f5;
}

.badge.warm {
  color: #9b7525;
  background: #fcf4e2;
}

.place-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #f2f5f7;
  border-radius: 7px;
}

.place-badge.podium {
  color: #876d2b;
  background: #faf1da;
  font-weight: 650;
}

.dashboard-note {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 3px;
  color: #8aa49d;
}

.dashboard-note p {
  font-size: 11px;
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  width: 100%;
}

.empty-state > .icon {
  width: 38px;
  height: 38px;
  color: #83b1a5;
  margin-bottom: 20px;
}

.empty-state p {
  max-width: 440px;
  margin: 0 auto 24px;
}

.empty-cell {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}

/* Buttons and form controls */

.button, button, input[type="submit"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  height: auto;
  padding: 10px 17px;
  border: 1px solid #dce5e8;
  border-radius: 7px;
  box-shadow: none;
  background: white;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  width: auto;
}

.button:where(.primary, [type="submit"]:not(.link-button, .secondary)),
input[type="submit"],
button:where([type="submit"]:not(.link-button, .secondary)) {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.button:hover, button:hover, input[type="submit"]:hover {
  border-color: #a9c5ba;
  background: #f0f8f4;
}

.button:where(.primary, [type="submit"]:not(.link-button, .secondary)):hover,
input[type="submit"]:hover,
button:where([type="submit"]:not(.link-button, .secondary)):hover {
  background: #086d5d;
  color: white;
}

.button.small {
  min-height: 34px;
  padding: 7px 12px;
}

.button .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.full-width {
  width: 100%;
}

form {
  margin-bottom: 20px;
}

input:where(:not([type="checkbox"], [type="radio"], [type="submit"], [type="hidden"])),
select,
textarea {
  font-family: inherit;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  background: white;
  box-shadow: none;
  border: 1px solid #dbe4e8;
  border-radius: 6px;
  height: 42px;
  width: 100%;
  padding: 9px 12px;
  max-width: 100%;
  display: block;
}

textarea {
  min-height: 100px;
  height: auto;
}

input:focus, textarea:focus, select:focus {
  border-color: #62a99a;
  box-shadow: 0 0 0 3px #087e6910;
}

label {
  display: block;
  color: #526671;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 7px;
}

input[type="checkbox"], input[type="radio"] {
  appearance: auto;
  display: inline-block;
  flex-shrink: 0;
  margin: 0 7px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  vertical-align: middle;
  cursor: pointer;
}

input[type="checkbox"] + label, input[type="radio"] + label {
  display: inline;
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
}

/* Registration, assignments and form layouts */

.catalog-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.catalog-filter > div { flex: 0 1 360px; min-width: 0; max-width: 100%; }
.catalog-filter label { margin-bottom: 5px; }
.catalog-filter .field-help { align-self: center; }
.competitor-editor { max-width: 1000px; padding: 22px; }
.competitor-editor .form-grid { gap: 12px 18px; margin-bottom: 14px; }
.competitor-editor .competitor-editor-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.competitor-editor label { font-size: 12px; margin-bottom: 5px; }
.competitor-editor .competitor-active { display: flex; align-items: flex-end; padding-bottom: 9px; }
.competitor-editor .membership-fields { padding-top: 14px; margin-top: 6px; }
.competitor-editor .membership-check { min-width: 0; }
.competitor-editor .membership-fields > .field-help { margin-bottom: 8px; }
.competitor-editor .form-actions { margin-top: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin-bottom: 26px;
}

.competitor-entry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.competitor-entry-row .competitor-field {
  flex: 1 1 110px;
  min-width: 0;
}

.competitor-entry-row .competitor-weight {
  flex: .6 1 72px;
}

.competitor-entry-row .competitor-birth {
  flex: 1 1 138px;
}

.competitor-entry-row .competitor-gender {
  flex: 1 1 98px;
}

.competitor-entry-row .competitor-membership {
  flex: 0 1 180px;
}

.competitor-entry-row .competitor-team {
  flex: 1.2 1 115px;
}

.competitor-entry-row > button, .competitor-entry-actions > button {
  flex: 0 0 auto;
  min-height: 42px;
}

.competitor-entry-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.competitor-entry-actions .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.competitor-entry-actions .check-label input {
  margin: 0;
}

.competitor-entry-row label {
  margin-bottom: 5px;
  font-size: 11px;
}

.quick-registration h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

.competitor-optional-fields summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}

.competitor-optional-fields .form-grid {
  margin: 14px 0;
  gap: 12px;
}

.registration-category-editor {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 215px;
}

.registration-category-editor select {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  font-size: 12px;
}

.registration-category-editor button {
  min-height: 36px;
  padding: 7px 10px;
}

.page-content .wrapper .registration-columns {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.4fr);
}

.page-content .wrapper .registration-columns > article {
  width: 100%;
}

.assignment-grid {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.field-help {
  font-size: 11px;
  margin: 6px 0 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.friendly-person input {
  margin-bottom: 14px;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.row-actions > a {
  white-space: nowrap;
}

.page-heading .form-actions {
  margin-top: 0;
}

.checkbox-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 15px;
}

.checkbox-list label {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
  padding: 8px 0;
}

.checkbox-list small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.check-label {
  display: flex;
  align-items: center;
  font-weight: 400;
  gap: 6px;
  margin: 20px 0;
}

/* Feedback and authentication */

.flash-message {
  padding: 12px 16px;
  border: 1px solid #c8e5d9;
  color: #2c7963;
  background: #edf8f2;
  border-radius: 7px;
  margin-bottom: 22px;
  font-size: 13px;
}

.flash-message.error {
  border-color: #efd2d2;
  color: #a34a4a;
  background: #fff2f2;
}

.notice {
  padding: 16px 18px;
  background: #f0f6f8;
  border-radius: 7px;
  font-size: 13px;
}

.scoring-form > .field-help { margin: 0 0 12px; }
.scoring-form .score-sides { gap: 16px; margin-bottom: 16px; }
.scoring-form .score-side { min-width: 0; padding: 18px; margin: 0; }
.scoring-form .score-side-red { border-top: 4px solid #b73d44; }
.scoring-form .score-side-blue { border-top: 4px solid #3579bd; }
.scoring-form .score-side h2 { font-size: 18px; margin-bottom: 4px; }
.scoring-form .score-side h3 { font-size: 16px; margin: 0 0 4px; }
.scoring-form .score-side > p { font-size: 12px; margin-bottom: 12px; }
.scoring-form .score-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.scoring-form .score-field:last-child { margin-bottom: 0; }
.scoring-form .score-field label { margin: 0; }
.scoring-form .score-field input { min-width: 0; height: 38px; padding: 7px 10px; margin: 0; }
.scoring-form .field-error { display: block; color: #a13636; font-size: 13px; }
.scoring-form .field-error:not(:empty) { margin: 6px 0 12px; }
.scoring-form .score-field .field-error { grid-column: 1 / -1; }
.scoring-form .score-field .field-error:not(:empty) { margin: 0 0 2px; }
.scoring-form [aria-invalid="true"] { border-color: #b73d44; }
.scoring-form .score-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.scoring-form .score-decision { padding: 18px; margin: 0; }
.scoring-form .score-decision h2 { font-size: 18px; margin-bottom: 12px; }
.scoring-form .score-decision [role="group"] > div { display: flex; align-items: baseline; margin-bottom: 6px; }
.scoring-form .score-decision [role="group"] label { margin: 0; font-weight: 400; }
.scoring-form .score-confirm-row { margin-top: 14px; }
.scoring-form .score-rules { padding: 18px; margin: 0; font-size: 12px; }
.scoring-form .score-rules ul { margin: 8px 0; }
.scoring-form .score-rules p { margin: 8px 0 0; }

@media (max-width: 700px) {
  .scoring-form .score-sides, .scoring-form .score-bottom { grid-template-columns: 1fr; }
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1040px;
  margin: 9vh auto;
}

.auth-intro h1 {
  font-size: clamp(29px, 3vw, 43px);
  line-height: 1.2;
}

.auth-intro p {
  max-width: 400px;
  margin: 22px 0 32px;
  line-height: 1.8;
}

.auth-panel {
  padding: 35px;
}

.auth-panel label {
  margin-top: 18px;
}

.auth-panel button {
  margin-top: 26px;
}

.narrow-panel {
  max-width: 560px;
}

.narrow-panel input {
  margin-bottom: 18px;
}

/* Public categories and results */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.age-category-group + .age-category-group {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 24px;
}

.age-category-heading {
  font-size: 16px;
  margin: 0 0 16px;
}

.category-card {
  display: block;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
}

.category-card:hover {
  border-color: #86bdad;
  background: #fcfefd;
}

.category-card > strong {
  display: block;
  font-size: 32px;
  margin: 16px 0 20px;
  letter-spacing: -.035em;
}

.category-card strong small {
  font-size: 14px;
  color: #7b8c96;
  font-weight: 400;
}

.category-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #82929d;
  font-size: 12px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  background: #f8fafb;
  gap: 3px;
}

.segmented-control a {
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 5px;
  color: #7c8d97;
  white-space: nowrap;
}

.segmented-control a.selected {
  background: white;
  color: var(--accent);
  box-shadow: 0 1px 5px #1c343810;
}

.result-filter {
  margin-bottom: 22px;
}

.schedule-view:fullscreen {
  background: var(--canvas);
  padding: 28px;
  overflow: auto;
}

@media screen {
  .data-table tbody tr.coach-team-bout { background: #eaf8f3; }
  .data-table tbody tr.coach-team-bout:hover { background: #dff2ea; }
  .coach-team-bout > td:first-child { box-shadow: inset 4px 0 var(--accent); }
  .coach-team-name { font-weight: 700; }
  .coach-team-label { margin-left: 6px; color: #075c4c; background: #ceeee2; }
}

.checkin-sort {
  flex-wrap: wrap;
  max-width: 100%;
}

.checkin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 22px;
}

.checkin-team-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 360px;
  min-width: 0;
  margin: 0;
}

.checkin-team-filter label,
.checkin-team-filter input[type="submit"] {
  flex-shrink: 0;
  margin: 0;
}

.checkin-team-filter select {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
}

.match-list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.match-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.match-list-toolbar .result-filter {
  margin-bottom: 0;
}

/* Scoring and inline actions */

.red-side {
  color: #ad5359;
}

.blue-side {
  color: #477fa8;
}

.inline-action {
  display: inline-block;
  margin: 0;
}

.link-button {
  background: transparent;
  padding: 0 3px;
  min-height: 24px;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}

.link-button.danger {
  color: #aa5a5a;
}

.link-button:hover {
  background: transparent;
  text-decoration: underline;
}

.account-links .link-button {
  color: #a6c3cd;
  font-size: 11px;
}

.page-content form[action^="/matchOrder/"] .flex > article {
  padding: 20px;
  border-radius: 8px;
}

.page-content form[action^="/matchOrder/"] .flex > article:first-child {
  border-top: 3px solid #b95e69;
  background: #fff9f9;
}

.page-content form[action^="/matchOrder/"] .flex > article:last-child {
  border-top: 3px solid #5686b2;
  background: #f7fbff;
}

/* Operational page layouts */

.page-content #banner {
  margin: 0 0 24px;
}

.page-content #banner h1 {
  color: var(--ink);
  font-size: 28px;
  text-align: left;
}

.page-content #banner h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
  text-align: left;
}

.category-groups-heading {
  margin-bottom: 0;
}

.category-groups-heading h1 {
  margin: 0;
}

.category-groups-heading [data-print] {
  flex-shrink: 0;
  margin-left: auto;
}

.page-content .wrapper .align-center {
  text-align: left;
}

.page-content fieldset:disabled {
  opacity: .75;
}

/* Audit history */

.audit-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}

.audit-filters label {
  min-width: 170px;
  flex: 1 1 170px;
}

.audit-explanation {
  color: var(--muted);
  font-size: 13px;
  margin-top: 20px;
}

.audit-table {
  min-width: 780px;
}

.audit-table td {
  vertical-align: top;
}

.audit-table time {
  white-space: nowrap;
}

.audit-table td:nth-child(2) {
  max-width: 230px;
  overflow-wrap: anywhere;
}

.audit-record {
  display: block;
  margin-top: 8px;
}

.audit-table summary {
  cursor: pointer;
  color: var(--accent);
  padding: 2px 0;
}

.audit-changes {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  min-width: 300px;
}

.audit-change {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(70px, 1fr) auto minmax(70px, 1fr);
  gap: 10px;
  align-items: start;
  overflow-wrap: anywhere;
}

.audit-change small {
  font-weight: 400;
}

.audit-before, .audit-after {
  white-space: pre-wrap;
}

.audit-source {
  color: var(--muted);
  font-size: 11px;
}

.audit-pagination {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.audit-pagination > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle, .sidebar-scrim {
  display: none;
}

/* Public print documents */

body:not(.app-body) main {
  margin: 40px 5vw;
}

/* Diploma editor */

.diploma-scope-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; width: 350px; max-width: 100%; flex-shrink: 0; }
.diploma-scope-form > div { flex: 1; min-width: 0; }
.diploma-scope-form label { margin-bottom: 4px; }
.diploma-scope-form select { height: 36px; padding: 7px 9px; }
.diploma-scope-form button { min-height: 36px; padding: 8px 10px; }

.diploma-editor {
  display: grid;
  grid-template-columns: minmax(460px, .95fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.diploma-editor > .panel { padding: 18px; }
.diploma-editor h2 { margin-bottom: 12px; font-size: 18px; }
.diploma-editor form { margin: 0; }
.diploma-editor label { margin-bottom: 4px; }
.diploma-editor .form-grid { gap: 8px 12px; margin: 0; }
.diploma-editor input:not([type="checkbox"]), .diploma-editor select {
  height: 36px;
  padding: 7px 9px;
}
.diploma-editor button, .diploma-editor .button { min-height: 36px; padding: 8px 10px; }
.diploma-editor .form-actions { gap: 8px; margin-top: 12px; }
.diploma-content-editor { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.diploma-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.diploma-section-heading h2 { margin: 0; }
.diploma-page-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: end; gap: 12px; margin-bottom: 12px; }
.diploma-ink-option { display: flex; align-items: center; min-height: 36px; }
.diploma-ink-option label { margin: 0; line-height: 1.4; }

.diploma-settings-table { width: 100%; min-width: 410px; table-layout: fixed; margin: 0; }
.diploma-settings-table th, .diploma-settings-table td { padding: 6px 4px; }
.diploma-settings-table thead th { width: 16%; }
.diploma-settings-table thead th:first-child { width: 24%; }
.diploma-settings-table thead th:last-child { width: 28%; }
.diploma-settings-table input, .diploma-settings-table select { min-width: 0; padding: 6px; }
.diploma-help { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.diploma-help summary { cursor: pointer; color: var(--ink); }
.diploma-help p { margin: 8px 0 0; }
.diploma-editor [data-diploma-status], .diploma-editor [data-diploma-content-status] { margin: 8px 0 0; font-size: 12px; line-height: 1.4; }
.diploma-editor [data-diploma-status]:empty, .diploma-editor [data-diploma-content-status]:empty { display: none; }
.diploma-preview-panel > h2 { margin-bottom: 6px; }
.diploma-preview-panel > p { margin-bottom: 16px; font-size: 12px; }

@media (max-width: 500px) {
  .diploma-page-options { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* Responsive layout */

@media (min-width: 1600px) {
  .page-content {
    max-width: 1520px;
    width: 100%;
    align-self: center;
  }
}

@media (max-width: 1200px) {
  .event-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-content .wrapper .registration-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1150px) {
  .app-sidebar {
    width: 220px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-main {
    margin-left: 220px;
  }

  .app-topbar {
    padding: 0 25px;
  }

  .page-content {
    padding-left: 25px;
    padding-right: 25px;
  }

  .stat-card {
    padding: 18px;
  }

  .auth-layout {
    gap: 28px;
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 20px auto;
  }

  .auth-intro h1 {
    font-size: 30px;
  }
}

@media (max-width: 980px) {
  .diploma-editor { grid-template-columns: minmax(0, 1fr); }

  .flex.flex-2 > article {
    width: 100%;
  }
}

@media (max-width: 800px) {
  .app-sidebar {
    width: 248px;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .app-main {
    margin-left: 0;
  }

  .app-topbar {
    height: 64px;
    flex-basis: 64px;
    padding: 0 20px;
  }

  .page-content {
    padding: 26px 20px;
  }

  .menu-toggle {
    display: inline-flex;
    background: none;
    padding: 5px;
    border: 0;
    min-height: 32px;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-scrim {
    display: block;
    position: fixed;
    z-index: 35;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #112c3870;
    border: 0;
    border-radius: 0;
  }

  .page-heading {
    align-items: flex-start;
    gap: 16px;
  }

  .stat-grid {
    gap: 12px;
  }

  .stat-card > .icon {
    display: none;
  }

  .stat-card > span {
    padding-right: 0;
    font-size: 10px;
  }

  .stat-card > strong {
    font-size: 26px;
  }

  .heading-row {
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
  }

  .panel, .page-content .wrapper {
    padding: 20px;
  }

  .page-content .wrapper .flex {
    flex-direction: column;
  }

  .page-content .wrapper .flex article {
    width: 100%;
  }

}

@media (max-width: 600px) {
  .event-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .page-heading {
    flex-direction: column;
  }

  .stat-card {
    padding: 15px 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    padding: 0 15px;
  }

  .page-content {
    padding: 24px 15px;
  }

  .role-chip {
    font-size: 10px;
    padding: 4px 7px;
  }

  .auth-panel {
    padding: 24px;
  }

  .segmented-control {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Shared printing; page orientation/column layouts are in print*.css. */

@media print {
  .schedule-view:fullscreen {
    background: white;
    padding: 0;
    overflow: visible;
    width: auto;
    height: auto;
  }

  .app-sidebar, .app-topbar, .app-footer, .sidebar-scrim, .menu-toggle,
  .page-heading .button, .segmented-control, .skip-link, .noprint, button, input[type="submit"] {
    display: none !important;
  }

  .app-main {
    margin: 0;
    display: block;
    min-height: 0;
  }

  .page-content {
    padding: 0;
    max-width: none;
  }

  body {
    background: white;
    font-size: 11px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .panel, .page-content .wrapper, body:not(.app-body) .wrapper {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 20px;
    overflow: visible;
  }

  body:not(.app-body) #header {
    display: none;
  }

  body:not(.app-body) #banner {
    padding: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    font-size: 10px;
  }

  table td, table th {
    padding: 7px;
  }

  tr {
    break-inside: avoid;
  }

  h1, h2, h3, h4, h5 {
    break-after: avoid;
  }

  .printonly {
    display: block;
  }
}
