:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1b302e;
  background: #f5f7f4;
  --muted: #50645f;
  --line: #dce5df;
  --accent: #1b6455;
  --surface: #fff;
  font-size: 15px;
  scrollbar-color: #9db5aa #edf2ef;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, textarea, select { font: inherit; }
button, a, summary, select { -webkit-tap-highlight-color: transparent; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid #288571; }
::selection { background: #cde9df; color: #123b32; }
a { color: var(--accent); text-underline-offset: .2em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.55; }
.frame { width: calc(100% - 64px); margin-inline: auto; }
.masthead { background: #153331; color: #fff; }
.masthead-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.brand-mark { background: #c9e9d8; color: #153331; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; }
.brand-mark svg { width: 29px; height: 29px; }
.brand small { display: block; color: #bdcec8; margin-top: 4px; font-size: 11px; font-weight: 500; letter-spacing: .015em; }
.version { color: #b9dfcc; font-size: 12px; margin-left: 7px; }
.demo { position: relative; z-index: 2; }
.demo summary { list-style: none; display: flex; align-items: center; gap: 8px; border: 1px solid #567773; border-radius: 6px; padding: 8px 10px; color: #ebf5f0; font-size: 12px; white-space: nowrap; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary:hover { background: #244743; }
.demo summary svg { width: 14px; height: 14px; }
.demo-dot { width: 6px; height: 6px; border-radius: 50%; background: #c8e2a9; }
.demo-options { position: absolute; width: min(280px, calc(100vw - 32px)); right: 0; top: calc(100% + 9px); background: var(--surface); color: #1b302e; border: 1px solid var(--line); border-radius: 10px; padding: 13px; }
.demo-options p { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.demo-options button { width: 100%; display: block; text-align: left; background: transparent; border: 0; color: var(--accent); padding: 8px 3px; font-size: 13px; }
.demo-options button:hover { background: #eef6f2; }
main { padding-block: 45px 56px; }
.intro { margin-bottom: 30px; }
h1 { font-size: clamp(1.9rem, 4vw, 2.83rem); font-weight: 730; letter-spacing: -.036em; line-height: 1.12; overflow-wrap: anywhere; }
h1[tabindex="-1"]:focus { outline: none; }
.intro p { color: var(--muted); margin-top: 10px; }
.views { display: flex; align-items: stretch; gap: 26px; border-bottom: 1px solid #ceddd3; margin-bottom: 18px; }
.views button { position: relative; background: transparent; border: 0; color: var(--muted); font-weight: 630; padding: 0 2px 12px; display: flex; align-items: center; gap: 8px; }
.views button:hover, .views [aria-current] { color: var(--accent); }
.views [aria-current]::after { content: ''; position: absolute; height: 3px; inset: auto 0 -1px; background: var(--accent); border-radius: 2px 2px 0 0; }
.views span { font-size: 12px; border-radius: 5px; background: #e8efea; color: #3e5a50; min-width: 23px; padding: 3px 5px; text-align: center; font-variant-numeric: tabular-nums; }
.views [aria-current] span { background: #dcefe5; color: #185749; }
.listing { background: var(--surface); border: 1px solid #d5e1d9; border-radius: 13px; overflow: clip; }
.filters { padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; }
.search { display: flex; align-items: center; width: min(100%, 355px); position: relative; }
.search svg { position: absolute; left: 12px; color: #58766b; pointer-events: none; }
.search input, .filter select { height: 42px; background: var(--surface); border: 1px solid #c9d8ce; border-radius: 7px; color: #243d37; }
.search input { padding: 0 12px 0 39px; width: 100%; min-width: 0; }
.search input::placeholder { color: #54695f; }
.filter select { padding: 0 28px 0 11px; max-width: 100%; }
.results { border-collapse: collapse; width: 100%; table-layout: fixed; text-align: left; }
.results th { background: #eff4f0; border-block: 1px solid var(--line); color: #465e54; font-size: 12px; font-weight: 680; padding: 11px 12px; }
.results td { padding: 16px 12px; border-bottom: 1px solid #e6ede8; vertical-align: middle; }
.results tr:last-child td { border-bottom: 0; }
.results tbody tr:hover { background: #f9fbf9; }
.results th:first-child, .results td:first-child { padding-left: 20px; width: 36%; }
.results th:nth-child(2) { width: 22%; }
.results th:nth-child(3) { width: 17%; }
.results th:nth-child(4) { width: 13%; }
.results th:last-child, .results td:last-child { text-align: right; padding-right: 20px; }
.document-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pdf-icon { width: 34px; height: 40px; border: 1px solid #d8e5de; border-radius: 6px; background: #f2f7f3; color: #447665; display: grid; place-items: center; flex: none; }
.document-cell strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.document-cell small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 660; line-height: 1.3; border-radius: 5px; padding: 5px 8px; }
.tag::before, .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.approve { color: #175c46; background: #e5f4eb; }
.reject { color: #963e31; background: #f9eae5; }
.uncertain { color: #724e13; background: #f8efda; }
.none { color: #52655d; background: #edf1ef; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #405a50; }
.status-correction, .status-failed { color: #8a4231; }
.status-running { color: #365c8a; }
.status-approved { color: #1b6855; }
.received { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.button, .open { display: inline-flex; justify-content: center; align-items: center; gap: 7px; font-weight: 650; color: var(--accent); border: 1px solid #cadbd0; background: var(--surface); text-decoration: none; border-radius: 7px; padding: 9px 12px; font-size: 13px; min-height: 38px; }
.open svg { width: 15px; height: 15px; }
.button:hover, .open:hover { background: #edf5f0; border-color: #a8c6b8; }
.primary { color: #fff; background: #1b6455; border-color: #1b6455; }
.primary:hover { background: #144d42; border-color: #144d42; }
.list-message { text-align: center; color: var(--muted); padding: 49px 18px; border-top: 1px solid var(--line); }
.list-message .button { display: flex; width: fit-content; margin: 15px auto 0; }
.listing-foot { color: var(--muted); font-size: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fbfdfb; }
.back { color: var(--accent); background: transparent; border: 0; padding: 7px 0; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.back svg { width: 17px; height: 17px; }
.detail-head { margin-bottom: 22px; }
.detail-head h1 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
.detail-head p { color: var(--muted); margin-top: 7px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); align-items: start; gap: 21px; }
.sheet { border: 1px solid #d5e1d9; background: var(--surface); border-radius: 13px; min-width: 0; }
.viewer-header { padding: 15px 17px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px; }
.sheet h2 { font-size: 17px; letter-spacing: -.02em; }
.viewer-body { min-height: 530px; background: #e4ebe6; border-radius: 0 0 12px 12px; display: grid; place-items: center; color: var(--muted); align-content: center; }
.pdf-page { width: 100%; max-height: 530px; overflow: auto; padding: 17px; }
.pdf-page canvas { display: block; width: auto; max-width: 100%; height: auto; margin: auto; background: #fff; box-shadow: 0 3px 12px #15333118; }
.page-nav { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; border-top: 1px solid #d1ded6; width: 100%; font-size: 13px; }
.viewer-body p { padding: 16px; }
.review-section { padding: 17px; border-bottom: 1px solid var(--line); }
.review-section:last-child { border-bottom: 0; }
.review-section p, .review-section ul { margin-top: 8px; color: var(--muted); font-size: 14px; }
.review-section ul { padding-left: 18px; margin-bottom: 0; }
.review-section li + li { margin-top: 6px; }
.review-section .tag { margin-top: 9px; }
.review-section .status { font-weight: 630; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-section textarea { width: 100%; border: 1px solid #c9d8ce; border-radius: 7px; min-height: 86px; resize: vertical; padding: 9px; margin-top: 10px; color: #1b302e; caret-color: var(--accent); }
.review-section input[type=file] { max-width: 100%; margin-block: 7px 10px; }
.review-section label { display: block; margin-top: 10px; font-size: 13px; }
.history { margin-top: 14px; }
.history summary { font-weight: 650; color: #264b41; }
.history button { margin: 7px 6px 0 0; }
.note-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.toast { position: fixed; inset: auto 24px 24px auto; max-width: min(440px, calc(100vw - 48px)); z-index: 5; padding: 13px 16px; border-radius: 8px; background: #153331; color: #fff; box-shadow: 0 7px 25px #15333125; }
.toast.error { background: #793b32; }
.access-panel { max-width: 500px; padding: 24px; }
.access-panel h1 { font-size: clamp(1.55rem, 4vw, 2.15rem); }
.access-panel p { margin-top: 10px; color: var(--muted); }
.access-panel form { margin-top: 20px; display: grid; gap: 8px; }
.access-panel label { font-size: 14px; font-weight: 650; }
.access-panel input { min-height: 44px; width: 100%; margin-bottom: 7px; border: 1px solid #c9d8ce; border-radius: 7px; padding: 8px 10px; }
.access-panel .button { justify-self: start; min-height: 44px; }
#post-list { display: grid; gap: 8px; margin-top: 16px; }
#posts-back, #session-retry { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 950px) {
  .frame { width: calc(100% - 44px); }
  .results th:first-child { width: 34%; }
  .results th:nth-child(2) { width: 23%; }
  .results th:nth-child(3) { width: 19%; }
  .results th:nth-child(4) { width: 11%; }
  .pdf-icon { width: 28px; }
  .document-cell { gap: 8px; }
}
@media (max-width: 730px) {
  .frame { width: calc(100% - 32px); }
  .masthead-inner { min-height: 66px; }
  .brand { gap: 7px; font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark svg { width: 24px; height: 24px; }
  main { padding-top: 29px; }
  .intro { margin-bottom: 24px; }
  .filters { flex-direction: column; padding: 12px 13px; }
  .search { width: 100%; }
  .filter select { width: 100%; }
  .results, .results tbody { display: block; }
  .results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .results tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 8px; padding: 13px; border-top: 1px solid var(--line); }
  .results tbody td, .results tbody td:first-child, .results tbody td:last-child { display: block; padding: 0; border: 0; width: auto; min-width: 0; text-align: left; }
  .results tbody td:first-child { grid-column: 1 / -1; }
  .results tbody td:last-child { grid-column: 2; grid-row: 2 / 4; align-self: center; }
  .results tbody td:nth-child(4) { grid-row: 4; }
  .document-cell { gap: 9px; }
  .pdf-icon { height: 34px; width: 29px; }
  .listing-foot { padding-inline: 13px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .viewer-body { min-height: 310px; }
  .pdf-page { max-height: 390px; padding: 11px; }
}
