:root {
  --paper: #ffffff;
  --wash: #faf8f5;
  --peach: #fff4ea;
  --ink: #221c15;
  --muted: #6f675b;
  --brand: #f26522;
  --brand-deep: #c24e12;
  --teal: #0f766e;
  --sun: #ffd23f;
  --line: #e7e0d3;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(34, 28, 21, 0.10);
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.65; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.55em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; margin-top: 1.6em; }
a { color: var(--brand-deep); }
::selection { background: var(--sun); color: var(--ink); }
.muted { color: var(--muted); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1.6rem; background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 0.5rem; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; border-radius: 6px; margin-right: 0.55rem; }
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.nav a:hover { color: var(--brand-deep); }
.nav .who { font-size: 0.85rem; color: var(--muted); }
.topright { display: flex; gap: 1rem; align-items: center; }
.topright a { color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.topright .who { font-size: 0.85rem; color: var(--muted); }
#burger, #side-close { font-size: 1.3rem; line-height: 1; background: none; border: none; color: var(--ink); cursor: pointer; padding: 0.2rem 0.5rem; border-radius: 8px; }
#burger:hover, #side-close:hover { background: var(--peach); }
#side { position: fixed; top: 0; left: 0; bottom: 0; width: min(19rem, 86vw); z-index: 60; background: var(--paper); border-right: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-102%); transition: transform 0.22s ease; overflow-y: auto; padding: 0 0 2rem; }
body.side-open #side { transform: translateX(0); }
@media (min-width: 1100px) {
  body.side-open main { margin-left: min(19rem, 86vw); margin-right: auto; }
  body.side-open .topbar { margin-left: min(19rem, 86vw); }
  #scrim { display: none !important; }
}
#side a { display: block; padding: 0.55rem 1.4rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
#side a:hover { background: var(--peach); color: var(--brand-deep); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem 0.8rem 1.4rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); }
.side-sec { padding: 1rem 1.4rem 0.2rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#scrim { position: fixed; inset: 0; z-index: 50; background: rgba(34, 28, 21, 0.45); }
#scrim[hidden] { display: none; }

/* Layout */
main { max-width: 1080px; margin: 0 auto; padding: 2rem 1.6rem 4rem; }
main.narrow { max-width: 720px; }
footer { border-top: 1px solid var(--line); padding: 1.6rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; padding: 0.68rem 1.4rem; border-radius: 999px; border: none; cursor: pointer; font-size: 1rem; font-family: var(--font-display); }
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { padding: 0.4rem 0.9rem; font-size: 0.88rem; }
.btn-danger { background: #fff; color: #b3261e; border: 1.5px solid #b3261e; }
.btn-danger:hover { background: #b3261e; color: #fff; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; padding: 2rem 0 3rem; }
.sticker { display: inline-block; background: var(--peach); border: 1px solid #f2cfae; color: var(--brand-deep); border-radius: 999px; padding: 0.32rem 0.95rem; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 1.1em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 33rem; }
.hero-cta { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero-visual { background: var(--peach); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); }

/* Stats + cards */
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.8rem 0; }
.statbox { background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-align: center; }
.statbox strong { display: block; font-family: var(--font-display); font-size: 1.9rem; }
.statbox span { color: var(--muted); font-size: 0.88rem; }
.statbox.hot { background: var(--ink); border-color: var(--ink); }
.statbox.hot strong { color: var(--sun); }
.statbox.hot span { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0; }
.card { display: block; background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card strong { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.card .sub { color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.2rem; }
.tagrow { display: flex; gap: 0.4rem; margin-top: 0.7rem; flex-wrap: wrap; }
.tag { display: inline-block; background: var(--peach); border: 1px solid #f2cfae; color: var(--brand-deep); border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.78rem; font-weight: 700; }
.tag.teal { background: #e6f4f2; border-color: #bfe3de; color: var(--teal); }

/* Steps / onboarding */
.steps { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: 0.7rem; }
.steps li { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 1.1rem; display: flex; gap: 0.8rem; align-items: center; }
.steps li.done { border-color: var(--teal); background: #f2faf9; }
.steps .tick { font-weight: 800; font-size: 1.2rem; color: var(--teal); }
.steps li:not(.done) .tick { color: var(--line); }
.panel { background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 1.4rem 0; }

/* Flash */
.flash { list-style: none; padding: 0; }
.flash li { background: var(--peach); border: 1px solid var(--brand); border-radius: 10px; padding: 0.65rem 1rem; margin-bottom: 0.6rem; }

/* Forms */
form.stack { max-width: 34rem; }
form.stack label, .formcard label { display: block; font-size: 0.92rem; font-weight: 700; margin-bottom: 0.9rem; }
form.stack input, form.stack select, .formcard input, .formcard select { display: block; width: 100%; margin-top: 0.3rem; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; font-size: 1rem; font-weight: 400; color: var(--ink); }
form.stack input:focus, form.stack select:focus, .formcard input:focus, .formcard select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.formcard { background: var(--peach); border-radius: 18px; padding: 1.8rem; max-width: 34rem; }
.formcard input, .formcard select { border-color: #e5cfae; }
.searchrow { display: flex; gap: 0.6rem; margin: 1rem 0; max-width: 30rem; }
.searchrow input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 0.55rem 1rem; font-size: 1rem; }

/* Tables */
table.grid { border-collapse: collapse; width: 100%; margin: 1rem 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.grid th, table.grid td { text-align: left; padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
table.grid th { background: var(--wash); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
table.grid tr:last-child td { border-bottom: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1.6rem; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .dashgrid { grid-template-columns: 1fr; }
}

/* Auth + small screens */
.authwrap { max-width: 34rem; margin: 1.5rem auto; }
.authwrap .formcard { max-width: 100%; }
.authwrap h1 { text-align: center; }
.authwrap .muted { text-align: center; }
.authwrap .btn { width: 100%; margin-top: 0.4rem; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 1.2rem 1rem 3rem; }
  .topbar { padding: 0.6rem 0.9rem; }
  .formcard { padding: 1.2rem 1.1rem; border-radius: 14px; }
  form.stack input, form.stack select, .formcard input, .formcard select {
    font-size: 16px; }
  .searchrow { flex-wrap: wrap; }
  .searchrow .btn { flex: 1; }
  table.grid { display: block; overflow-x: auto; }
  .statgrid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .filtergrid input, .filtergrid select { min-width: 0; flex: 1 1 8rem; }
  #ai-bubble { right: 0.8rem; bottom: 0.8rem; padding: 0.7rem 1.1rem; }
  #ai-panel { right: 0.8rem; bottom: 4.2rem; }
}

/* Dashboard + interconnect */
.dashhead h1 { margin-bottom: 0.1em; }
.dashgrid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0 2.4rem; align-items: start; }
.dashgrid h2 { font-size: 1.15rem; margin-top: 1.8em; padding-bottom: 0.3em; border-bottom: 2px solid var(--ink); }
.attn { background: #fff8ec; border: 1.5px solid var(--sun); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 1.2rem 0; }
.attn h2 { margin-top: 0; font-size: 1.1rem; }
.attn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.attn li { display: flex; gap: 0.6rem; align-items: baseline; }
.pill { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 0.05rem 0.65rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.allclear { background: #f2faf9; border: 1px solid #bfe3de; color: var(--teal); border-radius: 12px; padding: 0.7rem 1.1rem; font-weight: 700; }
.gigcard { display: flex; gap: 0.9rem; align-items: center; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 1rem; margin-bottom: 0.6rem; }
.gigcard:hover { border-color: var(--brand); }
.datebadge { background: var(--ink); color: var(--sun); font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; border-radius: 10px; padding: 0.35rem 0.6rem; white-space: nowrap; }
.gigcard .acts { margin-left: auto; white-space: nowrap; }
.linklist { list-style: none; margin: 0.6rem 0 1.2rem; padding: 0; display: grid; gap: 0.45rem; }
.linklist li { padding-left: 1.1rem; position: relative; }
.linklist li::before { content: "▸"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.bubble { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; }
.bubble.fresh { border-color: var(--brand); background: var(--peach); }
.heropanel { background: var(--wash); border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; }
.heropanel h1 { margin-bottom: 0.15em; }
.btnrow { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.btnrow form { margin: 0; }
.empty { background: var(--peach); border: 1px dashed var(--brand); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0.8rem 0; }
.video { margin: 1.2rem 0; }
.video iframe, .video video { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 16px; background: #000; }
.linkbtn { background: none; border: none; color: var(--brand-deep); cursor: pointer; font-size: 0.85rem; text-decoration: underline; padding: 0; }
.filtergrid { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.filtergrid input, .filtergrid select { width: auto; min-width: 7rem; }
.filtergrid input[type="checkbox"] { width: auto; min-width: 0; }
.check { display: inline-flex; gap: 0.35rem; align-items: center; font-size: 0.9rem; margin: 0; }
.secnav { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 1rem 0 0.4rem; }
.secnav a { background: var(--wash); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.secnav a:hover { border-color: var(--brand); }
details { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; margin: 0.8rem 0; }
details summary { cursor: pointer; font-weight: 800; font-family: var(--font-display); }
.numstrip { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: 0.8rem 0; }
.numstrip span { font-size: 0.9rem; color: var(--muted); }
.numstrip strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.nextup { background: var(--ink); color: #fff; border-radius: 12px; padding: 0.6rem 1rem; font-weight: 700; }
.nextup a { color: var(--sun); }
.oppanel { background: #fff8ec; border: 1.5px solid var(--sun); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 1.4rem 0; }
.oppanel h2 { margin-top: 0; }
.oppanel .gigcard { background: #fff; }
.sharebox { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0; font-size: 0.9rem; }
.sharebox a { font-weight: 700; }
#ai-bubble { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 50; background: var(--ink); color: var(--sun); border: none; border-radius: 999px; padding: 0.8rem 1.3rem; font-family: var(--font-display); font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
#ai-panel { position: fixed; right: 1.2rem; bottom: 4.6rem; z-index: 50; width: min(24rem, calc(100vw - 2.4rem)); max-height: 70vh; display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
#ai-panel[hidden] { display: none; }
#ai-head { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; padding: 0.6rem 1rem; font-weight: 800; font-size: 0.9rem; }
#ai-head a { color: var(--sun); }
#ai-close { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
#ai-thread { padding: 0.8rem 1rem; overflow-y: auto; flex: 1; }
#ai-thread .bubble { font-size: 0.9rem; }
#ai-form { display: flex; gap: 0.5rem; padding: 0.7rem 1rem; border-top: 1px solid var(--line); }
#ai-form input { flex: 1; margin: 0; }
