:root {
  color-scheme: light;
  --brand-blue: #4473c5;
  --brand-red: #c10001;
  --brand-pale: #e1ebff;
  --navy: #20325c;
  --ink: #1d2738;
  --muted: #788397;
  --line: #e9edf3;
  --canvas: #f7f9fc;
  --white: #fff;
  font-family: 'Segoe UI', 'Trebuchet MS', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }

.app-frame { display: flex; width: min(1240px, 100%); min-height: 100vh; flex-direction: column; margin: 0 auto; border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.masthead { display: grid; min-height: 74px; grid-template-columns: 88px 1fr auto; align-items: stretch; border-bottom: 1px solid var(--navy); }
.brand-mark { display: grid; place-items: center; overflow: hidden; border-right: 1px solid var(--line); }
.brand-mark img { display: block; width: 78px; height: auto; mix-blend-mode: multiply; }
.brand-copy, .account-copy { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 20px; }
.brand-copy strong, .account-copy strong { color: var(--navy); font-size: 1rem; font-weight: 700; letter-spacing: .45px; }
.brand-copy span, .account-copy span { color: var(--muted); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; letter-spacing: .75px; }
.account-copy { min-width: 250px; border-left: 1px solid var(--line); }
.account-action { width: fit-content; padding: 0; border: 0; background: none; color: var(--brand-blue); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; letter-spacing: .75px; text-align: left; }
.account-action:disabled { color: var(--muted); cursor: wait; }
.status-message { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--brand-blue); background: var(--brand-pale); color: var(--navy); font-size: 1rem; line-height: 1.5; }
.status-message.is-error { border-color: var(--brand-red); }
.status-message[hidden] { display: none; }

.main-content { width: min(100%, 1120px); flex: 1; align-self: center; padding: 27px 28px 34px; }
.date-line, .micro-label, .list-columns, .list-caption, .detail-id, .project-footer { font-family: Consolas, 'Courier New', monospace; text-transform: uppercase; }
.date-line { margin-bottom: 20px; color: var(--muted); font-size: .875rem; letter-spacing: 1px; }
.intro { display: flex; min-height: 102px; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 0 21px; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 5vw, 2.625rem); font-weight: 400; letter-spacing: -1.7px; line-height: .96; }
.daily-count { width: min(36%, 300px); padding-bottom: 4px; }
.count-rule { height: 3px; margin-bottom: 11px; background: var(--brand-blue); }
.micro-label { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 400; letter-spacing: 1px; }
.count-line { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; color: var(--navy); }
.count-line strong { font-family: Consolas, 'Courier New', monospace; font-size: 1.5rem; font-weight: 400; }
.count-line span { font-size: 1rem; }

.section-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); }
.section-tab { position: relative; display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 8px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1rem; text-align: left; }
.section-tab:last-child { border-right: 0; }
.section-tab > span { color: var(--muted); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; }
.section-tab:hover { background: #eaf0f9; }
.section-tab.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--brand-blue); content: ''; }

.register { display: grid; min-height: 410px; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); }
.register[hidden] { display: none; }
.vendor-workspace { display: grid; min-height: 410px; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); }
.vendor-workspace[hidden] { display: none; }
.vendor-list { min-width: 0; padding: 20px 20px 17px 0; }
.vendor-view-toggle { display: flex; gap: 14px; padding: 12px 8px 4px; }
.vendor-view-toggle button { padding: 0 0 3px; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted); font-size: .875rem; }
.vendor-view-toggle button.is-active { border-color: var(--brand-blue); color: var(--navy); }
.vendor-view-toggle button span { color: inherit; font-family: Consolas, 'Courier New', monospace; }
.follow-up-row .row-main span { color: #64738d; }
.follow-up-detail { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.vendor-workspace .list-add { padding: 0 0 3px; border: 0; border-bottom: 1px solid #71809a; background: none; color: var(--brand-blue); font-size: 1rem; text-align: left; }
.vendor-workspace .list-add:disabled { color: var(--muted); cursor: default; }
.vendor-workspace .record-detail { padding-top: 23px; }
.vendor-detail-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.vendor-detail-section h3 { margin: 0 0 10px; color: var(--navy); font-size: 1rem; font-weight: 500; }
.vendor-detail-section p { color: #697993; font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.vendor-detail-section a { color: var(--brand-blue); overflow-wrap: anywhere; }
.vendor-quote { padding: 11px 0; border-top: 1px solid var(--line); }
.vendor-quote:first-of-type { border-top: 0; }
.vendor-quote-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--navy); }
.vendor-quote-heading strong { font-weight: 500; overflow-wrap: anywhere; }
.vendor-quote-meta { margin: 5px 0; color: #697993; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.vendor-quote-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vendor-quote-actions button { padding: 0 0 2px; border: 0; border-bottom: 1px solid #71809a; background: none; color: var(--brand-blue); font-size: .875rem; }
.vendor-quote-actions button:disabled { color: var(--muted); cursor: default; }
.vendor-due { color: var(--brand-red); font-weight: 600; }
.vendor-comparison { width: 100%; border-collapse: collapse; font-size: .875rem; }
.vendor-comparison th, .vendor-comparison td { padding: 7px 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.vendor-comparison th { color: var(--muted); font-weight: 500; }
.vendor-history { margin: 0; padding-left: 18px; color: #697993; font-size: .875rem; line-height: 1.6; }
.vendor-related-link { display: inline-block; margin-top: 5px; }
.vendor-follow-up-link { padding: 0 0 3px; border: 0; border-bottom: 1px solid #71809a; background: none; color: var(--brand-blue); font-size: .875rem; }
.vendor-operation-warning { margin: 14px 0; padding: 10px 12px; border-left: 3px solid #b46a00; background: #fff4dc; color: #5d3c00; font-size: .875rem; line-height: 1.5; }
.register-list { min-width: 0; padding: 20px 20px 17px 0; }
.list-toolbar { display: flex; min-height: 26px; align-items: flex-start; justify-content: space-between; gap: 15px; }
.list-toolbar .micro-label { color: #64738d; }
.search-control { width: min(220px, 48%); border-bottom: 1px solid var(--line); }
.search-control input { width: 100%; padding: 0 0 6px; border: 0; outline: 0; background: transparent; color: var(--navy); font-family: Consolas, 'Courier New', monospace; font-size: 1rem; letter-spacing: .3px; text-align: right; }
.search-control input::placeholder { color: #687a99; opacity: 1; }
.search-control:focus-within { border-color: var(--brand-blue); }
.archive-filter { display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 6px; color: #64738d; font-size: .875rem; }
.archive-filter input { accent-color: var(--brand-blue); }
.archive-filter[hidden] { display: none; }
.list-columns { display: grid; grid-template-columns: 35px minmax(0, 1fr) 95px; gap: 0; padding: 10px 8px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .875rem; letter-spacing: .8px; }
.list-columns span { min-width: 0; overflow-wrap: anywhere; }
.list-columns span:last-child { text-align: right; }
.record-list { min-height: 220px; }
.record-row { display: grid; width: 100%; min-height: 80px; grid-template-columns: 35px minmax(0, 1fr) 95px; align-items: center; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; background: transparent; color: var(--ink); text-align: left; transition: background .15s ease; }
.record-row:hover { background: #edf2f9; }
.record-row.is-selected { border-left-color: var(--brand-blue); background: var(--brand-pale); }
.row-number { color: var(--muted); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; }
.row-main { display: grid; min-width: 0; gap: 6px; }
.row-main strong { color: var(--navy); font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
.row-main span { color: #748198; font-size: .875rem; overflow-wrap: anywhere; }
.row-date { display: grid; min-width: 0; gap: 3px; justify-items: end; color: var(--navy); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; text-align: right; overflow-wrap: anywhere; }
.row-date span:last-child { color: var(--muted); font-family: 'Segoe UI', sans-serif; font-size: .875rem; }
.row-date .is-overdue { color: var(--brand-red) !important; }
.list-caption { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 15px 8px 0; color: var(--muted); font-size: .875rem; letter-spacing: .8px; }
.empty-list { padding: 24px 8px; color: var(--muted); font-size: 1rem; }

.record-detail { min-width: 0; padding: 23px 0 24px 24px; border-left: 1px solid var(--line); }
.detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-id { color: #64738d; font-size: .875rem; letter-spacing: .9px; overflow-wrap: anywhere; }
.add-button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; background: transparent; color: var(--brand-blue); font-size: 1.25rem; font-weight: 400; line-height: 1; }
.add-button:hover { background: var(--brand-pale); }
.detail-name { max-width: 320px; margin: 28px 0 8px; color: var(--navy); font-size: clamp(1.75rem, 3vw, 2rem); font-weight: 400; letter-spacing: -.7px; line-height: 1.1; overflow-wrap: anywhere; }
.detail-role, .detail-organization { margin: 0 0 4px; color: #697993; font-size: 1rem; overflow-wrap: anywhere; }
.detail-organization { color: var(--navy); }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-fact { min-width: 0; padding: 11px 9px 10px 0; }
.detail-fact + .detail-fact { padding-left: 12px; border-left: 1px solid var(--line); }
.detail-fact span, .agenda-label { display: block; margin-bottom: 7px; color: var(--muted); font-family: Consolas, 'Courier New', monospace; font-size: .875rem; letter-spacing: .85px; text-transform: uppercase; overflow-wrap: anywhere; }
.detail-fact strong { display: block; color: var(--navy); font-size: 1rem; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.agenda { padding: 17px 0 14px; border-bottom: 1px solid var(--line); }
.agenda-title { max-width: 300px; margin: 12px 0 10px; color: var(--navy); font-size: 1.125rem; font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
.agenda-link { padding: 0; border: 0; border-bottom: 1px solid #71809a; background: none; color: #4b5c77; font-size: 1rem; }
.agenda-link:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.detail-note { margin: 13px 0 0; color: #778398; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.detail-actions button, .list-add { padding: 0 0 3px; border: 0; border-bottom: 1px solid #71809a; background: none; color: var(--brand-blue); font-size: 1rem; text-align: left; }
.detail-actions button:hover, .list-add:hover { border-color: var(--brand-blue); }
.detail-actions button:disabled, .list-add:disabled { color: var(--muted); cursor: default; }
.list-caption { gap: 10px; align-items: center; }
.list-add { margin-left: auto; white-space: nowrap; }
.detail-note.is-error { color: var(--brand-red); }
.detail-empty { display: grid; min-height: 280px; align-content: center; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.detail-empty strong { color: var(--navy); font-weight: 500; }

.project-footer { display: grid; min-height: 60px; grid-template-columns: minmax(0, 1fr) 165px 145px; margin-top: auto; background: var(--navy); color: #fff; }
.project-footer > div { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 17px; border-right: 1px solid #ffffff3b; }
.project-footer > div:last-child { border-right: 0; }
.project-footer span { color: #c6d3e8; font-size: .875rem; letter-spacing: .7px; }
.project-footer strong { color: #fff; font-size: .875rem; font-weight: 500; letter-spacing: .3px; overflow-wrap: anywhere; }
.contact-dialog { position: fixed; width: min(400px, calc(100vw - 32px)); padding: 25px; border: 1px solid var(--line); background: var(--canvas); color: var(--ink); }
.contact-dialog::backdrop { background: #20325c70; }
.dialog-close-form { position: absolute; top: 10px; right: 10px; }
.dialog-close { border: 0; background: none; color: var(--navy); font-size: 1.375rem; }
.contact-dialog h2 { margin: 12px 0 4px; color: var(--navy); font-size: 1.5rem; font-weight: 400; }
.dialog-intro, .dialog-disclaimer { color: var(--muted); font-size: 1rem; line-height: 1.5; }
#record-form { display: grid; gap: 7px; margin-top: 20px; }
#form-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
#record-form label { margin-top: 5px; color: var(--navy); font-size: 1rem; }
#record-form input, #record-form select, #record-form textarea { width: 100%; min-width: 0; min-height: 42px; padding: 7px 8px; border: 1px solid #cbd3df; outline: none; background: var(--white); color: var(--ink); font: inherit; font-size: 1rem; }
#record-form textarea { min-height: 68px; resize: vertical; }
#record-form :is(input, select, textarea):focus { border-color: var(--brand-blue); }
.form-error { margin: 6px 0 0; color: var(--brand-red); font-size: 1rem; line-height: 1.5; }
.form-error[hidden] { display: none; }
.award-quote-summary { margin: 5px 0; padding: 10px; border-left: 3px solid var(--brand-blue); background: var(--brand-pale); color: var(--navy); font-size: 1rem; line-height: 1.5; }
.award-quote-summary[hidden] { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.plain-button, .solid-button { min-height: 40px; padding: 0 11px; border: 1px solid var(--line); background: transparent; color: var(--navy); font-size: 1rem; }
.solid-button { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
.dialog-disclaimer { margin: 13px 0 0; }
.toast { position: fixed; right: 18px; bottom: 60px; z-index: 20; max-width: min(350px, calc(100vw - 32px)); padding: 10px 13px; transform: translateY(10px); background: var(--navy); color: #fff; font-size: 1rem; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 720px) {
  .masthead { min-height: 66px; grid-template-columns: 68px minmax(0, 1fr) auto; }
  .brand-mark img { width: 62px; }
  .brand-copy { padding: 0 12px; }
  .account-copy { min-width: 145px; padding: 0 11px; }
  .main-content { padding: 22px 19px 28px; }
  .intro { min-height: 94px; }
  .register, .vendor-workspace { display: flex; flex-direction: column; }
  .register-list { padding: 16px 0 15px; }
  .vendor-list { padding: 16px 0 15px; }
  .record-list { min-height: 0; }
  .record-detail { min-height: 300px; padding: 17px 0 20px; border-top: 1px solid var(--navy); border-left: 0; }
  .detail-name { margin-top: 17px; }
}

@media (max-width: 560px) {
  .masthead { grid-template-columns: 57px minmax(0, 1fr); }
  .brand-mark { grid-row: span 2; }
  .brand-mark img { width: 54px; }
  .brand-copy { padding: 10px; }
  .account-copy { min-width: 0; padding: 8px 10px; border-top: 1px solid var(--line); border-left: 0; }
  .account-copy strong { overflow-wrap: anywhere; }
  .main-content { padding: 18px 14px 22px; }
  .date-line { margin-bottom: 16px; }
  .intro { min-height: 88px; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; }
  h1 { min-width: 0; flex: 1 1 140px; font-size: 2.125rem; overflow-wrap: anywhere; }
  .daily-count { min-width: 0; flex: 1 1 120px; }
  .count-rule { margin-bottom: 8px; }
  .count-line { flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
  .count-line strong { font-size: 1.375rem; }
  .section-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-tab { min-height: 48px; gap: 6px; padding: 8px; overflow-wrap: anywhere; }
  .section-tab:nth-child(2n) { border-right: 0; }
  .section-tab:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .section-tab:nth-child(5) { grid-column: 1 / -1; }
  .record-row { grid-template-columns: 35px minmax(0, 1fr) 85px; padding-right: 8px; padding-left: 7px; }
  .list-columns { grid-template-columns: 35px minmax(0, 1fr) 85px; padding-right: 8px; padding-left: 7px; }
  .project-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-project { grid-column: 1 / -1; border-bottom: 1px solid #ffffff3b; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
