:root {
  --ink: #1c2333;
  --muted: #626a78;
  --navy: #1f2a44;
  --navy-hover: #324263;
  --gold: #c9a24a;
  --canvas: #f7f6f2;
  --paper: #fff;
  --line: #e4e5e5;
  --soft: #f0f1f3;
  --green: #285c48;
  --amber: #795513;
  --red: #9d3b36;
  --radius: 14px;
  --sidebar-width: 254px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); text-underline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1, h2, h3, h4, h5 { line-height: 1.25; }
h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.04em; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 650; }
h5 { font-size: 13px; }
p { color: var(--muted); }
ul, ol { padding-left: 22px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid #a47b20; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 99; padding: 12px 18px; color: white; background: var(--navy); border-radius: 8px; }
.skip-link:focus { top: 14px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-size: 19px; font-weight: 650; letter-spacing: -.04em; white-space: nowrap; }
.brand-light { font-weight: 400; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: #f6e8c6; background: var(--navy); font-family: Georgia, serif; font-size: 16px; letter-spacing: -.07em; }
.eyebrow { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--navy); border-radius: 8px; background: var(--navy); color: white; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; transition: background-color .15s; }
.button:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.button-secondary { background: var(--paper); color: var(--navy); border-color: #cfd2d9; }
.button-secondary:hover { background: #eff1f5; border-color: #bbc1cc; }
.button-small { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.quiet-link { font-size: 13px; font-weight: 500; text-decoration: none; }
.quiet-link:hover { text-decoration: underline; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--navy); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--red); }

/* Navigation */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 34px 24px 24px; display: flex; flex-direction: column; background: #fcfcfa; border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar .brand { margin-bottom: 50px; }
.sidebar-caption { margin: 0 12px 12px; font-size: 10px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: #777e88; }
.main-nav { display: grid; gap: 4px; }
.main-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 43px; padding: 9px 12px; border-radius: 7px; color: var(--muted); font-size: 13px; text-decoration: none; }
.main-nav a:hover { background: #f2f1ec; color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--navy); background: #eceef2; font-weight: 600; }
.organization-nav { margin-top: 35px; }
.organization-nav a { display: block; padding: 8px 12px; overflow-wrap: anywhere; font-size: 12px; text-decoration: none; }
.organization-nav a:hover { text-decoration: underline; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.signed-in-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.signed-in-email { margin: 5px 0 12px; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.public-header { max-width: 1250px; margin: 0 auto; padding: 30px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.workspace-main { max-width: 1740px; min-height: calc(100vh - 70px); margin-left: var(--sidebar-width); padding: 44px 48px 60px; }
.public-main { max-width: 1250px; min-height: calc(100vh - 172px); margin: 0 auto; padding: 0 36px 60px; }
.site-footer { padding: 20px 48px; color: #777e88; font-size: 11px; border-top: 1px solid var(--line); }
.workspace-body .site-footer { margin-left: var(--sidebar-width); }
.site-footer span { margin-left: 20px; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 12px; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.page-header h1 + p { margin-top: 12px; font-size: 14px; }
.page-header > .button, .page-header > .status { flex-shrink: 0; }

/* Public introduction */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 75px; align-items: center; padding: 65px 0 80px; }
.hero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(44px, 5.8vw, 70px); letter-spacing: -.055em; line-height: 1.07; }
.hero .eyebrow { margin-bottom: 23px; }
.hero-description { max-width: 510px; margin-top: 28px; font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 30px; }
.hero-actions .button { padding: 14px 22px; }
.hero-workflow { border: 1px solid #dddcd5; border-radius: 18px; padding: 28px 30px; background: linear-gradient(140deg, #fffef9, #eeeee9); box-shadow: 0 18px 50px #1f2a4408; }
.workflow-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #dcdcd6; }
.workflow-heading .eyebrow { margin: 0; }
.workflow-symbol { font-size: 30px; color: #9d7b31; }
.workflow-step { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 20px; padding: 18px 0; }
.workflow-dot { position: relative; margin-top: 6px; width: 9px; height: 9px; border: 2px solid #8c7851; border-radius: 50%; }
.workflow-step h2 { font-size: 17px; }
.workflow-step p { margin-top: 8px; font-size: 13px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 42px 0; border-top: 1px solid #dedfdc; }
.feature-grid article + article { border-left: 1px solid var(--line); padding-left: 36px; }
.feature-kicker { margin-bottom: 13px; font-size: 11px; letter-spacing: .1em; color: #7d6a43; text-transform: uppercase; }
.feature-grid h2 { font-size: 19px; margin-bottom: 13px; }
.feature-grid p { font-size: 14px; }
.notice-panel { padding: 25px 28px; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #f0f0eb; }
.notice-panel h2 { font-size: 16px; margin-bottom: 10px; }
.notice-panel p { max-width: 850px; font-size: 13px; }

/* Project tables and forms */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--paper); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.panel-heading p { margin-top: 7px; font-size: 13px; }
.organization-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 30px; }
.organization-card { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 24px; background: #f0eee6; border: 1px solid #e2e0d8; border-radius: var(--radius); }
.organization-card h2 { overflow-wrap: anywhere; font-size: 22px; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { border-bottom: 1px solid var(--line); padding: 10px 14px 12px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px 14px; border-bottom: 1px solid #ededec; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr:last-child td { border-bottom: 0; }
.project-table tbody tr:hover { background: #fafaf7; }
.project-name { font-size: 14px; font-weight: 600; text-decoration: none; }
.project-name:hover { text-decoration: underline; }
.cell-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.row-link { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-size: 17px; }
.search-box input { max-width: 230px; min-height: 38px; background: #fbfbf9; font-size: 12px; }
.search-empty { text-align: center; padding: 28px; font-size: 13px; }
.empty-state { padding: 55px 20px; text-align: center; }
.empty-state p { max-width: 440px; margin: 12px auto 0; font-size: 14px; }
.empty-state .button { margin-top: 23px; }
.empty-symbol { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 22px; color: #8a7750; background: #f3f0e7; border-radius: 16px; font-size: 28px; }
.empty-state-small { padding: 26px 15px; }
.empty-state-small h3 { font-size: 15px; }
.empty-state-small p { font-size: 13px; }
label { font-size: 13px; font-weight: 500; color: var(--ink); }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cfd3d9; border-radius: 7px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #9fa8b7; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b5bdcc; outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 7px; accent-color: var(--navy); }
input[type="file"] { padding: 8px; background: #fafbf9; font-size: 12px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 11px; border: 1px solid #d5d8de; border-radius: 5px; background: white; color: var(--navy); cursor: pointer; font: inherit; }
textarea { resize: vertical; }
.stack-form { display: flex; flex-direction: column; gap: 16px; }
.stack-form p { font-size: 13px; }
.stack-form p > label { display: block; margin-bottom: 7px; }
.stack-form p:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
.stack-form p:has(input[type="checkbox"]) > label { margin: 0; }
.stack-form > .button { align-self: flex-start; }
.form-panel { max-width: 640px; padding: 32px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 8px; }
.form-note, .helptext { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.helptext { margin-top: 6px; }
.helptext ul { margin: 6px 0; padding-left: 18px; }
.errorlist { margin: 0; padding: 10px 14px 10px 30px; border-radius: 6px; background: #fbefed; color: var(--red); font-size: 12px; }
.errorlist + p input, [aria-invalid="true"] { border-color: #b56059; }
.messages { display: grid; gap: 10px; margin-bottom: 20px; }
.development-note { padding: 9px 14px; margin-bottom: 24px; border: 1px solid #e6ddc9; border-radius: 7px; background: #f5efe1; color: #786344; font-size: 11px; }
.pending-checkout-form { margin: 18px 0 24px; }
.pending-checkout-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.message { padding: 14px 17px; border: 1px solid #dfe2e6; border-radius: 9px; background: #f1f3f7; color: #3c4c66; font-size: 13px; }
.message strong { display: block; margin-bottom: 3px; }
.message.warning { color: var(--amber); background: #faf6e9; border-color: #eee0bc; }
.message.error { color: var(--red); background: #fbefed; border-color: #efd5d0; }
.message.success { color: var(--green); background: #edf5ef; border-color: #d8e6dd; }
.message a { color: inherit; font-weight: 600; }

/* Submission projects */
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.project-meta span + span::before { content: "·"; padding-right: 16px; color: #a3a7ac; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 24px; }
.project-primary { min-width: 0; display: grid; gap: 25px; }
.project-sidebar .panel { padding: 22px; }
.document-list, .member-list, .team-list { list-style: none; margin: 0; padding: 0; }
.document-list li { display: flex; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.document-list li:first-child { padding-top: 0; }
.document-list li:last-child { border-bottom: 0; }
.file-type { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 43px; border: 1px solid #dde2e8; border-radius: 6px; color: #67768d; background: #f4f6f8; font-size: 9px; font-weight: 700; }
.document-info { flex: 1; min-width: 0; }
.document-info a { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.document-info a:hover { text-decoration: underline; }
.document-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
details > summary { cursor: pointer; font-size: 13px; font-weight: 500; }
details > summary:hover { color: var(--navy-hover); }
details[open] > summary { margin-bottom: 18px; }
.upload-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.upload-section summary span { float: right; }
.conversion-panel { border-top: 3px solid #c6ab6e; }
.conversion-symbol { color: #9d8050; font-size: 30px; }
.section-heading { margin: 10px 0 20px; }
.version-card { margin-bottom: 20px; scroll-margin-top: 20px; }
.version-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.version-heading h3 { font-size: 18px; }
.version-meta { margin-top: 9px; font-size: 11px; overflow-wrap: anywhere; }
.status { display: inline-block; flex-shrink: 0; max-width: 100%; padding: 4px 10px; border-radius: 5px; background: #f0f1f3; color: #596274; font-size: 10px; font-weight: 600; text-transform: capitalize; }
.status-approved, .status-succeeded { color: #285c48; background: #eaf3ed; }
.status-review, .status-awaiting_choices { color: #796023; background: #f8f1dc; }
.status-failed { color: #a14840; background: #faeae6; }
.status-queued, .status-running { color: #4b6385; background: #eaf0f8; }
.version-result { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.report { margin: 23px 0; padding: 18px; background: #f8f8f5; border: 1px solid #e9e9e4; border-radius: 8px; }
.summary-list { margin: 10px 0 0; font-size: 12px; color: #54606e; }
.summary-list li { margin: 5px 0; }
.report-warnings { margin-top: 15px; padding: 13px 15px; border-radius: 6px; background: #faf3e1; color: #76591d; }
.report-warnings ul { margin-bottom: 0; font-size: 12px; }
.report-warnings li { margin: 7px 0; }
.report > .form-note { margin-top: 12px; }
.review-form { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.review-form select { flex: 1; width: auto; max-width: 220px; min-width: 120px; font-size: 12px; padding: 8px 10px; }
.review-form label { font-size: 12px; }
.version-card > .message { margin-top: 20px; }
.error-reference { display: block; margin-top: 8px; font-size: 11px; }
.lawyer-choices { display: grid; gap: 12px; margin-top: 20px; }
.lawyer-choice { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 15px; padding: 12px; background: #f8f8f5; border-radius: 7px; }
.lawyer-choice select { font-size: 12px; }
.processing-status { display: flex; align-items: center; gap: 12px; padding: 22px 0 4px; }
.processing-status p { flex: 1; font-size: 13px; }
.processing-dot { width: 9px; height: 9px; border-radius: 50%; background: #6888ae; }
.version-details, .comments-section { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.source-details { font-size: 12px; }
.source-details > div { margin-top: 11px; }
.source-details dt { color: var(--muted); font-size: 11px; }
.source-details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:first-child { padding-top: 0; }
.comment header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.comment header strong { font-weight: 600; overflow-wrap: anywhere; }
.comment time { color: var(--muted); font-size: 10px; }
.comment-body { margin-top: 9px; color: var(--ink); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comments-section .stack-form { margin-top: 20px; }
.member-list li { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.member-avatar { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #efede6; color: #6a6048; font-size: 11px; font-weight: 650; }
.member-list strong { display: block; max-width: 190px; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.member-list li div > span { display: block; font-size: 10px; color: var(--muted); text-transform: capitalize; }
.access-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); gap: 9px; }
.access-form select { font-size: 12px; }
.access-form .button { margin-top: 5px; }
.team-link { display: block; margin: 20px 0; font-size: 11px; }
.transfer-section { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.transfer-section summary { font-size: 11px; }
.transfer-section select { font-size: 12px; }
.project-sidebar .form-note { margin-top: 22px; font-size: 11px; }

/* Teams, billing and authentication */
.split-layout { display: grid; grid-template-columns: 1.3fr 1fr; align-items: start; gap: 25px; }
.team-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.team-list li:first-child { padding-top: 0; }
.team-list li:last-child { border-bottom: 0; }
.member-info { flex: 1; min-width: 120px; }
.member-info strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.member-info span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.panel-footnote { padding-top: 18px; margin-top: 15px; border-top: 1px solid var(--line); font-size: 12px; }
.pending-invitations { margin-top: 28px; }
.subscription-summary { margin-bottom: 25px; }
.billing-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 25px 0; }
.billing-details dt { color: var(--muted); font-size: 11px; }
.billing-details dd { margin: 6px 0 0; font-size: 17px; font-weight: 500; text-transform: capitalize; }
.subscription-summary form { margin-top: 22px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.pricing-card { padding: 30px; }
.pricing-card > p:not(.eyebrow) { margin-top: 15px; font-size: 13px; }
.plan-features { margin: 26px 0; font-size: 13px; }
.plan-features li { margin: 11px 0; }
.price-note { padding-top: 22px; border-top: 1px solid var(--line); }
.pricing-card form { margin-top: 18px; }
.pricing-card .button { width: 100%; }
.pricing-card .form-note { font-size: 11px !important; }
.billing-footnote { max-width: 760px; margin-top: 24px; font-size: 12px; }
.billing-page-header { margin-bottom: 24px; }
.package-balance-hero { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 30px 34px; color: white; background: linear-gradient(135deg, #18243c, #2c3d5b); border: 1px solid #344462; border-radius: 16px; box-shadow: 0 16px 40px #17213718; }
.package-balance-hero .eyebrow { color: #c9d2e2; }
.workspace-body .package-balance-hero h2 { display: flex; align-items: baseline; gap: 8px; color: white; font-size: 22px; font-weight: 500; }
.workspace-body .package-balance-hero h2 strong { margin-right: 8px; color: #f1d89d; font-family: 'Instrument Serif', Georgia, serif; font-size: 50px; font-weight: 400; line-height: .8; }
.package-balance-hero p:last-child { max-width: 680px; margin-top: 11px; color: #d5dbea; font-size: 13px; }
.package-balance-hero .button { flex-shrink: 0; color: #1f2a44; background: #e3c77f; border-color: #e3c77f; }
.package-balance-hero .button:hover { background: #efd895; border-color: #efd895; }
.billing-section { margin-top: 40px; scroll-margin-top: 24px; }
.billing-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 20px; }
.billing-section-heading h2 { font-size: 25px; }
.billing-section-heading h2 + p { margin-top: 8px; font-size: 13px; }
.secure-checkout-label { flex-shrink: 0; padding: 7px 11px; color: #465d55; background: #e8f2ed; border: 1px solid #cfe1d8; border-radius: 999px; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.credit-package-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.credit-package-card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 23px 20px 20px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 6px 20px #1f2a4405; }
.credit-package-card.credit-package-featured { border: 2px solid #b8964c; padding: 22px 19px 19px; background: linear-gradient(160deg, #fffdf8, #fff); }
.package-badge { position: absolute; top: 0; right: 14px; transform: translateY(-50%); padding: 4px 8px; color: #493b1c; background: #e4ca8b; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.package-quantity { min-height: 55px; color: var(--ink); line-height: 1.2; }
.package-quantity strong { display: block; color: var(--navy); font-family: 'Instrument Serif', Georgia, serif; font-size: 42px; font-weight: 400; line-height: 1; }
.package-quantity span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.package-price { margin-top: 25px; color: var(--ink); font-size: 23px; font-weight: 650; letter-spacing: -.03em; }
.package-unit { margin: 3px 0 18px; font-size: 11px; }
.credit-package-card .button { width: 100%; margin-top: auto; padding-left: 10px; padding-right: 10px; }
.billing-section > .message { margin-top: 16px; }
.billing-records-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 38px; }
.billing-records-grid .panel { min-width: 0; }
.billing-records-grid .panel-heading { margin-bottom: 12px; }
.billing-records-grid .panel-heading .eyebrow { margin-bottom: 6px; }
.billing-records-grid .empty-state { padding: 28px 15px 20px; }
.billing-assurance { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 30px; padding: 20px 24px; background: #f0eee7; border: 1px solid #e1ded3; border-radius: 12px; }
.billing-assurance div { padding: 0 22px; }
.billing-assurance div:first-child { padding-left: 0; }
.billing-assurance div:last-child { padding-right: 0; }
.billing-assurance div + div { border-left: 1px solid #d8d4c8; }
.billing-assurance strong, .billing-assurance span { display: block; }
.billing-assurance strong { color: var(--ink); font-size: 12px; }
.billing-assurance span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.checkout-page-header { margin-bottom: 26px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 22px; align-items: start; max-width: 1040px; }
.checkout-form-panel { padding: 32px; }
.checkout-form-panel .panel-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.checkout-form-panel .panel-heading .eyebrow { margin-bottom: 7px; }
.checkout-form-panel .panel-heading .checkout-total { color: var(--ink); font-family: 'Instrument Serif', Georgia, serif; font-size: 38px; line-height: 1; }
.checkout-inclusions { display: grid; gap: 11px; margin: 24px 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.checkout-inclusions li { position: relative; padding-left: 25px; }
.checkout-inclusions li::before { content: '✓'; position: absolute; left: 0; color: #28705b; font-weight: 700; }
.checkout-form { padding-top: 24px; border-top: 1px solid var(--line); }
.checkout-form label { margin-bottom: -9px; }
.checkout-form .button { align-self: stretch; }
.checkout-form .form-note { text-align: center; }
.checkout-summary { padding: 28px; background: #f0eee7; border-color: #ded9cb; box-shadow: none !important; }
.checkout-summary dl { margin: 22px 0; }
.checkout-summary dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; font-size: 13px; }
.checkout-summary dt { color: var(--muted); }
.checkout-summary dd { margin: 0; color: var(--ink); font-weight: 600; }
.checkout-summary .checkout-summary-total { margin-top: 9px; padding-top: 18px; border-top: 1px solid #d6d1c4; font-size: 17px; }
.checkout-summary > p { margin-top: 7px; font-size: 11px; }
.checkout-alternatives { max-width: 1040px; margin-top: 34px; }
.checkout-alternatives .section-heading { margin-bottom: 14px; }
.package-option-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.package-option-link { display: grid; padding: 14px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.package-option-link:hover { border-color: #a9afba; }
.package-option-link.is-current { background: #f1ead9; border-color: #c6aa68; }
.package-option-link strong { font-size: 20px; }
.package-option-link span { color: var(--muted); font-size: 10px; }
.package-option-link small { margin-top: 8px; font-weight: 650; }
.auth-card { width: 100%; max-width: 480px; margin: 45px auto; padding: 35px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 14px 45px #1f2a4405; }
.auth-card h1 { font-size: 28px; letter-spacing: -.035em; }
.auth-card h1 + p { margin-top: 15px; font-size: 14px; }
.auth-card .stack-form { margin-top: 25px; }
.auth-card .stack-form > .button { width: 100%; }
.auth-card > .button { margin-top: 24px; }
.auth-links { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }
.auth-links p { margin-top: 10px; font-size: 12px; }
.account-panel { max-width: 800px; }
.account-panel h1, .account-panel h2 { margin-bottom: 15px; }
.account-panel p { margin-bottom: 16px; font-size: 14px; }
.account-panel form { margin: 20px 0; }
.account-panel button { padding: 10px 16px; border: 1px solid #cbd0d8; border-radius: 7px; background: #fff; color: var(--navy); }
.account-panel img { max-width: 100%; }

@media (min-width: 1650px) { .workspace-main { padding-left: 70px; padding-right: 70px; } }
@media (max-width: 1200px) {
  :root { --sidebar-width: 220px; }
  .sidebar { padding: 30px 18px 22px; }
  .sidebar .brand { font-size: 17px; gap: 8px; }
  .workspace-main { padding: 34px 28px 50px; }
  .project-layout { grid-template-columns: minmax(0, 1fr); }
  .project-sidebar .panel { padding: 25px; }
  .project-sidebar .member-list { display: flex; flex-wrap: wrap; gap: 0 25px; }
  .project-sidebar .access-form { max-width: 450px; }
  .hero { gap: 40px; }
  .credit-package-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .sidebar { position: static; width: 100%; padding: 20px 24px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin-bottom: 18px; font-size: 19px; }
  .sidebar > .sidebar-caption, .organization-nav { display: none; }
  .sidebar-bottom { display: flex; align-items: center; gap: 15px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .sidebar-bottom .signed-in-label { display: none; }
  .sidebar-bottom .signed-in-email { margin: 0 auto 0 0; font-size: 11px; }
  .sidebar-bottom .text-button { font-size: 11px; }
  .main-nav { display: flex; flex-wrap: wrap; gap: 5px; }
  .main-nav a { min-height: 38px; padding: 8px 11px; font-size: 12px; }
  .main-nav a span { display: none; }
  .workspace-main, .workspace-body .site-footer { margin-left: 0; }
  .workspace-main { padding: 28px 24px 45px; }
  .hero { grid-template-columns: 1fr; padding: 40px 0; gap: 40px; }
  .hero-description { max-width: 600px; }
  .hero-workflow { max-width: 640px; }
  .feature-grid { gap: 24px; }
  .feature-grid article + article { padding-left: 22px; }
  .split-layout { grid-template-columns: 1fr; }
  .billing-records-grid, .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { order: -1; }
  .billing-assurance { grid-template-columns: 1fr; gap: 16px; }
  .billing-assurance div { padding: 0; }
  .billing-assurance div + div { padding-top: 16px; border-left: 0; border-top: 1px solid #d8d4c8; }
}
@media (max-width: 580px) {
  .public-header { padding: 22px 20px; gap: 14px; }
  .public-header .brand { font-size: 17px; gap: 8px; }
  .public-header .brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .header-actions { gap: 12px; }
  .header-actions .button { display: none; }
  .public-main { padding: 0 20px 40px; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 48px; }
  .hero-description { font-size: 15px; }
  .hero-workflow { padding: 23px; }
  .feature-grid { grid-template-columns: 1fr; padding-top: 30px; gap: 30px; }
  .feature-grid article + article { border-left: 0; padding-left: 0; }
  .sidebar { padding: 20px 18px 10px; }
  .workspace-main { padding: 25px 18px 40px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 25px; }
  .panel { padding: 20px; }
  .panel-heading { flex-wrap: wrap; }
  .search-box, .search-box input { width: 100%; max-width: none; }
  .organization-card { padding: 22px; }
  .project-table { min-width: 570px; }
  .document-list li { flex-wrap: wrap; }
  .document-list li > .quiet-link { margin-left: 50px; font-size: 12px; }
  .version-heading { gap: 14px; }
  .version-heading h3 { font-size: 16px; }
  .version-result { flex-wrap: wrap; }
  .review-form { flex-wrap: wrap; }
  .review-form label { width: 100%; }
  .lawyer-choice { grid-template-columns: 1fr; gap: 8px; }
  .processing-status { flex-wrap: wrap; }
  .processing-status p { min-width: 170px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .package-balance-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
  .package-balance-hero .button { width: 100%; }
  .billing-section-heading { align-items: flex-start; flex-direction: column; }
  .credit-package-grid { grid-template-columns: 1fr; }
  .credit-package-card { min-height: 220px; }
  .package-option-row { grid-template-columns: repeat(2, 1fr); }
  .checkout-form-panel { padding: 22px; }
  .billing-details { grid-template-columns: 1fr; gap: 18px; }
  .billing-details dd { font-size: 16px; }
  .auth-card { margin: 25px auto; padding: 25px; }
  .auth-card h1 { font-size: 26px; }
  .site-footer { padding: 20px; }
  .site-footer span { display: block; margin: 5px 0 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
.converter-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
/* Shared visual identity for public accounts and the workspace. */
:root {
  --ink: #172d2e;
  --muted: #4f6562;
  --navy: #164b45;
  --navy-hover: #21635b;
  --canvas: #f7faf8;
  --line: #d8e3df;
}
.sidebar { background: #eef5f1; }
.main-nav a[aria-current="page"], .main-nav a:hover { background: #dcebe3; }
.brand-mark { color: #fff; }
.auth-card { border-top: 4px solid var(--navy); box-shadow: 0 18px 50px #173d3510; }
.auth-card h1 { font-size: clamp(25px, 4vw, 32px); }
#quick-convert-title { font-size: 24px; margin-bottom: 16px; }
.converter-files label {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px dashed #9db7b0;
  border-radius: 12px;
  background: #f7faf8;
}
.converter-files label:focus-within { border-color: var(--navy); background: #eef5f1; }
.converter-files input { width: 100%; }
.project-primary > details.panel > summary { cursor: pointer; color: var(--navy); font-weight: 650; }

@font-face {
  font-family: 'Instrument Serif';
  src: url('./instrument-serif-regular.ttf') format('truetype');
  font-display: swap;
}
.workspace-body {
  --ink: #242f46;
  --muted: #606a7b;
  --navy: #1f2a44;
  --navy-hover: #303e5b;
  --canvas: #faf9f5;
  --line: #e3dfd4;
  background: var(--canvas);
}
.workspace-body .sidebar {
  background: linear-gradient(155deg, #172137, #26354f);
  border-color: #38435a;
}
.sidebar .brand {
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 400;
}
.sidebar .brand-light { color: #e1c686; }
.sidebar .brand-mark { flex-shrink: 0; }
.sidebar .main-nav a, .sidebar .organization-nav a,
.sidebar .signed-in-email, .sidebar .text-button { color: #e2e7f1; }
.sidebar .sidebar-caption, .sidebar .signed-in-label { color: #bdc6d8; }
.sidebar .main-nav a[aria-current="page"], .sidebar .main-nav a:hover,
.sidebar .organization-nav a:hover {
  background: #ffffff14;
  color: #f5dfac;
}
.sidebar .sidebar-bottom { border-color: #ffffff28; }
.workspace-body .page-header h1, .workspace-body #quick-convert-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -.015em;
}
.workspace-body .page-header h1 { font-size: clamp(36px, 4vw, 55px); }
.workspace-body #quick-convert-title { font-size: 35px; margin-bottom: 20px; }
.workspace-body .panel { box-shadow: 0 6px 24px #1f2a4408; }
.converter-panel { border-top: 3px solid #c9a24a; }
.converter-panel .converter-files label {
  border-color: #cbb98e;
  background: #faf7ef;
  padding: 18px;
}
.converter-panel .converter-files label:focus-within {
  border-color: #8b6a2b;
  background: #f5eedf;
}
.converter-panel .stack-form > .button {
  background: #ddbe76;
  border-color: #c9a24a;
  color: #172137;
  min-width: 144px;
}
.converter-panel .stack-form > .button:hover { background: #e7cc8c; }
@media (max-width: 580px) {
  .converter-panel .stack-form > .button { width: 100%; }
}

.latest-conversion {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.latest-conversion h3 { margin-bottom: 12px; }
.latest-conversion p { margin-block: 8px; }
.latest-conversion .status { margin-right: 8px; }
.latest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.latest-actions .form-note { flex-basis: 100%; }
@media (max-width: 580px) {
  .latest-actions > .button, .latest-actions > form, .latest-actions > form > .button { width: 100%; }
}

.file-info { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.converter-files input[aria-invalid="true"] + .file-info { color: #9b3030; }

.signin-page {
  --navy: #1f2a44;
  --navy-hover: #303e5b;
  --ink: #242f46;
  --muted: #606a7b;
  --line: #e3dfd4;
  background: linear-gradient(#172137 0 245px, #faf9f5 245px);
}
.signin-page .public-header .brand,
.signin-page .public-header .quiet-link { color: #fff; }
.signin-page .public-header .brand-mark { background: #303e5b; color: #e1c686; }
.signin-page .auth-card {
  border: 1px solid var(--line);
  border-top: 3px solid #c9a24a;
  box-shadow: 0 18px 50px #17213720;
}
.signin-logo { display: block; margin-bottom: 14px; border-radius: 10px; }
.signin-page .auth-card h1 {
  font: 400 52px/1 'Instrument Serif', Georgia, serif;
  letter-spacing: -.015em;
}
.signin-page .button { background: #ddbe76; color: #172137; border-color: #c9a24a; }
.signin-page .button:hover { background: #e7cc8c; }
.signin-page .auth-links a { text-underline-offset: 3px; }

.converter-panel .converter-files label {
  align-content: start;
  background: #f8f5ed;
}
.converter-files strong { color: var(--navy); font-size: 15px; }
.converter-files input { min-height: 44px; max-width: 100%; }
.converter-panel .latest-conversion {
  background: #f5f5f2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.converter-panel .latest-succeeded { background: #f1f7f2; border-color: #d4e5d7; }
.converter-panel .latest-awaiting_choices,
.converter-panel .latest-failed { background: #faf5e9; border-color: #e7d6a9; }
.result-filename { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; flex-basis: 100%; order: 1; }
@media (max-width: 580px) {
  .project-table { display: block; min-width: 0; }
  .project-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .project-table tbody { display: block; }
  .project-table tbody tr:not([hidden]) {
    display: grid;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .project-table tbody td { display: block; padding: 2px 0; border: 0; overflow-wrap: anywhere; }
  .project-table .row-link { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 580px) {
  .project-page .workspace-main { padding-top: 16px; }
  .project-page .sidebar { padding-top: 12px; }
  .project-page .sidebar .brand { margin-bottom: 7px; }
  .project-page .sidebar-bottom { margin-top: 6px; padding-top: 4px; }
  .project-page .sidebar-bottom .text-button,
  .project-page .main-nav a { min-height: 44px; }
  .project-page .page-header { gap: 4px; margin-bottom: 12px; }
  .project-page .page-header h1 { overflow-wrap: anywhere; }
  .project-history-link { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; }
  .project-page .converter-panel { padding: 16px; }
  .project-page .converter-files label { padding: 12px; gap: 6px; }
  .project-page .converter-files input { font-size: 16px; }
  .project-page .latest-actions .quiet-link { display: inline-flex; align-items: center; min-height: 44px; }
  .project-page .lawyer-choice select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
}

.submission-result + .submission-result { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.submission-result .quiet-link { display: inline-flex; align-items: center; min-height: 44px; margin-inline: 8px; }

/* Project converter follows the source-to-destination layout of the desktop app. */
.converter-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.converter-header h2 { margin: 0 0 5px; }
.converter-header p { margin: 0; }
.converter-balance {
  flex-shrink: 0;
  border: 1px solid #e1d7bf;
  border-radius: 999px;
  background: #f8f2e3;
  color: var(--navy);
  padding: 6px 12px;
  font-size: .8rem;
}
.converter-panel .converter-files:has(.converter-arrow) {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}
.converter-panel .converter-files .converter-step {
  border: 1px solid #dcd6ca;
  background: #faf7ef;
  padding: 18px;
}
.converter-step-label {
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.converter-arrow {
  align-self: center;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
}
.converter-panel .stack-form > .converter-submit {
  width: 100%;
  justify-content: center;
  gap: 10px;
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}
.converter-panel .stack-form > .converter-submit:hover { background: #31405c; }
@media (max-width: 720px) {
  .converter-panel .converter-files:has(.converter-arrow) { grid-template-columns: minmax(0, 1fr); }
  .converter-arrow { justify-self: center; transform: rotate(90deg); }
}

/* Windows converter palette and compact document work surface. */
.project-page { background: #f4f5f7; font-family: "Segoe UI", Arial, sans-serif; }
.project-page .page-header h1, .converter-header h2 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  letter-spacing: -.025em;
  color: #1f2a44;
}
.project-page .page-header h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.converter-panel { border: 1px solid #d9dee5; border-radius: 5px; box-shadow: none; }
.converter-header h2 { font-size: 1.25rem; }
.converter-panel .converter-files .converter-step {
  border: 1px solid #d9dee5;
  border-radius: 4px;
  background: #fff;
  padding: 12px;
}
.converter-drop {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  border-radius: 3px;
  background: #eef1f5;
  cursor: pointer;
}
.converter-panel .converter-files .converter-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.converter-drop:hover, .converter-drop.is-dragging { background: #e2e8f1; }
.converter-drop:focus-within { outline: 2px solid #1f2a44; outline-offset: 2px; }
.converter-drop-title { color: #1f2a44; font-size: .9rem; }
.converter-drop .file-info { overflow-wrap: anywhere; }
.converter-direction { background: #eef1f5; padding: 9px 12px; }
.converter-panel .latest-conversion { background: #fff; border-color: #d9dee5; border-radius: 4px; }
.converter-panel .stack-form > .converter-submit { border-radius: 4px; }
