/* Clawdie Office: Inter text, Clawdie orange accents on cream, deep green-black header (Clawdie look, from booking.clawdie.ai). */
@font-face{font-family:Inter;src:url('/fonts/inter-latin.woff2?v=3100e775e8616cd2') format('woff2');font-display:swap;font-weight:100 900;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;src:url('/fonts/inter-latin-ext.woff2?v=34b9c504cab7a73e') format('woff2');font-display:swap;font-weight:100 900;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}


/* Upload uses the existing Roles page, grouped fields and permission controls. */
#upload-editor .panel-body{gap:20px}
#upload-editor .role-tabs{margin-bottom:4px}
#upload-editor .role-tabs .glyph{width:16px;height:16px}
.upload-folder-choice{display:flex;align-items:center;justify-content:space-between;gap:16px}
.upload-destination{overflow-wrap:anywhere;min-width:0;font-weight:600}
.upload-folder-choice button{flex:none}
.upload-folder-browser{margin-top:16px;padding:16px;border:1px solid var(--edge);border-radius:var(--radius);background:var(--subtle);display:grid;gap:14px}
.upload-folder-options{display:grid;gap:6px}
.upload-folder-options button{justify-content:flex-start;text-align:left;overflow-wrap:anywhere;white-space:normal}
.upload-folder-options .glyph{flex:none;color:var(--green)}
.upload-drop-zone{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:32px 16px;border:2px dashed var(--control);border-radius:var(--radius-lg);background:var(--subtle);color:var(--muted)}
.upload-drop-zone>.section-note{width:100%;text-align:center}
.upload-drop-zone.drag-over{border-color:var(--jungle);background:var(--mint)}
.upload-drop-zone.is-locked{opacity:.7}
/* Folders an upload creates (upload.js drawFolders): one row per top folder, with what is in it. */
.upload-folder-summary{margin-top:20px;display:grid;gap:8px}
.upload-folder-summary-title{margin:0;font-size:14px;font-weight:600}
.upload-folder-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--edge);border-radius:var(--radius);background:var(--surface)}
.upload-folder-row .glyph{color:var(--green)}
.upload-folder-name{font-weight:600;overflow-wrap:anywhere}
@media (max-width:560px){.upload-folder-row{grid-template-columns:auto minmax(0,1fr) auto}.upload-folder-row .section-note{grid-column:2/-1;grid-row:2}}
.upload-details{margin-top:20px}
.upload-details>summary{cursor:pointer;padding:8px 0;font-size:14px;font-weight:600}
.upload-queue{margin-top:8px;border:1px solid var(--edge);border-radius:var(--radius);overflow:hidden}
.upload-file-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:10px 14px}
.upload-file-thumb{width:56px;height:56px;display:grid}
.upload-file-thumb>canvas{width:100%;height:100%;border:1px solid var(--edge);border-radius:var(--radius);background:var(--subtle)}
.upload-file-thumb>.file-icon{width:100%;height:100%;font-size:12px}
.upload-file-row+.upload-file-row{border-top:1px solid var(--line)}
.upload-file-info{min-width:0;display:grid;gap:2px;font-size:14px}
.upload-file-info>a,.upload-file-name{overflow-wrap:anywhere;font-weight:600}
.upload-file-size{color:var(--muted);font-size:12px}
.upload-file-status{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.upload-file-status:empty{display:none}
.upload-file-row.invalid .upload-file-status,.upload-file-row.failed .upload-file-status{color:var(--danger)}
.upload-row-progress{display:block;width:100%;max-width:320px;height:5px;margin-top:4px;border:0;border-radius:3px;overflow:hidden;appearance:none}
.upload-row-progress::-webkit-progress-bar{background:var(--line)}
.upload-row-progress::-webkit-progress-value{background:var(--jungle)}
.upload-row-progress::-moz-progress-bar{background:var(--jungle)}
/* One state per row at the height of the buttons beside it: neutral while waiting, red when it needs attention,
   and once saved a green tick in the same circle as the cog, next to View. */
.upload-file-marks{display:flex;align-items:center;gap:8px}
.upload-file-state{display:inline-flex;align-items:center;gap:6px;min-height:var(--control-height);padding:0 14px;border:1px solid var(--edge);border-radius:999px;background:var(--subtle);color:var(--ink);font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.upload-file-state .glyph{width:18px;height:18px}
.upload-file-row.uploaded .upload-file-state{width:var(--control-height);height:var(--control-height);padding:0;justify-content:center;background:var(--mint);border-color:rgb(244 140 91/.4);color:var(--green)}
.upload-file-row:is(.invalid,.failed) .upload-file-state{background:var(--danger-bg);border-color:var(--danger-line);color:var(--danger)}
.upload-file-row.uploading .upload-file-state::before{content:'';width:11px;height:11px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%}
.upload-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.upload-feedback{padding:14px 16px;border:1px solid rgb(244 140 91/.35);border-radius:var(--radius);background:var(--mint);overflow-wrap:anywhere}
.upload-feedback-title{margin-bottom:4px;font-weight:700}
.upload-feedback.needs-attention{background:var(--citrus);border-color:rgb(255 180 71/.6)}
.upload-progress{display:block;width:100%;height:6px;margin-top:12px;border:0;border-radius:3px;overflow:hidden;appearance:none}
.upload-progress::-webkit-progress-bar{background:var(--line)}
.upload-progress::-webkit-progress-value{background:var(--jungle)}
.upload-progress::-moz-progress-bar{background:var(--jungle)}
.upload-actions{margin-top:0;gap:10px;flex-wrap:wrap;align-items:center}
.item-permission-editor>.section-note+.permission-pickers{margin-top:16px}
.permission-pickers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.item-permission-editor .permission-pickers>.form-field{margin-top:0;min-width:0}
.permission-subject{margin:0 0 16px;overflow-wrap:anywhere}
.permission-subject p{margin:4px 0 0}
.permission-everyone{margin:16px 0}
.permission-everyone button[aria-pressed="true"]{background:var(--mint);border-color:var(--green);color:var(--green)}
@media(max-width:720px){.permission-pickers{grid-template-columns:minmax(0,1fr)}}
.icon-button{width:var(--control-height);padding:0}
@media(max-width:720px){.upload-folder-choice{align-items:stretch;flex-direction:column;gap:10px}.upload-folder-browser{padding:12px}.upload-actions>button{flex:1 1 auto}.upload-pagination{gap:8px;flex-wrap:wrap}}
/* Phones: the pill moves under the name so the name keeps its width. */
@media(max-width:720px){.upload-file-row{grid-template-columns:auto minmax(0,1fr) auto;gap:6px 10px;padding:10px}.upload-file-thumb{width:48px;height:48px;grid-column:1;grid-row:1/3}.upload-file-info{grid-column:2;grid-row:1}.upload-file-marks{grid-column:2;grid-row:2;justify-self:start}.upload-file-row>.actions{grid-column:3;grid-row:1}}
@media(prefers-reduced-motion:no-preference){
  .upload-drop-zone.files-added{animation:upload-zone-added .9s ease-out}
  .upload-file-row.is-new{animation:upload-row-added 1.2s ease-out}
  .upload-file-row.uploading .upload-file-state::before{animation:spin .75s linear infinite}
  @keyframes upload-zone-added{from{border-color:var(--jungle);background:var(--mint)}}
  @keyframes upload-row-added{from{background:var(--mint)}}
}

/* Tokens. Palette: Charcoal, Deep Charcoal, Jungle Green, Accessible Deep Green, the three accents
   and their tints. Hover, pressed, subtle and divider shades are lighter mixes of Mint, Cream and
   Line. Muted text is used on white surfaces only; text on tinted backgrounds stays Charcoal. */
:root{
  font-family:Inter,'Segoe UI',system-ui,-apple-system,sans-serif;font-synthesis:none;font-size:15px;font-weight:500;line-height:1.5;color:var(--ink);background:var(--cream);
  -webkit-font-smoothing:antialiased;
  --ink:#333;--night:#1c2a29;--muted:#717470;
  --jungle:#f48c5b;--green:#a44720;--dark:#a44720;
  --mint:#fde6d8;--cream:#faf5ed;--sky:#ddf7f5;--blush:#ffe8e8;--citrus:#fff0d9;
  --red:#ff4747;--cyan:#00bbb3;--orange:#ffb447;
  --surface:#fff;--subtle:#fcfaf6;--hover:#fff6f0;--pressed:#fbd9c6;
  --edge:#e7e2d5;--line:#efebe3;--control:#d6d0c3;--control-hover:#f48c5b;
  --danger:#9b302b;--danger-line:#f0b4ad;--danger-bg:#ffe8e8;--focus:#a44720;
  --radius:12px;--radius-lg:20px;--control-height:40px;
  --shadow-card:0 1px 2px rgb(34 31 32/.05),0 14px 32px -20px rgb(34 31 32/.28);
  --shadow-pop:0 32px 80px -24px rgb(34 31 32/.45);
  --juice:linear-gradient(90deg,#ff4747 0%,#ffb447 33%,#f48c5b 66%,#00bbb3 100%);
  --page-width:1120px;--page-gutter:32px;--header-height:75px;
}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(60rem 30rem at 100% 0,var(--citrus),rgb(255 240 217/0) 70%),linear-gradient(180deg,var(--mint) 0,var(--cream) 36rem) var(--cream);background-repeat:no-repeat}
h1,h2,h3,p,dl{margin:0}
/* Page titles use the approved heading voice with the juice underline from the website hero. */
h1{font-family:Inter,sans-serif;font-size:40px;font-weight:700;line-height:1.04;letter-spacing:.005em;text-transform:uppercase;overflow-wrap:anywhere}
:is(#page-title,#settings-title,#externals-title,#item-title,.auth h1)::after{content:'';display:block;width:48px;height:4px;margin-top:14px;border-radius:4px;background:var(--juice)}
#item-title.keeps-case{text-transform:none;letter-spacing:0}
h2{font-size:18px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
h3{font-size:15px;font-weight:700;color:var(--ink)}
h1:focus{outline:none}
a{color:var(--green)}
strong,b{font-weight:700}
small{display:block;font-size:13px;color:var(--muted)}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.muted{color:var(--muted)}
a.file-open{text-decoration:none;color:inherit}

/* Controls: pill actions with short uppercase labels, as on the website. Buttons that show a name
   (folders, people) keep their original case. */
button,input,select{font:inherit;color:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button,summary{cursor:pointer}
button{border:1px solid var(--control);border-radius:var(--radius);background:var(--surface)}
button:hover:not(:disabled){background:var(--hover);border-color:var(--control-hover)}
button:active:not(:disabled){background:var(--pressed);border-color:var(--green)}
button:disabled{cursor:wait;opacity:.55}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.primary,.secondary,.back-link{display:inline-flex;gap:8px;justify-content:center;align-items:center;min-height:var(--control-height);padding:0 18px;border:1px solid var(--control);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;text-decoration:none}
.primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 8px 18px -10px rgb(164 71 32/.9)}
.primary:hover:not(:disabled){background-color:var(--green);border-color:var(--green);background-image:linear-gradient(rgb(34 31 32/.16),rgb(34 31 32/.16))}
.primary:active:not(:disabled){background-color:var(--green);border-color:var(--green);background-image:linear-gradient(rgb(34 31 32/.3),rgb(34 31 32/.3))}
.secondary:hover:not(:disabled),.back-link:hover{background:var(--hover);border-color:var(--jungle)}
.back-link:active{background:var(--pressed)}
.danger{color:var(--danger);border-color:var(--danger-line)}
.danger:hover:not(:disabled){background:var(--danger-bg);border-color:var(--red)}
.danger:active:not(:disabled){background:var(--danger-bg);border-color:var(--danger)}
:is(.breadcrumbs,.upload-folder-options) button,.exception-chip{text-transform:none;letter-spacing:normal}
.actions{display:flex;gap:8px}
.glyph{width:16px;height:16px;flex:none}
button[aria-busy=true]::before,.loading-state::before{content:'';display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;margin-right:8px;flex:none}
button[aria-busy=true]{gap:0}
label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
input:not([type=file]),select{width:100%;min-height:44px;padding:0 14px;border:1px solid var(--control);border-radius:var(--radius);background:var(--surface);margin-bottom:16px;font-weight:500}
input:hover,select:hover{border-color:var(--control-hover)}
input:focus,select:focus{border-color:var(--green)}
input::placeholder{color:var(--muted);opacity:1}

/* Header: Deep Charcoal with the white horizontal logo and the website's green gradient edge. */
.header{position:sticky;top:0;z-index:20;background:var(--night);color:#fff;box-shadow:0 6px 14px -10px rgb(34 31 32/.45)}
.header::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--green) 0%,var(--jungle) 55%,var(--cyan) 100%)}
html{scroll-padding-top:calc(var(--header-height) + 16px)}
.header-inner,main{max-width:var(--page-width);margin:0 auto;padding-left:var(--page-gutter);padding-right:var(--page-gutter)}
.header-inner{display:flex;align-items:center;gap:12px 28px;min-height:75px;padding-top:12px;padding-bottom:15px}
.brand{display:flex;gap:14px;align-items:center;text-decoration:none;border-radius:var(--radius);padding:6px 8px;margin-left:-8px;color:#fff}
.brand:hover{background:rgb(255 255 255/.07)}
.brand:active{background:rgb(255 255 255/.12)}
.brand img{width:112px;height:31px;object-fit:contain;display:block}
.brand span{border-left:1px solid rgb(255 255 255/.2);padding-left:14px;font-size:12px;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:var(--jungle)}
.office-nav{display:flex;gap:4px;padding:4px;border:1px solid rgb(255 255 255/.1);border-radius:999px;background:rgb(255 255 255/.05)}
.office-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;min-width:124px;padding:0 20px;border-radius:999px;font-family:Inter,sans-serif;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;text-decoration:none;color:rgb(255 255 255/.78)}
.office-nav a:hover{background:rgb(255 255 255/.09);color:#fff}
.office-nav a:active{background:rgb(255 255 255/.14)}
.office-nav a[aria-current=page]{background:var(--jungle);color:var(--night)}
.office-nav a:focus-visible,.brand:focus-visible,.account :focus-visible{outline-color:var(--jungle)}
.account{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:14px;min-width:0}
.account>#account-name{position:relative;display:block;max-width:260px;min-height:40px;padding:10px 14px 10px 48px;border-radius:999px;color:rgb(255 255 255/.88);font-weight:600;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
.account>#account-name::before{content:attr(data-initial);position:absolute;left:4px;top:4px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--avatar-image,none) center/cover no-repeat,var(--avatar-colour,var(--green));color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em}
.account>#account-name:hover{background:rgb(255 255 255/.08);color:#fff}
.account .secondary{background:transparent;border-color:rgb(255 255 255/.28);color:#fff;box-shadow:none}
.account .secondary:hover:not(:disabled){background:rgb(255 255 255/.1);border-color:rgb(255 255 255/.6)}
.account .secondary:active:not(:disabled){background:rgb(255 255 255/.16)}

/* Page */
main{min-height:calc(100dvh - var(--header-height) - 4px);padding-top:40px;padding-bottom:80px}
.loading{padding:80px 0;text-align:center;font-weight:600}
.notice{position:relative;border:1px solid rgb(244 140 91/.4);border-radius:var(--radius);padding:12px 16px 12px 20px;background:var(--surface);box-shadow:var(--shadow-card);margin-bottom:24px;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.notice::before{content:'';position:absolute;left:-1px;top:-1px;bottom:-1px;width:5px;border-radius:var(--radius) 0 0 var(--radius);background:var(--jungle)}
.notice.bad,.error{color:var(--danger);background:var(--danger-bg);border-color:var(--danger-line)}
.notice.bad::before{background:var(--red)}
.error{font-size:14px;font-weight:600;padding:10px 14px;border:1px solid var(--danger-line);border-radius:var(--radius);margin:0 0 16px}
.workspace-heading{margin-bottom:20px}
.workspace-status{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;min-height:22px;margin-top:12px;font-size:14px;font-weight:600;color:var(--ink)}
/* Documents keeps its count in the list footer, so its status line only shows badges or search results.
   Settings and item pages keep their line so their toolbars don't move while data loads. */
#workspace-access:empty{display:none}
.workspace-status>span+span{padding-left:12px;border-left:1px solid rgb(51 51 51/.2)}
.workspace-status .access-status{display:inline-flex;align-items:center;gap:5px}
.workspace-status>.access-status{padding:1px 10px 1px 8px;border:1px solid rgb(255 180 71/.6);border-radius:999px;background:var(--citrus);font-size:12px}
.workspace-status .glyph{width:13px;height:13px}
.workspace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;margin-bottom:16px}
.workspace-location{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
.workspace-location:not(:has(>:not([hidden]))){display:none}
#refresh>.glyph{display:none}
.workspace-toolbar>.document-actions{margin-left:auto;flex-shrink:0}
.folder-back{flex:none;gap:6px;padding-left:12px;padding-right:18px}
.folder-back .glyph{width:18px;height:18px}
.folder-back:disabled{cursor:wait}
.breadcrumbs{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin:0;font-size:12px;color:var(--muted);min-width:0}
.breadcrumbs:empty{display:none}
/* Block-level text lets a long folder name end in "…" instead of clipping at both ends. */
.breadcrumbs button{display:inline-block;min-height:30px;max-width:20ch;padding:0 12px;font-size:13px;font-weight:600;border-color:var(--edge);border-radius:999px;background:var(--surface);color:var(--ink);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.breadcrumbs span{overflow-wrap:anywhere}
.breadcrumbs span[aria-current]{color:var(--ink);font-weight:700;padding:0 4px;max-width:22ch}
.page-description{color:var(--ink);font-size:15px;margin-top:12px}
.section{margin-top:4px}
.section+.section{margin-top:28px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 16px;margin-bottom:12px}
.section-note{font-size:13px;color:var(--muted);margin-top:4px;max-width:70ch}

/* Lists: one raised white card, hairline dividers, shared column grid */
.list{background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-card)}
.list-head{display:grid;gap:16px;padding:10px 16px;background:var(--subtle);border-bottom:1px solid var(--line);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.file-columns{grid-template-columns:minmax(0,1fr) 160px 190px 88px}
.people-columns{grid-template-columns:minmax(0,1fr) 90px 100px 105px 110px}
.person-actions{flex-direction:column;align-items:stretch}
.person-actions .secondary{padding:0 12px}
.person-created{font-size:13px;color:var(--muted)}
.people-panels{display:grid;gap:24px;min-width:0}
.people-card{display:flex;flex-direction:column;padding:24px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card);min-width:0}
.people-card .list{display:block;box-shadow:none;border-radius:var(--radius)}
.people-card #people,.people-card #approval-people{display:block}
#settings .people-card .section-head{min-height:44px;margin-bottom:16px}
.people-card .person,.people-card .empty{min-height:64px}
.people-card .empty{display:grid;place-content:center;padding:12px 16px}
.people-card h2{font-size:18px}
.file-row{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:16px;align-items:center;padding-right:16px}
.file-row+.file-row,.person+.person{border-top:1px solid var(--line)}
.file-open{display:grid;grid-template-columns:minmax(0,1fr) 160px 190px;gap:16px;align-items:center;width:100%;min-width:0;min-height:60px;padding:10px 0 10px 16px;border:0;border-radius:0;background:transparent;text-align:left}
.file-row:hover{background:var(--hover)}
.file-row:has(.file-open:active:not(:disabled)){background:var(--pressed)}
.file-open:hover:not(:disabled),.file-open:active:not(:disabled){background:transparent}
.file-open:focus-visible{outline-offset:-3px;border-radius:var(--radius)}
.file-title{display:flex;gap:12px;align-items:center;min-width:0}
.file-name{overflow-wrap:anywhere;line-height:1.35;font-weight:600}
button.file-open .file-name{font-weight:700}
/* File-type tiles: folders are green; documents take one accent family by type. */
.file-icon{width:36px;height:36px;display:grid;place-items:center;flex:none;background:var(--mint);border:1px solid rgb(244 140 91/.3);border-radius:var(--radius);color:var(--green)}
.file-icon .glyph{width:20px;height:20px}
.file-icon .glyph path{fill:rgb(244 140 91/.24)}
.file-icon.document{background:var(--subtle);border-color:var(--edge);color:var(--ink);font-size:10px;font-weight:700;letter-spacing:.3px}
.file-icon[data-type=pdf]{background:var(--blush);border-color:rgb(255 71 71/.34)}
.file-icon[data-type=doc]{background:var(--sky);border-color:rgb(0 187 179/.4)}
.file-icon[data-type=sheet]{background:var(--mint);border-color:rgb(244 140 91/.4)}
.file-icon:is([data-type=slides],[data-type=image]){background:var(--citrus);border-color:rgb(255 180 71/.6)}
.row-meta{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.meta-label{display:none}
.row-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.row-action{width:40px;min-height:40px;padding:0;color:var(--muted);border-color:var(--edge);background:var(--surface)}
.row-action:hover:not(:disabled){color:var(--green);background:var(--surface);border-color:var(--jungle)}
.row-action:active:not(:disabled){background:var(--pressed);border-color:var(--green)}
.row-action:focus-visible,.file-open:focus-visible{outline-color:var(--focus)}
.folder-list-head{align-items:center}
.folder-list-head .breadcrumbs{text-transform:none;letter-spacing:normal;font-size:13px}
.folder-list-head .breadcrumbs:empty{display:flex;min-height:20px}
.row-action .glyph{width:20px;height:20px}
.row-action[aria-busy=true]{font-size:0}
.row-action[aria-busy=true]::before{margin:0}
.tag{display:inline-flex;align-items:center;gap:4px;margin-left:10px;padding:1px 9px 1px 7px;border:1px solid rgb(255 180 71/.6);border-radius:999px;background:var(--citrus);color:var(--ink);font-size:12px;font-weight:700;white-space:nowrap;vertical-align:1px}
.tag .glyph{width:13px;height:13px}
/* New: items added in the last 36 hours. */
.tag.new{border-color:rgb(244 140 91/.4);background:var(--mint)}
.tag.new .glyph{color:var(--green)}
.tag.new .glyph path{fill:rgb(244 140 91/.3)}
/* Lock: the item has permission rules of its own. Hover, or tap on phones, shows Required Role (#lock-tip). */
.tag.lock-tag{gap:0;margin-left:8px;padding:2px;border-color:var(--edge);background:var(--surface);color:var(--ink);cursor:help}
.file-line .tag.lock-tag{display:inline-flex;width:auto;margin-top:0;vertical-align:-2px}
.tag.lock-tag .glyph{width:14px;height:14px}
.lock-tip{position:fixed;z-index:70;display:grid;gap:6px;justify-items:start;max-width:min(320px,calc(100vw - 16px));padding:8px 10px 9px;border:1px solid var(--edge);border-radius:12px;background:var(--surface);box-shadow:0 10px 28px -12px rgb(34 31 32/.35)}
.lock-tip[hidden]{display:none}
.lock-tip strong{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
/* Settings → Your account → Claude connections (access tokens for /mcp). */
.connection-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 16px;min-height:60px;padding:8px 16px;border-bottom:1px solid var(--line)}
.connection-row:last-of-type{border-bottom:0}
.connection-name{min-width:0;overflow:hidden;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.connection-meta{grid-column:1;min-width:0;font-size:13px;color:var(--muted)}
.connection-row>button{grid-column:2;grid-row:1/span 2}
.connection-secret{display:grid;gap:8px;padding:12px 16px;border:1px solid rgb(244 140 91/.35);border-radius:var(--radius);background:var(--mint)}
.connection-secret[hidden]{display:none}
.connection-copy{display:flex;flex-wrap:wrap;gap:8px}
.connection-copy input{flex:1 1 260px;min-width:0;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}

/* Item settings page: side menu + stacked panels */
.settings-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:32px;align-items:start}
.settings-layout:has(.side-nav[hidden]){grid-template-columns:minmax(0,1fr)}
.side-nav{position:sticky;top:calc(var(--header-height) + 20px);display:grid;gap:4px;padding:10px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
.side-nav button,.side-nav a{display:flex;align-items:center;min-height:44px;padding:8px 14px;text-align:left;font-size:14px;font-weight:600;border:1px solid transparent;border-radius:var(--radius);background:transparent;text-decoration:none;color:var(--ink)}
.side-nav button:hover:not(:disabled),.side-nav a:hover{border-color:transparent;background:rgb(34 31 32/.04)}
.side-nav button:active:not(:disabled),.side-nav a:active{background:rgb(34 31 32/.1);border-color:transparent}
.side-nav :is(button,a)[aria-current=page],.side-nav :is(button,a)[aria-current=page]:hover,.side-nav :is(button,a)[aria-current=page]:active{background:rgb(34 31 32/.07);border-color:transparent;font-weight:700;color:var(--night)}
.side-nav :is(button,a):focus-visible{outline-color:var(--focus)}
.side-nav .danger-text{color:var(--danger)}
.nav-group-title{margin:0;padding:6px 14px 8px;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.nav-divider{height:1px;background:var(--line);margin:8px 0}
.side-nav.separate-groups{padding:0;border:0;background:transparent;box-shadow:none;gap:16px;display:grid}
.nav-card{display:grid;gap:4px;padding:10px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
.new-tab-mark{display:flex;margin-left:auto;color:var(--muted)}
.new-tab-mark .glyph{width:15px;height:15px}
.settings-scope{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--ink)}
.settings-scope::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--jungle);box-shadow:0 0 0 4px rgb(244 140 91/.18)}
.settings-content>.section+.section{margin-top:0}
.settings-content>.section{margin-top:0}
.settings-content>.advanced{margin-top:0}
#settings .settings-content>.section{padding:24px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
/* Roles: the list is the card itself (header row, role rows, footer); New role sits in the toolbar. */
#settings .settings-content>#roles-panel{padding:0;border:0;background:none;box-shadow:none}
#custom-roles>.list-head{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:32px;align-items:center;padding:0 16px}
#settings .section-head{align-items:center;margin-bottom:16px;min-height:40px}
#settings #advanced>summary{display:none}
#settings #advanced>.advanced-body{padding:0 24px}
.danger-text{color:var(--danger)}
.settings-content{display:grid;gap:24px;min-width:0}
.panel{background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius-lg);box-shadow:var(--shadow-card);scroll-margin-top:calc(var(--header-height) + 16px)}
.panel-head{padding:20px 24px;border-bottom:1px solid var(--line)}
.panel-head h2{font-size:18px}
.panel-head h2:focus{outline:none}
.panel-body{padding:24px;display:grid;gap:16px}
.panel-body>.field-hint{margin:-8px 0 0}
.panel-body>button{justify-self:start}
.form-field+.section-note{margin-top:8px}
.panel-body .preview-image{margin:0}
.panel-actions{display:flex;justify-content:flex-end;padding-top:16px;margin-top:20px;border-top:1px solid var(--line)}
.panel.empty{padding:48px 24px}
.inline-form{display:flex;align-items:flex-end;gap:12px}
.inline-form .form-field{flex:1;min-width:0;max-width:480px}
.inline-form button{min-height:44px}
.choice-list{display:grid;border:1px solid var(--edge);border-radius:var(--radius);overflow:hidden}
.choice{display:flex;align-items:flex-start;gap:12px;margin:0;padding:14px 16px;cursor:pointer;font-size:15px;font-weight:500}
.choice-title{font-weight:700}
.choice+.choice{border-top:1px solid var(--line)}
.choice:hover{background:var(--hover)}
.choice:has(input:checked){background:var(--mint)}
.choice:has(input:checked) small{color:var(--ink)}
.choice:has(input:disabled){cursor:default;background:var(--subtle)}
.choice:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:-3px}
.choice input{margin-top:3px}
input[type=radio],input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;margin:0;flex:none;accent-color:var(--green)}
.restricted-detail{display:grid;gap:20px;margin-top:20px}
fieldset{margin:0;padding:0;border:0;min-width:0}
legend{padding:0;margin-bottom:8px;font-size:14px;font-weight:700;color:var(--ink)}
fieldset>.section-note{margin:-4px 0 8px}
.adder{display:flex;gap:8px;margin-top:8px}
.adder select{margin:0;max-width:360px}
.adder button{min-height:44px}
.callout{display:flex;gap:10px;align-items:flex-start;padding:12px 16px;border:1px solid rgb(0 187 179/.35);border-radius:var(--radius);background:var(--sky);font-size:14px;color:var(--ink)}
.callout .glyph{margin-top:3px}
.file-list[aria-busy=true] .file-row{opacity:.6;pointer-events:none}
/* Every list card ends in its own footer: the count or state on the left, Show more on the right.
   The card's rounded bottom corners belong to the footer, so the last row stays square. Its
   height does not follow Row Size. */
.list-foot{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;min-height:36px;padding:3px 16px;background:var(--subtle);border-top:1px solid var(--line);font-size:13px;font-weight:600;color:var(--muted)}
.list-foot>span{min-width:0;overflow-wrap:anywhere}
.list-foot>.secondary,#home #home-edit-favourites{min-height:28px;margin-left:auto;padding:0 12px;font-size:11px}
.empty{padding:56px 24px;text-align:center;color:var(--muted)}
.empty>p:first-child{color:var(--ink);font-weight:700}
.empty p+p{font-size:13px;margin-top:4px}
.empty-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:16px}

/* People */
.person{display:grid;gap:16px;align-items:center;padding:12px 16px;font-size:14px}
.person-info{min-width:0;overflow-wrap:anywhere}
.person-name{font-size:15px;font-weight:700}
.member-state,.self-note{font-size:13px;color:var(--muted)}
.member-state::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--orange);margin-right:8px}
.member-state.active::before{background:var(--jungle)}
.member-state.revoked::before{background:var(--red)}

/* Advanced: a single disclosure with plain sections inside */
.advanced{margin-top:32px;background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius-lg);box-shadow:var(--shadow-card);overflow:hidden}
summary{display:flex;align-items:center;gap:4px 16px;flex-wrap:wrap;min-height:56px;padding:10px 16px;list-style:none;user-select:none}
summary::-webkit-details-marker{display:none}
summary::after{content:'';width:8px;height:8px;margin:0 6px 4px auto;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);flex:none}
details[open]>summary::after{transform:rotate(-135deg);margin-bottom:-4px}
summary:hover{background:var(--hover)}
summary:active{background:var(--pressed)}
summary:focus-visible{outline-offset:-3px;border-radius:var(--radius-lg)}
details[open]>summary{border-bottom:1px solid var(--line)}
.summary-title{font-size:16px;font-weight:700}
.summary-note{font-size:13px;color:var(--muted)}
.advanced-body{padding:0 16px}
.advanced-section{padding:24px 0;border-top:1px solid var(--line)}
.advanced-body>.advanced-section:first-child{border-top:0}
.advanced-section .detail-grid{margin-top:14px}
.plain-list{margin-top:8px}
.plain-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;font-size:14px;overflow-wrap:anywhere}
.plain-row+.plain-row{border-top:1px solid var(--line)}
.plain-row>div{min-width:0}
.plain-row time{font-size:13px;color:var(--muted);flex:none}
.plain-row button{flex:none;min-height:36px;font-size:12px}
.detail-grid{display:grid;grid-template-columns:max-content 1fr;gap:10px 24px;font-size:14px}
.detail-grid dt{color:var(--muted)}
.detail-grid dd{margin:0;overflow-wrap:anywhere;font-weight:600}

/* Sign in */
.auth{max-width:440px;margin:48px auto 0;padding:40px;border:1px solid var(--edge);border-radius:24px;background:var(--surface);box-shadow:var(--shadow-pop)}
.auth h1{font-size:32px}
.auth>.muted{margin-top:14px;font-size:15px;overflow-wrap:anywhere}
.auth form{margin-top:24px}
.auth .primary{width:100%;min-height:48px}
.auth .hint{font-size:14px;color:var(--muted);margin:0 0 16px}
.field-hint{font-size:13px;color:var(--muted);margin:-8px 0 16px}
/* Password strength under a new-password field (DeAndre, 16 Nov 2026). Three bars fill red, orange, green. */
.strength{display:flex;align-items:center;gap:10px;margin:-6px 0 16px;font-size:13px;font-weight:700;color:var(--muted)}
.strength-bar{display:flex;gap:4px;flex:1}
.strength-bar i{flex:1;height:6px;border-radius:3px;background:var(--line)}
.strength[data-level="0"] .strength-label{color:var(--danger)}
.strength[data-level="1"] .strength-bar i:nth-child(1){background:var(--red)}
.strength[data-level="1"] .strength-label{color:var(--danger)}
.strength[data-level="2"] .strength-bar i:nth-child(-n+2){background:var(--orange)}
.strength[data-level="3"] .strength-bar i{background:var(--jungle)}
.strength[data-level="3"] .strength-label{color:var(--green)}
.auth-help{font-size:13px;color:var(--muted);margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.auth-tabs{display:flex;gap:4px;margin-top:24px;padding:4px;border-radius:999px;background:var(--cream)}
.auth-tabs button{flex:1;min-height:40px;margin-top:0;border:0;background:transparent;box-shadow:none}
.auth-tabs button[aria-selected=true],.auth-tabs button[aria-selected=true]:hover:not(:disabled){background:var(--surface);color:var(--ink);box-shadow:0 2px 6px -2px rgb(34 31 32/.28)}
.auth-tabs button:hover:not(:disabled){background:rgb(255 255 255/.55)}
.auth .auth-intro{margin:0 0 12px;color:var(--ink)}
.auth-steps{margin:0 0 20px;padding-left:22px;font-size:14px;color:var(--muted);line-height:1.5}
.auth-steps li+li{margin-top:6px}
.auth-steps li::marker{color:var(--green);font-weight:700}
.auth-steps strong{color:var(--ink)}
#signup-done{margin-top:24px}
.auth-subtitle{font-size:20px;margin-bottom:8px}
.auth-subtitle:focus{outline:none}
.auth #signup-back{width:100%;min-height:44px;margin-top:16px}
.text-link{display:inline;min-height:0;padding:0;border:0;border-radius:2px;background:none;color:var(--green);font-size:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.text-link:hover:not(:disabled){background:none;border-color:transparent;color:var(--ink)}
/* Back to sign in spans the card under the main button, as in Forgot password. */
.back-link{display:flex;width:100%;min-height:44px;margin-top:12px}
.auth>form[hidden]+.back-link{margin-top:28px}
/* Verify email: one mark per state, neutral to verify, green once verified, amber when the link has expired. */
.verify-mark{display:grid;place-items:center;width:48px;height:48px;margin-bottom:20px;border:1px solid var(--edge);border-radius:50%;background:var(--subtle);color:var(--ink)}
.verify-mark>.glyph{width:24px;height:24px}
#verify:is([data-state=verified],[data-state=approved]) .verify-mark{border-color:rgb(244 140 91/.4);background:var(--mint);color:var(--green)}
#verify:is([data-state=expired],[data-state=incomplete]) .verify-mark{border-color:#f2c98a;background:var(--citrus);color:#7a4a08}
.verify-message{margin-top:14px;font-size:15px}
#verify-for:not([hidden])+.verify-message{margin-top:6px}
.verify-actions{display:grid;gap:12px;margin-top:28px}
.verify-actions>*{margin:0}
/* Footer: Deep Charcoal, like the website. The directory shares the page edges and keeps every page visible. */
.site-footer{background:var(--night);color:rgb(255 255 255/.72);font-size:13px}
.footer-inner{max-width:var(--page-width);margin:0 auto;padding:40px var(--page-gutter) 48px}
.footer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px 24px;flex-wrap:wrap}
.footer-brand{display:flex;align-items:center;gap:14px;font-size:12px;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:var(--jungle)}
.footer-brand img{display:block;width:97px;height:27px;object-fit:contain}
.footer-brand img+span{padding-left:14px;border-left:1px solid rgb(255 255 255/.2)}
.footer-note{font-size:12px;color:rgb(255 255 255/.6)}
.footer-directory{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:start;gap:16px;margin-top:28px;padding-top:28px;border-top:1px solid rgb(255 255 255/.1)}
.footer-column{min-width:0}
.footer-directory h2{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;line-height:1.4;min-height:22px;margin-bottom:10px;color:var(--jungle)}
.footer-directory ul{list-style:none;padding:0;margin:0}
.footer-directory a{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:7px 10px;border:1px solid rgb(255 255 255/.08);border-radius:10px;background:rgb(255 255 255/.02);color:rgb(255 255 255/.84);text-decoration:none;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.footer-directory li+li{margin-top:4px}
.footer-directory a:hover{background:rgb(255 255 255/.07);border-color:rgb(244 140 91/.6);color:#fff}
.footer-directory a:active{background:rgb(255 255 255/.12);border-color:var(--jungle)}
.footer-directory a:focus-visible{outline-color:var(--jungle)}
.footer-directory a[aria-current=page]{border-color:var(--jungle);background:rgb(244 140 91/.16);color:#fff}
.footer-tag,.footer-link-note{font-size:11px;color:rgb(255 255 255/.6);flex:none}
.footer-tag{padding:1px 6px;border:1px solid rgb(255 255 255/.18);border-radius:999px;font-weight:600;letter-spacing:.04em}
.footer-directory a:has(.footer-link-note){flex-direction:column;align-items:flex-start;justify-content:center;gap:1px}
.footer-link-note{text-align:left}
.footer-described-link small{display:block;margin-top:3px;font-size:11px;line-height:1.45;color:rgb(255 255 255/.6)}
.footer-directory .footer-described-link{display:block}
@media(max-width:1050px){.footer-directory{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 24px}}
@media(max-width:720px){.footer-inner{padding-top:28px}.footer-directory{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px}.footer-directory a{min-height:44px}.footer-heading{display:block}.footer-note{margin-top:10px}.footer-link-note{font-size:10px}}
@media(max-width:359px){.footer-directory{grid-template-columns:1fr}}

/* Dialog */
/* Used only for short forms and confirmations: a titled header, a body and an action bar. */
dialog{--dialog-x:24px;--dialog-y:20px;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--edge);border-radius:24px;color:var(--ink);box-shadow:var(--shadow-pop)}
dialog::backdrop{background:rgb(34 31 32/.55)}
.preview-dialog{width:min(880px,calc(100vw - 32px))}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 16px 16px var(--dialog-x);border-bottom:1px solid var(--line)}
.dialog-heading h2{font-size:18px}
#dialog-status{margin:16px var(--dialog-x) 0}
#dialog-content{padding:var(--dialog-y) var(--dialog-x)}
.close{font-family:Arial,sans-serif;font-size:24px;line-height:1;width:40px;height:40px;flex:none;border-color:var(--edge);border-radius:50%;color:var(--muted)}
.dialog-buttons{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin:24px calc(var(--dialog-x) * -1) calc(var(--dialog-y) * -1);padding:14px var(--dialog-x);border-top:1px solid var(--line);background:var(--subtle)}
.dialog-buttons+.dialog-buttons{margin-top:var(--dialog-y)}
.push-left{margin-right:auto}
.dialog-copy{font-size:14px;color:var(--muted);margin-bottom:16px}
.detail-grid+.dialog-copy{margin:16px 0 0}
.preview-image{display:block;max-width:100%;max-height:55vh;margin:0 auto 20px;object-fit:contain;border:1px solid var(--line);border-radius:var(--radius)}
.setup-link{font-size:13px;word-break:break-all;background:var(--subtle);padding:12px;border:1px solid var(--edge);border-radius:var(--radius);user-select:all}
.form-field input,.form-field select{margin-bottom:0}
.code-input{max-width:220px;font-size:22px;font-weight:700;letter-spacing:.3em;text-align:center}
.detail-grid+.form-field{margin-top:16px}
#dialog .form-field+.field-hint{margin:6px 0 0}
.code-actions{display:flex;justify-content:flex-start;margin-top:12px}
.code-actions button{min-height:36px;font-size:12px}
.form-field+.form-field,.form-field+div{margin-top:16px}
.permission-description{font-size:13px;color:var(--muted);margin-top:8px}
.access-editor{grid-template-columns:minmax(0,1fr)}
.role-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px}
.role-row+.role-row{border-top:1px solid var(--line)}
.role-row>div,.person-role{min-width:0;overflow-wrap:anywhere}
.role-row button{flex:none}
.role-choices{margin-top:24px}
.permission-table{border:1px solid var(--edge);border-radius:var(--radius);overflow:hidden}
.permission-row{display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:16px;padding:10px 14px}
.permission-row+.permission-row{border-top:1px solid var(--line)}
.permission-row select{margin:0}
.permission-row>div>span{font-weight:700}
.permission-advanced{margin-top:20px}
.permission-summary{margin:10px 0;overflow-wrap:anywhere}
#role-editor .permission-summary{margin-top:24px}
.permission-reset{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:12px}
.permission-reset button{flex:none}
.form-state{margin-right:auto;font-size:13px;font-weight:600;color:var(--muted);align-self:center}
.role-delete{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}
/* Secondary actions on the left of a Save bar (Delete role; Rename, Account options); the save state sits beside Save */
.panel-side{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-right:auto}
.panel-actions:has(.panel-side){gap:12px}
.panel-actions:has(.panel-side) .form-state{margin-right:0}
@media(max-width:720px){
  .panel-actions:has(.panel-side){flex-direction:column;align-items:stretch}
  .panel-actions:has(.panel-side) .form-state{order:1;align-self:flex-start}
  .panel-actions:has(.panel-side) .form-state:empty{display:none}
  .panel-actions:has(.panel-side)>[type=submit]{order:2}
  .panel-actions:has(.panel-side) .panel-side{order:3;margin-right:0}
}
/* Segmented tabs share the sign-in style: one tinted track, the chosen tab raised in white. */
.role-tabs{display:flex;gap:4px;margin-bottom:8px;padding:4px;border-radius:999px;background:var(--cream);width:max-content;max-width:100%}
.role-tabs button{border:0;background:transparent;box-shadow:none;min-height:36px}
.role-tabs button[aria-selected=true],.role-tabs button[aria-selected=true]:hover:not(:disabled){background:var(--surface);color:var(--ink);box-shadow:0 2px 6px -2px rgb(34 31 32/.28)}
.role-tabs button:hover:not(:disabled){background:rgb(255 255 255/.55)}
.role-people-list{margin-top:20px}
.role-people-list .choice:has(input:disabled){opacity:.75;cursor:default}
.role-people-list small{overflow-wrap:anywhere}
.permission-row{grid-template-columns:minmax(0,1fr) auto;padding:14px}
.permission-row small{margin-top:3px;max-width:34ch}
.permission-states{display:flex;gap:6px;flex-wrap:wrap}
.permission-state{display:flex;align-items:center;gap:6px;margin:0;min-height:40px;padding:6px 12px;border:1px solid var(--control);border-radius:999px;cursor:pointer;background:var(--surface);font-size:13px;font-weight:600}
.permission-state input[type=radio]{appearance:auto;min-height:0;width:15px;height:15px;margin:0;padding:0;accent-color:var(--green);flex:none}
.permission-state:has(input:checked){background:var(--cream);border-color:rgb(51 51 51/.4);font-weight:700}
.permission-state.allow:has(input:checked){background:var(--mint);border-color:var(--jungle)}
.permission-state.deny:has(input:checked){background:var(--blush);border-color:var(--red)}
.permission-state:hover{border-color:var(--control-hover)}
.access-inspector{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.access-inspector>.section-note{margin:8px 0 16px}
.access-results{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;margin:14px 0}
.access-results dd{margin:0;font-weight:600}
@media(max-width:1100px){.permission-row{grid-template-columns:minmax(0,1fr);gap:10px}.permission-row small{max-width:none}}
@media(max-width:720px){.permission-table .permission-row{grid-template-columns:minmax(0,1fr)}.permission-states{gap:5px}.permission-state{min-height:44px;flex:1;justify-content:center;padding:6px}.role-tabs{width:100%}.role-tabs button{flex:1}.role-people-list .choice{min-width:0}}
@media(max-width:720px){#role-editor .panel-actions{flex-direction:column;gap:12px}#role-editor .panel-actions .form-state{align-self:flex-start}#role-editor .panel-actions .form-state:empty{display:none}}
@media(max-width:720px){.permission-row{grid-template-columns:minmax(0,1fr) 120px;padding:10px}.permission-reset{align-items:stretch;flex-direction:column;gap:4px}.document-actions>#write-actions{flex-wrap:wrap}.document-actions{align-items:flex-start}.document-actions>#write-actions button{flex:1 1 auto}}

@media(max-width:900px){
  .file-columns{grid-template-columns:minmax(0,1fr) 130px 170px 88px}
  .settings-layout{grid-template-columns:minmax(0,1fr);gap:16px}
  .side-nav{position:static;display:flex;flex-wrap:wrap;gap:8px}
  .nav-card{display:flex;flex-wrap:wrap;gap:8px}
  .side-nav .nav-group-title,.side-nav .nav-divider{flex-basis:100%}
  .side-nav button,.side-nav a{border-color:var(--control);border-radius:999px;background:var(--surface);padding:0 16px}
  .side-nav :is(button,a)[aria-current=page],.side-nav :is(button,a)[aria-current=page]:hover,.side-nav :is(button,a)[aria-current=page]:active{background:var(--night);border-color:var(--night);color:#fff}
  .file-open{grid-template-columns:minmax(0,1fr) 130px 170px}
  .office-nav a{min-width:104px;padding:0 16px}
  .account>#account-name{flex:none;width:44px;min-height:44px;padding:0}
  .account>#account-name,.account>#account-name:hover{color:transparent}
  .account>#account-name::before{left:6px;top:6px}
}
@media(max-width:720px){
  :root{--page-gutter:16px;--control-height:44px;--header-height:131px}
  .header-inner{flex-wrap:wrap;padding-top:12px;padding-bottom:15px;gap:10px 12px}
  .brand{gap:10px}
  .brand img{width:87px;height:24px}
  .brand span{padding-left:10px;font-size:11px}
  .account{gap:8px}
  .account .secondary{padding:0 14px}
  .office-nav{order:3;width:100%}
  .office-nav a{flex:1;min-width:0;min-height:40px}
  main{padding-top:28px;padding-bottom:56px}
  h1{font-size:30px}
  .auth h1{font-size:28px}
  .workspace-toolbar{flex-wrap:wrap;gap:12px}
  .workspace-location{flex-basis:100%;gap:10px}
  .workspace-toolbar>.document-actions{width:100%;margin-left:0}
  .workspace-heading{margin-bottom:16px}
  .document-actions{flex-wrap:wrap}
  .document-actions>#write-actions{flex:1}
  .document-actions>#write-actions button{flex:1}
  .breadcrumbs button{min-height:44px;max-width:16ch;padding:0 12px}
  .list-head{display:none}
  .folder-list-head{display:block}
  .folder-list-head>span{display:none}
  .file-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-right:12px}
  .file-open{display:block;padding:12px 0 12px 12px;min-height:72px}
  .file-title{margin-bottom:4px}
  .row-meta{display:block;padding-left:48px;font-size:13px}
  .meta-label{display:inline;margin-right:5px}
  .row-action{width:44px;min-height:44px}
  .section-head{flex-wrap:wrap;align-items:center}
  .person{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px}
  .person-info{grid-column:1;margin-bottom:2px}
  .person-role,.member-state,.person-created{grid-column:1;font-size:13px;color:var(--muted)}
  .person .row-actions{grid-column:2;grid-row:1 / 5}
  .plain-row{align-items:flex-start}
  .plain-row:has(time){flex-direction:column;gap:2px}
  .auth{margin-top:16px;padding:28px 24px}
  dialog{--dialog-x:18px;--dialog-y:16px}
  .plain-row button{min-height:44px}
  .inline-form,.adder{flex-direction:column;align-items:stretch}
  .inline-form .form-field,.adder select{max-width:none}
  .panel-head{padding:16px}
  .panel-body{padding:16px}
  .panel-actions button{flex:1}
  .panel-body>button{justify-self:stretch}
  .people-card{padding:16px}
  #settings .settings-content>.section{padding:16px}
  #settings #advanced>.advanced-body{padding:0 16px}
  .tag{margin-left:0;display:flex;width:max-content;margin-top:4px}
  .dialog-buttons button{flex:1 1 auto}
  .push-left{margin-right:0}
}
/* Below 360 px the Office label gives way so the account button and Sign out keep one row. */
@media(max-width:359px){.header-inner:has(#account:not([hidden])) .brand span{display:none}}
@media(prefers-reduced-motion:no-preference){
  button,a,summary,input,select,.file-row{transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}
  .primary:active:not(:disabled),.secondary:active:not(:disabled),.office-nav a:active{transform:translateY(1px)}
  summary::after{transition:transform .15s}
  button[aria-busy=true]::before,.loading-state::before{animation:spin .75s linear infinite}
  @keyframes spin{to{transform:rotate(360deg)}}
}

/* Externals follows the same settings cards. */
#externals-panel { display: grid; gap: 24px; min-width: 0; }
#externals-panel[hidden] { display: none; }
.external-card { padding: 24px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow-wrap: anywhere; }
.external-card h2 { margin: 0 0 16px; font-size: 18px; }
.external-card details { border-top: 1px solid var(--line); padding: 14px 0; }
.external-card summary { cursor: pointer; border-radius: 10px; padding: 8px; }
.external-card summary:hover { background: var(--hover); }
.external-card summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.people-card .person{padding:8px 16px}
.people-card .list-head{min-height:32px;align-items:center;padding:0 16px}
.people-card .person-actions .secondary{min-height:36px;padding:0 10px;font-size:12px;letter-spacing:.03em}
.people-card .person-name{font-size:15px;line-height:1.3}
.people-card .person-info small{font-size:13px;line-height:1.3}
@media(max-width:720px){.people-card .person{padding:12px}.people-card .person-actions .secondary{min-height:44px}.people-card .list-head{display:none}#add-person{min-height:44px}}
.person-menu{display:flex;gap:12px;flex-wrap:wrap}
@media(min-width:721px){.people-columns{grid-template-columns:minmax(0,1fr) 120px 135px 105px 122px}.people-card .person-role{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.people-card .person-role small{overflow:hidden;text-overflow:ellipsis}}

.email-preview-frame{display:block;width:100%;height:620px;border:1px solid var(--edge);border-radius:var(--radius);background:#fff}
.preview-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:20px}
.preview-links a{border:1px solid var(--edge);border-radius:var(--radius);padding:10px 14px;font-size:14px;font-weight:600;text-decoration:none}
.preview-links a:hover{background:var(--hover);border-color:var(--jungle)}
@media(max-width:620px){.preview-links{grid-template-columns:1fr}.email-preview-frame{height:660px}}
#role-editor .form-field + .section-note{margin-top:12px}
.email-details{display:grid;grid-template-columns:160px minmax(0,1fr);gap:20px 24px;margin:0}
.email-details dt{font-weight:700;color:var(--muted)}
.email-details dd{margin:0;line-height:1.5;overflow-wrap:anywhere}
.email-details .email-detail-break{border-top:1px solid var(--line);padding-top:24px;margin-top:8px}
@media(max-width:620px){.email-details{grid-template-columns:1fr;gap:8px}.email-details dd+dt{margin-top:18px}.email-details dd.email-detail-break{border-top:0;padding-top:0;margin-top:0}}

.external-card:has(.email-details) h2{margin-bottom:28px}

/* Documents: name search, server-side sort and Row Size. Row Size is a personal display
   preference for the Documents list only. Computers: 100/75/50/25% = 60/45/30/24 px rows;
   25% stops at 24 px because 15 px cannot hold readable text or usable buttons. Phones use
   one-line rows at 75% and smaller (see the phone rules below). */
.workspace-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 24px;flex-wrap:wrap}
.workspace-title{min-width:0}
.workspace-find{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;flex:0 1 620px;min-width:0}
.search-form{position:relative;display:flex;align-items:center;gap:8px;flex:1 1 300px;min-width:0}
.search-form input{flex:1 1 180px;min-width:0;min-height:var(--control-height);margin:0;padding-left:42px;border-radius:999px;box-shadow:0 1px 2px rgb(34 31 32/.05)}
.search-form .search-glyph{position:absolute;left:15px;top:50%;width:18px;height:18px;margin-top:-9px;color:var(--muted);pointer-events:none}
.search-form button,.find-actions button{flex:none}
.find-actions{display:flex;gap:8px}
.view-select{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:var(--control-height);margin:0;padding:0 14px 0 16px;border:1px solid var(--control);border-radius:999px;background:var(--surface);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);white-space:nowrap;cursor:pointer}
.view-select:hover{border-color:var(--control-hover);background:var(--hover)}
.view-select:focus-within{outline:3px solid var(--focus);outline-offset:2px}
.view-select .view-value{min-width:0;max-width:24ch;margin-left:2px;overflow:hidden;text-overflow:ellipsis;color:var(--ink);font-size:14px;font-weight:700;letter-spacing:normal;text-transform:none}
.view-select>.glyph{width:16px;height:16px;flex:none;color:var(--muted)}
/* The small label and the larger value sit on one baseline, level with Refresh. Centred separately,
   the 11 px label rode about 1 px above the 14 px value. */
.view-select>span:first-child{position:relative;top:.75px}
.view-select select{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:999px;opacity:0;appearance:none;font-size:16px;cursor:pointer}
.view-select select:focus-visible{outline:none}
.result-path{margin-top:2px;font-size:12px;line-height:1.35}
/* The file-type icon and the row buttons always share one height, with equal space above and
   below. Computers: 100/75/50/25% = 60/45/30/24 px rows with 36/28/22/18 px icons and buttons.
   At 75% and smaller every item stays on one line: a long name ends with … and shows in full on
   hover. Search results keep their folder path on a second line. */
:is(.file-list,.audit-results){--row-height:60px;--row-icon:36px;--row-action:36px;--row-glyph:20px;--row-badge:10px;--row-radius:10px}
:is(.file-list,.audit-results)[data-row-size="75"]{--row-height:45px;--row-icon:28px;--row-action:28px;--row-glyph:16px;--row-badge:8.5px;--row-radius:8px}
:is(.file-list,.audit-results)[data-row-size="50"]{--row-height:30px;--row-icon:22px;--row-action:22px;--row-glyph:14px;--row-badge:7px;--row-radius:6px}
:is(.file-list,.audit-results)[data-row-size="25"]{--row-height:24px;--row-icon:18px;--row-action:18px;--row-glyph:12px;--row-badge:6px;--row-radius:5px}
.file-list .file-open{min-height:var(--row-height)}
.file-list .file-icon{width:var(--row-icon);height:var(--row-icon);border-radius:var(--row-radius)}
.file-list .file-icon.document{font-size:var(--row-badge)}
.file-list .row-action{width:var(--row-action);height:var(--row-action);min-height:var(--row-action);border-radius:var(--row-radius)}
.file-list :is(.file-icon,.row-action) .glyph{width:var(--row-glyph);height:var(--row-glyph)}
.file-list:is([data-row-size="75"],[data-row-size="50"]) .file-open{padding-top:2px;padding-bottom:2px}
.file-list[data-row-size="25"] .file-open{padding-top:1px;padding-bottom:1px}
.file-list:is([data-row-size="50"],[data-row-size="25"]) .file-title{gap:8px}
.file-list:is([data-row-size="50"],[data-row-size="25"]) .file-icon.document{letter-spacing:0}
.file-list:is([data-row-size="50"],[data-row-size="25"]) .row-actions{gap:6px}
.file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-name{flex:1 1 auto;min-width:0}
.file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-line{display:flex;align-items:center;min-width:0}
.file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) :is(.file-label,.row-meta,.result-path){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .tag{flex:none;padding-top:0;padding-bottom:0}
.file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .result-path{margin-top:0}
.date-short{display:none}
.exception-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px}
.exception-chips:empty{display:none}
.exception-chips-label{font-size:13px;color:var(--muted);margin-right:2px}
.exception-chip{min-height:32px;padding:0 14px;font-size:13px;font-weight:600;border-color:var(--edge);border-radius:999px;background:var(--subtle)}
.exception-chip[aria-current=true]{background:rgb(34 31 32/.07);border-color:var(--night);color:var(--night);font-weight:700}
@media(max-width:720px){
  .workspace-find,.search-form,.find-actions{flex:1 1 100%}
  .search-form input,.search-form button,.find-actions button{min-height:44px}
  .find-actions button{flex:1 1 0}
  /* Back (moved here by app.js) and Refresh are 44 px icons beside Recently updated; their words stay for screen readers. */
  .find-actions>:is(.folder-back,#refresh){flex:none;width:44px;padding:0;justify-content:center}
  .find-actions>:is(.folder-back,#refresh)>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .find-actions>#refresh>.glyph{display:block;width:18px;height:18px}
  .find-actions>#refresh[aria-busy=true]{font-size:0}
  /* The folder path keeps to one line: earlier folders shorten with … first, then the current one. */
  .folder-list-head .breadcrumbs{flex-wrap:nowrap;overflow:hidden}
  .folder-list-head .breadcrumbs>button{flex:0 3 auto;min-width:44px}
  .folder-list-head .breadcrumbs>button:first-child{flex:none}
  .folder-list-head .breadcrumbs>span[aria-hidden]{flex:none}
  .folder-list-head .breadcrumbs>span[aria-current]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .document-actions>.view-select{flex:1 1 0}
  .document-actions>#write-actions{flex:1 1 100%}
  .view-select{min-height:44px}
  .view-select .view-value{margin-left:auto}
  .exception-chip{min-height:40px}
  /* Phones: 100% keeps the detailed rows (creator and date under the name) with 44 px buttons.
     75% and smaller put the name, a short date and the buttons on one line; the icon and the
     buttons stay the same height (36/32/28 px) in 48/40/34 px rows. */
  :is(.file-list,.audit-results){--row-height:72px;--row-action:44px}
  :is(.file-list,.audit-results)[data-row-size="75"]{--row-height:48px;--row-icon:36px;--row-action:36px;--row-glyph:18px;--row-badge:9.5px;--row-radius:10px}
  :is(.file-list,.audit-results)[data-row-size="50"]{--row-height:40px;--row-icon:32px;--row-action:32px;--row-glyph:16px;--row-badge:8.5px;--row-radius:8px}
  :is(.file-list,.audit-results)[data-row-size="25"]{--row-height:34px;--row-icon:28px;--row-action:28px;--row-glyph:15px;--row-badge:8px;--row-radius:7px}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-row{grid-template-columns:minmax(0,1fr) calc(var(--row-action) * 2 + 6px);gap:6px}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-open{display:flex;align-items:center;gap:8px;padding:2px 0 2px 10px}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-title{flex:1 1 auto;gap:8px;margin-bottom:0}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) :is(.created-meta,.meta-label,.date-long){display:none}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .row-meta{flex:none;padding-left:0;font-size:12px;line-height:1.3}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .date-short{display:inline}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .tag{display:inline-flex;width:auto;margin:0 0 0 4px;padding:0;border:0;background:none}
  /* The lock stays visible; "Restricted" is still read out by screen readers. */
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .tag-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}
/* Documents bulk selection follows the existing list borders, controls and row sizes. */
.bulk-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--subtle);font-size:14px}
.bulk-actions>.actions{margin-left:auto;flex-wrap:wrap}
.select-all-label{display:flex;align-items:center;gap:10px;margin:0;min-height:36px;cursor:pointer;font-weight:600}
.bulk-actions input[type=checkbox],.item-select input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--green);cursor:pointer;flex:none}
.file-list .file-row.selectable-row{grid-template-columns:24px minmax(0,1fr) 88px;gap:16px;padding-left:16px}
.file-list .selectable-row .file-open{padding-left:0}
.item-select{display:grid;place-items:center;align-self:stretch;margin:0;cursor:pointer}
.item-select:has(:disabled){cursor:default;opacity:.45}
.file-list .file-row.is-selected{background:var(--mint);box-shadow:inset 3px 0 var(--green)}
.bulk-item-names{max-height:220px;overflow:auto;overflow-wrap:anywhere;padding-left:24px;margin:16px 0}
.bulk-item-names li+li{margin-top:6px}
@media(max-width:720px){
  .bulk-actions{padding:8px 12px;gap:8px 12px}
  .select-all-label{min-height:44px}
  .file-list .file-row.selectable-row{grid-template-columns:36px minmax(0,1fr) calc(var(--row-action) * 2 + 6px);gap:6px;padding-left:4px}
  .file-list:is([data-row-size="75"],[data-row-size="50"],[data-row-size="25"]) .file-row.selectable-row{grid-template-columns:36px minmax(0,1fr) calc(var(--row-action) * 2 + 6px)}
  .file-list .selectable-row .file-open{padding-left:0}
  .item-select{min-height:44px}
}
/* Forgot password and Your account */
.auth-links{margin:12px 0 0;font-size:14px}
#forgot-form .secondary{width:100%;min-height:44px;margin-top:12px}
.account-panels{display:grid;gap:24px;min-width:0}
/* Settings → Your account → Avatar: a 72 px preview beside the colour and photo choices. */
.avatar-editor{display:flex;align-items:flex-start;gap:24px}
.avatar-preview{display:grid;place-items:center;flex:none;width:72px;height:72px;border-radius:50%;background:var(--avatar-image,none) center/cover no-repeat,var(--avatar-colour,var(--green));color:#fff;font-size:24px;font-weight:700;letter-spacing:.02em}
.avatar-preview::before{content:attr(data-initial)}
.avatar-controls{display:grid;gap:8px;min-width:0}
.avatar-label{margin:0;font-size:13px;font-weight:700;color:var(--muted)}
.avatar-label:not(:first-child){margin-top:8px}
.avatar-swatches{display:flex;flex-wrap:wrap;gap:8px}
.avatar-swatches[aria-busy=true]{opacity:.6;pointer-events:none}
.avatar-swatch-option{position:relative;display:grid;place-items:center;width:40px;height:40px;margin:0;border-radius:50%;cursor:pointer}
.avatar-swatch-option input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.avatar-swatch{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--swatch,var(--subtle));border:1px solid rgb(0 0 0/.08);color:var(--muted);font-size:12px;font-weight:700;transition:box-shadow .12s}
.avatar-swatch-option:hover .avatar-swatch{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--control)}
.avatar-swatch-option input:checked+.avatar-swatch{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--night)}
.avatar-swatch-option input:focus-visible+.avatar-swatch{outline:3px solid var(--jungle);outline-offset:4px}
.avatar-photo-actions{display:flex;flex-wrap:wrap;gap:8px}
.avatar-status:empty{display:none}
@media(max-width:720px){.avatar-editor{flex-direction:column;gap:16px}.avatar-swatch-option{width:44px;height:44px}.avatar-photo-actions .secondary{flex:1}}
/* Recovery and activity paging */
.activity-head{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap}
.plain-list>.show-more{margin-top:10px}
.last-sign-in{margin-top:2px;font-size:12px}
/* Who can open this, and access when creating a folder */
.access-list .plain-list{margin-top:4px}
.access-grant{font-size:13px;color:var(--muted);text-align:right;overflow-wrap:anywhere;max-width:55%}
.access-cannot{margin-top:12px}
.access-cannot>summary{min-height:44px;padding:8px 0;font-size:14px;font-weight:600}
.access-inspector>.secondary{margin-top:4px}
.new-folder-access{margin-top:16px}
@media(max-width:720px){.access-grant{text-align:left;max-width:none}}
/* Move or copy: the same folder browser as Upload */
.destination-browser{display:grid;gap:14px;min-width:0}
.destination-browser .breadcrumbs button[aria-current=true]{background:rgb(34 31 32/.07);border-color:var(--night);color:var(--night);font-weight:700}
.destination-browser .panel-actions{gap:8px;flex-wrap:wrap}
@media(max-width:720px){.destination-browser .panel-actions button{flex:1 1 auto}}
.account-panels .panel-body>form{min-width:0}
/* Settings, folder and document settings, Upload and Externals: title and status first, then Back
   with the page's controls on one row, as on Documents. On phones Back keeps that row with Refresh
   (and the Audit log's Size); the Audit log's Person and Action filters share the next row. */
@media(max-width:720px){
  .page-toolbar>.workspace-location{flex:0 0 auto;margin-right:auto}
  .page-toolbar>.document-actions{width:auto;flex-wrap:wrap;justify-content:flex-end}
  #settings-tools{display:contents}
  #settings-tools>.view-select{order:3;flex:1 1 calc(50% - 6px);min-width:0;gap:4px;padding:0 10px 0 12px;letter-spacing:.06em}
  #settings-tools>.view-select>.glyph{width:14px;height:14px}
  #settings-tools>.size-control{order:1;flex:0 0 auto}
  #refresh-settings{order:2}
}
@media(max-width:340px){
  #settings-tools>.view-select{flex-basis:100%}
  #settings-tools>.size-control{flex-basis:auto}
  #settings-tools>.size-control>span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:720px){.list-foot{padding:6px 12px}.list-foot>.secondary,#home #home-edit-favourites{min-height:44px}}
/* Phones: the header is one row (75 px) when the Documents/Settings navigation is hidden. */
@media(max-width:720px){body:has(#office-nav[hidden]){--header-height:75px}}
/* Role pills: a role's name in its own colours (text, background, border), or the neutral default. */
.role-pill{display:inline-flex;align-items:center;max-width:100%;min-height:24px;padding:0 10px;border:1px solid var(--pill-border,var(--edge));border-radius:999px;background:var(--pill-background,var(--subtle));color:var(--pill-text,var(--ink));font-size:12px;font-weight:700;letter-spacing:.02em;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.role-pills{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0;max-width:100%;vertical-align:middle}
.role-row .role-pill{min-height:26px;font-size:13px}
.role-row small{margin-top:4px}
.choice-title .role-pill{min-height:26px;font-size:13px}
.people-card .person-role .role-pills{margin-top:1px}
@media(min-width:721px){.people-card .people-columns{grid-template-columns:minmax(0,1.15fr) minmax(150px,1fr) 120px 105px 122px}.people-card .person-role{white-space:normal;overflow:visible}}
/* Colour in the role editor: a live pill, presets, then the three colours */
.role-colours .pill-preview{display:flex;align-items:center;min-height:32px}
.role-colours .pill-preview .role-pill{min-height:28px;padding:0 14px;font-size:13px}
.colour-presets{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
button.colour-preset{min-height:28px;padding:0 12px;border-width:1px;box-shadow:none;text-transform:none;letter-spacing:.02em;font-size:12px;line-height:1.2;background:var(--pill-background);color:var(--pill-text);border-color:var(--pill-border)}
button.colour-preset:hover:not(:disabled),button.colour-preset:active:not(:disabled){background:var(--pill-background);color:var(--pill-text);border-color:var(--pill-border);filter:brightness(.95)}
.colour-fields{display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:14px}
.colour-field{display:flex;flex-direction:column;gap:6px;margin:0;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.colour-field input[type=color]{width:64px;min-height:36px;height:36px;margin:0;padding:3px;border:1px solid var(--control);border-radius:var(--radius);background:var(--surface);cursor:pointer}
.colour-field input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.colour-field input[type=color]::-webkit-color-swatch{border:0;border-radius:8px}
.colour-field input[type=color]::-moz-color-swatch{border:0;border-radius:8px}
/* A role's People section: this role's box, the person, their pills and a dropdown for the rest */
.role-people{margin-top:4px}
.role-people-columns{grid-template-columns:24px minmax(0,1fr) minmax(0,1.2fr) 40px;min-height:36px;align-items:center;padding:0 12px 0 16px}
.role-person+.role-person{border-top:1px solid var(--line)}
.role-person-row{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(0,1.2fr) 40px;gap:12px 16px;align-items:center;min-height:60px;padding:8px 12px 8px 16px}
.role-person-check{display:flex;align-items:center;justify-content:center;margin:0;min-height:44px;cursor:pointer}
.role-person-check input{width:20px;height:20px;margin:0;cursor:pointer}
.role-person-check:has(input:disabled){cursor:default}
.role-person-info{min-width:0;overflow-wrap:anywhere}
.role-person-info .person-name{display:block;font-size:15px;font-weight:700;line-height:1.3}
.role-person-info small{line-height:1.3}
.role-person-toggle{width:40px;min-height:40px}
.role-person-toggle .glyph{width:18px;height:18px;transition:transform .15s}
.role-person.open .role-person-toggle .glyph{transform:rotate(180deg)}
.role-person-details{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;padding:10px 16px 14px 52px;background:var(--subtle);border-top:1px solid var(--line)}
.role-person-access{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0}
/* Access picker (View / Edit / Admin radio pills) and the person's access page */
.access-picker{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.pill-toggle:has(input:disabled){cursor:default}
.pill-toggle:has(input:disabled:not(:checked)) .role-pill{opacity:.45}
.access-group{display:grid;justify-items:start;gap:8px}
.access-group+.access-group{margin-top:20px}
.access-label{font-size:14px;font-weight:700;color:var(--ink)}
.access-description{margin:0}
#person-editor .permission-summary{margin:20px 0 0}
#person-editor .permission-advanced{margin-top:16px}
#person-editor .role-delete{display:flex;flex-wrap:wrap;gap:12px}
.pill-toggles{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.pill-toggles-label{font-size:13px;font-weight:600;color:var(--muted);margin-right:2px}
.pill-toggle{position:relative;display:inline-flex;margin:0;cursor:pointer}
.pill-toggle input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.pill-toggle .role-pill{min-height:28px;padding:0 12px;font-size:13px}
.pill-toggle:has(input:not(:checked)) .role-pill{background:var(--surface);color:var(--muted);border-style:dashed;border-color:var(--control)}
.pill-toggle:hover .role-pill{filter:brightness(.97)}
.pill-toggle:has(input:focus-visible) .role-pill{outline:3px solid var(--focus);outline-offset:2px}
.role-person-link{font-size:13px;font-weight:600}
@media(prefers-reduced-motion:reduce){.role-person-toggle .glyph{transition:none}}
@media(max-width:720px){.role-people-columns{display:none}.role-person-row{grid-template-columns:24px minmax(0,1fr) 44px;gap:6px 12px;padding:10px 8px 10px 12px}.role-person-row .role-pills{grid-column:2;grid-row:2}.role-person-toggle{width:44px;min-height:44px}.role-person-details{padding:10px 12px 14px 12px}.colour-field input[type=color]{min-height:44px;height:44px}}
/* Settings → People: rows follow the list's own width, so a side menu never squeezes the names.
   Lists under 740 px: name and email, then pills, status and dates on a second line. Narrow lists: stacked. */
.people-card .list{container:people-list/inline-size}
@container people-list (max-width:740px){
  .people-card .list-head{display:none}
  .people-card .person.people-columns{grid-template-columns:auto auto minmax(0,1fr) auto;gap:6px 16px;padding:10px 16px}
  .people-card .person-info{grid-column:1/4;grid-row:1}
  .people-card .person-role{grid-column:1;grid-row:2}
  .people-card .member-state{grid-column:2;grid-row:2;white-space:nowrap}
  .people-card .person-created{grid-column:3;grid-row:2}
  .people-card .person-created .meta-label{display:inline;margin-right:5px}
  .people-card .person .row-actions{grid-column:4;grid-row:1/3}
}
@container people-list (max-width:560px){
  .people-card .person.people-columns{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px}
  .people-card :is(.person-info,.person-role,.member-state,.person-created){grid-column:1;grid-row:auto}
  .people-card .person .row-actions{grid-column:2;grid-row:1/5}
}

/* Shared page header: one spacing rhythm for Documents, folders and settings.
   Control, type and list-row sizes remain independent of the surrounding gaps. */
:root{--page-header-gap:24px;--page-control-gap:8px}
main:has(>section>.page-header){padding-top:32px}
.page-header{display:grid;gap:var(--page-header-gap);margin-bottom:var(--page-header-gap)}
.page-header>.workspace-heading,.page-header>.workspace-toolbar{margin-bottom:0}
.page-header .workspace-heading{gap:var(--page-header-gap)}
.page-header .workspace-status{line-height:1.5;color:var(--muted)}
.page-header .workspace-status>.access-status{color:var(--ink)}
.page-header .workspace-toolbar{gap:var(--page-header-gap);min-width:0;flex-wrap:wrap}
.page-header .document-actions{gap:var(--page-control-gap);min-width:0;flex-wrap:wrap}
#workspace-access>.workspace-description{flex-basis:100%}
#workspace-access>.access-status{margin:0}
#workspace>.page-header .workspace-find{gap:var(--page-control-gap)}
@media(min-width:1051px){
  .page-header{grid-template-columns:minmax(240px,1fr) minmax(0,644px);column-gap:32px;row-gap:16px;align-items:start}
  .page-header>.workspace-heading{display:contents}
  .page-header .workspace-title{grid-column:1;grid-row:1 / span 2;align-self:center}
  #workspace>.page-header .workspace-find{grid-column:2;grid-row:1}
  .page-header>.page-toolbar{grid-column:2;grid-row:1;align-self:start;gap:8px}
  #workspace>.page-header>.workspace-toolbar{grid-column:2;grid-row:2;gap:8px}
}
@media(max-width:1050px){
  #workspace>.page-header>.workspace-heading{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;gap:var(--page-header-gap)}
  #workspace>.page-header .workspace-find{width:100%;max-width:none}
  .page-header .workspace-toolbar>.document-actions{flex-shrink:1}
}
@media(max-width:720px){
  main:has(>section>.page-header){padding-top:24px}
  .page-header .workspace-toolbar{gap:16px}
  #workspace>.page-header .workspace-find{row-gap:12px}
  #workspace>.page-header .document-actions{row-gap:12px}
}

.page-header .search-form{margin:0}

/* Back always starts the first control row; it never relocates on a breakpoint. */
#workspace>.page-header .workspace-find{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
#workspace>.page-header .search-form{min-width:0}
#workspace>.page-header .find-actions{display:flex}
.page-header .folder-back{min-width:86px}
.page-header .folder-back:disabled{cursor:default;opacity:.5}
@media(max-width:720px){
  #workspace>.page-header .workspace-find{grid-template-columns:auto minmax(0,1fr);row-gap:12px}
  #workspace>.page-header #folder-back{grid-column:1;grid-row:1;justify-self:start}
  #workspace>.page-header .find-actions{grid-column:2;grid-row:1;justify-self:end}
  #workspace>.page-header .search-form{grid-column:1 / -1;grid-row:2}
  #workspace>.page-header .find-actions>#refresh{width:auto;min-width:86px;padding:0 18px}
  #workspace>.page-header .find-actions>#refresh>span{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
  #workspace>.page-header .find-actions>#refresh>.glyph{display:none}
}
/* Home favourites: personal shortcuts; the complete directory stays in the footer. */
#home-title::after{content:'';display:block;width:48px;height:4px;margin-top:14px;border-radius:4px;background:var(--juice)}
#home .page-toolbar{justify-content:flex-end}
#home .page-toolbar>#home-location{flex:0 1 auto;min-width:0}
#home .page-toolbar>.document-actions{margin-left:0}
#home #home-location .view-value{max-width:28ch}
#home .home-layout{display:grid;gap:20px}
#home .home-apps-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding-top:0;padding-bottom:0}
#home .home-recent-head{align-items:center;min-height:48px;padding-top:0;padding-bottom:0}
#home :is(#home-apps-title,#home-recent-title){font-size:15px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink)}

#home .home-favourite-actions{display:flex;align-items:center;gap:12px;flex:none}
#home #home-edit-favourites{gap:6px}
#home #home-edit-favourites .glyph{width:14px;height:14px}
#home #home-apps{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));align-items:start;gap:12px;padding:24px 16px 16px}
#home #home-apps>.empty{grid-column:1/-1;padding:16px 8px 24px}
#home .favourite-empty{display:grid;justify-items:center;gap:16px;text-align:center}
#home .favourite-tile{position:relative;min-width:0;max-width:160px}
#home .favourite-open{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;padding:8px 4px 12px;border-radius:14px;text-decoration:none;color:var(--ink);text-align:center}
#home .favourite-open:hover{background:var(--hover)}
#home .favourite-open:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
#home .favourite-icon{display:grid;place-items:center;width:64px;height:64px;border:1px solid rgb(0 0 0/.07);border-radius:17px;background:var(--subtle);color:var(--ink);box-shadow:0 2px 4px rgb(34 31 32/.06)}
#home .favourite-icon .glyph{width:29px;height:29px;stroke-width:1.7}
#home .favourite-icon.tone-green{background:var(--mint);color:#1d5a2e}
#home .favourite-icon.tone-blue{background:#e3ecff;color:#1e3f8a}
#home .favourite-icon.tone-amber{background:var(--citrus);color:#7a4a08}
#home .favourite-icon.tone-purple{background:#ede8fb;color:#4c2a8c}
#home .favourite-icon.tone-teal{background:var(--sky);color:#0f5e5a}
#home .favourite-icon.tone-slate{background:#eceeef;color:#35434b}
#home .favourite-icon.tone-rose{background:var(--blush);color:#8c2f2b}
#home .favourite-name{font-size:13px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
#home .favourite-context{max-width:100%;font-size:11px;color:var(--muted);line-height:1.4;overflow-wrap:anywhere}
/* Stars are separate controls, never nested in links. Selected, keyboard and touch states are visible. */
:is(#home,#site-directory) .favourite-star{display:grid;place-items:center;width:32px;height:32px;min-height:32px;min-width:32px;padding:0;border:1px solid var(--edge);border-radius:50%;background:var(--surface);color:var(--muted);opacity:0;cursor:pointer}
:is(#home,#site-directory) .favourite-star .glyph{width:17px;height:17px}
:is(#home,#site-directory) .favourite-star[aria-pressed=true]{opacity:1;color:#90610d}
:is(#home,#site-directory) .favourite-star[aria-pressed=true] .glyph{fill:#ffd77b}
:is(#home,#site-directory) .favourite-star:is(:focus-visible,[aria-busy=true]),#home .favourite-tile:is(:hover,:focus-within) .favourite-star,#site-directory .favourite-directory-row:is(:hover,:focus-within) .favourite-star{opacity:1}
:is(#home,#site-directory) .favourite-star:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
:is(#home,#site-directory) .favourite-star:disabled{cursor:wait}
#home .favourite-tile>.favourite-star{position:absolute;right:0;top:0}
#site-directory .favourite-directory-row{position:relative}
#site-directory .favourite-directory-row>a{padding-right:39px;min-height:40px}
#site-directory .favourite-directory-row>.favourite-star{position:absolute;right:3px;top:4px;background:#343232;border-color:rgb(255 255 255/.15);color:rgb(255 255 255/.8)}
#site-directory .favourite-star[aria-pressed=true]{color:#ffd77b}
#site-directory .favourite-star:focus-visible{outline-color:var(--jungle)}
:is(#home,.site-footer) .favourites-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 16px;font-size:13px}
:is(#home,.site-footer) .favourites-status>span{flex-basis:100%}
.site-footer .favourites-status{margin-top:16px;border:1px solid rgb(255 255 255/.2);border-radius:12px;color:#fff}
.site-footer .favourites-status .secondary{background:transparent;color:#fff;border-color:rgb(255 255 255/.35)}
@media(hover:none),(pointer:coarse){
  :is(#home,#site-directory) .favourite-star{opacity:1;width:44px;height:44px;min-width:44px;min-height:44px}
  #site-directory .favourite-directory-row>a{padding-right:51px;min-height:52px}
}
@media(max-width:720px){
  #home .home-layout{gap:16px}
  #home .page-toolbar{flex-wrap:nowrap}
  #home .page-toolbar>#home-location{flex:1 1 auto}
  #home #home-location .view-select{width:100%;min-width:0}
  #home #home-location .view-value{max-width:none;margin-left:2px}
  #home #home-location .view-select>.glyph{margin-left:auto}
  #home .page-toolbar>.document-actions{flex:none;width:auto}
  #home .home-apps-head,#home .home-recent-head{display:flex;min-height:44px}
  #home .home-recent-head>span:not(:first-child){display:none}
  #home #home-apps{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:12px 8px;padding:16px 12px}
}
@media(max-width:359px){
  #home #home-location .view-select>span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  #home #refresh-home{padding:0 14px}
}
