/* ════════════════════════════════════════════════════════════════════════════
   110-plan.css  the Free / Premium layer of the SEC area, 2026-11-21.
   static/js/lib/plan.js (window.MPPlan): the Premium dialog, the paywall tail
   under a limited list, lock marks. Spec: research_notes/premium_1121/mock/.

   APPENDED LAST; owns only .pln-* (checked against every other prefix).
   Colours only from tokens.css. Same one unit as 109-today.css: N x --pln-u
   is the mock's N px at 1680 wide (the wall, the lock marks, the visitor's
   block). The Premium dialog is in rem, like the Settings panel it matches.
   ════════════════════════════════════════════════════════════════════════════ */

:root{--pln-u:max(0.85px, calc(1rem / 15.372));}
:root.phone{--pln-u:1px;}

/* ── lock marks: only on a Free account ─────────────────────────────────── */
.pln-lk{display:none;flex:none;width:16px;height:16px;
  fill:none;stroke:currentColor;stroke-width:1.5;color:var(--text-secondary);}
:root[data-plan="free"] .pln-lk,:root[data-plan="visitor"] .pln-lk{display:inline-block;}
:root[data-plan="free"] [data-pln-lock] > .pln-lk[data-pln-mark],:root[data-plan="visitor"] [data-pln-lock] > .pln-lk[data-pln-mark]{margin-left:4px;vertical-align:-1px;}
:root[data-plan="free"] .research-nav-btn[data-pln-lock] > .pln-lk,:root[data-plan="visitor"] .research-nav-btn[data-pln-lock] > .pln-lk{margin-left:auto;}

/* ── shared pieces: the accent button, the calm line in its place ───────── */
.pln-pr{color:var(--text-secondary);white-space:nowrap;}
.pln-go{display:inline-flex;align-items:center;justify-content:center;width:100%;height:calc(32 * var(--pln-u));
  padding:0 calc(16 * var(--pln-u));border:0;border-radius:calc(8 * var(--pln-u));cursor:pointer;
  background:var(--accent);color:var(--on-accent);font:inherit;font-weight:500;white-space:nowrap;
  transition:background 120ms linear,transform 80ms var(--mo-ease, ease-out);}
.pln-go:hover{background:var(--accent-hover);}
.pln-go:active{transform:scale(0.98);}
/* the calm one line in the button's place (not on sale, refused) */
.pln-note{margin:0;padding:calc(7 * var(--pln-u)) 0;line-height:calc(18 * var(--pln-u));color:var(--text-muted);font-size:calc(13 * var(--pln-u));}
.pln-invite .pln-note{text-align:center;}
.pln-manage{color:var(--accent);text-decoration:none;white-space:nowrap;}
.pln-manage:hover{text-decoration:underline;}
.pln-go:disabled{opacity:.6;cursor:default;}
.pln-go:focus-visible,.pln-x:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}

/* ── the Premium dialog ─────────────────────────────────────────────────────
   ONE centred dialog for every lock (lib/plan.js open; its element keeps the
   class .pln-sheet). The frame, the backdrop and the motion are the Settings
   panel's (113-settings.css .stp, .stp-scrim: surface, radius, shadow, scrim,
   curve, 220ms in, 140ms out), and it is sized in rem like that panel (the
   root is fluid: 46.875rem is 720px at 1680 wide).

   One grid, two columns, one hairline between them.
     left   the title; the lock's own sentence; eight rows, wrapping as needed
     right  the period switch on the title's baseline; the price on the first
            row's baseline; the yearly line on the second row's; the button's
            bottom edge on the eighth row's baseline; the small line under the
            button hangs below both columns (--pln-under is its band, which
            the left column leaves empty)
   plan.js repaints the right column (.pln-price), so that wrapper is
   display:contents and its two parts sit in the grid themselves. */
.pln-scrim{position:fixed;inset:0;z-index:8999;background:var(--scrim-dialog);opacity:0;
  transition:opacity 180ms var(--ease-out);}
.pln-scrim.pln-on{opacity:1;}
.pln-scrim.pln-out{opacity:0;transition-duration:140ms;pointer-events:none;}
.pln-sheet{--pln-pad:2rem;--pln-col:17.5rem;--pln-under:1.4375rem;
  position:fixed;z-index:9000;left:50%;top:50%;box-sizing:border-box;margin:0;
  width:min(46.875rem, calc(100vw - 4rem));max-height:calc(100vh - 4rem);overflow:auto;overscroll-behavior:contain;
  padding:1.25rem var(--pln-pad) 1.5rem;
  display:grid;grid-template-columns:minmax(0,1fr) var(--pln-col);grid-template-rows:auto auto;
  column-gap:calc(2 * var(--pln-pad));
  background:var(--bg-elevated);color:var(--text-primary);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-modal),inset 0 0 0 1px var(--border-default);
  font-family:var(--font-sans);font-size:0.875rem;line-height:1.25rem;font-weight:400;letter-spacing:normal;
  font-variant-numeric:tabular-nums;text-align:left;
  opacity:0;transform:translate(-50%,-50%) translateY(0.5rem) scale(.985);
  transition:opacity 220ms var(--ease-out),transform 220ms var(--ease-out);}
.pln-sheet:focus{outline:none;}
.pln-sheet.pln-on{opacity:1;transform:translate(-50%,-50%);}
.pln-sheet.pln-out{opacity:0;transform:translate(-50%,-50%) translateY(0.25rem);transition-duration:140ms;pointer-events:none;}
/* the one hairline: full height (inside the frame's own ring), in the middle
   of the gap between the columns */
.pln-sheet::before{content:"";position:absolute;top:1px;bottom:1px;right:calc(2 * var(--pln-pad) + var(--pln-col));
  width:1px;background:var(--border-subtle);pointer-events:none;}
.pln-grab{display:none;}

/* left: what you get */
.pln-title{grid-column:1;grid-row:1;align-self:baseline;margin:0;height:2rem;line-height:2rem;
  font-family:var(--font-display);font-size:1.125rem;font-weight:600;letter-spacing:-.01em;color:var(--text-bright);}
.pln-what{grid-column:1;grid-row:2;align-self:start;min-width:0;padding-bottom:var(--pln-under);}
.pln-line{margin:0.25rem 0 0;color:var(--text-secondary);}
.pln-list{display:grid;row-gap:0.75rem;margin:1.25rem 0 0;padding:0;list-style:none;}
/* no sentence: the rows stay where they are, so the price keeps their baseline */
.pln-list:first-child{margin-top:2.75rem;}
/* the check is drawn from its box's left edge, so the checks, the title and
   the lock's sentence share one left edge */
.pln-item{display:grid;grid-template-columns:1rem minmax(0,1fr);column-gap:0.5rem;align-items:start;color:var(--text-secondary);}
.pln-item-on{color:var(--text-primary);}
.pln-ck{width:1rem;height:1rem;margin-top:0.125rem;fill:none;stroke:var(--accent);stroke-width:1.5px;
  stroke-linecap:round;stroke-linejoin:round;}
.pln-ck path{vector-effect:non-scaling-stroke;}

/* right: the price */
.pln-price{display:contents;}
.pln-period{grid-column:2;grid-row:1;align-self:baseline;justify-self:start;height:1.75rem;}
.pln-opt{justify-content:center;padding:0 0.75rem;font-family:var(--font-sans);font-size:0.8125rem;font-weight:400;
  line-height:1;letter-spacing:normal;text-transform:none;}
.pln-buy{grid-column:2;grid-row:2;display:flex;flex-direction:column;min-width:0;}
.pln-amount{display:flex;align-items:baseline;gap:0.5rem;margin:1.5625rem 0 0;min-height:2.75rem;white-space:nowrap;}
.pln-num{font-family:var(--font-display);font-size:2.25rem;line-height:2.75rem;font-weight:600;letter-spacing:-.02em;
  color:var(--text-bright);font-variant-numeric:tabular-nums;}
.pln-per{color:var(--text-secondary);}
.pln-billed{margin:0.4375rem 0 0;min-height:1.25rem;font-size:0.8125rem;color:var(--text-muted);white-space:nowrap;}
.pln-save{margin-left:0.75rem;color:var(--accent);font-weight:500;}
.pln-act{margin-top:auto;padding-top:1.25rem;}
.pln-pay{box-sizing:border-box;height:2.5rem;margin-bottom:0.3125rem;padding:0 1rem;border-radius:var(--radius);
  font-family:var(--font-sans);font-size:0.875rem;font-weight:500;line-height:1;letter-spacing:normal;text-transform:none;}
.pln-pay:disabled,.pln-pay:disabled:hover{background:var(--accent);transform:none;}
.pln-act .pln-note{padding:0;font-size:0.875rem;line-height:1.25rem;color:var(--text-secondary);}
.pln-act .pln-manage{color:var(--text-primary);text-decoration:underline;text-underline-offset:2px;}
.pln-fine{margin:0.3125rem 0 0;min-height:1.125rem;font-size:0.8125rem;line-height:1.125rem;color:var(--text-secondary);}
.pln-err{color:var(--text-primary);}

/* Close: the Settings panel's (.stp-x), on the title's row */
.pln-x{position:absolute;top:1.25rem;right:1.5rem;display:inline-flex;align-items:center;justify-content:center;
  width:2rem;height:2rem;padding:0;border:0;border-radius:var(--radius);background:transparent;color:var(--text-muted);cursor:pointer;}
.pln-x:hover{color:var(--text-primary);background:color-mix(in srgb,var(--text-primary) 6%,transparent);}
.pln-x svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}

/* phone: a sheet on the bottom edge, one column: the title and the lock's
   sentence, the price block, then the rows. Each part is a row of the one
   column (the two column wrappers step aside), in that order. */
.pln-sheet.pln-bottom{left:0;right:0;top:auto;bottom:0;width:auto;max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);
  display:flex;flex-direction:column;padding:0.75rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  border-radius:16px 16px 0 0;opacity:1;transform:translateY(100%);
  transition:transform 280ms var(--ease-glide);}
.pln-sheet.pln-bottom.pln-on{transform:none;}
.pln-sheet.pln-bottom.pln-out{opacity:1;transform:translateY(100%);transition-duration:200ms;}
.pln-bottom::before{display:none;}
.pln-bottom .pln-grab{display:block;flex:none;order:0;width:36px;height:4px;margin:0 auto 0.5rem;border-radius:2px;background:var(--border-strong);}
.pln-bottom .pln-what,.pln-bottom .pln-buy{display:contents;}
.pln-bottom .pln-title{order:1;flex:none;align-self:stretch;}
.pln-bottom .pln-line{order:2;}
.pln-bottom .pln-period{order:3;flex:none;align-self:stretch;display:grid;grid-template-columns:1fr 1fr;height:max(2.25rem, 36px);margin-top:1.25rem;}
.pln-bottom .pln-amount{order:4;flex:none;margin-top:1.25rem;}
.pln-bottom .pln-billed{order:5;flex:none;margin-top:0.25rem;}
.pln-bottom .pln-act{order:6;flex:none;margin-top:0;}
.pln-bottom .pln-pay{height:var(--tap, 2.75rem);margin-bottom:0;font-size:0.9375rem;}
.pln-bottom .pln-fine{order:7;flex:none;margin-top:0.625rem;}
.pln-bottom .pln-list,.pln-bottom .pln-list:first-child{order:8;margin-top:1.25rem;padding-top:1.25rem;box-shadow:inset 0 1px 0 var(--border-subtle);}
.pln-bottom .pln-x{top:calc(1.25rem + 4px);right:1rem;}

/* ── the paywall tail ───────────────────────────────────────────────────────
   The last real row is the last crisp row. Below it the list goes on as
   neutral blocks (never data), at most four rows with a static blur
   while a mask fades it into the page, so no edge is ever visible. The blur
   is static: it never animates. */
.pln-wall{position:relative;overflow:hidden;min-height:calc(144 * var(--pln-u));}
.pln-tail{position:relative;max-height:calc(160 * var(--pln-u));overflow:hidden;pointer-events:none;user-select:none;
  -webkit-mask-image:linear-gradient(to bottom,#000 0,#000 30%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 0,#000 30%,transparent 100%);}
.pln-ghost{table-layout:fixed;}
.pln-ghosts{filter:blur(var(--pln-blur,6px));transform:translateZ(0);contain:paint;will-change:filter;}
.pln-ghost tr,.pln-ghost td{box-shadow:none!important;animation:none!important;transition:none!important;}
.pln-veil{position:absolute;inset:0;background:linear-gradient(to bottom,transparent 0,
  color-mix(in srgb,var(--bg-primary) 65%,transparent) 100%);}
.pln-invite{position:absolute;left:50%;top:12px;transform:translateX(-50%);
  width:max-content;max-width:calc(100% - 24px);box-sizing:border-box;display:flex;flex-direction:column;align-items:center;
  background:var(--bg-secondary);border:1px solid var(--border-default);border-radius:var(--radius-md);
  gap:calc(6 * var(--pln-u));padding:calc(16 * var(--pln-u));text-align:center;
  font-family:var(--font-sans);font-size:calc(15 * var(--pln-u));line-height:1.4;}
.pln-msg{margin:0;color:var(--text-primary);}
.pln-go.pln-big{width:auto;height:calc(40 * var(--pln-u));padding:0 calc(24 * var(--pln-u));font-size:calc(15 * var(--pln-u));}
:root.phone .pln-wall{min-height:144px;}
:root.phone .pln-tail{max-height:160px;}

/* the invitation rises once when reached (111-motion.css owns the curve) */
.pln-invite.mo-reveal{opacity:0;transform:translateY(calc(8 * var(--pln-u)));}
.pln-invite.mo-reveal.mo-seen{opacity:1;transform:none;
  transition:opacity 320ms var(--mo-ease, ease-out),transform 320ms var(--mo-ease, ease-out);}

@media (prefers-reduced-motion: reduce){
  /* the Settings panel's reduced branch: opacity only, 120ms */
  .pln-sheet,.pln-sheet.pln-on,.pln-sheet.pln-out{transform:translate(-50%,-50%);transition:opacity 120ms linear;}
  .pln-sheet.pln-bottom,.pln-sheet.pln-bottom.pln-on,.pln-sheet.pln-bottom.pln-out{transform:none;transition:opacity 120ms linear;}
  .pln-sheet.pln-bottom,.pln-sheet.pln-bottom.pln-out{opacity:0;}
  .pln-sheet.pln-bottom.pln-on{opacity:1;}
  .pln-scrim,.pln-scrim.pln-out{transition-duration:120ms;}
  .pln-go,.pln-go:active{transition:none;transform:none;}
  .pln-invite.mo-reveal{transform:none;}
  .pln-invite.mo-reveal.mo-seen{transition:opacity 120ms linear;}
}

/* ── A visitor's way in (2026-11-21), where the account block is
   (app.html .pln-visit): Sign in as a quiet link, Create free account as the
   one accent button, stacked (the sidebar is too narrow for both in a row,
   measured); the collapsed rail
   keeps one icon (Sign in). Company lookup is available to visitors. */
.pln-visit{display:flex;flex-direction:column-reverse;align-items:stretch;gap:calc(6 * var(--pln-u));
  margin-top:0.125rem;padding:calc(4 * var(--pln-u)) var(--snv-in);}
.pln-visit .pln-go{flex:none;width:100%;min-width:0;font-size:calc(13 * var(--pln-u));height:calc(32 * var(--pln-u));padding:0 calc(10 * var(--pln-u));
  white-space:nowrap;text-decoration:none;}
.pln-visit-in{flex:none;display:flex;align-items:center;justify-content:center;height:calc(26 * var(--pln-u));padding:0 calc(10 * var(--pln-u));
  border-radius:calc(6 * var(--pln-u));color:var(--text-secondary);text-decoration:none;
  font-family:var(--font-sans);font-size:calc(13 * var(--pln-u));font-weight:500;white-space:nowrap;}
.pln-visit-in:hover{color:var(--text-primary);text-decoration:underline;text-underline-offset:2px;}
.pln-visit-in:focus-visible,.pln-visit-ico:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.pln-visit-ico{display:none;}
:root:not(.sb-open):not(.phone) .pln-visit .pln-visit-in,
:root:not(.sb-open):not(.phone) .pln-visit .pln-go{display:none;}
:root:not(.sb-open):not(.phone) .pln-visit-ico{display:flex;align-items:center;justify-content:flex-start;
  width:calc(var(--rail-w) - 2 * var(--snv-in));padding-left:calc(var(--snv-col) - var(--snv-in));box-sizing:border-box;height:var(--snv-h);border-radius:var(--snv-r);color:var(--snv-ink-icon);}
:root:not(.sb-open):not(.phone) .pln-visit-ico:hover{background:var(--snv-hover);}
#snv-search[data-pln-lock] > .pln-lk{position:absolute;right:calc(var(--snv-in) + var(--snv-px));top:50%;margin:0;transform:translateY(-50%);}
:root:not(.sb-open):not(.phone) #snv-search[data-pln-lock] > .pln-lk{display:none;}
a.pln-go{text-decoration:none;}

/* SEC lists end at the viewport-filling wall; the last partial row is clipped. */
.pln-wall.pln-fill{min-height:0;flex:none;}
.pln-fill .pln-tail,:root.phone .pln-fill .pln-tail{height:100%;max-height:none;mask-image:none;-webkit-mask-image:none;}
.pln-fill .pln-ghost{margin:0;}
.pln-fill .pln-ghost tr{pointer-events:none;}
.pln-fill .pln-teaser-stripe > td{background:var(--bg-stripe);}
.pln-fill .pln-invite{box-sizing:border-box;}
.pln-tail-hidden{display:none!important;}

.pln-fill{--pln-blur:3px;}
/* Existing non SEC invitation geometry. */
.pln-wall:not(.pln-fill) .pln-invite{left:0;right:0;top:0;bottom:0;width:auto;max-width:none;transform:none;
  justify-content:center;background:none;border:0;border-radius:0;padding:calc(8 * var(--pln-u)) calc(16 * var(--pln-u));}
/* Account actions use the same modal frame, without the price column. */
.pln-sheet.pln-account{display:flex;flex-direction:column;gap:1rem;width:min(26rem, calc(100vw - 2rem));}
.pln-account::before{display:none;}
.pln-account .pln-title{height:auto;padding-right:2rem;}
.pln-account-actions{display:flex;flex-direction:column;gap:0.75rem;order:3;}
.pln-account-actions .pln-visit-in{width:100%;box-sizing:border-box;min-height:2.5rem;}
.pln-account .pln-title{align-self:stretch;}
.pln-sheet.pln-account.pln-bottom{width:auto;}
.pln-go > .pln-lk{color:inherit;margin-right:0.5rem;}
:root[data-plan] .pln-go > .pln-lk[data-pln-mark]{margin-left:0;}

:root[data-plan="visitor"] .pln-account-control{width:auto;font:inherit;}
.pln-account-links{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;}
.pln-account-links .pln-go{width:auto;}

/* Quiet gates retain the normal control contrast. */
.pln-gated.pln-gated{color:var(--text-secondary);opacity:1;}
.pln-gated::placeholder{color:var(--text-secondary);opacity:1;}
.pln-detail{color:var(--text-secondary);line-height:1.5;}
.pln-detail-go{width:auto;height:auto;min-height:1.75rem;padding:0.25rem 0.5rem;font-size:0.8125rem;}
/* The invitation stays inside its tail, below every real row. */
.pln-fill{box-sizing:border-box;padding-top:12px;}
.pln-fill .pln-tail{position:absolute;inset:0;}
.pln-fill .pln-invite{position:sticky;top:12px;left:auto;transform:none;margin:0 auto;max-width:calc(100% - 24px);}
@media(max-width:720px){.pln-fill .pln-invite{width:calc(100% - 24px);}}

/* Three standard rows above the company invitation. */
.pln-panel-body .pln-panel-cell{padding:calc(3 * var(--mpt-row)) 0 1rem;border:0;}
.pln-panel-body .pln-invite{position:relative;top:auto;left:auto;transform:none;margin:0 auto;}
