:root{color-scheme:light;font:15px/1.5 system-ui,sans-serif;color:#151515;background:#f1f1f1;--ink:#151515;--line:#cecece;--paper:#fff;--sub:#505050;--red:#bd1024;--red-bright:#ff3549}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
main{max-width:1120px;margin:auto;padding:clamp(16px,4vw,44px)}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.9rem,5.9vw,4.45rem);font-weight:950;line-height:1.04;letter-spacing:-.045em;text-transform:uppercase;overflow-wrap:anywhere}
h2{font-size:1.55rem;line-height:1.2;font-weight:800}
h3{font-size:1.07rem;margin-bottom:8px}
.section-head,.mass-issue{display:flex;justify-content:space-between;align-items:center;gap:12px}
.masthead{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:clamp(18px,4vw,40px) 12px;padding:clamp(19px,3.5vw,38px);background:#080808;color:#fff}
.masthead::before,.masthead::after{content:"";position:absolute;pointer-events:none}
.masthead::before{inset:0;z-index:-1;background:#2e2e2e;clip-path:polygon(0 35%,22% 79%,8% 63%,24% 95%,0 63%,0 100%,18% 100%,9% 83%,34% 100%,75% 100%,100% 47%,100% 62%,85% 89%,100% 75%,100% 100%,0 100%)}
.masthead::after{inset:9px;border:1px solid #b9b9b9}
.eyebrow{font-size:.77rem;text-transform:uppercase;letter-spacing:.22em;margin-bottom:4px}
.forum-wordmark{font-weight:950;text-transform:uppercase;font-size:clamp(.84rem,2.5vw,1.36rem);letter-spacing:-.025em;line-height:1.08}
.forum-wordmark span{color:var(--red-bright)}
.forum-mark{width:clamp(35px,7vw,64px);height:auto;justify-self:end}
.masthead-title{grid-column:1/-1}
.masthead-title p{margin-top:6px;color:#dedede;font-size:.9rem;letter-spacing:.12em;text-transform:uppercase}
.connection{grid-column:1/-1;justify-self:start;color:#e0e0e0;font-size:.8rem;border-left:3px solid var(--red-bright);padding-left:8px}
.masthead .logout{position:absolute;right:clamp(19px,3.5vw,38px);bottom:clamp(17px,3vw,34px);padding:4px 9px;background:#080808;color:#fff;border-color:#b9b9b9;font-size:.8rem}
.masthead:has(.logout) .masthead-title p{padding-right:62px}
.preview{margin-top:16px;padding:8px 12px;background:#e5e5e5;color:#393939;border-left:3px solid #555}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:17px 0 24px;padding-bottom:11px;border-bottom:1px solid var(--line)}
button,select,input{font:inherit}
button{padding:7px 11px;border:1px solid var(--line);border-radius:3px;background:var(--paper);color:inherit;cursor:pointer;font-weight:650}
button:disabled{opacity:.48;cursor:default}
button[aria-current],.primary{background:var(--red);border-color:var(--red);color:#fff}
button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.notice{padding:8px 12px;margin-bottom:16px;background:var(--paper);border:1px solid var(--line);border-left:3px solid var(--ink)}
.notice.error{background:#fff0f1;color:#890e1c;border-color:#e2b4ba;border-left-color:var(--red)}
.muted{color:var(--sub);margin-top:5px}
.section-head{margin-bottom:16px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}
.stat{padding:10px 12px;background:var(--paper);border-top:3px solid var(--ink);min-width:0}
.stat:last-child{border-top-color:var(--red)}
.stat strong{display:block;color:var(--ink);font-size:1.75rem;line-height:1.1;font-variant-numeric:tabular-nums}
.stat span{font-size:.85rem;color:var(--sub)}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:3px;background:var(--paper)}
table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;text-align:left}
th,td{padding:8px 11px;border-bottom:1px solid #e4e4e4;vertical-align:middle}
thead th{background:#171717;color:#fff;font-size:.82rem}
tbody tr:last-child>*{border-bottom:0}
tbody tr:nth-child(even){background:#f7f7f7}
.numeric{text-align:right;white-space:nowrap}
.emphasis{font-weight:700;color:var(--ink)}
.cancelled{color:#5e5e5e;text-decoration:line-through}
.panel,dialog{background:var(--paper);border:1px solid var(--line);border-radius:3px;padding:16px}
.panel{margin-bottom:16px}
.paired{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fields,.event-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:12px}
.panel>p.muted{margin-bottom:12px}
label{display:grid;gap:4px;color:var(--sub);font-size:.87rem}
.wide{grid-column:span 2}
input:not([type=checkbox]),select{width:100%;min-width:0;padding:7px 8px;border:1px solid #a8a8a8;border-radius:3px;background:var(--paper);color:var(--ink)}
input[type=checkbox]{accent-color:var(--red)}
input[type=number].compact{width:5.5rem;text-align:right;padding:5px 6px}
.checkbox{display:flex;align-items:center;gap:6px;margin:12px 0}
.bill-fields{margin:10px 0;padding:8px 10px 10px;border:1px solid var(--line);border-radius:6px;min-inline-size:0}
.bill-fields legend{padding:0 4px;color:var(--sub);font-size:.87rem}
.bill-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.bill-fields p{font-size:.84rem}
.result{margin:10px 0;color:var(--ink);font-weight:600}
.result.error{color:#890e1c}
.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.bottom,.event-list,.panel .table-wrap{margin-top:12px}
.event-list label{align-self:end}
.event-group{display:flex;align-items:end;gap:5px}
.event-group label{flex:1;min-width:0}
.mass-issue{border-block:1px solid var(--line);padding:10px 0;margin-bottom:16px}
.journal-controls{margin-bottom:12px}
.journal-controls label{min-width:145px}
.participant {
  max-width: 760px;
  padding: clamp(14px, 4vw, 32px);
}
.participant.entrance { max-width: 580px; }
.participant .masthead {
  margin-bottom: 16px;
  border-radius: 25px;
  padding: clamp(22px, 5vw, 34px);
  gap: 18px 12px;
}
.participant .masthead::after { border-radius: 18px; border-color: #ffffff36; }
.participant h1 { font-size: clamp(1.65rem, 6vw, 3.2rem); }
.participant .masthead .logout {
  position: static;
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 12px;
  background: #ffffff12;
}
.participant .masthead:has(.logout) .masthead-title p { padding-right: 0; }
.participant .notice { border-radius: 14px; }
.entrance-panel {
  padding: clamp(18px, 4vw, 28px);
  border-color: #e0e0e0;
  border-radius: 23px;
}
.entrance-panel form { display: grid; gap: 15px; margin-top: 20px; }
.account-field { display: grid; gap: 5px; }
.account-field > span { color: var(--sub); font-size: .87rem; }
.account-trigger,
.entrance-panel input:not([type=hidden]),
.entrance-panel .primary {
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
  padding: 10px 14px;
}
.account-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: #fafafa;
}
.chevron {
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border: solid var(--red);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
}
.entrance-panel .result { margin: 0; }
.account-picker {
  width: min(100% - 28px, 460px);
  max-width: none;
  max-height: min(76dvh, 620px);
  border: 0;
  border-radius: 24px;
  padding: 18px;
  overflow: auto;
}
.account-picker header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.account-picker header button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  font-size: 1.25rem;
}
.account-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.account-options button {
  min-height: 48px;
  padding: 6px 8px;
  border-color: #e6e6e6;
  border-radius: 12px;
  background: #f7f7f7;
}
.account-options button:last-child { grid-column: 1 / -1; }
.account-options button[aria-pressed="true"] {
  background: #fff0f2;
  border-color: var(--red);
  color: var(--red);
}
.balance-card {
  background: #a90e20;
  color: #fff;
  border-radius: 21px;
  padding: 18px 22px;
  margin-bottom: 10px;
}
.balance-card p { margin-top: 4px; }
.balance-card strong { font-size: clamp(2.1rem, 9vw, 3.6rem); line-height: 1.05; }
.participant .stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}
.participant .stat {
  padding: 11px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 15px;
  overflow-wrap: anywhere;
}
.participant .stat strong { font-size: clamp(1.2rem, 5vw, 1.65rem); }
.participant .stat span { font-size: .82rem; }
.participant .section-head button { min-height: 44px; border-radius: 12px; }
.activity-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.activity-card {
  border: 1px solid #e2e2e2;
  border-radius: 17px;
  padding: 12px 14px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.activity-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.activity-date { color: var(--sub); font-size: .76rem; }
.activity-kind {
  padding: 2px 8px;
  border-radius: 99px;
  background: #efefef;
  font-size: .74rem;
  font-weight: 700;
}
.activity-kind.accrual { background: #fff0f2; color: #9e1022; }
.activity-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-title { margin-top: 6px; font-weight: 700; }
.participant details { margin-top: 4px; font-size: .9rem; }
.participant summary { color: var(--red); cursor: pointer; font-weight: 650; padding: 9px 0; }
.participant details ul { margin: 2px 0 0; padding-left: 20px; }
.participant details li + li { margin-top: 3px; }
#team-links a{color:var(--ink)}
dialog{max-width:440px;width:calc(100% - 32px)}
dialog p{margin:8px 0}
dialog::backdrop{background:#0009}
@media(max-width:670px){
  .paired{grid-template-columns:1fr}
  .stats{grid-template-columns:repeat(2,1fr)}
  th,td{padding:7px 8px}
}
@media(max-width:430px){
  .wide{grid-column:auto}
  .mass-issue{align-items:flex-start;flex-direction:column}
  .masthead-title p{font-size:.75rem}
  .participant .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .participant .section-head{align-items:flex-start;flex-direction:column}
}
@media (max-width: 540px) {
  .account-picker {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    margin: 0;
    border-radius: 24px 24px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}
