:root {
  color-scheme: light;
  font-family: "Manrope", sans-serif;
  --ink: #111026;
  --paper: #f6f1e8;
  --panel: #211e42;
  --line: rgba(17, 16, 38, 0.12);
  --violet: #8f6bff;
  --mint: #74f0bd;
  --peach: #ffb58f;
  --yellow: #f8dc67;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(79,67,99,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,67,99,0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 16px 16px;
}
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #6f52d9; outline-offset: 3px; }

.board-nav {
  position: sticky;
  z-index: 20;
  top: 16px;
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  color: white;
  background: rgba(22,20,48,0.94);
  box-shadow: 0 16px 48px rgba(17,16,38,0.18);
  backdrop-filter: blur(18px);
}
.board-brand { height: 66px; display: flex; align-items: center; gap: 11px; padding: 0 20px; text-decoration: none; font-size: 14px; letter-spacing: 0.1em; }
.board-brand strong { color: var(--mint); }
.brand-mark { width: 29px; height: 29px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(45deg); }
.brand-mark i { display: block; border-radius: 2px; background: var(--violet); }
.brand-mark i:nth-child(2) { background: var(--mint); }
.brand-mark i:nth-child(3) { background: var(--peach); }
.brand-mark i:nth-child(4) { background: var(--yellow); }
.board-nav nav { height: 66px; display: flex; align-items: center; gap: 4px; padding: 0 12px; border-left: 1px solid rgba(255,255,255,0.12); }
.board-nav nav a, .board-nav nav span { padding: 12px 14px; border-radius: 10px; font: 500 9px "DM Mono", monospace; letter-spacing: 0.09em; text-decoration: none; white-space: nowrap; }
.board-nav nav a:hover { background: rgba(255,255,255,0.08); }
.board-nav nav span { color: var(--ink); background: var(--mint); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 72px 24px 96px; }
.eyebrow { color: #756e87; font: 500 9px "DM Mono", monospace; letter-spacing: 0.16em; }
.board-hero { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 64px; align-items: end; padding: 42px 0 48px; }
.board-hero h1 { max-width: 760px; margin: 13px 0 20px; font-size: clamp(46px, 7vw, 82px); line-height: 0.98; letter-spacing: -0.055em; }
.board-hero > div > p { max-width: 670px; margin: 0; color: #70697e; font-size: 14px; line-height: 1.65; }
.head-card { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.68); box-shadow: 0 18px 48px rgba(17,16,38,0.08); }
.head-card img { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; background: var(--yellow); }
.head-card span { color: #81798e; font: 500 8px "DM Mono", monospace; letter-spacing: 0.12em; }
.head-card h2 { margin: 5px 0 4px; font-size: 22px; }
.head-card p { margin: 0; color: #70697e; font-size: 11px; }
.head-card .live-dot { position: absolute; top: 15px; right: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(116,240,189,0.18); }

.board-status { display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 48px rgba(17,16,38,0.12); }
.board-status div { min-height: 78px; display: grid; align-content: center; gap: 6px; padding: 0 22px; border-left: 1px solid rgba(255,255,255,0.1); }
.board-status div:first-child { border-left: 0; }
.board-status span { color: rgba(255,255,255,0.43); font: 500 8px "DM Mono", monospace; letter-spacing: 0.12em; }
.board-status strong { color: white; font-size: 16px; letter-spacing: 0.03em; }
.board-status div:nth-child(2) strong { color: var(--mint); }

.board-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,0.75fr); gap: 26px; margin-top: 54px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2, .decision-card h2, .discussion-card h2 { margin: 7px 0 0; font-size: 24px; }
.section-heading > p { max-width: 350px; margin: 0; color: #81798e; font-size: 11px; line-height: 1.55; text-align: right; }
.proposal-list { display: grid; gap: 12px; padding-top: 18px; }
.proposal-card { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,0.68); box-shadow: 0 12px 32px rgba(17,16,38,0.06); }
.proposal-card.approved { border-color: rgba(61,177,132,0.45); box-shadow: 0 0 0 3px rgba(116,240,189,0.16), 0 15px 38px rgba(17,16,38,0.08); }
.muse-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #ded7eb; }
.proposal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #81798e; font: 500 8px "DM Mono", monospace; letter-spacing: 0.08em; }
.proposal-meta strong { color: #514a62; font-size: 9px; }
.proposal-card h3 { margin: 9px 0 6px; font-size: 20px; line-height: 1.15; }
.proposal-card p { margin: 0; color: #70697e; font-size: 12px; line-height: 1.55; }
.vote-tally { min-width: 72px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 10px; border-radius: 13px; color: white; background: var(--ink); }
.vote-tally strong { font-size: 22px; }
.vote-tally span { color: rgba(255,255,255,0.55); font: 500 7px "DM Mono", monospace; letter-spacing: 0.1em; }
.approved .vote-tally { color: var(--ink); background: var(--mint); }
.approved .vote-tally span { color: rgba(17,16,38,0.58); }
.approved-badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; color: #17563e; background: rgba(116,240,189,0.3); }
.voters { grid-column: 2/-1; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.voters > span { color: #81798e; font: 500 7px "DM Mono", monospace; letter-spacing: 0.1em; }
.voter-avatars { display: flex; }
.voter-avatars img { width: 24px; height: 24px; margin-right: -6px; border: 2px solid white; border-radius: 8px; object-fit: cover; background: white; }

.board-sidebar { display: grid; align-content: start; gap: 16px; }
.decision-card, .discussion-card, .protocol-note { overflow: hidden; border-radius: 18px; color: white; background: var(--panel); box-shadow: 0 16px 42px rgba(17,16,38,0.12); }
.decision-card { padding: 22px; }
.decision-card .eyebrow, .discussion-card .eyebrow { color: var(--mint); }
.decision-content { margin-top: 18px; padding: 16px; border: 1px solid rgba(255,255,255,0.11); border-radius: 13px; background: rgba(255,255,255,0.05); }
.decision-content > span { color: rgba(255,255,255,0.42); font: 500 8px "DM Mono", monospace; letter-spacing: 0.1em; }
.decision-content h3 { margin: 8px 0 6px; color: var(--mint); font-size: 21px; }
.decision-content p { margin: 5px 0 0; color: rgba(255,255,255,0.66); font-size: 11px; line-height: 1.55; }
.instruction { margin-top: 14px !important; padding: 12px; border-radius: 10px; color: var(--ink) !important; background: var(--yellow); font-weight: 700; }
.discussion-card header { display: flex; justify-content: space-between; align-items: end; gap: 14px; padding: 20px 20px 13px; }
.discussion-card header > span { color: rgba(255,255,255,0.38); font: 500 8px "DM Mono", monospace; }
#discussion-list { display: grid; gap: 0; margin: 0; padding: 0 12px 12px; list-style: none; }
.discussion-note { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 11px 8px; border-top: 1px solid rgba(255,255,255,0.09); }
.discussion-note img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.discussion-note header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0; }
.discussion-note strong { font-size: 10px; }
.discussion-note time { color: rgba(255,255,255,0.32); font: 500 7px "DM Mono", monospace; }
.discussion-note p { margin: 4px 0 0; color: rgba(255,255,255,0.66); font-size: 11px; line-height: 1.5; }
.protocol-note { padding: 18px; color: var(--ink); background: var(--mint); }
.protocol-note strong { font: 700 9px "DM Mono", monospace; letter-spacing: 0.1em; }
.protocol-note p { margin: 8px 0 13px; font-size: 11px; line-height: 1.55; }
.protocol-note a { font: 700 8px "DM Mono", monospace; letter-spacing: 0.08em; }
.board-empty { padding: 50px 24px; border: 1px dashed rgba(17,16,38,0.2); border-radius: 17px; text-align: center; background: rgba(255,255,255,0.4); }
.board-empty strong { display: block; font-size: 19px; }
.board-empty p { max-width: 480px; margin: 9px auto 0; color: #81798e; font-size: 12px; line-height: 1.55; }
.discussion-card .board-empty { margin: 0 12px 12px; padding: 26px 14px; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.035); }
.discussion-card .board-empty strong { font-size: 12px; }
.discussion-card .board-empty p { color: rgba(255,255,255,0.5); font-size: 10px; }

@media (max-width: 900px) {
  .board-hero { grid-template-columns: 1fr; gap: 28px; }
  .head-card { max-width: 420px; }
  .board-layout { grid-template-columns: 1fr; }
  .board-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .protocol-note { grid-column: 1/-1; }
}

@media (max-width: 620px) {
  .board-nav { top: 8px; width: calc(100% - 16px); margin-top: 8px; }
  .board-brand { padding: 0 12px; font-size: 11px; }
  .brand-mark { width: 25px; height: 25px; }
  .board-nav nav { gap: 1px; padding: 0 6px; }
  .board-nav nav a, .board-nav nav span { padding: 9px 6px; font-size: 6px; }
  main { width: 100%; padding: 46px 12px 72px; }
  .board-hero { padding: 42px 8px 38px; }
  .board-hero h1 { font-size: 44px; }
  .board-status { grid-template-columns: repeat(2,1fr); }
  .board-status div:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,0.1); }
  .board-status div:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.1); }
  .board-layout { margin-top: 42px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .proposal-card { grid-template-columns: 44px minmax(0,1fr); }
  .muse-avatar { width: 44px; height: 44px; }
  .vote-tally { grid-column: 1/-1; grid-row: auto; min-height: 54px; grid-template-columns: auto auto; gap: 7px; }
  .voters { grid-column: 1/-1; }
  .board-sidebar { grid-template-columns: 1fr; }
  .protocol-note { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
