:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #0f172a; background: #f8fafc; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: #1e3a5f; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, input, select { min-height: 44px; }
button, input, select, textarea { border: 1px solid #cbd5e1; border-radius: 8px; }
input, select, textarea { width: 100%; color: #0f172a; background: #fff; padding: 10px 12px; }
textarea { resize: vertical; min-height: 104px; }
button { padding: 10px 16px; background: #fff; color: #1e3a5f; font-weight: 600; cursor: pointer; }
button:hover { background: #eff6ff; }
button:disabled { opacity: .65; cursor: default; }
input:disabled, select:disabled, textarea:disabled { background: #f1f5f9; color: #475569; opacity: 1; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.cw-page { max-width: 1100px; margin: 0 auto; padding: 24px 24px 48px; }
.cw-skip { position: absolute; left: 16px; top: -100px; padding: 12px; background: white; z-index: 10; }
.cw-skip:focus { top: 8px; }
.cw-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; color: #475569; margin-bottom: 24px; }
.cw-breadcrumb a { display: inline-flex; min-height: 44px; align-items: center; }
.cw-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.cw-eyebrow { color: #1e3a5f; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
h1 { color: #1e3a5f; margin: 0 0 8px; font-size: 32px; line-height: 1.2; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 21px; line-height: 1.3; color: #1e3a5f; }
.cw-heading p:last-child, .cw-section-heading p { margin: 8px 0 0; color: #475569; }
.cw-chip { border: 1px solid #cbd5e1; border-radius: 24px; padding: 6px 14px; color: #475569; background: #fff; font-size: 14px; white-space: nowrap; }
.cw-message { margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid #1e3a5f; background: #eaf0f7; color: #1e3a5f; overflow-wrap: anywhere; }
.cw-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.cw-panel { background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.cw-section-heading { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.cw-step { color: #475569; border: 1px solid #cbd5e1; border-radius: 8px; min-width: 40px; padding: 6px; text-align: center; font-size: 14px; }
.cw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.cw-wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-weight: 600; }
.cw-hint { color: #475569; font-size: 14px; font-weight: 400; }
.cw-subsection { margin-top: 24px; }
.cw-note { background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; padding: 16px; color: #475569; margin: 24px 0 0; font-size: 14px; }
.cw-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.cw-primary:hover { background: #1d4ed8; color: #fff; }
.cw-secondary { color: #1e3a5f; }
.cw-actions { padding: 24px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; }
.cw-actions > div, .cw-dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cw-actions p { margin: 12px 0 0; }
.cw-footer-panel { margin-top: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cw-footer-panel a { display: inline-flex; align-items: center; min-height: 44px; }
.cw-footer-panel p { width: 100%; margin: 0; }
.cw-error { border: 1px solid #b91c1c; border-left: 4px solid #b91c1c; background: #fff7f7; color: #7f1d1d; padding: 16px; border-radius: 8px; margin-bottom: 24px; }
.cw-error p { margin: 0; }
.cw-error a { color: #7f1d1d; display: inline-flex; align-items: center; min-height: 44px; }
.cw-field-error { color: #b91c1c; font-size: 14px; font-weight: 400; }
[aria-invalid="true"] { border-color: #b91c1c; }
dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; color: #0f172a; border: 1px solid #cbd5e1; border-radius: 12px; }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.cw-dialog-actions { margin-top: 24px; }
@media (max-width: 900px) { .cw-grid { grid-template-columns: 1fr; } .cw-heading { flex-direction: column; gap: 16px; } }
@media (max-width: 560px) { .cw-page { padding: 16px 16px 32px; } .cw-panel, .cw-actions { padding: 16px; } h1 { font-size: 28px; } .cw-section-heading { gap: 12px; } .cw-actions button, .cw-dialog-actions button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.ur-signatures{display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}.ur-signature{display:inline-block;max-width:100%;padding:.4rem .65rem;border-radius:.7rem;font-size:.85rem;line-height:1.5;overflow-wrap:anywhere}.ur-signature-unchecked{color:#704800;background:#fff1c9;border:1px solid #b37b21}.ur-signature-missing{color:#90242c;background:#ffe7e8;border:1px solid #bc4c55}.ur-signature-present{color:#175438;background:#def5e8;border:1px solid #559573}

#contract-source-content{overflow-wrap:anywhere}.cw-source-candidate{border-top:1px solid #cbd5e1;padding:1rem 0}.cw-source-candidate blockquote{margin:.5rem 0;padding:.6rem;border-left:3px solid #758cb8;white-space:pre-wrap}

.cw-source-links{display:flex;flex-wrap:wrap;gap:1rem}
.cw-confirm-dialog { max-width: 520px; }
.cw-confirm-dialog h2 { margin-top: 0; }
.cw-confirm-dialog p { line-height: 1.6; overflow-wrap: anywhere; }
.cw-confirm-dialog button { min-height: 44px; padding: 10px 16px; cursor: pointer; }
.cw-confirm-dialog :focus-visible { outline: 3px solid #2670b8; outline-offset: 3px; }
.cw-operation-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
#contract-operations summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.cw-signed-version { border-top: 1px solid #cbd5e1; margin-top: 12px; padding-top: 12px; overflow-wrap: anywhere; }
.cw-signed-version p { margin: 8px 0; font-size: 14px; }
.cw-signed-version a, #contract-signed-upload { display: inline-flex; align-items: center; min-height: 44px; }
#contract-signed-fields { display: grid; gap: 12px; }
.cw-checkbox { display: flex; flex-direction: row; align-items: flex-start; font-size: 14px; }
.cw-checkbox input { width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px; margin-top: 2px; }
#contract-operation-form { overflow-wrap: anywhere; }
#contract-operation-form label { margin-top: 16px; }
@media (max-width: 560px) { .cw-operation-actions { flex-direction: column; } .cw-operation-actions button { width: 100%; } }

/* A quiet form hierarchy, scoped so shared workspaces keep their own layout. */
body.ur-glass .cw-page { max-width: 980px; }
body.ur-glass .cw-page .cw-heading { margin-bottom: 18px; gap: 16px; }
body.ur-glass .cw-page .cw-heading p { max-width: 620px; }
body.ur-glass .cw-page .cw-overview { margin-bottom: 24px; }
body.ur-glass .cw-page .cw-message { margin-bottom: 8px; padding: 12px 16px; }
body.ur-glass .cw-page .cw-next-step { margin: 0; padding: 0 4px; font-size: 14px; color: #475569; overflow-wrap: anywhere; }
body.ur-glass .cw-page .cw-panel { margin-bottom: 18px; }
body.ur-glass .cw-page .cw-section-heading { margin-bottom: 20px; }
body.ur-glass .cw-page .cw-section-heading p { margin-top: 6px; font-size: 14px; }
body.ur-glass .cw-page .cw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
body.ur-glass .cw-page .cw-signature-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #8190a9; }
body.ur-glass .cw-page .cw-signature-section h3 { margin: 0; font-size: 17px; }
body.ur-glass .cw-page .ur-signatures { margin: 12px 0 16px; }
body.ur-glass .cw-page label { gap: 7px; font-weight: 550; }
body.ur-glass .cw-page :is(input, select, textarea) { min-width: 0; max-width: 100%; }
body.ur-glass :is(.cw-page, dialog) :is(input, select, textarea, button):not([aria-invalid="true"]):not(.cw-primary) { border-color: #8190a9; }
body.ur-glass .cw-page .cw-hint { line-height: 1.5; }
body.ur-glass .cw-page .cw-note { margin-top: 20px; padding: 12px 16px; }
body.ur-glass .cw-page .ur-disclosure { border-top-color: #8190a9; margin-top: 20px; }
body.ur-glass .cw-page .ur-disclosure > summary { min-height: 48px; font-weight: 550; overflow-wrap: anywhere; }
body.ur-glass .cw-page .cw-actions { margin-bottom: 24px; }
body.ur-glass .cw-page .cw-actions > div { display: flex; gap: 12px; }
body.ur-glass .cw-page #contract-operations { margin-top: 24px; }
body.ur-glass .cw-page .cw-footer-panel { gap: 12px 20px; }
body.ur-glass .cw-page .cw-source-links a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 700px) {
  body.ur-glass .cw-page .cw-grid { grid-template-columns: minmax(0, 1fr); }
  body.ur-glass .cw-page .cw-heading { flex-direction: column; }
}
@media (max-width: 560px) {
  body.ur-glass .cw-page { padding-inline: 16px; }
  body.ur-glass .cw-page :is(.cw-panel, .cw-actions) { padding: 18px 16px; border-radius: 20px; }
  body.ur-glass .cw-page .cw-actions > div { flex-direction: column; align-items: stretch; }
  body.ur-glass .cw-page .ur-disclosure > summary { gap: 10px; }
}

body.ur-glass .cw-page .cw-next-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
body.ur-glass .cw-page .cw-next-actions a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; }
body.ur-glass .cw-page .cw-next-actions p { flex: 1 1 280px; }
body.ur-glass .cw-page .cw-saved-summary { margin-top: 12px; border: 1px solid #8190a9; border-radius: 16px; background: rgb(255 255 255 / .7); padding: 14px 16px; overflow-wrap: anywhere; }
body.ur-glass .cw-page .cw-saved-summary p { margin: 0; }
body.ur-glass .cw-page #contract-operation-status { margin: 4px 0; font-weight: 600; }
/* Segmented sections share mounted fields and one save action. */
body.ur-glass .cw-page { max-width: 1180px; }
body.ur-glass .cw-page .cw-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; padding: 5px; margin-bottom: 20px; border: 1px solid #bac5d6; border-radius: 18px; background: rgb(223 231 243 / .75); }
body.ur-glass .cw-page .cw-tabs button { min-width: 0; padding: 10px 8px; border: 1px solid transparent; border-radius: 13px; background: transparent; box-shadow: none; color: #40516a; font-size: 15px; }
body.ur-glass .cw-page .cw-tabs button[aria-selected="true"] { background: #fff; border-color: #a7b8ce; color: #153c70; box-shadow: 0 2px 6px rgb(22 41 76 / .10); }
body.ur-glass .cw-page .cw-tabs button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
body.ur-glass .cw-page .cw-main-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
body.ur-glass .cw-page .cw-main-layout > .cw-panel { min-width: 0; }
body.ur-glass .cw-page .cw-main-layout .cw-grid { gap: 16px; }
body.ur-glass .cw-page .cw-main-layout .cw-panel { padding: 22px; }
body.ur-glass .cw-page .cw-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 20px; }
body.ur-glass .cw-page .cw-source-candidate { min-width: 0; padding: 16px; border: 1px solid #b4c2d5; border-radius: 18px; background: rgb(255 255 255 / .65); }
body.ur-glass .cw-page .cw-source-candidate p { margin: 8px 0; font-size: 14px; color: #475569; }
body.ur-glass .cw-page .cw-source-candidate blockquote { margin: 12px 0; font-size: 14px; }
body.ur-glass .cw-page .cw-source-candidate button { width: 100%; }
body.ur-glass .cw-page #contract-source-content > h3 { margin: 16px 0 4px; font-size: 18px; }
body.ur-glass .cw-page .cw-source-links { gap: 8px 24px; margin: 4px 0; }
body.ur-glass .cw-page .cw-source-metadata { font-size: 14px; color: #475569; }
body.ur-glass .cw-page .cw-source-metadata summary { display: list-item; min-height: 44px; padding-block: 10px; cursor: pointer; }
body.ur-glass .cw-page #contract-operations { margin-top: 0; }
body.ur-glass .cw-page .cw-tab-panel[hidden], body.ur-glass .cw-page .cw-tabs [hidden] { display: none !important; }
@media (max-width: 1000px) {
  body.ur-glass .cw-page .cw-main-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 700px) {
  body.ur-glass .cw-page .cw-source-grid { grid-template-columns: minmax(0, 1fr); }
  body.ur-glass .cw-page .cw-main-layout .cw-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body.ur-glass .cw-page .cw-tabs { gap: 2px; padding: 4px; border-radius: 16px; }
  body.ur-glass .cw-page .cw-tabs button { padding: 10px 3px; font-size: 13px; }
  body.ur-glass .cw-page .cw-main-layout .cw-panel { padding: 18px 16px; }
}
