:root{color-scheme:light;--ink:#123a35;--text:#223936;--muted:#4a625e;--line:#d9e1d9;--bg:#faf6ed;--white:#fff}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:1rem/1.5 "Segoe UI",Arial,sans-serif}
a{color:var(--ink)}
.top{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:76px;padding:12px max(16px,calc((100vw - 960px)/2));border-bottom:1px solid var(--line);background:var(--white)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;line-height:1.2}
.brand img{object-fit:contain}
.top>a:last-child{font-size:.88rem;white-space:nowrap}
.shell{width:min(960px,calc(100% - 32px));margin:clamp(32px,6vw,68px) auto}
h1,h2,p{margin:0}
h1,h2{font-family:Georgia,serif;color:var(--ink);line-height:1.14}
h1{font-size:clamp(1.8rem,5vw,2.8rem)}
h2{font-size:1.55rem}
.card,dialog,.items li{background:var(--white);border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 28px #123a350a}
.login{width:min(100%,470px);margin:auto;padding:clamp(20px,5vw,36px)}
.login>p,.dash-head p,.hint{color:var(--muted);margin-top:10px}
form{display:grid;gap:14px}
.login form{margin-top:20px}
.join{border-top:1px solid var(--line);margin-top:22px;padding-top:20px}
.join p,.access p{margin-top:8px;color:var(--muted)}
.verify-actions{display:grid;gap:10px;margin-top:20px}
.access{margin-top:22px;padding:16px}
.access summary{font-weight:700;color:var(--ink);cursor:pointer}
.access form{grid-template-columns:minmax(0,1fr) auto;align-items:end;margin-top:14px}
.access .items li{display:grid;grid-template-columns:minmax(0,1fr) auto}
.invite-link{grid-column:1/-1;font-size:.84rem}
label{display:grid;gap:5px;color:var(--ink);font-size:.9rem;font-weight:650}
input,textarea,select,button{font:inherit}
input,textarea,select{width:100%;min-height:44px;padding:8px 11px;color:var(--text);background:#fff;border:1px solid #b6c6c0;border-radius:8px}
textarea{resize:vertical}
button{min-height:44px;padding:8px 14px;border:1px solid #b6c6c0;border-radius:9px;color:var(--ink);background:var(--white);font-weight:650;cursor:pointer;transition:background .18s,border-color .18s}
button:hover{background:#eaf3ef;border-color:#71948b}
button.primary{background:var(--ink);color:#fff;border-color:var(--ink)}
button.primary:hover{background:#23584f}
button.quiet{border-color:transparent;text-decoration:underline}
button:disabled{opacity:.58;cursor:wait}
:focus-visible{outline:3px solid #b67015;outline-offset:3px}
.dash-head,.tools,.editor-head,.form-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tools{justify-content:space-between;align-items:end;margin-top:28px}
.tools label{width:min(48%,240px)}
.items{display:grid;gap:10px;list-style:none;padding:0;margin:12px 0}
.items li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px}
.items li strong{display:block;overflow-wrap:anywhere}
.items li small,.hint{font-size:.85rem;color:var(--muted)}
.item-actions{display:flex;gap:7px;flex-wrap:wrap}
.status{margin-top:8px;color:var(--ink);font-size:.9rem}
.status:empty{display:none}
.status.error{color:#972c20}
dialog{width:min(570px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:clamp(16px,4vw,26px)}
dialog::backdrop{background:#102d28a0}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#post-fields,#photo-fields{display:grid;gap:12px}
.form-actions{justify-content:flex-end}
.shell:has(#dashboard:not([hidden])){width:min(1120px,calc(100% - 32px));margin-top:clamp(22px,4vw,44px)}
.dash-head{padding:clamp(20px,4vw,38px);border-radius:22px;background:linear-gradient(120deg,#11352f,#22554b);color:#f8fffb;box-shadow:0 16px 32px #123a351c}
.dash-head h1{color:#fff;margin-top:7px}
.dash-head p{max-width:56ch;color:#deece5}
.dash-head .account{margin:0;font-size:.8rem;overflow-wrap:anywhere}
.dash-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.dash-actions button{white-space:nowrap}
.connection{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #ffffff4d;border-radius:999px;font-size:.78rem;white-space:nowrap}
.connection::before{content:"";width:7px;height:7px;border-radius:50%;background:#e2c48c}
.connection.is-live::before{background:#8ce6ae}
.public-pages{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 22px}
.public-pages a{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;text-decoration:none;font-size:.86rem;font-weight:650}
.public-pages a:hover{background:#edf5ee;border-color:#8cae9c}
.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}
.summary button{display:flex;align-items:center;min-width:0;gap:10px;padding:13px;text-align:left;border-color:var(--line);border-radius:14px}
.summary button[aria-pressed="true"]{background:#e5f1ea;border-color:#689381}
.summary button span{font-size:.86rem;line-height:1.3}
.summary strong{display:block;margin-top:3px;font-family:Georgia,serif;font-size:1.45rem}
.summary svg{width:32px;height:32px;padding:6px;flex:none;border-radius:9px;background:#e5f1ea;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}
.workspace{padding:clamp(14px,3vw,24px)}
.workspace-head{display:flex;justify-content:space-between;gap:12px;align-items:center}
.workspace-head p{margin-top:4px;color:var(--muted);font-size:.85rem}
.workspace .tools{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px;margin:16px 0}
.workspace .tools label{width:auto;min-width:0}
.workspace .items{margin-bottom:0}
.workspace .items li{box-shadow:none;border-radius:12px;align-items:center}
.item-info{min-width:0;flex:1}
.item-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.item-title strong{color:var(--ink)}
.item-info p{font-size:.86rem;color:var(--muted);margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.badge{padding:3px 7px;border-radius:999px;background:#fcf0d8;color:#684a12;font-size:.72rem;font-weight:650;white-space:nowrap}
.badge.live{background:#e5f1ea;color:#165841}
.item-actions a{display:inline-flex;align-items:center;padding:6px 10px;min-height:38px;font-size:.82rem}
.item-actions button{min-height:38px;font-size:.82rem;padding:6px 10px}
.placement{display:flex;gap:8px 16px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:10px;margin:0}
.placement legend{font-size:.84rem;color:var(--muted)}
.placement label{display:flex;align-items:center;gap:6px}
.placement input{width:16px;min-height:0;accent-color:var(--ink)}
.editor-preview{display:grid;gap:9px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f3f7f3;overflow-wrap:anywhere}
.editor-preview h3{margin:0;color:var(--ink);font-size:.8rem}
.editor-preview img{width:100%;max-height:180px;object-fit:contain;border-radius:8px;background:#e4ede7}
.editor-preview span,.editor-preview p{font-size:.83rem;color:var(--muted)}
.editor-preview strong{display:block;color:var(--ink)}
.editor-preview p{white-space:pre-wrap}
.inbox-workspace{margin-top:18px}
.admin-sections{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 22px}
.admin-sections :is(button,a){display:inline-flex;gap:8px;align-items:center;min-height:44px;padding:8px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:650;text-decoration:none}
.admin-sections [aria-pressed=true]{background:#e5f1ea;border-color:#689381}
.admin-sections :is(button,a):hover{background:#edf5ee;border-color:#8cae9c}
.admin-sections svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-sections{padding:8px;border:1px solid var(--line);border-radius:14px;background:#f6f9f5}
.admin-sections :is(button,a){justify-content:flex-start;white-space:normal;text-align:left}
@media(min-width:920px){
  #dashboard:has(.admin-sections){display:grid;grid-template-columns:205px minmax(0,1fr);gap:20px;align-items:start}
  #dashboard:has(.admin-sections)>.dash-head{grid-column:1/-1}
  #dashboard>.admin-sections{position:sticky;top:20px;margin:0;display:grid}
  #dashboard>:is(#content-area,#documents-area,#access){grid-column:2;grid-row:2;margin:0}
  #content-area>.public-pages{margin-top:0}
}
@media(max-width:560px){
  .admin-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .admin-sections :is(button,a){padding:6px 8px;font-size:.85rem}
}
.document-list{display:grid;gap:12px;list-style:none;margin:18px 0 0;padding:0}
.document-list li{padding:15px 16px;border:1px solid var(--line);border-radius:12px}
.document-row-header,.document-heading{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.document-heading{justify-content:space-between;margin-bottom:15px}
.document-row-header h3{margin:0;color:var(--ink);font-size:1.04rem}
.document-list p{color:var(--muted);font-size:.85rem;margin:5px 0 10px}
.document-list .item-actions{align-items:center}
.public-pdf{display:block;width:100%;height:70dvh;border:1px solid var(--line);border-radius:12px;background:#fff}
.inbox-workspace .workspace-head .item-actions{justify-content:flex-end}
.inbox-workspace .badge{background:#e5f1ea;color:#165841}
.record-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin:0}
.record-details div{padding:6px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.record-details dt{font-size:.77rem;color:var(--muted)}
.record-details dd{margin:2px 0 0;font-size:.91rem;white-space:pre-wrap}
.paper-extra summary{cursor:pointer;color:var(--ink);font-size:.9rem;font-weight:650;margin-bottom:8px}
.paper-extra .fields{padding:10px;border:1px solid var(--line);border-radius:10px}
button.danger{color:#932b21}
#record-reference{font-size:.85rem;overflow-wrap:anywhere}
@media(max-width:580px){.items li{align-items:flex-start;flex-direction:column}.item-actions{width:100%}.fields{grid-template-columns:1fr}}
@media(max-width:580px){.access form,.access .items li{grid-template-columns:1fr}}
@media(max-width:700px){.summary{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-head{align-items:flex-start;flex-direction:column}.dash-actions{justify-content:flex-start}.workspace .tools{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace .tools label:first-child{grid-column:1/-1}}
@media(max-width:580px){.workspace .items li{align-items:flex-start}.workspace-head{align-items:flex-start}.workspace-head button{white-space:nowrap}}
@media(max-width:580px){.inbox-workspace .workspace-head{display:grid}.inbox-workspace .workspace-head .item-actions{justify-content:flex-start}.record-details{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
