/* ELSY Tax: client portal. Builds on site.css (colors, fonts, buttons, .field, .row-2, .notice).
   Made for phones first: one column, big buttons. */

body.portal { background: var(--tint); font-size: 16px; }
.p-wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--mint-deep); font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lime { background: var(--lime); color: var(--navy); }
.btn-lime:hover { background: #d6ee5c; }
.btn-on-dark { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.btn-on-dark:hover { background: #fff; color: var(--navy); }

/* ---------- Top bar and demo strip ---------- */
.p-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.p-top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.p-top .brand-mark { width: 36px; height: 36px; }
.p-demo { background: var(--lime); color: var(--navy); font-size: .86rem; padding: 8px 0; }
.p-demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.p-demo-pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.p-demo-pick select { min-height: 36px; border-radius: var(--radius); border: 1.5px solid var(--navy); background: #fff; font: 500 .86rem var(--font-body); color: var(--navy); padding: 0 8px; max-width: 230px; }

.p-main { padding-top: 28px; padding-bottom: 40px; outline: none; }
.p-narrow h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
.p-narrow .p-h1-sm { font-size: clamp(1.9rem, 6.5vw, 2.6rem); }
.p-narrow .lede { margin-bottom: 22px; }
.p-back { display: inline-block; margin-bottom: 14px; color: var(--mint-deep); font-weight: 600; text-decoration: none; }
.p-links { margin-top: 6px; color: var(--muted); }
.p-links .link-btn { display: inline; }
.center { text-align: center; }

/* ---------- Cards ---------- */
.p-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.p-card-soft { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.p-card .field:last-of-type { margin-bottom: 16px; }
.p-h2 { font: 700 1.08rem/1.3 var(--font-body); letter-spacing: 0; margin: 0 0 12px; }
.p-h2-gap { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.p-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-count { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #fff1d6; color: #7a4b00; white-space: nowrap; }
.p-count.ok { background: #d7f7ea; color: #0d6b50; }
.p-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.code-input { font: 600 1.6rem/1 var(--font-body) !important; letter-spacing: .4em; text-align: center; }

/* Checkboxes on the sign-up form */
.p-check { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; font-size: .95rem; line-height: 1.45; }
.p-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--mint-deep); }
.p-fieldset { border: 0; margin: 0 0 16px; padding: 0; }
.p-fieldset legend { font-weight: 700; font-size: .95rem; margin-bottom: 4px; padding: 0; }
.p-fieldset legend .hint { font-weight: 400; }
.p-fieldset .p-check + .p-check { border-top: 1px solid var(--line); }

/* ---------- Home ---------- */
.p-hello { font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.p-status { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 24px 22px; margin-bottom: 16px; }
.p-status.done { background: var(--mint-deep); }
.p-status-kicker { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; background: var(--lime); color: var(--navy); padding: 3px 10px; border-radius: 99px; margin: 0 0 14px; }
.p-status-title { font: 360 clamp(1.7rem, 6.5vw, 2.3rem)/1.12 var(--font-display); letter-spacing: -.01em; margin: 0 0 10px; color: #fff; }
.p-status p { margin: 0; color: rgba(255,255,255,.85); }
.p-status strong { color: #fff; }
.p-status-refund { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.p-status-refund span { font-size: .85rem; color: rgba(255,255,255,.65); }
.p-status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.p-ask { border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(61,220,174,.18); }

/* Amount due */
.p-due { border: 2px solid #f0b48f; }
.p-due-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #a1410d; margin: 0; }
.p-due-amount { font: 400 2.8rem/1.1 var(--font-display); margin: 4px 0 0; }
.p-pay { list-style: none; margin: 0; padding: 0; }
.p-pay li { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 56px; }
.p-pay li:last-child { border-bottom: 1px solid var(--line); }
.p-pay span { font-variant-numeric: tabular-nums; }
.p-paid { background: #eefbf5; border-color: #b9ecd6; }
.p-paid p { margin: 0; }

/* Checklist */
.p-checklist { list-style: none; margin: 0; padding: 0; }
.p-checklist li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid var(--line); }
.p-checklist li:first-child { border-top: 0; padding-top: 4px; }
.p-tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 1px; position: relative; }
.p-checklist li.done .p-tick { background: var(--mint); border-color: var(--mint); }
.p-checklist li.done .p-tick::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--navy); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.p-item { display: grid; gap: 2px; }
.p-item span { font-size: .87rem; color: var(--muted); line-height: 1.4; }
.p-checklist li.done .p-item strong { color: var(--muted); }
.p-item-status { font-size: .78rem; font-weight: 700; color: #7a4b00; white-space: nowrap; padding-top: 2px; }
.p-checklist li.done .p-item-status { color: #0d6b50; }

/* Upload */
.p-drop { display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed var(--mint-deep); border-radius: var(--radius-lg); background: #f4fcf9; cursor: pointer; margin-bottom: 12px; }
.p-drop:hover { background: #e9f8f2; }
.p-drop > span:last-child { display: grid; gap: 2px; }
.p-drop > span:last-child span { font-size: .85rem; color: var(--muted); }
.p-drop-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--mint); color: var(--navy); display: grid; place-items: center; font: 600 1.6rem/1 var(--font-body); }
#file-input:focus-visible + .p-drop { outline: 3px solid var(--mint-deep); outline-offset: 3px; }
.p-chosen { font-weight: 600; margin: 0 0 12px; word-break: break-word; }

/* Tracker */
.p-track { list-style: none; margin: 0; padding: 0; }
.p-track li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 9px 0; color: var(--muted); }
.p-track li::before { content: ""; position: absolute; left: 10px; top: -9px; height: 18px; width: 2px; background: var(--line); }
.p-track li:first-child::before { display: none; }
.p-track li.done::before, .p-track li.now::before { background: var(--mint); }
.p-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; position: relative; z-index: 1; }
.p-track li.done { color: var(--ink); }
.p-track li.done .p-dot { background: var(--mint); border-color: var(--mint); }
.p-track li.now { color: var(--ink); font-weight: 700; }
.p-track li.now .p-dot { border: 6px solid var(--navy); background: var(--lime); }
.p-when { font-size: .82rem; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* Document and past-year lists */
.p-docs { list-style: none; margin: 0; padding: 0; }
.p-docs li { display: grid; gap: 2px; padding: 11px 0; border-top: 1px solid var(--line); }
.p-docs li:first-child { border-top: 0; padding-top: 0; }
.p-doc-name { font-weight: 600; word-break: break-word; }
.p-doc-meta { font-size: .85rem; color: var(--muted); }

/* ---------- Footer and toast ---------- */
.p-foot { padding: 10px 0 40px; font-size: .9rem; text-align: center; color: var(--ink); }
.p-foot p { margin: 0 0 6px; }
.p-foot a { color: var(--mint-deep); font-weight: 600; }
.p-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 60; max-width: calc(100% - 32px); }
.p-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .p-demo-pick { width: 100%; }
  .p-demo-pick select { flex: 1; max-width: none; }
  .p-pay li { grid-template-columns: 78px 1fr auto; }
  .p-checklist li { grid-template-columns: 26px 1fr; }
  .p-item-status { grid-column: 2; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .p-toast { transition: none; } }

/* ---------- Added 2026-12-03: payment on its own, dependents in the sign-up ---------- */
.p-fee-line { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.p-fee { display: inline-block; font-weight: 700; color: var(--navy); background: #fff; border-radius: 99px; padding: 2px 10px; font-size: .9rem; }
.p-fee-paid { background: var(--lime); }
.p-fee-due { background: #ffe3d6; color: #a1410d; }
.p-step-note { font-size: .78rem; font-weight: 500; color: var(--muted); }
.p-track-pay { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .95rem; }
.p-due-later { border-color: var(--line-strong); }
.p-due-later .p-due-label { color: var(--muted); }
.p-deps { display: grid; gap: 12px; margin-bottom: 8px; }
.p-deps:empty { display: none; }
.p-dep { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 0; margin: 0; }
.p-dep legend { padding: 0 6px; }
