/* plans.css — the account plans page (/plans, plans.php; design docs/superpowers/specs/2026-11-28-account-plans-design.md,
   "The page"). Every rule names the page: body.pl-page, .pl (its <main>) or a pl-/plan- class, so nothing here reaches
   another page.

   THEMES (the county page's way, public/county/county.css). The light values are written out, so the page looks right
   under the classic header (no theme, no --v4- variables) and before the v4 theme script has run. Under
   :root[data-theme="dark"], the v4 chrome's switch, the values are the site's own variables, each with a fall-back.
   The drawings (includes/account-plans-art.php) carry their light colours as attributes and are recoloured here for dark.

   THE ONE MEMORABLE THING is the drawings: one river runs through all three cards on a wide screen, and Explorer's is a
   blueprint (line only, a dashed ring on its list), which says "being drawn up" without greying anything out.
   FloodRadar+ wears exactly what the others wear: no badge, no lift, no colour of its own. */

/* ── the ground and the colours ───────────────────────────────────────────────────────────────────────────────── */
body.pl-page {
  --pl-bg: #f5f7fa; --pl-panel: #fff; --pl-soft: #f1f6f9; --pl-line: #dbe3ee; --pl-field: #b9c6d6;
  --pl-ink: #14334b; --pl-muted: #536779; --pl-accent: #1857aa; --pl-accent-hover: #104482; --pl-on-accent: #fff; --pl-accent-soft: #e9f1fb;
  --pl-teal: #187b82; --pl-ok: #297663; --pl-coming: #3d6fb6; --pl-stop: #a8121d; --pl-error: #a8121d;
  --pl-amber-ink: #8a5a06; --pl-amber-bg: #fdf3e1; --pl-amber-line: #f0dcae; --pl-focus: #b67927;
  --pl-art: #e7f1f3; --pl-art-bp: #eef2fa;
  --pl-shadow: 0 1px 2px rgba(16, 41, 74, .05);
  --pl-ic-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --pl-ic-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-dasharray='3.2 2.6'%3E%3Ccircle cx='12' cy='12' r='7.5'/%3E%3C/svg%3E");
  --pl-ic-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6.5 12h11'/%3E%3C/svg%3E");
  background: var(--pl-bg);
  color-scheme: light;   /* whoever owns the background owns the scheme (public/styles.css) */
}
:root[data-theme="dark"] body.pl-page {
  --pl-bg: var(--v4-bg, #0a172e); --pl-panel: var(--v4-panel, #11274b); --pl-soft: var(--v4-input, #0a1830); --pl-line: var(--v4-border, #294261); --pl-field: #3a5577;
  --pl-ink: var(--v4-text, #e3ebf8); --pl-muted: var(--v4-muted, #a6b6ce); --pl-accent: var(--v4-accent, #31bbee); --pl-accent-hover: #6fd0f3; --pl-on-accent: #04213a; --pl-accent-soft: #12355a;
  --pl-teal: var(--v4-typical, #4cc38a); --pl-ok: var(--v4-typical, #4cc38a); --pl-coming: #8fb4ff; --pl-stop: #ff8389; --pl-error: #ff8389;
  --pl-amber-ink: #ffcf9e; --pl-amber-bg: #3a2a1c; --pl-amber-line: #6b4a26; --pl-focus: #ffb066;
  --pl-art: #0e2442; --pl-art-bp: #0c1f3a;
  --pl-shadow: none;
  color-scheme: dark;
}

.pl [hidden] { display: none !important; }   /* the page's own display rules must never show a hidden control */
.pl { max-width: 1180px; margin: 0 auto; padding: 30px 20px 60px; color: var(--pl-ink); font-family: var(--v4-font, inherit); font-size: 16px; line-height: 1.55; }
.pl:focus { outline: none; }
.pl-skip { position: absolute; left: 16px; top: 8px; z-index: 2000; padding: 10px 16px; border-radius: 8px; background: #fff; color: #14334b; font-weight: 700; transform: translateY(-200%); }
.pl-skip:focus { transform: none; }

.pl a:focus-visible, .pl button:focus-visible, .pl input:focus-visible, .pl textarea:focus-visible, .pl-skip:focus-visible {
  outline: 3px solid var(--pl-focus); outline-offset: 3px;
}

/* ── the head ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.pl-preview { margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--pl-amber-line); border-radius: 10px; background: var(--pl-amber-bg); color: var(--pl-amber-ink); font-size: .92rem; font-weight: 600; }
.pl-preview a { color: inherit; }
.pl-head h1 { margin: 0 0 6px; font-size: clamp(1.9rem, 1.35rem + 1.7vw, 2.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--pl-ink); }
.pl-lede { margin: 0; max-width: 62ch; font-size: 1.05rem; color: var(--pl-muted); }

/* ── the three cards ──────────────────────────────────────────────────────────────────────────────────────────── */
.pl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.plan-card { display: flex; flex-direction: column; min-width: 0; background: var(--pl-panel); border: 1px solid var(--pl-line); border-radius: 14px; overflow: hidden; box-shadow: var(--pl-shadow); }
.plan-art { aspect-ratio: 16 / 7; background: var(--pl-art); border-bottom: 1px solid var(--pl-line); }
.plan-card[data-plan="explorer"] .plan-art { background: var(--pl-art-bp); }
.plan-svg { display: block; width: 100%; height: 100%; }
.plan-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; }
.plan-name { margin: 0; font-size: 1.32rem; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; color: var(--pl-ink); }
.plan-price { margin: 3px 0 0; font-size: .98rem; font-weight: 700; color: var(--pl-teal); }
.plan-card[data-plan="explorer"] .plan-price { color: var(--pl-coming); }
.plan-for { margin: 6px 0 16px; font-size: .95rem; color: var(--pl-muted); }

/* A tick is there today; a dashed ring is drawn up and coming (Explorer, and an admin's planned line). */
.plan-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: .94rem; line-height: 1.5; }
.plan-list li { position: relative; padding-left: 27px; }
.plan-list li::before { content: ""; position: absolute; left: 0; top: .16em; width: 17px; height: 17px; background: var(--pl-ok); -webkit-mask: var(--pl-ic-tick) center / contain no-repeat; mask: var(--pl-ic-tick) center / contain no-repeat; }
.plan-list.is-coming li::before, .plan-list li.is-planned::before { background: var(--pl-coming); -webkit-mask-image: var(--pl-ic-ring); mask-image: var(--pl-ic-ring); }
.plan-list.is-stops li::before { background: var(--pl-stop); -webkit-mask-image: var(--pl-ic-stop); mask-image: var(--pl-ic-stop); }
.plan-tag { display: inline-block; margin-left: 2px; padding: 0 8px; border-radius: 999px; background: var(--pl-amber-bg); color: var(--pl-amber-ink); font-size: .74rem; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.plan-list + .plan-rule { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--pl-line); }
.plan-rule { margin: 8px 0 0; font-size: .92rem; color: var(--pl-ink); }

/* ── the one action at the foot of each card ──────────────────────────────────────────────────────────────────── */
.plan-action { margin-top: auto; padding-top: 22px; }
.plan-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 11px 18px; border: 1.5px solid transparent; border-radius: 8px;
  font: inherit; font-size: .95rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.plan-btn-main { background: var(--pl-accent); color: var(--pl-on-accent); }
.plan-btn-main:hover { background: var(--pl-accent-hover); }
.plan-btn-quiet { background: var(--pl-panel); color: var(--pl-accent); border-color: var(--pl-accent); }
.plan-btn-quiet:hover { background: var(--pl-accent-soft); }
.plan-btn[aria-busy="true"] { cursor: progress; opacity: .72; }
.plan-current { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 0; border-radius: 8px; background: var(--pl-soft); color: var(--pl-teal); font-weight: 700; }
.plan-current::before { content: ""; width: 17px; height: 17px; background: currentColor; -webkit-mask: var(--pl-ic-tick) center / contain no-repeat; mask: var(--pl-ic-tick) center / contain no-repeat; }
.plan-told { margin: 0; font-size: .95rem; font-weight: 600; color: var(--pl-ink); }
.plan-told[data-kind="asked"]::before { content: ""; display: inline-block; width: 16px; height: 16px; margin: 0 7px -2px 0; background: var(--pl-ok); -webkit-mask: var(--pl-ic-tick) center / contain no-repeat; mask: var(--pl-ic-tick) center / contain no-repeat; }
.plan-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--pl-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.plan-link:hover { color: var(--pl-accent-hover); }
.plan-status { margin: 10px 0 0; font-size: .9rem; font-weight: 600; color: var(--pl-error); }
.plan-status:empty { margin: 0; }   /* kept rendered while empty: a live region taken out of the tree is often not heard */
.plan-note { margin: 0; font-size: .88rem; color: var(--pl-muted); }

/* Explorer's box (signed out), and the member's optional question */
.plan-box, .plan-use { display: grid; gap: 12px; }
.plan-use { margin-top: 14px; }
.plan-field { display: grid; gap: 5px; }
.plan-field label, .plan-use label { font-size: .9rem; font-weight: 600; color: var(--pl-ink); }
.pl input[type="email"], .pl textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--pl-field); border-radius: 8px; background: var(--pl-panel); color: var(--pl-ink); font: inherit; font-size: 1rem; }
.pl textarea { resize: vertical; min-height: 4.6em; }
.pl input[aria-invalid="true"], .pl textarea[aria-invalid="true"] { border-color: var(--pl-error); box-shadow: 0 0 0 1px var(--pl-error); }
.plan-hint, .plan-keep { margin: 0; font-size: .84rem; color: var(--pl-muted); }
.plan-keep a, .pl-close a { color: var(--pl-accent); font-weight: 600; }
.plan-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }   /* the honeypot: off screen, never display:none */

.pl-close { margin: 30px 0 0; font-size: .92rem; color: var(--pl-muted); }

/* ── the switch-back dialog ───────────────────────────────────────────────────────────────────────────────────── */
.plan-dialog { margin: auto; /* public/styles.css's * { margin: 0 } takes away a dialog's centring */ width: 100%; max-width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 24px 24px; border: 1px solid var(--pl-line); border-radius: 14px; background: var(--pl-panel); color: var(--pl-ink); }
.plan-dialog::backdrop { background: rgba(12, 39, 71, .48); }
.plan-dialog h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.plan-dialog h2:focus { outline: none; }   /* focused only to open the dialog at its top; never a control */
.plan-dialog h3 { margin: 16px 0 8px; font-size: .98rem; font-weight: 700; }
.plan-dialog p { margin: 0 0 8px; font-size: .92rem; color: var(--pl-muted); }
.plan-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.plan-dialog-actions .plan-btn { flex: 1 1 180px; width: auto; }

@media (max-width: 899px) {
  .pl-cards { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
}
@media (max-width: 600px) {
  .pl { padding: 22px 16px 48px; }
  .plan-body { padding: 16px 18px 20px; }
  .plan-dialog { padding: 18px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .plan-btn, .plan-link { transition: none; }
}

/* ── the drawings in the dark theme ───────────────────────────────────────────────────────────────────────────── */
:root[data-theme="dark"] body.pl-page .ar-hill-far { fill: #16344a; }
:root[data-theme="dark"] body.pl-page .ar-hill { fill: #1c4552; }
:root[data-theme="dark"] body.pl-page .ar-river { fill: #2d78c9; }
:root[data-theme="dark"] body.pl-page .ar-ripple { stroke: #7fb8ec; }
:root[data-theme="dark"] body.pl-page .ar-staff { fill: #dfe8f2; stroke: #0a172e; }
:root[data-theme="dark"] body.pl-page .ar-ink { stroke: #0a172e; }
:root[data-theme="dark"] body.pl-page .ar-house { fill: #d8d2c4; stroke: #0a172e; }
:root[data-theme="dark"] body.pl-page .ar-roof { stroke: #d8d2c4; }
:root[data-theme="dark"] body.pl-page .ar-window { fill: #2d78c9; }
:root[data-theme="dark"] body.pl-page .ar-bell { fill: #ff9f4a; }
:root[data-theme="dark"] body.pl-page .ar-ring { stroke: #ff9f4a; }
:root[data-theme="dark"] body.pl-page .ar-card { fill: #16304f; stroke: #35557b; }
:root[data-theme="dark"] body.pl-page .ar-grid { stroke: #24446a; }
:root[data-theme="dark"] body.pl-page .ar-line { stroke: #6fd0f3; }
:root[data-theme="dark"] body.pl-page .ar-dash { stroke: #4f7fa6; }
:root[data-theme="dark"] body.pl-page .ar-phone { fill: #dfe8f2; }
:root[data-theme="dark"] body.pl-page .ar-screen { fill: #0e2442; }
:root[data-theme="dark"] body.pl-page .ar-teal { fill: #4cc38a; }
:root[data-theme="dark"] body.pl-page .ar-soft { fill: #3c6f99; }
:root[data-theme="dark"] body.pl-page .ar-bp { stroke: #8fb4ff; }
:root[data-theme="dark"] body.pl-page .ar-bp-paper { fill: #0c1f3a; }
:root[data-theme="dark"] body.pl-page .ar-bp-grid { stroke: #1a3358; }
:root[data-theme="dark"] body.pl-page .ar-bp-dash { stroke: #5b7fbf; }
:root[data-theme="dark"] body.pl-page .ar-bp-line { stroke: #6fd0f3; }
