/*
 Flourish shared UI foundation.
 Loaded after each app's own stylesheet. It unifies the suite's chrome
 (type, text colour, focus, selection, scrollbars, brand header, account
 avatar) while every app keeps its own accent colour and layout.
 Document content (Docs pages, Sheets/Slides canvases, published forms)
 keeps its own fonts: those areas set font-family explicitly.
*/
:root{
  --f-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --f-ink:#1f2328;
  --f-muted:#5c6370;
  --f-accent:#1a73e8;
  --f-ring:color-mix(in srgb,var(--f-accent) 55%,transparent);
  font-family:var(--f-font);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-synthesis:none;
  text-rendering:optimizeLegibility;
}
body,button,input,select,textarea{font-family:inherit}
/* Each app's accent drives selection and focus. */
html[data-app=mail],html[data-app=drive],html[data-app=docs]{--f-accent:#0b57d0}
html[data-app=sheets]{--f-accent:#188038}
html[data-app=slides]{--f-accent:#c26401}
html[data-app=calendar]{--f-accent:#285bd4}
html[data-app=tasks]{--f-accent:#7561da}
html[data-app=meet]{--f-accent:#16836e}
html[data-app=chat]{--f-accent:#1264a3}
html[data-app=forms]{--f-accent:#673ab7}
html[data-app=record]{--f-accent:#6250e8}
html[data-app=crm]{--f-accent:#be185d}
html[data-app=admin]{--f-accent:#2f7352}

::selection{background:color-mix(in srgb,var(--f-accent) 22%,white);color:inherit}
:focus-visible{outline:2px solid var(--f-ring);outline-offset:2px}
*{scrollbar-width:thin;scrollbar-color:#c3c8cf transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#c9ced5;border-radius:10px;border:3px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background-color:#aab0b8}
::-webkit-scrollbar-track{background:transparent}

/* Brand header: app icon + app name, the same size and weight in every app. */
.brand{color:var(--f-ink)!important;font-size:22px!important;font-weight:450!important;letter-spacing:-.015em!important;text-decoration:none}
.brand>img,.brand img:first-child{width:36px!important;height:36px!important;flex:none}
.brand strong,.brand .brand-name{font-weight:inherit}

/* Account avatar: one size, two initials, one stable colour per person. */
#account-button.avatar,#home-account.avatar,button#account.avatar,button#account.account,#me-avatar,[data-flourish-avatar]{
  inline-size:32px!important;block-size:32px!important;min-inline-size:32px!important;
  border-radius:50%!important;border:0!important;padding:0!important;
  display:inline-grid!important;place-items:center;flex:none;
  background:var(--f-person,#6b5ca5)!important;color:#fff!important;
  font:600 12.5px/1 var(--f-font)!important;letter-spacing:.03em;
  box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(31,35,40,.08);
  cursor:pointer;user-select:none;transition:box-shadow .15s
}
#account-button.avatar:hover,#home-account.avatar:hover,button#account.avatar:hover,button#account.account:hover{box-shadow:0 0 0 2px #fff,0 0 0 4px color-mix(in srgb,var(--f-person,#6b5ca5) 35%,transparent)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

/* Apps button: the same 3×3 grid everywhere. */
.suite-grid{inline-size:22px;block-size:22px;fill:currentColor;display:block;margin:auto}

/* Library search: the same rounded field with a magnifier in every app home. */
html:is([data-app=sheets],[data-app=slides]) #search,html[data-app=forms] #library-search,html[data-app=record] input#search,html[data-app=calendar] input#search{
  box-sizing:border-box;block-size:44px;border-radius:24px;border:1px solid transparent;
  background:#eaf0f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6370' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center/18px;
  padding:0 18px 0 46px;font-size:15px;color:var(--f-ink);transition:background-color .15s,box-shadow .15s
}
html[data-app=calendar] input#search{block-size:38px;font-size:14px;background-position:13px center;padding-left:40px}
html:is([data-app=sheets],[data-app=slides]) #search:focus,html[data-app=forms] #library-search:focus,html[data-app=record] input#search:focus,html[data-app=calendar] input#search:focus{
  background-color:#fff;border-color:#dfe3e8;box-shadow:0 1px 3px rgba(31,35,40,.14);outline:none
}

/* Tasks' sidebar wordmark follows the same brand header. */
html[data-app=tasks] .wordmark{color:var(--f-ink)!important;font-size:22px!important;font-weight:450!important;letter-spacing:-.015em!important}
html[data-app=tasks] .wordmark>img{width:36px!important;height:36px!important}
html[data-app=tasks] .wordmark .workspace-mark{font-size:12.5px;font-weight:400;letter-spacing:0;color:var(--f-muted)}

/* Phones: the app icon alone identifies the app, leaving room for search. */
@media (max-width:640px){
  .brand,html[data-app=tasks] .wordmark{font-size:0!important;gap:0!important;min-width:0!important;width:auto!important}
  .brand>img,.brand img:first-child,html[data-app=tasks] .wordmark>img{width:32px!important;height:32px!important}
  html[data-app=tasks] .wordmark .workspace-mark,.brand .brand-name,html[data-app=record] header #downloads{display:none!important}
}
