:root {
  color-scheme: light;
  --ink: #182e42;
  --muted: #5e6d7a;
  --navy: #132e43;
  --accent: #145d7d;
  --border: #dce3e9;
  --paper: #fff;
  --background: #f5f7f9;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #0d4057; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #247ac1; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.035em; line-height: 1.25; font-weight: 650; margin-bottom: .7rem; overflow-wrap: anywhere; }
h2 { font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.4; }
h3 { font-size: 1rem; line-height: 1.5; }
.site-header { background: var(--navy); color: white; }
.header-inner { max-width: 1360px; margin: auto; padding: 1.2rem 2.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: white; display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; line-height: 1.25; text-decoration: none; font-weight: 650; }
.brand:hover { color: white; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #88a2b5; border-radius: 8px; background: #ffffff0a; font-size: 1.45rem; }
.brand-subtitle { display: block; color: #bed0dd; font-size: .72rem; font-weight: 450; letter-spacing: .045em; margin-top: .2rem; }
.environment-label { color: #d0dce5; font-size: .8rem; }
.page-shell { max-width: 1360px; margin: auto; padding: 2.5rem; min-height: 75vh; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.7rem; }
.eyebrow { text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin-bottom: .55rem; }
.subtitle { color: var(--muted); margin-bottom: 0; max-width: 42rem; }
.button { display: inline-flex; gap: .5rem; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid transparent; padding: .65rem 1rem; font-size: .85rem; font-weight: 600; line-height: 1.4; text-decoration: none; min-height: 42px; white-space: nowrap; }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { color: white; background: #0e4862; }
.button-secondary { background: var(--paper); border-color: #cbd5de; color: var(--ink); }
.button-secondary:hover { background: #edf2f6; color: var(--ink); }
.filter-panel { padding: 1.3rem 1.5rem; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.filter-primary { display: grid; grid-template-columns: minmax(250px, 2fr) minmax(135px, 1fr) minmax(190px, 1fr) auto; gap: 1rem; align-items: end; }
label { display: block; font-size: .8rem; font-weight: 600; }
input, select { display: block; width: 100%; min-width: 0; color: var(--ink); background: var(--paper); border: 1px solid #bfcbd5; border-radius: 5px; padding: .6rem .75rem; min-height: 42px; margin-top: .35rem; font-size: .875rem; }
input::placeholder { color: #697887; }
.additional-filters { margin-top: 1rem; }
summary { cursor: pointer; color: var(--muted); font-size: .8rem; font-weight: 600; width: fit-content; }
.filter-secondary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-top: 1rem; }
.clear-filters { display: inline-block; margin-top: .8rem; font-size: .8rem; }
.results-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 1.7rem 0 .8rem; color: var(--muted); font-size: .8rem; }
.results-heading p { margin: 0; }
.results-heading strong { color: var(--ink); }
.results-heading > span { font-size: .75rem; }
.table-panel { border: 1px solid var(--border); border-radius: 10px; background: var(--paper); overflow: hidden; }
.project-table { width: 100%; border-collapse: collapse; }
.project-table th { background: #edf2f6; color: #5e6e7c; font-weight: 600; text-align: left; padding: .8rem 1rem; font-size: .73rem; white-space: nowrap; }
.project-table td { padding: 1.1rem 1rem; border-top: 1px solid #e6ebf0; font-size: .8rem; vertical-align: middle; }
.project-table tbody tr:hover { background: #f8fafc; }
.project-cell { width: 37%; }
.project-title { color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; line-height: 1.45; display: block; overflow-wrap: anywhere; }
.project-title:hover { color: var(--accent); text-decoration: underline; }
.application-id { display: block; font-size: .7rem; color: var(--muted); margin-top: .35rem; overflow-wrap: anywhere; }
.data-note { display: block; font-size: .7rem; color: #805608; margin-top: .25rem; }
.class-tag { display: inline-block; font-size: .7rem; font-weight: 650; background: #edf2f6; color: #41596b; border: 1px solid #dce5ec; border-radius: 4px; padding: .18rem .45rem; white-space: nowrap; }
.date-cell { font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 5px; font-size: .72rem; font-weight: 600; line-height: 1.5; }
.decision-accepted { background: #e4f3ed; color: #216344; }
.decision-rejected { background: #fbe9ec; color: #923b4a; }
.decision-conditionally_accepted { background: #fff1d7; color: #775409; }
.decision-unavailable { background: #edf0f3; color: #596774; }
.status-label { font-size: .72rem; color: var(--muted); }
.status-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #75988a; display: inline-block; margin-right: .4rem; vertical-align: middle; }
.status-retry_pending::before { background: #bc8733; }
.status-failed_final::before { background: #ac5a68; }
.status-unavailable::before { background: #8695a2; }
.open-link { text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .75rem; }
.open-link:hover { text-decoration: underline; }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .8rem; color: var(--muted); }
.pagination > div { display: flex; gap: .5rem; }
.empty-state { background: white; border: 1px solid var(--border); padding: 3rem 1.5rem; border-radius: 10px; text-align: center; }
.empty-state p { color: var(--muted); max-width: 38rem; margin: 0 auto 1.5rem; }
.empty-mark { display: block; font-size: 2rem; color: #91a5b5; margin-bottom: .5rem; }
.error-state { margin: 3rem auto; max-width: 50rem; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 0 1rem; position: sticky; top: 0; z-index: 2; background: var(--background); }
.back-link { font-size: .85rem; font-weight: 600; text-decoration: none; }
.report-header { padding: 1rem 0 1.5rem; max-width: 65rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; color: var(--muted); font-size: .8rem; margin-top: 1rem; }
.project-meta .application-id { font-size: .8rem; margin-top: 0; }
.decision-line { display: flex; gap: .75rem; align-items: center; margin-top: 1.3rem; font-size: .85rem; }
.decision-line .badge { font-size: .8rem; }
.notice { background: #fff7e7; color: #71561e; padding: .85rem 1rem; border: 1px solid #ecdcb6; border-radius: 6px; font-size: .85rem; overflow-wrap: anywhere; }
.notice a { color: #705317; }
.revision-panel { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.revision-panel p { margin: 0; font-size: .75rem; }
.revision-form { display: flex; align-items: end; gap: .65rem; min-width: 0; }
.revision-form label { min-width: 0; }
.revision-form select { max-width: 33rem; }
.section-heading { margin: 2rem 0 1rem; }
.section-heading h2 { margin-bottom: .2rem; }
.section-heading p { color: var(--muted); font-size: .8rem; margin: 0; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.answer-card { background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.4rem; }
.answer-number { float: right; color: #627d8f; font-size: .75rem; margin-left: .5rem; }
.answer-card h3 { margin-bottom: .6rem; font-weight: 600; }
.answer-card p { color: #4c606f; font-size: .9rem; margin-bottom: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-wide { grid-column: 1 / -1; }
.report-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.report-contents { position: sticky; top: 5rem; font-size: .8rem; max-height: calc(100vh - 7rem); overflow-y: auto; padding: .8rem 0; }
.report-contents summary { color: var(--ink); margin-bottom: .65rem; }
.report-contents ul { list-style: none; padding-left: 0; margin: 0; }
.report-contents ul ul { padding-left: .8rem; border-left: 1px solid #dce3e9; margin-left: .2rem; }
.report-contents li { margin: .5rem 0; line-height: 1.5; }
.report-contents a { text-decoration: none; color: var(--muted); }
.report-contents a:hover { color: var(--accent); text-decoration: underline; }
.report-contents > a { display: inline-block; margin-top: 1rem; }
.markdown-report { min-width: 0; background: white; border: 1px solid var(--border); border-radius: 8px; padding: 2.5rem; line-height: 1.8; overflow-wrap: anywhere; }
.markdown-report h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.markdown-report h2 { font-size: 1.25rem; border-bottom: 1px solid #e4eaf0; padding-bottom: .45rem; margin-top: 2rem; }
.markdown-report h3 { margin-top: 1.7rem; }
.markdown-report :is(h1, h2, h3, h4, h5, h6), #answers-heading { scroll-margin-top: 5rem; }
.markdown-report p { margin-bottom: 1rem; }
.markdown-report table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5rem 0; font-size: .8rem; line-height: 1.6; }
.markdown-report th, .markdown-report td { border: 1px solid #dbe3ea; padding: .65rem .8rem; text-align: left; }
.markdown-report th { background: #f0f4f7; }
.markdown-report pre { overflow-x: auto; border: 1px solid #dce3e9; border-radius: 5px; background: #f5f7f9; padding: 1rem; }
.markdown-report code { font-size: .85em; background: #eff3f6; border-radius: 3px; padding: .15rem .3rem; }
.markdown-report pre code { padding: 0; background: none; }
.markdown-report blockquote { border-left: 3px solid #9db9cc; padding-left: 1rem; margin-left: 0; color: var(--muted); }
.muted { color: var(--muted); }
.site-footer { max-width: 1360px; margin: auto; padding: 1.5rem 2.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .7rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 10; background: white; padding: 1rem; }
@media (max-width: 1100px) {
  .filter-primary { grid-template-columns: 2fr 1fr 1.4fr; }
  .filter-submit { grid-column: 1 / -1; justify-self: start; }
  .project-table th, .project-table td { padding-left: .7rem; padding-right: .7rem; }
  .project-cell { width: 30%; }
  .revision-panel { align-items: start; flex-direction: column; }
  .report-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .markdown-report { padding: 1.7rem; }
}
@media (max-width: 800px) {
  .header-inner, .page-shell, .site-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .filter-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .filter-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .project-table, .project-table tbody { display: block; }
  .project-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; border-top: 1px solid var(--border); }
  .project-table tr:first-child { border-top: 0; }
  .project-table td { display: block; border: 0; padding: .5rem; }
  .project-table td::before { content: attr(data-label); display: block; font-size: .65rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; }
  .project-table .project-cell { grid-column: 1 / -1; width: auto; }
  .project-table .project-cell::before, .project-table .row-action::before { display: none; }
  .project-table .row-action { grid-column: 1 / -1; }
  .answer-grid { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .report-contents { position: static; max-height: none; border: 1px solid var(--border); border-radius: 6px; padding: 1rem; }
  .results-heading > span { display: none; }
}
@media (max-width: 480px) {
  .page-shell { padding-top: 1.5rem; }
  .environment-label { max-width: 7rem; text-align: right; font-size: .7rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .filter-panel { padding: 1rem; }
  .filter-primary, .filter-secondary { grid-template-columns: 1fr; }
  .revision-form { flex-direction: column; align-items: stretch; width: 100%; }
  .revision-form select { width: 100%; }
  .report-toolbar .button { font-size: .75rem; padding: .65rem .7rem; }
  .markdown-report { padding: 1.1rem; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
