/* EventiFocus — glass UI. White by default, black follows the device (or the user's choice). */
:root {
  --page: #E8EFFA; --glass: rgba(255,255,255,.42); --card: rgba(255,255,255,.62); --solid: #FFFFFF;
  --text: #0B1F4B; --muted: #55667F; --line: rgba(255,255,255,.85); --divider: #E1E8F3;
  --primary: #1D5FD1; --primary-ink: #1D5FD1; --on-primary: #FFFFFF;
  --nav-on: #0B1F4B; --nav-on-text: #FFFFFF; --pill: rgba(255,255,255,.72); --field: rgba(255,255,255,.85);
  --t1: #D9E8FE; --t2: #E5E4FF; --t3: #FCE6C4; --t4: #D5F0F5; --tint-text: #0B1F4B;
  --done: #1D5FD1; --prog: #8DC0F8; --backlog: #E9A93B; --track: #E6EDF7; --warn: #B4541A;
  --ok-bg: #DDF3E6; --ok-text: #17603A; --err-bg: #FDE2DE; --err-text: #9B2C1F; --info-bg: #D9E8FE;
  --shadow: 0 10px 34px rgba(11,31,75,.08);
  --b1: #9CC8FA; --b2: #CFCBFF; --b3: #FCE1B4;
  --radius: 26px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #03060D; --glass: rgba(12,18,32,.55); --card: rgba(20,28,46,.6); --solid: #111827;
  --text: #F2F5FA; --muted: #9DAAC0; --line: rgba(255,255,255,.09); --divider: #1E293D;
  --primary: #2563EB; --primary-ink: #7FB2FF; --on-primary: #FFFFFF;
  --nav-on: #F2F5FA; --nav-on-text: #0B1F4B; --pill: rgba(255,255,255,.07); --field: rgba(255,255,255,.05);
  --t1: #173363; --t2: #2A2B66; --t3: #4A3613; --t4: #10404A; --tint-text: #F2F5FA;
  --done: #4C8DF6; --prog: #A9CDFB; --backlog: #E9A93B; --track: #1E293D; --warn: #F2B263;
  --ok-bg: #12371F; --ok-text: #9BE3B5; --err-bg: #3F1A16; --err-text: #F7B4A8; --info-bg: #173363;
  --shadow: 0 10px 34px rgba(0,0,0,.35);
  --b1: rgba(37,99,235,.35); --b2: rgba(110,106,232,.28); --b3: rgba(233,169,59,.14);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --page: #03060D; --glass: rgba(12,18,32,.55); --card: rgba(20,28,46,.6); --solid: #111827;
    --text: #F2F5FA; --muted: #9DAAC0; --line: rgba(255,255,255,.09); --divider: #1E293D;
    --primary: #2563EB; --primary-ink: #7FB2FF; --on-primary: #FFFFFF;
    --nav-on: #F2F5FA; --nav-on-text: #0B1F4B; --pill: rgba(255,255,255,.07); --field: rgba(255,255,255,.05);
    --t1: #173363; --t2: #2A2B66; --t3: #4A3613; --t4: #10404A; --tint-text: #F2F5FA;
    --done: #4C8DF6; --prog: #A9CDFB; --backlog: #E9A93B; --track: #1E293D; --warn: #F2B263;
    --ok-bg: #12371F; --ok-text: #9BE3B5; --err-bg: #3F1A16; --err-text: #F7B4A8; --info-bg: #173363;
    --shadow: 0 10px 34px rgba(0,0,0,.35);
    --b1: rgba(37,99,235,.35); --b2: rgba(110,106,232,.28); --b3: rgba(233,169,59,.14);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--page); color: var(--text); font: 15px/1.5 'Plus Jakarta Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--solid); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--prog); outline-offset: 2px; }

/* Background glows behind the glass */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs span { position: absolute; border-radius: 999px; filter: blur(90px); }
.blobs .b1 { width: 540px; height: 540px; left: -140px; top: -160px; background: var(--b1); }
.blobs .b2 { width: 480px; height: 480px; right: -120px; top: 30%; background: var(--b2); }
.blobs .b3 { width: 440px; height: 440px; left: 36%; bottom: -180px; background: var(--b3); filter: blur(100px); }

.glass, .card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card { background: var(--solid); }
}

.wrap { max-width: 1400px; margin: 0 auto; padding: 20px 18px 30px; display: flex; flex-direction: column; gap: 20px; }
main { display: flex; flex-direction: column; gap: 20px; }

/* Top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand img { height: 40px; width: auto; display: block; }
.logo-on-dark { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
:root[data-theme="dark"] .logo-on-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .logo-on-dark { display: block !important; }
  :root[data-theme="auto"] .logo-on-light { display: none !important; }
}
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; }
.mainnav a { padding: 10px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.mainnav a:hover { background: var(--pill); color: var(--text); }
.mainnav a.active { background: var(--nav-on); color: var(--nav-on-text); }
.topright { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topright form { margin: 0; }
.wsname { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.wsswitch select { height: 40px; }
.me { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; padding: 0 4px; }
.me span { display: flex; flex-direction: column; line-height: 1.15; }
.me strong { font-size: 14px; }
.me small { font-size: 12px; color: var(--muted); }
.iconbtn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn:hover { background: var(--card); }

/* Avatars */
.avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 2px solid var(--solid); }
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.av0 { background: #1D5FD1; color: #fff; } .av1 { background: #E9A93B; color: #0B1F4B; } .av2 { background: #0B1F4B; color: #fff; }
.av3 { background: #8DC0F8; color: #0B1F4B; } .av4 { background: #6E6AE8; color: #fff; }
.stack { display: flex; } .stack .avatar { margin-right: -8px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--card); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--err-bg); color: var(--err-text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form h2 { margin-top: 8px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--text); font-size: 14px; }
label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--text); background: var(--field); border: 1px solid var(--divider); border-radius: 14px; padding: 11px 14px; min-height: 44px; width: 100%; }
textarea { min-height: 96px; resize: vertical; }
select { appearance: auto; }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--primary); }
input[type=color] { padding: 4px; height: 44px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.inline { display: inline; margin: 0; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 16px; font-weight: 600; font-size: 14px; background: var(--ok-bg); color: var(--ok-text); }
.flash.error { background: var(--err-bg); color: var(--err-text); }
.flash.info { background: var(--info-bg); color: var(--tint-text); }

/* Cards / layout */
.card { border-radius: var(--radius); padding: 22px; min-width: 0; }
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.cards > * { flex: 1 1 320px; }
.cards > .wide { flex: 2 1 620px; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 6px; }
.pagehead p { margin: 4px 0 0; }
.crumb { font-size: 13px; font-weight: 600; color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; }
.list { display: flex; flex-direction: column; }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); min-width: 0; }
.list > .item:first-child { border-top: none; }
.item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .grow strong, .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--pill); color: var(--text); white-space: nowrap; }
.pill.t1 { background: var(--t1); color: var(--tint-text); } .pill.t2 { background: var(--t2); color: var(--tint-text); }
.pill.t3 { background: var(--t3); color: var(--tint-text); } .pill.t4 { background: var(--t4); color: var(--tint-text); }
.pill.urgent { background: var(--err-bg); color: var(--err-text); }
.late { color: var(--warn) !important; font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.tabs a.active { background: var(--nav-on); color: var(--nav-on-text); border-color: var(--nav-on); }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--done); }

/* Dashboard task tiles */
.tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 200px; min-width: 0; min-height: 190px; padding: 18px; border-radius: 22px; color: var(--tint-text); display: flex; flex-direction: column; justify-content: space-between; gap: 14px; text-decoration: none !important; }
.tile h3 { font-size: 20px; line-height: 1.2; }
.tile .pill { background: rgba(255,255,255,.6); color: var(--tint-text); }
:root[data-theme="dark"] .tile .pill { background: rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .tile .pill { background: rgba(255,255,255,.14); } }
.tile .bar { background: rgba(255,255,255,.5); } .tile .bar > i { background: var(--tint-text); }
.tile.t1 { background: var(--t1); } .tile.t2 { background: var(--t2); } .tile.t3 { background: var(--t3); } .tile.t4 { background: var(--t4); }
.ring { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.legend { display: flex; flex-direction: column; gap: 14px; }
.legend b { font-size: 26px; font-weight: 800; display: block; padding-left: 18px; }

/* Board */
.boardscroll { overflow-x: auto; padding-bottom: 6px; }
.board { display: flex; gap: 16px; min-width: 1000px; align-items: flex-start; }
.col { flex: 1 1 0; min-width: 240px; padding: 14px; border-radius: 24px; background: var(--pill); display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.board.wide { min-width: 1200px; }
.col.over { outline: 2px dashed var(--primary); }
.colhead { display: flex; align-items: center; gap: 8px; padding: 2px 6px; }
.colhead .count { margin-left: auto; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--solid); border: 1px solid var(--divider); color: var(--text); cursor: grab; text-decoration: none !important; }
.tcard:hover { border-color: var(--prog); }
.tcard.dragging { opacity: .5; }
.tcard h3 { font-size: 15px; line-height: 1.35; }
.tmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--divider); font-size: 12px; color: var(--muted); }
.tmeta span { display: inline-flex; align-items: center; gap: 4px; }
.tmeta .ic { width: 14px; height: 14px; }

/* Tables */
.tablebox { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 800; color: var(--text); padding: 10px 12px; border-bottom: 2px solid var(--divider); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--divider); vertical-align: middle; }

/* Client hero */
.hero { border-radius: 30px; padding: 28px; background: #0B1F4B; color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
:root[data-theme="dark"] .hero { background: #1A3E8C; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .hero { background: #1A3E8C; } }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.86); }
.stat { min-width: 150px; padding: 18px; border-radius: 22px; background: rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 4px; }
.stat small { color: rgba(255,255,255,.82); font-size: 13px; }
.stat b { font-size: 30px; font-weight: 800; }
.stat .bar { background: rgba(255,255,255,.22); } .stat .bar > i { background: #fff; }
.miles { display: flex; flex-wrap: wrap; gap: 12px; }
.mile { flex: 1 1 170px; padding: 16px; border-radius: 20px; border: 1px solid var(--divider); background: var(--pill); display: flex; flex-direction: column; gap: 8px; }
.mile.done .mk { background: var(--primary); color: #fff; }
.mile.next.first { background: var(--t1); border-color: var(--primary); }
.mk { width: 32px; height: 32px; border-radius: 999px; background: var(--track); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* Auth / legal */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
.auth-card { width: 100%; max-width: 460px; border-radius: 30px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.auth-card .brand { margin-bottom: 6px; }
.legal { display: flex; flex-direction: column; gap: 10px; }
.legal h2 { margin-top: 10px; font-size: 17px; }
.legal ul { margin: 0; padding-left: 20px; }
.auth-card:has(.legal) { max-width: 780px; }
.fine { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
code { background: var(--pill); padding: 2px 6px; border-radius: 6px; }
.copybox { display: flex; gap: 8px; }
.copybox input { font-size: 13px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; font-size: 13px; color: var(--muted); padding: 6px; }
.foot a { color: var(--muted); }
.ic { flex: none; }
.danger-zone { border: 1px solid var(--err-bg); }

@media (max-width: 720px) {
  .wrap { padding: 12px 10px 24px; }
  .card { padding: 18px; }
  .me span, .wsname { display: none; }
  h1 { font-size: 24px; }
}

/* Task detail */
.taskbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.taskbar form { margin: 0; }
.donebtn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px 0 10px; border-radius: 14px; border: 1px solid var(--divider); background: var(--solid); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.donebtn .tick { width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.donebtn .tick .ic { width: 16px; height: 16px; }
.donebtn.is-done .tick { background: #17803D; border-color: #17803D; color: #fff; }
.donebtn:hover .tick { border-color: #17803D; color: #17803D; }
.donebtn.is-done:hover .tick { color: #fff; }
.iconbtn.sq { border-radius: 10px; background: var(--solid); border-color: var(--divider); }
.titlefield { font-size: 20px; font-weight: 600; padding: 14px 16px; }
.taskgrid { display: flex; flex-wrap: wrap; gap: 28px; }
.taskgrid .col1 { flex: 1 1 320px; min-width: 0; }
.taskgrid .col2 { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 11px; letter-spacing: .08em; color: var(--primary-ink); font-weight: 700; }
.bigdue { font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 16px 0 0; align-items: center; }
.facts dt { font-size: 15px; letter-spacing: .04em; color: var(--text); }
.facts dd { margin: 0; color: var(--muted); font-size: 14px; }
.facts select { min-height: 38px; padding: 6px 10px; }
.inl { flex-direction: row !important; align-items: center; gap: 12px !important; }
.inl > span, .inl { color: var(--text); font-size: 14px; }
.inl > select, .inl > input, .inl > .btn { flex: 1; }
.col2 .inl { display: grid !important; grid-template-columns: 70px 1fr; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--divider); border-radius: 8px; padding: 6px 10px; font-size: 11px; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.chiplabel { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--divider); border-radius: 8px; padding: 2px 4px 2px 10px; font-size: 11px; letter-spacing: .04em; }
.chiplabel input { min-height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 6px; }
.bubble { border: 1px solid var(--divider); border-radius: 10px; padding: 12px 14px; background: var(--solid); font-size: 14px; width: 100%; }
.btn.dark { background: #0B1F4B; border-color: #0B1F4B; color: #fff; }
:root[data-theme="dark"] .btn.dark { background: #F2F5FA; color: #0B1F4B; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .btn.dark { background: #F2F5FA; color: #0B1F4B; } }
.pop { position: relative; }
.pop summary { list-style: none; }
.pop summary::-webkit-details-marker { display: none; }
.popbody { position: absolute; right: 0; top: 50px; z-index: 5; width: 280px; padding: 16px; border-radius: 18px; background: var(--solid); border: 1px solid var(--divider); box-shadow: var(--shadow); }
label.switch input { accent-color: var(--primary); }
:root[data-theme="dark"] .av2 { background: #DCE6F7; color: #0B1F4B; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .av2 { background: #DCE6F7; color: #0B1F4B; } }
.runpill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--err-bg); color: var(--err-text); font-weight: 700; font-size: 13px; text-decoration: none !important; max-width: 260px; }
.runpill .live { width: 8px; height: 8px; border-radius: 999px; background: currentColor; animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .runpill .live { animation: none; } }
.side { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.side h3 { font-size: 13px; color: var(--muted); margin: 10px 8px 4px; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.side a:hover { background: var(--pill); }
.side a.active { background: var(--t1); color: var(--tint-text); }
.layout2 { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.layout2 > .mainpane { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.dayhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 6px; font-weight: 700; }
.entry { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--divider); border-radius: 14px; background: var(--solid); margin-bottom: 8px; flex-wrap: wrap; }
.entry .grow { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.money { color: #17803D; font-weight: 700; }
:root[data-theme="dark"] .money { color: #7BD8A0; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .money { color: #7BD8A0; } }
.stats { display: flex; flex-wrap: wrap; gap: 14px; }
.stats > div { flex: 1 1 160px; padding: 16px; border-radius: 18px; background: var(--pill); display: flex; flex-direction: column; gap: 4px; }
.stats b { font-size: 24px; font-weight: 800; }
.stats small { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 800; border-top: 2px solid var(--divider); }

/* Floating dock + drawers */
.dock { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.dockrest { display: flex; flex-direction: column; gap: 10px; }
.dockbtn { width: 44px; height: 44px; border: none; border-radius: 22px 0 0 22px; background: #0A0A0A; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding-left: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.dockbtn[data-dock-min] { width: 34px; height: 30px; border-radius: 15px 0 0 15px; }
.dockbtn:hover { width: 52px; }
.dockbtn.live { background: #B4281F; }
.dock.min .dockrest { display: none; }
.dock:not(.min) .vbar { display: none; }
:root[data-theme="dark"] .dockbtn { background: #F2F5FA; color: #0B1F4B; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .dockbtn { background: #F2F5FA; color: #0B1F4B; } }
.drawer { position: fixed; right: 64px; top: 50%; transform: translateY(-50%); z-index: 41; width: min(380px, calc(100vw - 80px)); max-height: 80vh; overflow: auto; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--solid); }
.drawer[hidden] { display: none; }
.drawerhead { display: flex; align-items: center; justify-content: space-between; }
.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tut { padding: 12px 0; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 8px; }
.vid iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }
.bigtime { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 720px) { .drawer { right: 56px; } }

/* Mobile */
.tabbar, .mobile-only { display: none !important; }
@media (max-width: 720px) {
  .mobile-only { display: flex !important; }
  label.movepick { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; }
  label.movepick select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
  .mainnav { display: none; }
  .topbar { padding: 8px 10px; }
  .brand img { height: 30px; }
  .wsswitch, .topright form:has(button[aria-label="Sign out"]) { display: none; }
  .tabbar { display: flex !important; position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 45; justify-content: space-around; padding: 6px; border-radius: 22px; background: var(--solid); border: 1px solid var(--divider); box-shadow: var(--shadow); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; min-height: 48px; justify-content: center; }
  .tabbar a.active { color: var(--primary-ink); background: var(--t1); }
  body { padding-bottom: 90px; }
  .dock { top: auto; bottom: 110px; transform: none; }
  .drawer { top: auto; bottom: 100px; transform: none; max-height: 70vh; }
  .cal.big { gap: 3px; }
  .cal.big .cald { min-height: 58px; padding: 4px; border-radius: 9px; gap: 2px; }
  .cal.big .cev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; border-left-width: 6px !important; }
  .cal.big .cald > a.small { font-size: 9px; }
  .calhint { display: block !important; }
  .layout2 > * { flex: 1 1 100% !important; min-width: 0 !important; max-width: 100% !important; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cards > *, .cards > .wide { flex: 1 1 100%; min-width: 0; }
  .form, .form label, input, select, textarea { min-width: 0; max-width: 100%; }
  .btn { white-space: normal; text-align: center; }
  .card { min-width: 0; max-width: 100%; }
  .board, .board.wide { min-width: 0; flex-direction: column; }
  .boardscroll { overflow-x: visible; }
  .col { flex: none; min-width: 0; width: 100%; min-height: 0; }
  .col:not(:has(.tcard)) { padding: 10px 14px; }
  .tcard { cursor: pointer; }
  .pagehead h1 { font-size: 24px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .tabs a { white-space: nowrap; }
  .side { max-width: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; }
  .side h2, .side h3 { display: none; }
  .side a { white-space: nowrap; }
  .layout2 { flex-direction: column; align-items: stretch; }
  .facts { grid-template-columns: 90px 1fr; }
  input, select, textarea { font-size: 16px; } /* prevents iOS zoom on focus */
}

/* Chat */
.chatbtn { position: relative; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #C8281E; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.badge[hidden] { display: none; }
.chat { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 50; width: min(420px, calc(100vw - 24px)); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--solid); }
.chat[hidden] { display: none; }
.chathead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--divider); }
.avwrap { position: relative; display: inline-flex; }
.dotonline { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 999px; border: 2px solid var(--solid); background: #9AA3B2; }
.dotonline.on { background: #1E9E5A; }
.chatlist, .chatconv { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.chatlist[hidden], .chatconv[hidden] { display: none; }
.chattabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); }
.chattabs button { background: none; border: none; padding: 10px 12px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.chattabs button.on { color: var(--text); border-bottom-color: var(--primary); }
.chatitems { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.citem { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: none; border: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; width: 100%; }
.citem:hover { background: var(--pill); }
.citem .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.citem .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .count { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 2px 7px; }
.chatnew { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--divider); border-radius: 14px; }
.chatnew[hidden] { display: none; }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.msg { max-width: 85%; display: flex; flex-direction: column; gap: 2px; }
.msg .meta { font-size: 11px; color: var(--muted); }
.msg .txt { padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: var(--pill); border: 1px solid var(--divider); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .txt { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 16px 16px 4px 16px; }
.sendbox { display: flex; gap: 8px; align-items: flex-end; }
.sendbox textarea { min-height: 48px; flex: 1; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--solid); border: 1px solid var(--divider); box-shadow: 0 16px 40px rgba(11,31,75,.22); cursor: pointer; text-align: left; font: inherit; color: var(--text); animation: toastin .25s ease-out; }
.toast .grow { flex: 1; min-width: 0; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 720px) { .chat { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; } .toasts { bottom: 100px; } }

.toast .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 720px) { .dockbtn { width: 38px; height: 38px; } .dockbtn:hover { width: 42px; } .dockrest { gap: 8px; } }

.matrix th.c, .matrix td.c { text-align: center; min-width: 140px; }
.matrix th.c input { min-height: 36px; padding: 6px 8px; font-size: 14px; text-align: center; margin-bottom: 4px; }
.toggle { display: inline-flex; position: relative; cursor: pointer; flex-direction: row; }
.toggle input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.toggle .knob { width: 44px; height: 26px; border-radius: 999px; background: var(--track); border: 1px solid var(--divider); position: relative; transition: background .15s; }
.toggle .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + .sr + .knob { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .sr + .knob::after { transform: translateX(18px); }
.toggle input:focus-visible + .sr + .knob { outline: 3px solid var(--prog); outline-offset: 2px; }
tr.paused td { opacity: .6; }
.popbody.manage { position: fixed; top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 86vh; overflow: auto; z-index: 70; box-shadow: 0 30px 80px rgba(11,31,75,.3); }

fieldset.projpick { border: 1px solid var(--divider); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; margin: 0; }
fieldset.projpick legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }

.matrix th.c { width: 180px; max-width: 200px; } .matrix th.c .small { display: block; font-weight: 500; }
.matrix th:first-child { width: auto; }

/* Timeline (Gantt) */
.gantt { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
.grow-row { display: grid; grid-template-columns: 190px minmax(600px, 1fr); gap: 12px; align-items: center; min-height: 40px; }
.grow-row .lbl { display: flex; flex-direction: column; font-size: 13px; }
.track { position: relative; height: 30px; background: var(--pill); border-radius: 10px; }
.track.tall { height: 54px; }
.grow-row.head .track { background: none; height: 26px; }
.mon { position: absolute; top: 0; font-size: 11px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--divider); padding-left: 6px; height: 26px; line-height: 26px; overflow: hidden; white-space: nowrap; }
.track .today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--primary); opacity: .6; }
.gbar { position: absolute; top: 6px; height: 18px; border-radius: 999px; background: var(--prog); color: #fff; font-size: 11px; font-weight: 700; padding: 0 8px; line-height: 18px; overflow: hidden; white-space: nowrap; }
.gbar.done { background: var(--done); }
.gdot { position: absolute; top: 9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 999px; background: var(--done); border: 2px solid var(--solid); }
.gdot.done { background: #17803D; } .gdot.late { background: #C8281E; }
.gdia { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; background: var(--backlog); transform: rotate(45deg); border-radius: 2px; }
.gdia.done { background: var(--done); }
.gdia .glabel { transform: rotate(-45deg); position: absolute; top: 18px; left: -4px; }
.gstar { position: absolute; top: 2px; margin-left: -9px; font-size: 20px; color: #C8281E; text-decoration: none !important; }
.glabel { position: absolute; top: 26px; left: 0; font-size: 10px; font-weight: 700; color: var(--text); white-space: nowrap; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calh { font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; padding: 4px; }
.cald { min-height: 104px; border: 1px solid var(--divider); border-radius: 12px; padding: 6px; background: var(--solid); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cald.out { opacity: .45; } .cald.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cald .num { font-size: 12px; font-weight: 800; }
.cev { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--t1); color: var(--tint-text); text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev.ms { background: var(--t3); } .cev.ph { background: var(--t2); } .cev.ev { background: #C8281E; color: #fff; } .cev.late { background: var(--err-bg); color: var(--err-text); } .cev.done { opacity: .55; text-decoration: line-through !important; }
/* Run of show */
.ros td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.ros tr.st-live td { background: var(--t1); }
.ros tr.st-done td { opacity: .55; }
.ros tr.st-standby td:first-child { box-shadow: inset 4px 0 0 var(--backlog); }
body.live { background: #050A16; color: #F2F5FA; }
body.live .muted, body.live .crumb { color: #9DAAC0; }
.livewrap { max-width: 1100px; margin: 0 auto; padding: 24px 18px 60px; display: flex; flex-direction: column; gap: 18px; }
.liveclock { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.nowcard, .nextcard { border-radius: 24px; padding: 24px; background: #0F1B33; border: 1px solid #1E2C48; }
.nowcard { background: #12306A; }
.nowcard h2 { font-size: 40px; margin: 6px 0; }
.nowcard .bar { background: rgba(255,255,255,.2); height: 10px; } .nowcard .bar i { background: #8DC0F8; }
.nextcard h3 { font-size: 26px; margin: 6px 0; }
.livewrap .eyebrow { color: #8DC0F8; }
.livelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.livelist li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: #0C1528; border: 1px solid #1B2740; }
.livelist li .t { font-weight: 800; min-width: 84px; font-variant-numeric: tabular-nums; }
.livelist li .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.livelist li.is-now { border-color: #8DC0F8; background: #12306A; }
.livelist li.is-past { opacity: .45; }
.livelist form { margin: 0; }
.livelist .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
@media print {
  .topbar, .foot, .dock, .drawer, .tabbar, .chat, .toasts, .noprint, .blobs, .skip { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .card, .glass { box-shadow: none; border: 1px solid #ccc; background: #fff !important; backdrop-filter: none; }
  .wrap { max-width: none; padding: 0; }
  a { color: #000; }
}

/* Budget grid */
.budgetsec { padding: 16px; }
.secname { font-size: 17px; font-weight: 800; border: none; background: transparent; padding: 6px 0; min-height: 36px; flex: 1 1 260px; }
.btable { font-size: 13px; }
.btable th { font-size: 12px; white-space: nowrap; }
.btable td { padding: 4px 4px; border-bottom: 1px solid var(--divider); }
.btable input, .btable select { min-height: 34px; padding: 5px 7px; font-size: 13px; border-radius: 8px; }
.btable input.desc { min-width: 240px; }
.btable input.n { width: 58px; text-align: right; }
.btable input.n.w { width: 92px; }
.btable select { width: auto; }
.btable tr.comp td { opacity: .6; }
.btable tfoot td { border-top: 2px solid var(--divider); font-size: 13px; }
.sigs { display: none; }
.printonly { display: none; }
@media print {
  .printonly, .sigs { display: flex !important; gap: 60px; margin-top: 40px; }
  .sigs div { flex: 1; border-top: 1px solid #000; padding-top: 6px; font-size: 12px; }
  .btable input, .btable select { border: none; background: none; padding: 0; min-height: 0; appearance: none; }
  .btable tr:has(input.desc[value=""]) { display: none; }
  details.card:not([open]) { display: none; }
}

.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.modtile { flex-direction: row !important; align-items: center; gap: 12px !important; padding: 12px 14px; border: 1px solid var(--divider); border-radius: 14px; background: var(--solid); color: var(--text) !important; font-size: 14px !important; cursor: pointer; }
.impbar { position: sticky; top: 0; z-index: 80; background: #B4281F; color: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 14px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.impbar form { margin: 0; } .impbar .btn { background: #fff; color: #B4281F; border-color: #fff; min-height: 34px; }
.approvebanner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: var(--t3); color: var(--tint-text); }
.tplbox { border: 1px solid var(--divider); border-radius: 14px; padding: 12px 14px; background: var(--solid); }
.tplbox summary { cursor: pointer; }
.tplbox[open] { display: flex; flex-direction: column; gap: 10px; }
.logoprev { padding: 14px; border-radius: 12px; border: 1px solid var(--divider); } .logoprev.light { background: #fff; } .logoprev.dark { background: #0B1F4B; } .logoprev img { height: 40px; width: auto; display: block; }

/* Fun: Foci mascot, timer buddy, confetti */
.foci { width: 34px; height: auto; display: inline-block; vertical-align: middle; }
.foci.tiny { width: 18px; }
.flash .foci.cheer { animation: hop .6s ease-in-out 2; }
.funline { margin: 2px 0 0; font-weight: 700; color: var(--primary-ink); }
.empty.fun { display: flex; align-items: center; gap: 16px; text-align: left; padding: 10px 0; }
.empty.fun .foci { width: 48px; }
.foci.bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes hop { 30% { transform: translateY(-7px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
@keyframes tap { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg) translateY(-1px); } 75% { transform: rotate(5deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.funtimer { position: fixed; left: 16px; bottom: 16px; z-index: 55; font-family: inherit; }
.funtimer .ft-bubble { display: none; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 12px; border-radius: 999px; border: none; background: #0B1F4B; color: #fff; font: inherit; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: 0 10px 28px rgba(11,31,75,.35); }
.funtimer.mini .ft-bubble { display: inline-flex; }
.funtimer.mini .ft-card { display: none; }
.ft-card { width: 300px; border-radius: 22px; padding: 14px 16px; background: var(--solid); border: 1px solid var(--divider); box-shadow: 0 18px 44px rgba(11,31,75,.22); display: flex; flex-direction: column; gap: 10px; }
.ft-head { display: flex; gap: 12px; align-items: center; }
.ft-head .foci.work { width: 44px; flex: none; transform-origin: 50% 90%; animation: tap 1.6s ease-in-out infinite; }
.ft-main { flex: 1; min-width: 0; }
.ft-time { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ft-task { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-cheer { font-size: 12px; font-weight: 700; color: var(--primary-ink); margin-top: 4px; min-height: 16px; }
.ft-min { align-self: flex-start; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--divider); background: var(--pill); color: var(--text); font-size: 18px; font-weight: 800; cursor: pointer; }
.ft-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ft-actions form { margin: 0; }
.funtimer.party .foci.work { animation: hop .6s ease-in-out 3; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .foci, .foci.work, .foci.bob, .flash .foci.cheer { animation: none !important; } .confetti { display: none; } }
@media (max-width: 720px) { .funtimer { bottom: 96px; left: 10px; } .ft-card { width: min(300px, calc(100vw - 20px)); } }
@media print { .funtimer, .confetti { display: none !important; } }
.flash.celebrate { background: linear-gradient(90deg, var(--t1), var(--t2)); color: var(--tint-text); font-size: 16px; display: flex; align-items: center; gap: 8px; }
.flash.celebrate .foci { width: 22px; }

/* Wiki */
.wikiside { max-width: 300px; }
.wnode { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wnode:hover { background: var(--pill); } .wnode.active { background: var(--t1); color: var(--tint-text); }
.wikititle { font-size: 34px; margin: 14px 0 10px; }
.wtitle { font-size: 24px; font-weight: 800; }
.wikibody { font-size: 16px; line-height: 1.7; }
.wikibody h2 { font-size: 24px; margin: 22px 0 8px; } .wikibody h3 { font-size: 19px; margin: 18px 0 6px; }
.wikibody p { margin: 0 0 12px; } .wikibody ul, .wikibody ol { margin: 0 0 12px; padding-left: 26px; }
.wikibody blockquote { margin: 12px 0; padding: 10px 16px; border-left: 4px solid var(--primary); background: var(--pill); border-radius: 0 12px 12px 0; }
.wikibody pre { background: #0B1F4B; color: #E8EFFA; padding: 14px; border-radius: 12px; overflow-x: auto; font-size: 13px; }
.wikibody code { background: var(--pill); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.wikibody pre code { background: none; padding: 0; }
.wikibody table { border-collapse: collapse; margin: 12px 0; width: 100%; } .wikibody th, .wikibody td { border: 1px solid var(--divider); padding: 8px 10px; }
.wikibody hr { border: none; border-top: 2px solid var(--divider); margin: 20px 0; }
.wikibody mark, .wikibody span[style] { border-radius: 4px; }
.wikibody ul.checklist { list-style: none; padding-left: 4px; } .wikibody ul.checklist li { position: relative; padding-left: 30px; cursor: pointer; }
.wikibody ul.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 5px; }
.wikibody ul.checklist li.done { text-decoration: line-through; opacity: .65; } .wikibody ul.checklist li.done::before { background: var(--primary); border-color: var(--primary); }
.wikikids { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--divider); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .wikikids h3 { width: 100%; }
.rte { border: 1px solid var(--divider); border-radius: 16px; background: var(--solid); overflow: hidden; }
.rtebar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--divider); background: var(--pill); position: sticky; top: 0; z-index: 2; }
.rtebar button { min-width: 38px; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.rtebar button:hover { background: var(--solid); border-color: var(--divider); }
.rtebar .sep { width: 1px; background: var(--divider); margin: 4px 4px; }
.rtearea { min-height: 360px; padding: 18px 22px; outline: none; }
.rtearea:focus { box-shadow: inset 0 0 0 2px var(--prog); }
/* Compact top bar when many modules are on */
.mainnav a { padding: 9px 12px; font-size: 14px; }
.wsname { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1480px) { .me > span:not(.avatar) { display: none; } .wsname { display: none; } }

/* Wide tables scroll sideways inside their card instead of stretching the page */
.tablewrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tablewrap > table { min-width: 100%; }
@media (max-width: 720px) { .tablewrap > table th, .tablewrap > table td { white-space: nowrap; } .tablewrap > table td.wrap, .tablewrap > table td .wrap { white-space: normal; } }

.calhint { display: none; }

/* Help Center */
.helpguide { padding: 0; margin-bottom: 10px; }
.helpguide > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.helpguide > summary::-webkit-details-marker { display: none; }
.helpguide > summary::after { content: '+'; font-weight: 800; font-size: 20px; color: var(--primary); }
.helpguide[open] > summary::after { content: '−'; }
.helpguide[open] > summary { border-bottom: 1px solid var(--divider); }
.helpsteps { margin: 14px 18px 8px 38px; padding: 0; display: flex; flex-direction: column; gap: 9px; line-height: 1.5; }
.helpsteps li::marker { font-weight: 800; color: var(--primary); }
.helpsteps .check { font-weight: 400; align-items: flex-start; }
.helptip { margin: 6px 18px 12px; padding: 10px 12px; border-radius: 12px; background: var(--t1); color: var(--tint-text); font-size: 14px; }
.helpguide .btn { margin: 0 18px 16px; }

/* My To-Dos */
.todoadd { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.todoadd .todoopts > input, .todoadd .todoopts > select { width: auto; flex: 1 1 140px; }
.todolist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.todolist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--pill); }
.todolist li a { flex: 1; color: var(--text); font-weight: 600; text-decoration: none; min-width: 0; }
.todolist form { margin: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--primary); background: transparent; cursor: pointer; padding: 0; flex: none; }
.tick:hover { background: var(--t1); }
.tick:hover::after { content: '✓'; color: var(--primary); font-weight: 800; font-size: 14px; }
.todogrp { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 2px 6px; }
.todogrp.late { color: var(--err-text); }
.todolist li .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.todometa { display: flex; align-items: center; gap: 6px; }
.impt td { vertical-align: top; }
.impt td:nth-child(2) input { min-width: 240px; }
.impt td .small { white-space: normal; margin-top: 3px; }

/* "?" help icon next to headings */
.helpq { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px; border-radius: 50%; background: var(--t1); color: var(--tint-text) !important; font-size: 12px; font-weight: 800; text-decoration: none !important; vertical-align: middle; flex: none; transition: transform .15s; }
.helpq:hover { transform: scale(1.12); background: var(--primary); color: #fff !important; }
h1 .helpq { width: 22px; height: 22px; font-size: 13px; }

/* Close button + dimmed backdrop for pop-up windows */
.popbody { padding-top: 46px; }
.popclose { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--divider); background: var(--solid); color: var(--text); font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.popclose:hover { background: var(--pill); }
body.popopen::after { content: ''; position: fixed; inset: 0; background: rgba(11,31,75,.35); z-index: 60; pointer-events: none; }
@media (max-width: 720px) { .popbody.manage { max-height: 80vh; } }
.popbody.manage { padding-top: 16px; }
.popbody.manage > .popclose { position: sticky; top: 0; margin: 0 0 4px auto; }

/* Auto-save */
.autosave-hidden { display: none !important; }
.autosave-note { font-size: 12.5px; font-weight: 600; color: var(--muted); align-self: flex-start; padding: 4px 0; }
.autosave-note.saving, .autosave-note.pending { color: var(--muted); }
.autosave-note.saved { color: var(--done-text, #17803D); }
.autosave-note.error { color: var(--err-text); }
.chlist { margin-top: 10px; }
.chrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--pill); }
.chrow + .chrow { margin-top: 6px; }
.chrow.undone { opacity: .6; }
.chold { text-decoration: line-through; color: var(--muted); }
.chnew { font-weight: 700; }

/* "Still there?" sign-out warning */
.idlewarn { position: fixed; inset: 0; z-index: 200; background: rgba(11,31,75,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.idlecard { background: var(--solid); color: var(--text); border-radius: 24px; padding: 28px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(11,31,75,.35); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.idlecard h2 { margin: 0; } .idlecard p { margin: 0; color: var(--muted); } .idlecard .row { justify-content: center; margin-top: 6px; }
.chrow > .grow { flex: 1; min-width: 0; }
.projpick { border: 1px solid var(--divider); border-radius: 14px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.projpick legend { font-size: 13px; font-weight: 700; padding: 0 4px; }
.projpicklist { display: flex; flex-wrap: wrap; gap: 6px 16px; max-height: 120px; overflow: auto; }

/* Profile photos + account menu */
.avatar.photo { padding: 0; overflow: hidden; background: var(--pill); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.photorow { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.memenu > summary { list-style: none; cursor: pointer; border-radius: 999px; padding: 4px 10px 4px 4px; }
.memenu > summary::-webkit-details-marker { display: none; }
.memenu > summary:hover, .memenu[open] > summary { background: var(--pill); }
.popbody.menu { width: 270px; padding: 46px 8px 8px; display: flex; flex-direction: column; gap: 2px; right: 0; top: 54px; }
.popbody.menu a, .popbody.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font: inherit; font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; }
.popbody.menu a:hover, .popbody.menu button:hover { background: var(--pill); }
.popbody.menu form { margin: 0; }
.menuhead { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; position: absolute; top: 8px; left: 8px; right: 52px; border: 0; }
.menuhead div { display: flex; flex-direction: column; min-width: 0; } .menuhead small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popbody.menu { padding-top: 70px; }
.topbar { position: relative; z-index: 55; }
.popbody.menu { z-index: 90; }
.popbody.menu > .popclose { display: none; }
@media (max-width: 1400px) { .memenu > summary { padding: 4px; } }

/* FOCUS spotlight (My To-Dos) */
.focus-card { border-left: 6px solid var(--primary); background: linear-gradient(90deg, rgba(29,95,209,.10), var(--card) 40%); }
.focus-word { color: var(--primary); letter-spacing: .14em; font-weight: 900; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; text-decoration-color: #E9A93B; }
:root[data-theme="dark"] .focus-card { border-left-color: #8DC0F8; background: linear-gradient(90deg, rgba(141,192,248,.16), var(--card) 40%); }
:root[data-theme="dark"] .focus-word { color: #8DC0F8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .focus-card { border-left-color: #8DC0F8; } :root:not([data-theme="light"]) .focus-word { color: #8DC0F8; } }

/* FOCUS To-Dos and Today's Project Tasks side by side */
.cards.duo-row { margin-bottom: 20px; }
.cards.duo-row > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 900px) { .cards.duo-row > * { flex-basis: 100%; } }

/* Reminder bell + gentle toast */
.bellpop > summary { list-style: none; position: relative; }
.bellpop > summary::-webkit-details-marker { display: none; }
.bellpop .badge.hot { background: #E9A93B; color: #0B1F4B; }
.duemenu { min-width: 300px; max-width: 360px; }
.dueitem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.dueitem:hover { background: var(--pill); }
.dueitem strong { display: block; font-size: 14px; }
.dueitem small { color: var(--muted); }
.duedot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.duedot.late { background: #E9A93B; }
.dueall { display: block; text-align: center; padding: 8px; font-size: 13px; font-weight: 600; border-top: 1px solid var(--divider); margin-top: 4px; }
.duetoast { position: fixed; left: 20px; bottom: 20px; z-index: 60; display: flex; gap: 10px; align-items: center; max-width: 340px; padding: 12px 14px; border-radius: 16px; background: var(--solid); color: var(--text); box-shadow: var(--shadow); border-left: 5px solid var(--primary); font-size: 14px; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.duetoast.show { opacity: 1; transform: none; }
.duetoast a { font-weight: 700; }
.duetoast button { background: none; border: 0; font-size: 16px; color: var(--muted); cursor: pointer; padding: 0 2px; }
@media (max-width: 640px) { .duetoast { left: 12px; right: 12px; bottom: 84px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .duetoast { transition: none; } }
.popbody.menu.duemenu { width: 330px; padding-top: 12px; }
.popbody.menu.duemenu .menuhead { padding: 4px 12px 6px; }
.popbody.menu a.dueitem { display: flex; }
.popbody.menu a.dueall { text-align: center; border-top: 1px solid var(--divider); border-radius: 0 0 12px 12px; }
.popbody.menu.duemenu .menuhead { position: static; display: block; border: 0; background: none; }
@media (max-width: 640px) { .bellpop .popbody.menu.duemenu { position: fixed; left: 12px; right: 12px; top: 84px; width: auto; max-width: none; } }

/* Foci break reminder */
.brkcard { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 370px; display: flex; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--solid); color: var(--text); box-shadow: 0 12px 34px rgba(11,31,75,.18); overflow: hidden; transform: translateX(120%); transition: transform .45s cubic-bezier(.2,.9,.3,1.1); }
.brkcard.show { transform: none; }
.brkcard img { width: 54px; height: 54px; flex: none; }
.brkcard strong { display: block; font-size: 15px; margin-bottom: 4px; padding-right: 18px; }
.brkcard p { margin: 0; font-size: 13px; color: var(--muted); }
.brkok { display: block; font-size: 12px; margin-top: 6px; color: var(--ok-text); font-weight: 600; }
.brkbtns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: flex-start; }
.brkbtns button, .brksnz > summary { font: inherit; font-size: 12px; font-weight: 700; border: 0; border-radius: 99px; padding: 6px 11px; background: var(--track); color: var(--text); cursor: pointer; list-style: none; }
.brksnz > summary::-webkit-details-marker { display: none; }
.brkbtns .brkp { background: var(--primary); color: #fff; }
.brksnz { position: relative; }
.brksnz > div { position: absolute; bottom: 34px; right: 0; width: 220px; background: var(--solid); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.brksnz > div button { background: none; text-align: left; border-radius: 9px; padding: 8px 10px; font-weight: 600; font-size: 13px; }
.brksnz > div button:hover { background: var(--pill); }
.brkx { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.brkbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #E9A93B; transform-origin: left; animation: brkbar 20s linear forwards; }
.brkcard.hold .brkbar { animation-play-state: paused; opacity: .4; }
@keyframes brkbar { to { transform: scaleX(0); } }
:root[data-theme="dark"] .brkbtns .brkp { background: #8DC0F8; color: #0B1F4B; }
@media (max-width: 640px) { .brkcard { left: 12px; right: 12px; bottom: 84px; width: auto; transform: translateY(160%); } .brkcard.show { transform: none; } }
@media (prefers-reduced-motion: reduce) { .brkcard { transition: none; } .brkbar { animation: none; } }

/* Option C: minimal pill */
.brkcard.brkpill { width: auto; max-width: calc(100vw - 40px); align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 99px; overflow: visible; }
.brkpill img { width: 30px; height: 30px; }
.brkpill strong { margin: 0; padding: 0; font-size: 14px; white-space: nowrap; }
.brkpill .brkok2 { background: none; border: 0; font: inherit; font-weight: 800; font-size: 14px; color: var(--primary); cursor: pointer; padding: 2px 4px; }
.brkpill .brksnz > summary { background: none; padding: 2px 4px; color: var(--muted); font-size: 13px; }
.brkpill .brkx { position: static; padding: 2px 4px; }
.brkpill .brkbar { left: 22px; right: 22px; width: auto; height: 2px; border-radius: 2px; }
:root[data-theme="dark"] .brkpill .brkok2 { color: #8DC0F8; }
@media (max-width: 640px) { .brkcard.brkpill { left: 12px; right: 12px; border-radius: 22px; } .brkpill strong { white-space: normal; font-size: 13px; flex: 1; } }

/* Option B, compact */
.brkcard.brksm { width: 300px; gap: 10px; padding: 10px 12px; border-radius: 16px; overflow: visible; }
.brksm img { width: 36px; height: 36px; }
.brksm strong { font-size: 13.5px; margin-bottom: 2px; }
.brksm p { font-size: 12px; line-height: 1.35; }
.brksm .brkbtns { margin-top: 7px; gap: 4px; }
.brksm .brkbtns button, .brksm .brksnz > summary { font-size: 11px; padding: 4px 9px; }
.brksm .brkx { top: 6px; right: 8px; font-size: 13px; }
.brksm .brkbar { left: 16px; right: 16px; width: auto; height: 2px; }
@media (max-width: 640px) { .brkcard.brksm { left: auto; right: 12px; width: min(300px, calc(100vw - 24px)); } }

/* Project Summary: snapshot tiles */
.sumsnap { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 4px 0 20px; }
.snap { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.snap > small:first-child { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.snap > b { font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.snap > small:last-child { font-size: 13px; color: var(--muted); }
.snap .bar { margin: 4px 0 2px; }
.snap .late { color: var(--warn); font-weight: 700; }
.snap a { font-weight: 600; }
@media (max-width: 640px) { .sumsnap { grid-template-columns: 1fr 1fr; gap: 10px; } .snap { padding: 12px 14px; } .snap > b { font-size: 18px; } }
.snap .bar { display: block; width: 100%; height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; flex: none; }
.snap .bar i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
/* Project Summary: text blocks, scope lists, goals */
.sumblock { margin-bottom: 14px; min-width: 0; }
.sumblock h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.sumblock p { margin: 0; font-size: 14px; line-height: 1.5; }
.ticks, .crosses { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; }
.ticks li, .crosses li { position: relative; padding: 3px 0 3px 24px; line-height: 1.4; }
.ticks li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok-text); font-weight: 800; }
.crosses li::before { content: '✕'; position: absolute; left: 3px; color: var(--err-text); font-weight: 800; font-size: 12px; top: 5px; }
.goal { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-top: 10px; border-radius: 16px; background: var(--pill); border: 1px solid var(--line); }

/* Suppliers */
.stars { color: #E9A93B; letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; color: var(--track); }
.pill.cat-venue { background: var(--t1); } .pill.cat-av { background: var(--t2); } .pill.cat-catering { background: var(--t3); }
.pill.cat-transport { background: var(--t4); } .pill.cat-talent { background: var(--ok-bg); } .pill.cat-decor { background: #FDE2EF; }
:root[data-theme="dark"] .pill[class*="cat-"] { color: #0B1F4B; }

.pillbtn { border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.pillbtn:hover { filter: brightness(.95); box-shadow: 0 0 0 2px var(--primary) inset; }

/* Reports */
.repgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.repcard { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.repcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11,31,75,.12); }
.repcard strong { font-size: 16px; }
.repic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; margin-bottom: 6px; }
.repic.t5 { background: var(--ok-bg); } .repic.t6 { background: #FDE2EF; }
.snap b.ok { color: var(--ok-text); } .snap b.warn { color: var(--warn); }
@media print { .sumsnap { grid-template-columns: repeat(4, 1fr); } .snap, .card { box-shadow: none !important; border: 1px solid #ccd; } }
.todomore { margin-top: 8px; }
#todos [hidden] { display: none !important; }
/* FOCUS phase 1 */
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.fchips a { padding: 6px 12px; border-radius: 99px; background: var(--pill); color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none; }
.fchips a b { opacity: .55; margin-left: 3px; }
.fchips a.on { background: var(--nav-on); color: var(--nav-on-text); }
.fstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0 4px; }
.fday { display: flex; flex-direction: column; align-items: center; padding: 7px 2px; border-radius: 14px; background: var(--pill); color: var(--muted); text-decoration: none; font-weight: 700; }
.fday small { font-size: 10.5px; letter-spacing: .04em; }
.fday b { font-size: 17px; color: var(--text); line-height: 1.2; }
.fday.on { background: var(--primary); color: #cfe0ff; } .fday.on b { color: #fff; }
.fdots { display: flex; gap: 3px; height: 6px; margin-top: 3px; }
.fdots i, .fleg i { width: 6px; height: 6px; border-radius: 50%; background: #8DC0F8; display: inline-block; }
.fdots i.t, .fleg i.t { background: #E9A93B; }
.fday.on .fdots i { background: #fff; } .fday.on .fdots i.t { background: #FFD38A; }
.fleg { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 2px 2px 0; }
.fleg a { margin-left: auto; font-weight: 600; }
.todomoreopts > summary { cursor: pointer; color: var(--muted); list-style: none; margin: 2px 4px; }
.todomoreopts > summary::-webkit-details-marker { display: none; }
.todomoreopts > summary::before { content: '＋ '; }
.todomoreopts[open] > summary::before { content: '－ '; }
.todomoreopts .todoopts { margin-top: 6px; }
.fevent { background: #EEF4FF !important; border-left: 4px solid #8DC0F8; }
:root[data-theme="dark"] .fevent { background: rgba(141,192,248,.12) !important; }
.fevent .grow { display: flex; flex-direction: column; }
.ftime { font-weight: 800; color: var(--primary); font-size: 12px; min-width: 86px; }
.ftask .fbadges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.fbadge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--track); color: var(--text); white-space: nowrap; }
.fbadge.plan { background: var(--t2); } .fbadge.roll { background: var(--t3); } .fbadge.late { background: var(--err-bg); color: var(--err-text); }
.fflag { background: none; border: 0; font-size: 16px; color: var(--track); cursor: pointer; padding: 2px 4px; line-height: 1; }
.fflag:hover { color: #E9A93B; } .fflag.on { color: #E9A93B; }
.fmore > summary { list-style: none; width: 28px; height: 28px; font-size: 16px; }
.fmore > summary::-webkit-details-marker { display: none; }
.fmore .popbody { width: min(380px, calc(100vw - 24px)); }
.fmore .ftitle { font-size: 14px; }
.ftask.is-late .tick { border-color: var(--warn); }
.fempty { margin: 12px 2px 0; }
.fquiet { margin: 4px 2px; font-size: 12px; font-weight: 700; color: var(--muted); opacity: .7; }
.fquiet span { font-weight: 500; }
.fcount { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; margin-left: 6px; }
.fjump { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; position: sticky; top: 8px; z-index: 5; padding: 6px; border-radius: 99px; background: var(--card); backdrop-filter: blur(12px); }
.fjump a { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--pill); color: var(--text); text-decoration: none; }
.focuspage { max-width: 900px; margin: 0 auto; }
.focuspage .todogrp { scroll-margin-top: 70px; }
@media (max-width: 640px) { .fday b { font-size: 15px; } .ftask .fbadges .fbadge:not(.roll):not(.late) { display: none; } .ftime { min-width: 64px; } }
.focus-card { position: relative; }
.focus-card:has(details[open]) { z-index: 30; }
.focus-card .todolist li:has(details[open]) { position: relative; z-index: 31; }
@media (max-width: 640px) { .smhide { display: none; } .focus-card .cardhead { flex-wrap: nowrap; } .focus-card .cardhead h2 { font-size: 19px; } .fopen { white-space: nowrap; } }

/* Phones (iPhone SE to Pro Max): pop-up panels fit the screen, forms stack in one column, comfortable tap sizes */
@media (max-width: 640px) {
  .popbody.manage { width: calc(100vw - 24px) !important; max-width: none; padding: 16px; }
  .popbody.manage .grid2, .popbody.manage .row.todoopts { grid-template-columns: 1fr !important; display: grid; gap: 10px; }
  .popbody.manage input, .popbody.manage select, .popbody.manage textarea { font-size: 16px; } /* stops iPhone zooming in on tap */
  .todoadd input, .todoadd select { font-size: 16px; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .fchips::-webkit-scrollbar { display: none; }
  .fchips a { flex: none; padding: 8px 13px; }
  .fstrip { gap: 4px; }
  .fday { padding: 8px 0; border-radius: 12px; }
  .fday small { font-size: 9.5px; }
  .tick { width: 28px; height: 28px; }
  .fflag { font-size: 19px; padding: 6px; }
  .fmore > summary { width: 34px; height: 34px; }
  .todolist li { padding: 10px; gap: 8px; }
  .fevent { flex-wrap: wrap; }
  .ftime { min-width: 0; width: 100%; }
  .fjump { flex-wrap: nowrap; overflow-x: auto; border-radius: 16px; scrollbar-width: none; }
  .fjump::-webkit-scrollbar { display: none; }
  .fjump a { flex: none; }
  .focuspage { border-radius: 20px; padding: 16px 14px; }
  .repgrid { grid-template-columns: 1fr; }
  .snap > b { font-size: 18px; }
  .pagehead .row { flex-wrap: wrap; }
  .brkcard.brksm { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .duetoast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
/* iPhone home-bar area */
@supports (padding: max(0px)) { .tabbar { padding-bottom: max(6px, env(safe-area-inset-bottom)); } }
/* iPads (portrait 744–834, landscape up to 1366): two-column Dashboard where it fits, roomy FOCUS */
@media (min-width: 700px) and (max-width: 1100px) {
  .fstrip { gap: 8px; }
  .fday { padding: 10px 2px; }
  .sumsnap { grid-template-columns: repeat(3, 1fr); }
  .repgrid { grid-template-columns: repeat(2, 1fr); }
  .focuspage { max-width: none; }
}
@media (hover: none) { .fflag { color: var(--muted); opacity: .45; } .fflag.on { color: #E9A93B; opacity: 1; } }
.focuspage { min-width: 0; width: 100%; box-sizing: border-box; }
.focuspage .flist, .focuspage .fjump { min-width: 0; max-width: 100%; }

/* iPad: one-line top bar with a scrollable menu */
@media (min-width: 700px) and (max-width: 1180px) {
  .topbar { flex-wrap: nowrap; gap: 8px; }
  .topbar .brand img { height: 32px; width: auto; }
  .mainnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 8px 10px; font-size: 13.5px; white-space: nowrap; flex: none; }
  .topright { flex: none; }
}

/* Phones turned sideways and small tablets (up to 950px): single column, side menu becomes a swipeable row */
@media (max-width: 950px) {
  .layout2 { flex-direction: column; align-items: stretch; }
  .layout2 > * { flex: 1 1 100% !important; min-width: 0 !important; max-width: 100% !important; }
  .side { max-width: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side h2, .side h3 { display: none; }
  .side a { white-space: nowrap; flex: none; }
}

/* Time entries: keep status, hours, amount and Edit on one tidy line; wrap neatly on narrow phones */
.entry { flex-wrap: nowrap; }
.entry .grow { flex: 1 1 auto; min-width: 0; }
.entry .grow strong, .entry .grow .small { overflow-wrap: anywhere; }
.entry > .pill, .entry > .pillbtn, .entry > strong, .entry > span, .entry > details, .entry > form { flex: none; }
@media (max-width: 640px) {
  .entry { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 6px; align-items: center; }
  .entry > input[type=checkbox] { grid-row: 1; }
  .entry .avatar { display: none; }
  .entry .grow { grid-column: 2 / -1; }
  .entry > .pill, .entry > .pillbtn { grid-column: 2; justify-self: start; }
  .entry > strong { justify-self: end; }
  .entry > span:not(.pill):not(.avatar), .entry > details, .entry > form { justify-self: end; }
}

/* Pop-up forms (Add Entry, Edit, Manage…) on phones and sideways phones: centred panel that fits the screen */
@media (max-width: 950px), (max-height: 500px) {
  details.pop > .popbody:not(.menu) { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); width: calc(100vw - 24px); max-width: 440px; max-height: 82vh; overflow: auto; z-index: 70; box-shadow: 0 30px 80px rgba(11,31,75,.3); }
  details.pop > .popbody:not(.menu) input, details.pop > .popbody:not(.menu) select, details.pop > .popbody:not(.menu) textarea { font-size: 16px; }
}

/* Timesheet */
.tscard { display: flex; flex-direction: column; gap: 16px; }
.tsweek { display: grid; grid-template-columns: repeat(7, 1fr) 1.3fr; gap: 8px; }
.tsday { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 16px; background: var(--pill); color: var(--text); text-decoration: none; min-width: 0; }
.tsday small { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.tsday b { font-size: 18px; line-height: 1.1; }
.tsday em { font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tsday.empty em { color: var(--muted); font-weight: 500; }
.tsday.wknd { opacity: .8; }
.tsday.today { background: var(--primary); color: #fff; } .tsday.today small { color: #cfe0ff; }
.tsbar { width: 10px; height: 34px; border-radius: 6px; background: var(--track); display: flex; align-items: flex-end; overflow: hidden; margin: 4px 0; }
.tsbar i { display: block; width: 100%; background: var(--primary); border-radius: 6px; }
.tsday.today .tsbar { background: rgba(255,255,255,.3); } .tsday.today .tsbar i { background: #fff; }
.tstotal { background: var(--nav-on); color: var(--nav-on-text); justify-content: center; }
.tstotal small { color: inherit; opacity: .7; } .tstotal b { font-size: 20px; } .tstotal em { font-weight: 500; opacity: .8; white-space: normal; text-align: center; }
.tsgrid table { width: 100%; }
.tsgrid th span { display: block; font-size: 16px; color: var(--text); }
.tsgrid th, .tsgrid td { padding: 10px 8px; }
.tsgrid td.today, .tsgrid th.today { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tsgrid td.wknd, .tsgrid th.wknd { background: color-mix(in srgb, var(--track) 45%, transparent); }
.tscell { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--t1); font-weight: 700; font-size: 13px; color: var(--tint-text); white-space: nowrap; }
.tsnil { color: var(--muted); opacity: .5; }
.tsgrid tfoot td { font-weight: 800; border-top: 2px solid var(--divider); }
.tslist { display: none; }
.tsdayhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin: 6px 2px 6px; scroll-margin-top: 80px; }
.tsdayhead b { color: var(--text); font-size: 14px; text-transform: none; }
.tsrows { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tsrows li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--pill); }
.tsrows a { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.tsrows a strong { color: var(--primary-ink); }
.tsrows b { white-space: nowrap; }
.tsfor select { font-weight: 700; }
@media (max-width: 720px) {
  .tsgrid { display: none; }
  .tslist { display: block; }
  .tsweek { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .tstotal { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding: 10px 14px; }
  .tsday { padding: 8px 0 6px; border-radius: 12px; }
  .tsday b { font-size: 15px; } .tsday small { font-size: 9.5px; } .tsday em { font-size: 10px; }
  .tsbar { height: 26px; width: 8px; }
}
@media (min-width: 721px) { .tsday[href] { pointer-events: none; } }
/* A blurred (glass) card traps fixed pop-ups inside it; drop the blur while a pop-up is open so it centres on the screen. */
.card:has(details.pop[open] > .popbody:not(.menu)), .glass:has(details.pop[open] > .popbody:not(.menu)), section:has(details.pop[open] > .popbody:not(.menu)), main:has(details.pop[open] > .popbody:not(.menu)), .mainpane:has(details.pop[open] > .popbody:not(.menu)) {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transform: none !important; filter: none !important; contain: none !important;
}
@media (max-height: 500px) { details.pop > .popbody:not(.menu) { max-height: 90vh; top: 50%; } }
.tsgrid td.wknd, .tsgrid th.wknd { background: none; }
.tsgrid tfoot td.today { background: none; }
label.tsfor { flex-direction: row !important; align-items: center; font-weight: 700; color: var(--muted); }
label.tsfor select { color: var(--text); }

/* Sign-in options */
.ssobtns { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 4px; }
.btn.sso { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--solid); color: var(--text); border: 1px solid var(--divider); font-weight: 700; }
.btn.sso:hover { box-shadow: var(--shadow); }
.ssoor { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.ssoor::before, .ssoor::after { content: ''; flex: 1; height: 1px; background: var(--divider); }
.logintabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 99px; background: var(--pill); margin-bottom: 14px; }
.logintabs a { text-align: center; padding: 8px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.logintabs a.on { background: var(--solid); color: var(--text); box-shadow: 0 2px 8px rgba(11,31,75,.08); }
.codeinput { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-weight: 800; }

/* Public home page */
.home-body { display: block; }
.homewrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px 40px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; }
.homehead { display: flex; justify-content: space-between; align-items: center; }
.homehero { padding: 40px 36px; border-radius: 28px; }
.homehero h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 12px; line-height: 1.1; }
.homehero .lead { font-size: 18px; max-width: 680px; margin: 0 0 20px; }
.homegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.homecard { padding: 20px; border-radius: 22px; }
.homecard b { font-size: 16px; } .homecard p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.homecal { padding: 26px 28px; border-radius: 24px; } .homecal h2 { margin: 0 0 8px; font-size: 20px; } .homecal p { margin: 8px 0 0; line-height: 1.55; }
.homefoot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 4px 6px; }
@media (max-width: 640px) { .homehero { padding: 26px 20px; } .homehero .lead { font-size: 16px; } }
