/* Viralhooks member dashboard (/app). Misso-style nature system: sky window, clouds, rolling hills, white cards,
   lime accent, serif display + Inter UI. Tokens match the public site (site.css). */
:root {
  --sky-top: #A9D2F5; --sky-bottom: #D8EBFB; --page: #9FB0C3;
  --surface: #FFFFFF; --glass: rgba(236,245,254,.72);
  --ink: #0E0F10; --muted: #5E6672; --line: #E3EAF2;
  --accent: #B4E04A; --accent-ink: #0E0F10; --accent-soft: #EEF8D6;
  --blue: #3B8FE0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 12px 32px rgba(40,70,110,.12), 0 2px 6px rgba(40,70,110,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; padding: 18px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 10px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; z-index: 100; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); font-size: 26px; line-height: 1.05; margin: 8px 0 0; }

/* the sky window */
.window { position: relative; min-height: calc(100vh - 36px); border-radius: 36px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%); padding: 18px 22px 160px; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); filter: blur(4px); animation: drift 60s linear infinite alternate; }
.c1 { width: 520px; height: 180px; left: 30%; top: 70px; }
.c2 { width: 420px; height: 160px; right: -80px; top: 280px; animation-duration: 80s; }
.c3 { width: 380px; height: 140px; left: -100px; top: 460px; animation-duration: 70s; }
@keyframes drift { to { transform: translateX(60px); } }
.hills { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: url("/assets/brand/hills.svg") center bottom / cover no-repeat; pointer-events: none; }

/* top bar */
.topbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; }
.logo-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 8px 18px 8px 8px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.logo-pill span { font: 400 28px/1 var(--serif); letter-spacing: -.01em; }
.tabs { display: flex; gap: 6px; margin: 0 auto; }
.tabs a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.tabs a[aria-current="page"] { background: rgba(255,255,255,.7); }
.tabs a:hover { background: rgba(255,255,255,.5); }
.right-pill { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.plan-chip { font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.plan-chip.member { background: var(--accent); color: var(--accent-ink); }
.plan-chip.free { background: #EEF2F7; }
#vh-auth .vh-btn, #vh-auth button, #vh-auth a { background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 600; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

/* greeting row */
.dash { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; }
.greet { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 30px 4px 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.6); }
.greet h1 { font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); margin: 0; letter-spacing: -.01em; }
.today-title { margin: 0; font-size: 18px; font-weight: 500; }
.upgrade { justify-self: end; display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 999px; padding: 6px 6px 6px 18px; font-weight: 600; }
.go { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 17px; }
.banner { background: var(--surface); border-radius: 20px; padding: 14px 18px; margin: 0 0 16px; box-shadow: var(--shadow); font-weight: 500; }
.banner.ok { background: var(--accent-soft); }

/* columns: 1/3 tasks, 2/3 library */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.left { display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border-radius: 28px; padding: 20px; box-shadow: var(--shadow); }
.card.glass { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.7); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card h2, .lib-head h2 { font: 400 30px/1 var(--serif); margin: 0; }
.link-btn { background: none; border: 0; cursor: pointer; font-weight: 600; color: var(--ink); }
.link-btn:hover { text-decoration: underline; }

.stat-card { background: var(--accent); border-radius: 28px; padding: 18px 20px 20px; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.stat-top .tag { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
.stats b { display: block; font: 600 40px/1 var(--sans); letter-spacing: -.02em; }
.stats small { font-size: 12.5px; font-weight: 500; }

.add-task { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.add-task input, .add-task select, .search input, .filters select { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #F7F9FC; width: 100%; min-width: 0; }
.add-task .row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pill.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.lime { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill:disabled { opacity: .5; cursor: wait; }

.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #C9D3DE; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; margin-top: 1px; }
.task.done .check { background: var(--accent); border-color: var(--accent); }
.task.done .check::after { content: "✓"; font-size: 13px; font-weight: 700; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-title { font-weight: 500; line-height: 1.35; }
.t-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.t-hook { font-size: 12.5px; margin-top: 6px; background: var(--accent-soft); border-radius: 12px; padding: 6px 10px; }
.kind { background: #EEF2F7; border-radius: 999px; padding: 1px 8px; font-weight: 600; font-size: 11.5px; text-transform: capitalize; }
.due { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.due.late { border-color: #F2B8B5; color: #B3261E; }
.del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 2px 4px; }
.del:hover { color: var(--ink); }
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.chip-blue { display: inline-block; background: var(--blue); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }

/* library */
.lib-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-head p { margin: 6px 0 0; }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.search input { background: #fff; border-radius: 999px; padding-left: 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { width: auto; max-width: 220px; background: #fff; border-radius: 999px; padding: 8px 12px; }
.fchip { border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.6); border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.hooks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.hook { background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 18px rgba(40,70,110,.08); position: relative; }
.hook .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.badge { border-radius: 999px; padding: 3px 9px; font-weight: 600; background: #EEF2F7; }
.badge.views { background: var(--ink); color: #fff; }
.badge.new { background: var(--accent); }
.hook q { font: 400 24px/1.12 var(--serif); quotes: "“" "”"; }
.hook .why { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hook .by { font-size: 12.5px; color: var(--muted); }
.hook .acts { display: flex; gap: 8px; margin-top: auto; }
.hook .acts .pill { padding: 7px 14px; font-size: 13px; }
.hook.locked q { filter: blur(5px); user-select: none; }
.hook.locked::after { content: "🔒 Members only"; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.more { display: flex; justify-content: center; margin-top: 16px; }
.empty { color: var(--muted); padding: 20px 4px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(20,30,45,.35); backdrop-filter: blur(3px); z-index: 40; }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border-radius: 28px; padding: 26px; box-shadow: 0 30px 80px rgba(20,30,45,.3); }
.modal .close { position: absolute; right: 16px; top: 14px; border: 0; background: #EEF2F7; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.modal h3 { font: 400 34px/1.05 var(--serif); margin: 6px 30px 12px 0; }
.modal .sec { margin-top: 16px; }
.modal .sec h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.modal .nums { display: flex; gap: 10px; flex-wrap: wrap; }
.modal .nums span { background: #F2F5F9; border-radius: 14px; padding: 8px 12px; font-weight: 600; }
.modal .acts { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; z-index: 60; font-weight: 500; }

@media (max-width: 960px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .greet { grid-template-columns: 1fr; }
  .upgrade { justify-self: start; }
}
@media (max-width: 640px) {
  body { padding: 0; }
  .window { border-radius: 0; padding: 12px 12px 140px; min-height: 100vh; }
  .tabs { display: none; }
  .right-pill { margin-left: auto; }
  .logo-pill span { font-size: 22px; }
  .hooks { grid-template-columns: minmax(0, 1fr); }
  .add-task .row { grid-template-columns: 1fr 1fr; }
  .add-task .row .pill { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }

/* extended package card */
.ext-card .soon { background: #EEF2F7; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.ext-form { display: flex; gap: 8px; }
.ext-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: #F7F9FC; }

/* full-screen sheets: welcome, onboarding, paywall */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(169,210,245,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sheet-card { background: #fff; border-radius: 32px; padding: 32px; width: min(460px, 100%); box-shadow: 0 30px 80px rgba(20,30,45,.25); text-align: center; max-height: calc(100vh - 32px); overflow: auto; }
.sheet-card.wide { width: min(620px, 100%); text-align: left; }
.sheet-card h2 { font: 400 40px/1.02 var(--serif); margin: 12px 0 8px; }
.sheet-card img { margin: 0 auto; display: block; }
.row-btns { display: flex; gap: 10px; justify-content: center; margin: 20px 0 10px; flex-wrap: wrap; }
.pill.big { padding: 13px 22px; font-size: 15px; text-decoration: none; display: inline-flex; }
.ob-progress { height: 6px; background: #EEF2F7; border-radius: 3px; overflow: hidden; }
.ob-progress i { display: block; height: 100%; width: 33%; background: var(--accent); transition: width .3s; }
.ob-step { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; font-weight: 600; }
#ob-form { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.q label.ql { display: block; font-weight: 600; margin-bottom: 8px; }
.q input[type=text], .q input[type=email] { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #F7F9FC; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 500; cursor: pointer; }
.chips button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ob-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 14px; }
.plan { position: relative; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 22px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.plan:hover { border-color: var(--ink); }
.plan.best { border-color: var(--accent); background: var(--accent-soft); }
.p-tag { position: absolute; top: -11px; right: 14px; background: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.p-name { font-weight: 600; }
.p-price { font: 400 40px/1 var(--serif); }
.p-price s { font-size: 22px; color: var(--muted); margin-right: 4px; }
.p-price small { font: 500 14px var(--sans); color: var(--muted); margin-left: 2px; }
.p-note { font-size: 13px; color: var(--muted); }
.perks { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } .sheet-card { padding: 24px; } .sheet-card h2 { font-size: 32px; } }
