/* Innovation idea board — styled to match donatien.ca ("Refined Dark").
   Palette + type mirror donatien.ca's tokens.css / site.css. */
:root {
  /* palette (from donatien tokens) */
  --bg: #0a0c10;
  --panel: #12151c;       /* surface  */
  --panel2: #1a1e28;      /* surface2 */
  --line: #252a3a;        /* border   */
  --ink: #e1e4ed;         /* text     */
  --muted: #7a8099;       /* text2    */
  --muted-bright: #cfd4e2;
  --accent: #f97316;      /* orange   */
  --accent-hover: #fb8536;
  --accent-soft: rgba(249, 115, 22, 0.12);
  --good: #22c55e;
  --mid: #eab308;
  --bad: #ef4444;
  --good-bg: rgba(34, 197, 94, 0.14);
  --mid-bg: rgba(234, 179, 8, 0.14);
  --bad-bg: rgba(239, 68, 68, 0.14);
  --team: #22d3ee;
  /* layout / motion */
  --radius: 14px;
  --radius-sm: 10px;
  --ease: 0.18s ease;
  --shadow: 0 1px 0 rgba(255,255,255,0.02), 0 12px 32px -18px rgba(0,0,0,0.7);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.65; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* signature warm glow at the top */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: 0;
  background: radial-gradient(80% 100% at 50% -20%, rgba(249,115,22,0.06), transparent 70%);
}
.topbar, .view, .foot, #app { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--muted-bright); }
.muted { color: var(--muted); }
code { background: var(--accent-soft); color: var(--muted-bright); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* Buttons */
button, .btn-primary {
  cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14px;
  border-radius: var(--radius-sm); padding: 11px 20px; border: 1px solid var(--accent);
  background: var(--accent); color: #0a0c10; transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
button:hover, .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #0a0c10; transform: translateY(-2px); text-decoration: none; }
button.ghost, .ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 600;
  padding: 8px 14px; width: auto;
}
button.ghost:hover, .ghost:hover { color: var(--ink); border-color: var(--accent); background: transparent; transform: none; }

/* Gate */
.gate {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(90% 70% at 50% -10%, rgba(249,115,22,0.10), var(--bg) 70%);
  padding: 20px; z-index: 50;
}
.gate-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px; width: min(390px, 100%); text-align: center;
}
.gate-card h1 { margin: 0 0 6px; font-weight: 800; letter-spacing: -0.5px; font-size: 26px; }
.gate-card input {
  width: 100%; margin: 20px 0 14px; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink);
}
.gate-card input:focus { outline: none; border-color: var(--accent); }
.gate-card button { width: 100%; }
.gate-error { color: var(--bad); margin: 12px 0 0; font-size: 13.5px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 12, 16, 0.82); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.5px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.wm-accent { color: var(--accent); }
.brand-sub { color: var(--muted); font-size: 13px; flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.pill-link {
  font-size: 13px; font-weight: 700; padding: 7px 14px; border: 1px solid var(--accent);
  border-radius: 999px; color: var(--accent); white-space: nowrap; transition: all var(--ease);
}
.pill-link:hover { background: var(--accent); color: #0a0c10; text-decoration: none; }
#signout { font-size: 13px; }

.view { max-width: 1080px; margin: 0 auto; padding: 30px 24px 70px; }
.foot { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; font-size: 12px; text-align: center; color: var(--muted); }

/* List header */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.6px; }
.list-head p { max-width: 680px; }
.list-head p strong { color: var(--muted-bright); font-weight: 700; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; cursor: pointer; user-select: none; }
th.sorted { color: var(--accent); }
th.sorted::after { content: " ▾"; }
th.asc::after { content: " ▴"; }
th.num, td.num { text-align: center; padding-left: 9px; padding-right: 9px; }
tbody tr { cursor: pointer; transition: background var(--ease); }
tbody tr:hover { background: var(--panel2); }
tbody tr:last-child td { border-bottom: none; }
.idea-title { font-weight: 700; color: var(--ink); white-space: normal; }
.idea-title small { display: block; font-weight: 400; color: var(--muted); white-space: normal; margin-top: 2px; }

.badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.badge.sample { background: var(--mid-bg); color: var(--mid); }

.composite { font-weight: 800; font-size: 17px; color: var(--accent); }
.score-pill { display: inline-block; min-width: 27px; text-align: center; font-weight: 800; padding: 2px 7px; border-radius: 8px; font-size: 13px; }
.s-good { background: var(--good-bg); color: var(--good); }
.s-mid  { background: var(--mid-bg);  color: var(--mid); }
.s-bad  { background: var(--bad-bg);  color: var(--bad); }

/* 2x2 */
.quad { margin: 0 0 26px; }
.quad h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.quad-box { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
svg { display: block; width: 100%; height: auto; }
.dot { cursor: pointer; }
.dot circle { transition: fill-opacity var(--ease); }
.dot:hover circle { fill-opacity: 0.55; }
.dot-label { font-size: 11px; font-weight: 600; fill: var(--muted-bright); }
.axis-label { font-size: 11px; font-weight: 600; fill: var(--muted); }

/* Detail */
.back { font-size: 14px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--accent); }
.detail-head { margin: 14px 0 4px; }
.detail-head h2 { margin: 8px 0 8px; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.6px; }
.detail-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.detail-meta strong { color: var(--ink); }
.one-liner { font-size: 17px; color: var(--muted-bright); margin: 12px 0 26px; max-width: 760px; }
.card.prop { margin-top: 18px; }
.card.prop p { font-size: 17px; color: var(--muted-bright); margin: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px){ .grid2 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 22px; }
.card h3 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }

.score-row { margin: 14px 0; }
.score-row .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.score-row .label { font-weight: 700; font-size: 14px; }
.bar { height: 7px; border-radius: 999px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.score-why { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }
.score-why a { font-weight: 600; }
.conf { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; }
.conf.low { color: var(--bad); } .conf.med { color: var(--mid); } .conf.high { color: var(--good); }

.bc-section { margin-bottom: 18px; }
.bc-section:last-child { margin-bottom: 0; }
.bc-section h4 { margin: 0 0 5px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.bc-section p { margin: 0; color: var(--muted-bright); }
ul.qs { margin: 6px 0 0; padding-left: 18px; color: var(--muted-bright); }
ul.qs li { margin: 6px 0; }

/* Forms (submit + answers) */
.ans-q { margin: 15px 0; }
#answers-form label, #submit-form label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
#answers-form textarea, #answers-form input,
#submit-form textarea, #submit-form input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: inherit; resize: vertical;
}
#answers-form textarea:focus, #answers-form input:focus,
#submit-form textarea:focus, #submit-form input:focus { outline: none; border-color: var(--accent); }
#answers-form textarea::placeholder, #submit-form textarea::placeholder,
#answers-form input::placeholder, #submit-form input::placeholder { color: var(--muted); opacity: .7; }
.ans-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
#ans-note, #idea-note { font-size: 13px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 70px 20px; }
.empty h2 { color: var(--ink); font-weight: 800; letter-spacing: -0.4px; }

/* Team voting */
.voter-pick { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font: 600 13px/1 var(--font); padding: 7px 12px; cursor: pointer; }
.voter-pick:focus { outline: none; border-color: var(--accent); }
.voter-select { max-width: 280px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.voter-select:focus { outline: none; border-color: var(--accent); }
.team-score { color: var(--team); }
.vote-summary { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.vote-summary .team-score { font-size: 28px; }
.vote-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.vote-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vote-name { font-weight: 700; font-size: 13.5px; min-width: 64px; }
.vote-comment { color: var(--muted); font-size: 13px; }
.vote-mine { border-top: 1px solid var(--line); padding-top: 16px; }
.vote-mine label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.vote-slider { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.vote-slider input[type=range] { flex: 1; accent-color: var(--accent); height: 6px; }
.vote-slider output { font-weight: 800; color: var(--accent); font-size: 20px; min-width: 22px; text-align: right; }
.vote-mine textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
.vote-mine textarea:focus { outline: none; border-color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar-inner { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 18px; }
  .brand-sub { display: none; }
  .pill-link { padding: 6px 12px; }
  #signout { padding: 7px 11px; }
  .view { padding: 22px 16px 60px; }
  .list-head h2, .detail-head h2 { font-size: 24px; }
  .one-liner { font-size: 16px; }
  th, td { padding: 11px 12px; }
  th.num, td.num { padding-left: 7px; padding-right: 7px; }
  .card { padding: 18px 16px; }
  /* 16px inputs stop iOS Safari from auto-zooming when a field is focused */
  .gate-card input,
  #submit-form input, #submit-form textarea,
  #answers-form input, #answers-form textarea,
  .vote-mine textarea { font-size: 16px; }
}
