/* modern-normalize handles browser inconsistencies. The application owns its
   palette, semantic controls, and layouts; no framework tokens are required. */
:root {
  color-scheme: dark;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #0d1117;
  --text: #d1d9e0;
  --text-muted: #919ca8;
  --text-strong: #f0f6fc;
  --surface: #151b23;
  --surface-sheen: linear-gradient(135deg, #58a6ff05, transparent 60%);
  --surface-shadow: 0 16px 64px #01040933;
  --control-sheen: linear-gradient(180deg, #ffffff0b, transparent);
  --surface-inset: #0d111733;
  --surface-hover: #ffffff08;
  --row-hover: #ffffff0a;
  --surface-selected: #252d37;
  --card-gap: 20px;
  --card-padding: 24px;
  --control-height: 40px;
  --loading-delay: 250ms;
  --border: #30363d;
  --green: #7ee787;
}
html { box-sizing: border-box; scrollbar-gutter: stable; background-color: #212830; scrollbar-color: #59636e #212830; }
*, *::before, *::after { box-sizing: inherit; }
/* Anchor the ambient color to the viewport so long lists keep the same glow. */
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 8% 14%, #58a6ff0c, transparent 52%), radial-gradient(ellipse at 92% 86%, #3fb9500a, transparent 52%), var(--background); background-attachment: fixed; color: var(--text); }
[hidden] { display: none !important; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre, figure, article, form, fieldset { margin: 0; }
h1, h2, h3, h4, h5, h6 { color: var(--text-strong); font-weight: 600; }
h1 { font-size: 2rem; font-weight: 650; letter-spacing: -.045em; line-height: 1.2; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
ul, ol { padding-inline-start: 1.5rem; }
small { font-size: .875em; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
table { width: 100%; border-collapse: collapse; text-indent: 0; }
th, td { text-align: start; }
fieldset { min-inline-size: 0; padding: 0; border: 0; }
legend { padding: 0; }
label { display: block; }
button, input, select, textarea { margin: 0; font: inherit; letter-spacing: inherit; }
/* White labels remain readable at the lightest end of the green gradient. */
button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: auto; padding: .65rem .85rem; border: 1px solid #2e9b45; border-radius: .5rem; background: var(--control-sheen), #217d32; color: #fff; box-shadow: inset 0 1px 0 #ffffff10, 0 3px 12px #2386361a; font-size: .9rem; font-weight: 600; line-height: 1.5; text-align: center; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
:where(button:enabled):is(:hover, :focus-visible) { background-color: #258137; border-color: #3fb950; box-shadow: inset 0 1px 0 #ffffff14, 0 0 18px #3fb95026; }
button.secondary { background: var(--control-sheen), #212830; border-color: #3d444d; color: var(--text); box-shadow: inset 0 1px 0 #ffffff08, 0 3px 10px #01040926; }
button.secondary:is(:hover, :focus-visible) { background: var(--control-sheen), #2a313b; border-color: #59636e; box-shadow: inset 0 1px 0 #ffffff10, 0 0 16px #58a6ff18; }
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) { display: block; width: 100%; min-width: 0; padding: .65rem .85rem; border: 1px solid #3d444d; border-radius: .5rem; background-color: var(--background); color: #e6edf3; box-shadow: inset 0 1px 2px #01040933; transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: #7d8590; opacity: 1; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 2.35rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23919ca8' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; background-size: 16px; }
input[type="search"] { padding-left: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23919ca8' stroke-width='1.5'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: .85rem center; background-size: 18px; }
input:is([type="checkbox"], [type="radio"]) { width: 1.125rem; height: 1.125rem; flex-shrink: 0; accent-color: #3fb950; vertical-align: middle; cursor: pointer; }
:where(button, input, select, textarea):disabled { opacity: .5; cursor: not-allowed; }
input[readonly], textarea[readonly] { color: var(--text-muted); }
[aria-invalid="true"] { border-color: #f85149; }
button[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::before { content: ""; flex-shrink: 0; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; visibility: hidden; animation: reveal-loading 0s var(--loading-delay) forwards, spin .8s linear var(--loading-delay) infinite; }
details > summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: .75rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
a { color: #58a6ff; text-decoration: none; }
a:hover { color: #79c0ff; text-decoration: underline; }
.container { width: min(100%, 1320px); margin-inline: auto; padding: 24px; }
:focus-visible { outline: 2px solid #58a6ff; outline-offset: 3px; }
/* Overlap the field border so focus reads as one continuous edge. */
input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"], [type="reset"], [type="hidden"]):focus,
textarea:focus, select:focus { border-color: #58a6ff; outline: 2px solid #58a6ff; outline-offset: -1px; box-shadow: none; }
h1:focus, main:focus { outline: none; }
.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; filter: drop-shadow(0 0 4px color-mix(in srgb, currentColor 16%, transparent)); }
.muted, .field-help { color: var(--text-muted); }
.text-green { color: var(--green); }
.eyebrow, .nav-label { color: var(--text-muted); font-size: .72rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 10px 18px; background: var(--surface); z-index: 100; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
/* Account navigation stays in the header at every viewport width. */
.account-menu { position: relative; margin-left: auto; min-width: 0; max-width: 320px; }
button.account-trigger { gap: 10px; width: 100%; padding: 10px 16px; text-align: left; background: transparent; border: 1px solid #30363d99; border-radius: 9px; box-shadow: none; color: var(--text); }
button.account-trigger:is(:hover, :focus-visible), button.account-trigger[aria-expanded="true"] { background: var(--control-sheen), #212830; border-color: var(--border); box-shadow: 0 0 16px #58a6ff14; }
.account-avatar { position: relative; display: inline-flex; flex-shrink: 0; }
.account-avatar .avatar-notification-badge { position: absolute; top: -6px; left: -7px; min-width: 18px; padding: 0 4px; border: 2px solid #010409; font-size: .6rem; line-height: 1.4; text-align: center; }
.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 260px; max-width: calc(100vw - 40px); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; background: var(--surface-sheen), #010409; border: 1px solid #3d444d; border-radius: 10px; box-shadow: 0 12px 36px #0007; }
nav.account-nav { display: flex; flex-direction: column; gap: 3px; }
.account-nav a, button.account-logout { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; padding: 10px 12px; margin: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: #b7c1cc; font-size: .85rem; font-weight: 500; }
.account-nav a:is(:hover, :focus-visible) { background: var(--row-hover); text-decoration: none; }
.account-nav a[aria-current="page"] { color: #f0f6fc; background: var(--control-sheen), #1b242e; box-shadow: inset 3px 0 #3fb950, 0 0 12px #3fb9500c; }
.account-nav a[aria-current="page"] .icon { color: var(--green); }
.account-nav .unread-badge { margin-left: auto; }
.account-nav-divider { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--border); }
.account-menu-footer { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
button.account-logout { color: #ff938a; }
button.account-logout:is(:hover, :focus-visible) { background: var(--control-sheen), #f8514918; box-shadow: 0 0 14px #f8514918; }
.account-menu-footer .alert { margin: 6px; }
.user-details { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .76rem; }
.user-details .account-name, .user-details .account-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details .account-name { color: #f0f6fc; }
.user-details .account-email { color: var(--text-muted); font-weight: 400; }
.account-identity { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.account-identity .identity-name { font-size: .9rem; font-weight: 550; color: #e6edf3; }
.entity-identifier { margin: 4px 0 0; color: var(--text-muted); font-size: .8rem; font-weight: 400; }
.identity-email { font-size: .77rem; color: var(--text-muted); }
.role-label { font-size: .72rem; text-transform: capitalize; color: var(--text-muted); }
.avatar { display: inline-flex; flex-shrink: 0; width: 36px; height: 36px; padding: 2px; overflow: hidden; border-radius: 50%; background: #222b38; border: 1px solid #3d444d; }
.avatar svg { width: 100%; height: 100%; border-radius: inherit; }
.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 56px; height: 56px; padding: 4px; }
.icon-button, .password-toggle { background: transparent; border: 1px solid transparent; padding: 7px; color: var(--text-muted); box-shadow: none; }
.icon-button:is(:hover, :focus-visible), .password-toggle:is(:hover, :focus-visible) { background: var(--control-sheen), #ffffff0a; border-color: var(--border); color: #f0f6fc; box-shadow: 0 0 14px #58a6ff18; }
.workspace { display: flex; flex-direction: column; min-height: 100vh; }
.unread-badge { display: inline-block; border-radius: 12px; padding: 1px 7px; background: #238636; color: white; font-size: .72rem; font-weight: 600; }
.unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: #58a6ff; border-radius: 50%; }
.card-footer-links, .linked-view { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.card-footer-links { justify-content: flex-start; }
.linked-view { padding: 18px 24px; margin-bottom: 20px; }
/* Discussion surfaces share controls and the workspace palette. */
.discussion-list, .notification-list { list-style: none; margin: 0; padding: 0; }
.discussion-list > li, .notification-list > li { margin: 0; }
.plain-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.communication-symbol, .notification-symbol { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border: 1px solid #58a6ff33; border-radius: 12px; background: var(--control-sheen), #58a6ff12; color: #79c0ff; box-shadow: 0 0 16px #58a6ff0c; }
.discussion-timeline { position: relative; display: flex; flex: 1; min-height: 0; min-width: 0; }
.timeline-scroll { flex: 1; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 24px; }
.timeline-scroll:focus-visible { outline-offset: -3px; }
button.latest-messages { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 7px 12px; font-size: .76rem; box-shadow: 0 4px 16px #0005; }
.earlier-entries { display: flex; justify-content: center; padding: 12px; }
.earlier-entries button { padding: 6px 12px; font-size: .77rem; }
.discussion-compose { flex-shrink: 0; padding: 18px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.composer-with-avatar { display: flex; align-items: flex-start; gap: 12px; }
.composer-with-avatar > .avatar { margin-top: 3px; }
.text-composer { flex: 1; min-width: 0; }
.composer-input { border: 1px solid #3d444d; border-radius: 12px; background: #0d1117; overflow: hidden; }
.composer-input:focus-within { border-color: #58a6ff; outline: 2px solid #58a6ff; outline-offset: -1px; }
.text-composer textarea { display: block; resize: none; width: 100%; min-height: 68px; max-height: 160px; padding: 12px 14px 6px; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: .88rem; line-height: 1.55; }
.text-composer textarea:focus { box-shadow: none; outline: none; }
.composer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 10px 10px 14px; }
.composer-actions > button { margin-left: auto; padding: 7px 12px; font-size: .75rem; line-height: 1.5; border-radius: 7px; }
.composer-actions > button .icon { width: 15px; height: 15px; }
.composer-shortcut, .composer-count { white-space: nowrap; font-size: .75rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.composer-count { margin-left: auto; }
.composer-count + button { margin-left: 0; }
.composer-help { display: block; margin-top: 8px; font-size: .7rem; line-height: 1.5; }
.text-composer .alert { margin-bottom: 0; }
.text-error { color: #ffb1aa; }
.composer-warning { color: #f2cc60; }
.discussion-readonly { display: flex; align-items: flex-start; gap: 8px; padding: 18px 24px; border-top: 1px solid var(--border); font-size: .8rem; }
.discussion-readonly .icon { margin-top: 2px; width: 15px; height: 15px; }
/* Comments keep the discussion and composer visible within the native dialog. */
.modal.comments-modal > article.modal-card { display: flex; flex-direction: column; width: 100%; max-width: 680px; height: min(720px, calc(100dvh - 48px)); overflow: hidden; }
.comments-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.discussion-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.discussion-toolbar p { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.discussion-toolbar p > .icon { width: 15px; height: 15px; }
.comments-content > .empty-state, .comments-content > .loading-state { margin-block: auto; }
.comment-list { display: flex; flex-direction: column; gap: 24px; }
.comment-branch { min-width: 0; list-style: none; }
.comment-replies { display: flex; flex-direction: column; gap: 20px; margin: 18px 0 0 18px; padding-left: 16px; border-left: 1px solid var(--border); list-style: none; }
.comment-replies .comment-replies .comment-replies .comment-replies { margin-left: 0; padding-left: 0; border-left: 0; }
.comment-entry { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.comment-content { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.comment-meta strong { font-size: .84rem; overflow-wrap: anywhere; }
.author-you { color: #919ca8; font-size: .67rem; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.comment-meta time { margin-left: auto; font-size: .71rem; }
.comment-content .plain-content { margin-top: 6px; font-size: .88rem; line-height: 1.65; color: #c6d0da; }
.comment-content .plain-content.muted { color: var(--text-muted); font-style: italic; }
.comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.comment-moderation-actions { display: flex; align-items: center; flex-shrink: 0; gap: 8px; }
.comment-moderation-actions button.card-action { flex-basis: 24px; width: 24px; height: 24px; padding: 5px; }
.comment-moderation-actions .icon { width: 12px; height: 12px; }
.comment-actions > button, .comment-cancel { padding: 6px 10px; font-size: .75rem; }
.comment-actions > .comment-reply-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 24px; padding: 2px 6px; font-size: .65rem; margin: 0; }
.comment-actions .card-action { margin: 0; }
.comment-reply-button .icon { width: 12px; height: 12px; }
.comment-reply { margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--border); font-size: .78rem; }
.comment-reply .plain-content { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 2px 0 0; font-size: .78rem; }
.comment-reply-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; }
.comment-reply-context { margin-bottom: 10px; }
.comment-reply-context .comment-reply { margin-block: 4px; }
.comment-change { display: block; margin-top: 5px; font-size: .7rem; }
.comment-cancel { margin-top: 8px; }
.comment-delete-confirmation { box-shadow: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid #f851492b; border-radius: 8px; background: #f8514906; }
.comment-delete-copy strong { font-size: .78rem; font-weight: 600; }
.comment-delete-copy p { margin-top: 3px; font-size: .72rem; line-height: 1.5; }
.comment-delete-actions { display: flex; align-items: center; gap: 8px; }
.comment-delete-actions > button { margin: 0; padding: 5px 9px; font-size: .72rem; }
.comment-delete-actions > button:focus { box-shadow: none; outline: none; }
.comment-delete-actions > button:focus-visible { border-color: #58a6ff; }
.comment-delete-actions .icon { width: 13px; height: 13px; }
.comment-delete-actions > button.danger { background: #f8514914; border-color: #f8514944; color: #ffaaa3; }
.comment-delete-actions > button.danger:hover { background: #f8514928; border-color: #f8514980; }
.comment-delete-actions > button.danger:focus-visible { border-color: #58a6ff; }
.comment-delete-confirmation > :is(.alert, .edit-conflict) { grid-column: 1 / -1; }
.text-composer.composer-compact textarea { min-height: 44px; }
/* Activity is one scannable feed with explicit unread and event-type cues. */
.notification-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.notification-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.notification-select-all, .notification-select { display: inline-flex; align-items: center; flex-shrink: 0; margin: 0; cursor: pointer; }
.notification-select-all { gap: 8px; min-height: 44px; font-size: .8rem; }
.notification-select-all input, .notification-select input { margin: 0; }
.notification-selection-summary { font-size: .74rem; }
.notification-bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.notification-bulk-actions button { min-height: 40px; padding: 6px 10px; font-size: .75rem; }
.notification-bulk-actions .icon { width: 16px; height: 16px; }
.notification-select { justify-content: center; align-self: stretch; min-width: 44px; margin-left: 8px; }
.notification-day { padding: 12px 24px; background: #0d111766; border-block: 1px solid var(--border); color: var(--text-muted); font-size: .72rem; font-weight: 550; letter-spacing: .02em; }
.notification-group:first-of-type .notification-day { border-top: 0; }
.notification-entry { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #30363d88; }
.notification-entry:last-child { border-bottom: 0; }
.notification-entry:is(:hover, :focus-within) { background: var(--row-hover); }
.notification-unread { background: #388bfd08; box-shadow: inset 3px 0 #58a6ff; }
.notification-selected { background: #388bfd18; }
.notification-link { display: flex; flex: 1; min-width: 0; align-items: flex-start; gap: 14px; padding: 20px 12px 20px 0; color: #c6d0da; border-radius: 0; }
.notification-link:hover { text-decoration: none; }
.notification-link:focus-visible { outline-offset: -4px; }
.notification-symbol { width: 36px; height: 36px; border-radius: 50%; color: #a8b6c5; border-color: #919ca833; background: #919ca80c; }
.notification-symbol-comment, .notification-symbol-reply { color: #a5a0ff; border-color: #a5a0ff33; background: #a5a0ff12; }
.notification-symbol-completed { color: #7ee787; border-color: #7ee78733; background: #7ee78712; }
.notification-symbol-assigned { color: #79c0ff; border-color: #79c0ff33; background: #79c0ff12; }
.notification-content { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.notification-sentence { font-size: .84rem; }
.notification-sentence strong { color: #e6edf3; font-weight: 600; }
.notification-subject { color: #a5c9f5; font-size: .85rem; }
.notification-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 12px; margin-top: 4px; font-size: .69rem; }
.notification-identifier { font-size: .65rem; }
.notification-priority { display: inline-flex; align-items: center; gap: 5px; color: var(--notification-accent, #919ca8); font-size: .69rem; font-weight: 600; }
.notification-priority .icon { width: 13px; height: 13px; }
.notification-priority-urgent { --notification-accent: #ff938a; }
.notification-priority-due_today { --notification-accent: #f2cc60; }
.notification-priority-important { --notification-accent: #b7adff; }
.notification-priority-success { --notification-accent: #7ee787; }
.notification-priority-info { --notification-accent: #79c0ff; }
.notification-entry .notification-symbol, .notification-banner .notification-banner-event { color: var(--notification-accent); }
.notification-entry.notification-unread { box-shadow: inset 3px 0 var(--notification-accent); }
.notification-banner[class*="notification-priority-"] { border-color: color-mix(in srgb, var(--notification-accent, #919ca8) 18%, transparent); }
.modal.task-attention-modal > article.modal-card { max-width: 640px; }
.attention-symbol { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #79c0ff40; border-radius: 12px; color: #79c0ff; background: #58a6ff12; }
.attention-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.attention-total { padding: 16px; border: 1px solid #303d4b; border-radius: 10px; background: #0d111788; }
.attention-total dt { display: flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; }
.attention-total dt .icon { width: 16px; height: 16px; }
.attention-total dd { margin: 7px 0 0; font-size: 2rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.attention-total dd.attention-total-help { margin-top: 8px; font-size: .72rem; font-weight: 400; line-height: 1.5; color: var(--text-muted); }
.attention-overdue { color: #ff938a; }
.attention-today { color: #f2cc60; }
.attention-empty { color: var(--text-muted); }
.attention-group + .attention-group { margin-top: 24px; }
.attention-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.attention-group-heading h3 { margin: 0; font-size: .82rem; font-weight: 600; }
.attention-group-heading > span { font-size: .72rem; }
.attention-task-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.attention-task-list > li { margin: 0; }
.attention-task-list > li + li { border-top: 1px solid var(--border); }
.attention-task-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #e6edf3; }
.attention-task-list a:is(:hover, :focus-visible) { background: var(--row-hover); text-decoration: none; }
.attention-task-list a:focus-visible { outline-offset: -3px; }
.attention-task-list a > .icon { flex-shrink: 0; width: 16px; height: 16px; color: #919ca8; }
.attention-task-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.attention-task-copy > strong { font-size: .84rem; font-weight: 550; overflow-wrap: anywhere; }
.attention-task-assignment { display: flex; align-items: center; gap: 5px; font-size: .72rem; overflow-wrap: anywhere; }
.attention-task-assignment .icon { flex-shrink: 0; width: 13px; height: 13px; }
.attention-task-deadline, .attention-task-deadline time { font-size: .72rem; }
.task-attention p.attention-date-note { margin: 20px 0 0; font-size: .7rem; line-height: 1.5; }
.attention-view-all { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid #3fb95066; border-radius: 6px; background: #238636; color: #fff; font-size: .85rem; font-weight: 550; text-decoration: none; }
.attention-view-all:hover { background: #2ea043; color: #fff; text-decoration: none; }
@media (max-width: 600px) {
  .task-attention-modal .modal-heading { align-items: flex-start; gap: 10px; }
  .task-attention-modal .attention-symbol { width: 36px; height: 36px; }
  .attention-total { padding: 12px; }
  .attention-total dd { font-size: 1.75rem; }
  .task-attention-modal .modal-footer { flex-wrap: wrap; }
  .task-attention-modal .modal-footer > * { flex: 1; min-height: 44px; white-space: nowrap; }
  .attention-task-list a { padding: 12px; }
}
.notification-feed > .alert { margin-inline: 20px; }
@media (max-width: 1000px) {
  .composer-shortcut { display: none; }
}
@media (max-width: 767px) {
  .timeline-scroll { padding: 20px 16px; }
  .discussion-compose { padding: 14px 16px; }
  .composer-with-avatar > .avatar { display: none; }
  .composer-actions { gap: 8px; padding-left: 10px; }
  .composer-actions > button { padding: 7px 10px; }
  .composer-count { font-size: .65rem; }
  .modal.comments-modal > article.modal-card { height: calc(100dvh - 24px); }
  .discussion-toolbar { padding-inline: 16px; }
  .comment-replies { margin-left: 6px; padding-left: 10px; }
  .comment-replies .comment-reply-button { width: 44px; padding: 10px; gap: 0; }
  .comment-replies .comment-reply-button > span { display: none; }
  .comment-entry { gap: 10px; }
  .comment-entry > .avatar { width: 28px; height: 28px; }
  .comment-meta time { font-size: .65rem; }
  .comment-delete-confirmation { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 10px; }
  .comment-delete-actions { justify-content: flex-end; }
  .notification-bulk { padding: 8px 12px 12px; gap: 4px 12px; }
  .notification-bulk-actions { flex-basis: 100%; margin-left: 0; }
  .notification-bulk-actions button { min-height: 44px; }
  .notification-select { margin-left: 0; }
  .notification-entry { flex-wrap: wrap; gap: 0; }
  .notification-entry > .notification-link { flex-basis: calc(100% - 44px); }
  .notification-link { gap: 10px; padding: 16px 12px 16px 0; }
  .notification-symbol { width: 30px; height: 30px; }
  .notification-symbol .icon { width: 15px; height: 15px; }
  .notification-meta { gap: 4px 10px; }
  .notification-day { padding-inline: 16px; }
}
@media (max-width: 1100px), (pointer: coarse) {
  .comment-actions > .comment-reply-button { min-height: 44px; }
  .comment-moderation-actions button.card-action { flex-basis: 44px; width: 44px; height: 44px; padding: 12px; }
  .comment-delete-actions > button { min-height: 44px; padding-inline: 12px; }
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 73px; gap: 20px; padding: 10px 40px; background: var(--surface-sheen), #010409; border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-width: 0; font-size: .82rem; }
.breadcrumb > span:first-child { white-space: nowrap; }
.breadcrumb > span { color: var(--text-muted); }
.breadcrumb strong { font-weight: 500; }
.breadcrumb-slash { opacity: .45; }
.content { width: 100%; max-width: 1320px; padding: 44px 48px; margin-inline: auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.page-heading h1 { margin-bottom: 9px; }
.page-heading .muted { font-size: .93rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: .73rem; border: 1px solid var(--border); border-radius: 20px; color: var(--text-muted); white-space: nowrap; }
.badge .icon { width: 12px; height: 12px; }
.badge-green { background: #23863618; border-color: #23863666; }
.badge-yellow { background: #d2992218; border-color: #d2992266; }
.badge-orange { background: #f0883e18; border-color: #f0883e66; }
.badge-gray { background: #919ca818; border-color: #919ca866; }
.badge-red { background: #f8514918; border-color: #f8514966; }
.badge-green, .task-deadline-green, .schedule-next-assignment-green { color: var(--green); }
.badge-yellow, .task-deadline-yellow, .schedule-next-assignment-yellow { color: #f2cc60; }
.badge-orange, .task-deadline-orange { color: #ffb77c; }
.badge-gray, .task-deadline-gray, .schedule-next-assignment-gray { color: #b1bac4; }
.badge-red, .task-deadline-red { color: #ffa198; }
.task-deadline strong, .schedule-next-assignment strong { color: #f0f6fc; }
.badge-purple { background: #a371f714; border-color: #a371f744; color: #d2a8ff; }
.panel { background: var(--surface-sheen), var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--surface-shadow); overflow: hidden; }
.statistics-filters { margin-bottom: 24px; }
.statistics-filters .statistics-toolbar { border-bottom: 0; }
nav.statistics-tabs { display: flex; flex: 1; flex-wrap: wrap; justify-content: flex-start; gap: 6px; min-width: 0; }
.statistics-period { display: grid; grid-template-columns: minmax(160px, 1.3fr) repeat(2, minmax(150px, 1fr)) auto; align-items: end; gap: 16px; padding: 20px 24px; }
.statistics-period .field { min-width: 0; margin: 0; }
.statistics-period input, .statistics-period select { width: 100%; min-width: 0; }
.statistics-period > button { min-height: 44px; }
.statistics-trend > .alert { margin: 0 24px 20px; }
.statistics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.statistics-metric { padding: 20px; margin: 0; }
.statistics-metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.statistics-metric h2 { font-size: .82rem; font-weight: 550; letter-spacing: 0; }
.statistics-metric .icon { color: var(--text-muted); }
.statistics-value { display: block; margin-bottom: 8px; color: #f0f6fc; font-size: 2rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.statistics-metric p { font-size: .75rem; line-height: 1.6; }
.statistics-metric-body { min-height: 90px; }
.statistics-metric-value, .statistics-metric-value .loading-state { min-height: 46px; }
.statistics-metric-value .loading-state { justify-content: flex-start; font-size: .75rem; }
.statistics-metric-body .load-error { padding: 0; font-size: .75rem; }
.statistics-metric-body .alert { display: block; margin: 0; padding: 8px; font-size: .75rem; }
.statistics-metric-body .alert .icon { display: none; }
.statistics-metric-body .alert-retry { display: block; margin: 8px 0 0; padding: 6px 4px; white-space: normal; text-align: center; }
.statistics-chart-content { min-height: 280px; }
.statistics-chart-content > .loading-state { min-height: 280px; }
.statistics-ranking-content { min-height: 180px; }
.statistics-trend, .statistics-ranking { margin-bottom: 24px; }
.statistics-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; }
.statistics-section-heading h2 { margin-bottom: 6px; font-size: 1rem; }
.statistics-section-heading p, .statistics-ranking-note { font-size: .77rem; line-height: 1.6; }
.statistics-legend, .statistics-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.statistics-legend { gap: 16px; color: var(--text-muted); font-size: .75rem; }
.statistics-legend i { width: 9px; height: 9px; border-radius: 2px; }
.trend-late { background: #f85149; }
.trend-on-time { background: #7ee787; }
.statistics-plot { display: grid; grid-template-columns: 32px minmax(0, 1fr); padding: 4px 24px 0; }
.statistics-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-right: 8px; color: var(--text-muted); font-size: .7rem; line-height: 1; text-align: right; }
.statistics-chart { display: block; width: 100%; height: 180px; }
.statistics-axis { display: flex; justify-content: space-between; gap: 12px; padding: 10px 24px 18px 56px; color: var(--text-muted); font-size: .72rem; }
.statistics-daily { margin: 0; border-top: 1px solid var(--border); }
.statistics-daily > summary { padding: 16px 24px; font-size: .8rem; }
.statistics-daily[open] > summary { margin-bottom: 0; }
.statistics-daily-scroll { max-height: 280px; overflow-y: auto; }
table.statistics-table { width: 100%; margin: 0; font-size: .82rem; font-variant-numeric: tabular-nums; }
.statistics-table th, .statistics-table td { padding: 14px 24px; border-bottom: 1px solid var(--border); background: transparent; }
.statistics-table thead th { border-top: 1px solid var(--border); background: #0d111755; color: var(--text-muted); font-size: .76rem; font-weight: 500; }
.statistics-table tbody th { font-weight: 550; }
.statistics-table tr:last-child > * { border-bottom: 0; }
.statistics-table small { display: block; margin-top: 5px; font-size: .73rem; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
.statistics-person-name { display: block; overflow-wrap: anywhere; }
/* Extend one native link over the row, preserving table semantics and one tab stop. */
.statistics-leaderboard tbody tr { position: relative; }
a.statistics-row-link::after { content: ""; position: absolute; inset: 0; }
a.statistics-row-link:hover { color: #79c0ff; text-decoration: none; }
a.statistics-row-link:is(:hover, :focus-visible)::after { background: var(--row-hover); }
a.statistics-row-link:focus-visible { outline: none; }
a.statistics-row-link:focus-visible::after { outline: 2px solid #58a6ff; outline-offset: -2px; }
.statistics-rank { color: var(--text-muted); white-space: nowrap; }
.statistics-leaderboard { table-layout: fixed; border-bottom: 1px solid color-mix(in srgb, var(--text) 45%, transparent); }
.statistics-table.statistics-leaderboard thead th { border-top: 1px solid var(--border); border-bottom: 1px solid color-mix(in srgb, var(--text) 45%, transparent); }
.statistics-leaderboard tbody th, .statistics-leaderboard tbody td { border-bottom-color: color-mix(in srgb, var(--text) 45%, transparent); }
.statistics-leaderboard .statistics-performance-green { background: #23863640; }
.statistics-leaderboard .statistics-performance-yellow { background: #d2992240; }
.statistics-leaderboard .statistics-performance-red { background: #f8514940; }
.statistics-leaderboard .rank-column { width: 10%; }
.statistics-leaderboard .name-column { width: 44%; }
.statistics-leaderboard .completed-column, .statistics-leaderboard .rate-column { width: 23%; }
.statistics-empty { padding: 0 24px 20px; font-size: .8rem; }
.statistics-performance-key { padding: 16px 24px; font-size: .75rem; }
@media (max-width: 900px) {
  .statistics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statistics-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statistics-period > .field:first-child { grid-column: 1 / -1; }
  .statistics-period > button { justify-self: start; }
}
@media (max-width: 600px) {
  nav.statistics-tabs { gap: 4px; }
  .statistics-period { padding: 18px; gap: 14px 12px; }
  .statistics-period input, .statistics-period select { font-size: .85rem; padding-inline: 8px; min-height: 44px; }
  .statistics-period > button { grid-column: 1 / -1; width: 100%; }
  .statistics-summary { gap: 12px; }
  .statistics-metric { padding: 16px; }
  .statistics-metric-label { align-items: flex-start; }
  .statistics-metric h2 { font-size: .76rem; line-height: 1.5; }
  .statistics-metric .icon { width: 16px; height: 16px; margin-top: 2px; }
  .statistics-value { font-size: 1.7rem; }
  .statistics-section-heading { padding: 18px; }
  .statistics-plot { padding-inline: 18px; }
  .statistics-chart { height: 140px; }
  .statistics-axis { padding-inline: 50px 18px; font-size: .68rem; }
  .statistics-page .page-actions > button { min-height: 44px; }
  .statistics-daily > summary { padding: 14px 18px; }
  .statistics-table th, .statistics-table td { padding: 12px 10px; }
  .statistics-table thead th { font-size: .68rem; padding-inline: 6px; }
  .statistics-table { font-size: .78rem; }
  .statistics-table small { font-size: .68rem; }
  .statistics-leaderboard .rank-column { width: 12%; }
  .statistics-leaderboard .name-column { width: 38%; }
  .statistics-leaderboard .completed-column, .statistics-leaderboard .rate-column { width: 25%; }
  .statistics-empty { padding: 0 18px 18px; }
}
@media (max-width: 380px) {
  .statistics-period { grid-template-columns: minmax(0, 1fr); }
  .statistics-table .statistics-rank { padding-inline: 6px; }
}
.filter-group { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.filter-group[role="tablist"] { width: auto; margin: 0; box-shadow: none; }
.page-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface-inset); }
.page-toolbar > :first-child { flex: 1; }
.filter-button, button.filter-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: var(--control-height); margin: 0; padding: 8px 12px; background: transparent; border: 1px solid transparent; color: var(--text-muted); font-size: .82rem; font-weight: 550; line-height: 1.5; border-radius: 6px; box-shadow: none; text-decoration: none; }
button.toolbar-refresh { flex-shrink: 0; min-height: var(--control-height); margin-left: auto; padding: 8px 12px; font-size: .82rem; }
.toolbar-refresh .icon { width: 16px; height: 16px; }
button.toolbar-refresh[aria-busy="true"]::before { display: none; }
.toolbar-refresh[aria-busy="true"] .icon { animation: spin 1s linear var(--loading-delay) infinite; }
@media (max-width: 600px) {
  :root { --control-height: 44px; --card-padding: 18px; }
  .page-toolbar { padding: 12px; gap: 8px; }
  .filter-button, button.filter-button { padding: 8px; font-size: .78rem; }
  button.toolbar-refresh { width: 44px; height: 44px; padding: 10px; }
  .toolbar-refresh .refresh-label { display: none; }
}
.filter-button:is(:hover, :focus-visible) { color: #e6edf3; background: var(--control-sheen), var(--surface-hover); border-color: transparent; box-shadow: 0 0 14px #58a6ff14; text-decoration: none; }
.filter-button:is([aria-selected="true"], [aria-current="page"]) { color: #e6edf3; background: var(--control-sheen), var(--surface-selected); border-color: #3d444d; }
.count { min-width: 18px; padding: 0 5px; border-radius: 20px; background: #ffffff0e; font-size: .7rem; text-align: center; }
.empty-state { text-align: center; padding: 58px 24px; }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 19px; background: var(--control-sheen), #212b36; border: 1px solid var(--border); border-radius: 15px; color: #8bbaec; box-shadow: 0 0 20px #58a6ff0c; }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { margin-bottom: 8px; font-weight: 550; }
.empty-state p { font-size: .85rem; max-width: 340px; margin: 0 auto; }
.empty-state button { margin-top: 20px; }
/* Reserve space immediately, but keep brief requests from flashing an indicator. */
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--text-muted); visibility: hidden; animation: reveal-loading 0s var(--loading-delay) forwards; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: #58a6ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal-loading { to { visibility: visible; } }
.load-error { padding: 24px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-block: 16px; background: #f8514910; border: 1px solid #f8514955; border-radius: 6px; color: #ffb1aa; font-size: .85rem; overflow-wrap: anywhere; }
.alert > .icon { margin-top: 1px; }
.alert > div { flex: 1; min-width: 0; }
.alert-retry { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin: -3px 0 -3px auto; padding: 2px 7px; border: 1px solid #f8514944; border-radius: 5px; color: #ffb1aa; font-size: inherit; font-weight: 600; line-height: inherit; white-space: nowrap; text-decoration: none; }
.alert-retry:hover { border-color: #f8514977; background: #f851490a; color: #ffd1cc; text-decoration: none; }
.alert-retry .icon { width: 14px; height: 14px; }
.alert-info { background: #388bfd10; border-color: #388bfd55; color: #a5d6ff; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 550; }
.field-help { display: block; font-size: .77rem; margin-top: 7px; }
.edit-conflict { padding: 16px; margin-top: 16px; border: 1px solid #d2992266; border-radius: 8px; background: #d2992208; }
.edit-conflict > p { margin-bottom: 12px; }
.comment-entry.linked-comment { background: #58a6ff12; outline: 1px solid #58a6ff66; outline-offset: -1px; border-radius: 6px; }
.conflict-current { display: grid; gap: 10px; max-height: 240px; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 6px; }
.conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conflict-actions > button, .edit-conflict > button { font-size: .8rem; padding: 8px 12px; }
.password-input { position: relative; }
.password-input input { padding-right: 44px; }
.password-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); padding: 5px; }
.section-heading { padding: 19px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.section-heading h2 { font-size: .93rem; font-weight: 600; }
.section-heading .count { margin-left: 8px; }
.roster-list { padding: 0; list-style: none; }
.account-info { flex: 1; min-width: 0; }
.account-email, .team-name { overflow-wrap: anywhere; }
button.danger { background: var(--control-sheen), #b62324; border-color: #f8514966; color: white; box-shadow: inset 0 1px 0 #ffffff10, 0 3px 12px #f8514914; }
button.danger:is(:hover, :focus-visible) { background: var(--control-sheen), #cf3030; border-color: #f85149; box-shadow: inset 0 1px 0 #ffffff14, 0 0 18px #f8514926; }
.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); }
.team-list > li { list-style: none; }
.team-card { height: 100%; display: flex; flex-direction: column; }
.team-symbol { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid #388bfd44; background: var(--control-sheen), #388bfd12; color: #79c0ff; border-radius: 9px; box-shadow: 0 0 16px #58a6ff0c; }
.roster-list li { display: flex; align-items: center; gap: 9px; font-size: .8rem; }
.roster-list li + li { border-top: 1px solid #30363d88; }
.roster-link { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 10px 8px; border-radius: 4px; color: inherit; }
.roster-list .roster-link { flex: 1; padding-inline-start: 12px; }
a.roster-link:is(:hover, :focus-visible) { background: var(--row-hover); color: inherit; text-decoration: none; }
.team-empty { margin-top: 14px; font-size: .8rem; color: var(--text-muted); }
/* The account and team directories share controls, identity, and actions. */
.directory-controls { margin-bottom: 20px; }
.directory-controls::after { content: ""; grid-column: 1 / -1; height: 16px; margin-inline: -24px; border-top: 1px solid var(--border); background: var(--surface-inset); }
.directory-count { font-size: .8rem; margin-bottom: 12px; }
.directory-list { display: grid; gap: var(--card-gap); list-style: none; padding: 0; margin: 0; }
.directory-list > li { list-style: none; margin: 0; min-width: 0; }
.directory-card { padding: var(--card-padding); margin: 0; }
.directory-card-heading { display: flex; align-items: flex-start; gap: 12px; }
.directory-card-heading h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.directory-card-heading .identity-email { margin-top: 4px; overflow-wrap: anywhere; }
.directory-card-heading > .badge { flex-shrink: 0; }
/* Match the roster's visible spacing: 18px before its content and 12px after.
   Split the leading space so the company link's content stays centered. */
.team-owner { margin-top: 6px; padding: 12px 0; border-bottom: 1px solid #30363d88; border-radius: 0; }
.team-owner-copy { min-width: 0; }
.team-owner-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card .history-event { grid-template-columns: 30px minmax(0, 1fr); gap: 9px; }
/* Keep icon outer sizes equal inside and outside native details content. */
.team-card :is(.history-icon, .avatar-sm) { box-sizing: border-box; }
.team-card .history-icon { width: 30px; height: 30px; }
.directory-links, .directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.directory-links a { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding-block: 5px; }
.directory-actions { gap: 4px; }
.team-roster { margin: 18px 0 20px; border: 0; }
.team-roster > summary { display: grid; grid-template-columns: minmax(0, 1fr) 7px; align-items: center; gap: 17px; padding-bottom: 12px; border-bottom: 1px solid #30363d88; font-size: .85rem; font-weight: 550; }
.team-roster > summary::after { margin-left: 0; transform: rotate(45deg); }
.team-roster[open] > summary::after { transform: rotate(225deg); }
.roster-count, .team-owner-email { display: block; margin-top: 5px; font-size: .77rem; font-weight: 400; }
.settings-profile { display: flex; align-items: center; gap: 16px; padding: 24px; margin-bottom: 24px; }
.settings-profile .account-info { flex: 1; min-width: 0; }
.settings-profile .eyebrow { margin-bottom: 7px; font-size: .65rem; }
.settings-profile .identity-name { font-size: 1.05rem; }
.settings-profile .identity-email { font-size: .82rem; }
.settings-profile > .badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; }
.settings-profile > .badge .icon { width: 14px; height: 14px; }
.settings-sections { display: grid; gap: var(--card-gap); }
.settings-card { margin-bottom: 0; }
.settings-card:not(.sessions-card) { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.65fr); padding: var(--card-padding); gap: 32px; }
.settings-card-heading h2 { margin: 14px 0 8px; font-size: 1.05rem; }
.settings-card-heading p { max-width: 260px; font-size: .82rem; line-height: 1.7; }
.settings-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid #388bfd44; background: var(--control-sheen), #388bfd12; color: #79c0ff; box-shadow: 0 0 16px #58a6ff0c; }
.settings-form { display: grid; align-content: start; gap: 20px; min-width: 0; padding: 0; }
.settings-form .field { min-width: 0; margin-bottom: 0; }
.settings-form > button { justify-self: end; }
.settings-form .alert { margin: 0; }
.settings-security-note { display: flex; align-items: flex-start; gap: 8px; font-size: .76rem; line-height: 1.6; }
.settings-security-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.settings-page .profile-name-card { margin-bottom: 20px; }
.sessions-card { margin-top: 24px; }
.sessions-card .section-heading { justify-content: flex-start; gap: 10px; padding: 19px 24px; }
.sessions-card .section-heading .icon { color: #79c0ff; }
@media (max-width: 760px) {
  .settings-card:not(.sessions-card) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .settings-card-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .settings-card-heading h2 { margin: 0; }
  .settings-card-heading p { grid-column: 2; max-width: none; margin-top: 4px; }
  .settings-section-icon { grid-row: span 2; align-self: start; }
}
.sessions-body { padding: 24px; }
.sessions-intro, .sessions-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sessions-intro > p { max-width: 760px; font-size: .82rem; line-height: 1.6; }
.sessions-list-heading h3 { font-size: .9rem; }
.sessions-body button:not(.toolbar-refresh) { flex-shrink: 0; padding: 8px 12px; font-size: .8rem; }
.session-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; }
.session-row { display: flex; align-items: flex-start; gap: 14px; padding: 18px; margin: 0; }
.session-row + .session-row { border-top: 1px solid var(--border); }
.session-device-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; color: #919ca8; background: #ffffff05; border: 1px solid var(--border); border-radius: 8px; }
.session-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.session-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.session-heading h4 { font-size: .85rem; margin: 0; }
.session-heading .badge { font-size: .65rem; }
.session-copy p, .session-copy time { font-size: .74rem; line-height: 1.7; }
@media (max-width: 600px) {
  .sessions-body { padding: 18px; }
  .sessions-intro, .sessions-list-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .session-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 14px; gap: 10px; }
  .session-row > button { grid-column: 2; justify-self: start; min-height: 44px; }
  .sessions-body button { min-height: 44px; }
}
/* Use the native dialog top layer rather than a JavaScript focus trap. */
dialog.modal { display: none; width: 100%; height: 100%; max-width: none; max-height: none; padding: 24px; margin: 0; background: transparent; border: 0; overflow: auto; align-items: center; justify-content: center; }
dialog.modal[open] { display: flex; }
dialog.modal::backdrop { background: #010409b8; backdrop-filter: blur(5px); }
body:has(dialog[open]) { overflow: hidden; }
.modal > article.modal-card { width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); overflow-y: auto; margin: auto; padding: 0; border: 1px solid #3d444d; border-radius: 12px; background: var(--surface-sheen), var(--surface); box-shadow: 0 24px 100px #0008; animation: appear .15s ease-out; }
.modal-card > header.modal-header { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--border); background: transparent; }
.modal-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.modal-heading-text { min-width: 0; overflow-wrap: anywhere; }
.modal-header h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.modal-header p { font-size: .83rem; margin-top: 4px; }
.modal-header > .icon-button { flex-shrink: 0; margin: -5px -5px 0 0; }
.modal-header p.modal-identifier { margin-top: 4px; font-size: .7rem; color: var(--text-muted); }
.modal-body { padding: 16px 24px 24px; }
.modal-body > .field:last-child { margin-bottom: 0; }
.modal-footer { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--border); background: #111820; }
.modal-card > footer.modal-footer { margin: 0; }
.modal-body p { font-size: .9rem; overflow-wrap: anywhere; }
.form-section-label { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 17px; }
.form-section-label:not(:first-child) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-section-label .icon { width: 15px; height: 15px; }
.member-fieldset { padding: 0; border: 0; }
.member-fieldset legend { margin-bottom: 6px; font-size: .86rem; font-weight: 550; }
.member-fieldset > p { margin-bottom: 14px; font-size: .77rem; color: var(--text-muted); }
.member-options { border: 1px solid var(--border); border-radius: 7px; max-height: 240px; overflow-y: auto; }
.team-member-option { display: flex; align-items: center; gap: 10px; padding: 13px; border-bottom: 1px solid var(--border); }
.team-member-option:last-child { border: 0; }
.team-member-option label { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: .78rem; }
.team-member-option input { flex-shrink: 0; margin: 0; }
.team-member-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.member-selection-count { font-size: .78rem; color: var(--text-muted); margin-bottom: 12px; }
.member-role { width: auto; max-width: 130px; font-size: .8rem; padding-block: 7px; }
.member-no-matches { padding: 14px 0; }
.confirm-icon { display: inline-grid; place-items: center; color: #ff938a; background: #f8514914; border: 1px solid #f8514933; border-radius: 10px; width: 44px; height: 44px; margin-bottom: 18px; }
.confirm-icon .icon { width: 22px; height: 22px; }
.toast-region { position: fixed; bottom: 24px; right: 24px; max-width: min(440px, calc(100% - 32px)); z-index: 100; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #3d5945; border-radius: 10px; background: #18231d; color: #e6edf3; font-size: .85rem; box-shadow: 0 8px 30px #0006; animation: appear .2s ease-out; }
.toast-icon { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border-radius: 50%; background: #23863644; color: var(--green); }
.toast > span:nth-child(2) { flex: 1; }
.toast .icon-button { padding: 3px; }
.notification-banner-region { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); z-index: 110; pointer-events: none; }
.notification-banner { position: relative; overflow: hidden; pointer-events: auto; padding: 6px; border: 1px solid #ffffff1c; border-radius: 16px; background: linear-gradient(125deg, #252d3a80, #1b222c80 70%); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); color: #edf2f8; box-shadow: 0 16px 48px #0007, 0 2px 8px #0004, inset 0 1px 0 #ffffff09; animation: banner-arrive .3s cubic-bezier(.2,.8,.2,1); }
.notification-banner-stacked { overflow: visible; isolation: isolate; margin-bottom: 12px; }
.notification-banner-stacked::before, .notification-banner-stacked::after { content: ""; position: absolute; pointer-events: none; height: 6px; border: 1px solid #ffffff24; border-top: 0; border-radius: 0 0 10px 10px; background: #252d3a80; z-index: -1; }
.notification-banner-stacked::before { inset: auto 8px -7px; }
.notification-banner-stacked::after { inset: auto 16px -13px; background: #252d3a55; border-color: #ffffff18; z-index: -2; }
button.notification-banner-dismiss { position: absolute; top: 10px; right: 10px; margin: 0; width: 32px; height: 32px; padding: 8px; border: 0; border-radius: 8px; color: #9daabb; background: transparent; }
button.notification-banner-dismiss:hover { color: #edf2f8; background: #ffffff0c; }
.notification-banner-dismiss .icon { width: 16px; height: 16px; }
.notification-banner-link { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 48px 14px 14px; border-radius: 11px; color: inherit; transition: background .15s; }
.notification-banner-link:hover { color: inherit; text-decoration: none; background: #ffffff04; }
.notification-banner-link:focus-visible { outline: 2px solid var(--notification-accent); outline-offset: -2px; }
.notification-banner-link[aria-disabled="true"] { opacity: .7; }
.notification-banner-event { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid color-mix(in srgb, var(--notification-accent) 22%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--notification-accent) 10%, transparent); }
.notification-banner-event .icon { width: 21px; height: 21px; }
.notification-banner-body { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; font-size: .8125rem; line-height: 1.45; color: #bac5d3; }
.notification-banner-body .notification-priority { margin-bottom: 2px; font-size: .625rem; letter-spacing: .07em; text-transform: uppercase; }
.notification-banner-body strong { font-size: .9375rem; font-weight: 600; color: #edf2f8; }
.notification-banner-body > span, .notification-banner-body > strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.notification-banner-subject { color: #91a6c1; }
.notification-banner-error { margin: 0 14px 12px; font-size: .75rem; color: #ffb4ab; }
@keyframes banner-arrive { from { opacity: 0; transform: translateY(calc(-100% - 20px)); } to { opacity: 1; transform: translateY(0); } }
@media (pointer: coarse) {
  button.notification-banner-dismiss { width: 44px; height: 44px; }
}
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.startup { max-width: 540px; margin: 10vh auto; padding: 24px; }
.login-page { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 24px; }
.login-container { width: 100%; max-width: 420px; display: grid; gap: 16px; }
.login-container > .alert { margin: 0; }
.login-card { width: 100%; padding: 32px; }
.login-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.login-card h1 { font-size: 1.7rem; margin-bottom: 0; }
.login-security { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .72rem; white-space: nowrap; }
.login-security .icon { width: 14px; height: 14px; }
button.login-submit[type="submit"] { width: 100%; margin-top: 3px; }
@media (min-width: 1500px) { .content { padding-top: 56px; } }
@media (max-width: 1100px) {
  .content { padding: 32px 28px; }
  .topbar { padding-inline: 28px; }
}
@media (max-width: 800px) {
  .page-heading { gap: 12px; }
  .team-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { min-height: 73px; gap: 12px; padding: 10px 20px; }
  .account-menu { max-width: 48%; flex-shrink: 0; }
  button.account-trigger { gap: 6px; padding: 9px 12px; }
  .account-trigger .avatar { width: 29px; height: 29px; }
  .account-trigger .user-details { font-size: .68rem; }
  .account-trigger .role-label { font-size: .65rem; }
  .breadcrumb { gap: 4px 7px; font-size: .76rem; }
  .content { padding: 28px 20px; }
  h1 { font-size: 1.75rem; }
  .page-heading { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 24px; }
  .page-actions { flex-direction: column; align-items: stretch; justify-self: start; }
  .page-actions > button, .page-actions > a.page-link { min-height: 40px; padding: 8px 10px; font-size: .78rem; }
  .page-heading .muted { font-size: .85rem; }
  .page-actions > .badge { font-size: .66rem; margin: 0; }
  .empty-state { padding: 40px 20px; }
  .settings-profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 20px; }
  .settings-profile .avatar { align-self: start; }
  .settings-profile > .badge { grid-column: 2; justify-self: start; }
  .section-heading { padding: 20px; }
  .settings-form > button { width: 100%; min-height: 44px; }
  dialog.modal { padding: 12px; }
  .modal > article.modal-card { max-height: calc(100dvh - 24px); }
  .modal-card > header.modal-header { padding: 16px 20px; }
  .modal-body { padding: 16px 20px 20px; }
  .modal-footer { padding: 16px 20px; }
  .team-member-option { flex-wrap: wrap; }
  .team-member-name { flex-basis: 100%; }
  .team-member-option .member-role { margin-left: 28px; }
  .directory-actions { width: 100%; }
  .toast-region { right: 16px; bottom: 16px; }
  .login-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .loading-state, button[aria-busy="true"]::before { animation: reveal-loading 0s var(--loading-delay) forwards !important; }
}

/* Task and directory controls share the same layout and sort toggle. */
.task-feed-controls, .directory-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding: 20px 24px 0; }
button.mobile-filter-toggle { display: none; }
.task-feed-controls .field, .directory-controls .field { min-width: 0; }
.task-search-field, .directory-search { grid-column: 1 / -1; }
@media (min-width: 1101px) {
  .task-feed-controls:has(.task-search-field), .directory-controls:has(.directory-search) { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
  .task-search-field, .directory-search { grid-column: auto; }
  .task-feed-controls:has(.company-filter) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-feed-controls:has(.company-filter) .task-search-field { grid-column: 1 / -1; }
}
.task-feed-controls select, .directory-controls select { width: 100%; }
.task-sort-control, .directory-sort-control, .task-deadline-control { display: flex; gap: 8px; }
.task-sort-control select, .directory-sort-control select, .task-deadline-control input { flex: 1; min-width: 0; }
.task-sort-order, .directory-order, .task-clear-deadline { flex-shrink: 0; }
/* Assigned task feed and retained history. */
.task-feed-panel .list-toolbar { flex-wrap: wrap; border-top: 1px solid var(--border); border-bottom: 0; }
.task-feed-panel .list-toolbar > button { margin-left: auto; }
.task-feed, .task-history { list-style: none; padding: 0; margin: 0; }
#task-results, #schedule-results { margin-top: 20px; }
.task-feed { display: grid; gap: var(--card-gap); }
.task-feed-item { list-style: none; margin: 0; min-width: 0; }
.task-card { padding: var(--card-padding); margin: 0; border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--surface-shadow); background: var(--surface-sheen), var(--surface); }
.task-card-overdue { border-color: #f85149; box-shadow: inset 0 0 0 1px #f85149; }
.task-card-due-today { border-color: #f0883e; box-shadow: inset 0 0 0 1px #f0883e; }
.task-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.task-card-title, .team-card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-card-title { flex: 1; }
.task-assignee-symbol { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #388bfd44; background: #388bfd12; color: #79c0ff; border-radius: 9px; }
.task-card-heading h2 { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.task-card-heading .badge { flex-shrink: 0; }
.description-content, .description-editor .ql-editor { font-size: 1rem; line-height: 1.6; }
.description-content { overflow-wrap: anywhere; white-space: pre-wrap; }
/* Keep authoring and reading sizes aligned. Quill uses h1–h3; descriptions
   use h3–h5 to fit within the page's heading hierarchy. */
.description-content h3, .description-editor .ql-editor h1 { font-size: 1.5rem; }
.description-content h4, .description-editor .ql-editor h2 { font-size: 1.375rem; }
.description-content h5, .description-editor .ql-editor h3 { font-size: 1.25rem; }
.description-content :is(h3, h4, h5), .description-editor .ql-editor :is(h1, h2, h3) { margin-bottom: 0; font-weight: 600; letter-spacing: normal; line-height: 1.4; }
.description-content p { font-size: inherit; }
.description-content :is(ul, ol) { padding-left: 1.5em; margin-bottom: 0; }
.description-content li { margin-bottom: .25em; }
.description-content li > :is(ul, ol) { margin-top: .25em; }
.description-content blockquote { margin-inline: 0; margin-bottom: 0; padding: .5em 1em; border-left: 3px solid #59636e; color: var(--text-muted); }
.description-content pre { padding: 12px; white-space: pre; overflow-x: auto; background: #010409; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 0; }
.description-content pre code { padding: 0; background: none; }
.description-content a { text-decoration: underline; }
.description-size-small, .description-editor .ql-editor .ql-size-small { font-size: .875em; }
.description-size-large, .description-editor .ql-editor .ql-size-large { font-size: 1.125em; }
.description-field .field-label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 550; }
.description-editor { border: 1px solid #3d444d; border-radius: 8px; overflow: hidden; background: #0d1117; }
/* Show focus once around the field, rather than framing its editable area twice. */
.description-editor:has(.ql-editor:focus) { border-color: #58a6ff; }
.description-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; margin: 0; padding: 8px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.description-tools { display: inline-flex; align-items: center; gap: 2px; }
.description-toolbar button { flex: 0 0 auto; min-width: 32px; min-height: 32px; padding: 4px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; box-shadow: none; color: var(--text-muted); font-size: .76rem; font-weight: 500; }
.description-toolbar button:is(:hover, :focus-visible) { background: var(--control-sheen), #ffffff0a; color: #e6edf3; box-shadow: 0 0 12px #58a6ff14; }
.description-toolbar button[aria-pressed="true"] { background: #58a6ff18; color: #79c0ff; }
.description-toolbar button:focus-visible, .description-toolbar select:focus-visible { outline: 2px solid #58a6ff; outline-offset: 1px; }
.description-toolbar select { flex: 0 0 auto; width: auto; min-height: 32px; margin: 0; padding: 4px 26px 4px 8px; border-color: transparent; border-radius: 5px; background-color: transparent; background-size: 12px; background-position: right 8px center; box-shadow: none; font-size: .76rem; }
.description-toolbar select:hover { background-color: #ffffff0a; }
.description-editor .ql-container { font: inherit; border: 0; }
.description-editor .ql-editor { min-height: 170px; max-height: 360px; overflow-y: auto; padding: 14px; color: var(--text); }
.description-editor .ql-editor:focus-visible { outline: none; }
.description-editor .ql-editor :is(p, li, blockquote) { font-size: inherit; }
.description-editor .ql-editor .ql-code-block-container { padding: 10px; margin-block: 8px; background: #010409; font-family: monospace; }
.description-help { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; margin-top: 7px; }
.description-count { font-size: .77rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.description-warning { color: #f2cc60; }
.description-error { color: #ffb1aa; font-size: .77rem; }
.description-link { padding: 10px; border-bottom: 1px solid var(--border); }
.description-link-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.description-link-actions button { padding: 5px 9px; font-size: .77rem; }
.task-attribution { display: grid; gap: 10px; flex: 1 0 auto; width: max-content; max-width: 100%; min-width: 0; font-size: .76rem; overflow-wrap: anywhere; }
.task-detail { align-items: center; font-size: .85rem; }
.task-detail > p { color: inherit; }
.task-parenthetical { display: inline-block; max-width: 100%; vertical-align: bottom; overflow-wrap: anywhere; }
.task-card-meta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.task-card-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 4px; }
.task-card-footer, .directory-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 20px -24px -24px; padding: 12px 24px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; background: var(--surface-inset); }
.task-card-footer .task-card-actions, .directory-card-footer .directory-actions { margin-left: auto; justify-content: flex-end; }
button.card-footer-button { padding: 8px 12px; font-size: .8rem; }
button.card-action { --action-color: #919ca8; --action-hover: #ffffff0a; --action-border: var(--border); flex: 0 0 40px; width: 40px; height: 40px; padding: 10px; border-radius: 6px; background: var(--control-sheen), transparent; color: var(--action-color); border-color: color-mix(in srgb, currentColor 20%, transparent); }
button.card-action:is(:hover, :focus-visible) { background: var(--control-sheen), var(--action-hover); border-color: var(--action-border); color: var(--action-color); box-shadow: 0 0 16px color-mix(in srgb, var(--action-color) 18%, transparent); }
button.card-action-complete { --action-color: var(--green); --action-hover: #23863626; --action-border: #23863666; }
button.card-action-description { --action-color: #79c0ff; --action-hover: #58a6ff18; --action-border: #58a6ff55; }
button.card-action-edit { --action-color: #f2cc60; --action-hover: #d2992218; --action-border: #d2992255; }
button.card-action-history { --action-color: #d2a8ff; --action-hover: #bc8cff18; --action-border: #bc8cff55; }
button.card-action-reopen { --action-color: #76e3ea; --action-hover: #39c5cf18; --action-border: #39c5cf55; }
button.card-action-archive, button.card-action-delete { --action-color: #ff938a; --action-hover: #f8514918; --action-border: #f8514955; }
/* Keep keyboard-accessible labels within narrow cards. Escape dismisses them
   through CardAction, without removing the button's accessible name. */
button.card-action[data-tooltip] { position: relative; }
button.card-action[data-tooltip]::before { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 10; width: max-content; max-width: min(18rem, calc(100vw - 48px)); padding: 6px 9px; border: 1px solid #3d444d; border-radius: 6px; background: #010409; color: #e6edf3; box-shadow: 0 4px 12px #0005; font-size: .75rem; font-weight: 500; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; pointer-events: none; opacity: 0; visibility: hidden; transform: translateX(-50%); }
button.card-action[data-tooltip]:is(:hover, :focus-visible)::before { opacity: 1; visibility: visible; }
:is(.task-card-actions, .directory-actions) button.card-action:first-child::before { left: 0; transform: none; }
:is(.task-card-actions, .directory-actions, .comment-moderation-actions) button.card-action:last-child::before { left: auto; right: 0; transform: none; }
button.card-action[data-tooltip-hidden]::before { display: none; }
.task-feed-message { padding: 0 24px; }
.task-history > li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.task-history > li:first-child { padding-top: 0; }
.history-timezone { font-size: .78rem; margin-bottom: 20px; }
.history-event { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.history-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; color: #919ca8; }
.history-icon .icon { width: 15px; height: 15px; }
.history-action { font-size: .9rem; }
.history-event-body time { display: block; font-size: .76rem; margin-top: 4px; }
.history-diff { margin: 12px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; }
.history-diff dt { font-weight: 600; margin-top: 10px; }
.history-diff dt:first-child { margin-top: 0; }
.history-diff dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-diff dd > div { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; margin-top: 4px; }
.history-value-label { color: #919ca8; font-size: .76rem; }
.history-diff del { color: #ffa198; text-decoration: none; }
.history-diff ins { color: #7ee787; text-decoration: none; }
@media (max-width: 600px) {
  .task-feed-controls, .directory-controls { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 0; }
  button.mobile-filter-toggle { display: inline-flex; min-height: 44px; margin-bottom: 18px; justify-self: start; padding: 8px 12px; font-size: .8rem; }
  :is(.task-feed-controls, .directory-controls):not(.filters-expanded) > .collapsible-filter { display: none; }
  .directory-controls::after { margin-inline: -18px; }
  .task-card-footer, .directory-card-footer { margin-inline: -18px; margin-bottom: -18px; padding: 12px 18px; }
  .task-attribution { width: 100%; padding-block: 8px; }
  .task-card-meta { flex-direction: column; align-items: stretch; gap: 10px; }
  button.card-action { flex-basis: 44px; width: 44px; height: 44px; }
  .task-card-actions { align-self: flex-start; gap: 2px; }
}

/* Short viewports include phones in landscape and a reduced visual viewport
   while typing. Reserve the available height for the discussion itself. */
@media (max-height: 600px) {
  .modal.comments-modal > article.modal-card { overflow-y: auto; }
  .comments-modal .modal-header { padding: 12px 16px; }
  .comments-modal .modal-header h2 { font-size: 1rem; }
  .comments-modal .modal-header p { margin-top: 4px; font-size: .75rem; }
  .comments-modal .modal-identifier { display: none; }
  .comments-modal .communication-symbol { width: 32px; height: 32px; }
  .comments-modal .discussion-toolbar { padding: 8px 16px; }
  .comments-modal .comments-content { flex: 1 0 144px; }
  .comments-modal .discussion-compose { padding: 8px 16px; }
  .comments-modal .text-composer textarea { min-height: 44px; }
  .comments-modal .composer-help { display: none; }
}

@media (max-height: 450px) and (min-width: 600px) {
  .comments-modal .composer-input { display: flex; align-items: flex-end; }
  .comments-modal .text-composer textarea { flex: 1; min-width: 0; width: auto; max-height: 80px; padding-bottom: 12px; }
  .comments-modal .composer-actions { flex-shrink: 0; flex-wrap: nowrap; padding: 6px 10px; }
  .comments-modal .composer-actions > button { min-height: 44px; }
}

/* Scheduling controls share the task dialog and card foundation. */
.schedule-fields { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-block: 16px; min-width: 0; }
.schedule-fields legend { padding-inline: 6px; font-size: .9rem; font-weight: 600; }
.schedule-fields > .field:last-child { margin-bottom: 0; }
.schedule-interval { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.schedule-preview { border-top: 1px solid var(--border); padding-top: 14px; font-size: .85rem; }
.schedule-preview ul { margin-block: 10px 0; padding-left: 20px; }
.schedule-preview .loading-state { padding: 16px 0; }
.task-series { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; font-size: .8rem; }
.task-series .icon { flex-shrink: 0; width: 16px; height: 16px; }
.page-actions a.page-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .65rem .85rem; border: 1px solid #3d444d; border-radius: .5rem; background: var(--control-sheen), #212830; color: var(--text); box-shadow: inset 0 1px 0 #ffffff08, 0 3px 10px #01040926; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.page-actions a.page-link:is(:hover, :focus-visible) { background: var(--control-sheen), #2a313b; box-shadow: inset 0 1px 0 #ffffff10, 0 0 16px #58a6ff18; text-decoration: none; }
@media (max-width: 380px) {
  .schedule-footer { flex-direction: column; align-items: stretch; }
  .schedule-footer button { width: 100%; }
}
