/* Tau Iota Lambda members portal. Layout modeled on the fraternity's AlphaMX
   portal: black utility strip, white header with horizontal menu, black pill
   buttons and gold-striped panels. */
:root {
  --black: #08080a; --ink: #1b1b1f; --gold: #c9a13b; --gold-bright: #e6c466; --gold-deep: #94751f;
  --bg: #f4f2ec; --white: #fff; --text: #1b1a17; --muted: #6a6457; --line: #dcd6c8;
  --ok: #1f6b3a; --err: #a12626;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Archivo", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold-deep); }
a:hover { color: var(--black); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 300; line-height: 1.1; }
p { margin: 0 0 0.8em; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.muted { color: var(--muted); } .small { font-size: 0.86rem; } .center { text-align: center; }
.gold-text { color: var(--gold-deep); font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Strip + header */
.strip { background: var(--black); color: #fff; font-size: 0.8rem; }
.strip .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.strip a { color: #fff; text-decoration: none; } .strip a:hover { color: var(--gold-bright); }
.strip-user { display: flex; gap: 8px; align-items: center; }
.strip form { display: inline; } .strip button { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; padding: 0; }
.strip button:hover { color: var(--gold-bright); }
.top { background: var(--white); border-bottom: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--black); flex: none; }
.brand img { height: 60px; }
.brand b { display: block; font-family: var(--display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: 1.35rem; letter-spacing: .04em; line-height: 1; }
.brand i { display: block; font-style: normal; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); margin-top: 5px; font-weight: 600; }
.mainnav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px; margin-left: auto; }
.mainnav a { text-decoration: none; color: var(--text); padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; font-size: .95rem; text-align: center; white-space: nowrap; line-height: 1.25; display: block; }
.mainnav a:hover { color: var(--gold-deep); }
.mainnav a.on { border-color: var(--gold); color: var(--black); font-weight: 600; }
.mainnav a.admin { color: var(--gold-deep); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 11px 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--black); margin-bottom: 6px; }
@media (max-width: 1279px) {
  .menu-btn { display: block; }
  .top .wrap { flex-wrap: wrap; min-height: 68px; } .brand img { height: 46px; }
  .mainnav { display: none; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .nav-open .mainnav { display: flex; }
  .mainnav { align-items: stretch; }
  .mainnav a { text-align: left; }
}

.main { padding-top: 28px; padding-bottom: 56px; flex: 1; }
.foot { background: var(--black); color: rgba(255,255,255,.6); font-size: .8rem; padding: 18px 0; text-align: center; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; }
.crumbs a { text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--black); color: #fff; border: 0; border-radius: 999px; padding: 11px 26px; font: 600 .92rem "Archivo", sans-serif; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.btn:hover { background: var(--gold-deep); color: #fff; }
.btn--gold { background: var(--gold); color: var(--black); } .btn--gold:hover { background: var(--gold-bright); color: var(--black); }
.btn--grey { background: #6d6d70; } .btn--sm { padding: 7px 16px; font-size: .82rem; } .btn--block { width: 100%; padding: 14px; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; font-size: .86rem; cursor: pointer; text-decoration: underline; }
.linklike:hover { color: var(--err); } .linklike.light { color: #fff; }
.inline-form { display: inline; margin-left: 10px; }

/* Panels (AlphaMX-style header bar with a gold stripe) */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 22px; overflow: hidden; }
.panel-head { background: var(--ink); color: #fff; padding: 9px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 4px solid var(--gold); font-size: .84rem; }
.panel-head.sub { border-top: 1px solid var(--line); }
.panel-head h2 { font-size: .86rem; font-weight: 600; letter-spacing: .04em; }
.panel-head a { color: var(--gold-bright); }
.panel-body { padding: 18px; }
.narrow { max-width: 520px; } .narrow.wide { max-width: 860px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.cols--form { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
@media (max-width: 900px) { .cols, .cols--form { grid-template-columns: 1fr; gap: 0; } }

/* Forms */
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .84rem; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-weight: 400; color: inherit; width: 100%; padding: 10px 12px; border: 1px solid #c9c3b4; border-radius: 4px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,161,59,.25); }
input[type=file] { padding: 8px; background: #faf8f3; } input[type=checkbox] { width: auto; }
textarea { resize: vertical; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline input:not([type=checkbox]), .inline select { flex: 1; min-width: 160px; width: auto; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; white-space: nowrap; }

.flash { padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; border-left: 4px solid; background: #fff; }
.flash--ok { border-color: var(--ok); } .flash--error { border-color: var(--err); color: var(--err); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid #ece7db; vertical-align: top; }
tr:last-child td { border-bottom: 0; } tr.off { opacity: .5; }
.num { text-align: right; white-space: nowrap; } td form { display: inline; }
.fname { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.fname:hover { color: var(--gold-deep); }
.ico { width: 20px; height: 16px; flex: none; border-radius: 2px; }
.ico--folder { background: var(--gold); position: relative; margin-top: 3px; }
.ico--folder::before { content: ""; position: absolute; left: 0; top: -3px; width: 9px; height: 4px; background: var(--gold); border-radius: 2px 2px 0 0; }
.ico--file { width: 14px; height: 18px; margin: 0 3px; border: 2px solid #8a8577; background: #fff; }
.badge { white-space: nowrap; display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #ece7db; color: var(--muted); }
.badge--submitted { background: #fbf0cf; color: #7a5b00; } .badge--approved { background: #d9ecf9; color: #0b4c7a; }
.badge--paid { background: #d8efdf; color: var(--ok); } .badge--denied { background: #f6dada; color: var(--err); }

/* Dashboard */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.tile { background: var(--black); color: #fff; padding: 22px; border-radius: 4px; border-bottom: 4px solid var(--gold); }
.tile b { display: block; font-family: var(--display); font-stretch: 68%; font-size: 2.8rem; font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.actions-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.quick { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px; padding: 16px 18px; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.quick:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0,0,0,.4); color: var(--text); }
.quick b { display: block; } .quick span { font-size: .84rem; color: var(--muted); }
@media (max-width: 900px) { .tiles, .actions-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .actions-row { grid-template-columns: 1fr; } .pair { grid-template-columns: 1fr; } }
.note { padding: 10px 0; border-bottom: 1px solid #ece7db; } .note:last-child { border: 0; } .note p { margin-bottom: 2px; white-space: pre-wrap; }
.rowlink { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #ece7db; text-decoration: none; color: var(--text); }
.rowlink:last-child { border: 0; } a.rowlink:hover b { color: var(--gold-deep); }

/* Directory */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.card-main { display: grid; gap: 1px; flex: 1; min-width: 0; font-size: .9rem; } .card-main a { overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--black); color: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 800; flex: none; font-size: .95rem; }

/* Requests + report */
.request { padding: 14px 0; border-bottom: 1px solid #ece7db; } .request:first-child { padding-top: 0; } .request:last-child { border: 0; padding-bottom: 0; }
.request-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .request-top b { font-size: 1.25rem; }
.request p { margin-bottom: 4px; }
.report h3 { font-size: 1rem; margin: 22px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--gold); } .report h3:first-child { margin-top: 0; }
.report ul { margin: 0 0 8px; padding-left: 20px; }
.big { font-size: 5rem; font-weight: 800; color: var(--gold-deep); }

/* Sign-in */
body.auth { background: var(--black) radial-gradient(circle at 50% 0%, #2a2413, var(--black) 60%); }
body.auth .main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { background: #fff; width: 100%; max-width: 420px; padding: 36px 32px; border-radius: 6px; border-top: 5px solid var(--gold); text-align: center; }
.auth-card .stack { text-align: left; margin: 22px 0 18px; } .auth-card h1 { font-weight: 800; font-stretch: 70%; text-transform: uppercase; }
.auth-logo { height: 170px; margin: -8px auto 14px; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.auth-card .linklike { color: var(--muted); }

/* Chat */
body.chat-page .main { max-width: none; padding: 0; display: flex; } body.chat-page .foot { display: none; }
.chat { display: grid; grid-template-columns: 270px minmax(0, 1fr); flex: 1; height: calc(100vh - 121px); min-height: 420px; width: 100%; }
.chat-side { background: var(--ink); color: #ddd; padding: 16px 10px; overflow-y: auto; }
.chat-side h3 { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 14px 10px 6px; }
.chat-side h3:first-child { margin-top: 0; }
.chat-side a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: #d6d3cb; text-decoration: none; font-size: .93rem; }
.chat-side a:hover { background: rgba(255,255,255,.07); color: #fff; } .chat-side a.on { background: var(--gold); color: var(--black); font-weight: 700; }
.chat-side em { font-style: normal; background: #c0392b; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.chat-new { display: flex; gap: 6px; margin: 6px 10px 0; }
.chat-new input, .chat-new select { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); color: #fff; padding: 6px 8px; font-size: .85rem; }
.chat-new select option { color: #000; }
.chat-new button { background: var(--gold); border: 0; border-radius: 4px; width: 34px; font-weight: 800; cursor: pointer; }
.chat-main { display: flex; flex-direction: column; background: #fff; min-width: 0; min-height: 0; }
.chat-main header { display: flex; align-items: baseline; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chat-main header h2 { font-size: 1.15rem; } .chat-back { display: none; text-decoration: none; font-size: 1.2rem; color: var(--black); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 20px; }
.chat-day { text-align: center; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 10px; }
.msg { display: flex; gap: 10px; margin-top: 12px; max-width: 780px; } .msg .avatar { width: 36px; height: 36px; font-size: .78rem; }
.msg.cont { margin-top: 3px; } .msg.cont .avatar { visibility: hidden; height: 0; } .msg.cont .meta { display: none; }
.bubble { min-width: 0; } .bubble .meta { font-size: .78rem; color: var(--muted); } .bubble .meta b { color: var(--text); font-size: .9rem; }
.bubble p { margin: 2px 0 0; background: #f1eee6; padding: 8px 12px; border-radius: 4px 14px 14px 14px; white-space: pre-wrap; overflow-wrap: anywhere; display: inline-block; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; } .msg.mine .bubble { text-align: right; }
.msg.mine .bubble p { background: var(--black); color: #fff; border-radius: 14px 4px 14px 14px; text-align: left; }
.chat-form { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { resize: none; border-radius: 20px; padding: 10px 16px; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 105px); } .chat-side { display: none; } .chat-back { display: inline; }
  .chat.show-side .chat-side { display: block; } .chat.show-side .chat-main { display: none; }
}

/* Menu groups */
.navgroup { position: relative; }
.navdrop { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); box-shadow: 0 16px 32px -16px rgba(0,0,0,.4); min-width: 220px; padding: 6px 0; z-index: 30; }
.navgroup:hover .navdrop, .navgroup:focus-within .navdrop { display: block; }
.navdrop a { display: block; text-align: left; border-radius: 0; padding: 9px 16px; border: 0; }
.navdrop a:hover { background: #f4f2ec; }
@media (max-width: 1279px) { .navdrop { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; } }

/* Calendar */
.event { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; padding: 16px 18px; border-bottom: 1px solid #ece7db; align-items: start; }
.event:last-child { border-bottom: 0; }
.event-date { background: var(--black); color: #fff; text-align: center; border-radius: 4px; padding: 8px 4px; border-bottom: 3px solid var(--gold); }
.event-date b { display: block; font-family: var(--display); font-stretch: 68%; font-size: 1.9rem; line-height: 1; color: var(--gold); }
.event-date span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.event h3 { font-size: 1.1rem; margin-bottom: 2px; } .event p { margin: 2px 0; }
.event-side { display: grid; gap: 6px; justify-items: end; }
.kind { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.month-head { padding: 8px 18px; background: #f4f2ec; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .event { grid-template-columns: 60px 1fr; } .event-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; } }

/* Report tracker */
.tracker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.track { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--text); font-size: .9rem; }
.track::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #d9d4c7; flex: none; }
.track.done::before { background: var(--ok); } .track.done { background: #f0f7f2; border-color: #cfe5d6; }
.track:hover { border-color: var(--gold); color: var(--text); }
.sumrow { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; font-size: .9rem; } .sumrow b { font-size: 1.2rem; display: block; }
pre.lang { white-space: pre-wrap; font: inherit; background: #f7f5ef; border-left: 3px solid var(--gold); padding: 10px 12px; margin: 6px 0 10px; }

/* Featured meeting banner */
.feature { background: var(--black); color: #fff; border-radius: 4px; border-left: 6px solid var(--gold); padding: 22px 26px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.feature h2 { font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.2rem); margin-top: 4px; }
.feature .kind { color: var(--gold); } .feature p { margin: 4px 0 0; color: rgba(255,255,255,.75); } .feature .muted { color: rgba(255,255,255,.6); }
.btn--light { background: #fff; color: var(--black); } .btn--light:hover { background: var(--gold-bright); color: var(--black); }
.agenda-up label { display: inline; font-weight: 400; cursor: pointer; }

/* My Notes */
.notes .chat-side { width: auto; }
.notes-new { margin: 0 6px 10px; } .notes-filter { margin: 0 6px 8px; width: calc(100% - 12px); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); color: #fff; padding: 8px 10px; font-size: .88rem; }
.notes-filter::placeholder { color: rgba(255,255,255,.5); }
.note-link span { display: grid; gap: 1px; min-width: 0; } .note-link b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-link small { color: rgba(255,255,255,.5); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-side a.note-link.on small { color: rgba(0,0,0,.6); } .note-link[hidden] { display: none; }
.notes-empty, .notes-private { color: rgba(255,255,255,.5); font-size: .78rem; margin: 14px 10px 0; }
.notes-head { gap: 10px !important; align-items: center !important; }
.notes-head input { border: 0; padding: 4px 0; background: none; box-shadow: none !important; }
#note-title { font-family: var(--display); font-size: 1.5rem; font-weight: 600; flex: 1; min-width: 0; }
#note-section { width: 170px; flex: none; font-size: .82rem; color: var(--gold-deep); font-weight: 600; text-align: right; }
.notes-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: #faf8f3; }
.notes-bar button[data-cmd] { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; font: inherit; font-size: .84rem; cursor: pointer; min-width: 34px; }
.notes-bar button[data-cmd]:hover { border-color: var(--gold); }
#note-status { margin-left: auto; } #note-delete { margin-left: 12px; }
.notes-body { flex: 1; overflow-y: auto; padding: 22px clamp(20px, 5vw, 56px); font-size: 1.05rem; line-height: 1.6; outline: none; }
.notes-body:empty::before { content: attr(data-placeholder); color: #aaa497; }
.notes-body h2 { font-size: 1.35rem; margin: .8em 0 .3em; } .notes-body h3 { font-size: 1.1rem; margin: .8em 0 .3em; }
.notes-body ul, .notes-body ol { padding-left: 24px; margin: 0 0 .8em; } .notes-body p, .notes-body div { margin: 0 0 .5em; }
@media (max-width: 760px) { #note-section { width: 96px; } .notes-bar { padding: 8px 12px; } #note-status { width: 100%; margin: 4px 0 0; } }

/* Sortable table headers */
th.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort-th:hover { color: var(--black); }
th.sort-th::after { content: " ↕"; opacity: .35; }
th.sort-th[aria-sort="ascending"]::after { content: " ▲"; opacity: 1; color: var(--gold-deep); }
th.sort-th[aria-sort="descending"]::after { content: " ▼"; opacity: 1; color: var(--gold-deep); }

/* Members Admin: one Actions menu per row */
details.actions { position: relative; display: inline-block; text-align: left; }
details.actions > summary { list-style: none; cursor: pointer; }
details.actions > summary::-webkit-details-marker { display: none; }
.actions-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 250px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 18px 36px -18px rgba(0,0,0,.45); padding: 6px 0; }
.actions-menu form { display: block; margin: 0; }
.actions-menu button:not(.btn) { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 16px; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; }
.actions-menu button:not(.btn):hover { background: #f4f2ec; color: var(--gold-deep); }
.actions-menu button.danger { color: var(--err); }
.actions-menu > a { display: block; padding: 9px 16px; font-size: .9rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.actions-menu > a:hover { background: #f4f2ec; color: var(--gold-deep); }
.download-menu .actions-menu { min-width: 170px; width: max-content; }
.table-wrap .download-menu .actions-menu { position: static; margin-top: 6px; box-shadow: none; }  /* opens in place so the table edge can't cut it off */
.actions-merge { padding: 8px 16px; border-top: 1px solid #ece7db; border-bottom: 1px solid #ece7db; margin: 4px 0 !important; display: grid !important; gap: 8px; }
.actions-merge label { font-size: .78rem; }
.actions-merge select { font-size: .85rem; padding: 7px 8px; }

/* Files: upload access and moving */
.access-note { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px; padding: 10px 14px; font-size: .9rem; margin: -6px 0 18px; }
tr[draggable=true] { cursor: grab; } tr.dragging { opacity: .45; }
.drop-over, tr.drop-over td { background: #fbf0cf !important; outline: 2px dashed var(--gold); outline-offset: -2px; }
.crumbs a.drop-over { padding: 2px 6px; border-radius: 4px; }
details.move { display: inline-block; text-align: left; } details.move summary { list-style: none; cursor: pointer; display: inline; }
details.move summary::-webkit-details-marker { display: none; }
.move-form { display: flex; gap: 6px; margin-top: 6px; } .move-form select { min-width: 220px; max-width: 340px; font-size: .84rem; padding: 6px 8px; }

/* Submit hub */
.submit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.submit-card { display: flex; flex-direction: column; gap: 8px; min-height: 170px; padding: 22px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 4px; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.submit-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -16px rgba(0,0,0,.4); color: var(--text); }
.submit-card b { font-family: var(--display); font-size: 1.25rem; } .submit-card span { color: var(--muted); font-size: .92rem; flex: 1; }
.submit-card em { font-style: normal; font-weight: 700; font-size: .82rem; color: var(--gold-deep); }
@media (max-width: 900px) { .submit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .submit-grid { grid-template-columns: 1fr; } .submit-card { min-height: 0; } }

/* Shared notes */
details.share { position: relative; flex: none; } details.share > summary { list-style: none; cursor: pointer; }
details.share > summary::-webkit-details-marker { display: none; }
.share-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(360px, 86vw); background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 18px 36px -18px rgba(0,0,0,.45); padding: 14px 16px; display: grid; gap: 8px; font-size: .9rem; }
.share-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #ece7db; } .share-row span { flex: 1; }
.share-row form { margin: 0; }
.share-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; } .share-add select:first-of-type { grid-column: 1 / -1; }
.share-add select { font-size: .85rem; padding: 7px 8px; }
.shared-by { flex: none; font-size: .78rem; font-weight: 700; color: var(--gold-deep); text-transform: uppercase; letter-spacing: .06em; }
.notes-body[contenteditable=false] { background: #fbfaf6; }

/* Approval workflow */
a.request-link { display: block; text-decoration: none; color: var(--text); border-radius: 4px; margin: 0 -10px; padding: 14px 10px; }
a.request-link:hover { background: #f8f6f0; color: var(--text); }
.approval-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.approval-steps li { counter-increment: step; border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px 12px 52px; position: relative; display: grid; gap: 2px; }
.approval-steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ece7db; color: var(--muted); font-weight: 700; font-size: .85rem; }
.approval-steps li.done { border-color: #cfe5d6; background: #f0f7f2; } .approval-steps li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.approval-steps li.current { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,161,59,.2); } .approval-steps li.current::before { background: var(--gold); color: var(--black); }
.approval-steps span { font-size: .84rem; color: var(--muted); }
.signature-input { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: 1.25rem; }
@media (max-width: 760px) { .approval-steps { grid-template-columns: 1fr; } }

/* Dashboard tiles that link somewhere */
a.tile--link { text-decoration: none; display: block; transition: transform .2s, box-shadow .2s; } a.tile--link:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(0,0,0,.6); }
.tile small { font-size: .68rem; letter-spacing: .04em; text-transform: none; color: rgba(255,255,255,.55); }
.tile em { display: block; margin-top: 8px; font-style: normal; font-size: .76rem; font-weight: 700; color: var(--gold-bright); }

/* Service hours leaderboard */
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 90px auto; gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid #ece7db; }
.board li:last-child { border-bottom: 0; } .board li.is-me { background: #fbf6e6; }
.board-rank { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 1.35rem; color: var(--muted); text-align: center; }
.board li.top1 .board-rank, .board li.top2 .board-rank, .board li.top3 .board-rank { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; color: var(--black); font-size: 1.1rem; }
.board li.top1 .board-rank { background: var(--gold); } .board li.top2 .board-rank { background: #d6d6d6; } .board li.top3 .board-rank { background: #d9a273; }
.board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-hours { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 1.5rem; text-align: right; } .board-hours small { font-size: .7rem; color: var(--muted); font-weight: 600; }
.board-react { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.react { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 9px; font-size: 1rem; cursor: pointer; line-height: 1.2; }
.react i { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--muted); min-width: 0; }
.react:hover:not(:disabled) { border-color: var(--gold); } .react.on { background: #fbf0cf; border-color: var(--gold); }
.react:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  .board li { grid-template-columns: 40px minmax(0, 1fr) 70px; row-gap: 6px; padding: 10px 12px; }
  .board-react { grid-column: 2 / -1; justify-content: flex-start; }
}

/* Service hours review */
.hours-decide { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 14px; align-items: end; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e4dfd2; }
.hours-decide .inline { grid-column: 1 / -1; }
@media (max-width: 640px) { .hours-decide { grid-template-columns: 1fr; } }

/* Personal inbox */
.strip-inbox em { font-style: normal; background: #c0392b; color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; font-weight: 700; }
.inbox-item.unread { border-left: 4px solid var(--gold); padding-left: 12px; background: #fbf6e6; }
.inbox-item.unread b { color: var(--black); }

/* Inbox bell pulses while there's unread mail */
.strip-inbox.has-unread { animation: inboxPulse 1.8s ease-in-out infinite; color: var(--gold-bright) !important; font-weight: 700; }
@keyframes inboxPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .strip-inbox.has-unread { animation: none; } }

/* ---------- TIL Mail (Gmail-style) ---------- */
body.mail-page { background: #faf7ef; }
body.mail-page .main { max-width: none; padding: 16px 16px 0; }
body.mail-page .foot { display: none; }
.mail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 140px); font-family: Arial, Helvetica, sans-serif; }
.mail-side { padding: 4px 0; }
.mail-compose-btn { display: inline-flex; align-items: center; gap: 12px; background: #f3e3b0; color: #3d2f08; border: 0; border-radius: 16px; padding: 18px 26px 18px 20px; font: 500 15px Arial, sans-serif; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); margin: 0 0 16px 8px; transition: box-shadow .2s; }
.mail-compose-btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.mail-compose-btn svg { width: 22px; height: 22px; fill: currentColor; }
.mail-boxes { display: grid; }
.mail-boxes a { display: flex; align-items: center; gap: 18px; padding: 0 14px 0 26px; height: 34px; border-radius: 0 17px 17px 0; color: #202124; text-decoration: none; font-size: 14px; }
.mail-boxes a:hover { background: #eaebef; color: #202124; } .mail-boxes a.on { background: #f1dfa6; font-weight: 700; color: #3d2f08; }
.mail-boxes svg { width: 20px; height: 20px; fill: #444746; flex: none; } .mail-boxes a span { flex: 1; }
.mail-boxes b { font-size: 12px; } .mail-boxes i { font-style: normal; font-size: 12px; color: #5f6368; }
.mail-side-note { color: #5f6368; font-size: 12px; margin: 20px 14px 0 26px; line-height: 1.4; }
.mail-main { background: #fff; border-radius: 16px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.mail-search { display: flex; align-items: center; gap: 10px; background: #f7efd9; border-radius: 24px; margin: 12px 16px 8px; padding: 0 16px; height: 46px; max-width: 720px; }
.mail-search:focus-within { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mail-search svg { width: 22px; height: 22px; fill: #444746; flex: none; }
.mail-search input { border: 0 !important; background: none !important; box-shadow: none !important; font: 16px Arial, sans-serif; padding: 0; }
.mail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 20px 8px; border-bottom: 1px solid #f1f3f4; color: #5f6368; font-size: 14px; min-height: 40px; }
.mail-toolbar form { margin: 0; }
.mail-link { background: none; border: 0; color: #94751f; font: 500 14px Arial, sans-serif; cursor: pointer; text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.mail-link:hover { background: #f1f3f4; color: #94751f; }
.mail-list { overflow-y: auto; }
.mail-row { display: grid; grid-template-columns: 28px 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 0 20px 0 14px; height: 42px; border-bottom: 1px solid #f1f3f4; color: #202124; text-decoration: none; font-size: 14px; background: #fbf7ec; }
.mail-row.unread { background: #fff; } .mail-row:hover { box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60,64,67,.3); position: relative; z-index: 1; color: #202124; }
.mail-row .mail-who, .mail-row .mail-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row .mail-who { color: #202124; } .mail-row.unread .mail-who, .mail-row.unread .mail-what b, .mail-row.unread .mail-when { font-weight: 700; }
.mail-row .mail-what b { font-weight: 400; } .mail-row .mail-what span { color: #5f6368; }
.mail-who small { color: #5f6368; font-weight: 400; font-size: 12px; }
.mail-when { font-size: 12px; color: #5f6368; white-space: nowrap; } .mail-row.unread .mail-when { color: #202124; }
.mail-star { color: #c4c7c5; font-size: 18px; } .mail-star.on { color: #f4b400; }
.mail-label { font-style: normal; font-size: 11px; background: #fbf0cf; color: #7a5b00; border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.mail-empty { padding: 60px 20px; text-align: center; color: #5f6368; font-size: 15px; }
.mail-subject { font: 400 22px Arial, sans-serif; color: #1f1f1f; padding: 16px 20px 8px 72px; margin: 0; text-transform: none; letter-spacing: 0; }
.mail-thread { padding: 0 20px; }
.mail-msg { border-bottom: 1px solid #f1f3f4; padding: 12px 0 16px; }
.mail-msg-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 28px; gap: 12px; align-items: start; cursor: pointer; }
.mail-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: var(--gold); display: grid; place-items: center; font: 700 14px Arial, sans-serif; }
.mail-avatar.sys { background: var(--gold); color: var(--black); font-size: 12px; }
.mail-msg-from { font-size: 14px; color: #1f1f1f; min-width: 0; } .mail-msg-from .muted { font-weight: 400; }
.mail-star-btn { background: none; border: 0; font-size: 20px; color: #c4c7c5; cursor: pointer; } .mail-star-btn.on { color: #f4b400; }
.mail-msg-body { padding: 14px 0 0 52px; font: 14px/1.55 Arial, Helvetica, sans-serif; color: #222; overflow-wrap: anywhere; }
.mail-msg-body blockquote, .composer-editor blockquote { margin: 6px 0 6px 6px; padding-left: 12px; border-left: 2px solid #ccc; color: #555; }
.mail-msg-body a { color: #94751f; }
.mail-msg.collapsed .mail-msg-body, .mail-msg.collapsed .mail-attachments { display: none; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0 52px; }
.mail-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dadce0; border-radius: 8px; padding: 6px 10px; font: 13px Arial, sans-serif; color: #1f1f1f; text-decoration: none; background: #fff; }
.mail-chip:hover { background: #f1f3f4; color: #1f1f1f; } .mail-chip small { color: #5f6368; }
.mail-chip button { background: none; border: 0; cursor: pointer; color: #5f6368; padding: 0 0 0 4px; }
.mail-reply-bar { display: flex; gap: 10px; padding: 16px 20px 30px 72px; }
.mail-pill { background: #fff; border: 1px solid #747775; border-radius: 18px; padding: 8px 18px; font: 500 14px Arial, sans-serif; color: #444746; cursor: pointer; }
.mail-pill:hover { background: #f1f3f4; }
.mail-quote { color: #5f6368; }

.composer { position: fixed; right: 24px; bottom: 0; width: min(560px, calc(100vw - 16px)); background: #fff; border-radius: 10px 10px 0 0; box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2); z-index: 60; font-family: Arial, Helvetica, sans-serif; display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.composer[hidden] { display: none; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; background: #fbf7ec; padding: 10px 14px; border-radius: 10px 10px 0 0; font-size: 14px; font-weight: 500; color: #1f1f1f; cursor: default; }
.composer-bar button { background: none; border: 0; cursor: pointer; font-size: 14px; color: #444746; padding: 2px 6px; }
.composer.min form { display: none; } .composer.min { width: 280px; }
.composer form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.composer-field { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #f1f3f4; margin: 0 16px; min-height: 40px; font-size: 14px; }
.composer-field label { display: inline; font: 14px Arial, sans-serif; color: #5f6368; }
.composer-field input { border: 0 !important; box-shadow: none !important; padding: 8px 0; font: 14px Arial, sans-serif; background: none; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; flex: 1; padding: 4px 0; }
.chips input { flex: 1; min-width: 120px; width: auto; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #dadce0; border-radius: 16px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip--group { background: #fbf0cf; border-color: var(--gold); }
.chip button { background: none; border: 0; cursor: pointer; color: #5f6368; font-size: 11px; padding: 2px 4px; }
.chip-menu { position: absolute; z-index: 70; width: 320px; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 6px 0; }
.chip-menu button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; background: none; border: 0; padding: 7px 14px; cursor: pointer; text-align: left; font: 14px Arial, sans-serif; }
.chip-menu button span { font-size: 12px; color: #5f6368; } .chip-menu button.on, .chip-menu button:hover { background: #f1f3f4; }
.composer-editor { flex: 1; min-height: 220px; max-height: 46vh; overflow-y: auto; padding: 12px 16px; font: 14px/1.5 Arial, Helvetica, sans-serif; color: #222; outline: none; }
.composer-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; } .composer-files:not(:empty) { padding-bottom: 8px; }
.composer-format { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 12px; padding: 4px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.2); background: #fff; }
.composer-format button, .fmt-color { background: none; border: 0; border-radius: 4px; min-width: 28px; height: 28px; padding: 0 6px; cursor: pointer; font: 14px Arial, sans-serif; color: #444746; display: inline-grid; place-items: center; position: relative; }
.composer-format button:hover, .fmt-color:hover { background: #f1f3f4; }
.composer-format select { width: auto; border: 0; font: 13px Arial, sans-serif; padding: 4px 6px; background: none; color: #444746; }
.fmt-color { text-decoration: underline 3px #c0392b; font-weight: 700; } .fmt-hilite { text-decoration-color: #fbc02d; }
.fmt-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.fmt-sep { width: 1px; height: 20px; background: #dadce0; margin: 0 4px; }
.composer-actions { display: flex; align-items: center; gap: 10px; padding: 10px 16px 14px; }
.composer-send { background: var(--gold); color: var(--black); font-weight: 700 !important; border: 0; border-radius: 18px; padding: 9px 24px; font: 500 14px Arial, sans-serif; cursor: pointer; }
.composer-send:hover { background: var(--gold-bright); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.composer-icon { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 50%; }
.composer-icon:hover { background: #f1f3f4; } .composer-discard { margin-left: auto; }
@media (max-width: 860px) {
  .mail { grid-template-columns: 1fr; } .mail-side { display: flex; align-items: center; gap: 8px; overflow-x: auto; }
  .mail-compose-btn { margin: 0; padding: 12px 18px; } .mail-boxes { display: flex; } .mail-boxes a { padding: 0 12px; border-radius: 17px; } .mail-side-note { display: none; }
  .mail-row { grid-template-columns: 22px minmax(0, 1fr) auto; height: auto; padding: 10px 12px; row-gap: 2px; }
  .mail-row .mail-what { grid-column: 2 / -1; } .mail-row .mail-when { grid-row: 1; grid-column: 3; }
  .mail-subject { padding-left: 20px; } .mail-msg-body, .mail-attachments { padding-left: 0; } .mail-reply-bar { padding-left: 20px; flex-wrap: wrap; }
  .composer { right: 0; width: 100vw; max-height: calc(100vh - 20px); border-radius: 0; }
}
.messenger-brand { font-family: var(--display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; color: #fff; margin: 0 10px 14px; }
.composer-field[hidden], .chip-menu[hidden] { display: none; }
@media (max-width: 860px) {
  .mail { grid-template-rows: auto 1fr; gap: 10px; }
  .mail-side { padding: 0; scrollbar-width: none; } .mail-side::-webkit-scrollbar { display: none; }
  .mail-compose-btn { flex: none; } .mail-boxes a { flex: none; height: 38px; }
}

/* TIL Messenger: delete a direct message, emoji picker */
.dm-row { position: relative; }
.dm-row a { padding-right: 34px; }
.dm-row form { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin: 0; }
.dm-delete { background: none; border: 0; color: #9a978f; cursor: pointer; font-size: .8rem; padding: 4px 7px; border-radius: 4px; opacity: 0; transition: opacity .15s; }
.dm-row:hover .dm-delete, .dm-delete:focus { opacity: 1; } .dm-delete:hover { color: #fff; background: #c0392b; }
.dm-row a.on + form .dm-delete { color: var(--black); }
@media (hover: none) { .dm-delete { opacity: 1; } }
.dm-row a em { margin-right: 4px; }
.chat-head-action { margin: 0 0 0 auto; }
.emoji-wrap { position: relative; flex: none; }
.emoji-btn { background: none; border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.emoji-btn:hover, .emoji-btn[aria-expanded="true"] { background: #f5efe0; border-color: var(--gold); }
.emoji-panel { position: absolute; bottom: 52px; right: 0; width: 320px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 30; overflow: hidden; }
.emoji-panel[hidden] { display: none; }
.emoji-tabs { display: flex; border-bottom: 1px solid var(--line); background: #faf8f3; }
.emoji-tabs button { flex: 1; background: none; border: 0; padding: 8px 0; font-size: 1.1rem; cursor: pointer; border-bottom: 2px solid transparent; }
.emoji-tabs button.on { border-bottom-color: var(--gold); background: #fff; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; max-height: 220px; overflow-y: auto; }
.emoji-grid button { background: none; border: 0; font-size: 1.35rem; padding: 4px 0; border-radius: 6px; cursor: pointer; line-height: 1.2; }
.emoji-grid button:hover, .emoji-grid button:focus { background: #f1ede2; }

/* Inbox in the main menu (pulses while there's unread mail) */
.mainnav a.nav-inbox em { font-style: normal; background: #c0392b; color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; font-weight: 700; margin-left: 2px; }
.mainnav a.nav-inbox.has-unread { animation: inboxPulse 1.8s ease-in-out infinite; color: var(--gold-deep); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .mainnav a.nav-inbox.has-unread { animation: none; } }

/* Drafts */
.mail-draft-tag { font-style: normal; color: #c0392b; font-weight: 700; }
.draft-status { font-weight: 400; color: #5f6368; font-size: 12px; margin-left: 6px; }
.mail-toast { position: fixed; left: 24px; bottom: 24px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 6px; font: 14px Arial, sans-serif; z-index: 80; box-shadow: 0 4px 12px rgba(0,0,0,.25); }

/* Profile photos */
img.avatar, img.mail-avatar { object-fit: cover; padding: 0; background: #ddd; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar--xl { width: 120px; height: 120px; font-size: 2.2rem; }
.photo-edit { display: flex; gap: 22px; align-items: center; }
.photo-edit .stack { flex: 1; min-width: 0; }
.photo-edit form { margin: 0; }
.strip-me { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.strip-me img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
@media (max-width: 600px) {
  .photo-edit { flex-direction: column; align-items: flex-start; }
  /* Keep the top bar on one line on phones */
  .strip .wrap { gap: 10px; }
  .strip .wrap > a { flex: none; }
  .strip-user { min-width: 0; white-space: nowrap; gap: 6px; }
  .strip-label { display: none; }
  .strip-me span { overflow: hidden; text-overflow: ellipsis; max-width: 38vw; display: inline-block; vertical-align: bottom; }
}

/* Website change requests */
.choice-group { border: 0; padding: 0; margin: 0; }
.choice-group legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex !important; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-weight: 500; margin: 0; }
.choice input { width: auto; margin: 0; accent-color: var(--gold-deep); }
.choice small { display: block; color: var(--muted, #777); font-weight: 400; }
.choice:has(input:checked) { border-color: var(--gold); background: #fbf4df; }
.wr-item .badge { white-space: nowrap; }
.wr-new { background: #fbf0cf; color: #7a5b00; } .wr-in-progress { background: #e3ecfa; color: #1f4f99; }
.wr-done { background: #dff3e4; color: #1e6b35; } .wr-not-planned { background: #eee; color: #666; }
.wr-urgent { color: #c0392b; }
.wr-note { background: #faf7ef; border-left: 3px solid var(--gold); padding: 8px 12px; }
.wr-manage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.wr-manage select { width: auto; } .wr-manage input { flex: 1; min-width: 160px; }

/* Calendar: edit an event in place */
.event-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.event-link a { overflow-wrap: anywhere; }
.event-edit { grid-column: 1 / -1; background: #faf7ef; border: 1px solid #ece7db; border-left: 3px solid var(--gold); border-radius: 6px; padding: 16px 18px; margin-top: 4px; }
.event-edit[hidden] { display: none; }
.event-edit h4 { margin: 0; font-size: .95rem; }
.event-edit .inline { gap: 10px; }

/* Calendar attachments */
.event-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.event-thumb { display: block; width: 120px; height: 120px; border-radius: 6px; overflow: hidden; border: 1px solid #ece7db; background: #f4f1ea; }
.event-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.event-thumb:hover img { transform: scale(1.04); }
.event-file { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ece7db; border-radius: 8px; padding: 6px 10px; font-size: .88rem; text-decoration: none; color: var(--text); background: #fff; max-width: 100%; overflow-wrap: anywhere; }
.event-file:hover { border-color: var(--gold); color: var(--black); } .event-file small { color: #888; }
.event-edit-files { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.event-edit-files legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
@media (max-width: 600px) { .event-thumb { width: 96px; height: 96px; } }
.on-website { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1e6b35; background: #dff3e4; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }
.event-by { font-size: .74rem; margin-top: 4px !important; }

/* Committees */
.meet-list { display: grid; }
.meet-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid #ece7db; }
.meet-row:last-child { border-bottom: 0; }
.meet-icon { font-size: 1.4rem; width: 32px; text-align: center; flex: none; }
.meet-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.meet-main a { color: var(--black); text-decoration: none; } .meet-main a:hover b { color: var(--gold-deep); text-decoration: underline; }
.mine-tag { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #fbf0cf; color: #7a5b00; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.panel-head h2 small { font-weight: 400; color: #999; letter-spacing: 0; margin-left: 6px; }
.section-title { font-size: 1.05rem; margin: 30px 0 14px; }
.committee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 30px; }
.committee-btn { display: grid; gap: 6px; align-content: start; background: var(--black); color: #fff; text-decoration: none; border-radius: 10px; padding: 22px 20px; min-height: 150px; border-bottom: 4px solid var(--gold); transition: transform .15s, box-shadow .15s; }
.committee-btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.22); }
.committee-btn-icon { font-size: 1.9rem; }
.committee-btn b { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 1.15rem; line-height: 1.15; color: var(--gold); }
.committee-btn span:last-child { font-size: .82rem; color: #bdb8ad; }
.crumbs-portal { margin-bottom: 10px; font-size: .9rem; } .crumbs-portal a { text-decoration: none; }
.committee-hero { display: flex; align-items: center; gap: 18px; background: var(--black); color: #fff; border-radius: 12px; padding: 26px 28px; border-bottom: 4px solid var(--gold); margin-bottom: 18px; }
.committee-hero h1 { color: var(--gold); margin: 0; font-size: clamp(1.4rem, 4vw, 2.1rem); }
.committee-hero p { margin: 4px 0 0; color: #cfcac0; }
.committee-hero-icon { font-size: 2.6rem; flex: none; }
.committee-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.big-action { display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 14px; color: var(--black); transition: border-color .15s, box-shadow .15s; }
.big-action span { font-size: 1.8rem; } .big-action b { font-size: 1.02rem; } .big-action small { color: #888; }
.big-action:hover { border-color: var(--gold); box-shadow: 0 6px 16px rgba(0,0,0,.1); color: var(--black); }
.big-action--gold { background: var(--gold); border-color: var(--gold); } .big-action--gold small { color: #3d2f08; }
.big-action--gold:hover { background: var(--gold-bright); }
.person-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1ede2; }
.person-row:last-of-type { border-bottom: 0; }
.person-row > div:not(.avatar) { flex: 1; min-width: 0; display: grid; }
.person-row form { margin: 0; }
.avatar--sm { width: 36px; height: 36px; font-size: .78rem; }
.committee-about { white-space: pre-wrap; margin-top: 14px; }
@media (max-width: 600px) {
  .meet-row { flex-wrap: wrap; padding: 12px 14px; } .meet-row .btn { margin-left: 46px; }
  .committee-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .committee-btn { min-height: 120px; padding: 16px 14px; }
  .committee-btn b { font-size: .98rem; }
  .committee-hero { padding: 20px; }
}
@media (min-width: 1280px) { .mainnav a { padding: 9px 10px; font-size: .9rem; } }

/* TIL Messenger: reactions and replies */
.bubble { position: relative; }
.msg-actions { position: absolute; top: -14px; right: 0; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 2px 4px; box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 5; white-space: nowrap; }
.msg.mine .msg-actions { right: auto; left: 0; }
.msg:hover .msg-actions, .msg.show-actions .msg-actions, .msg-actions:focus-within { display: flex; }
.msg-actions button { background: none; border: 0; cursor: pointer; font-size: 1.05rem; padding: 3px 5px; border-radius: 12px; line-height: 1; }
.msg-actions button:hover { background: #f1ede2; }
.msg-actions .msg-reply { font-size: .78rem; font-weight: 600; color: var(--text); }
.msg-actions .msg-more { font-weight: 800; color: var(--text); }
.msg-menu { position: absolute; z-index: 95; display: grid; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.msg-menu[hidden] { display: none; }
.msg-menu button, .msg-menu a { background: none; border: 0; text-align: left; font: inherit; font-size: .92rem; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text); text-decoration: none; }
.msg-menu button:hover, .msg-menu a:hover { background: #f1ede2; }
.msg-menu a { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
@media (max-width: 600px) { .msg-actions .react-quick:nth-child(n+4) { display: none; } }
.guidelines { text-align: left; padding-left: 22px; } .guidelines li { margin: 0 0 14px; } .guidelines li b { display: block; }
.msg.cont { margin-top: 3px; }
.msg { padding-top: 4px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reactions:empty { display: none; }
.msg.mine .reactions { justify-content: flex-end; }
.reaction { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .88rem; cursor: pointer; line-height: 1.5; }
.reaction span { font-size: .76rem; font-weight: 700; color: var(--muted); }
.reaction.mine { background: #fbf0cf; border-color: var(--gold); } .reaction:hover { border-color: var(--gold); }
.reply-quote { display: grid; gap: 1px; text-align: left; background: none; border: 0; border-left: 3px solid var(--gold); padding: 2px 10px; margin: 3px 0 2px; cursor: pointer; max-width: 520px; font: inherit; font-size: .82rem; color: var(--muted); }
.msg.mine .reply-quote { margin-left: auto; }
.reply-quote b { color: var(--text); font-size: .78rem; } .reply-quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.flash .bubble p { box-shadow: 0 0 0 3px var(--gold); transition: box-shadow .3s; }
.bubble p a { color: inherit; text-decoration: underline; }
.msg.mine .bubble p a { color: var(--gold-bright); }
.reply-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 20px; padding: 8px 12px; background: #faf7ef; border-left: 3px solid var(--gold); border-radius: 6px 6px 0 0; font-size: .85rem; }
.reply-bar[hidden], .reply-hint[hidden], .chat-form[hidden] { display: none; }
.reply-bar > span { min-width: 0; display: grid; } .reply-bar span span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: .9rem; }
.reply-hint { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.react-picker { position: absolute; z-index: 90; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.react-picker[hidden] { display: none; }
.react-picker button { background: none; border: 0; font-size: 1.3rem; padding: 5px; border-radius: 8px; cursor: pointer; }
.react-picker button:hover { background: #f1ede2; }
@media (hover: none) { .msg-actions { top: auto; bottom: -30px; } .msg.show-actions { margin-bottom: 30px; } }

/* TIL Messenger sidebar: collapsible, reorderable sections */
.side-sec { margin-top: 8px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 6px 4px 4px; }
.side-toggle { display: flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--gold); flex: 1; text-align: left; }
.side-toggle:hover { background: rgba(255,255,255,.06); }
.side-toggle h3 { margin: 0 !important; }
.caret { display: inline-block; font-size: .8rem; transition: transform .15s; width: 12px; }
.side-sec.collapsed .caret { transform: rotate(-90deg); }
.side-sec.collapsed .side-body { display: none; }
.side-move { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.side-head:hover .side-move, .side-move:focus-within { opacity: 1; }
@media (hover: none) { .side-move { opacity: .7; } }
.side-move button { background: none; border: 0; color: #9a978f; cursor: pointer; font-size: .62rem; padding: 4px 5px; border-radius: 4px; }
.side-move button:hover { color: #fff; background: rgba(255,255,255,.1); }
.side-sec:first-of-type [data-move="-1"], .side-sec:last-of-type [data-move="1"] { visibility: hidden; }
.side-empty { color: #8f8b82; font-size: .82rem; margin: 2px 10px 8px; }
.page-head-actions { gap: 10px; flex-wrap: wrap; }
.committee-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.committee-top .crumbs-portal { margin: 0; }

/* Calendar: event links */
.link-rows { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.link-rows legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.link-rows legend small { font-weight: 400; color: #888; }
.link-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; }
.link-rows [data-add-link] { justify-self: start; }
.event-linkchip small { color: #888; }
@media (max-width: 600px) { .link-row { grid-template-columns: 1fr; } .link-row + .link-row { border-top: 1px dashed #e4dfd2; padding-top: 6px; } }
.link-row { grid-template-columns: 1fr; }
.link-row + .link-row { border-top: 1px dashed #e4dfd2; padding-top: 6px; }
@media (min-width: 601px) { .event-edit .link-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .event-edit .link-row + .link-row { border-top: 0; padding-top: 0; } }

/* Photo Gallery */
.gallery-upload[hidden] { display: none; }
.drop-zone { display: grid !important; justify-items: center; gap: 4px; text-align: center; border: 2px dashed #d9d1bd; border-radius: 12px; padding: 28px 16px; cursor: pointer; background: #fcfaf5; transition: border-color .15s, background .15s; position: relative; }
.drop-zone:hover, .drop-zone.over { border-color: var(--gold); background: #fbf4df; }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-icon { font-size: 2rem; } .drop-zone small { color: #888; font-weight: 400; }
.drop-count { font-weight: 700; color: var(--gold-deep); }
.album-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.album-chips a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; color: var(--text); background: #fff; }
.album-chips a small { color: #999; margin-left: 2px; }
.album-chips a.on { background: var(--black); color: var(--gold); border-color: var(--black); } .album-chips a.on small { color: #bbb; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 30px; }
.gallery-item { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #e9e4d8; }
.gallery-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gallery-open:hover img, .gallery-open:focus-visible img { transform: scale(1.05); }
.gallery-empty { text-align: center; padding: 50px 20px; color: #777; } .gallery-empty span { font-size: 2.6rem; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,8,10,.94); display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 50px 60px 0; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: 0; color: #fff; font-size: 2.4rem; width: 48px; height: 64px; border-radius: 8px; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.22); } .lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-bar { width: 100%; max-width: 1100px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 4px 18px; color: #ddd; flex-wrap: wrap; }
.lb-info { display: grid; gap: 2px; min-width: 0; } .lb-info b { color: #fff; } .lb-info span { font-size: .82rem; color: #aaa; }
.lb-actions { display: flex; gap: 8px; } .lb-actions form { margin: 0; } .lb-actions form[hidden] { display: none; }
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } .gallery-item { border-radius: 2px; }
  .lightbox { padding: 44px 0 0; } .lb-nav { display: none; } .lb-bar { padding: 12px 14px 18px; }
}

/* Gallery videos and upload progress */
.gallery-open video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; background: #111; }
.gallery-open { position: relative; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 1.1rem; padding-left: 3px; pointer-events: none; }
.lightbox video { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 4px; background: #000; }
.lightbox video[hidden], .lightbox img[hidden] { display: none; }
.upload-progress[hidden] { display: none; }
.upload-bar { height: 8px; background: #eee8da; border-radius: 99px; overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }

/* TIL Messenger photos and videos */
.chat-media { display: grid; gap: 4px; margin-top: 4px; max-width: 360px; }
.chat-media.multi { grid-template-columns: 1fr 1fr; }
.msg.mine .chat-media { margin-left: auto; }
.chat-media img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; display: block; background: #eee; }
.chat-media.multi img { height: 150px; }
.chat-media video { width: 100%; max-height: 360px; border-radius: 10px; background: #000; }
.attach-btn { font-size: 1.15rem; }
.chat-pending { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 20px; padding: 10px 0 0; }
.chat-pending[hidden] { display: none; }
.pending-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; max-width: 220px; }
.pending-chip img { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; } .pending-vid { font-size: 1.4rem; }
.pending-chip small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #666; }
.pending-chip button { background: none; border: 0; cursor: pointer; color: #888; }
.pending-note { color: var(--gold-deep); }
.people-map select { min-width: 220px; }
.load-earlier { display: block; margin: 4px auto 12px; }

/* Committee page links */
.committee-links { margin-bottom: 22px; }
.committee-link-list { display: grid; gap: 8px; }
.committee-link { display: flex; align-items: center; gap: 10px; }
.committee-link form { margin: 0; }
.committee-link a { flex: 1; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; align-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--black); background: #fff; }
.committee-link a:hover { border-color: var(--gold); }
.committee-link a span { grid-row: span 2; font-size: 1.4rem; text-align: center; }
.committee-link a small { color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.committee-link-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; margin-top: 14px; }
@media (max-width: 600px) { .committee-link-add { grid-template-columns: 1fr; } }

/* Reclamation List */
.big-action--dark { background: var(--black); color: #fff; border-color: var(--black); } .big-action--dark small { color: #bbb; }
.big-action--dark:hover { color: #fff; border-color: var(--gold); }
.recl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid #ece7db; }
.recl-row:last-child { border-bottom: 0; }
.recl-who { display: flex; gap: 12px; align-items: center; min-width: 0; } .recl-who > div:last-child { display: grid; gap: 1px; min-width: 0; }
.recl-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 0; }
.recl-by { grid-column: 1 / -1; }
.recl-status.recl-reclaimed { background: #dff3e4; } .recl-status.recl-contacted, .recl-status.recl-interested { background: #fbf0cf; }
.recl-status.recl-not-interested, .recl-status.recl-not-a-brother { background: #eee; }
@media (max-width: 800px) { .recl-row { grid-template-columns: 1fr; } .recl-form { grid-template-columns: 1fr auto; } .recl-form input { grid-column: 1 / -1; grid-row: 2; } }

/* Chapter History */
.history-filter { gap: 10px; align-items: center; flex-wrap: wrap; }
.history-filter { margin: 0; }
.history-filter select { width: auto; max-width: 220px; padding: 5px 8px; font-size: .85rem; color: var(--black); background: #fff; }
.history-filter .check { color: #fff; margin: 0; }
.history-star { color: var(--gold); }
.history-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.history-item .event-files { margin: 8px 0 4px; }

/* Inbox blinks until it's clicked after new mail arrives */
.mainnav a.nav-inbox.has-unread { animation: inboxBlink 1s steps(1, end) infinite; color: var(--black); font-weight: 700; }
@keyframes inboxBlink { 0% { background: var(--gold); } 50% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .mainnav a.nav-inbox.has-unread { animation: none; background: var(--gold); } }
.strip-sound { white-space: nowrap; }
.menu-btn.has-mail { animation: inboxBlink 1s steps(1, end) infinite; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .menu-btn.has-mail { animation: none; background: var(--gold); } }

/* Reimbursement invoice / budget request line items */
.line-items { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.line-items legend { font-weight: 700; padding: 0 6px; }
.line-items legend small { font-weight: 400; color: var(--muted); }
.line-list { display: grid; gap: 10px; }
.line-item { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 10px; padding: 12px 38px 12px 34px; background: #faf8f3; border: 1px solid var(--line); border-radius: 4px; }
.line-item label { font-size: .8rem; margin: 0; }
.line-item .line-wide { grid-column: 1 / -1; }
.line-no { position: absolute; left: 10px; top: 12px; font-weight: 700; color: var(--muted); font-size: .85rem; }
.line-total { align-self: end; justify-self: end; font-weight: 700; padding-bottom: 8px; white-space: nowrap; }
.line-remove { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--muted); }
.line-remove:hover { color: var(--text); border-color: var(--text); }
.line-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; font-size: .9rem; color: var(--muted); }
.line-totals b { color: var(--text); }
.line-totals .line-due { font-size: 1.05rem; color: var(--text); }
.line-head { font-size: .95rem; margin: 18px 0 8px; }
.table-scroll { overflow-x: auto; }
.line-table td, .line-table th { padding: 6px 8px; font-size: .84rem; vertical-align: top; }
.line-table .line-sum td { font-weight: 700; border-top: 2px solid var(--line); }
.paid-form { margin-top: 12px; gap: 8px; flex-wrap: wrap; }
.paid-form input { width: auto; flex: 1 1 200px; }
.request-layout { display: grid; gap: 0; }
.request-layout .line-item { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.line-items [data-add-line] { justify-self: start; width: auto; }
@media (max-width: 480px) {
  .line-item, .request-layout .line-item { grid-template-columns: 1fr 1fr; padding: 38px 10px 10px; }
  .line-no { top: 10px; }
}

/* Agenda Builder: the agenda edited in place, laid out like the chapter's Word template */
.agenda-meta-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 14px; }
.agenda-toolbar { position: sticky; top: 76px; z-index: 15; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--bg); padding: 10px 0; }
.agenda-toolbar code { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; font-size: .8rem; }
.agenda-paper { background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); padding: 28px 40px 48px 52px; margin-bottom: 30px; overflow-x: auto; }
.agenda-paper-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.agenda-paper-head img { width: 70px; } .agenda-paper-head span { font: 1rem Arial, sans-serif; }
#agenda-doc { min-width: 600px; font: 14px/1.3 Arial, Helvetica, sans-serif; color: #111; }
.ag-block { position: relative; display: grid; grid-template-columns: 23% 15% 31% 31%; border: 1.5px solid #000; margin-top: -1.5px; }
.ag-block > .ag-cell + .ag-cell { border-left: 1.5px solid #000; }
.ag-cell { padding: 4px 6px; min-height: 34px; display: flex; flex-direction: column; justify-content: center; }
.ag-field { width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; font: inherit; color: inherit; padding: 2px 3px; border-radius: 3px; }
.ag-field:hover { background: rgba(201,161,59,.10); } .ag-field:focus { outline: 2px solid var(--gold); background: #fffbea; color: #111; }
.ag-field::placeholder { color: #aaa; font-style: italic; font-weight: 400; }
.ag-bold { font-weight: 700; } .ag-center { text-align: center; } .ag-sub { font-style: italic; font-size: 13px; }
.ag-header { background: #bf9000; color: #fff; text-align: center; margin-top: 18px; } .ag-header .ag-cell { font-size: 13px; } .ag-header b { display: block; }
.ag-section, .ag-wide, .ag-labelrow { grid-template-columns: 1fr; }
.ag-labelrow { grid-template-columns: 23% 77%; }
.ag-section { background: #000; color: #fff; } .ag-section .ag-field:focus { color: #111; }
.ag-blackcell { background: #000; color: #fff; } .ag-blackcell .ag-field:focus { color: #111; }
.ag-wide .ag-cell { padding: 6px 10px 14px; }
.ag-rows { display: block; border: 0; margin: 18px 0; }
.ag-rowtable { width: 100%; border: 1.5px solid #000; }
.ag-row { display: grid; grid-template-columns: 22% 78%; position: relative; } .ag-row + .ag-row { border-top: 1.5px solid #000; }
.ag-row .ag-label { border-right: 1.5px solid #000; }
.ag-row-x { position: absolute; right: 4px; top: 4px; border: 0; background: #fff; border-radius: 4px; color: var(--muted); cursor: pointer; opacity: 0; z-index: 3; }
.ag-row:hover .ag-row-x, .ag-row:focus-within .ag-row-x { opacity: 1; }
.ag-morerow { border: 0; background: none; color: var(--gold-deep); font: 600 .8rem "Archivo", sans-serif; cursor: pointer; padding: 4px 0; opacity: 0; }
.ag-rows:hover .ag-morerow, .ag-rows:focus-within .ag-morerow { opacity: 1; }
.ag-block:hover, .ag-block:focus-within, .ag-block:has(.ag-handle[open]) { z-index: 4; }
.ag-handle { position: absolute; left: -30px; top: 3px; z-index: 6; }
.ag-rows > .ag-handle { top: 0; }
.ag-handle > summary { list-style: none; width: 22px; height: 26px; border-radius: 5px; border: 1px solid var(--line); background: #fff; color: var(--muted); font: 700 16px/24px Arial, sans-serif; text-align: center; cursor: pointer; opacity: .45; transition: opacity .15s; }
.ag-handle > summary::-webkit-details-marker { display: none; }
.ag-block:hover > .ag-handle > summary, .ag-block:focus-within > .ag-handle > summary, .ag-handle[open] > summary { opacity: 1; border-color: var(--gold); color: var(--gold-deep); }
.ag-handle-menu { position: absolute; left: 28px; top: 0; z-index: 20; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 18px 36px -18px rgba(0,0,0,.45); min-width: 260px; padding: 6px 0; }
.ag-handle-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 14px; font: .85rem "Archivo", sans-serif; cursor: pointer; color: var(--text); white-space: pre; }
.ag-handle-menu button:hover { background: #f4f2ec; color: var(--gold-deep); }
.ag-handle-label { font: 700 .68rem "Archivo", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 14px 4px; border-top: 1px solid #ece7db; margin-top: 4px; }
.ag-topiclink { display: flex; gap: 4px; justify-content: center; margin-top: 2px; flex-wrap: wrap; }
.ag-wide .ag-topiclink { justify-content: flex-start; }
.ag-addlink, .ag-chip, .ag-chip-x { border: 0; background: none; font: 600 11px "Archivo", sans-serif; cursor: pointer; padding: 2px 6px; border-radius: 999px; }
.ag-addlink { color: #999; opacity: 0; } .ag-block:hover .ag-addlink, .ag-block:focus-within .ag-addlink { opacity: 1; }
.ag-chip { background: #e8effc; color: #1155cc; } .ag-chip-x { color: var(--muted); padding: 2px; }
.link-dialog { border: 0; border-top: 4px solid var(--gold); border-radius: 6px; padding: 22px; width: min(460px, 92vw); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.link-dialog::backdrop { background: rgba(0,0,0,.45); } .link-dialog h2 { font-size: 1.2rem; }
.copy-link { border: 0; background: none; color: var(--gold-deep); font: 600 .8rem "Archivo", sans-serif; cursor: pointer; padding: 0; white-space: nowrap; }
.copy-link:hover { color: var(--black); } .copy-link.copied { color: var(--ok); }
@media (max-width: 760px) { .agenda-meta-grid { grid-template-columns: 1fr; } .agenda-paper { padding: 18px 12px 30px 42px; } .agenda-toolbar { top: 64px; } }

/* My Documents: Word-style ribbon and page */
.docs-head { flex-wrap: wrap; } .docs-head #note-status { margin-left: auto; }
.docs-head .share-menu { min-width: 300px; } .doc-delete { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ribbon { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: #faf8f3; }
.ribbon-group { display: flex; align-items: center; gap: 2px; padding-right: 8px; border-right: 1px solid var(--line); }
.ribbon-group:last-child { border-right: 0; }
.ribbon button, .ribbon .rb-btn, .ribbon .rb-color { background: #fff; border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; font: inherit; font-size: .84rem; cursor: pointer; min-width: 30px; line-height: 1.3; color: var(--text); white-space: nowrap; }
.ribbon button:hover, .ribbon .rb-btn:hover, .ribbon .rb-color:hover { border-color: var(--gold); }
.ribbon select { font-size: .82rem; padding: 4px 6px; width: auto; min-width: 0; }
#rb-font { width: 130px; } #rb-size { width: 62px; } #rb-block { width: 110px; }
.rb-color { position: relative; font-weight: 700; } .rb-color input { position: absolute; inset: auto 2px 1px 2px; width: calc(100% - 4px); height: 4px; padding: 0; border: 0; opacity: .9; cursor: pointer; }
.rb-tablegroup { background: #fff6dc; border-radius: 4px; padding: 0 6px; }
.doc-canvas { flex: 1; overflow: auto; background: #e9e6df; padding: 28px 16px 60px; }
.doc-page { background: #fff; width: 100%; max-width: 816px; min-height: 1056px; margin: 0 auto; padding: 96px; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 12px 30px -18px rgba(0,0,0,.35);
  font: 11pt/1.45 Arial, Helvetica, sans-serif; color: #111; outline: none; overflow-wrap: break-word; }
.doc-page:empty::before { content: attr(data-placeholder); color: #aaa497; }
.doc-page h1 { font: 700 20pt/1.25 Arial, sans-serif; margin: 0 0 .4em; } .doc-page h2 { font: 700 16pt/1.3 Arial, sans-serif; margin: .9em 0 .3em; }
.doc-page h3 { font: 700 13.5pt/1.3 Arial, sans-serif; margin: .9em 0 .3em; } .doc-page h4 { font: 700 12pt/1.3 Arial, sans-serif; margin: .9em 0 .3em; }
.doc-page p, .doc-page div { margin: 0 0 .5em; } .doc-page ul, .doc-page ol { padding-left: 28px; margin: 0 0 .6em; }
.doc-page blockquote { margin: 0 0 .6em 36px; font-style: italic; color: #444; }
.doc-page table { border-collapse: collapse; width: 100%; margin: 0 0 .8em; } .doc-page td, .doc-page th { border: 1px solid #888; padding: 5px 8px; vertical-align: top; min-width: 40px; }
.doc-page th { background: #f2f2f2; text-transform: none; letter-spacing: normal; font-size: inherit; color: inherit; text-align: left; font-weight: 700; } .doc-page img { max-width: 100%; height: auto; cursor: pointer; } .doc-page a { color: #1155cc; }
.doc-page hr { border: 0; border-top: 1px solid #999; margin: 10px 0; }
@media (max-width: 760px) { .doc-page { padding: 32px 22px; min-height: 0; } .doc-canvas { padding: 10px 6px 40px; } .ribbon { padding: 6px 8px; } }

/* My Spreadsheets */
.office-open { cursor: pointer; font-size: .85rem; }
.sh-formula { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.sh-namebox { min-width: 76px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; font: 600 .82rem/1.2 ui-monospace, Menlo, monospace; text-align: center; }
.sh-fx { font: italic 700 .9rem Georgia, serif; color: var(--muted); }
#sh-input { flex: 1; border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font: .9rem ui-monospace, Menlo, monospace; box-shadow: none; }
.sh-wrap { flex: 1; overflow: auto; background: #fff; outline: none; position: relative; }
.sh-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; font: 13px/1.2 Arial, Helvetica, sans-serif; color: #111; user-select: none; width: max-content; }
.sh-grid th, .sh-grid td { border-right: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; height: 22px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.sh-grid thead th { position: sticky; top: 0; z-index: 3; background: #f3f2ef; font: 600 12px Arial, sans-serif; color: #555; text-align: center; letter-spacing: 0; text-transform: none; height: 22px; box-sizing: border-box; }
.sh-grid tbody th { position: sticky; left: 0; z-index: 2; background: #f3f2ef; font: 12px Arial, sans-serif; color: #555; width: 46px; min-width: 46px; text-align: center; }
.sh-grid .sh-corner { left: 0; z-index: 4; width: 46px; }
.sh-grid thead th { overflow: visible; }
.sh-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; }
.sh-grid td { position: relative; background: #fff; max-width: 0; }
.sh-grid td.sh-sel { background-image: linear-gradient(rgba(201,161,59,.16), rgba(201,161,59,.16)); }
.sh-grid td.sh-active { outline: 2px solid var(--gold-deep); outline-offset: -2px; }
.sh-grid td.sh-wrapcell { white-space: normal; height: auto; }
.sh-grid td.sh-err { color: #b00020; }
.sh-frozen tbody tr:first-child td, .sh-frozen tbody tr:first-child th { position: sticky; top: 22px; z-index: 2; box-shadow: 0 2px 0 #c9c4b8; }
.sh-frozen tbody tr:first-child th { z-index: 3; }
.sh-editor { position: absolute; inset: 0; width: 100%; height: 100%; border: 2px solid var(--gold-deep); padding: 1px 4px; font: inherit; background: #fff; z-index: 6; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.sh-grid tfoot td { border: 0; padding: 8px 54px; background: #fff; max-width: none; }
.sh-tabs { display: flex; gap: 2px; padding: 0 10px; border-top: 1px solid var(--line); background: #f3f2ef; overflow-x: auto; flex: none; }
.sh-tab { border: 0; background: none; padding: 7px 16px; font: 600 .82rem "Archivo", sans-serif; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.sh-tab.on { background: #fff; color: var(--text); border-bottom-color: var(--gold); }
.sh-tab-add { font-size: 1rem; padding: 4px 12px; } .sh-tab-del { margin-left: auto; font-weight: 400; font-size: .76rem; }

/* My Presentations */
.sl-body { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 0; background: #e9e6df; }
.sl-thumbs { overflow-y: auto; padding: 12px 10px 30px; border-right: 1px solid var(--line); background: #f6f4ef; }
.sl-thumb { position: relative; display: flex; gap: 6px; margin-bottom: 12px; cursor: pointer; }
.sl-num { font: 600 .75rem "Archivo", sans-serif; color: var(--muted); width: 14px; text-align: right; padding-top: 2px; }
.sl-thumbframe { width: 168px; height: 94.5px; overflow: hidden; border: 2px solid transparent; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.2); flex: none; }
.sl-thumb.on .sl-thumbframe { border-color: var(--gold); }
.sl-thumbframe .sl-stage { transform-origin: 0 0; pointer-events: none; }
.sl-move { position: absolute; right: 4px; border: 0; background: rgba(255,255,255,.9); border-radius: 3px; font-size: 9px; padding: 1px 4px; cursor: pointer; opacity: 0; }
.sl-move:first-of-type { top: 4px; } .sl-move:last-of-type { top: 22px; }
.sl-thumb:hover .sl-move { opacity: 1; }
.sl-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sl-stagewrap { flex: 1; position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.sl-stagewrap::before { content: ""; width: var(--sl-w); height: var(--sl-h); grid-area: 1 / 1; }
.sl-stagewrap > .sl-stage { grid-area: 1 / 1; align-self: start; justify-self: start; position: absolute; left: calc(50% - var(--sl-w) / 2); top: calc(50% - var(--sl-h) / 2); box-shadow: 0 2px 6px rgba(0,0,0,.25), 0 20px 40px -24px rgba(0,0,0,.5); }
.sl-stage { position: relative; transform-origin: 0 0; overflow: hidden; flex: none; }
.sl-item { position: absolute; display: flex; flex-direction: column; overflow: visible; line-height: 1.2; white-space: pre-wrap; overflow-wrap: break-word; box-sizing: border-box; padding: 4px; user-select: none; }
.sl-item > div { min-height: 1em; }
.sl-image { padding: 0; } .sl-image img { width: 100%; height: 100%; display: block; object-fit: fill; }
.sl-shape-ellipse { border-radius: 50%; }
.sl-hint { color: rgba(128,128,128,.85); font-weight: 400; font-style: italic; }
.sl-stagewrap .sl-item:hover { outline: 1px dashed rgba(201,161,59,.8); }
.sl-stagewrap .sl-item.sl-selected { outline: 2px solid #c9a13b; cursor: move; }
.sl-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #c9a13b; border-radius: 50%; z-index: 5; }
.sl-nw { left: -8px; top: -8px; cursor: nwse-resize; } .sl-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.sl-ne { right: -8px; top: -8px; cursor: nesw-resize; } .sl-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.sl-textedit { width: 100%; height: 100%; border: 0; background: rgba(255,255,255,.08); resize: none; padding: 0; line-height: 1.2; outline: none; box-shadow: none; overflow: hidden; }
.sl-notes { height: 74px; flex: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; resize: vertical; padding: 10px 16px; font-size: .9rem; box-shadow: none; }
.sl-menu { position: relative; } .sl-menu > summary { list-style: none; } .sl-menu > summary::-webkit-details-marker { display: none; }
.sl-menu-list { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 18px 36px -18px rgba(0,0,0,.45); min-width: 200px; padding: 6px 0; }
.sl-menu-list button { display: block; width: 100%; text-align: left; border: 0 !important; background: none !important; padding: 8px 14px !important; border-radius: 0 !important; }
.sl-menu-list button:hover { background: #f4f2ec !important; color: var(--gold-deep); }
.ribbon .sl-present { background: var(--black); color: #fff; font-weight: 700; padding: 4px 14px; }
.ribbon .sl-present:hover { background: var(--gold); color: #000; }
.sl-itemtools { background: #fff6dc; border-radius: 4px; padding: 0 6px; }
#sl-theme { width: 140px; } #sl-font { width: 120px; } #sl-size { width: 58px; }
.sl-show { position: fixed; inset: 0; background: #000; z-index: 1000; cursor: pointer; }
.sl-show .sl-stage { position: absolute; }
.sl-showbar { position: absolute; bottom: 10px; right: 16px; color: rgba(255,255,255,.4); font: .78rem "Archivo", sans-serif; }
@media (max-width: 760px) { .sl-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .sl-thumbs { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .sl-thumb { margin: 0; } .sl-thumbframe { width: 120px; height: 67.5px; } }
.ribbon-group[hidden] { display: none; }

/* My Designs */
.office--designs .sl-body { grid-template-columns: 1fr; }
.design-new > summary { list-style: none; cursor: pointer; } .design-new > summary::-webkit-details-marker { display: none; }
.design-new form { background: rgba(255,255,255,.06); border-radius: 6px; padding: 10px; margin-top: 8px; color: #ddd; }
.design-new label { color: #ddd; font-size: .8rem; } .design-new select { font-size: .85rem; }
#sl-sizename { align-self: center; margin-left: auto; }
.sl-gallery { width: min(860px, 94vw); max-height: 86vh; overflow: auto; }
.sl-gallery-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; } .sl-gallery-head h2 { flex: 1; }
.sl-gallery-head select { width: auto; }
.sl-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sl-gallery-grid button { border: 0; padding: 0; background: #eee; aspect-ratio: 1; cursor: pointer; border-radius: 4px; overflow: hidden; }
.sl-gallery-grid button:hover { outline: 3px solid var(--gold); } .sl-gallery-grid button:disabled { opacity: .5; }
.sl-gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .page-head .download-menu .actions-menu { right: auto; left: 0; } }
.delegate-months { display: grid; gap: 8px; } .delegate-month { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.delegate-report .panel-head { flex-wrap: wrap; gap: 8px; }
.report-attachments { list-style: none; padding-left: 0; } .report-attachments li { margin: 4px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Live agenda */
.agv-paper { background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); padding: 26px clamp(10px, 4vw, 48px) 40px; margin-bottom: 30px; overflow-x: auto; }
.agv-doc { min-width: 640px; font: 14px/1.35 Arial, Helvetica, sans-serif; color: #111; }
.agv-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; } .agv-head img { width: 70px; } .agv-head span { font-size: 1rem; }
.agv-doc table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.agv-doc th, .agv-doc td { border: 1.5px solid #000; padding: 6px 8px 10px; vertical-align: middle; text-transform: none; letter-spacing: 0; font-size: 14px; color: #111; background: #fff; }
.agv-rows th { width: 22%; text-align: center; font-weight: 700; } .agv-doc small { display: block; font-style: italic; font-weight: 400; font-size: 13px; }
.agv-gold th { background: #bf9000; color: #fff; font-weight: 400; text-align: center; font-size: 13px; }
.agv-black th, .agv-doc .agv-blackcell { background: #000; color: #fff; text-align: center; font-weight: 700; }
.agv-black small { color: #fff; }
.agv-topic { font-weight: 700; text-align: center; } .agv-center { text-align: center; } .agv-wide { font-weight: 700; padding: 8px 10px 14px; }
.agv-doc a { color: #1155cc; } .agv-black a { color: #9cc3ff; }
.agv-state { display: inline-block; font-weight: 700; color: #b00020; margin-right: 6px; animation: agv-pulse 2s infinite; } .agv-state.agv-final { color: var(--muted); animation: none; }
@keyframes agv-pulse { 50% { opacity: .45; } }
.agv-flash { animation: agv-flash 1.4s ease-out; } @keyframes agv-flash { from { background: #fff6dc; } to { background: transparent; } }
.ag-status { font-size: .85rem; color: var(--muted); } .ag-status.ag-err { color: var(--err); font-weight: 600; }
.ag-locked { background: #fff6dc; border: 1px solid var(--gold); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }
.agv-complete .share-menu { right: 0; left: auto; width: min(340px, 90vw); } .agv-sig { font: italic 1.05rem "Times New Roman", Times, serif; color: var(--text); }
[data-free-link][hidden], [data-committee-pick][hidden], [data-room-note][hidden] { display: none !important; }

/* TIL1906 app intro: the crest flies in (0-3s), then the TIL logo with a loading bar (3-6s) */
html.til-intro-on, html.til-intro-on body { overflow: hidden; }
.til-intro { position: fixed; inset: 0; z-index: 9999; background: radial-gradient(circle at 50% 42%, #2b2312 0%, #0b0a08 55%, #050505 100%); display: grid; place-items: center; transition: opacity .6s ease; }
.til-intro.ti-done { opacity: 0; pointer-events: none; }
.ti-stage { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ti-crest-stage { perspective: 900px; transition: opacity .5s ease, transform .6s ease; }
.til-intro.ti-brand .ti-crest-stage { opacity: 0; transform: scale(1.25); }
.ti-crest { width: min(58vw, 300px); filter: drop-shadow(0 0 0 rgba(230,196,102,0)); animation: ti-fly 2.4s cubic-bezier(.16,.84,.3,1) both, ti-glow 1.2s 1.7s ease-in-out both; }
@keyframes ti-fly {
  0% { transform: translate3d(-45vw, 60vh, -900px) rotateY(-540deg) rotateZ(-25deg) scale(.15); opacity: 0; filter: blur(8px); }
  45% { opacity: 1; filter: blur(2px); }
  78% { transform: translate3d(0, -2vh, 60px) rotateY(10deg) rotateZ(2deg) scale(1.12); filter: blur(0); }
  100% { transform: translate3d(0, 0, 0) rotateY(0) rotateZ(0) scale(1); opacity: 1; }
}
@keyframes ti-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(230,196,102,0)); } 50% { filter: drop-shadow(0 0 28px rgba(230,196,102,.85)); } }
.ti-rays { position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(from 0deg, rgba(230,196,102,.10) 0 6deg, transparent 6deg 18deg);
  opacity: 0; animation: ti-rays 3s 1.2s ease-out both; mask: radial-gradient(circle, #000 0 18%, transparent 55%); -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 55%); }
@keyframes ti-rays { 0% { opacity: 0; transform: rotate(0deg) scale(.6); } 40% { opacity: 1; } 100% { opacity: .6; transform: rotate(40deg) scale(1); } }
.ti-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f4dc8f; box-shadow: 0 0 10px 3px rgba(244,220,143,.8); opacity: 0;
  animation: ti-spark 1.1s calc(1.75s + var(--d)) ease-out both; }
@keyframes ti-spark { 0% { opacity: 0; transform: rotate(var(--a)) translateX(30px) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(min(42vw, 220px)) scale(1); } }
.ti-brand-stage { opacity: 0; gap: 14px; transition: opacity .6s ease; }
.til-intro.ti-brand .ti-brand-stage { opacity: 1; }
.ti-logo { width: min(42vw, 190px); transform: scale(.85); transition: transform 3s ease-out; filter: drop-shadow(0 10px 28px rgba(0,0,0,.6)); }
.til-intro.ti-brand .ti-logo { transform: scale(1); }
.ti-name { margin-top: 10px; color: #e6c466; font: 800 clamp(1.25rem, 6.2vw, 1.9rem)/1 "Archivo", Arial, sans-serif; font-stretch: 80%; letter-spacing: .16em; white-space: nowrap; }
.ti-bar { position: relative; width: min(62vw, 260px); height: 6px; margin-top: 22px; border-radius: 999px; background: rgba(230,196,102,.18); overflow: hidden; animation: ti-blink 1s ease-in-out infinite; }
.ti-bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #94751f, #e6c466, #fff3c4); box-shadow: 0 0 12px rgba(230,196,102,.8); }
.til-intro.ti-brand .ti-bar span { animation: ti-load 3.1s .1s cubic-bezier(.4,.1,.3,1) forwards; }
@keyframes ti-load { to { width: 100%; } }
@keyframes ti-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.ti-tag { color: #cfc8b6; font: italic 400 .82rem "Cormorant Garamond", Georgia, serif; letter-spacing: .04em; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .ti-crest, .ti-rays, .ti-spark { animation: none; } }

/* Mobile menu: Submit and Documents open in place (accordion) instead of listing everything */
@media (max-width: 1279px) {
  .navgroup .navdrop, .navgroup:hover .navdrop, .navgroup:focus-within .navdrop { display: none; }
  .navgroup.open .navdrop { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; padding: 2px 0 8px 8px; }
  .navgroup.open .navdrop a { font-size: .88rem; padding: 8px 10px; white-space: normal; }
  .navgroup.open > a { border-color: var(--line); }
}
.nav-app-only { display: none !important; }
/* TIL1906 app: bottom tab bar (Home, Directory, Messenger, Inbox, Calendar) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0b0a08; border-top: 2px solid var(--gold); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #b9b2a2; text-decoration: none; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 4px 0; }
.tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--gold); }
.tabbar a.on svg { stroke-width: 2.2; }
.tabbar em { position: absolute; top: 0; left: calc(50% + 6px); background: #c0392b; color: #fff; font-style: normal; font-size: .64rem; font-weight: 800; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 999px; padding: 0 4px; }
.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
.has-tabbar .mainnav a.tab-dup { display: none; }
.has-tabbar .nav-app-only { display: block !important; }
.has-tabbar .chat { height: calc(100vh - 105px - 66px - env(safe-area-inset-bottom)); }
.has-tabbar .composer { bottom: calc(66px + env(safe-area-inset-bottom)); max-height: calc(100vh - 150px); }

/* iPhone zooms in on any text box smaller than 16px and stays zoomed; keep every box at 16px on touch screens */
@media (pointer: coarse) { input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; } }

/* TIL Messenger: unread total beside a folded-up section heading */
.sec-count { font-style: normal; background: #c0392b; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 800; line-height: 18px; margin-left: 6px; }
.side-sec:not(.collapsed) .sec-count { display: none; }

/* TIL Messenger: Reorder mode, group chats */
.messenger-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reorder-btn { font: inherit; font-family: "Archivo", system-ui, sans-serif; font-stretch: 100%; text-transform: none; letter-spacing: 0; font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.08); color: #e9e4d6; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.chat-side.reordering .reorder-btn { background: var(--gold); color: var(--black); border-color: var(--gold); }
.reorder-hint { color: #bdb7a8; font-size: .78rem; margin: -6px 10px 8px; }
.chat-side.reordering .side-move { opacity: 1; }
.chat-side.reordering .side-item { position: relative; }
.chat-side.reordering .side-item > a, .chat-side.reordering a.side-item { padding-right: 70px; }
.chat-side.reordering .dm-row form { display: none; }
.item-move { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; }
.item-move button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: .7rem; }
.item-move button:hover { background: var(--gold); color: var(--black); }
.new-group { margin: 6px 4px 4px; }
.new-group summary { cursor: pointer; color: var(--gold); font-size: .85rem; font-weight: 700; padding: 6px 6px; list-style: none; }
.new-group summary::-webkit-details-marker { display: none; }
.new-group form { background: rgba(255,255,255,.05); border-radius: 8px; padding: 10px; margin-top: 4px; gap: 8px; }
.new-group input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; padding: 7px 9px; }
.people-pick { max-height: 220px; overflow-y: auto; display: grid; gap: 2px; border: 1px solid rgba(127,127,127,.25); border-radius: 6px; padding: 6px; }
.people-pick label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .88rem; padding: 4px 2px; cursor: pointer; }
.people-pick label[hidden] { display: none; }
.people-pick input { width: auto; }
.new-group .people-pick label { color: #e2ddd0; }
.group-info { position: relative; }
.group-info summary { list-style: none; cursor: pointer; } .group-info summary::-webkit-details-marker { display: none; }
.group-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: min(320px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.2); padding: 12px; display: grid; gap: 12px; }
.group-panel ul { margin: 0; padding-left: 18px; max-height: 160px; overflow-y: auto; font-size: .9rem; }
.group-panel .inline { display: flex; gap: 6px; } .group-panel .inline input { padding: 6px 8px; }
label[hidden] { display: none !important; }

/* Visiting Brother / Guest portal */
.guest-link { margin-top: 12px; }
.guest-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.guest-card { display: grid; gap: 6px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 6px; padding: 16px 18px; text-decoration: none; color: var(--text); }
.guest-card:hover { border-color: var(--gold); }
.guest-card span { color: var(--muted); font-size: .9rem; }
.guest-note { display: grid; gap: 2px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.guest-note:hover { background: #faf8f3; }
.tabbar--4 { grid-template-columns: repeat(4, 1fr); }
.guestnav { display: flex !important; flex-direction: row !important; width: auto !important; padding: 0 !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.has-tabbar .guestnav { display: none !important; }

/* Guest Notifications (guest side) and the officers' Guest Portal */
.gn { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: calc(100vh - 220px); }
.has-tabbar .gn { min-height: calc(100vh - 150px - 66px); }
.gn-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.gn-tabs a { text-align: center; padding: 14px 8px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; }
.gn-tabs a.on { color: var(--black); border-bottom-color: var(--gold); }
.gn-tabs em, .gn-dot { font-style: normal; background: #c0392b; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 800; }
.gn-log { flex: 1; overflow-y: auto; padding: 16px; max-height: calc(100vh - 300px); }
.avatar--til { background: var(--gold); color: var(--black); font-size: .62rem; font-weight: 800; }
.side-label { margin: 0 6px !important; color: var(--gold); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.guest-portal-link { margin: 0 4px 6px; border: 1px solid rgba(201,161,59,.45); }

/* Sign-in page: Visiting Brother / Guest and TIL Torch Foundation side by side */
.login-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.login-alt .btn { width: 100%; padding-left: 8px; padding-right: 8px; white-space: normal; line-height: 1.2; min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; }
.btn--foundation { background: #2b2d31; color: #fff; border-color: #a7abb1; }
.btn--foundation:hover { background: #111214; color: #fff; }

/* TIL Torch Foundation portal: grey, white and black (the members portal is black and gold) */
body.foundation {
  --black: #1f2023; --ink: #2b2d31; --gold: #a7abb1; --gold-bright: #d5d8dc; --gold-deep: #4a4d52;
  --bg: #f1f2f4; --text: #1d1e20; --muted: #63676d; --line: #d9dbde;
}
body.foundation.auth { background: #1f2023 radial-gradient(circle at 50% 0%, #55595f, #1f2023 62%); }
body.foundation .strip { background: #111214; }
body.foundation .top { background: #fff; border-bottom-color: #a7abb1; }
body.foundation .tabbar { background: #1f2023; border-top-color: #a7abb1; }
body.foundation .tabbar a { color: #b9bcc1; }
body.foundation .tabbar a.on { color: #fff; }
body.foundation .chat-side { background: #2b2d31; color: #e4e6e9; }
body.foundation .feature, body.foundation .panel-head { background: #2b2d31; }
body.foundation .btn--gold { background: #d5d8dc; border-color: #d5d8dc; color: #1d1e20; }
body.foundation .btn--gold:hover { background: #fff; }
body.foundation .tile { background: #2b2d31; }
.btn--foundation img { height: 26px; width: auto; margin-right: 6px; }
body.foundation .auth-logo { height: 190px; }
