/* The page's look, from design/: one family, a warm grey ground, white cards, one red. */

:root {
  --ink: #111112;
  --muted: #5F6267;
  --line: #BDBDB8;
  --rule: #E2E2DE;
  --ground: #F3F3F1;
  --card: #FFFFFF;
  --red: #D13C22;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
button { font: inherit; }
button:hover { opacity: .82; }
.l { font-size: 12px; line-height: 1.4; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* The bar at the top. */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 72px; }
.top-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; letter-spacing: -0.035em; font-size: 21px; }
.brand-mark { display: block; width: 12px; height: 12px; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: 50%; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; box-sizing: border-box; cursor: pointer; white-space: nowrap; background: transparent; color: var(--ink); border: 1px solid transparent; font-weight: 500; height: 44px; padding: 0 18px; font-size: 14px; }
.primary { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; cursor: pointer; white-space: nowrap; background: var(--red); color: #FFFFFF; border: 0; font-weight: 600; height: 52px; padding: 0 26px; font-size: 15px; }

/* Two columns on wide screens: the polis and its tabs on the left, its coin and seat on the right. */
.pg { flex: 1 0 auto; width: 100%; max-width: 1328px; box-sizing: border-box; margin: 0 auto; padding: 8px clamp(20px, 5vw, 64px) 88px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px 40px; align-items: start; }
.pg > .in { grid-column: 1; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pg > .rest { grid-column: 1; grid-row: 2; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pg > .rail { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; margin-top: 24px; }
.single { flex: 1 0 auto; width: 100%; max-width: 1200px; box-sizing: border-box; margin: 0 auto; padding: 8px clamp(20px, 5vw, 64px) 88px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 920px) {
  .pg { grid-template-columns: minmax(0, 1fr); }
  .pg > .in, .pg > .rest, .pg > .rail { grid-column: 1; grid-row: auto; }
  .pg > .rail { position: static; margin-top: 0; }
}

.intro { display: flex; flex-direction: column; gap: 18px; padding: 24px 0 8px; }
.goal { margin: 0; max-width: 760px; font-weight: 400; letter-spacing: -0.035em; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.06; text-wrap: balance; overflow-wrap: anywhere; }
.lede { max-width: 660px; margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Cards. */
.card { display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; padding: 28px; background: var(--card); border-radius: 20px; min-width: 0; }
.card.tight { gap: 6px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; min-height: 24px; }
.card-head h3 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.more::after { content: "→"; }
.big { font-weight: 500; letter-spacing: -0.035em; font-size: 40px; line-height: 1.1; }
.big small { font-size: 20px; letter-spacing: -0.01em; }
.mid { font-weight: 500; letter-spacing: -0.035em; font-size: 26px; line-height: 1.15; }
.quote { max-width: 700px; margin: 0; letter-spacing: -0.02em; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.35; text-wrap: pretty; }
.prose { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }
.prose h4 { margin: 8px 0 0; font-size: 15px; font-weight: 600; }
.prose p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.prose ol, .prose ul { margin: 0; padding-left: 1.4em; font-size: 15px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* The coin in the rail. */
.coin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coin-name { display: flex; align-items: center; gap: 12px; }
.coin-name h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.coin-mark { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); }
.coin-mark::after { content: ""; display: block; width: 9px; height: 9px; border-radius: 50%; background: #FFFFFF; }
.locked { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }

/* Tabs. */
.tabs { display: flex; flex-wrap: nowrap; gap: 0 30px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.tabs::-webkit-scrollbar { display: none; }
/* A fade at an edge with more tabs beyond it, so a row that scrolls looks like one. */
.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
/* One row on every screen: where the tabs do not fit, the row scrolls sideways. The line under
   the row is a shadow, so the open tab's underline can sit on it without spilling out of a row
   that scrolls. */
.tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; box-sizing: border-box; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; color: var(--ink); }
.tab .count { font-size: 13px; font-weight: 400; color: var(--muted); }
.panel { display: flex; flex-direction: column; gap: 20px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.panel-head > div:first-child { flex: 1 1 360px; min-width: 0; }
.panel-head h2 { margin: 0; font-weight: 400; letter-spacing: -0.035em; font-size: 32px; line-height: 1.1; }
.panel-head p { max-width: 620px; margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 999px; }
.toggle button { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; font-weight: 600; }

/* Lists of rows: tasks, the record, workers. */
.rows { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 14px 0; border-top: 1px solid var(--rule); }
.row .what { flex: 999 1 240px; min-width: 0; }
.row .title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.row .meta { font-size: 13px; color: var(--muted); }
.row .amount { flex: 1 1 130px; text-align: right; }
.row .amount > * { display: block; }
.row .amount b { font-size: 16px; font-weight: 600; }
.row .amount span { font-size: 13px; color: var(--muted); }
.row .amount .verdict { font-size: 15px; color: var(--muted); }
/* A card that is only a list needs no rule above its first row. */
.card.list .rows > .row:first-child { border-top: 0; padding-top: 0; }
.row .rank { flex: 0 0 18px; font-size: 13px; color: var(--muted); }
.dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1px solid var(--muted); }
.dot.paid { background: var(--red); border: 0; }
.empty { margin: 0; font-size: 15px; color: var(--muted); }
.show-more { align-self: flex-start; border: 1px solid var(--line); }

/* Facts: a label on the left, its value on the right. */
.facts { display: flex; flex-direction: column; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.fact > span:first-child { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.fact > span:last-child { text-align: right; overflow-wrap: anywhere; }

/* Bars that split an amount into its parts. */
.bar { display: flex; gap: 3px; height: 12px; }
.bar > div { min-width: 4px; border-radius: 4px; box-sizing: border-box; }
.key { display: block; width: 14px; height: 8px; border-radius: 3px; box-sizing: border-box; }
.k-ink { background: var(--ink); }
.k-red { background: var(--red); }
.k-grey { background: var(--muted); }
.k-open { border: 1px solid var(--muted); }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 20px 28px; }
.parts .mid small { font-size: 16px; letter-spacing: -0.01em; }
.parts .label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.parts .sub { margin: 2px 0 0 22px; font-size: 13px; color: var(--muted); }
.stats { display: flex; flex-direction: row; flex-wrap: wrap; gap: 22px 28px; }
/* The numbers share a row while they fit, each never narrower than its number; only then wrap. */
.stats > div { flex: 1 1 0; min-width: min-content; }
.stats .big { white-space: nowrap; }
.stats .what { margin-top: 6px; font-size: 15px; font-weight: 500; }
.stats .sub { font-size: 13px; color: var(--muted); }
@media (max-width: 920px) {
  .stats { gap: 16px 20px; }
  .stats .big { font-size: clamp(22px, 7vw, 40px); }
  .stats .big small { font-size: .5em; }
  .stats .what { font-size: 13px; }
}

/* The list of polises. */
.polises { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.polis-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--card); border-radius: 20px; }
.polis-card h2 { margin: 0; font-weight: 400; letter-spacing: -0.03em; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.heading { margin: 0; font-weight: 400; letter-spacing: -0.035em; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.06; }
.notice { padding: 28px; background: var(--card); border-radius: 20px; }

footer { border-top: 1px solid var(--rule); }
footer .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; font-size: 13px; color: var(--muted); }
