/* Dockvi visual direction: immersive futuristic UI, built with original CSS graphics. */
:root {
  --app-bg: #0b0e12;
  --sidebar: #100c14;
  --surface: #170f1b;
  --surface-raised: #241525;
  --surface-soft: #302032;
  --surface-hover: #422639;
  --border: #714055;
  --border-soft: #452738;
  --text: #eef4f3;
  --text-secondary: #c8d5d7;
  --text-muted: #9baeb3;
  --accent: #f8ef3b;
  --accent-hover: #fff87d;
  --accent-soft: #3b371c;
  --success: #83d6ae;
  --warning: #edb958;
  --danger: #ff767c;
  --info: #5deaf6;
  --neon-red: #ff465f;
  --neon-red-soft: #ff465f35;
  --hud-font: "Oxanium", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html, body, .app-shell, .workspace { background: var(--app-bg); }
body { font-family: var(--font-body); }
.workspace {
  background-image: linear-gradient(#9bd5e108 1px, transparent 1px),
                    linear-gradient(90deg, #9bd5e108 1px, transparent 1px);
  background-size: 42px 42px;
}
::selection { background: var(--accent); color: #15180d; }
* { scrollbar-color: #48606a transparent; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 3px; }

.sidebar {
  background: linear-gradient(180deg, #10171b 0%, var(--sidebar) 42%);
  border-right: 1px solid #52646a;
  box-shadow: inset -3px 0 #d9cd3a1c;
}
.brandmark { color: var(--text); letter-spacing: .06em; text-transform: uppercase; }
.brandmark strong { color: var(--accent); }
.brandmark-icon, .auth-mark {
  border-radius: 3px;
  color: #10150f;
  background: var(--accent);
  box-shadow: 4px 4px 0 #64838b;
}
.accent-dot, .auth-mark span { color: #274749; }
.sidebar-label, .nav-group summary { letter-spacing: .09em; }
.sidebar-label, .nav-group summary > span { color: var(--info); }
.nav-group, .pinned-nav, .sidebar-bottom { border-color: var(--border-soft); }
.nav-group summary { border-radius: 2px; }
.nav-group summary:hover { background: #1b272c; }
.nav button { border-radius: 2px; color: var(--text-secondary); }
.nav button:hover { background: #27343b; }
.nav button.active, .nav button[aria-current=page] {
  color: var(--accent);
  background: linear-gradient(90deg, #394029, #1b2529 78%);
  box-shadow: inset 0 0 0 1px #b2ad4673;
}
.nav button.active:before, .nav button[aria-current=page]:before {
  border-radius: 0;
  background: var(--accent);
}
.online-dot { background: var(--success); box-shadow: 0 0 0 3px #83d6ae20; }

.topbar {
  background: #10171c;
  border-bottom: 1px solid #50606a;
  box-shadow: 0 4px 0 #d5c93c10;
}
.topbar-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.topbar-path strong { color: var(--accent); }
main { position: relative; }
.page-head { border-bottom: 1px solid var(--border); padding-bottom: 19px; }
.page-head h1 { text-transform: uppercase; letter-spacing: .035em; }
.page-head p { color: var(--text-secondary); }
.eyebrow, .brand-tag, .hero-kicker { color: var(--info); letter-spacing: .16em; }
.section-title { text-transform: uppercase; letter-spacing: .06em; }

.button, .chip, .pill, .stat-card, .panel, .item-card, .table-wrap,
select, input, textarea, dialog, .calendar-grid, .calendar-day,
.row-mark, .day-kind { border-radius: 3px; }
.button { background: var(--accent); color: #171b12; font-weight: 800; }
.button:hover { background: var(--accent-hover); color: #171b12; }
.button.subtle { background: var(--surface-soft); color: var(--text); border: 1px solid var(--border); }
.button.subtle:hover { background: var(--surface-hover); color: var(--accent); border-color: var(--accent); }
.button.ghost { color: var(--info); }
.button.ghost:hover { color: #c5faff; }
.button.danger { background: #4a272c; color: #ffc4c5; border-color: #9a4d55; }
.quick-inbox { background: var(--accent); color: #171b12; }
.quick-inbox:hover { background: var(--accent-hover); }
.icon-button:hover { border-radius: 3px; }
.chip { background: var(--surface); border-color: var(--border); }
.chip.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
select, input, textarea { background: #10171c; border: 1px solid var(--border); }
select:hover, input:hover, textarea:hover { border-color: var(--info); }
select:focus, input:focus, textarea:focus { border-color: var(--accent); outline: 2px solid #f0e34b55; }
input::placeholder, textarea::placeholder { color: #93a8ac; }

.stat-card, .panel, .item-card, .table-wrap {
  background: linear-gradient(145deg, #192128, var(--surface) 72%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px #d0eeeb0d, 0 7px 20px #0003;
}
.stat-card { border-top: 2px solid #718a8e; }
.stat-number { color: var(--accent); }
.stat-detail, .stat-label { color: var(--text-muted); }
.panel-head { border-bottom: 1px solid var(--border-soft); padding-bottom: 10px; }
.panel-head h2 { text-transform: uppercase; letter-spacing: .05em; }
.item-card:hover { border-color: #6f878d; }
.row-mark, .day-kind { background: #21343b; color: var(--info); }
.pill { border: 1px solid #658d79; background: #20352d; color: #a5e5c2; }
.pill.idea { background: #3f3420; border-color: #9e8148; color: #f5cb78; }
.pill.progress { background: #1c3840; border-color: #498692; color: #9de9f2; }
.pill.ready { background: #20362b; border-color: #538b6c; color: #a5e5c2; }
.pill.published { background: #293037; border-color: #5d6871; color: #d1dbdd; }
.empty strong { color: var(--text); }

.hero {
  background: linear-gradient(115deg, #253238, #111b22 60%, #3b3a22);
  border: 1px solid #6e7870;
  border-left: 4px solid var(--accent);
  border-radius: 3px;
}
.hero h2 { text-transform: uppercase; letter-spacing: .03em; }
.hero p { color: var(--text-secondary); }
.hero-art:before { background: #344c52; border-radius: 3px; }
.hero-art:after { background: #d8cc46; border-radius: 3px; }
.hero-orbit { border-color: #70a6ad; }
.today-stats .stat-card:nth-child(2) { border-top-color: var(--danger); }
.today-stats .stat-card:nth-child(4) { border-top-color: var(--info); }
.today-stats .stat-card:nth-child(5) { border-top-color: var(--success); }
.day-alert.neutral { background: #1d3038; border-color: #4a7d87; color: #c2e9ec; }
.day-alert.danger { background: #40262c; border-color: #a65b60; color: #ffd1d0; }
.assistant-suggestion-icon { border-radius: 2px; }
.assistant-suggestion h3 { color: var(--text); }

.data-table th, .catalog-heading { background: #101a20 !important; color: var(--info) !important; }
.data-table td { border-color: var(--border-soft); }
.data-table tbody tr:hover, .mail-row:hover, .mail-row.selected { background: #26333a; }
.calendar-weekday { background: #1e3037; color: var(--info); }
.calendar-day { background: #172127; }
.calendar-day.muted { background: #10181d; }
.calendar-day.today .calendar-num { background: var(--accent); color: #161912; }
.calendar-post { background: #214048; border-left-color: var(--info); color: #d4f6f5; }
.calendar-post:hover { background: #2d555e; }
.task-check { border-radius: 2px; }
.task-check:hover { border-color: var(--accent); }
.task-priority.high { color: #ffd58d; }
.task-priority.urgent, .danger-text, .task-overdue { color: #ff9296 !important; }
.mail-task { border-radius: 3px; }
.mail-row.selected { box-shadow: inset 3px 0 var(--accent); }

.dialog, dialog { background: var(--surface); border-color: var(--border); border-radius: 3px; }
.modal-head, .modal-actions { border-color: var(--border); }
.auth-dialog .eyebrow { color: var(--info); }
.brief-box { background: #10191e; border-color: var(--border); border-radius: 3px; }
#toast { background: #233238; border-color: #6a9898; color: var(--text); border-radius: 3px; }
#toast.error { background: #542b31; border-color: #ab5d63; }


/* Atmosphere stays behind the content; no scanlines over text. */
.cyber-atmosphere {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at 90% 0%, #5a102852, transparent 58%),
    radial-gradient(ellipse at 15% 90%, #04495c40, transparent 55%), #0b0e12;
}
.cyber-atmosphere::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(#ff465f0c 1px, transparent 1px), linear-gradient(90deg, #ff465f0c 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(transparent, #000 65%);
}
.cyber-atmosphere::after {
  content: ''; position: absolute; width: 80vw; height: 60vh; right: -10vw; bottom: -32vh;
  border: 1px solid #5deaf62e; transform: rotate(-24deg);
  box-shadow: 0 0 0 50px #5deaf607, 0 0 0 100px #5deaf605;
}
.cyber-atmosphere i { position: absolute; width: 1px; height: 30vh; background: linear-gradient(transparent, #ff465f80, transparent); top: -30vh; animation: circuit-fall 16s linear infinite; }
.cyber-atmosphere i:nth-child(1) { left: 34%; }
.cyber-atmosphere i:nth-child(2) { left: 76%; animation-delay: -7s; background: linear-gradient(transparent, #5deaf665, transparent); }
.cyber-atmosphere i:nth-child(3) { left: 95%; animation-delay: -12s; }
.app-shell { position: relative; background: transparent; }
.workspace { background: transparent; }
main { max-width: 1540px; padding-top: 30px; }

/* Navigation: high-contrast active rails and compact technical labels. */
.sidebar { background: linear-gradient(155deg, #261021, #100c14 38%); border-right: 1px solid var(--neon-red); box-shadow: 3px 0 0 #ff465f18, 14px 0 60px #0004; }
.brandmark { gap: 12px; padding: 4px 4px 28px; position: relative; }
.brandmark::after { content: ''; position: absolute; bottom: 13px; left: 5px; right: 5px; height: 3px; background: repeating-linear-gradient(120deg, var(--neon-red) 0 6px, transparent 6px 10px); }
.brandmark strong { color: var(--accent); font: 900 22px/1.1 var(--font-display); letter-spacing: -.06em; font-style: italic; }
.brandmark small { font: 16px/2 var(--hud-font); letter-spacing: .11em; color: #ff8797; }
.brandmark-icon { width: 42px; height: 48px; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%); box-shadow: none; font-style: italic; }
.nav-group { border-color: #ff465f23; padding-block: 5px; }
.nav-group summary { font: 700 16px/1.4 var(--hud-font); text-transform: uppercase; color: #d8aab8; letter-spacing: .12em; }
.nav-group summary > span, .nav-group summary:after { color: var(--neon-red); }
.nav-group summary:hover { background: #ff465f15; color: var(--text); }
.nav-group > div { padding-left: 0; }
.nav-group > div button { padding: 10px 12px; }
.nav button { border-radius: 0; transition: background .18s, color .18s, transform .18s; }
.nav button:hover { background: #5deaf617; color: var(--info); transform: translateX(3px); }
.nav button.active, .nav button[aria-current=page] { background: var(--accent); color: #141209; box-shadow: 4px 4px 0 #ff465f5c; font-weight: 900; }
.nav button.active:before, .nav button[aria-current=page]:before { left: -8px; top: 0; bottom: 0; width: 3px; }
.nav button.active::after { content: ''; position: absolute; right: 0; top: 0; border-top: 8px solid #100c14; border-left: 8px solid transparent; }
.sidebar-bottom { font: 16px/1.9 var(--hud-font); border-top-color: #ff465f55; }
.sidebar-bottom small { color: #bc7a90; }
.online-dot { animation: signal-breathe 4s ease-in-out infinite; }
.topbar { background: #130e18f2; border-bottom: 1px solid var(--neon-red); box-shadow: 0 3px 0 #ff465f18; padding-inline: 28px; gap: 16px; }
.topbar-path { white-space: nowrap; font-size: 16px; flex-shrink: 0; }
.topbar-path strong { color: var(--info); }
.topbar-actions { min-width: 0; gap: 8px; }
.global-search { border-radius: 0; border-color: #733448; background: #100d17; }
.motion-toggle { display: flex; align-items: center; gap: 6px; font-family: var(--hud-font); font-size: 16px; }
.button.motion-toggle[aria-pressed=true] { border-color: #5deaf666; color: var(--info); }
.button.motion-toggle:disabled { opacity: .65; cursor: default; }

/* Page headings and tactile controls. */
.page-head { position: relative; border-bottom: 1px solid #ff465f6b; padding-bottom: 22px; margin-bottom: 25px; }
.page-head::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 72px; height: 5px; background: var(--neon-red); box-shadow: 0 0 18px #ff465f66; }
.page-head h1 { font: 900 clamp(28px, 3.4vw, 48px)/1.1 var(--font-display); letter-spacing: -.035em; font-style: italic; text-shadow: 2px 2px 0 #ff465f4d; }
.eyebrow, .brand-tag, .section-title { font-family: var(--hud-font); }
.eyebrow { font-size: 16px; color: var(--neon-red); }
.page-head p { color: #bfaaba; line-height: 1.6; }
.button, .chip { position: relative; border-radius: 0; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.button { letter-spacing: .02em; box-shadow: 3px 3px 0 #ff465f5c; }
.button:not(.ghost):not(.subtle):not(.danger) { background: linear-gradient(135deg, transparent 6px, var(--accent) 6px); }
.button:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 #ff465f70, 0 0 23px #f8ef3b20; }
.button:active { transform: translateY(1px); box-shadow: none; }
.button:disabled { transform: none; box-shadow: none; cursor: wait; }
.button.subtle { background: #201526; border-color: #9c465a; color: #ffb7c6; box-shadow: none; }
.button.subtle:hover { background: #3e182e; border-color: var(--neon-red); color: var(--text); box-shadow: 0 0 18px #ff465f26; }
.button.ghost { box-shadow: none; }
.button.ghost:hover { background: #5deaf610; box-shadow: none; }
.button.danger { color: #ffd0d6; background: #6c1f36; box-shadow: none; }
.button:focus-visible, .chip:focus-visible { outline-offset: 4px; }
.chip.active { background: #5deaf619; color: var(--info); border-color: var(--info); box-shadow: inset 0 -2px var(--info); }
select, input, textarea { border-radius: 0; background: #110e19; border-color: #674057; caret-color: var(--accent); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 14px #5deaf613; border-color: var(--info); }
.field label, .form-subhead, .mail-toolbar label { font-family: var(--hud-font); }
input[type=checkbox] { accent-color: var(--accent); }

/* HUD surfaces: corner brackets without clipping form controls or focus rings. */
.panel, .item-card, .stat-card, .table-wrap, .weather-widget {
  border-radius: 0;
  border-color: #723046;
  background-color: #170f1b;
  background-image: linear-gradient(var(--neon-red), var(--neon-red)),
    linear-gradient(var(--neon-red), var(--neon-red)),
    linear-gradient(var(--info), var(--info)),
    linear-gradient(135deg, #271427, #14121d 80%);
  background-size: 20px 2px, 2px 20px, 22px 2px, 100% 100%;
  background-position: top left, top left, bottom right, center;
  background-repeat: no-repeat;
  box-shadow: 4px 4px 0 #ff465f0c, 0 12px 35px #0004;
}
.panel-head { border-color: #ff465f38; padding-bottom: 13px; }
.panel-head h2 { color: #ff90a4; font: 700 16px/1.5 var(--hud-font); letter-spacing: .1em; }
.item-card { transition: border-color .2s, transform .2s, box-shadow .2s; }
.item-card:hover { transform: translateY(-3px); border-color: var(--neon-red); box-shadow: 0 7px 28px #ff465f20; }
.row-mark, .day-kind { background: #5deaf616; color: var(--info); border: 1px solid #5deaf640; border-radius: 0; }
.row-sub, .meta, .search-note { line-height: 1.5; }
.task-check { color: var(--info) !important; background: #14212a; border-color: #40707c; }
.day-row.overdue .day-kind { background: #ff465f17; color: #ff92a5; }
.priority-row > span { color: var(--accent); font: 900 25px/1 var(--hud-font); background: transparent; }
.pill, .task-priority, .drone-status { border-radius: 0; font-family: var(--hud-font); }
.mail-settings > summary { font-family: var(--hud-font); font-size: 16px; color: var(--info); }
.mail-row { transition: background .2s, box-shadow .2s; }
.mail-row:hover { background: #5deaf60c; box-shadow: inset 2px 0 var(--info); }
.mail-row.selected { background: #ff465f12; box-shadow: inset 4px 0 var(--neon-red); }
.mail-row small, .mail-conversation small { color: var(--text-muted); }
.mail-toolbar label { display: grid; gap: 7px; min-width: 0; }
.mail-toolbar input, .mail-toolbar select { width: 100%; min-width: 0; }
.mail-task { background: #5deaf60c; border-color: #5deaf652; border-radius: 0; }
.mail-settings .form-grid label { display: grid; gap: 6px; min-width: 0; }
.mail-settings .form-grid input, .mail-settings .form-grid select { width: 100%; min-width: 0; }
.mail-accounts article h3 { color: var(--accent); }
.mail-accounts article p { overflow-wrap: anywhere; }
.data-table th, .catalog-heading { background: #211221 !important; color: #ff819a !important; font-family: var(--hud-font); }
.data-table tbody tr:hover { background: #ff465f10; }
.tag-list span, .note-card { border-color: #5deaf670; }
.tag-list span { background: #5deaf614; color: var(--info); }
.calendar-weekday { background: #281729; color: #f99aaf; font-family: var(--hud-font); }
.calendar-day { background: #17121d; }
.calendar-day.muted { background: #100e16; }
.calendar-entry, .calendar-post { border-radius: 0; }
.crm-avatar { border-radius: 0; background: linear-gradient(135deg, #ff465f, #732950); color: #fff; }
.crm-welcome-icon, .crm-context small, .automation-builder > div > span, .automation-sentence > span { color: var(--info); }
.drone-profile.active { border-color: var(--info); box-shadow: inset 0 3px var(--info); }
.weather-widget { border-color: #385966; }
.weather-widget summary strong { color: var(--info); font: 700 16px/1.5 var(--hud-font); text-transform: uppercase; }
.weather-card { background: #101b25; border: 1px solid #385965; border-radius: 0; }
.weather-card-head strong { color: var(--info); text-shadow: 0 0 18px #5deaf633; }
.weather-sun span:last-child { color: #97d9e4; }
.day-alert, .weather-warning { border-radius: 0; border-left: 3px solid var(--neon-red); }
.drone-brief { border-left: 3px solid var(--info); }
.dialog, dialog { border-radius: 0; border: 1px solid var(--neon-red); box-shadow: 8px 8px 0 #ff465f30, 0 0 90px #ff465f1c; }
.modal-head { background: #291423; border-bottom-color: var(--neon-red); }
.modal-head h2 { font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.auth-dialog { background: linear-gradient(140deg, #311329, #110f19); }
.auth-mark { display: flex; justify-content: center; border-radius: 0; }
#toast { border-left: 5px solid var(--info); background: #102b35; box-shadow: 0 0 30px #5deaf625; }
#toast.error { border-left-color: var(--neon-red); }

/* The briefing becomes an actual command screen, using the user's real data. */
.command-hero {
  position: relative; display: grid; grid-template-columns: 1.3fr 1fr; isolation: isolate;
  min-height: 340px; padding: 30px 34px 50px; margin-bottom: 22px;
  border: 1px solid #b12d51; border-top: 4px solid var(--neon-red);
  background: radial-gradient(ellipse at 85% 55%, #67224688, transparent 65%),
    repeating-linear-gradient(90deg, transparent 0 47px, #ff465f07 47px 48px), #1b0e1d;
  box-shadow: 8px 8px 0 #ff465f13, 0 0 70px #ff465f0e;
}
.command-hero::before { content: ''; position: absolute; width: 48px; height: 3px; top: -4px; right: -1px; background: var(--accent); }
.command-hero::after { content: ''; position: absolute; top: 25px; bottom: 58px; right: 11px; width: 4px; background: repeating-linear-gradient(var(--neon-red) 0 3px, transparent 3px 9px); opacity: .5; }
.command-copy { position: relative; z-index: 1; align-self: center; min-width: 0; }
.command-kicker { display: flex; gap: 20px; color: #ff8199; font: 16px/1.5 var(--hud-font); letter-spacing: .15em; }
.command-kicker span:first-child { color: var(--info); }
.command-greeting { font-size: 16px; color: #d7bacd; margin: 22px 0 7px; }
.command-hero h1 { font: italic 950 clamp(35px, 4.8vw, 66px)/.99 var(--font-display); text-transform: uppercase; letter-spacing: -.065em; margin: 0; color: var(--text); }
.command-line { display: block; }
.command-hero h1 .command-accent { color: var(--accent); text-shadow: 3px 3px 0 #e31c565e; }
.command-date { font: 16px/1.6 var(--hud-font); color: #c0a4b8; margin: 16px 0 20px; }
.command-actions { display: flex; gap: 13px; flex-wrap: wrap; }
.command-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 20px; border-top: 1px solid #ff465f50; background: #ff465f0d; color: #c38b9e; font: 16px/1.4 var(--hud-font); letter-spacing: .08em; }
.command-footer button { border: 0; color: var(--info); background: none; padding: 7px 0; font: inherit; cursor: pointer; }
.command-footer button:hover { color: var(--accent); }
.command-clock { display: grid; gap: 4px; text-align: center; }
.command-clock span { color: #b48da6; font: 16px var(--hud-font); letter-spacing: .2em; }
.command-clock time { color: var(--info); font: 18px var(--hud-font); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.today-stats { gap: 12px; }
.today-stats .stat-card { border-top: 0; position: relative; padding: 17px; }
.stat-label { font: 16px/1.4 var(--hud-font); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 9px; }
.stat-number { font: 700 35px/1 var(--hud-font); }
.stat-detail { font-size: 16px; margin-top: 8px; }
.today-stats .stat-card:nth-child(2) .stat-number { color: #ff7e97; }
.today-stats .stat-card:nth-child(4) .stat-number { color: var(--info); }
.today-stats .stat-card:nth-child(5) .stat-number { color: var(--success); }
.day-columns { align-items: start; }
.day-columns > .panel { min-width: 0; }
.day-empty { margin-bottom: 20px; }
.day-empty h2 { color: var(--accent); }
.assistant-panel { margin-top: 24px; }
.assistant-panel .eyebrow { color: #bfa4b9; }
.assistant-settings { border-top-color: #ff465f30; }

@keyframes circuit-fall { to { transform: translateY(160vh); } }
@keyframes signal-breathe { 0%, 100% { box-shadow: 0 0 0 3px #83d6ae15; } 50% { box-shadow: 0 0 0 5px #83d6ae28, 0 0 12px #83d6ae55; } }

@media (max-width: 1600px) {
  .topbar #backup-button { display: none; }
}
@media (max-width: 1400px) {
  .topbar-path { display: none; }
  .topbar-actions { margin-left: auto; }
}
@media (max-width: 1180px) {
  .topbar { padding-inline: 22px; }
  .motion-label { display: none; }
  .command-hero { padding: 26px 24px 52px; }
}
@media (max-width: 1000px) {
  .topbar { height: auto; min-height: 75px; padding-block: 12px; }
  .topbar-actions { flex-wrap: wrap; width: 100%; }
  .global-search { order: 10; flex: 1 0 100%; }
  .global-search input { width: 100%; }
}
@media (max-width: 900px) {
  .command-hero { grid-template-columns: 1.45fr 1fr; }
  .command-hero h1 { font-size: 39px; }
  .command-kicker { flex-wrap: wrap; gap: 5px 15px; }
  .mail-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  main { padding-top: 22px; }
  .topbar { padding-inline: 12px; }
  .topbar-actions { width: calc(100% - 46px); }
  .sidebar { box-shadow: 8px 0 50px #000c; }
  .page-head h1 { font-size: 34px; }
  .stats { gap: 9px; }
  .quick-inbox { font-size: 0; }
  .quick-inbox::after { content: '＋ Inbox'; font-size: 16px; }
  .motion-toggle { padding: 9px; }
  .command-hero { grid-template-columns: 1fr; padding: 22px 20px 50px; min-height: 0; }
  .command-copy { max-width: 100%; }
  .command-hero h1 { font-size: clamp(42px, 12vw, 60px); }
  .command-clock { display: none; }
  .command-kicker { max-width: calc(100% - 85px); min-height: 45px; align-content: start; font-size: 16px; }
  .command-greeting { margin-top: 12px; }
  .command-actions { gap: 9px; }
  .command-actions .button { flex: 1; padding-inline: 10px; font-size: 16px; }
  .command-footer { padding-inline: 12px; font-size: 16px; }
  .command-footer > span { max-width: 60%; }
  .command-footer button { white-space: nowrap; }
  .today-stats .stat-card { padding: 14px; }
  .stat-number { font-size: 30px; }
  .panel-head h2 { font-size: 16px; }
  .mail-accounts { grid-template-columns: 1fr; }
  .mail-settings { padding: 15px; }
  .mail-accounts article { min-width: 0; padding: 12px; }
  .mail-rename input { width: 100%; min-width: 0; }
}
/* Kinetic layer: ambient circuits, luminous rails and reactive surfaces. */
#cyber-field { position: absolute; inset: 0; width: 100%; height: 100%; }
.cyber-atmosphere::before { animation: field-drift 28s ease-in-out infinite alternate; }
.cyber-atmosphere i { width: 2px; height: 42vh; animation-duration: 10s; box-shadow: 0 0 14px #ff465f55; }
.cyber-atmosphere i:nth-child(2) { animation-duration: 13s; }
.cyber-atmosphere i:nth-child(3) { animation-duration: 17s; }
.topbar { position: relative; }
.view-sweep { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; opacity: 0; transform-origin: left; background: linear-gradient(90deg, var(--neon-red), var(--accent), var(--info)); box-shadow: 0 0 16px var(--neon-red); }
.brandmark::after { background-size: 23px 100%; animation: rail-flow 2s linear infinite; }
.nav button { position: relative; }
.nav button.active { background-image: linear-gradient(110deg, transparent 25%, #fff9 45%, transparent 65%); background-size: 250% 100%; animation: nav-sheen 7s ease-in-out infinite; }
.nav button .nav-icon { transition: transform .35s cubic-bezier(.2,1,.3,1); }
.nav button:hover .nav-icon { transform: rotate(-10deg) scale(1.2); }
.page-head::after { width: 110px; transform-origin: left; animation: heading-rail 6s ease-in-out infinite; }
.button:not(.ghost):not(.subtle):not(.danger):hover { background-image: linear-gradient(110deg, transparent 6px, #fff785 7px, var(--accent) 55%, #fff785); background-size: 200% 100%; animation: action-sheen 1.8s ease-in-out infinite; }
.click-pulse { position: absolute; inset: -4px; border: 1px solid var(--info); pointer-events: none; box-shadow: 0 0 14px #5deaf650; }
.motion-surface { position: relative; isolation: isolate; }
.motion-spotlight { position: absolute; inset: 1px; z-index: -1; pointer-events: none; opacity: 0; background: radial-gradient(330px circle at var(--light-x, 50%) var(--light-y, 50%), #5deaf62a, transparent 70%); transition: opacity .35s; }
.pointer-active > .motion-spotlight, .motion-surface:focus-within > .motion-spotlight { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .motion-surface:hover > .motion-spotlight { opacity: 1; }
}
.stat-card { transition: border-color .3s, box-shadow .3s; }
.stat-card.pointer-active { border-color: var(--info); box-shadow: 0 0 24px #5deaf620, inset 0 -2px var(--info); }
.stat-number { transition: text-shadow .3s; }
.pointer-active .stat-number { text-shadow: 0 0 24px currentColor; }
.item-card.pointer-active { border-color: var(--info); }
.command-energy { position: absolute; inset: -2px; pointer-events: none; }
.command-energy > i { position: absolute; overflow: hidden; }
.command-energy > i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 25%, var(--neon-red) 43%, var(--accent) 50%, transparent 70%); animation: edge-horizontal 4.5s linear infinite; }
.command-energy > i:nth-child(1) { top: 0; left: 0; right: 0; height: 2px; }
.command-energy > i:nth-child(2) { top: 0; bottom: 0; right: 0; width: 2px; }
.command-energy > i:nth-child(3) { bottom: 0; left: 0; right: 0; height: 2px; }
.command-energy > i:nth-child(4) { top: 0; bottom: 0; left: 0; width: 2px; }
.command-energy > i:nth-child(2n)::after { background: linear-gradient(transparent 25%, var(--info) 50%, transparent 75%); animation-name: edge-vertical; animation-delay: -1.5s; }
.command-energy > i:nth-child(3)::after { animation-direction: reverse; animation-delay: -2s; }
.command-energy > i:nth-child(4)::after { animation-direction: reverse; }
.command-hero::after { animation: rail-flow 2s linear infinite; background-size: 4px 9px; }
.command-line { animation: chromatic-shift 9s linear infinite; }
.command-line.command-accent { animation-delay: -.18s; }
dialog[open] { animation: dialog-materialize .35s cubic-bezier(.16,1,.3,1); }
dialog[open]::backdrop { animation: backdrop-materialize .3s ease-out; }

@keyframes field-drift { to { transform: translate3d(-24px, 18px, 0); } }
@keyframes rail-flow { to { background-position: 23px 9px; } }
@keyframes nav-sheen { 0%, 65% { background-position: 160% 0; } 100% { background-position: -120% 0; } }
@keyframes heading-rail { 0%, 100% { transform: scaleX(.65); } 50% { transform: scaleX(1.35); } }
@keyframes action-sheen { to { background-position: 200% 0; } }
@keyframes edge-horizontal { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes edge-vertical { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
/* One short chromatic displacement, without blinking or hiding the text. */
@keyframes chromatic-shift { 0%, 2%, 5%, 100% { text-shadow: 3px 3px 0 #e31c565e; } 3% { text-shadow: -3px 0 #5deaf6, 3px 0 #ff465f; transform: skewX(-2deg); } 4% { text-shadow: 2px 0 #5deaf6, -2px 0 #ff465f; transform: skewX(1deg); } }
@keyframes hologram-grid { to { background-position: 0 48px, 0 48px; } }
@keyframes dialog-materialize { from { opacity: .2; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes backdrop-materialize { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .motion-toggle { min-width: 38px; min-height: 38px; justify-content: center; }
}
html[data-motion=off] .motion-spotlight, html[data-motion=off] .command-energy,
html[data-motion=off] #cyber-field { display: none; }
html[data-motion=off] *, html[data-motion=off] *::before, html[data-motion=off] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
.page-hidden *, .page-hidden *::before, .page-hidden *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Display faces have no italic master; keep the OS wordmark's intentional slant. */
.brandmark strong, .page-head h1, .command-hero h1, .os-brand strong, .os-brand > span, .holo-glyph { font-synthesis: style; }

/* Compact, labelled priority changes directly in the task list. */
.task-priority-control { display: grid; gap: 4px; flex: 0 1 130px; min-width: 110px; max-width: 100%; }
.task-priority-control > span { font: 700 16px/1.4 var(--hud-font); color: var(--text-muted); }
.task-priority-control select { width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px; font-size: 16px; }
.task-priority-control.high select { color: #ffd58d; border-color: #ffd58d70; }
.task-priority-control.urgent select { color: #ff9296; border-color: #ff929670; }
.task-priority-control small { font-size: 16px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .task-priority-control { flex-basis: 140px; } }

.note-task-action { display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.note-task-action .button { white-space: normal; text-align: left; }
.note-task-action small { color: var(--text-muted); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.note-card .card-actions { align-items: start; }

/* Leave text entry without submitting or dismissing the editor. */
.editor-head-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; max-width: 100%; }
.editor-hide-keyboard { display: none; min-height: 44px; white-space: normal; }
@media (max-width: 760px), (pointer: coarse) { .editor-hide-keyboard { display: inline-flex; } }
@media (max-width: 600px) {
  #editor .modal-head { flex-wrap: wrap; gap: 10px; }
  #editor .modal-head > div:first-child { flex-basis: 100%; min-width: 0; }
  .editor-head-controls { width: 100%; justify-content: space-between; }
  .editor-head-controls .modal-close { min-width: 44px; min-height: 44px; }
}

.feedback-form { display: grid; gap: 14px; }
.feedback-form label { display: grid; gap: 7px; }
.feedback-form input:not([type=checkbox]), .feedback-form select, .feedback-form textarea { width: 100%; min-width: 0; }
.feedback-form .check-row { display: flex; align-items: flex-start; }
.feedback-row { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.feedback-row p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.feedback-row small { color: var(--text-muted); }
.feedback-row .button { justify-self: start; white-space: normal; }

/* Calm presentation preserves status, navigation and clocks while removing decoration. */
html[data-intensity=calm] #cyber-field,
html[data-intensity=calm] .cyber-atmosphere i,
html[data-intensity=calm] .holo-art,
html[data-intensity=calm] .motion-spotlight,
html[data-intensity=calm] .command-energy,
html[data-intensity=off] .holo-art,
html[data-intensity=off] .cyber-atmosphere i { display: none; }
html[data-intensity=calm] *, html[data-intensity=calm] *::before, html[data-intensity=calm] *::after {
  animation: none !important; transition-duration: .12s !important; scroll-behavior: auto !important;
}
html[data-intensity=calm] .nav button:hover .nav-icon { transform: none; }
.presentation-profiles { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.presentation-profiles legend { margin-bottom: 10px; color: var(--text-secondary); font-size: 16px; }
.presentation-profiles label { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px; border: 1px solid var(--border-soft); cursor: pointer; }
.presentation-profiles label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.presentation-profiles input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--accent); }
.presentation-profiles span { display: grid; gap: 5px; min-width: 0; }
.presentation-profiles small { color: var(--text-secondary); font-size: 16px; line-height: 1.5; }

html[data-intensity=calm] .holo-compact .holo-stage,
html[data-intensity=off] .holo-compact .holo-stage { display: none; }
html[data-intensity=calm] .weather-command .holo-compact,
html[data-intensity=off] .weather-command .holo-compact { height: auto; min-height: 44px; }
html[data-intensity=calm] .holo-compact .command-clock,
html[data-intensity=off] .holo-compact .command-clock { position: static; }
