/* V11: company directory and compact details; V10 palettes and home stay intact. */
.company-browser,#companies,.directory-company,.directory-company>*{min-width:0}
#company-list-back{display:none}
.directory-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:16px 0}
.directory-controls label{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
.directory-controls select{min-width:0;font-size:16px;padding:10px}
.list-tools .wide{grid-column:1/-1}
#company-filter-clear{min-height:44px;font-size:14px;text-align:left}
.data-tools{margin:12px 0 18px}
.data-tools .list-tools{margin:4px 0}
#companies .directory-company{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:10px 0;padding:16px;white-space:normal;text-align:left;box-shadow:none}
#companies .directory-company.active{padding:15px}
#companies .directory-name{line-height:1.55;font-size:16px;margin:0;overflow-wrap:anywhere}
#companies .directory-region,#companies .directory-result,#companies .directory-date{display:grid;grid-template-columns:6.5em minmax(0,1fr);gap:8px;font-size:14px;line-height:1.6;overflow-wrap:anywhere;font-weight:500}
#companies .directory-label{color:#52686e;font-size:12px;font-weight:400}
body.company-list-mode #data-pane{display:block;max-width:1180px}
body.company-list-mode #data-pane>.company-browser{display:block!important;width:100%;margin:0}
body.company-list-mode #workspace{display:none}
body.company-list-mode #company-list-back{display:inline-flex;min-height:44px;align-items:center;color:var(--teal);background:transparent;border:0;padding:8px 0;margin-bottom:12px}
body.company-list-mode #company-list-open{display:none}
body.company-list-mode #companies{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}
body.company-list-mode #companies .directory-company{height:100%;margin:0}
.company-overview{border:1px solid #c9d9d9;border-radius:10px;padding:14px;margin-bottom:16px;overflow-wrap:anywhere}
.company-overview p{line-height:1.75;white-space:pre-wrap;margin:8px 0}
.company-overview .hint{margin:8px 0 0}
.company-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.company-quick-actions>a{min-height:44px;display:flex;align-items:center;justify-content:center;padding:10px 12px;border:1px solid #c9d9d9;border-radius:8px;font-size:14px;line-height:1.5;min-width:0;max-width:100%;overflow-wrap:anywhere;color:var(--teal);background:#edf8f6;text-decoration:none}
.company-history{margin:22px 0;min-width:0}
.company-history .section-title{flex-wrap:wrap;margin-bottom:12px}
.company-history .record{margin-top:10px;padding:14px;min-width:0}
.record .record-extra{margin-top:10px;padding-top:6px}
.record .record-extra summary{font-size:13px;min-height:44px}
.company-history .record-header{flex-wrap:wrap;gap:8px}
.company-history .record-actions{gap:6px}
.company-history .record-actions button{min-height:44px;min-width:44px}
#history-search{font-size:16px;min-height:48px;border:1px solid #cbd8db;border-radius:8px;padding:12px}
.company-info-details{margin:20px 0}
.company-info-details>summary{line-height:1.7;gap:8px;min-height:48px}
.company-info-details[open]>summary{margin-bottom:14px}
.company-info-details .info{margin-top:18px}
.company-info-details .visit-overview{margin-top:16px}
.company-history .history-tools{margin:10px 0 14px}
.history-all-status{font-size:13px;color:#52686e;line-height:1.7}
#future-pane .discover-session-actions>*{flex:1 1 96px;min-height:44px;padding:10px 8px;font-size:14px}
#future-pane #discover-history{margin:10px 0 18px;padding-top:8px}
.discover-history-list{display:grid;gap:8px;min-width:0}
.discover-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;min-width:0}
.discover-history-use{text-align:left;min-width:0;padding:10px 12px;line-height:1.65;overflow-wrap:anywhere}
.discover-history-use strong{display:block;font-size:14px;white-space:normal;overflow-wrap:anywhere}
.discover-history-use small{display:block;font-size:12px;font-weight:400;color:#52686e}
.discover-history-delete{min-width:52px;min-height:44px;padding:8px;font-size:13px}
#discover-history-status:empty{display:none}
@supports(content-visibility:auto){#companies .directory-company{contain-intrinsic-size:auto 176px}.company-history .record{content-visibility:auto;contain-intrinsic-size:auto 190px}}
@media(min-width:761px){body.company-list-mode #companies{grid-template-columns:repeat(2,minmax(0,1fr))}body.company-list-mode .directory-controls{max-width:600px}body.company-list-mode .list-tools{grid-template-columns:repeat(4,minmax(0,1fr))}body.company-list-mode .list-tools .wide{grid-column:auto}}
@media(min-width:1080px){body.company-list-mode #companies{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:360px){.directory-controls{gap:8px}.directory-controls select{padding:8px;font-size:15px}.company-history .section-title{gap:8px}.company-info-details>summary{font-size:13px}.company-quick-actions>a{flex:1 1 110px}}
@media screen{
 html[data-theme="dark"] #companies .directory-label,html[data-theme="dark"] .history-all-status{color:var(--app-muted)}
 html[data-theme="dark"] .company-overview{background:var(--app-surface);border-color:var(--app-line);color:var(--app-text)}
 html[data-theme="dark"] .company-quick-actions>a{background:var(--app-raised);border-color:var(--app-line);color:var(--app-accent)}
 html[data-theme="dark"] #history-search{background:var(--app-input);border-color:var(--app-line);color:var(--app-text)}
 html[data-theme="dark"] .discover-history-use small{color:var(--app-muted)}
}

/* Unified read-only company card, compact on phones. */
.company-context{margin:8px 0;overflow-wrap:anywhere}
.company-context p{margin:6px 0;line-height:1.6;white-space:pre-wrap}
.company-context small,.industry-status{display:block;font-size:12px;font-weight:400;color:#52635e}
.company-secondary,.company-context details{margin:10px 0;border-top:1px solid #d7e2de;padding-top:8px}
.company-secondary>summary,.company-context summary{min-height:44px;display:list-item;align-content:center;padding:6px 4px;overflow-wrap:anywhere;box-sizing:border-box}
.company-overview{padding:10px 12px;margin-bottom:8px}
.company-overview p{margin:4px 0;line-height:1.5}
.company-overview h3{font-size:14px;margin:8px 0 3px}
.card-head .tag{min-width:0;white-space:normal;overflow-wrap:anywhere}
.sales-summary{margin:8px 0;padding:10px 12px}
.sales-summary h3{font-size:14px;margin:0 0 6px}
.sales-summary>p{margin:5px 0;line-height:1.5}

.card-head .section-title>.tag{flex:1;max-width:100%}
.card-head #edit-company{flex-shrink:0}

@media screen{html[data-theme="dark"] .company-context small,html[data-theme="dark"] .industry-status{color:var(--app-muted)}html[data-theme="dark"] .company-secondary,html[data-theme="dark"] .company-context details{border-color:var(--app-line)}}

#storage-gate .startup-origin{overflow-wrap:anywhere;word-break:break-word}
#storage-gate input[type="file"]{box-sizing:border-box;max-width:100%;width:100%;min-height:44px}
#storage-gate .startup-preview{overflow-wrap:anywhere;white-space:normal}
#storage-gate .startup-approval{display:flex;align-items:flex-start;gap:10px;min-height:44px;margin:14px 0;line-height:1.6}
#storage-gate .startup-approval input{flex:0 0 auto;width:20px;height:20px;margin-top:3px}
#storage-gate button{white-space:normal;overflow-wrap:anywhere;min-height:44px;margin:6px 0}
