/* One quiet set of editing surfaces, shared by pages and declared entities. */
.main { --ground:#f7f6fa; --surface:#fff; --field:#fff; --ink:#271d35; --muted:#645b6e; --line:#ddd7e4; --lilac:#512787; --focus:#6734a4; --success:#146b48; --danger:#a51b34; --shadow:0 3px 12px #271d350a; background:var(--ground); color:var(--ink); }
.main .card,.main .record-card,.main .page-section,.main .form-card { border:1px solid var(--line); box-shadow:none; }
.main .card { min-height:120px; padding:22px; }
.main .cards { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); max-width:1100px; }
.main .card h2 { font-size:19px; }
.main .metric { font-size:24px; }
.main .card__icon { width:32px; height:32px; margin-bottom:10px; background:transparent; color:var(--sovereign); }
.main .page-head h1 { font-size:clamp(25px,3vw,34px); }
.main .topbar a { color:#dfcaf8; }
.sidebar .nav a .icon { color:inherit; }
.main input,.main textarea,.main select { color:#271d35; background:#fff; border:1px solid #c8bfD1; }
.main .heading-input { min-height:44px; height:46px; font-size:16px; font-weight:400; }
.main .plain-writing { min-height:150px; line-height:1.6; font-size:16px; font-weight:400; resize:vertical; }
.tag-reference { border-top:1px solid var(--line); margin-top:24px; padding-top:20px; }
.tag-reference h2 { font-size:17px; margin-top:20px; }
.tag-copy { display:flex; gap:10px; margin-top:8px; }
.tag-copy input { flex:1; min-width:0; font-family:inherit; font-size:14px; }
.tag-copy button { flex:none; }
.sidebar .nav .icon { width:22px; height:22px; color:inherit; stroke:currentColor; }
.sidebar { overflow-y:auto; overscroll-behavior:contain; }
.sidebar__brand,.sidebar__account,.sidebar .nav { flex-shrink:0; }
.main .card__icon { width:auto; height:auto; display:block; }
.main .page-field--heading input { font-size:16px; font-weight:400; }
.main .page-section { padding:24px; border-radius:7px; }
.main .page-field { margin-bottom:20px; }
.main .field { margin-bottom:20px; }
.field-caption { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin-bottom:7px; }
.main .field-caption label,.main .field-caption h2 { margin:0; font-size:16px; font-weight:500; }
.main .revert-control { display:inline-flex; flex:none; align-items:center; justify-content:center; width:44px; height:44px; min-height:44px; padding:10px; border:0; border-radius:6px; color:var(--lilac); background:transparent; cursor:pointer; }
.main .revert-control:hover { background:#eee8f5; }
.main .revert-control .icon { width:21px; height:21px; }
.main .page-grid { grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); }
.main .page-card { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:15px; padding:24px 18px; min-height:150px; }
.main .page-card h2 { margin:0; font-size:18px; line-height:1.4; }
.page-topic-icon { color:var(--lilac); }
.page-topic-icon .icon { width:36px; height:36px; }
.main .tag-toolbar,.main .text-preview-button { display:none!important; }
.simple-writing { background:#fff; color:#271d35; border:1px solid #bdb3c8; border-radius:5px; overflow:hidden; }
.writing-area { min-height:130px; padding:14px; line-height:1.65; overflow-wrap:anywhere; white-space:pre-wrap; outline-offset:-2px; }
.writing-area p { margin:0 0 .85em; }
.writing-area p:last-child { margin-bottom:0; }
.writing-area ul,.writing-area ol { padding-left:1.8em; margin:.4em 0; }
.writing-area h2,.writing-area h3 { font-size:1.1em; line-height:1.5; }
.writing-tools { display:flex; align-items:center; gap:4px; padding:3px 6px; background:#f5f3f8; border-bottom:1px solid #ddd7e4; }
.writing-tools button,.writing-tools select { width:auto; min-width:0; min-height:36px; margin:0; padding:4px 10px; border:0; border-radius:3px; background:transparent; color:#51405e; font-size:13px; }
.writing-tools button:hover { background:#e8e0f1; }
.writing-tools select { max-width:130px; }
.shared-value { background:#eee8f5; color:#513175; padding:0 4px; border-radius:3px; font-size:.9em; white-space:normal; }
.writing-link { max-width:440px; width:calc(100% - 32px); background:white; color:#271d35; border:1px solid #c8bfd1; border-radius:8px; padding:24px; }
.writing-link label { color:#271d35; }
.simple-form { max-width:780px; padding:24px; border:1px solid var(--line); border-radius:7px; background:white; }
.simple-form .field>label { display:block; font-weight:500; font-size:15px; margin-bottom:7px; }
.simple-list-filter { display:flex; gap:16px; align-items:end; max-width:840px; margin-bottom:12px; }
.simple-list-filter label { flex:1; min-width:0; }
.simple-list-filter input,.simple-list-filter select { margin-top:6px; }
.simple-list-filter button { min-height:44px; }
.simple-record-list { border:1px solid var(--line); border-radius:6px; background:white; overflow:hidden; }
.simple-record { display:grid; grid-template-columns:minmax(0,1fr) auto 150px; gap:20px; align-items:center; padding:18px 20px; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line); }
.simple-record:last-child { border-bottom:0; }
.simple-record:hover { background:#f4f0fa; }
.simple-record strong { font-size:16px; font-weight:500; overflow-wrap:anywhere; }
.simple-record small,.simple-record span { color:var(--muted); font-size:13px; }
.simple-picture { margin:8px 0 16px; }
.simple-picture img { max-width:100%; width:auto; height:180px; object-fit:contain; border-radius:4px; }
.picture-change { margin-bottom:16px; }
.picture-change label { display:block; margin-bottom:7px; }
.session-step { padding:12px; border:1px solid var(--line); margin-bottom:12px; }
.session-step label { display:block; margin-bottom:12px; }
.image-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:18px; }
.integrated-image { display:flex; flex-direction:column; padding:14px; gap:10px; min-width:0; }
.integrated-image img { width:100%; height:155px; object-fit:cover; border-radius:3px; }
.integrated-image strong { font-size:15px; overflow-wrap:anywhere; }
.integrated-image small { color:var(--muted); }
.simple-savebar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding-top:20px; margin-top:20px; border-top:1px solid var(--line); }
.simple-savebar>span { color:var(--muted); font-size:13px; margin-left:auto; }
.secondary-actions { display:contents; }
.main .page-savebar { position:static; background:white; color:var(--ink); border:1px solid var(--line); box-shadow:none; margin-top:20px; }
.main .page-savebar .actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.main .page-savebar .btn { width:auto; }
.main .page-savebar #publish-page { order:-2; }
.main .page-savebar #save-page { order:-1; }
.main .page-savebar .actions>a { order:1; }
.main .page-picture .image-comparison { grid-template-columns:1fr; }
.main .page-picture .image-preview { height:180px; background:#f5f3f8; }
.main .page-picture .image-preview img { object-fit:contain; }
.main .image-reference figcaption { font-size:13px; }
.main .success { background:#edf8f1; color:#175235; border-color:#b7dfc6; }
.main .error { background:#fff1f1; color:#8c1830; border-color:#e5b3bd; }
@media(max-width:600px) {
 .main .cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .main .card { padding:18px 12px; }
 .main .card h2 { font-size:16px; }
 .main .page-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .main .page-card { padding:18px 10px; min-height:145px; }
 .main .page-card h2 { font-size:15px; }
 .simple-form,.main .page-section { padding:16px; }
 .simple-list-filter { gap:10px; flex-wrap:wrap; }
 .simple-record { grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; padding:16px; }
 .simple-record strong { grid-column:1/-1; }
 .simple-savebar { gap:8px; }
 .simple-savebar>span { flex-basis:100%; margin:0; }
 .writing-tools button,.writing-tools select { min-height:44px; font-size:14px; }
 .writing-area { min-height:150px; font-size:16px; }
 .main .page-savebar .actions { display:flex; }
 .image-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .integrated-image { padding:10px; }
 .integrated-image img { height:120px; }
}
