:root {
  --bg: #0a0a0a; --side: #0f0f0f; --panel: #141313; --card: #1a1919; --card2: #222120;
  --line: #2a2928; --line2: #3a3836; --text: #f4f2ef; --muted: #96918c; --dim: #64605c;
  --y: #ffd60a; --ink: #121111; --green: #46d19a; --red: #ff6b5e; --blue: #7aa7ff;
  --r: 14px;
  --mono: Menlo, ui-monospace, SFMono-Regular, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--y); color: var(--ink); }

/* layout */
.layout { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 16px 12px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { background: var(--y); color: var(--ink); border-radius: 12px; padding: 12px 14px 13px; margin-bottom: 8px; text-decoration: none; display: block; }
.brand small { display: block; font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.brand b { display: block; font-size: 17px; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.brand span { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.wsel { margin: 4px 0 6px; }
.wsel select { font-size: 13px; padding: 7px 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .sec { font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 14px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.on { background: var(--card2); color: var(--text); }
.nav a.on svg { color: var(--y); }
.nav .badge { margin-left: auto; background: var(--y); color: var(--ink); font: 700 10px var(--mono); border-radius: 20px; padding: 1px 7px; }
.side .foot { margin-top: auto; padding: 14px 10px 0; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; }
.side .foot button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.main { padding: 34px 44px 90px; width: 100%; max-width: 1260px; }

/* type */
.label { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.label.y { color: var(--y); }
h1.hello { font-size: 42px; letter-spacing: -.035em; line-height: 1.04; margin: 6px 0 14px; font-weight: 750; }
h1.page { font-size: 34px; letter-spacing: -.03em; margin: 4px 0 6px; font-weight: 750; }
h2 { font-size: 19px; letter-spacing: -.015em; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* blocks */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card.link { text-decoration: none; display: block; transition: border-color .15s; }
.card.link:hover { border-color: var(--line2); }
.card.hi { border-color: var(--y); }
.big { font-size: 36px; font-weight: 750; letter-spacing: -.035em; line-height: 1; margin-top: 12px; }
.big.sm { font-size: 30px; }
.delta { font: 600 12px var(--mono); }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--y); border-radius: 4px; }
.weekline { justify-content: space-between; margin-bottom: 8px; }
.banner { background: var(--y); color: var(--ink); border-radius: var(--r); padding: 22px 26px; display: flex; align-items: center; gap: 20px; }
.banner .n { font-size: 64px; font-weight: 800; letter-spacing: -.05em; line-height: .85; }
.banner b { font-size: 19px; letter-spacing: -.015em; }
.banner .sub { color: rgba(18,17,17,.7); }
.banner .btn { margin-left: auto; }
.empty { color: var(--dim); font-size: 14px; padding: 14px 0; }
.callbig { font-size: 26px; font-weight: 750; letter-spacing: -.025em; margin-top: 10px; line-height: 1.1; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 550; }
.li.done .t { color: var(--dim); text-decoration: line-through; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; background: var(--card2); color: var(--text); border-color: var(--line2); }
.btn:hover { filter: brightness(1.12); }
.btn.y { background: var(--y); color: var(--ink); border-color: var(--y); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.iconbtn:hover { color: var(--text); background: var(--card2); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line2); background: transparent; display: inline-grid; place-items: center; cursor: pointer; flex: none; color: var(--ink); padding: 0; }
.check.on { background: var(--y); border-color: var(--y); }
.check[disabled] { cursor: default; }
input, textarea, select { background: var(--panel); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--y); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
textarea.code { font: 13px/1.6 var(--mono); min-height: 420px; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.tabs button.on { background: var(--card2); color: var(--text); }
.tag { display: inline-block; font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.tag.y { background: var(--y); color: var(--ink); border-color: var(--y); }
.tag.g { color: var(--green); border-color: rgba(70,209,154,.4); }
.tag.r { color: var(--red); border-color: rgba(255,107,94,.4); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dim); flex: none; }
.dot.on { background: var(--green); } .dot.err { background: var(--red); }

/* kanban */
.board { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; }
.col.drop { outline: 2px dashed var(--y); outline-offset: -2px; }
.col > .head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; cursor: grab; }
.kcard:hover { border-color: var(--line2); }
.kcard .t { font-weight: 600; font-size: 14px; line-height: 1.3; margin: 7px 0 4px; }
.kcard .h { color: var(--muted); font-size: 12.5px; line-height: 1.35; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { padding: 2px 4px 6px; }
.cal .dow small { display: block; font: 600 10px var(--mono); color: var(--y); letter-spacing: .04em; margin-top: 2px; }
.day { min-height: 112px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day:hover { border-color: var(--line2); }
.day.out { opacity: .35; }
.day.today { border-color: var(--y); }
.day .n { font: 600 12px var(--mono); color: var(--muted); }
.ev { font-size: 12px; line-height: 1.25; padding: 4px 6px; border-radius: 6px; background: var(--card2); border-left: 3px solid var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.Reel { border-color: #f4f2ef; } .ev.YouTube { border-color: var(--y); } .ev.Vlog { border-color: #ffb547; }
.ev.Email { border-color: var(--green); } .ev.Story { border-color: var(--red); } .ev.Carousel, .ev.Ad { border-color: var(--blue); }
.week4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.week4 .card { padding: 14px 16px; }
.week4 b { display: block; font-size: 16px; margin-top: 6px; letter-spacing: -.01em; }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 700 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px; white-space: nowrap; }
.tbl td { border-top: 1px solid var(--line); padding: 10px 8px; vertical-align: middle; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel); }
.scroll { overflow-x: auto; }

/* markdown */
.md { line-height: 1.65; max-width: 780px; }
.md h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 14px; }
.md h2 { font-size: 20px; margin: 28px 0 10px; }
.md h3 { font-size: 16px; margin: 22px 0 8px; }
.md p { margin: 0 0 12px; color: #dcd8d3; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; color: #dcd8d3; }
.md li { margin: 3px 0; }
.md b { color: var(--text); }
.md code { font: 13px var(--mono); background: var(--card2); padding: 1px 6px; border-radius: 5px; }
.md blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--y); background: var(--panel); border-radius: 0 10px 10px 0; color: var(--muted); }
.md table { border-collapse: collapse; margin: 6px 0 18px; font-size: 14px; width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.md th { background: var(--panel); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.md a { color: var(--y); }

/* charts */
.chart { width: 100%; height: 170px; display: block; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* modal + toast */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.66); display: grid; place-items: center; z-index: 50; padding: 16px; }
#modal[hidden] { display: none; }
.dialog { background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; width: min(580px, 100%); max-height: 90vh; overflow: auto; }
.dialog h2 { font-size: 22px; letter-spacing: -.02em; }
.keybox { font: 13px/1.5 var(--mono); background: var(--bg); border: 1px dashed var(--y); border-radius: 10px; padding: 12px; word-break: break-all; color: var(--y); }
pre.code { font: 12.5px/1.6 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; color: #d9d5cf; margin: 8px 0 0; white-space: pre; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--ink); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#toast.err { background: var(--red); color: #fff; }
#toast[hidden] { display: none; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: min(420px, 100%); }
.login h1 { font-size: 34px; letter-spacing: -.035em; margin: 20px 0 6px; }

/* course */
.module { padding: 0; overflow: hidden; }
.module > .head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.module .num { font: 700 12px var(--mono); color: var(--y); }
.module .lessons { border-top: 1px solid var(--line); padding: 4px 20px; }

/* clients */
.cbar { display: flex; align-items: center; gap: 8px; }
.cbar .progress { flex: 1; min-width: 60px; }

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav .sec { display: none; }
  .nav a { white-space: nowrap; }
  .side .foot { display: none; }
  .main { padding: 22px 16px 70px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  h1.hello { font-size: 32px; }
  .banner { flex-wrap: wrap; }
  .banner .btn { margin-left: 0; }
  .cal { gap: 3px; }
  .day { min-height: 70px; padding: 5px; }
  .ev { font-size: 10px; padding: 2px 4px; }
}
