/* Brand: change these variables to re-skin the whole site. */
:root {
  --accent: #6b4eff; --accent-ink: #fff; --accent-soft: #efeaff;
  --bg: #f7f6f3; --card: #fff; --ink: #17161c; --muted: #6d6a77; --line: #e6e3ec;
  --ok: #1f8a5b; --ok-soft: #e3f5ec; --danger: #c93a3a; --danger-soft: #fdeaea;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 16, 40, .06), 0 4px 16px rgba(20, 16, 40, .05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.prose a, .alert a, p a { color: var(--accent); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.8rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 48px; min-height: 70vh; }
.foot { color: var(--muted); font-size: .85rem; padding: 24px 20px; border-top: 1px solid var(--line); }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; letter-spacing: -.02em; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #ff7a59); }
.search { flex: 1; max-width: 360px; }
.search input { border-radius: 999px; background: var(--bg); }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 16px; font-weight: 500; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .7rem; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 46px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.menu-pop > * { padding: 8px 10px; border-radius: 8px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); }

/* Forms & buttons */
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; }
input[type=file] { padding: 8px; }
input[type=radio] { width: auto; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; }
.radio { flex-direction: row; align-items: center; font-weight: 400; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { padding: 6px 12px; font-size: .88rem; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.link:hover { color: var(--accent); }

/* Layout helpers */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; display: block; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 160px; }
.between { justify-content: space-between; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.muted { color: var(--muted); }
.sm-t { font-size: .85rem; }
.empty { text-align: center; padding: 40px 20px; }
.alert { background: var(--danger-soft); color: var(--danger); padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.sm { font-size: .7rem; padding: 1px 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.tag { color: var(--accent); font-size: .85rem; }
.av { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; }
.av-i { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--bg); font-weight: 600; color: var(--muted); }

/* Home */
.hero { text-align: center; padding: 56px 0 48px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.035em; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.hero .row { justify-content: center; }
.creator-card { padding: 0; overflow: hidden; }
.cc-cover { height: 96px; background: linear-gradient(135deg, var(--accent-soft), #ffe5dc) center/cover; }
.cc-body { padding: 0 18px 18px; margin-top: -28px; }
.cc-body .av { border: 3px solid var(--card); }
.mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; }

/* Creator page */
.cover { height: 240px; border-radius: var(--radius); background: linear-gradient(120deg, var(--accent), #ff7a59) center/cover; }
.creator-head { text-align: center; margin-top: -60px; margin-bottom: 18px; }
.creator-head .av { border: 5px solid var(--bg); }
.tagline { font-size: 1.1rem; margin: 0 0 4px; }
.tabs { display: flex; gap: 6px; justify-content: center; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.tier.current { border: 2px solid var(--accent); }
.price { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.benefits { padding-left: 18px; margin: 0 0 14px; }
.product img, .product .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: var(--accent-soft); }

/* Posts */
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-head .pill { margin-left: auto; }
.post-img { border-radius: 10px; width: 100%; max-height: 420px; object-fit: cover; margin-bottom: 10px; }
.post-img.full { max-height: none; }
.excerpt { color: #36343d; white-space: pre-line; }
.post-foot { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.locked { background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 12px, #f6f3ff 12px, #f6f3ff 24px); border-radius: 12px; padding: 34px 20px; text-align: center; }
.locked.big { padding: 70px 20px; }
.lock-icon { width: 34px; height: 26px; margin: 12px auto 12px; background: var(--accent); border-radius: 6px; position: relative; }
.lock-icon::before { content: ""; position: absolute; left: 7px; top: -14px; width: 20px; height: 20px; border: 4px solid var(--accent); border-bottom: 0; border-radius: 12px 12px 0 0; box-sizing: border-box; }
.post-page { max-width: 780px; margin: 0 auto; padding: 32px; }
.prose { white-space: normal; margin: 16px 0; font-size: 1.05rem; }
.video { position: relative; aspect-ratio: 16/9; margin-bottom: 14px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.file { background: var(--accent-soft); color: var(--accent); }
.poll-row { position: relative; display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.poll-row span { position: relative; z-index: 1; }
.poll-row .bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); }
.poll-row.mine { border-color: var(--accent); font-weight: 600; }
.comments { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.comment { display: flex; gap: 10px; margin-top: 16px; }
.c-body { flex: 1; }
.c-body p { margin: 2px 0 4px; }
.c-body details summary { cursor: pointer; color: var(--muted); }

/* Messages / lists */
.list { padding: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row.unread { background: var(--accent-soft); }
.thread { max-width: 760px; margin: 0 auto; }
.msgs { display: flex; flex-direction: column; gap: 10px; min-height: 260px; max-height: 60vh; overflow-y: auto; padding: 12px 0; }
.msg { max-width: 75%; background: var(--bg); border-radius: 14px 14px 14px 4px; padding: 8px 14px; align-self: flex-start; }
.msg p { margin: 0; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px; }
.msg.me .muted { color: rgba(255, 255, 255, .75); }

/* Auth */
.auth { max-width: 440px; margin: 20px auto; padding: 32px; }

/* Studio */
.studio { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.side .row { margin-bottom: 12px; }
.side a { padding: 9px 12px; border-radius: 10px; font-weight: 500; }
.side a.on { background: var(--accent-soft); color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: .88rem; display: block; }
.stat b { font-size: 1.6rem; }
.chart { display: flex; align-items: flex-end; gap: 16px; height: 200px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar-v { width: 100%; max-width: 56px; background: var(--accent); border-radius: 8px 8px 2px 2px; min-height: 4px; }
details.card > summary { cursor: pointer; list-style: none; }
details.card[open] > summary { margin-bottom: 16px; }

@media (max-width: 860px) {
  .split, .studio { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .search { display: none; }
  .top nav { gap: 10px; font-size: .9rem; }
  .cover { height: 160px; }
}

/* Reports */
.report summary { cursor: pointer; color: var(--muted); font-size: .85rem; list-style: none; }
.report[open] { width: 100%; }
.report form { margin-top: 8px; }
.report select { width: auto; }

/* Front page */
.eyebrow { display: inline-block; font-weight: 600; font-size: .85rem; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ff7a59); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin: 28px auto 0; }
.hero-search input { border-radius: 999px; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 56px; }
.strip b { display: block; font-size: 1.8rem; letter-spacing: -.02em; }
.strip span { color: var(--muted); font-size: .9rem; }
.section { margin-bottom: 64px; }
.section > h2, .section .row h2 { font-size: 1.6rem; letter-spacing: -.02em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.features .card { margin: 0; }
.split-band { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: center; }
.split-band p { font-size: 1.08rem; }
.pricing { text-align: center; padding: 28px; }
.pricing .price { font-size: 2.6rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; color: var(--muted); }
.cta { text-align: center; background: linear-gradient(120deg, var(--accent), #ff7a59); color: #fff; border-radius: var(--radius); padding: 56px 24px; }
.cta p { opacity: .9; margin: 0 0 22px; }
.cta .btn { background: #fff; color: var(--accent); }
.foot nav { gap: 20px; margin-bottom: 6px; }
.foot p { margin: 0; }

/* Checkout */
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }
.summary { background: var(--bg); border-radius: 10px; padding: 12px 16px; }
.summary p { margin: 4px 0; }
.ok-t { color: var(--ok); font-weight: 600; }
.gift-link { display: block; text-align: center; margin-top: 10px; color: var(--accent); }
blockquote.card { margin: 0; font-style: italic; text-align: left; }

@media (max-width: 860px) {
  .split-band { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
}
