:root {
  color-scheme: light;
  --ink: #18212a;
  --ink-soft: #39444f;
  --muted: #727d87;
  --navy: #122d3c;
  --navy-2: #1b3f51;
  --cream: #f4f2ec;
  --paper: #fffefa;
  --line: #e4e4df;
  --gold: #d6ae53;
  --gold-soft: #f3e9c9;
  --green: #557765;
  --shadow: 0 16px 48px rgba(23, 37, 44, .08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(214, 174, 83, .82); outline-offset: 3px; }
.eyebrow { margin: 0; color: #8c7750; font-size: 10px; font-weight: 750; letter-spacing: .16em; line-height: 1.5; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.brand small { display: block; margin-top: 3px; color: #879198; font-size: 8px; font-weight: 650; letter-spacing: .16em; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid #c9ad70; color: #a28448; font-family: Georgia, serif; font-size: 20px; font-weight: 400; letter-spacing: 0; }
.brand-row { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.brand-row img { display: block; height: 54px; object-fit: contain; padding: 0; border: 0; border-radius: 0; background: transparent; }
.brand-row-topbar { width: fit-content; justify-content: flex-start; }
.brand-logo-docstage { width: 178px; }
.brand-logo-st5 { width: 112px; padding: 0 !important; border: 0 !important; background: transparent !important; }
.brand-separator { display: block; width: 1px; height: 32px; flex: 0 0 1px; background: #d4bd7f; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 34px; background: #e9e8e2; }
.login-shell { display: grid; width: min(1080px, 100%); min-height: 650px; grid-template-columns: 1.04fr .96fr; overflow: hidden; background: var(--paper); box-shadow: 0 28px 80px rgba(29, 43, 48, .16); }
.login-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 58px 48px 42px; color: #1d3038; background: linear-gradient(145deg, #edf3ef, #dfeae4); }
.login-visual::after { position: absolute; right: -130px; bottom: 50px; width: 420px; height: 420px; border: 1px solid rgba(24, 56, 65, .12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(24,56,65,.025), 0 0 0 74px rgba(24,56,65,.02); content: ""; }
.login-message { position: relative; z-index: 1; max-width: 440px; margin-top: 20px; }
.login-message .eyebrow { color: #75663e; letter-spacing: 3px; }
.login-message h1 { max-width: 410px; margin: 18px 0 18px; color: #183340; font-family: Georgia, "Times New Roman", serif; font-size: clamp(37px, 4.3vw, 56px); font-weight: 400; letter-spacing: -.04em; line-height: 1.06; }
.login-message > p:last-child { max-width: 360px; color: #53686b; font-size: 14px; line-height: 1.8; }
.login-foot { position: relative; z-index: 1; color: #617579; font-size: 11px; letter-spacing: .05em; }
.login-panel { position: relative; z-index: 2; display: grid; place-items: center; padding: 48px; background: #fffefa; box-shadow: -18px 0 32px rgba(24, 48, 58, .14); }
.login-card { width: min(360px, 100%); }
.lock-icon { display: grid; width: 46px; height: 46px; margin-bottom: 28px; place-items: center; border: 1px solid #e2ded2; border-radius: 50%; background: #f8f5ec; }
.lock-icon svg { width: 21px; height: 21px; fill: none; stroke: #8d774b; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.login-card h2 { margin: 9px 0 8px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 33px; font-weight: 400; letter-spacing: -.025em; }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-form { display: grid; gap: 11px; margin-top: 29px; }
.login-form label { color: #46515a; font-size: 12px; font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; height: 49px; padding: 0 83px 0 14px; border: 1px solid #d9ddd9; border-radius: 3px; background: white; color: var(--ink); font-size: 14px; }
.password-wrap input:focus { border-color: #9a8352; outline: none; box-shadow: 0 0 0 3px rgba(214, 174, 83, .17); }
.show-password { position: absolute; top: 0; right: 0; height: 49px; padding: 0 13px; border: 0; background: transparent; color: #66747c; cursor: pointer; font-size: 11px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 49px; border: 0; border-radius: 2px; cursor: pointer; font-size: 12px; font-weight: 750; letter-spacing: .02em; transition: background .2s ease, transform .2s ease; }
.button-dark { margin-top: 5px; background: var(--navy); color: white; }
.button-dark:hover { transform: translateY(-1px); background: var(--navy-2); }
.button-dark:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-wide { width: 100%; }
.form-error { margin: 0; color: #a53f35; font-size: 12px; line-height: 1.5; }
.notice { display: grid; gap: 8px; margin-top: 24px; padding: 15px; border: 1px solid #e9ddbf; background: #fbf7e9; color: #62563c; font-size: 12px; line-height: 1.6; }
.notice code { color: #233e4b; font-size: 11px; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 27px 0 0; color: #8a9295; font-size: 10px; line-height: 1.5; }
.privacy-dot, .caption-dot, .secure-pill > span { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #648d72; }
.workspace-page { min-height: 100vh; background: #f5f4ef; }
.topbar { height: auto; padding: 25px 0; border-bottom: 1px solid #e8e7e1; background: #fffefa; }
.topbar-inner { display: flex; width: min(1500px, 100%); align-items: center; justify-content: space-between; margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.mobile-agenda-trigger, .agenda-close-button, .agenda-backdrop { display: none; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; color: #6e7e77; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.secure-pill > span { width: 6px; height: 6px; }
.topbar-divider { width: 1px; height: 24px; background: #e4e4df; }
.logout-button { padding: 8px 0; border: 0; background: transparent; color: #5d6970; cursor: pointer; font-size: 11px; font-weight: 700; }
.logout-button span { margin-left: 5px; color: #a58b57; }
.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 39px clamp(20px, 5vw, 72px) 22px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.welcome-row h1 { margin: 8px 0 7px; color: #193242; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 43px); font-weight: 400; letter-spacing: -.04em; }
.welcome-row h1 span { color: #b89856; }
.welcome-copy { margin: 0; color: #737f84; font-size: 15px; line-height: 1.6; }
.welcome-meta { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.meta-avatar { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid #d9d2c1; border-radius: 50%; color: #8d7544; font-family: Georgia, serif; font-size: 11px; }
.welcome-meta strong, .welcome-meta span { display: block; }
.welcome-meta strong { color: #34434c; font-size: 11px; }
.welcome-meta span { margin-top: 4px; color: #8a9396; font-size: 9px; }
.summary-strip { display: flex; align-items: center; gap: 14px; min-height: 69px; margin-bottom: 23px; padding: 12px 20px; border: 1px solid #e9e2d0; background: #faf8f1; }
.summary-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #f0e8d4; color: #937a47; font-size: 16px; }
.summary-strip > div:nth-child(2) { display: grid; gap: 5px; }
.summary-strip strong { color: #3c474c; font-family: Georgia, serif; font-size: 14px; font-weight: 400; }
.summary-strip span { color: #788185; font-size: 10px; line-height: 1.5; }
.summary-count { display: grid; justify-items: center; gap: 2px; margin-left: auto; padding-left: 22px; border-left: 1px solid #e7e0d0; }
.summary-count b { color: #5c5748; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.summary-count small { color: #92876d; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.workspace-grid { display: grid; grid-template-columns: minmax(245px, 294px) minmax(0, 1fr); gap: 21px; align-items: start; }
.issue-sidebar, .issue-detail { border: 1px solid #e7e7e1; background: var(--paper); }
.issue-sidebar { padding: 18px 14px 14px; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 14px; }
.sidebar-heading .eyebrow { font-size: 9px; }
.sidebar-heading h2 { margin: 4px 0 0; color: #243b47; font-family: Georgia, serif; font-size: 19px; font-weight: 400; }
.issue-total { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #f2ede0; color: #927b4e; font-family: Georgia, serif; font-size: 12px; }
.issue-list { display: grid; gap: 4px; }
.issue-item { display: grid; width: 100%; min-height: 53px; grid-template-columns: 29px 1fr 18px; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; transition: background .16s, border .16s; }
.issue-item:hover { border-color: #e8e5dc; background: #fbfaf6; }
.issue-item.is-active { border-color: #e9dfc7; background: #f8f4e9; }
.issue-number { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #e7e6df; border-radius: 50%; color: #899194; font-family: Georgia, serif; font-size: 10px; }
.issue-item.is-active .issue-number { border-color: #d9bf7e; background: #f0e6ca; color: #806a3e; }
.issue-copy { min-width: 0; }
.issue-copy strong { display: block; overflow: hidden; color: #35434a; font-size: 10px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; }
.issue-copy small { display: block; margin-top: 4px; color: #929a9a; font-size: 9px; }
.issue-arrow { color: #b1aa96; font-size: 14px; opacity: 0; transition: opacity .16s; }
.issue-item:hover .issue-arrow, .issue-item.is-active .issue-arrow { opacity: 1; }
.sidebar-note { display: flex; gap: 8px; margin-top: 14px; padding: 12px 8px 2px; border-top: 1px solid #edede8; }
.note-mark { display: grid; width: 15px; height: 15px; flex: 0 0 auto; place-items: center; border: 1px solid #d8d5ca; border-radius: 50%; color: #8d846d; font-family: Georgia, serif; font-size: 9px; }
.sidebar-note p { margin: 0; color: #8a9293; font-size: 9px; line-height: 1.55; }
.review-area { min-width: 0; }
.issue-detail { padding: 20px 23px 21px; box-shadow: 0 5px 18px rgba(37, 46, 48, .025); }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-kicker { color: #8e7950; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.clause-chip { padding: 5px 8px; border: 1px solid #e9e8e2; border-radius: 20px; color: #748087; font-size: 9px; }
.issue-detail h2 { margin: 9px 0 18px; color: #203949; font-family: Georgia, serif; font-size: 26px; font-weight: 400; letter-spacing: -.025em; }
.original-section { margin-bottom: 18px; }
.original-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.original-mark { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #f1ebdc; color: #917a4c; font-family: Georgia, serif; font-size: 12px; }
.original-note { color: #9a9b91; font-size: 9px; }
.original-clauses { display: grid; gap: 8px; }
.original-clause { padding: 12px 14px; border: 1px solid #ece8dc; border-left: 2px solid #d3b875; background: #fcfbf7; }
.original-clause h3 { margin: 0 0 7px; color: #88734a; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.original-clause-text { margin: 0; color: #59656a; font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.contract-highlight { padding: 1px 2px; border-radius: 2px; background: #f3df9e; color: #263944; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.detail-block { padding: 14px 15px; border: 1px solid #e8e8e2; }
.question-block { background: #fcfbf7; }
.proposal-block { border-color: #e2e9e4; background: #f7faf7; }
.block-label { display: flex; align-items: center; gap: 7px; color: #68757a; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.question-mark, .proposal-mark { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; font-family: Georgia, serif; font-size: 11px; }
.question-mark { background: #efe9db; color: #907b4e; }
.proposal-mark { background: #e5eee7; color: #597864; }
.detail-block > p { margin: 11px 0 0; color: #59656a; font-size: 14px; line-height: 1.65; white-space: pre-line; }
.prompt-box { margin-top: 13px; padding: 10px 11px; border-left: 2px solid #d3b875; background: #f7f3e8; }
.prompt-box span { color: #8a754a; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.prompt-box p { margin: 5px 0 0; color: #5f625c; font-family: Georgia, serif; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 25px; padding: 14px 1px 0; border-top: 1px solid #e7e6df; color: #929a9a; font-size: 8px; letter-spacing: .07em; }
.app-footer i { margin: 0 4px; color: #b8a16a; font-style: normal; }
@media (max-width: 1020px) {
  .topbar-inner { padding-right: 24px; padding-left: 24px; }
  .app-shell { padding-right: 24px; padding-left: 24px; }
  .workspace-grid { grid-template-columns: 255px minmax(0, 1fr); gap: 14px; }
  .issue-detail { padding: 17px; }
  .detail-columns { gap: 10px; }
  .detail-block { padding: 12px; }
}
@media (max-width: 780px) {
  .login-page { padding: 0; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; }
  .login-visual { min-height: 330px; padding: 42px 26px 28px; }
  .login-visual::after { right: -140px; bottom: -170px; width: 330px; height: 330px; }
  .login-message { margin: 45px 0 12px; }
  .login-message h1 { max-width: 450px; font-size: 39px; }
  .login-message > p:last-child { margin-bottom: 0; font-size: 12px; }
  .login-foot { margin-top: 27px; }
  .login-panel { padding: 44px 25px 55px; }
  .topbar { height: auto; padding: 15px 0 16px; }
  .topbar-inner { display: grid; grid-template-columns: 1fr; grid-template-areas: "controls" "brand"; gap: 12px; padding-right: 16px; padding-left: 16px; }
  .topbar-right { grid-area: controls; width: 100%; justify-content: space-between; gap: 10px; }
  .brand-row-topbar { grid-area: brand; width: 100%; justify-content: center; }
  .secure-pill { font-size: 8px; }
  .topbar-divider { display: none; }
  .topbar-right form { margin-left: auto; }
  .logout-button { padding: 6px 0; }
  .app-shell { padding: 26px 16px 18px; }
  .welcome-row { display: block; }
  .welcome-meta { margin-top: 15px; }
  .summary-strip { align-items: flex-start; padding: 13px; }
  .summary-count { display: none; }
  .mobile-agenda-trigger { display: block; margin: -8px 0 15px; }
  .agenda-open-button { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid #e6e0d1; border-radius: 2px; background: #fffefa; color: #34434c; cursor: pointer; text-align: left; box-shadow: 0 3px 10px rgba(37, 46, 48, .035); }
  .agenda-open-button > span:nth-child(2) { font-size: 11px; font-weight: 700; }
  .agenda-menu-icon { display: grid; width: 17px; gap: 4px; }
  .agenda-menu-icon i { display: block; height: 1.5px; border-radius: 2px; background: #8d7544; }
  .agenda-open-count { display: grid; width: 25px; height: 25px; margin-left: auto; place-items: center; border-radius: 50%; background: #f2ede0; color: #927b4e; font-family: Georgia, serif; font-size: 11px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .issue-sidebar { position: fixed; z-index: 1301; inset: 0 auto 0 0; display: flex; width: min(340px, 88vw); height: 100vh; height: 100dvh; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 21px 15px 16px; border: 0; background: var(--paper); box-shadow: 18px 0 42px rgba(23, 37, 44, .16); transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform 600ms cubic-bezier(.22,.75,.25,1), visibility 0s linear 600ms; }
  .issue-sidebar.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; transition: transform 600ms cubic-bezier(.22,.75,.25,1), visibility 0s; }
  .agenda-close-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; margin-left: 9px; place-items: center; border: 1px solid #e8e5dc; border-radius: 50%; background: #fffefa; color: #59656a; cursor: pointer; font-size: 23px; line-height: 1; }
  .sidebar-heading { justify-content: flex-start; padding-bottom: 16px; border-bottom: 1px solid #edede8; }
  .sidebar-heading > div { margin-right: auto; }
  .agenda-backdrop { position: fixed; z-index: 1300; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(18, 32, 40, .42); opacity: 0; cursor: default; transition: opacity 600ms ease; }
  .agenda-backdrop.is-visible { opacity: 1; }
  .agenda-backdrop[hidden] { display: none; }
  body.agenda-open { overflow: hidden; }
  .issue-list { display: grid; grid-template-columns: 1fr; }
  .issue-item { min-height: 58px; grid-template-columns: 24px 1fr 12px; gap: 6px; padding: 6px; }
  .issue-number { width: 23px; height: 23px; }
  .issue-copy strong { font-size: 9px; }
  .issue-copy small { font-size: 8px; }
  .sidebar-note { margin-top: auto; padding-top: 14px; }
  .detail-columns { grid-template-columns: 1fr; }
  .issue-detail h2 { font-size: 23px; }
}
@media (max-width: 430px) {
  .brand-row { gap: 7px; }
  .brand-row img { height: 42px; }
  .brand-logo-docstage { width: 138px; }
  .brand-logo-st5 { width: 82px; }
  .brand-separator { font-size: 22px; }
  .secure-pill { max-width: 72px; line-height: 1.3; }
  .topbar-divider { height: 20px; }
  .logout-button { font-size: 10px; }
  .welcome-row h1 { font-size: 34px; }
  .issue-list { grid-template-columns: 1fr; }
  .issue-item { min-height: 48px; grid-template-columns: 27px 1fr 18px; padding: 6px 8px; }
  .issue-copy strong { font-size: 10px; }
  .issue-copy small { font-size: 9px; }
  .app-footer { font-size: 7px; }
}
@media (orientation: landscape) and (min-width: 781px) and (max-width: 1200px) {
  .mobile-agenda-trigger { display: block; margin: -8px 0 15px; }
  .agenda-open-button { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid #e6e0d1; border-radius: 2px; background: #fffefa; color: #34434c; cursor: pointer; text-align: left; box-shadow: 0 3px 10px rgba(37, 46, 48, .035); }
  .agenda-open-button > span:nth-child(2) { font-size: 11px; font-weight: 700; }
  .agenda-menu-icon { display: grid; width: 17px; gap: 4px; }
  .agenda-menu-icon i { display: block; height: 1.5px; border-radius: 2px; background: #8d7544; }
  .agenda-open-count { display: grid; width: 25px; height: 25px; margin-left: auto; place-items: center; border-radius: 50%; background: #f2ede0; color: #927b4e; font-family: Georgia, serif; font-size: 11px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .issue-sidebar { position: fixed; z-index: 1301; inset: 0 auto 0 0; display: flex; width: min(340px, 88vw); height: 100vh; height: 100dvh; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 21px 15px 16px; border: 0; background: var(--paper); box-shadow: 18px 0 42px rgba(23, 37, 44, .16); transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform 600ms cubic-bezier(.22,.75,.25,1), visibility 0s linear 600ms; }
  .issue-sidebar.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; transition: transform 600ms cubic-bezier(.22,.75,.25,1), visibility 0s; }
  .agenda-close-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; margin-left: 9px; place-items: center; border: 1px solid #e8e5dc; border-radius: 50%; background: #fffefa; color: #59656a; cursor: pointer; font-size: 23px; line-height: 1; }
  .sidebar-heading { justify-content: flex-start; padding-bottom: 16px; border-bottom: 1px solid #edede8; }
  .sidebar-heading > div { margin-right: auto; }
  .agenda-backdrop { position: fixed; z-index: 1300; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(18, 32, 40, .42); opacity: 0; cursor: default; transition: opacity 600ms ease; }
  .agenda-backdrop.is-visible { opacity: 1; }
  .agenda-backdrop[hidden] { display: none; }
  body.agenda-open { overflow: hidden; }
  .sidebar-note { margin-top: auto; padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
