/* ==========================================================================
   site.css — the pages around the device: the board library, feature
   requests and accounts. Shares every colour token with styles.css so the
   two never drift apart; only the layout is different, because a page you
   read is not a board you operate.
   ========================================================================== */

body.site {
  display: block;
  min-height: 100%;
  user-select: auto;
  line-height: 1.55;
}

.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 32px; height: 32px; border-radius: 10px; }

.site-nav { display: flex; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; }
.site-nav button, .site-nav a {
  padding: 9px 14px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.site-nav button { border-radius: 999px; }
.site-nav button[aria-current="true"] {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 38%, transparent);
}
.site-nav a:hover, .site-nav button:hover { color: var(--ink); }

.auth-area { display: flex; align-items: center; gap: 8px; }
.who { font-weight: 700; font-size: .9rem; }
.who span { display: block; color: var(--ink-soft); font-weight: 400; font-size: .8rem; }

.site-main { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }

.hero {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.hero h1 {
  margin: 0 0 10px;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero p { margin: 0 0 16px; color: var(--ink-soft); max-width: 62ch; }
.hero .row { gap: 10px; }
.hero .row > * { flex: 0 0 auto; }

.view[hidden] { display: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 12px;
}
.section-head h2 { margin: 0; font-size: 1.25rem; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: .9rem; flex: 1 1 260px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.card {
  border: none;
  box-shadow: inset 0 0 0 2px var(--line), 0 4px 16px rgba(15, 25, 45, .06);
  border-radius: 20px;
  background: var(--panel);
  padding: 16px 18px;
  transition: transform .15s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 2px var(--line), 0 10px 26px rgba(15, 25, 45, .12);
}
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 { margin: 0; font-size: 1.02rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.card .meta { font-size: .8rem; color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; }
.card .spacer { flex: 1 1 auto; }

/* A request is a row, not a card: the vote count is the thing being compared,
   and a column of numbers compares far better than a grid of boxes. */
.request {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: none;
  box-shadow: inset 0 0 0 2px var(--line), 0 4px 16px rgba(15, 25, 45, .05);
  border-radius: 20px;
  background: var(--panel);
}
.request + .request { margin-top: 8px; }

.votebtn {
  flex: 0 0 auto;
  width: 66px;
  padding: 10px 0;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.votebtn b { display: block; font-size: 1.15rem; }
.votebtn span { font-size: .7rem; color: var(--ink-soft); }
.votebtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.votebtn[aria-pressed="true"] span { color: inherit; opacity: .85; }

.request .grow { flex: 1 1 auto; min-width: 0; }
.request h3 { margin: 0 0 4px; font-size: 1.02rem; }
.request .body { margin: 0 0 8px; color: var(--ink-soft); font-size: .92rem; white-space: pre-wrap; }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-soft);
}
/* Status is state, so it gets its own colour language, separate from the accent. */
.tag.status-open     { background: var(--panel-2); }
.tag.status-planned  { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.tag.status-building { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.tag.status-done     { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.tag.status-declined { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
:root[data-theme="dark"] .tag.status-planned  { background: #1e3a8a; color: #dbeafe; border-color: #1d4ed8; }
:root[data-theme="dark"] .tag.status-building { background: #78350f; color: #fef3c7; border-color: #b45309; }
:root[data-theme="dark"] .tag.status-done     { background: #14532d; color: #dcfce7; border-color: #16a34a; }
:root[data-theme="dark"] .tag.status-declined { background: #374151; color: #d1d5db; border-color: #4b5563; }

.comment {
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  margin: 8px 0 0 4px;
}
.comment b { font-size: .88rem; }
.comment.from-team { border-left-color: var(--accent); }
.comment .when { color: var(--ink-soft); font-size: .78rem; }
.comment p { margin: 4px 0 0; white-space: pre-wrap; }

.empty-note {
  padding: 34px 18px;
  text-align: center;
  color: var(--ink-soft);
  border: 2px dashed var(--line);
  border-radius: 14px;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel-2);
  margin-bottom: 16px;
}
.notice.warn { border-color: #f59e0b; }
.notice code { font-size: 1.05rem; font-weight: 800; letter-spacing: .06em; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button {
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  font-weight: 700;
  font-size: .88rem;
}
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 22px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-soft);
  font-size: .86rem;
  text-align: center;
}
.site-foot a { color: inherit; }
.site-foot .moto {
  font-weight: 800;
  color: var(--ink);
  max-width: 56ch;
  margin: 0 auto 14px;
}
