:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18212b;
  background: #f5f7fa;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
.container { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid #dfe5eb; }
.header-inner { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: #18212b; font-weight: 700; text-decoration: none; }
.account { display: flex; align-items: center; gap: 1rem; font-size: .9rem; color: #53606d; }
h1 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { margin: 0 0 .75rem; font-size: 1.2rem; }
h3 { margin: 1.5rem 0 .65rem; font-size: 1rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 2.5rem 0 1.5rem; }
.muted { color: #647180; margin-top: 0; }
.auth-card, .upload-card { background: #fff; border: 1px solid #dfe5eb; border-radius: .6rem; padding: 1.5rem; }
.auth-card { max-width: 28rem; margin: 5rem auto; }
.upload-card { margin-bottom: 2.25rem; }
.stack { display: grid; gap: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
input[type=email], input[type=password], input[type=file] { width: 100%; padding: .65rem .7rem; border: 1px solid #b9c3cd; border-radius: .35rem; background: #fff; font: inherit; }
input:focus, select:focus, button:focus, a:focus, summary:focus-visible { outline: 3px solid #b9d7ff; outline-offset: 2px; }
.signing-form { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.signing-form label { margin: 0; }
.signing-form select { max-width: 100%; padding: .45rem .6rem; border: 1px solid #b9c3cd; border-radius: .35rem; background: #fff; font: inherit; }
.upload-form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.35rem; padding: .45rem .8rem; border: 1px solid #b9c3cd; border-radius: .35rem; background: #fff; color: #18212b; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:disabled { opacity: .7; cursor: wait; }
.button-primary { background: #1557a6; border-color: #1557a6; color: #fff; }
.button-secondary { background: #3f2f86; border-color: #3f2f86; color: #fff; }
.button-danger { background: #fff4f3; border-color: #d9a19b; color: #9c2d25; }
.button-quiet { min-height: auto; border: 0; padding: .2rem; color: #1557a6; }
.button-small { min-height: 2rem; padding: .3rem .55rem; font-size: .85rem; }
.flash { margin: 1.25rem 0; padding: .8rem 1rem; border-radius: .35rem; background: #eaf2fb; border: 1px solid #bbd2ea; }
.flash-alert { background: #fff4f3; border-color: #e7b6b0; color: #7e211a; }
.flash-notice { background: #edf8ef; border-color: #b9ddc0; color: #245c2d; }
.flash-popup { position: fixed; top: 1rem; right: 1rem; z-index: 20; width: min(30rem, calc(100vw - 2rem)); margin: 0; padding-right: 2.7rem; box-shadow: 0 .35rem 1.2rem rgba(32, 45, 58, .16); }
.flash-dismiss { position: absolute; top: .45rem; right: .55rem; border: 0; padding: .1rem .35rem; background: transparent; color: inherit; font: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.flash-dismiss:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.operation-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .42); }
.operation-progress { display: grid; justify-items: center; gap: .65rem; max-width: 26rem; padding: 1.5rem; border: 1px solid #dfe5eb; border-radius: .75rem; background: #fff; box-shadow: 0 1rem 3rem rgba(15, 23, 42, .2); text-align: center; }
.operation-progress p { margin: 0; }
.operation-spinner { width: 2rem; height: 2rem; border: .25rem solid #dfe5eb; border-top-color: #1557a6; border-radius: 50%; animation: operation-spin .8s linear infinite; }
.is-submitting { pointer-events: none; }
.signature-reset { display: grid; justify-items: start; gap: .35rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e8edf1; }
.signature-reset p { margin: 0; font-size: .88rem; }
.signed-document-card { margin-bottom: 2.25rem; padding: 1.5rem; border: 1px solid #b9ddc0; border-left: 5px solid #3a9954; border-radius: .65rem; background: linear-gradient(135deg, #f2fbf4, #fff); box-shadow: 0 .35rem 1rem rgba(39, 92, 52, .08); }
.signed-document-heading { display: flex; align-items: flex-start; gap: .9rem; }
.signed-document-heading h2 { margin: .12rem 0 .2rem; }
.signed-document-heading .muted { margin: 0; }
.signed-document-heading .status-badge { margin-left: auto; }
.signed-document-mark { display: inline-grid; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 50%; background: #3a9954; color: #fff; font-size: 1.35rem; font-weight: 800; }
.signed-document-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.35rem 0; }
.signed-document-facts div { display: grid; gap: .2rem; min-width: 0; padding: .7rem .8rem; border: 1px solid #d7eadb; border-radius: .4rem; background: rgba(255, 255, 255, .75); }
.signed-document-facts span { color: #52715a; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .025em; }
.signed-document-facts strong { overflow-wrap: anywhere; }
.signed-document-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid #d7eadb; }
@keyframes operation-spin { to { transform: rotate(360deg); } }
.empty-state { padding: 2rem; border: 1px dashed #b9c3cd; border-radius: .5rem; color: #647180; background: #fff; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dfe5eb; border-radius: .5rem; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: .8rem .75rem; text-align: left; border-bottom: 1px solid #e8edf1; vertical-align: middle; }
th { font-size: .82rem; color: #53606d; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: .7rem; color: #1557a6; }
.details { display: grid; grid-template-columns: minmax(11rem, 18rem) 1fr; max-width: 760px; margin: 1rem 0 2rem; background: #fff; border: 1px solid #dfe5eb; border-radius: .5rem; overflow: hidden; }
.details dt, .details dd { margin: 0; padding: .75rem 1rem; border-bottom: 1px solid #e8edf1; }
.details dt { font-weight: 600; color: #53606d; background: #f8fafc; }
.details dd:nth-last-child(-n+2), .details dt:nth-last-child(-n+2) { border-bottom: 0; }
.break { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.danger-zone { display: flex; justify-content: flex-end; }
.document-danger-zone, .verification-danger-zone { gap: .6rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e8edf1; }
.quick-facts.document-summary { margin: 0 0 1.5rem; }
.document-summary > div:first-child { grid-column: span 2; }
.quick-facts.signing-summary { margin-top: 0; }
.metadata-disclosure { margin: 1.25rem 0; }
.metadata-disclosure > summary, .troubleshooting > summary { padding: .75rem 0; }
.metadata-disclosure .details { border: 0; border-radius: 0; }
.metadata-disclosure .details dt, .metadata-disclosure .details dd { background: transparent; }
.troubleshooting { margin-top: 1.25rem; }
@media (max-width: 650px) { .document-summary > div:first-child { grid-column: auto; } }
.verification-card { margin-bottom: 1.25rem; }
.verification-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.details-compact { margin-bottom: 1rem; }
.dashboard-heading { margin-bottom: 1.25rem; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.75rem; }
.workflow-card { background: #fff; border: 1px solid #dfe5eb; border-top-width: 4px; border-radius: .65rem; padding: 1.35rem; }
.workflow-signing { border-top-color: #1557a6; }
.workflow-verification { border-top-color: #3f2f86; }
.workflow-card-heading { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1.2rem; }
.workflow-card-heading p { margin: 0; color: #647180; }
.workflow-marker { flex: 0 0 2rem; width: 2rem; height: 2rem; display: inline-grid; place-items: center; border-radius: 50%; background: #edf3fa; color: #1557a6; font-weight: 800; }
.workflow-verification .workflow-marker { background: #f0edfa; color: #3f2f86; }
.form-hint { margin: .75rem 0 0; color: #647180; font-size: .88rem; }
.dashboard-section { margin: 0 0 3rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.count-badge { min-width: 2rem; padding: .2rem .55rem; border-radius: 999px; background: #e8edf1; text-align: center; font-weight: 700; }
.cell-meta { display: block; margin-top: .15rem; color: #647180; font-size: .82rem; }
.status-badge { display: inline-flex; align-items: center; min-height: 1.7rem; padding: .2rem .55rem; border: 1px solid transparent; border-radius: 999px; font-size: .78rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.status-success { color: #17612c; background: #e8f7ec; border-color: #aad8b6; }
.status-success-muted { color: #456b50; background: #edf3ee; border-color: #b8cbbd; }
.status-danger { color: #84261f; background: #fff0ee; border-color: #e6b0aa; }
.status-warning { color: #77510b; background: #fff7dd; border-color: #e7cf83; }
.status-orange { color: #8a4210; background: #fff0e1; border-color: #e3b181; }
.status-neutral { color: #4f5d6a; background: #f0f3f5; border-color: #ccd4db; }
.status-ready { color: #124c83; background: #e9f3fc; border-color: #acd0ee; }
.status-qualified { color: #493089; background: #f0ebff; border-color: #c8b9ed; }
.badge-group { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; flex-wrap: wrap; }
.verification-history { display: grid; gap: 1.25rem; }
.verification-card { background: #fff; border: 1px solid #dfe5eb; border-left-width: 5px; border-radius: .65rem; padding: 1.4rem; }
.verification-card.result-success { border-left-color: #3a9954; }
.verification-card.result-success-muted { border-left-color: #79a487; }
.verification-card.result-danger { border-left-color: #c34a40; }
.verification-card.result-warning { border-left-color: #d49a27; }
.verification-card.result-orange { border-left-color: #d36e1f; }
.verification-card.result-neutral { border-left-color: #8995a1; }
.verification-heading h2 { margin: .15rem 0 0; }
.verification-actions { display: grid; justify-items: end; gap: .65rem; }
.delete-disclosure { position: relative; }
.delete-disclosure summary { list-style: none; }
.delete-disclosure summary::-webkit-details-marker { display: none; }
.delete-confirmation { display: grid; justify-items: end; gap: .55rem; width: min(22rem, 80vw); margin-top: .45rem; padding: .7rem; border: 1px solid #e2b1ac; border-radius: .4rem; background: #fff8f7; color: #7e211a; font-size: .85rem; }
.eyebrow { color: #647180; font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.result-description { margin: .9rem 0 1.15rem; }
.result-subclassification { margin: -.45rem 0 1.15rem; color: #77510b; font-size: .9rem; }
.document-overview { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem 1.2rem; border: 1px solid #dfe5eb; border-radius: .6rem; background: #fff; }
.document-overview-main { display: grid; gap: .1rem; }
.summary-metrics { display: grid; grid-template-columns: repeat(5, minmax(7rem, 1fr)); gap: .65rem; margin: 1rem 0 1.4rem; }
.summary-metric { display: grid; gap: .15rem; padding: .35rem 0; align-content: start; }
.summary-value { font-size: 1.15rem; font-weight: 750; color: #18212b; }
.summary-label { color: #647180; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .025em; }
.crypto-group { margin-top: 1.6rem; padding-top: 1.35rem; border-top: 1px solid #dfe5eb; }
.timestamp-group { border-top: 2px solid #d9d2ef; }
.section-heading-compact { margin-bottom: .75rem; }
.section-heading-compact h3 { margin: .1rem 0 0; }
.crypto-list { display: grid; gap: 1.25rem; }
.crypto-result { min-width: 0; padding: .4rem 0; }
.crypto-result + .crypto-result { padding-top: 1.25rem; border-top: 1px solid #e8edf1; }
.crypto-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.crypto-heading h4 { margin: .15rem 0 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.crypto-heading > div:first-child { min-width: 0; }
.crypto-subject { margin: .2rem 0 0; color: #53606d; }
.quick-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .55rem; margin: 1rem 0; }
.quick-facts div { min-width: 0; padding: .35rem 0; }
.quick-facts dt { color: #647180; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.quick-facts dd { margin: .18rem 0 0; overflow-wrap: anywhere; font-weight: 650; }
.disclosure { margin-top: .8rem; border-top: 1px solid #e1e7ec; }
.disclosure summary { padding: .75rem .15rem .15rem; color: #1557a6; font-weight: 700; cursor: pointer; }
.disclosure summary:hover { color: #0d407e; }
.disclosure[open] summary { margin-bottom: .7rem; }
.disclosure .details { max-width: none; margin: 0; }
.disclosure-compact { min-width: min(28rem, 55%); margin: 0; border: 0; }
.disclosure-compact summary { padding: .35rem 0; text-align: right; }
.verification-history-disclosure { margin-top: 1.25rem; padding: 0 1rem .9rem; border: 1px solid #dfe5eb; border-radius: .55rem; background: #fff; }
.verification-history-disclosure > summary { padding: .9rem 0; }
.verification-history-disclosure .verification-history { margin-top: .4rem; }
.verification-history-actions { display: flex; justify-content: flex-end; margin: 0 0 .85rem; }
.verification-more-info { margin-top: 1.4rem; }
.verification-more-info > summary { padding: 1rem 0; }
.verification-extra-section, .verification-technical { margin-top: 1.4rem; }
.verification-extra-section h4 { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.verification-more-info .details { border: 0; border-radius: 0; background: transparent; }
.verification-more-info .details dt, .verification-more-info .details dd { padding: .6rem 0; background: transparent; }
.verification-more-info .details dd { padding-left: 1rem; overflow-wrap: anywhere; }
@media (max-width: 650px) { .crypto-heading .badge-group { justify-content: flex-start; } .verification-more-info .details dd { padding-left: 0; } }
.inline-warning { padding: .65rem .8rem; border-radius: .35rem; background: #fff7dd; color: #77510b; }
form.button_to { display: inline-flex; margin: 0; }
@media (max-width: 650px) { .page-heading, .verification-heading, .crypto-heading, .document-overview { align-items: stretch; flex-direction: column; } .verification-actions { justify-items: start; } .account span { display: none; } .details { grid-template-columns: 1fr; } .details dt { border-bottom: 0; padding-bottom: .2rem; } .details dd { padding-top: .2rem; } .quick-facts { grid-template-columns: 1fr; } .disclosure-compact { min-width: 0; width: 100%; } .disclosure-compact summary { text-align: left; } .signed-document-heading { flex-wrap: wrap; } .signed-document-heading .status-badge { margin-left: 0; } .signed-document-facts { grid-template-columns: 1fr; } }
@media (max-width: 850px) { .workflow-grid { grid-template-columns: 1fr; } .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
