:root{
  --paper:#f0f0f0; --card:#f8f8f8; --ink:#151412; --muted:#575757; --line:#cfcfcf; --line-soft:#e1e1e1;
  --accent:#d9441f; --accent-ink:#fff;
  --font-body:'Switzer',-apple-system,'Segoe UI',sans-serif;
  --font-display:'Instrument Serif','Times New Roman',serif;
  --r:6px;
  --t-xs:.75rem; --t-sm:.875rem; --t-base:1rem; --t-lg:1.125rem; --t-xl:1.75rem;
}
*{box-sizing:border-box;margin:0}
html,body{height:100%}
body{background:var(--paper);color:var(--ink);font-family:var(--font-body);font-size:var(--t-sm);line-height:1.5;-webkit-font-smoothing:antialiased}
button,input{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tnum{font-variant-numeric:tabular-nums}

/* ---------- shell ---------- */
.shell{max-width:1080px;margin:0 auto;padding:28px 28px 96px}
.top{display:flex;align-items:center;justify-content:space-between;padding-bottom:28px}
.sandbox-actions{display:flex;gap:8px;align-items:center}
.sandbox-notice{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 0;margin-bottom:28px}
.sandbox-notice>div{display:flex;justify-content:space-between;gap:12px;font-weight:500}
.sandbox-notice p{font-size:var(--t-xs);color:var(--muted);margin-top:6px;max-width:75ch}
.sandbox-limits{display:flex;gap:8px 16px;flex-wrap:wrap;margin:20px 0;font-size:var(--t-xs);color:var(--muted)}
.sandbox-start #sandbox-status{margin:20px 0 12px;min-height:1.5em;color:var(--muted)}
@media(max-width:480px){.sandbox-notice>div{flex-direction:column;gap:4px}.sandbox-actions{gap:4px}}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand .brand-logo{display:block;width:146px;height:auto;max-width:100%;object-fit:contain}
.crumb{color:var(--muted);text-decoration:none;font-size:var(--t-sm);display:inline-flex;gap:6px;align-items:center}
.crumb:hover{color:var(--ink)}

h1.page{font-family:var(--font-display);font-weight:400;font-size:var(--t-xl);line-height:1.1;letter-spacing:-.005em}
h2.sec{font-size:var(--t-xs);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:12px}
.muted{color:var(--muted)}

.btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:var(--r);border:1px solid var(--line);background:var(--card);font-weight:500;transition:background .15s,border-color .15s,color .15s}
.btn:hover{border-color:var(--ink)}
.btn.primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.btn.primary:hover{background:#000}
.btn.sm{padding:5px 10px;font-size:var(--t-xs)}
.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}
.btn.ghost:hover{color:var(--ink);border-color:var(--line)}
.btn.danger:hover{color:var(--accent);border-color:var(--accent)}
.btn[disabled]{opacity:.5;pointer-events:none}

/* ---------- home ---------- */
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;border:1px dashed #b3b3b3;border-radius:10px;padding:44px 20px;margin-bottom:40px;cursor:pointer;transition:background .15s,border-color .15s}
.drop:hover,.drop.over{background:var(--card);border-color:var(--ink)}
.drop strong{font-weight:600;font-size:var(--t-base)}
.drop small{color:var(--muted)}
.drop.busy{pointer-events:none;opacity:.7}
.drop .bar{width:220px;height:2px;background:var(--line);margin-top:10px;overflow:hidden;border-radius:2px}
.drop .bar i{display:block;height:100%;width:40%;background:var(--accent);animation:slide 1.1s ease-in-out infinite}
@keyframes slide{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}

.docs{border-top:1px solid var(--line)}
.row{display:grid;grid-template-columns:72px 1fr auto;gap:20px;align-items:center;padding:16px 4px;border-bottom:1px solid var(--line);text-decoration:none;transition:background .15s}
.row:hover{background:var(--card)}
.cover{width:72px;aspect-ratio:16/10;background:var(--line-soft);border:1px solid var(--line-soft);display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:3px}
.cover img{width:100%;height:100%;object-fit:cover;display:block}
.row .name{font-weight:600;font-size:var(--t-base);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .sub{color:var(--muted);font-size:var(--t-xs)}
.metrics{display:flex;gap:28px;text-align:right}
.metrics div{min-width:56px}
.metrics b{display:block;font-weight:600;font-size:var(--t-base)}
.metrics span{color:var(--muted);font-size:var(--t-xs)}
.pill{display:inline-block;font-size:var(--t-xs);padding:1px 8px;border-radius:99px;background:var(--line-soft);color:var(--muted)}
.pill.bad{background:#f0c9bd;color:#8a2610}
.empty{padding:56px 0;text-align:center;color:var(--muted)}
.empty b{display:block;color:var(--ink);font-family:var(--font-display);font-weight:400;font-size:var(--t-xl);margin-bottom:4px}

/* ---------- document ---------- */
.dochead{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:28px;flex-wrap:wrap}
.titleinput{font-family:var(--font-display);font-size:var(--t-xl);line-height:1.1;background:transparent;border:0;border-bottom:1px solid transparent;padding:0 0 2px;width:min(560px,100%)}
.titleinput:hover,.titleinput:focus{border-bottom-color:var(--line);outline:0}
.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:8px;background:var(--card);margin-bottom:40px}
.stat{padding:16px 20px;border-right:1px solid var(--line)}
.stat:last-child{border-right:0}
.stat b{display:block;font-size:var(--t-xl);font-family:var(--font-display);font-weight:400;line-height:1.1}
.stat span{color:var(--muted);font-size:var(--t-xs)}

.block{margin-bottom:44px}
.links{border-top:1px solid var(--line)}
.link{display:grid;grid-template-columns:20px 1fr auto;gap:14px;align-items:center;padding:12px 4px;border-bottom:1px solid var(--line)}
.sw{width:20px;height:20px;border-radius:50%;border:1px solid var(--line)}
.link .u{font-size:var(--t-xs);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46vw}
.link.revoked .t,.link.revoked .u{text-decoration:line-through;opacity:.55}
.acts{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.newlink{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px 4px;border-bottom:1px solid var(--line)}
.field{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:7px 10px;min-width:200px}
.field:focus{outline:0;border-color:var(--ink)}
.swatches{display:flex;gap:6px;align-items:center}
.swatches button{width:22px;height:22px;border-radius:50%;border:1px solid var(--line);position:relative}
.swatches button[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:2px}

.chart{border:1px solid var(--line);background:var(--card);border-radius:8px;padding:20px 20px 12px;overflow-x:auto}
.cols{display:flex;gap:6px;align-items:flex-end;min-width:max-content}
.col{width:56px;flex:none;display:flex;flex-direction:column;align-items:center;gap:6px}
.col .v{font-size:var(--t-xs);color:var(--muted);height:16px}
.col .bar{width:100%;background:var(--ink);border-radius:2px 2px 0 0;min-height:2px;transition:height .4s}
.col .bar.hot{background:var(--accent)}
.col .barwrap{height:140px;display:flex;align-items:flex-end;width:100%}
.col img{width:100%;aspect-ratio:16/10;object-fit:cover;border:1px solid var(--line);border-radius:2px;background:var(--line-soft)}
.col .n{font-size:var(--t-xs);color:var(--muted)}
.col .r{font-size:11px;color:var(--muted)}

table.views{width:100%;border-collapse:collapse}
.views th{font-size:var(--t-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);text-align:left;padding:8px 8px;border-bottom:1px solid var(--line)}
.views td{padding:12px 8px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.views tr.v{cursor:pointer}
.views tr.v:hover td{background:var(--card)}
.views td.r,.views th.r{text-align:right}
.strip{display:flex;gap:2px;align-items:flex-end;height:22px;min-width:120px}
.strip i{flex:1;background:var(--ink);min-height:2px;border-radius:1px;opacity:.9}
.strip i.z{background:var(--line);opacity:1}
.detail td{background:var(--card);padding:18px 20px 22px}
.dpages{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px}
.dp{width:96px;flex:none}
.dp img{width:100%;aspect-ratio:16/10;object-fit:cover;border:1px solid var(--line);border-radius:2px;background:var(--line-soft);display:block}
.dp .bar{height:3px;background:var(--line-soft);margin-top:6px;border-radius:2px;overflow:hidden}
.dp .bar i{display:block;height:100%;background:var(--accent)}
.dp .tm{font-size:var(--t-xs);margin-top:4px}
.dp .tm.z{color:var(--muted)}
.note{font-size:var(--t-xs);color:var(--muted);margin-top:10px;max-width:70ch}

.skeleton{background:linear-gradient(90deg,var(--line-soft),var(--card),var(--line-soft));background-size:200% 100%;animation:sh 1.3s infinite;border-radius:6px}
@keyframes sh{to{background-position:-200% 0}}

#toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);background:var(--ink);color:var(--paper);padding:9px 16px;border-radius:99px;font-size:var(--t-sm);opacity:0;pointer-events:none;transition:.25s;z-index:99}
#toast.on{opacity:1;transform:translate(-50%,0)}

@media (max-width:720px){
  .shell{padding:20px 16px 80px}
  .row{grid-template-columns:56px 1fr;gap:14px}
  .row .cover{width:56px}
  .metrics{grid-column:1/-1;justify-content:flex-start;text-align:left;gap:22px}
  .stats{grid-template-columns:1fr 1fr}
  .stat:nth-child(2){border-right:0}
  .stat:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .link{grid-template-columns:20px 1fr}
  .link .acts{grid-column:1/-1;justify-content:flex-start}
  .link .u{max-width:70vw}
  .hide-m{display:none}
}

/* ---------- viewer ---------- */
body.viewing{overflow:hidden;background:#0d0d0d}
.viewer{position:fixed;inset:0;overflow:hidden;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:0}
.slide{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .45s cubic-bezier(.4,0,.2,1)}
.slide.on{opacity:1}
.slide .ph{position:absolute;max-width:100%;max-height:100%;filter:blur(18px);transform:scale(1.02)}
.slide img.full{position:relative;display:block}
.zone{position:absolute;top:0;bottom:0;z-index:2}
.zone.l{left:0;width:30%;cursor:w-resize}
.zone.r{right:0;width:70%;cursor:e-resize}
.zone.dead{cursor:default}
.hud{position:absolute;left:0;right:0;bottom:0;z-index:3;pointer-events:none;opacity:0;transition:opacity .4s;display:flex;justify-content:center;padding-bottom:14px}
.hud .count{font-family:var(--font-body);font-size:12px;letter-spacing:.08em;color:#fff;mix-blend-mode:difference;font-variant-numeric:tabular-nums}
.viewer.awake .hud,.viewer.awake .tools{opacity:1}
.viewer.idle{cursor:none}
.viewer.idle .zone{cursor:none}
.prog{position:absolute;left:0;bottom:0;height:2px;background:#fff;mix-blend-mode:difference;z-index:3;transition:width .45s cubic-bezier(.4,0,.2,1);opacity:.7}
.tools{position:absolute;top:0;right:0;z-index:4;display:flex;gap:2px;padding:12px;opacity:0;transition:opacity .4s}
.tools button{width:34px;height:34px;display:flex;align-items:center;justify-content:center;color:#fff;mix-blend-mode:difference;opacity:.8}
.tools button:hover{opacity:1}
.tools svg{width:18px;height:18px}
.vhint{position:absolute;inset:auto 0 56px 0;text-align:center;z-index:3;pointer-events:none;color:#fff;mix-blend-mode:difference;font-size:12px;letter-spacing:.1em;opacity:0;transition:opacity .6s}
.vhint.on{opacity:.8}
.vpill{position:absolute;top:14px;left:14px;z-index:4;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#fff;mix-blend-mode:difference;opacity:.75}
.vmsg{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#bbb;background:#0d0d0d;text-align:center;padding:24px}
.vmsg b{font-family:var(--font-display);font-weight:400;font-size:var(--t-xl);color:#eee}
.vload{position:fixed;left:50%;top:50%;width:36px;height:1px;margin-left:-18px;background:#555;overflow:hidden}
.vload i{display:block;height:100%;width:40%;background:#fff;animation:slide 1s ease-in-out infinite}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
#views{overflow-x:auto}.views td:first-child{white-space:nowrap}

.chk{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:var(--t-xs);cursor:pointer}
.aud{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:28px 32px}
.ag h3{font-size:var(--t-xs);font-weight:600;margin-bottom:8px}
.ar{position:relative;display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid var(--line-soft);font-size:var(--t-sm)}
.ar i{position:absolute;left:0;bottom:-1px;height:2px;background:var(--ink)}
.meta{font-size:var(--t-xs);color:var(--muted);margin-bottom:12px}
.vlogo{position:absolute;right:16px;bottom:14px;z-index:3;width:18px;height:18px;pointer-events:none}
.vlogo img{width:100%;height:100%;display:block}

.bgpick{display:flex;align-items:center;gap:10px}
.bglabel{font-size:var(--t-xs);color:var(--muted)}
.swatches button,.swatches .custom{width:22px;height:22px;border-radius:50%;border:1px solid var(--line);display:block}
.swatches .custom{position:relative;cursor:pointer;background:conic-gradient(#e5484d,#f5a623,#f2e94e,#46c36b,#3aa6f0,#8b5cf6,#e5484d)}
.swatches .custom[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:2px}
.swatches .custom input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0}
.swatches .custom:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.signin{max-width:440px;margin:72px auto 0}
.signin-eyebrow{font-size:var(--t-xs);letter-spacing:.1em;color:var(--muted);margin-bottom:20px}
.signin-copy{margin:14px 0 28px;line-height:1.7}
.signin label{display:block;font-size:var(--t-xs);font-weight:500;margin:16px 0 8px}
.signin .field{width:100%;min-width:0;padding:12px}
.signin #signin-status{margin:16px 0;font-size:var(--t-sm);color:var(--muted)}
.signin .note{margin-top:24px}
[hidden]{display:none!important}
@media(max-width:720px){.signin{margin-top:40px}}

/* Owner workspace refinement. All selectors are scoped; the public viewer is unchanged. */
.shell{max-width:1160px}
.shell h1.page{font-family:var(--font-body);font-size:clamp(1.35rem,1.15rem + .6vw,1.7rem);font-weight:500;line-height:1.3;letter-spacing:-.03em}
.shell .top{padding-bottom:36px;border-bottom:1px solid var(--line);margin-bottom:36px}
.shell .eyebrow{font-size:var(--t-xs);letter-spacing:.1em;color:var(--muted);margin-bottom:10px}
.shell .library-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:8px 0 28px}
.shell .library-head p{margin-top:8px}
.shell .workspace-label{font-size:var(--t-xs);border:1px solid var(--line);padding:6px 10px;border-radius:99px;white-space:nowrap}
.shell .drop{background:var(--card);padding:32px 20px;margin-bottom:40px;border-radius:8px}
.shell .upload-symbol{font-size:1.5rem;line-height:1;width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;margin-bottom:6px}
.shell .drop small{margin-top:8px;font-size:var(--t-xs);max-width:52ch}
.shell .row{padding:20px 0;gap:20px}
.shell .row .name{white-space:normal;overflow-wrap:anywhere;line-height:1.5;font-weight:500}
.shell .cover{width:84px;aspect-ratio:4/3;border-radius:4px}
.shell .row{grid-template-columns:84px minmax(0,1fr) auto}
.shell .cover img{object-fit:contain}
.shell .metrics{gap:24px}
.shell .metrics div{min-width:64px}
.shell .metrics b{font-weight:500}
.shell .metrics span{white-space:nowrap}
.shell .section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:20px;margin-bottom:16px;flex-wrap:wrap}
.shell .section-heading .sec{margin:0}
.shell .section-heading>.muted{font-size:var(--t-xs)}
.shell .section-title{font-size:var(--t-lg);font-weight:500;margin-bottom:6px;letter-spacing:-.02em}
.shell .btn{text-decoration:none;min-height:40px}
.shell .section-heading p{font-size:var(--t-sm);max-width:66ch}
.shell .dochead{margin:24px 0 28px;align-items:center;flex-wrap:nowrap}
.shell .doc-heading{min-width:0;max-width:720px}
.shell .doc-heading h1{overflow-wrap:anywhere}
.shell .dochead>.btn{flex-shrink:0}
.shell .doc-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;color:var(--muted);font-size:var(--t-xs)}
.shell .status-dot{width:5px;height:5px;background:var(--ink);border-radius:50%}
.shell .deck-tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin-bottom:28px}
.shell .deck-tabs button{font-size:var(--t-sm);font-weight:500;color:var(--muted);padding:12px 0;border-bottom:2px solid transparent;margin-bottom:-1px}
.shell .deck-tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink)}
.shell .deck-tabs button:hover{color:var(--ink)}
.shell .presentation-overview{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:24px;margin-bottom:36px}
.shell .deck-cover{height:340px;display:grid;place-items:center;background:#e4e4e4;border:1px solid var(--line);border-radius:6px;overflow:hidden;padding:20px}
.shell .deck-cover img{width:100%;height:100%;max-height:300px;object-fit:contain;box-shadow:0 2px 10px #0000000d}
.shell .settings-card{padding:24px;background:var(--card);border:1px solid var(--line);border-radius:6px}
.shell .settings-card h2{font-size:var(--t-base);font-weight:500;margin-bottom:20px}
.shell .settings-card label,.shell .link-editor>label{display:block;font-size:var(--t-xs);font-weight:500;margin-bottom:8px}
.shell textarea.titleinput{font-family:var(--font-body);font-size:var(--t-sm);line-height:1.65;border:1px solid var(--line);border-radius:6px;background:var(--paper);width:100%;resize:vertical;min-height:92px;padding:10px 12px}
.shell textarea.titleinput:focus{border-color:var(--ink)}
.shell .file-detail{display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line-soft);padding-top:12px;margin-top:16px;font-size:var(--t-xs)}
.shell .file-detail>span{color:var(--muted);white-space:nowrap}
.shell .file-detail strong{font-weight:400;text-align:right;overflow-wrap:anywhere;max-width:70%}
.shell .page-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.shell .page-grid figure{min-width:0}
.shell .page-grid img{width:100%;height:132px;object-fit:contain;background:var(--card);border:1px solid var(--line);border-radius:4px;padding:8px;display:block}
.shell .page-grid figcaption{font-size:var(--t-xs);color:var(--muted);margin-top:8px}
.shell .danger-zone{margin-top:44px;border-top:1px solid var(--line);padding-top:20px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.shell .danger-zone strong{font-weight:500}
.shell .danger-zone p{font-size:var(--t-xs);margin-top:4px}
.shell .stats{margin-bottom:32px}
.shell .stat{padding:20px 24px}
.shell .stat b{font-family:var(--font-body);font-size:1.6rem;letter-spacing:-.04em;font-weight:500;line-height:1.4}
.shell .stat span{display:block;margin-top:4px}
.shell .link{padding:18px 0;gap:16px;grid-template-columns:22px minmax(0,1fr) auto}
.shell .link .t{font-weight:500;overflow-wrap:anywhere;line-height:1.5}
.shell .link .u{margin-top:4px}
.shell .link-active{font-size:var(--t-xs);font-weight:400;color:var(--muted);margin-left:6px}
.shell .link .acts{gap:6px}
.shell .new-link-action{padding:22px 0;display:flex;align-items:center;gap:16px}
.shell .new-link-action p{font-size:var(--t-xs)}
.shell .link-editor{max-width:680px;margin:20px 0 28px;background:var(--card);border:1px solid var(--line);border-radius:8px;padding:24px}
.shell .editor-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.shell .editor-heading h3{font-weight:500;font-size:var(--t-base)}
.shell .link-editor>.field{width:100%;padding:10px 12px;min-width:0}
.shell .background-setting{border:0;padding:0;margin:24px 0}
.shell .background-setting legend{font-size:var(--t-xs);font-weight:500;margin-bottom:12px}
.shell .palette{display:flex;gap:8px;flex-wrap:wrap}
.shell .palette-option{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:5px;padding:8px 12px;font-size:var(--t-xs);background:var(--paper)}
.shell .palette-option{min-height:44px}
.shell .palette-option>span{width:18px;height:18px;border:1px solid #00000026;border-radius:50%}
.shell .palette-option[aria-pressed=true],.shell .palette-option.selected{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.shell .custom-option{cursor:pointer}
.shell .custom-option input{width:20px;height:20px;padding:0;border:0;background:none;cursor:pointer}
.shell .custom-option:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.shell .brand-setting{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid var(--line-soft);padding-top:16px}
.shell .brand-setting strong{font-weight:500;font-size:var(--t-sm)}
.shell .brand-setting p{font-size:var(--t-xs);margin-top:4px}
.shell .brand-setting .pill{white-space:nowrap}
.shell .editor-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px}
.shell .editor-error{font-size:var(--t-xs);color:#a53016}
.shell .editor-footer .btn{margin-left:auto;white-space:nowrap}
.shell .chart{padding:24px 20px 16px}
.shell .col{width:64px}
.shell .col img,.shell .dp img{object-fit:contain}
.shell .col .r{font-size:var(--t-xs)}
.shell .aud{border:1px solid var(--line);background:var(--card);border-radius:6px;padding:24px}
.shell .views td,.shell .views th{padding:12px}
.shell .views td:nth-child(4){max-width:210px;overflow-wrap:anywhere}
.shell .empty b{font-family:var(--font-body);font-size:var(--t-lg);font-weight:500}
.shell .signin{background:var(--card);border:1px solid var(--line);border-radius:8px;max-width:480px;margin:48px auto;padding:32px}
.shell .signin-copy{line-height:1.7}
.shell .signin .field{background:var(--paper)}
.shell .signin-feedback{padding:12px;border:1px solid var(--line);border-radius:5px;line-height:1.6}
.shell .signin-feedback.success{background:#f0f0f0}
.shell .signin-feedback.error{border-color:#b6533b;color:#883720}
@media(max-width:900px){
  .shell .metrics{gap:16px}
  .shell .link{grid-template-columns:22px minmax(0,1fr)}
  .shell .link .acts{grid-column:2;justify-content:flex-start}
}
@media(max-width:720px){
  .shell .btn{min-height:44px}
  .shell .top{padding-bottom:24px;margin-bottom:28px}
  .shell .library-head{align-items:flex-start}
  .shell .workspace-label{display:none}
  .shell .row{grid-template-columns:64px minmax(0,1fr);gap:16px}
  .shell .cover{width:64px}
  .shell .metrics{grid-column:2;gap:24px;justify-content:flex-start}
  .shell .dochead{flex-direction:column;align-items:flex-start}
  .shell .presentation-overview{grid-template-columns:1fr;gap:16px}
  .shell .deck-cover{height:240px}
  .shell .deck-cover img{max-height:200px}
  .shell .settings-card,.shell .link-editor{padding:20px}
  .shell .page-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .shell .page-grid img{height:110px}
  .shell .new-link-action{align-items:flex-start;flex-direction:column}
  .shell .brand-setting{align-items:flex-start}
  .shell .stat{padding:16px}
  .shell .stat b{font-size:1.4rem}
  .shell .signin{padding:24px;margin:24px auto}
  .shell .danger-zone{align-items:flex-start}
}

.chk.locked{cursor:not-allowed;opacity:.8}

/* Reference-led owner overview. No public viewer selectors. */
.shell .file-columns,.shell .file-row{display:grid;grid-template-columns:minmax(0,1fr) 150px 110px;align-items:center;gap:24px}
.shell .file-columns{padding:14px 12px;color:var(--muted);border-bottom:1px solid var(--line)}
.shell .file-row{padding:18px 12px;border-bottom:1px solid var(--line);transition:background .15s;text-decoration:none}
.shell .file-row:hover,.shell .file-row:focus-within{background:#fff}
.shell .file-name{display:flex;gap:18px;align-items:center;text-decoration:none;min-width:0}
.shell .file-name .name{font-size:var(--t-base);font-weight:500;overflow-wrap:anywhere}
.shell .file-name .sub{font-size:var(--t-xs);color:var(--muted)}
.shell .file-name .cover{flex-shrink:0;width:46px}
.shell .file-create{justify-content:center}
.shell .inline-title{font:inherit;letter-spacing:inherit;color:inherit;line-height:1.3;width:100%;display:block;background:transparent;border:0;border-bottom:1px solid transparent;padding:0;resize:none;overflow:hidden;border-radius:0}
.shell .inline-title:hover{border-bottom-color:var(--line)}
.shell .inline-title:focus{border-bottom-color:var(--ink);outline:0}
.shell .doc-heading{flex:1}
.shell .doc-heading h1{width:100%}
.shell .doc-meta{gap:18px;margin-top:8px}
.shell .meta-action{font-size:var(--t-xs);text-decoration:none;color:var(--muted);padding:4px 0;min-height:32px;display:inline-flex;align-items:center;cursor:pointer}
.shell .meta-action:hover{color:var(--ink);text-decoration:underline}
.shell .meta-action.danger:hover{color:var(--accent)}
.shell #rename-status:empty{display:none}
.shell .overview-counts{display:flex;gap:56px;padding:0 0 26px;border-bottom:1px solid var(--line)}
.shell .overview-counts b{display:block;font-size:1.65rem;font-weight:500;letter-spacing:-.03em}
.shell .overview-counts span{font-size:var(--t-xs);color:var(--muted)}
.shell .recent-visit{display:grid;grid-template-columns:34px minmax(0,1fr) minmax(120px,1fr) 80px 14px;gap:18px;align-items:center;width:100%;padding:16px 12px;text-align:left;border-bottom:1px solid var(--line)}
.shell .recent-visit:hover{background:white}
.shell .recent-visit strong{font-weight:500}
.shell .recent-visit small,.shell .recent-link-row small,.shell .link-title small,.shell .link-view-count small{display:block;font-size:var(--t-xs);font-weight:400;color:var(--muted)}
.shell .visitor-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#dedede}
.shell .visit-link{color:var(--muted);overflow-wrap:anywhere}
.shell .link-columns,.shell .recent-link-row,.shell .link{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,1.4fr) 60px 250px;gap:20px;align-items:center}
.shell .link-columns{padding:12px 20px;border-bottom:1px solid var(--line);font-size:var(--t-xs);color:var(--muted)}
.shell .recent-link-row{padding:16px 20px;border-bottom:1px solid var(--line)}
.shell .recent-link-row .meta-action{justify-self:end}
.shell .link-group{border-bottom:1px solid var(--line);transition:background .15s}
.shell .link-group.editing{background:#fff}
.shell .link{padding:20px;border-bottom:0}
.shell .link-title{display:flex;gap:12px;align-items:center;text-align:left;font-weight:500;min-width:0}
.shell .link-title>span:last-child{overflow-wrap:anywhere}
.shell .link-title .sw{flex-shrink:0}
.shell .url-pill{display:block;text-align:left;background:#e8e8e8;border-radius:99px;padding:8px 12px;font-size:var(--t-xs);width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shell .editing .url-pill{background:#f0f0f0}
.shell .url-pill:hover{background:#dedede}
.shell .link .acts{flex-wrap:wrap}
.shell .link .acts .primary{display:none}
.shell .link-editor{max-width:none;width:100%;background:transparent;margin:0;border:0;border-top:1px solid var(--line-soft);border-radius:0;padding:24px 20px}
.shell .link-editor>.field{max-width:560px}
.shell .link-editor .editor-footer{margin-top:16px}
.shell .custom-swatch{position:relative;border-radius:50%;overflow:hidden}
.shell .custom-swatch input{position:absolute;inset:0;width:100%;height:100%;opacity:0}
.shell .top-pages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:20px 0}
.shell .top-page{display:flex;align-items:center;gap:18px;min-width:0}
.shell .top-page img{width:100px;height:70px;object-fit:contain}
.shell .top-page b{display:block;font-weight:500;font-size:1.5rem}
.shell .top-page span,.shell .top-page small{display:block;font-size:var(--t-xs)}
.shell .top-page small{color:var(--muted)}
.shell .small-label{font-size:var(--t-xs);font-weight:400;letter-spacing:0}
.shell .performance-section{border-top:1px solid var(--line);padding-top:28px}
.shell .performance-section h3{font-size:var(--t-base);font-weight:500;margin:24px 0 12px}
.shell .performance-chart{width:100%;background:#fafafa;border:1px solid var(--line-soft);border-radius:6px;padding:16px 8px}
.shell .performance-chart canvas{display:block;width:100%;height:280px;max-width:100%}
.shell .chart-data{margin-top:16px;color:var(--muted);font-size:var(--t-xs)}
.shell .chart-data summary{cursor:pointer}
.shell .chart-data table{width:100%;border-collapse:collapse;margin-top:12px}
.shell .chart-data th,.shell .chart-data td{padding:8px;text-align:left;border-bottom:1px solid var(--line)}
@media(max-width:1000px){
  .shell .link-columns,.shell .recent-link-row,.shell .link{grid-template-columns:minmax(140px,1fr) minmax(0,1fr) 55px}
  .shell .link-columns>span:last-child{display:none}
  .shell .link .acts{grid-column:1/-1}
  .shell .recent-link-row>.meta-action{grid-column:1/-1}
}
@media(max-width:720px){
  .shell .file-columns,.shell .file-row{grid-template-columns:minmax(0,1fr) 80px;gap:12px}
  .shell .file-columns>span:nth-child(2),.shell .file-date{display:none}
  .shell .file-create{grid-column:1/-1;justify-self:start}
  .shell .file-name{gap:12px}
  .shell .file-name .name{font-size:var(--t-sm)}
  .shell .doc-heading{width:100%}
  .shell .doc-meta{gap:12px}
  .shell .overview-counts{gap:24px;flex-wrap:wrap}
  .shell .overview-counts b{font-size:1.35rem}
  .shell .recent-visit{grid-template-columns:28px minmax(0,1fr) 50px 10px;gap:10px;padding:14px 0}
  .shell .recent-visit .visit-link{grid-row:2;grid-column:2}
  .shell .visitor-icon{width:28px;height:28px}
  .shell .link-columns,.shell .recent-link-row,.shell .link{grid-template-columns:minmax(0,1fr) 50px;padding-left:12px;padding-right:12px;gap:12px}
  .shell .link-columns>span:nth-child(2){display:none}
  .shell .link .url-pill,.shell .recent-link-row .url-pill{grid-column:1/-1;grid-row:2}
  .shell .link-view-count{grid-row:1;grid-column:2}
  .shell .link .acts{grid-column:1/-1;grid-row:3}
  .shell .link-editor{padding:20px 12px}
  .shell .top-pages{grid-template-columns:1fr;gap:16px}
  .shell .top-page img{width:110px;height:72px}
}

.shell .title-line{display:flex;align-items:flex-start;position:relative;padding-top:20px}
.shell .title-line h1{flex:1;min-width:0}
.shell .save-state{position:absolute;right:0;top:0;font-size:var(--t-xs);font-weight:400;color:var(--muted);max-width:100%;text-align:right}
.shell .save-state:empty{visibility:hidden}
.shell .text-link{font-size:var(--t-xs);color:var(--muted);padding:6px 0;text-decoration:underline;text-underline-offset:3px;min-height:36px}
.shell .text-link:hover{color:var(--ink)}
.shell .editor-heading h3{font-size:var(--t-xs);font-weight:400;color:var(--muted)}
.shell .editor-save-actions{display:flex;gap:20px;align-items:center;margin-left:auto}
.shell .editor-save-actions .btn{margin-left:0}
.shell .link-toggle{width:36px;height:22px;padding:2px;border-radius:99px;background:#c5c5c5;flex-shrink:0;position:relative}
.shell .link-toggle[aria-checked=true]{background:var(--ink)}
.shell .link-toggle i{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.shell .link-toggle[aria-checked=true] i{transform:translateX(14px)}
.shell .acts{gap:16px;align-items:center;flex-wrap:nowrap}
.shell .link .acts,.shell .recent-link-row .acts{justify-content:flex-start}
.shell .link-menu{position:relative}
.shell .link-menu summary{list-style:none;cursor:pointer;font-size:24px;width:36px;height:40px;display:grid;place-items:center;border-radius:5px}
.shell .link-menu summary::-webkit-details-marker{display:none}
.shell .link-menu summary:hover,.shell .link-menu[open] summary{background:#e8e8e8}
.shell .link-menu-items{position:absolute;right:0;top:44px;width:180px;background:#fff;padding:6px;border:1px solid var(--line);box-shadow:0 8px 28px #00000018;border-radius:6px;z-index:10}
.shell .link-menu-items button{display:block;width:100%;text-align:left;font-size:var(--t-xs);padding:10px 12px;border-radius:4px}
.shell .link-menu-items button:hover{background:var(--paper)}
.shell .link-menu-items .delete-action{color:#a53016;border-top:1px solid var(--line-soft);border-radius:0;margin-top:4px}
.shell .link-icon{display:inline-block;width:18px;height:18px;position:relative;flex-shrink:0;vertical-align:middle;margin-right:6px}
.shell .link-icon:before,.shell .link-icon:after{content:"";position:absolute;width:10px;height:6px;border:1px solid currentColor;border-radius:5px;transform:rotate(-40deg)}
.shell .link-icon:before{left:0;top:9px}
.shell .link-icon:after{left:6px;top:4px}
.shell .recent-link-name,.shell .visit-link{display:flex;align-items:center;gap:6px}
.shell .recent-link-name>span:last-child{min-width:0;overflow-wrap:anywhere}
.shell .background-setting{position:relative}
.shell .colour-popover{width:248px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #00000015;margin-top:12px}
.shell .sv-square{height:148px;position:relative;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent),hsl(var(--hue,210) 100% 50%);border-radius:4px;touch-action:none;cursor:crosshair}
.shell .sv-thumb{position:absolute;width:12px;height:12px;border:2px solid white;border-radius:50%;box-shadow:0 0 0 1px #0005;transform:translate(-50%,-50%);pointer-events:none}
.shell .hue-label{display:block;font-size:var(--t-xs);color:var(--muted);margin:12px 0}
.shell .hue-range{display:block;width:100%;margin-top:8px;appearance:none;height:10px;border-radius:99px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}
.shell .hue-range::-webkit-slider-thumb{appearance:none;background:#fff;border:1px solid #aaa;width:16px;height:16px;border-radius:50%}
.shell .hue-range::-moz-range-thumb{background:#fff;border:1px solid #aaa;width:16px;height:16px;border-radius:50%}
.shell .hex-label{display:flex;align-items:center;justify-content:space-between;font-size:var(--t-xs);color:var(--muted)}
.shell .hex-field.field{min-width:0;width:145px;font-size:var(--t-xs);font-variant-numeric:tabular-nums}
.shell .colour-popover .field:invalid{border-color:#a53016}
@media(max-width:720px){
  .shell .save-state{max-width:100%;padding-top:0}
  .shell .recent-link-row .acts{grid-column:1/-1;grid-row:3;justify-content:flex-start}
  .shell .link .link-menu-items{left:0;right:auto}
  .shell .recent-link-row .link-menu-items{left:0;right:auto}
  .shell .colour-popover{max-width:100%}
}
