:root {
  --mof-black: #050505;
  --mof-ink: #111111;
  --mof-paper: #efeee8;
  --mof-surface: #ffffff;
  --mof-line: #aaa8a0;
  --mof-line-soft: #d4d1c9;
  --mof-muted: #66645f;
  --mof-orange: #ff7a00;
  --mof-orange-soft: #fff0e1;
  --mof-green: #129765;
  --mof-red: #c63e3e;
  --mof-red-soft: #fae9e9;
  --mof-yellow: #b66b00;
  --mof-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --mof-sans: Inter, "Arial Narrow", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--mof-paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--mof-ink);
  background: var(--mof-paper);
  font-family: var(--mof-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select { font: inherit; }

button,
select { cursor: pointer; }

button:disabled { cursor: not-allowed; }

.loading-mask {
  position: fixed;
  z-index: 11000;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: #ffffff;
  background: rgba(5, 5, 5, .95);
  font: 800 11px/1.3 var(--mof-mono);
  letter-spacing: .9px;
  text-transform: uppercase;
}

.loading-mask__bar {
  position: relative;
  width: min(280px, 72vw);
  height: 4px;
  overflow: hidden;
  background: #353535;
}

.loading-mask__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 40%;
  background: var(--mof-orange);
  animation: mof-loading 1s ease-in-out infinite;
}

@keyframes mof-loading {
  50% { transform: translateX(250%); }
  100% { transform: translateX(500%); }
}

.mof-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: var(--mof-black);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  border-bottom: 6px solid var(--mof-orange);
}

.mof-hero::after {
  content: "MOF / 03";
  position: absolute;
  right: max(20px, calc((100vw - 1480px) / 2));
  bottom: -14px;
  color: rgba(255, 255, 255, .055);
  font: 900 clamp(56px, 8vw, 118px)/.85 var(--mof-mono);
  letter-spacing: -7px;
  pointer-events: none;
}

.mof-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 48px));
  min-height: 272px;
  margin: 0 auto;
  padding: 43px 0 37px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(440px, .7fr);
  align-items: end;
  gap: 64px;
}

.mof-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  color: var(--mof-orange);
  font: 900 10px/1 var(--mof-mono);
  letter-spacing: 1.3px;
}

.mof-kicker__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 13px;
  color: #b6b6b6;
  border-left: 1px solid #565656;
}

.mof-kicker__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mof-green);
  box-shadow: 0 0 0 4px rgba(18, 151, 101, .16);
}

.mof-hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(36px, 4.5vw, 66px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -2.5px;
}

.mof-hero__copy > p {
  max-width: 780px;
  margin: 22px 0 0;
  color: #b8b8b8;
  font-size: 14px;
  line-height: 1.75;
}

.hero-side {
  display: grid;
  gap: 14px;
}

.health {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  color: #ffffff;
  background: #161616;
  border: 1px solid #494949;
  border-left: 4px solid #777777;
}

.health__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8d8d8d;
}

.health strong,
.health span { display: block; }

.health strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.health div span {
  margin-top: 5px;
  color: #a8a8a8;
  font: 700 9px/1.4 var(--mof-mono);
}

.health--ok {
  border-left-color: var(--mof-green);
}

.health--ok .health__dot {
  background: var(--mof-green);
  box-shadow: 0 0 0 5px rgba(18, 151, 101, .14);
}

.health--error {
  border-left-color: var(--mof-red);
}

.health--error .health__dot {
  background: var(--mof-red);
  box-shadow: 0 0 0 5px rgba(198, 62, 62, .14);
}

.mof-hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #4d4d4d;
}

.mof-hero__meta > div {
  min-width: 0;
  min-height: 68px;
  padding: 12px 13px 10px;
  border-right: 1px solid #353535;
  border-bottom: 1px solid #353535;
}

.mof-hero__meta > div:first-child { padding-left: 0; }
.mof-hero__meta > div:last-child { border-right: 0; }

.mof-hero__meta dt {
  margin-bottom: 8px;
  color: #858585;
  font: 800 8px/1.2 var(--mof-mono);
  letter-spacing: .4px;
}

.mof-hero__meta dd {
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.mof-hero__meta time { font-family: var(--mof-mono); }

.mof-main {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.mof-section { margin-bottom: 26px; }

.section-heading,
.workspace-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.section-heading { margin-bottom: 13px; }

.section-heading__index {
  display: block;
  margin-bottom: 6px;
  color: var(--mof-orange);
  font: 900 9px/1.2 var(--mof-mono);
  letter-spacing: .8px;
}

.section-heading h2,
.workspace-panel__head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.45px;
}

.section-heading > p {
  margin: 0;
  color: var(--mof-muted);
  font: 700 9px/1.4 var(--mof-mono);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--mof-line);
  border-left: 1px solid var(--mof-line);
  background: var(--mof-surface);
}

.summary-metric {
  position: relative;
  min-height: 156px;
  padding: 21px 22px 18px;
  background: var(--mof-surface);
  border-right: 1px solid var(--mof-line);
  border-bottom: 1px solid var(--mof-line);
}

.summary-metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--mof-ink);
}

.summary-metric--primary::before { background: var(--mof-orange); }
.summary-metric--archive::before { background: #77746d; }
.summary-metric--pending::before { background: var(--mof-red); }

.summary-metric__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #34332f;
  font-size: 12px;
  font-weight: 900;
}

.metric-code {
  color: #95928a;
  font: 800 8px/1.4 var(--mof-mono);
  letter-spacing: .45px;
}

.summary-metric strong {
  display: block;
  margin: 22px 0 8px;
  color: var(--mof-ink);
  font: 900 clamp(34px, 3vw, 48px)/.9 var(--mof-mono);
  letter-spacing: -2.3px;
}

.summary-metric--primary strong { color: var(--mof-orange); }
.summary-metric--pending strong { color: var(--mof-red); }

.summary-metric p {
  margin: 0;
  overflow: hidden;
  color: var(--mof-muted);
  font: 700 9px/1.4 var(--mof-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retention-note {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding: 18px 22px;
  color: #d4d4d4;
  background: var(--mof-ink);
  border-left: 6px solid var(--mof-orange);
}

.retention-note__flag {
  padding: 6px 8px;
  color: #000000;
  background: var(--mof-orange);
  font: 900 8px/1 var(--mof-mono);
  letter-spacing: .5px;
}

.retention-note h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.retention-note p {
  max-width: 990px;
  margin: 0;
  color: #a9a9a9;
  font-size: 11px;
  line-height: 1.65;
}

.retention-note a {
  color: var(--mof-orange);
  font: 900 9px/1.3 var(--mof-mono);
  text-decoration: none;
  white-space: nowrap;
}

.retention-note a:hover { color: #ffffff; }

.workspace-panel {
  border: 1px solid var(--mof-line);
  background: var(--mof-surface);
}

.workspace-panel__head {
  min-height: 84px;
  padding: 18px 22px;
  color: #ffffff;
  background: var(--mof-ink);
  border-bottom: 4px solid var(--mof-orange);
}

.workspace-panel__head h2 { color: #ffffff; }

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.workspace-actions > span {
  color: #c9c9c9;
  font: 800 10px/1 var(--mof-mono);
}

.workspace-actions button {
  min-height: 34px;
  padding: 0 12px;
  color: #000000;
  background: var(--mof-orange);
  border: 1px solid var(--mof-orange);
  font-size: 9px;
  font-weight: 900;
}

.workspace-actions button:hover {
  color: #ffffff;
  background: #242424;
  border-color: #ffffff;
}

.workspace-actions button.loading {
  opacity: .62;
  pointer-events: none;
}

.filters {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) 126px 132px 136px minmax(170px, .75fr) 112px auto;
  gap: 14px;
  align-items: end;
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--mof-line);
}

.filters label {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.control-label {
  color: var(--mof-muted);
  font: 900 8px/1 var(--mof-mono);
  letter-spacing: .65px;
  text-transform: uppercase;
}

.search__control {
  position: relative;
  display: block;
}

.filters input,
.filters select {
  width: 100%;
  height: 39px;
  color: var(--mof-ink);
  background: #ffffff;
  border: 1px solid var(--mof-line);
  border-radius: 0;
  outline: 0;
  font-size: 10px;
  font-weight: 800;
}

.filters input {
  padding: 0 66px 0 12px;
  font-size: 12px;
  font-weight: 500;
}

.filters select { padding: 0 30px 0 10px; }
.filters input::placeholder { color: #96938b; }

.clear-search {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  padding: 0 11px;
  color: var(--mof-muted);
  background: #f2f1ec;
  border: 0;
  border-left: 1px solid var(--mof-line-soft);
  font-size: 10px;
  font-weight: 800;
}

.clear-search:hover {
  color: #ffffff;
  background: var(--mof-ink);
}

.reset-btn {
  min-height: 39px;
  padding: 0 14px;
  color: var(--mof-ink);
  background: #e8e6df;
  border: 1px solid var(--mof-line);
  font-size: 10px;
  font-weight: 900;
}

.reset-btn:hover {
  color: #ffffff;
  background: var(--mof-ink);
  border-color: var(--mof-ink);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  scrollbar-color: #777 #eceae4;
  scrollbar-width: thin;
}

.table-wrap:focus-visible {
  outline: 3px solid rgba(255, 122, 0, .34);
  outline-offset: -3px;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th {
  height: 43px;
  padding: 0 12px;
  color: #ffffff;
  background: #090909;
  border-right: 1px solid #414141;
  border-bottom: 1px solid #414141;
  font: 900 10px/1.25 var(--mof-mono);
  letter-spacing: .3px;
  text-align: left;
  vertical-align: middle;
}

th:nth-child(1) { width: 10%; }
th:nth-child(2) { width: 25%; }
th:nth-child(3) { width: 17%; }
th:nth-child(4) { width: 29%; }
th:nth-child(5) { width: 12%; }
th:nth-child(6) { width: 7%; }

th:last-child,
td:last-child { border-right: 0; }

td {
  padding: 12px;
  color: #2a2926;
  background: #ffffff;
  border-right: 1px solid #dedbd4;
  border-bottom: 1px solid #d1cec6;
  font-size: 11px;
  line-height: 1.5;
  vertical-align: top;
}

tbody tr:nth-child(even) td { background: #f8f7f3; }
tbody tr:hover td { background: var(--mof-orange-soft); }

.decision-date {
  color: #272622;
  font: 900 10px/1.5 var(--mof-mono);
  white-space: nowrap;
}

.docno {
  margin-bottom: 6px;
  color: #8e4100;
  font: 800 9px/1.45 var(--mof-mono);
}

.title {
  display: -webkit-box;
  overflow: hidden;
  color: #161616;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.party {
  margin-bottom: 7px;
  color: #181714;
  font-size: 12px;
  font-weight: 900;
}

.agency {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 3px 6px;
  color: #4d4b46;
  background: #e9e7e0;
  border: 1px solid #c8c5bc;
  font-size: 9px;
  font-weight: 900;
}

.summary {
  display: -webkit-box;
  overflow: hidden;
  color: #45433e;
  font-size: 10px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.trace {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 7px;
  color: #86827a;
  border-top: 1px dashed #d2cfc7;
  font: 700 8px/1.35 var(--mof-mono);
}

.status-stack {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.pill {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid transparent;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.pill--active {
  color: #086b48;
  background: #e2f4ed;
  border-color: #99cfbc;
}

.pill--archive {
  color: #5d5a54;
  background: #e9e7e0;
  border-color: #c8c5bc;
}

.pill--enriched {
  color: #8e4100;
  background: var(--mof-orange-soft);
  border-color: #e9bb91;
}

.pill--base {
  color: #8b5200;
  background: #fff2dc;
  border-color: #e8c48f;
}

.source-link {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 9px;
  color: #000000;
  background: var(--mof-orange);
  border: 1px solid var(--mof-orange);
  font: 900 9px/1 var(--mof-mono);
  text-decoration: none;
  white-space: nowrap;
}

.source-link:hover {
  color: #ffffff;
  background: var(--mof-ink);
  border-color: var(--mof-ink);
}

.muted-dash { color: #a19e96; }

.table-message {
  height: 180px !important;
  color: var(--mof-muted) !important;
  background: #ffffff !important;
  text-align: center;
  vertical-align: middle !important;
}

.table-message strong {
  display: block;
  margin-bottom: 7px;
  color: var(--mof-ink);
  font-size: 14px;
}

.inline-retry {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin-top: 12px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--mof-ink);
  border: 1px solid var(--mof-ink);
  font-size: 10px;
  font-weight: 900;
}

.inline-retry:hover {
  color: #000000;
  background: var(--mof-orange);
  border-color: var(--mof-orange);
}

.pager {
  min-height: 64px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #f1f0eb;
  border-top: 1px solid var(--mof-line);
}

.pager > span {
  color: var(--mof-muted);
  font: 800 10px/1.4 var(--mof-mono);
}

.pager__buttons {
  display: flex;
  gap: 6px;
}

.pager button {
  min-width: 64px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--mof-ink);
  background: #ffffff;
  border: 1px solid var(--mof-line);
  font-size: 10px;
  font-weight: 900;
}

.pager button:hover:not(:disabled) {
  color: var(--mof-orange);
  background: var(--mof-ink);
  border-color: var(--mof-ink);
}

.pager button:disabled {
  color: #aaa79f;
  background: #e1dfd8;
  opacity: .75;
}

#toast {
  position: fixed;
  z-index: 12000;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 16px;
  color: #ffffff;
  background: var(--mof-ink);
  border-left: 5px solid var(--mof-orange);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .22);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(24px);
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

#toast.error { border-left-color: var(--mof-red); }

.site-footer {
  min-height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  color: #868686;
  background: var(--mof-black);
  border-top: 1px solid #333333;
  font: 700 9px/1.5 var(--mof-mono);
  letter-spacing: .25px;
}

.site-footer a {
  color: #aaaaaa;
  text-decoration: none;
}

.site-footer a:hover { color: var(--mof-orange); }

@media (max-width: 1280px) {
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .filters {
    grid-template-columns: minmax(320px, 1fr) repeat(3, minmax(126px, auto));
  }

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

@media (max-width: 980px) {
  .mof-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-side { grid-template-columns: 1fr; }

  .retention-note {
    grid-template-columns: auto 1fr;
  }

  .retention-note a { grid-column: 2; }

  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { grid-column: 1 / -1; }
  .sort-select { grid-column: auto; }
}

@media (max-width: 760px) {
  .mof-hero__inner,
  .mof-main {
    width: min(100% - 28px, 1480px);
  }

  .mof-hero__inner {
    min-height: auto;
    padding: 34px 0 30px;
  }

  .mof-hero h1 {
    font-size: clamp(34px, 10vw, 52px);
    letter-spacing: -1.7px;
  }

  .mof-main { padding-top: 26px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .summary-metric {
    min-height: 138px;
    padding: 18px 16px 15px;
  }

  .retention-note {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .retention-note__flag { justify-self: start; }
  .retention-note a { grid-column: auto; }

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

@media (max-width: 520px) {
  .mof-hero::after { display: none; }

  .mof-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .mof-kicker__live {
    padding-left: 0;
    border-left: 0;
  }

  .mof-hero__meta { grid-template-columns: 1fr; }

  .mof-hero__meta > div,
  .mof-hero__meta > div:first-child {
    min-height: auto;
    display: grid;
    grid-template-columns: 82px 1fr;
    padding: 11px 0;
    border-right: 0;
  }

  .mof-hero__meta dt { margin-bottom: 0; }

  .section-heading,
  .workspace-panel__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .workspace-actions {
    width: 100%;
    justify-content: space-between;
  }

  .summary-strip { grid-template-columns: 1fr 1fr; }

  .summary-metric {
    min-height: 126px;
    padding: 15px 13px 13px;
  }

  .summary-metric__head { display: block; }

  .metric-code {
    display: block;
    margin-top: 5px;
  }

  .summary-metric strong {
    margin: 15px 0 7px;
    font-size: 33px;
  }

  .retention-note { padding: 17px 15px; }
  .filters { padding: 15px; }

  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .pager__buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pager button {
    min-width: 0;
    padding: 0 5px;
  }

  .site-footer {
    align-items: center;
    flex-direction: column;
    gap: 3px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .loading-mask,
  .ky-shellbar,
  .filters,
  .pager,
  .retention-note,
  .workspace-actions button,
  .site-footer { display: none !important; }

  body.ky-ui {
    padding-top: 0 !important;
    background: #ffffff !important;
  }

  .mof-hero {
    color: #000000;
    background: #ffffff;
    border-bottom-color: #000000;
  }

  .mof-hero__copy > p,
  .mof-hero__meta dt,
  .mof-hero__meta dd { color: #000000; }

  .mof-main {
    width: 100%;
    padding: 20px 0;
  }

  table { min-width: 0; }
}
