/* ============================================================
   Inkdesk — the plan screen
   ============================================================

   Signing in and registering use the app's own dialog: white, square-ish,
   quiet, the same box the onboarding uses. Those are chores, and a chore
   should look like the rest of the room.

   Choosing a plan is the one screen doing the asking, so it gets a room of
   its own: three reds and white, clay props floating in the background, and
   cards you can compare at a glance.

   Three reds, and that is the whole palette:
     #FF204E  the bright one, for the thing to press
     #A0153E  the middle, for the ground
     #5D0E41  the dark, for the ground it sits on
   plus white for every surface you have to read.

   Nothing here leaks out: every rule is under .pw, and the variables are
   declared on it rather than on :root. */

.pw {
  --pw-hot:   #ff204e;
  --pw-mid:   #a0153e;
  --pw-deep:  #5d0e41;
  --pw-white: #ffffff;
  --pw-ink:   #2a0a1e;
  --pw-dim:   rgba(255, 255, 255, 0.72);
  --pw-faint: rgba(255, 255, 255, 0.42);

  --pw-r:    16px;
  --pw-r-lg: 24px;
  --pw-ease: cubic-bezier(.22,.68,.28,1);

  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: auto;
  color: var(--pw-white);
  background:
    radial-gradient(90% 70% at 82% 6%, rgba(255, 32, 78, 0.55) 0%, transparent 58%),
    radial-gradient(80% 65% at 8% 96%, rgba(255, 32, 78, 0.28) 0%, transparent 55%),
    linear-gradient(158deg, var(--pw-mid) 0%, var(--pw-deep) 72%);
  font-family: var(--font);
  animation: pw-open 220ms var(--pw-ease) both;
}
@keyframes pw-open { from { opacity: 0; } }

.pw[hidden] { display: none !important; }

/* ── the clay props ──────────────────────────────────────────────
   Real objects rather than drawn shapes, so the screen has something in it
   that the rest of the app does not. They drift, they never block a click. */

.pw-float { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pw-float img {
  position: absolute;
  width: var(--w);
  filter: drop-shadow(0 24px 40px rgba(42, 10, 30, 0.45));
  opacity: 0.95;
  will-change: transform;
}
.pw-float .f1 { --w: 300px; top: -34px;  left: -46px;  animation: pw-drift 24s var(--pw-ease) infinite alternate; }
.pw-float .f2 { --w: 260px; bottom: -40px; right: -34px; animation: pw-drift 30s var(--pw-ease) infinite alternate-reverse; }
.pw-float .f3 { --w: 210px; bottom: 6%;  left: 2%;     animation: pw-bob 17s ease-in-out infinite; }

@keyframes pw-drift {
  from { transform: translate3d(0, 0, 0) rotate(-5deg); }
  to   { transform: translate3d(34px, -28px, 0) rotate(6deg); }
}
@keyframes pw-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-26px) rotate(5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pw, .pw-float img { animation: none !important; }
}

/* ── the card the whole thing sits in ── */

.pw-card {
  position: relative;
  width: min(100%, 1020px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border-radius: var(--pw-r-lg);
  background: rgba(42, 10, 30, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 34px 90px rgba(30, 4, 22, 0.55);
  padding: clamp(24px, 3.4vw, 40px);
  animation: pw-rise 300ms var(--pw-ease) both;
}
@keyframes pw-rise { from { opacity: 0; transform: translateY(14px); } }

/* On a short window the card scrolls. The default bar is a grey slab across
   the red, so it gets the same three colours as everything else. */
.pw-card { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.34) transparent; }
.pw-card::-webkit-scrollbar { width: 10px; }
.pw-card::-webkit-scrollbar-track { background: transparent; }
.pw-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.pw-card::-webkit-scrollbar-thumb:hover { background: var(--pw-hot); background-clip: content-box; }

.pw-close {
  position: absolute; top: 15px; right: 15px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: var(--pw-white);
  cursor: pointer;
  transition: background 160ms var(--pw-ease), transform 160ms var(--pw-ease);
}
.pw-close:hover { background: var(--pw-hot); border-color: var(--pw-hot); transform: rotate(90deg); }

.pw-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--pw-hot);
  color: var(--pw-white);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
}

.pw h2 {
  font-family: 'Finger Paint', var(--font);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
  margin: 16px 0 0;
  font-weight: 400;
  color: var(--pw-white);
}
.pw h2 em { font-style: normal; color: var(--pw-hot); }

.pw-lede {
  margin: 12px 0 0;
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--pw-dim);
}

/* ── the plan cards ── */

.pw-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 14px;
  margin-top: 26px;
  align-items: stretch;
}

.pw-plan {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--pw-r);
  padding: 22px 20px;
  background: var(--pw-white);
  color: var(--pw-ink);
  border: 2px solid transparent;
}
.pw-plan.is-pro { border-color: var(--pw-hot); }

.pw-plan h3 {
  margin: 0;
  font-family: 'Finger Paint', var(--font);
  font-weight: 400;
  font-size: 21px;
  color: var(--pw-deep);
}

.pw-price { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 2px; }
.pw-price b {
  font-size: 32px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--pw-mid);
}
.pw-plan.is-pro .pw-price b { color: var(--pw-hot); }
.pw-price span { font-size: 12.5px; color: rgba(42, 10, 30, 0.55); }

.pw-plan > .pw-sub {
  margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.45;
  color: rgba(42, 10, 30, 0.6);
}

.pw-list { list-style: none; margin: 15px 0 0; padding: 0; display: grid; gap: 8px; }
.pw-list li {
  display: grid; grid-template-columns: 17px 1fr; gap: 9px;
  align-items: start;
  font-size: 13px; line-height: 1.42;
  color: rgba(42, 10, 30, 0.86);
}
.pw-list li svg { width: 17px; height: 17px; margin-top: 1px; }
.pw-list li.off { color: rgba(42, 10, 30, 0.4); }

.pw-tag {
  position: absolute; top: -10px; left: 18px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--pw-hot); color: var(--pw-white);
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.pw-plan .pw-pick { margin-top: auto; padding-top: 18px; }

/* ── buttons ── */

.pw-btn {
  appearance: none; border: 2px solid var(--pw-hot); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  color: var(--pw-white);
  background: var(--pw-hot);
  transition: transform 150ms var(--pw-ease), background 150ms var(--pw-ease), color 150ms var(--pw-ease);
}
.pw-btn:hover { transform: translateY(-2px); background: #ff3a61; border-color: #ff3a61; }
.pw-btn:active { transform: translateY(0); }
.pw-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.pw-btn.block { width: 100%; }

.pw-btn.outline {
  background: transparent;
  color: var(--pw-mid);
  border-color: rgba(160, 21, 62, 0.35);
}
.pw-btn.outline:hover { background: var(--pw-hot); border-color: var(--pw-hot); color: var(--pw-white); }

.pw-btn.onDark {
  background: transparent;
  color: var(--pw-white);
  border-color: rgba(255, 255, 255, 0.4);
}
.pw-btn.onDark:hover { background: var(--pw-white); color: var(--pw-deep); border-color: var(--pw-white); }

.pw-btn.current {
  background: transparent; border-color: rgba(42, 10, 30, 0.18);
  color: rgba(42, 10, 30, 0.5); cursor: default;
}
.pw-btn.current:hover { transform: none; background: transparent; border-color: rgba(42, 10, 30, 0.18); color: rgba(42, 10, 30, 0.5); }

.pw-quiet {
  background: none; border: 0; padding: 0;
  color: var(--pw-white); font: inherit; font-size: 13px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.pw-quiet:hover { color: var(--pw-hot); }

/* ── the custom plan strip ── */

.pw-custom {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--pw-r);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.pw-custom .t { font-weight: 650; font-size: 14.5px; }
.pw-custom .s { font-size: 13px; color: var(--pw-dim); margin-top: 2px; }
.pw-custom > div:first-child { flex: 1 1 260px; }

/* ── notes and the foot ── */

.pw-note {
  margin: 16px 0 0;
  font-size: 13px; line-height: 1.5;
  padding: 11px 14px;
  border-radius: 12px;
  display: none;
}
.pw-note[data-kind="error"] {
  display: block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--pw-hot);
  color: var(--pw-white);
}
.pw-note[data-kind="ok"] {
  display: block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--pw-white);
}

.pw-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-items: center;
  font-size: 12.5px; color: var(--pw-dim);
}
.pw-foot b { color: var(--pw-white); font-weight: 600; }

@media (max-width: 620px) {
  .pw { padding: 10px; }
  .pw-card { padding: 20px 16px; }
  .pw-float .f1, .pw-float .f2 { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Signing in & Registration: Split Screen with Floating Reviews
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   Signing in & Registration: Full Screen Split (Black & White Reviews)
   ═══════════════════════════════════════════════════════════════ */

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--paper);
}

/* Left Pane: Black & White Floating Reviews */
.auth-left {
  position: relative;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
    #09090b;
  color: #ffffff;
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-left-brand {
  position: relative;
  z-index: 2;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 14px;
}

.auth-left-title {
  margin: 0 0 8px;
  font-family: 'Finger Paint', var(--font);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 400;
  line-height: 1.22;
  color: #ffffff;
}

.auth-left-sub {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  max-width: 44ch;
}

/* Reviews Stack & Floating Animations (Black & White) */
.auth-reviews {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  margin: auto 0;
  padding: 10px 0;
  z-index: 2;
  max-width: 520px;
}

.auth-review-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  transition: transform 0.22s var(--pw-ease), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.auth-review-card:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
  transform: scale(1.02) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75);
}

.auth-review-card.rev-1 {
  animation: auth-float-1 7s ease-in-out infinite alternate;
}
.auth-review-card.rev-2 {
  animation: auth-float-2 9s ease-in-out infinite alternate-reverse;
  margin-left: 14px;
}
.auth-review-card.rev-3 {
  animation: auth-float-3 8s ease-in-out infinite alternate;
}

@keyframes auth-float-1 {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(4px, -8px, 0); }
}
@keyframes auth-float-2 {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-6px, 7px, 0); }
}
@keyframes auth-float-3 {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(5px, -6px, 0); }
}

.auth-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.auth-review-stars {
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.auth-review-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.auth-review-quote {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.94);
  font-style: italic;
}

.auth-review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #09090b;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.auth-author-meta {
  display: flex;
  flex-direction: column;
}
.auth-author-meta strong {
  font-size: 12px;
  color: #ffffff;
  line-height: 1.25;
}
.auth-author-meta span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.25;
}

.auth-left-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}
.auth-stat-dot { opacity: 0.35; }

/* Right Pane: Full-Screen Centered Auth Form */
.auth-right {
  background: var(--paper);
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  position: relative;
  height: 100vh;
  box-sizing: border-box;
}

.auth-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  z-index: 20;
}
.auth-close:hover {
  background: var(--shell);
  border-color: var(--ink);
  color: var(--ink);
  transform: rotate(90deg);
}
.auth-close svg {
  width: 16px;
  height: 16px;
}

.auth-form {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

.auth-form-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.auth-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.auth-submit {
  height: 42px;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: #09090b;
  border: 2px solid #09090b;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s var(--pw-ease), background 0.15s, border-color 0.15s;
}
.auth-submit:hover {
  transform: translateY(-1px);
  background: #27272a;
  border-color: #27272a;
}

.auth-swap {
  font-size: 13px;
  color: var(--ink-soft);
}

.auth-note {
  margin: 14px 0;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 9px;
  display: none;
}
.auth-note[data-kind="error"] {
  display: block;
  background: #fdeceb;
  border: 1px solid #f3b9b4;
  color: #8a2015;
}
.auth-note[data-kind="ok"] {
  display: block;
  background: #eef7ef;
  border: 1px solid #bcdcc0;
  color: #2f5c34;
}
.auth-lede {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.auth-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  color: var(--faint);
}
.auth-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-link:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .auth-split {
    grid-template-columns: 1fr;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
  }
  .auth-left {
    padding: 32px 24px;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .auth-reviews {
    gap: 10px;
  }
  .auth-review-card.rev-3 {
    display: none;
  }
  .auth-right {
    padding: 36px 24px;
    height: auto;
    min-height: 60vh;
  }
}

/* ── the badge on the board ─────────────────────────────────────
   Board styling, because it lives on the paper. */

.plan-badge {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}
.plan-badge:hover { border-color: var(--ink); color: var(--ink); }
.plan-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.plan-badge[data-plan="pro"] .dot { background: #ff204e; }
.plan-badge[data-plan="trial"] .dot { background: #a0153e; }
/* The developer account, which should be obvious at a glance so a screenshot
   taken on it is never mistaken for what everybody else sees. */
.plan-badge[data-plan="dev"] {
  border-color: #5d0e41; background: #5d0e41; color: #fff;
  font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.02em;
}
.plan-badge[data-plan="dev"]:hover { border-color: #ff204e; background: #ff204e; color: #fff; }
.plan-badge[data-plan="dev"] .dot { background: #ff204e; }

.home-account { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.home-account .plan-badge { height: 34px; padding: 0 14px; font-size: 12.5px; }

/* A locked tool still shows, so you can see what you are missing. */
.tool[data-locked="true"] { opacity: 0.4; }
.tool[data-locked="true"]::after {
  content: '';
  position: absolute; right: 3px; bottom: 3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff204e;
}
