/* SOMAGON — Accords: compact cards and the agreement summary. Loaded last; theme tokens only. */

/* List: small cards, one column on a phone, two or more on a tablet. */
html[data-theme] #app .dc-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:12px;margin:0;padding:0}
html[data-theme] #app .dc-card{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr) 20px;gap:14px;align-items:start;min-width:0;margin:0;padding:12px;border:1px solid var(--sg-line);border-radius:16px;background:var(--sg-surface);color:var(--sg-text);cursor:pointer;box-shadow:none;text-align:left;transition:border-color .15s ease,transform .15s ease}
html[data-theme] #app .dc-card:hover{border-color:var(--sg-accent)}
html[data-theme] #app .dc-card:active{transform:scale(.99)}
html[data-theme] #app .dc-card:focus-visible{outline:3px solid var(--sg-accent);outline-offset:2px}
html[data-theme] #app .dc-thumb{width:76px;max-height:114px;overflow:hidden;border-radius:12px;background:#0B0910;align-self:start}
html[data-theme] #app .dc-thumb .v27-deal-thumb{width:100%;height:auto;min-height:0;max-height:none;margin:0;border:0;border-radius:0;aspect-ratio:auto}
html[data-theme] #app .dc-thumb .dv-photo-stage,html[data-theme] #app .dc-thumb .dv-image-frame{width:100%;height:auto;min-height:0}
html[data-theme] #app .dc-thumb .dv-image-frame>.dv-photo{width:100%;height:auto}
html[data-theme] #app .dc-body{display:grid;gap:3px;min-width:0}
html[data-theme] #app .dc-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
html[data-theme] #app .dc-top .v27-status-pill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;padding:3px 8px}
html[data-theme] #app .dc-amount{flex:none;font-size:15px;font-weight:800;color:var(--sg-text);white-space:nowrap}
html[data-theme] #app .dc-name{margin:4px 0 0;font-size:17px;line-height:1.25;font-weight:700;color:var(--sg-text);overflow-wrap:anywhere}
html[data-theme] #app .dc-meta{margin:0;font-size:13px;line-height:1.4;color:var(--sg-muted);overflow-wrap:anywhere}
html[data-theme] #app .dc-next{margin:2px 0 0;font-size:12px;line-height:1.4;color:var(--sg-text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html[data-theme] #app .dc-demo{font-size:11px;font-weight:600;color:var(--sg-accent)}
html[data-theme] #app .dc-chevron{align-self:center;color:var(--sg-muted);display:grid;place-items:center}
html[data-theme] #app .dc-progress{display:grid;gap:4px;margin-top:6px;width:100%;min-width:0}
html[data-theme] #app .dc-bars{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px}
html[data-theme] #app .dc-bars i{height:4px;border-radius:2px;background:var(--sg-line)}
html[data-theme] #app .dc-bars i.is-done{background:var(--sg-text)}
html[data-theme] #app .dc-bars i.is-current{background:var(--sg-accent)}
html[data-theme] #app .dc-progress small{font-size:11px;font-weight:600;color:var(--sg-muted)}

/* Financial summary: four small amounts on one row from tablet width. */
@media (min-width:640px){html[data-theme] #app .ac-deals .ac-balance .p31-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}

html[data-theme] #app .dc-timeline{list-style:none;margin:4px 0 0;padding:0;display:grid}
html[data-theme] #app .dc-timeline li{position:relative;display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:4px 10px;align-items:start;margin:0;padding:0 0 14px}
html[data-theme] #app .dc-timeline li::before{content:"";position:absolute;left:8px;top:16px;bottom:0;width:2px;background:var(--sg-line)}
html[data-theme] #app .dc-timeline li:last-child{padding-bottom:0}
html[data-theme] #app .dc-timeline li:last-child::before{display:none}
html[data-theme] #app .dc-timeline li>i{width:12px;height:12px;margin:3px 0 0 3px;border-radius:50%;border:2px solid var(--sg-accent);background:var(--sg-surface);box-sizing:border-box}
html[data-theme] #app .dc-timeline li.is-done>i{background:#15803D;border-color:#15803D}
html[data-theme] #app .dc-timeline li.is-stop>i{background:var(--sg-danger);border-color:var(--sg-danger)}
html[data-theme] #app .dc-timeline li>div{display:grid;gap:1px;min-width:0}
html[data-theme] #app .dc-timeline strong{font-size:14px;line-height:1.35;font-weight:600;color:var(--sg-text);overflow-wrap:anywhere}
html[data-theme] #app .dc-timeline span{font-size:13px;line-height:1.35;color:var(--sg-muted);overflow-wrap:anywhere}
html[data-theme] #app .dc-timeline time{font-size:12px;line-height:1.35;color:var(--sg-muted);white-space:nowrap;text-align:right}
@media (max-width:430px){html[data-theme] #app .dc-timeline li{grid-template-columns:18px minmax(0,1fr)}html[data-theme] #app .dc-timeline time{grid-column:2;text-align:left}}
html[data-app-text="large"] #app .dc-timeline li{grid-template-columns:18px minmax(0,1fr)}
html[data-app-text="large"] #app .dc-timeline time{grid-column:2;text-align:left}
html[data-app-text="large"] #app .dc-card{grid-template-columns:64px minmax(0,1fr) 16px;gap:10px}
html[data-app-text="large"] #app .dc-thumb{width:64px}
html[data-theme] #app [data-dc-messages] .dc-timeline li>i{border-color:var(--sg-muted)}
html[data-theme] #app .dc-note{margin:4px 0 10px;font-size:13px;line-height:1.45;color:var(--sg-muted)}
html[data-theme] #app .dc-mail{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin:8px 0 4px;padding:0 18px;border-radius:11px;background:var(--sg-text);color:var(--sg-bg);font-size:14px;font-weight:700;text-decoration:none}
html[data-theme] #app .dc-mail:focus-visible{outline:3px solid var(--sg-accent);outline-offset:2px}

/* Detail, one readable page: the agreement at a glance, what to do now, then folded rows. */
html[data-theme] #app .dc-hero{display:grid;grid-template-columns:76px minmax(0,1fr);gap:14px;align-items:start;margin:0 0 14px;padding:14px;border:1px solid var(--sg-line);border-radius:18px;background:var(--sg-surface);color:var(--sg-text)}
html[data-theme] #app .dc-hero-thumb{width:76px;max-height:114px;overflow:hidden;border-radius:12px;background:#0B0910}
html[data-theme] #app .dc-hero-thumb .v27-deal-thumb{width:100%;height:auto;min-height:0;max-height:none;margin:0;border:0;border-radius:0;aspect-ratio:auto}
html[data-theme] #app .dc-hero-thumb .dv-photo-stage,html[data-theme] #app .dc-hero-thumb .dv-image-frame{width:100%;height:auto;min-height:0}
html[data-theme] #app .dc-hero-thumb .dv-image-frame>.dv-photo{width:100%;height:auto}
html[data-theme] #app .dc-patch-count{position:static;display:inline-flex;align-items:center;justify-self:start;max-width:100%;margin:5px 0 2px;padding:3px 8px;border:1px solid var(--sg-line);border-radius:999px;background:var(--sg-soft);color:var(--sg-text);font:600 calc(.8125rem * var(--elan-ui-scale,1))/1.4 var(--sg-font,system-ui);overflow-wrap:anywhere}
html[data-theme] #app .dc-hero-main{display:grid;gap:2px;justify-items:start;min-width:0}
html[data-theme] #app .dc-hero-main .v27-status-pill{font-size:11px;padding:3px 8px;margin:0 0 4px}
html[data-theme] #app .dc-hero-name{margin:0;font-size:19px;line-height:1.25;font-weight:700;color:var(--sg-text);overflow-wrap:anywhere}
html[data-theme] #app .dc-hero-line{margin:0;font-size:14px;line-height:1.4;color:var(--sg-muted);overflow-wrap:anywhere}
html[data-theme] #app .dc-hero-line:empty{display:none}
html[data-theme] #app .dc-hero-amount{margin:6px 0 0;font-size:22px;line-height:1.1;font-weight:800;color:var(--sg-text)}
html[data-theme] #app .dc-hero-due{margin:4px 0 0;font-size:12px;line-height:1.4;font-weight:600;color:var(--sg-muted)}
html[data-theme] #app .dc-hero-links:empty{display:none}
html[data-theme] #app .dc-hero-links{margin-top:6px}

/* What the hero already says is not repeated: shared-file header, the older histories, the request headline, jump shortcuts. */
html[data-theme] #app .dc-sheet .sf-host .sf-header,html[data-theme] #app .dc-sheet .sf-history,html[data-theme] #app .dc-sheet .p36-offer-history,html[data-theme] #app .dc-sheet .dm-shortcuts{display:none!important}
html[data-theme] #app .dc-sheet .v27-deal-sheet-copy>.v27-status-pill,html[data-theme] #app .dc-sheet .v27-deal-sheet-copy>h2,html[data-theme] #app .dc-sheet .v27-deal-sheet-copy>.partnership-event{display:none!important}
html[data-theme] #app .dc-sheet .v27-deal-sheet-grid[hidden]{display:none!important}
html[data-theme] #app .dc-sheet .sf-host{margin-top:0}
html[data-theme] #app .dc-sheet .sf-demo-note{margin:0 0 10px}

/* Folded rows: one list, same look everywhere. */
html[data-theme] #app .dc-more{margin:22px 0 8px;border-top:1px solid var(--sg-line)}
html[data-theme] #app .dc-more-title{margin:18px 0 6px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--sg-muted)}
html[data-theme] #app .dc-more>details{margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid var(--sg-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html[data-theme] #app .dc-more>details>summary{display:flex!important;align-items:center;gap:10px;min-height:54px;margin:0!important;padding:0 2px!important;border:0!important;background:transparent!important;cursor:pointer;list-style:none;font-size:15px!important;font-weight:600!important;color:var(--sg-text)!important;text-transform:none!important;letter-spacing:0!important}
html[data-theme] #app .dc-more>details>summary::-webkit-details-marker{display:none}
html[data-theme] #app .dc-more>details>summary::before{content:none!important;display:none!important}
html[data-theme] #app .dc-more>details>summary::after{content:""!important;display:block!important;flex:none;width:8px;height:8px;margin-left:auto;border:0!important;border-right:2px solid var(--sg-muted)!important;border-bottom:2px solid var(--sg-muted)!important;background:none!important;transform:rotate(45deg);transition:transform .15s ease}
html[data-theme] #app .dc-more>details[open]>summary::after{transform:rotate(-135deg)}
html[data-theme] #app .dc-more>details>summary b{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--sg-soft);font-size:12px;color:var(--sg-text)}
html[data-theme] #app .dc-more>details>:not(summary){margin-bottom:16px}
html[data-theme] #app .dc-fold-body>*{margin-top:0}
html[data-theme] #app [data-dc-messages] .dc-timeline li>i{border-color:var(--sg-muted)}
html[data-theme] #app .dc-sheet .p31-next{margin:0 0 14px!important;padding:12px 14px!important;border:0!important;border-left:3px solid var(--sg-accent)!important;border-radius:12px!important;background:var(--sg-soft)!important;color:var(--sg-text)!important;opacity:1!important;font-size:14px!important;line-height:1.45!important}
html[data-theme] #app .dc-hero-links .bd-deal-profile-link{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:0;border:0;background:none;color:var(--sg-accent);font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
html[data-theme] #app .dc-hero-links .bd-deal-profile-link>span{display:none}
html[data-theme] #app .dc-hero-links .bd-deal-profile-link>small{font:inherit;color:inherit}
/* Header: one explicit close button in the same outline style as the other secondary actions. */
html[data-theme] #app .dc-sheet .form-dialog-header{min-height:0!important;padding:10px 16px!important;justify-content:flex-start}
html[data-theme] #app .dc-sheet .form-dialog-header>div{display:none!important}
html[data-theme][lang] #app .form-partnership-dialog .dc-close{position:static!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:auto!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:9px 12px!important;border:1px solid var(--sg-line)!important;border-radius:11px!important;background:transparent!important;color:var(--sg-text)!important;font:600 calc(.875rem * var(--elan-ui-scale,1))/1.3 var(--sg-font,system-ui)!important;cursor:pointer}
html[data-theme][lang] #app .form-partnership-dialog .dc-close::before{content:none!important;display:none!important}
html[data-theme][lang] #app .form-partnership-dialog .dc-close>svg{display:block!important;flex:none;width:18px;height:18px}
html[data-theme][lang] #app .form-partnership-dialog .dc-close:focus-visible{outline:2px solid var(--sg-accent)!important;outline-offset:2px!important}

/* Card and detail: event first, then the partner, then the zone and the date. */
html[data-theme] #app .dc-partner{margin:1px 0 0;font-size:14px;line-height:1.35;font-weight:600;color:var(--sg-text);overflow-wrap:anywhere}
html[data-theme] #app .dc-hero-partner{margin:2px 0 0;font-size:15px;line-height:1.35;font-weight:600;color:var(--sg-text);overflow-wrap:anywhere}

/* Financial summary, below the list: one compact card, amounts side by side, an export button. */
html[data-theme] #app .ac-deals .ac-balance{margin:22px 0 8px!important;padding:14px 16px!important;border:1px solid var(--sg-line)!important;border-radius:16px!important;background:var(--sg-surface)!important}
html[data-theme] #app .ac-balance-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;margin:0 0 10px}
html[data-theme] #app .ac-balance-head h2{margin:0!important}
html[data-theme] #app .ac-deals .ac-balance .p31-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important;margin:0!important}
@media(min-width:640px){html[data-theme] #app .ac-deals .ac-balance .p31-stats{grid-template-columns:repeat(auto-fit,minmax(0,1fr))!important}}
html[data-theme] #app .ac-deals .ac-balance .p31-stats article{display:grid!important;gap:2px!important;min-width:0;min-height:0!important;margin:0!important;padding:8px 10px 8px 0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html[data-theme] #app .ac-deals .ac-balance .p31-stats article span{font-size:12px!important;line-height:1.3!important;font-weight:500!important;color:var(--sg-muted)!important;letter-spacing:0!important;text-transform:none!important}
html[data-theme] #app .ac-deals .ac-balance .p31-stats article strong{font-size:18px!important;line-height:1.2!important;font-weight:750!important;color:var(--sg-text)!important;white-space:nowrap}
html[data-theme] #app .ac-balance-status{margin:6px 0 0;font-size:13px;color:var(--sg-muted)}
html[data-theme] #app .ac-balance-status:empty{display:none}

/* Unread replies are attached to their agreement, with the participant's name. */
.dc-activity{display:grid;gap:3px;margin:8px 0;padding:8px 10px;border-radius:9px;background:var(--sg-soft,#2c2935);color:var(--sg-text,#eee8fa);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.dc-activity b{color:var(--sg-accent,#b8a1f0);font-size:11px}
.dc-activity[hidden]{display:none}
