/* Shared polish and accessible, task-oriented workspace layouts. */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, textarea, select { max-width: 100%; }
.skip-link { position: fixed; top: .75rem; left: 1rem; z-index: 200; padding: .8rem 1.2rem; border-radius: 8px; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body:not(.page-cloud) { --radius: 14px; }
body:not(.page-cloud) h1 { letter-spacing: -.035em; line-height: 1.14; text-wrap: balance; }
body:not(.page-cloud) h2 { letter-spacing: -.02em; text-wrap: balance; }
body:not(.page-cloud) .page-intro { padding-top: clamp(1rem, 3vw, 2.5rem); }
body:not(.page-cloud) .page-intro > p { max-width: 65ch; line-height: 1.75; }
body:not(.page-cloud) :is(.tile, .page-card, .notice-card) { border-radius: var(--radius); }
body:not(.page-cloud) .tile-title { line-height: 1.25; }
body:not(.page-cloud) :is(.tile-excerpt, .prose p) { line-height: 1.75; }
body:not(.page-cloud) .tile-excerpt--fade { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; max-height: none; padding-bottom: 0; }
body:not(.page-cloud) .tile-excerpt--fade::after { display: none; }
body:not(.page-cloud) :is(.button, .button--secondary) { min-height: 44px; border-radius: 9px; }
.header-quick-links { display: none; }
@media (max-width: 1049px) {
    .header-inner { grid-template-columns: auto minmax(0, 1fr); gap: .75rem; }
    .header-inner .brand { justify-self: end; min-width: 0; }
    .header-inner .brand-copy strong { font-size: clamp(.82rem, 3vw, 1rem); }
}
@media (min-width: 1050px) {
    .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
    .header-quick-links { display: flex; gap: 1.2rem; align-items: center; }
    .header-quick-links a { text-decoration: none; color: var(--text-secondary); font-size: .9rem; padding: .65rem 0; }
    .header-quick-links a:hover, .header-quick-links [aria-current] { color: var(--accent); }
}
body.page-cloud { --shadow: 0 4px 18px rgb(15 23 42 / .04); --cloud-header-offset: 76px; }
.cloud-app-header { box-shadow: none; min-height: 76px; padding: .85rem 1.4rem; }
.cloud-app-header__account-name { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-app-sidebar { gap: 1.1rem; align-content: start; }
.cloud-app-sidebar__profile { padding: .8rem; box-shadow: none; gap: .4rem; }
.cloud-app-sidebar__secondary { font-size: .83rem; }
.cloud-app-sidebar__nav { gap: .5rem; }
.cloud-app-nav-link { padding: .6rem .7rem; }
.cloud-app-nav-link { min-height: 42px; }
.cloud-app-nav-link.is-active { border-left: 3px solid var(--accent); font-weight: 700; }
.cloud-app-page { gap: 1.4rem; }
body.page-cloud :is(.cms-hero, .drive-hero, .tasks-hero, .calendar-hero, .cloud-dashboard-welcome) { box-shadow: none; border-radius: 12px; }
body.page-cloud :is(.drive-hero__copy, .tasks-hero__copy, .calendar-hero__copy) h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.035em; line-height: 1.15; }
body.page-cloud :is(.cms-modal, .drive-modal, .tasks-modal, .calendar-modal) { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); overscroll-behavior: contain; }
body.page-cloud .form-message { border-radius: 10px; margin: 0; padding: 1rem 1.2rem; }
body.page-cloud .form-message--success { background: #eaf7ef; border-color: #a3d5b4; color: #166534; }
.workspace-filterbar { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; padding: 1rem; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); }
.workspace-filterbar label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 600; flex: 1 1 180px; }
.workspace-filterbar input, .workspace-filterbar select { width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface); color: var(--text-primary); }
.workspace-filterbar p { flex: 1 1 100%; margin: 0; color: var(--text-muted); font-size: .85rem; }
.workspace-filterbar button { min-height: 44px; }
.workspace-no-results { padding: 1.5rem; color: var(--text-secondary); background: var(--surface); border: 1px dashed var(--surface-border); border-radius: 10px; }
.drive-item__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.drive-item__actions .drive-icon-button { display: inline-flex; width: auto; height: auto; min-height: 36px; gap: .4rem; padding: .45rem .55rem; font-size: .78rem; }
.drive-item__actions .drive-action-icon { flex-shrink: 0; width: .95rem; height: .95rem; }
.drive-item__body strong { overflow-wrap: anywhere; }
.drive-breadcrumbs { flex-wrap: wrap; }
.drive-breadcrumbs a:last-child { font-weight: 700; color: var(--text-primary); }
.drive-dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.drive-upload-summary { margin: 0; color: var(--text-secondary); white-space: pre-line; }
.drive-permission-panel.is-muted { opacity: .55; }
.cms-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cms-page-heading h1 { font-size: clamp(1.8rem, 3vw, 2.25rem); margin: .4rem 0; letter-spacing: -.035em; }
.cms-page-heading p { margin: 0; color: var(--text-secondary); max-width: 65ch; }
.cms-page-heading > a { flex-shrink: 0; }
.cms-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cms-mobile-picker { display: none; }
.cms-content-nav { position: sticky; top: calc(var(--cloud-header-offset) + 1rem); padding: 1rem; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); max-height: calc(100dvh - var(--cloud-header-offset) - 2rem); overflow-y: auto; scrollbar-width: thin; }
.cms-content-nav .cms-search { margin-bottom: 1rem; }
.cms-content-nav .cms-sidebar__group { padding: 0; border: 0; background: none; }
.cms-content-nav .cms-sidebar__group-head { padding: .8rem 0; }
.cms-content-nav .cms-sidebar__group-head h3 { font-size: .78rem; color: var(--text-muted); }
.cms-content-nav .cms-source-list { gap: .2rem; padding: 0; }
.cms-content-nav .cms-source-link { display: block; padding: .6rem .7rem; border: 0; box-shadow: none; border-radius: 7px; }
.cms-content-nav .cms-source-link strong { font-size: .86rem; font-weight: 500; }
.cms-content-nav .cms-source-link small { font-size: .75rem; }
.cms-content-nav .cms-source-link.is-active { background: var(--accent-soft); color: var(--accent); }
.cms-content-nav .cms-source-link.is-active strong { font-weight: 700; }
.cms-editor-form { min-width: 0; gap: 1rem; }
.cms-command-bar { position: sticky; top: var(--cloud-header-offset); z-index: 12; display: flex; justify-content: space-between; flex-wrap: wrap; padding: .9rem 1rem; gap: .8rem; border-radius: 10px; background: var(--surface); box-shadow: 0 4px 12px rgb(0 0 0 / .04); }
.cms-command-bar__context { gap: .1rem; }
.cms-command-bar__context span { font-size: .75rem; }
.cms-command-bar__actions { gap: .5rem; }
.cms-command-bar__actions .cms-tool-button { font-size: .82rem; padding: .6rem .75rem; min-height: 42px; }
.cms-editor-tools { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.cms-expert-menu { max-width: 100%; }
.cms-expert-menu > summary { padding: .7rem; cursor: pointer; font-size: .85rem; color: var(--text-secondary); }
.cms-expert-menu > div { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface); }
.cms-expert-menu p, .cms-expert-menu small { flex-basis: 100%; margin: 0; overflow-wrap: anywhere; color: var(--text-secondary); font-size: .85rem; }
.cms-save-hint { margin: 0; font-size: .83rem; color: var(--text-muted); }
.cms-editor-stage { border-radius: 12px; padding: 1.1rem; min-width: 0; }
.cms-editor-stage__head { display: none; }
.cms-editor-surface > .cms-block { border: 0; padding: 0; box-shadow: none; }
.cms-block__head { align-items: center; }
.cms-block__title h3 { font-size: 1.1rem; }
.cms-block__title p { font-size: .85rem; color: var(--text-muted); }
.cms-block__actions { gap: .5rem; }
.cms-entry-search { width: 210px; min-width: 120px; }
.cms-field-grid { gap: 1.1rem; }
.cms-field { min-width: 0; gap: .4rem; align-content: start; }
.cms-field__label { font-size: .87rem; font-weight: 650; }
.cms-field-hint { font-size: .78rem; line-height: 1.5; color: var(--text-muted); }
.cms-textarea { min-height: 125px; line-height: 1.65; resize: vertical; }
.cms-input, .cms-select { min-height: 44px; }
.cms-repeater-item { border-radius: 10px; box-shadow: none; }
.cms-repeater-item__summary { padding: .9rem; gap: .6rem; }
.cms-repeater-item__summary-main { flex: 1 1 180px; min-width: 0; }
.cms-repeater-item__summary-main { flex-wrap: nowrap; }
.cms-entry-edit-hint { font-size: .8rem; color: var(--accent); margin-left: auto; white-space: nowrap; }
.cms-repeater-item__body > .cms-repeater-item__actions { padding-top: 1rem; border-top: 1px solid var(--surface-border); }
.cms-repeater-item__copy { gap: .2rem; overflow-wrap: anywhere; }
.cms-repeater-item__copy small { font-size: .75rem; }
.cms-repeater-item__actions { gap: .3rem; }
.cms-repeater-item__actions .cms-mini-button { padding: .4rem .55rem; font-size: .75rem; min-height: 34px; }
.cms-repeater-item__body { padding: 1.1rem; border-top: 1px solid var(--surface-border); }
.cms-advanced-fields { border-top: 1px solid var(--surface-border); padding-top: .5rem; }
.cms-advanced-fields > summary { padding: .6rem 0; font-size: .85rem; color: var(--text-secondary); cursor: pointer; }
.cms-advanced-fields[open] > .cms-field-grid { margin: .6rem 0 1rem; }
.cms-object-add { padding: .75rem 0; }
.cms-image-preview { max-height: 220px; }
.cms-image-preview img { object-fit: contain; max-height: 200px; }
.cloud-dashboard-agenda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cloud-dashboard-agenda > section { padding: 1.2rem; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); }
.cloud-dashboard-agenda h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.cloud-dashboard-agenda p { color: var(--text-muted); font-size: .85rem; }
.cloud-dashboard-agenda ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.cloud-dashboard-agenda li a { display: grid; gap: .25rem; padding: .7rem 0; text-decoration: none; border-bottom: 1px solid var(--surface-border); }
.cloud-dashboard-agenda li a:hover strong { color: var(--accent); }
.cloud-dashboard-agenda li small { color: var(--text-muted); }
.cloud-dashboard-agenda > section > a { display: inline-block; margin-top: .75rem; font-size: .85rem; color: var(--accent); }
#cloud-cms-status[data-state="dirty"] { background: #fff4d6; border-color: #e8cc7b; color: #78500b; }
@media (min-width: 1200px) {
    body.page-cloud.cloud-layout-app { --cloud-sidebar-width: 236px; }
    .cloud-layout-app .cloud-app-sidebar { top: var(--cloud-header-offset); width: var(--cloud-sidebar-width); height: calc(100dvh - var(--cloud-header-offset)); transform: none; border-right: 1px solid var(--surface-border); box-shadow: none; padding: 1.1rem; z-index: 20; }
    .cloud-layout-app .cloud-app-shell { margin-left: var(--cloud-sidebar-width); }
    .cloud-layout-app :is(.cloud-nav-toggle, .cloud-nav-overlay, .cloud-app-sidebar__header) { display: none; }
    body.page-cloud.cloud-nav-open { overflow: auto; }
}
@media (max-width: 1450px) and (min-width: 1200px) {
    .cms-layout { grid-template-columns: 190px minmax(0, 1fr); }
    .cms-command-bar__actions { width: 100%; }
}
@media (max-width: 900px) {
    .cms-layout { grid-template-columns: 1fr; }
    .cms-content-nav { position: static; max-height: 260px; }
    .cms-ready .cms-content-nav > :not(.cms-mobile-picker) { display: none !important; }
    .cms-ready .cms-mobile-picker { display: grid; gap: .5rem; font-size: .85rem; font-weight: 600; }
    .cms-page-heading { align-items: start; flex-direction: column; }
    .cloud-app-header { grid-template-columns: minmax(0, 1fr) auto; padding: .75rem 1rem; gap: .5rem; }
    .cloud-app-header__lead { flex-wrap: nowrap; gap: .65rem; }
    .cloud-app-header__action-strip { gap: .4rem; }
    .cloud-app-header__account-name { max-width: 110px; font-size: .8rem; }
    .cloud-app-live-clock { display: none; }
    .cloud-app-brand__copy strong { font-size: .85rem; }
    .cloud-app-brand__copy small { font-size: .72rem; }
    .cloud-nav-toggle { padding: .65rem; }
    .cloud-nav-toggle > span:last-child { display: none; }
}
@media (max-width: 600px) {
    .cloud-dashboard-agenda { grid-template-columns: 1fr; }
    .cms-command-bar { padding: .75rem; }
    .cms-command-bar__actions { width: 100%; }
    #cloud-cms-save { flex: 1 1 100%; }
    .cms-command-bar__context { display: none; }
    .cms-field-grid { grid-template-columns: 1fr; }
    .cms-editor-stage { padding: .8rem; }
    .cms-repeater-item__body { padding: .8rem; }
    .cms-entry-search { width: 100%; }
    .cms-block__actions { width: 100%; }
    .cms-content-nav { max-height: 220px; }
    .drive-item-grid { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
    body.page-cloud .form-message--success { background: #163c2b; border-color: #306d49; color: #a7f3c1; }
    #cloud-cms-status[data-state="dirty"] { background: #483715; border-color: #81642d; color: #ffe2a0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Phone-first board: a quiet sign-in, flat navigation and a chronological feed. */
body.page-cloud.cloud-layout-auth {
    --surface: #fff; --surface-muted: #fff; --surface-soft: #f5f6f8;
    --surface-border: #dedfe3; --text-primary: #20242b; --text-secondary: #505660;
    --text-muted: #626975; --accent: #334155; --accent-strong: #1e293b;
    color-scheme: light; background: #f6f6f6; color: #20242b;
}
.cloud-layout-auth .cloud-auth-header { display: none; }
.cloud-layout-auth .cloud-auth-main { min-height: 100dvh; padding: 1.25rem; }
.cloud-layout-auth .cloud-auth-wrap { width: min(390px, 100%); }
.simple-login { padding: 2rem 1.5rem; border: 1px solid #e5e7eb; border-radius: 12px; background: white; box-shadow: 0 8px 32px #00000006; }
.simple-login__logo { width: 150px; height: 90px; object-fit: contain; margin: 0 auto 2rem; }
.simple-login .auth-form { gap: 1.2rem; }
.simple-login input { min-height: 48px; background: #fff; color: #20242b; font-size: 16px; }
.simple-login .button { width: 100%; background: #303943; color: #fff; }
.cloud-app-sidebar__nav { gap: .25rem; }
.cloud-app-sidebar .cloud-app-nav-group { padding: 0; border: 0; }
.cloud-app-sidebar .cloud-app-nav-group__items { padding: 0; gap: .25rem; }
.cloud-app-sidebar .cloud-app-nav-link { font-size: .95rem; min-height: 46px; display: flex; align-items: center; border-radius: 7px; }
.cloud-dashboard-welcome { min-height: auto; padding: 0; background: none; border: 0; grid-template-columns: 1fr; }
.cloud-dashboard-welcome__copy { gap: .5rem; }
.cloud-dashboard-welcome__meta { display: none; }
.cloud-dashboard-welcome h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.activity-feed { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 10px; padding: 1rem; }
.activity-feed h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.activity-empty { color: var(--text-secondary); margin: 0; line-height: 1.6; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li + li { border-top: 1px solid var(--surface-border); }
.activity-list a { display: grid; gap: .4rem; padding: 1rem 0; text-decoration: none; }
.activity-list strong { font-size: 1rem; overflow-wrap: anywhere; }
.activity-list a:hover strong { color: var(--accent); }
.activity-list span, .activity-list time { font-size: .82rem; color: var(--text-secondary); }
.activity-list .activity-type { color: var(--accent); font-weight: 650; }
.activity-list time { color: var(--text-muted); }
.dashboard-more { border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface); padding: 1rem; }
.dashboard-more > summary { cursor: pointer; font-weight: 600; }
.dashboard-more[open] > summary { margin-bottom: 1rem; }
.dashboard-more .cloud-dashboard-section__head { display: none; }
@media (min-width: 1000px) {
    body.page-cloud.cloud-layout-app { --cloud-sidebar-width: 232px; }
    .cloud-layout-app .cloud-app-sidebar { top: var(--cloud-header-offset); width: var(--cloud-sidebar-width); height: calc(100dvh - var(--cloud-header-offset)); transform: none; border-right: 1px solid var(--surface-border); box-shadow: none; padding: 1rem; z-index: 20; }
    .cloud-layout-app .cloud-app-shell { margin-left: var(--cloud-sidebar-width); }
    .cloud-layout-app :is(.cloud-nav-toggle, .cloud-nav-overlay, .cloud-app-sidebar__header) { display: none; }
}
body.page-cloud:has(.cms-guided) { --surface: #fff; --surface-muted: #fff; --surface-soft: #f5f6f8; --surface-border: #e0e3e7; --text-primary: #20242b; --text-secondary: #505660; --text-muted: #626975; --accent: #344a65; --accent-strong: #24374f; --accent-soft: #eef2f7; color-scheme: light; background: #f8f9fa; }
.cms-guided { max-width: 820px; width: 100%; margin: auto; }
.cms-guided .cms-layout { display: block; }
.cms-guided .cms-content-nav { position: static; max-height: none; }
.cms-guided:not(.cms-choosing) .cms-content-nav { display: none; }
.cms-guided.cms-choosing :is(.cms-editor-form, .cms-area-back, .cms-page-heading > a) { display: none; }
.cms-ready .cms-guided.cms-choosing .cms-content-nav > .cms-search { display: grid !important; }
.cms-ready .cms-guided.cms-choosing .cms-content-nav > .cms-catalog-groups { display: grid !important; }
.cms-ready .cms-guided.cms-choosing .cms-content-nav > .cms-mobile-picker { display: none; }
.cms-ready .cms-guided.cms-choosing .cms-content-nav > #cms-catalog-empty:not([hidden]) { display: block !important; }
.cms-guided.cms-choosing .cms-source-link { border-bottom: 1px solid var(--surface-border); border-radius: 0; padding: 1rem .4rem; background: white; }
.cms-guided.cms-choosing .cms-source-link__copy { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.cms-guided .cms-page-heading h1 { font-size: 1.6rem; }
.cms-guided .cms-page-heading .eyebrow, .cms-guided .cms-save-hint { display: none; }
.cms-guided .cms-area-back { justify-self: start; font-size: .85rem; }
.cms-guided .cms-command-bar { box-shadow: none; }
.cms-guided :is(.cms-block, .cms-repeater-item, .cms-editor-stage) { box-shadow: none; background: #fff; }
.cms-guided .cms-field-grid { grid-template-columns: 1fr; gap: 1.1rem; }
.cms-guided .cms-repeater-item__body { gap: 1rem; }
.cms-guided .cms-nested-stack { gap: .85rem; }
.cms-guided .cms-input, .cms-guided .cms-textarea, .cms-guided .cms-select { background: #fff; color: #20242b; font-size: 16px; }
.cms-guided .cms-mini-button { min-height: 42px; }
.cms-guided .cms-block__actions { flex-wrap: wrap; }
.cms-record-open > .cms-array > .cms-repeater > details:not([open]) { display: none; }
.cms-record-open > .cms-array > .cms-block__head { display: none; }
.cms-record-open > .cms-array > .cms-repeater > details > summary .cms-entry-edit-hint { display: none; }
#cms-record-back { justify-self: start; }
@media (max-width: 600px) {
    .cms-guided .cms-command-bar__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cms-guided #cloud-cms-status { grid-column: 1 / -1; justify-self: start; }
    .cms-guided #cloud-cms-save { grid-column: 1 / -1; }
    .cms-guided .cms-page-heading > a { align-self: start; }
}

/* Explicit user themes take precedence over the operating-system preference. */
html[data-cloud-theme="light"], html[data-site-theme="light"] { color-scheme: light; }
html[data-cloud-theme="dark"], html[data-site-theme="dark"] { color-scheme: dark; }
html[data-cloud-theme="light"] body.page-cloud {
 --surface:#fff; --surface-muted:#f8fafc; --surface-soft:#f1f4f8; --surface-border:#dce2ea;
 --text-primary:#18212e; --text-secondary:#495569; --text-muted:#647084;
 --accent:#315b91; --accent-strong:#254974; --accent-soft:#eaf0f8;
 color-scheme:light; color:var(--text-primary); background:#f6f8fa;
}
html[data-cloud-theme="dark"] body.page-cloud {
 --surface:#202630; --surface-muted:#1a2029; --surface-soft:#2c3441; --surface-border:#3c4656;
 --text-primary:#f0f3f8; --text-secondary:#c4cdda; --text-muted:#a4afbf;
 --accent:#9abcf2; --accent-strong:#547fb9; --accent-soft:#2d3d54;
 color-scheme:dark; color:var(--text-primary); background:#151a22;
}
html[data-cloud-theme] body.page-cloud :is(.calendar-hero,.tasks-hero,.drive-hero,.cms-hero,.classic-card,.simple-login,.cloud-dashboard-welcome) { background:var(--surface); color:var(--text-primary); }
html[data-cloud-theme] body.page-cloud :is(input,textarea,select) { color:var(--text-primary); background:var(--surface); border-color:var(--surface-border); }
html[data-cloud-theme] body.page-cloud .cms-guided :is(.cms-block,.cms-repeater-item,.cms-editor-stage,.cms-source-link) { background:var(--surface); color:var(--text-primary); }
html[data-cloud-theme="light"] body.page-cloud .form-message--success { background:#eaf7ef; color:#166534; }
html[data-cloud-theme="dark"] body.page-cloud .form-message--success { background:#163c2b; color:#a7f3c1; }
html[data-cloud-theme] .cloud-app-sidebar { background:var(--surface); }
html[data-cloud-theme] .cms-guided .cms-content-nav { background:var(--surface); }
.workspace-theme-control { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.6rem .2rem 1rem; font-size:.85rem; color:var(--text-secondary); border-bottom:1px solid var(--surface-border); }
.theme-switch__track { pointer-events:none; }
body.page-cloud :is(.calendar-hero,.tasks-hero,.drive-hero) { display:block; min-height:0; padding:0; border:0; background:none !important; }
body.page-cloud :is(.calendar-hero__copy,.tasks-hero__copy,.drive-hero__copy) { gap:.7rem; }
body.page-cloud :is(.calendar-hero__copy,.tasks-hero__copy,.drive-hero__copy) > :is(.eyebrow,p) { display:none; }
.planner-counts { display:flex; flex-wrap:wrap; gap:.65rem 1.5rem; font-size:.85rem; color:var(--text-secondary); }
.planner-counts strong { color:var(--text-primary); margin-left:.25rem; }
.planner { display:grid; gap:1rem; min-width:0; }
.planner-views { display:flex; flex-wrap:wrap; gap:.3rem; padding:.3rem; border:1px solid var(--surface-border); border-radius:9px; background:var(--surface); justify-self:start; }
.planner-views button, .planner-month-toolbar button { min-height:42px; border:0; border-radius:6px; padding:.55rem .9rem; background:transparent; color:var(--text-secondary); cursor:pointer; }
.planner-views [aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); font-weight:650; }
.planner-month { min-width:0; border:1px solid var(--surface-border); border-radius:10px; background:var(--surface); overflow:hidden; }
.planner-month-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; padding:.7rem; }
.planner-month-toolbar h2 { font-size:1rem; margin:0 auto 0 0; text-transform:capitalize; }
.planner-month-toolbar label { display:flex; align-items:center; gap:.5rem; font-size:.8rem; margin-left:auto; }
.planner-month-toolbar input { border:1px solid var(--surface-border); border-radius:5px; padding:.4rem; min-width:0; max-width:170px; }
.planner-weekdays,.planner-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.planner-weekdays span { padding:.65rem .2rem; text-align:center; font-size:.8rem; color:var(--text-muted); }
.planner-day { min-width:0; min-height:110px; border-top:1px solid var(--surface-border); border-right:1px solid var(--surface-border); padding:.3rem; }
.planner-day:nth-child(7n) { border-right:0; }
.planner-day.is-outside { background:var(--surface-muted); }
.planner-day.is-outside .planner-day-number { color:var(--text-muted); }
.planner-day-number { display:block; min-width:32px; min-height:32px; padding:.25rem; border:0; border-radius:50%; background:transparent; color:var(--text-primary); cursor:pointer; font-size:.8rem; }
.is-today .planner-day-number { background:var(--accent-soft); color:var(--accent); font-weight:bold; }
.planner-day-number[aria-pressed="true"] { outline:2px solid var(--accent); }
.planner-entry { display:block; width:100%; min-width:0; text-align:left; padding:.65rem .7rem; border:1px solid var(--surface-border); border-radius:5px; margin:.25rem 0; background:var(--surface-soft); color:var(--text-primary); font:inherit; font-size:.85rem; cursor:pointer; overflow-wrap:anywhere; }
.planner-entry--mine { border-left:3px solid var(--accent); }
.planner-entry--compact { font-size:.72rem; padding:.35rem .25rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planner-day-agenda:not(:empty),.planner-undated:not(:empty) { padding:1rem; border-top:1px solid var(--surface-border); }
.planner-day-agenda h3,.planner-undated h3 { font-size:.95rem; margin:0 0 .75rem; }
.planner-day-agenda p { font-size:.85rem; color:var(--text-secondary); }
.planner-export { margin:0 1rem 1rem; justify-self:start; font-size:.85rem; }
.planner-export-hint { margin:0 1rem 1rem; color:var(--text-muted); font-size:.8rem; }
.planner-list-mode .calendar-event-grid { grid-template-columns:1fr; }
.planner-list-mode .tasks-board { display:grid; grid-template-columns:1fr; gap:1rem; }
.planner-list-mode .tasks-column { min-height:0; }
.planner-list-mode .tasks-column__cards { display:grid; grid-template-columns:1fr; }
body.page-cloud .drive-toolbar { padding:.6rem; }
body.page-cloud .drive-toolbar__actions { justify-content:start; }
@media(max-width:600px) {
 .planner-day { min-height:76px; padding:.15rem; }
 .planner-day-number { min-width:28px; min-height:30px; }
 .planner-entry--compact { font-size:.65rem; }
 .planner-month-toolbar label { flex-basis:100%; margin-left:0; }
 .planner-month-toolbar button { padding:.45rem .7rem; }
}

.calendar-hero__actions,.tasks-hero__actions { display:flex; flex-wrap:wrap; align-items:start; gap:.5rem; }
.planner-bulk-export { border:1px solid var(--surface-border); border-radius:8px; background:var(--surface); }
.planner-bulk-export > summary { min-height:44px; padding:.7rem .85rem; font-size:.85rem; cursor:pointer; }
.planner-bulk-export > div { display:grid; gap:.4rem; padding:.6rem; }
.planner-help { padding:.7rem 1rem; margin:0; font-size:.8rem; color:var(--text-muted); border-top:1px solid var(--surface-border); }
html[data-cloud-theme] body.page-cloud :is(.calendar-modal__panel,.tasks-modal__panel,.drive-modal__panel,.cms-modal__panel) { background:var(--surface); color:var(--text-primary); }
html[data-cloud-theme] body.page-cloud :is(.cloud-app-nav-link,.cloud-nav-toggle,.cloud-nav-close,.button--secondary,.calendar-tool-button,.tasks-tool-button,.drive-toolbar-button,.cms-tool-button,.cms-mini-button) { color:var(--text-primary); background:var(--surface); border-color:var(--surface-border); }
html[data-cloud-theme] body.page-cloud .cloud-app-nav-link.is-active { background:var(--accent-soft); color:var(--accent); }
html[data-cloud-theme] body.page-cloud :is(.calendar-tool-button--primary,.tasks-tool-button--primary,.drive-toolbar-button--primary,.cms-tool-button--primary) { background:var(--accent-strong); color:#fff; }
@keyframes planner-dialog-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.calendar-modal[open],.tasks-modal[open] { animation:planner-dialog-enter 180ms ease-out; }

/* Module surfaces follow the selected theme, even on an OS with the opposite theme. */
html[data-cloud-theme] body.page-cloud :is(.workspace-card,.workspace-empty,.page-card,.classic-card,.classic-stat-card,.drive-item,.drive-section,.tasks-card,.tasks-column,.tasks-section,.calendar-event-card,.calendar-archive-item,.calendar-month,.calendar-section,.cloud-dashboard-app-card,.simple-card) { background:var(--surface); color:var(--text-primary); border-color:var(--surface-border); }
html[data-cloud-theme] body.page-cloud :is(.workspace-readonly,.workspace-textarea,.feedback-icon-button,.feedback-tool-button) { background:var(--surface); color:var(--text-primary); border-color:var(--surface-border); }
html[data-cloud-theme] body.page-cloud .feedback-tool-button--danger { color:#d24858; }
