:root {
   --background: #f7f8f5;
   --surface: #ffffff;
   --text: #141614;
   --muted: #667067;
   --line: #dfe5dc;
   --accent: #006c67;
   --accent-strong: #004f4b;
   --warning: #8a4b00;
   --warning-bg: #fff3df;
}

* {
   box-sizing: border-box;
}

html {
   min-height: 100%;
   scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
   html {
      overflow-y: scroll;
   }
}

body {
   min-height: 100%;
   margin: 0;
   background: var(--background);
   color: var(--text);
   font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      "Segoe UI", sans-serif;
   line-height: 1.5;
}

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

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

.site-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   padding: 10px 32px;
   border-bottom: 1px solid var(--line);
   background: var(--surface);
}

.site-header-main {
   display: flex;
   align-items: center;
   min-width: 0;
   gap: 14px;
}

.brand {
   flex: 0 0 auto;
   color: var(--text);
   font-size: 18px;
   font-weight: 800;
}

.site-nav {
   display: flex;
   flex: 0 0 auto;
   gap: 18px;
   font-size: 14px;
   font-weight: 700;
}

.admin-top-menu {
   display: flex;
   align-items: center;
   gap: 6px;
   min-width: 0;
   overflow-x: auto;
}

.admin-top-menu-link {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 26px;
   padding: 0 8px;
   border: 1px solid var(--line);
   border-radius: 3px;
   background: var(--background);
   color: var(--text);
   font-size: 12px;
   font-weight: 800;
   line-height: 1.2;
   white-space: nowrap;
}

.admin-top-menu-link:hover,
.admin-top-menu-link.is-active {
   border-color: var(--accent);
   background: var(--accent);
   color: #ffffff;
}

.page-shell {
   width: min(1120px, calc(100% - 32px));
   margin: 0 auto;
   padding: 36px 0 64px;
}

.page-heading {
   margin-bottom: 28px;
}

.page-heading-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
}

.index-heading {
   display: flex;
   align-items: flex-start;
   justify-content: flex-start;
   gap: 18px;
   width: min(974px, 100%);
   margin-bottom: 28px;
}

.index-heading-left {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 14px;
}

.date-select {
   width: min(320px, 100%);
}

.date-select-control {
   position: relative;
}

.date-select-control::after {
   content: "";
   position: absolute;
   top: 50%;
   right: 16px;
   width: 8px;
   height: 8px;
   border-right: 2px solid var(--accent-strong);
   border-bottom: 2px solid var(--accent-strong);
   transform: translateY(-65%) rotate(45deg);
   pointer-events: none;
}

.date-select-input {
   width: 100%;
   min-height: 48px;
   padding: 12px 44px 12px 16px;
   border: 1px solid rgba(0, 108, 103, 0.18);
   border-radius: 16px;
   background:
      linear-gradient(
         180deg,
         rgba(255, 255, 255, 0.96),
         rgba(255, 255, 255, 1)
      );
   box-shadow: 0 10px 24px rgba(20, 22, 20, 0.08);
   color: var(--accent-strong);
   font-size: 16px;
   font-weight: 800;
   line-height: 1.2;
   appearance: none;
   -webkit-appearance: none;
   -moz-appearance: none;
}

.date-select-input:focus {
   outline: 2px solid rgba(0, 108, 103, 0.22);
   outline-offset: 2px;
}

.date-select-input option {
   color: var(--text);
   font-weight: 600;
}

.page-heading-title-row {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 12px;
}

.entity-name-filter {
   width: 220px;
   max-width: 100%;
}

.eyebrow {
   margin: 0 0 4px;
   color: var(--muted);
   font-size: 13px;
   font-weight: 800;
   text-transform: uppercase;
}

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

h1 {
   margin-bottom: 0;
   font-size: 26px;
   line-height: 1.15;
}

h2 {
   font-size: 18px;
   line-height: 1.25;
}

.activity-agenda {
   display: grid;
   gap: 14px;
}

.activity-agenda-section {
   display: grid;
   grid-template-columns: 160px minmax(0, 1fr);
   gap: 14px;
   align-items: stretch;
}

.activity-agenda-time {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 6px;
   padding-top: 4px;
}

.activity-time-row {
   display: flex;
   align-items: center;
   gap: 8px;
   flex-wrap: wrap;
}

.activity-time-badge {
   display: inline-flex;
   align-items: center;
   min-height: 30px;
   padding: 0 12px;
   border-radius: 999px;
   background: var(--accent);
   color: #ffffff;
   font-size: 12px;
   font-weight: 800;
   letter-spacing: 0.02em;
   white-space: nowrap;
}

.activity-time-badge-muted {
   background: #e8ece7;
   color: var(--muted);
}

.activity-time-count {
   padding-left: 4px;
   color: var(--muted);
   font-size: 12px;
   font-weight: 700;
}

.activity-time-summary-list {
   display: grid;
   gap: 6px;
   margin-top: 4px;
   margin-bottom: 12px;
}

.activity-time-summary {
   padding-left: 4px;
}

.activity-time-summary-primary {
   color: var(--accent-strong);
   font-size: 12px;
   font-weight: 800;
   line-height: 1.25;
}

.activity-time-summary-entities {
   color: var(--text);
   font-size: 12px;
   font-weight: 600;
   line-height: 1.25;
   white-space: nowrap;
}

.activity-time-related {
   padding-left: 4px;
   color: var(--accent-strong);
   font-size: 12px;
   font-weight: 700;
   line-height: 1.25;
}

.activity-agenda-items {
   display: grid;
   gap: 10px;
   align-self: stretch;
   padding-left: 14px;
   border-left: 2px solid var(--line);
   max-width: 800px;
}

.activity-agenda-section-untimed .activity-agenda-items {
   border-left-style: dashed;
}

.activity-entry {
   padding: 12px 14px;
   border: 1px solid var(--line);
   border-radius: 12px;
   background: var(--surface);
   box-shadow: 0 1px 0 rgba(20, 22, 20, 0.02);
   font-size: 13px;
   line-height: 1.35;
}

.activity-meta {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 6px;
   margin-bottom: 3px;
   color: var(--muted);
   font-size: 11px;
   font-weight: 700;
   line-height: 1.2;
   text-transform: uppercase;
}

.activity-sport {
   display: inline-flex;
   align-items: center;
   gap: 4px;
}

.activity-time-channel {
   color: var(--muted);
   font-size: 12px;
   font-weight: 700;
   line-height: 1.2;
   white-space: nowrap;
}

.activity-teaser {
   color: var(--muted);
   font-size: 12px;
   font-weight: 400;
   line-height: 1.35;
}

.relevance {
   margin-bottom: 0;
   color: var(--muted);
}

.notice {
   padding: 14px 16px;
   margin-bottom: 12px;
   border: 1px solid var(--line);
   border-radius: 8px;
   background: var(--surface);
}

.notice-warning {
   border-color: #efca94;
   background: var(--warning-bg);
   color: var(--warning);
}

.notice-error {
   border-color: #e0aaaa;
   background: #fff5f5;
   color: #8c2d2d;
}

.button {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 32px;
   padding: 0 10px;
   border: 1px solid var(--line);
   border-radius: 3px;
   background: var(--surface);
   color: var(--text);
   font: inherit;
   font-size: 13px;
   font-weight: 700;
   line-height: 1.2;
   cursor: pointer;
}

.button-primary {
   border-color: var(--accent);
   background: var(--accent);
   color: #ffffff;
}

.button-cancel {
   background: var(--muted);
   color: #ffffff;
}

.button-row {
   display: flex;
   flex-wrap: wrap;
   gap: 8px;
}

.form-status {
   display: inline-flex;
   align-items: center;
   min-height: 32px;
   color: var(--muted);
   font-size: 12px;
   font-weight: 700;
}

.form-status-error {
   color: var(--warning);
}

.filter-form {
   display: flex;
   align-items: end;
   flex-wrap: wrap;
   gap: 8px;
}

.filter-form label {
   min-width: 180px;
   margin-bottom: 0;
}

.filter-checkbox {
   min-width: auto !important;
}

.filter-sports {
   display: grid;
   gap: 4px;
   min-width: min(100%, 520px);
   font-weight: 700;
}

.filter-sports label {
   margin-bottom: 0;
}

.filter-sports select {
   min-height: inherit;
}

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

.admin-card {
   display: grid;
   gap: 6px;
   padding: 18px;
   border: 1px solid var(--line);
   border-radius: 8px;
   background: var(--surface);
   color: var(--text);
}

.admin-card span {
   color: var(--muted);
}

.admin-layout {
   display: grid;
   grid-template-columns: 220px minmax(0, 1fr);
   gap: 16px;
}

.admin-sidebar {
   display: grid;
   align-content: start;
   overflow: hidden;
   border: 1px solid var(--line);
   border-radius: 6px;
   background: var(--surface);
}

.admin-sidebar-group {
   display: grid;
   gap: 1px;
   padding: 8px 0;
   border-bottom: 1px solid var(--line);
}

.admin-sidebar-group:last-child {
   border-bottom: 0;
}

.admin-sidebar-group h2 {
   margin: 0;
   padding: 0 12px 4px;
   color: var(--muted);
   font-size: 10px;
   font-weight: 800;
   line-height: 1.2;
   text-transform: uppercase;
   letter-spacing: 0.03em;
}

.admin-sidebar a {
   display: block;
   padding: 5px 12px;
   color: var(--text);
   font-size: 13px;
   font-weight: 700;
   line-height: 1.25;
}

.admin-sidebar a.is-active {
   background: rgba(0, 108, 103, 0.08);
   color: var(--accent-strong);
}

.admin-sidebar-group a {
   font-weight: 700;
}

.admin-sidebar-group a:hover {
   background: rgba(0, 108, 103, 0.06);
}

.compact-heading {
   margin-bottom: 14px;
}

.compact-heading p {
   margin-bottom: 0;
   color: var(--muted);
}

.admin-table-wrap {
   overflow-x: auto;
   border: 1px solid var(--line);
   border-radius: 8px;
   background: var(--surface);
}

.admin-table {
   width: 100%;
   border-collapse: collapse;
   min-width: 760px;
   font-size: 13px;
   line-height: 1.35;
}

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

.admin-table-hover tbody tr {
   transition: background-color 0.12s ease-in-out;
}

.admin-table-hover tbody tr:hover > td {
   background: #edf3ee;
}

.admin-table th {
   color: var(--muted);
   font-size: 11px;
   line-height: 1.2;
   text-transform: uppercase;
}

.admin-table th .button {
   min-height: 28px;
   padding: 0 8px;
   font-size: 12px;
   line-height: 1;
   white-space: nowrap;
}

.admin-table td span {
   display: block;
   color: var(--muted);
   font-size: 12px;
}

.admin-table input[type="checkbox"] {
   width: 16px;
   height: 16px;
}

.table-select {
   text-align: center !important;
   vertical-align: middle !important;
   width: 1%;
}

.audit-id {
   color: var(--muted);
   font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
   overflow-wrap: anywhere;
}

.prompt-details {
   margin: 16px 0;
}

.prompt-details summary {
   cursor: pointer;
   color: var(--accent-strong);
   font-weight: 800;
}

.prompt-details pre {
   max-height: 360px;
   margin: 12px 0 0;
   overflow: auto;
   white-space: pre-wrap;
   overflow-wrap: anywhere;
   padding: 14px;
   border: 1px solid var(--line);
   border-radius: 8px;
   background: #f7faf9;
   color: var(--ink);
   font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.prompt-details-pre {
   max-height: 360px;
   margin: 0;
   overflow: auto;
   white-space: pre-wrap;
   overflow-wrap: anywhere;
   word-break: break-word;
   padding: 14px;
   border: 1px solid var(--line);
   border-radius: 8px;
   background: #f7faf9;
   color: var(--ink);
   font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.tall-textarea {
   min-height: 200px;
   height: 200px;
}

.proposal-summary {
   display: grid;
   grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
   gap: 24px;
}

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

.detail-grid div {
   min-width: 0;
}

.detail-grid dt {
   color: var(--muted);
   font-size: 12px;
   font-weight: 800;
   text-transform: uppercase;
}

.detail-grid dd {
   margin: 2px 0 0;
   overflow-wrap: anywhere;
   font-weight: 700;
}

.review-actions {
   display: grid;
   gap: 18px;
}

.reject-form {
   display: grid;
   gap: 12px;
   padding-top: 18px;
   border-top: 1px solid var(--line);
}

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

.status-pill {
   display: inline-flex;
   min-width: 70px;
   justify-content: center;
   padding: 3px 8px;
   border-radius: 999px;
   background: #eef4f2;
   color: var(--accent-strong) !important;
   font-weight: 800;
}

.table-actions {
   text-align: right !important;
   white-space: nowrap;
}

.table-actions form {
   display: inline;
   margin-left: 8px;
}

.table-actions button {
   padding: 0;
   border: 0;
   background: transparent;
   color: var(--warning);
   font: inherit;
   font-weight: 800;
   cursor: pointer;
}

.edit-form {
   display: grid;
   gap: 12px;
}

.form-section,
.login-panel {
   padding: 14px;
   border: 1px solid var(--line);
   border-radius: 4px;
   background: var(--surface);
   margin: 0px;
}

.form-section h2,
.login-panel h1 {
   margin-bottom: 12px;
}

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

label {
   display: grid;
   gap: 4px;
   margin-bottom: 10px;
   font-weight: 700;
}

label span {
   font-size: 12px;
   line-height: 1.2;
}

.field-validation-error,
.validation-summary-errors {
   color: #8c2d2d;
   font-size: 12px;
   font-weight: 800;
   line-height: 1.3;
}

.field-validation-valid,
.validation-summary-valid {
   display: none;
}

.field-validation-error {
   display: block;
   margin-top: 2px;
}

.validation-summary-errors {
   display: grid;
   gap: 4px;
   margin-bottom: 14px;
}

.validation-summary-errors ul {
   margin: 0;
   padding-left: 18px;
}

input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
   border-color: #d38f8f;
   background: #fff7f7;
}

input,
select,
textarea {
   width: 100%;
   min-height: 32px;
   padding: 5px 8px;
   border: 1px solid #cfd8d0;
   border-radius: 3px;
   background: #ffffff;
   color: var(--text);
   font: inherit;
   font-size: 13px;
   line-height: 1.25;
}

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

.edit-form textarea {
   min-height: 38px;
   height: 38px;
   resize: vertical;
   overflow: auto;
}

.edit-form textarea.tall-textarea {
   min-height: 200px;
   height: 200px;
}

.multi-select-row {
   display: flex;
   align-items: flex-start;
   gap: 8px;
}

.multi-select-row .multi-select {
   flex: 1 1 auto;
   min-width: 0;
}

.multi-select-clear {
   flex: 0 0 auto;
   min-height: 32px;
   padding: 5px 12px;
   border: 1px solid var(--line);
   border-radius: 3px;
   background: #ffffff;
   color: var(--text);
   font: inherit;
   font-size: 13px;
   font-weight: 700;
   line-height: 1.25;
   cursor: pointer;
}

.multi-select-clear:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.multi-select-clear:not(:disabled):hover,
.multi-select-clear:not(:disabled):focus-visible {
   border-color: var(--accent);
   outline: none;
}

.form-actions {
   display: flex;
   align-items: center;
   justify-content: flex-end;
   gap: 10px;
}

.check-row {
   display: flex;
   align-items: center;
   gap: 6px;
   margin: 0;
   height: 32px;
}

.check-row input {
   width: 16px;
   min-height: 16px;
}

.login-panel {
   max-width: 420px;
   margin: 40px auto;
}

@media (max-width: 720px) {
   .page-heading-row,
   .form-actions {
      align-items: flex-start;
      flex-direction: column;
   }

   .index-heading {
      flex-direction: column;
   }

   .date-select {
      width: 100%;
      max-width: 360px;
   }

   .site-header {
      align-items: stretch;
      flex-direction: column;
      padding: 10px 16px;
   }

   .site-header-main {
      align-items: flex-start;
      flex-direction: column;
      gap: 8px;
   }

   .admin-card-grid,
   .admin-layout,
   .proposal-summary,
   .form-grid {
      grid-template-columns: 1fr;
   }

   .activity-agenda-section {
      grid-template-columns: 125px minmax(0, 1fr);
      gap: 8px;
      align-items: start;
   }

   .activity-agenda-time {
      padding-top: 2px;
   }

   .activity-agenda-items {
      padding-left: 10px;
   }

   h1 {
      font-size: 28px;
   }
}

.ses-expand {
   width: 100% !important;
   text-align: center !important;
}

.ses-expand > button {
   width: 100% !important;
}

.ses-icon-search {
   display: inline-block;
   width: 0.85em;
   height: 0.85em;
   border: 0.14em solid currentColor;
   border-radius: 50%;
   position: relative;
   box-sizing: border-box;
}

   .ses-icon-search::after {
      content: "";
      position: absolute;
      width: 0.45em;
      height: 0.14em;
      background: currentColor;
      right: -0.34em;
      bottom: -0.12em;
      transform: rotate(45deg);
   }

.ses-entity-search-link {
   display: inline-flex;
   align-items: center;
   margin-left: 0.45rem;
   line-height: 1;
}

.ses-nowrap {
   text-wrap: nowrap;
}
