/* Member portal: sign in page and the My Brain Score home. Loaded after style.css and app-mode.css.
   Mobile first (390 px, 16 px gutter), calmer and bigger on a computer. Only the pt- classes and .me-signin live here. */

.pt-app { align-items: stretch; gap: 18px; }
@media (min-width: 980px) { body.app-mode .app.pt-app { max-width: 880px; } }
body.app-mode .pt-app > .card { padding: 26px 20px; text-align: left; }
@media (min-width: 640px) { body.app-mode .pt-app > .card { padding: 34px 36px; } }

.pt-kicker { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tan); margin: 0 0 8px; }
.pt-h2 { font-family: var(--font-headline); font-weight: 600; font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; text-transform: none; color: var(--ink); margin: 0 0 6px; }
.pt-sub { font-family: var(--font-subtitle); font-size: 15px; line-height: 1.5; color: rgba(65, 65, 46, 0.82); margin: 0 0 14px; }
.pt-muted { font-family: var(--font-subtitle); font-size: 13px; line-height: 1.5; color: rgba(65, 65, 46, 0.82); margin: 10px 0 0; }

/* ---------- hero ---------- */
body.app-mode .card.pt-hero { position: relative; overflow: hidden; color: var(--cream); border-color: rgba(240, 232, 217, 0.18);
  background: radial-gradient(90% 120% at 100% 0%, rgba(170, 148, 118, 0.34) 0%, rgba(170, 148, 118, 0) 60%), linear-gradient(150deg, #41412E 0%, #41412E 45%, #1B1B1A 100%); }
.pt-hero::after { content: ''; position: absolute; left: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(158, 158, 125, 0.28), transparent 68%); pointer-events: none; }
.pt-hero-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 18px; }
.pt-hero-text { min-width: 0; flex: 1 1 150px; }
.pt-hero .pt-kicker { color: #D7C7A9; }
.pt-hero h1 { font-family: var(--font-headline); font-weight: 500; font-size: clamp(21px, 6.6vw, 26px); line-height: 1.2; letter-spacing: -0.02em; color: var(--cream); margin: 0 0 8px; overflow-wrap: anywhere; }
.pt-hero .pt-who { font-family: var(--font-subtitle); font-size: 14px; color: rgba(240, 232, 217, 0.72); margin: 0; overflow-wrap: anywhere; }
.pt-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.pt-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-subtitle); font-weight: 600; font-size: 12px; line-height: 1; padding: 7px 12px; border-radius: 999px; background: var(--sand); color: var(--accent); white-space: nowrap; }
.pt-hero .pt-chip { background: rgba(240, 232, 217, 0.12); color: var(--cream); border: 1px solid rgba(240, 232, 217, 0.18); }
.pt-chip.gold { background: #AA9476; color: #1B1B1A; border-color: #AA9476; }
.pt-chip.soft { background: rgba(215, 199, 169, 0.5); color: #41412E; font-weight: 500; }
.pt-chip.green { background: rgba(158, 158, 125, 0.35); color: #41412E; box-shadow: inset 0 0 0 1px #9E9E7D; }
.pt-chip.rose { background: rgba(170, 148, 118, 0.2); color: #41412E; box-shadow: inset 0 0 0 1px #AA9476; }
.pt-chip.warm { background: rgba(215, 199, 169, 0.6); color: #41412E; }

.pt-ring { position: relative; flex: 0 0 auto; width: 112px; height: 112px; }
.pt-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.pt-ring circle { fill: none; stroke-width: 9; }
.pt-ring-bg { stroke: rgba(240, 232, 217, 0.16); }
.pt-ring-fg { stroke: #D7C7A9; stroke-linecap: round; stroke-dasharray: 263.9; transition: stroke-dashoffset 0.9s cubic-bezier(.2, .8, .2, 1); animation: ptRing 1.4s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 0 6px rgba(215, 199, 169, 0.4)); }
@keyframes ptRing { from { stroke-dashoffset: 263.9; } }
.pt-ring-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pt-ring-n { font-family: var(--font-headline); font-size: 24px; line-height: 1; color: var(--cream); letter-spacing: -0.03em; }
.pt-ring-n small { font-size: 13px; opacity: 0.7; }
.pt-ring-l { font-family: var(--font-body); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(240, 232, 217, 0.7); margin-top: 6px; }

/* ---------- steps ---------- */
.pt-steps .steps { margin-top: 8px; }

/* ---------- progress ---------- */
.pt-chart { width: 100%; margin: 8px 0 0; }
.pt-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pt-chart .grid { stroke: #D7C7A9; stroke-width: 1; stroke-dasharray: 3 5; }
.pt-chart .axis { font-family: var(--font-subtitle); font-size: 11px; fill: rgba(65, 65, 46, 0.82); }
.pt-chart .band { fill: rgba(170, 148, 118, 0.22); }
.pt-chart .line { fill: none; stroke: #41412E; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: ptDraw 1.4s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes ptDraw { from { stroke-dashoffset: 1; } }
.pt-chart .dot { fill: #F0E8D9; stroke: #41412E; stroke-width: 2.5; }
.pt-chart .dot.now { fill: #41412E; stroke: #F0E8D9; stroke-width: 3; }
.pt-chart .halo { fill: rgba(170, 148, 118, 0.3); transform-box: fill-box; transform-origin: center; animation: ptPulse 2.6s ease-in-out infinite; }
@keyframes ptPulse { 50% { transform: scale(1.35); opacity: 0.55; } }
.pt-chart .val { font-family: var(--font-subtitle); font-weight: 600; font-size: 12px; fill: #41412E; text-anchor: middle; paint-order: stroke; stroke: #F0E8D9; stroke-width: 4px; stroke-linejoin: round; }
.pt-chart .val.now { font-family: var(--font-headline); font-size: 17px; }
.pt-chart .xl { font-family: var(--font-subtitle); font-size: 11px; fill: rgba(65, 65, 46, 0.82); text-anchor: middle; }
.pt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; font-family: var(--font-subtitle); font-size: 12px; color: rgba(65, 65, 46, 0.82); }
.pt-legend i { display: inline-block; width: 18px; height: 9px; border-radius: 6px; background: rgba(170, 148, 118, 0.3); margin-right: 6px; vertical-align: middle; }
.pt-next-note { display: inline-block; margin: 12px 0 0; padding: 9px 14px; border-radius: 14px; background: rgba(215, 199, 169, 0.5); color: #41412E; font-family: var(--font-subtitle); font-weight: 600; font-size: 14px; }

.pt-sub-h { font-family: var(--font-subtitle); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tan); margin: 28px 0 12px; padding-top: 20px; border-top: 1px solid var(--sand); }
.pt-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-mini { background: rgba(215, 199, 169, 0.3); border: 1px solid var(--sand); border-radius: 16px; padding: 12px 12px 10px; min-width: 0; }
.pt-mini:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pt-mini-name { font-family: var(--font-subtitle); font-weight: 600; font-size: 13px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; min-height: 2.5em; }
.pt-mini svg { display: block; width: 100%; height: auto; overflow: visible; margin-bottom: 8px; }
.pt-mini .typ { stroke: #AA9476; stroke-width: 1; stroke-dasharray: 2 4; }
.pt-mini .ln { fill: none; stroke: rgba(65, 65, 46, 0.75); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pt-mini .d { fill: rgba(65, 65, 46, 0.75); }
.pt-mini .d.now { fill: #41412E; stroke: #F0E8D9; stroke-width: 2; }
@media (min-width: 720px) { .pt-minis { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pt-mini:last-child:nth-child(odd) { grid-column: auto; } }

.pt-sits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-sit { border: 1px solid var(--sand); border-radius: 16px; padding: 14px 14px 12px; background: #F0E8D9; }
.pt-sit.now { border-color: #41412E; box-shadow: 0 0 0 3px rgba(65, 65, 46, 0.08); }
.pt-sit-top { display: flex; align-items: center; gap: 10px; }
.pt-sit-date { font-family: var(--font-subtitle); font-weight: 600; font-size: 16px; color: var(--ink); }
.pt-sit-type { font-family: var(--font-subtitle); font-size: 13px; color: rgba(65, 65, 46, 0.82); min-width: 0; flex: 1 1 auto; }
.pt-score { flex: 0 0 auto; font-family: var(--font-headline); font-size: 15px; line-height: 1; padding: 8px 12px; border-radius: 12px; background: #41412E; color: var(--cream); }
.pt-score.na { background: var(--sand); color: var(--accent); }
.pt-sit .pt-chips { margin: 10px 0 0; gap: 6px; }
.pt-felt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--sand); }
.pt-felt-l { font-family: var(--font-subtitle); font-size: 12px; color: var(--tan); margin-right: 2px; }
.pt-felt .pt-chip { font-weight: 500; padding: 6px 10px; }

/* ---------- plan ---------- */
.pt-focus { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.pt-quote { position: relative; margin: 14px 0 6px; padding: 18px 18px 16px 22px; border-radius: 16px; background: rgba(215, 199, 169, 0.45); border-left: 4px solid var(--tan); }
.pt-quote::before { content: '\201C'; position: absolute; right: 14px; top: -4px; font-family: var(--font-headline); font-size: 56px; line-height: 1; color: rgba(170, 148, 118, 0.45); }
.pt-quote p { font-family: var(--font-subtitle); font-style: italic; font-size: 15px; line-height: 1.55; color: #41412E; margin: 0; }
.pt-quote cite { display: block; margin-top: 8px; font-family: var(--font-subtitle); font-style: normal; font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tan); }
.pt-weeks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
@media (min-width: 760px) { .pt-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-wk { position: relative; border: 1px solid var(--sand); border-radius: 22px; padding: 16px 14px 10px; background: #F0E8D9; transition: border-color .3s, box-shadow .3s, background .3s; }
.pt-wk.now { border-color: #41412E; box-shadow: 0 0 0 3px rgba(65, 65, 46, 0.1), 0 16px 30px -22px rgba(27, 27, 26, 0.6); background: #F0E8D9; }
.pt-wk.later { background: rgba(215, 199, 169, 0.2); }
.pt-wk-head { display: flex; align-items: center; gap: 12px; padding: 0 2px 8px; }
.pt-wk-n { flex: 0 0 auto; font-family: var(--font-headline); font-size: 44px; line-height: 0.9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.5px #41412E; }
.pt-wk.now .pt-wk-n { color: #41412E; -webkit-text-stroke: 0; }
.pt-wk-t { min-width: 0; flex: 1 1 auto; }
.pt-wk-w { font-family: var(--font-body); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tan); margin: 0 0 3px; }
.pt-wk-theme { font-family: var(--font-subtitle); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--ink); margin: 0; }
.pt-wk-badge { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #41412E; color: #F0E8D9; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.3) rotate(-30deg); transition: opacity .3s, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.pt-wk-badge svg { width: 16px; height: 16px; }
.pt-wk.done .pt-wk-badge { opacity: 1; transform: none; }
.pt-wk.done { border-color: #9E9E7D; background: rgba(158, 158, 125, 0.15); }
.pt-wk-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 6px; }
.pt-wk-dots { display: inline-flex; gap: 4px; align-items: center; }
.pt-wk-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); transition: background .25s, transform .25s; }
.pt-wk-dots i.on { background: #41412E; transform: scale(1.15); }
.pt-items { display: grid; gap: 2px; }
.pt-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; background: transparent; border: 0; border-radius: 14px; padding: 12px 8px; cursor: pointer; color: var(--ink); min-height: 56px; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.pt-item:hover { background: rgba(215, 199, 169, 0.28); }
.pt-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-box { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 1px; border-radius: 9px; border: 2px solid var(--tan); background: #F0E8D9; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.pt-box svg { width: 15px; height: 15px; stroke: #F0E8D9; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .3s .05s; }
.pt-item[aria-checked="true"] .pt-box { background: #41412E; border-color: #41412E; transform: scale(1.06); }
.pt-item[aria-checked="true"] .pt-box svg { stroke-dashoffset: 0; }
.pt-item-txt { min-width: 0; display: block; }
.pt-item-title { display: block; font-family: var(--font-subtitle); font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); }
.pt-item-detail { display: block; font-family: var(--font-subtitle); font-size: 13.5px; line-height: 1.45; color: rgba(65, 65, 46, 0.82); margin-top: 3px; }
.pt-item[aria-checked="true"] .pt-item-title { color: rgba(65, 65, 46, 0.82); text-decoration: line-through; text-decoration-color: rgba(65, 65, 46, 0.4); }
.pt-item-kind { display: inline-block; margin-top: 6px; font-family: var(--font-body); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tan); }
.pt-wait { display: flex; gap: 16px; align-items: center; }
.pt-wait-ico { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(215, 199, 169, 0.45); display: flex; align-items: center; justify-content: center; }
.pt-wait-ico svg { width: 28px; height: 28px; stroke: #AA9476; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-wait p { margin: 0; font-family: var(--font-subtitle); font-size: 15px; line-height: 1.5; color: #41412E; }

/* ---------- footer, toast, messages ---------- */
.pt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 6px 0 0; }
.pt-out { font-family: var(--font-subtitle); font-weight: 500; font-size: 14px; color: var(--cream); background: transparent; border: 1px solid rgba(240, 232, 217, 0.45); border-radius: 999px; padding: 11px 24px; cursor: pointer; transition: background .15s; }
.pt-out:hover { background: rgba(240, 232, 217, 0.12); }
.pt-out:disabled { opacity: 0.5; cursor: wait; }
.pt-link { font-family: var(--font-subtitle); font-size: 13px; color: rgba(240, 232, 217, 0.75); background: none; border: 0; padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pt-confirm { text-align: center; }
body.app-mode .pt-app > .card.pt-confirm { padding: 20px; text-align: center; }
.pt-confirm p { font-family: var(--font-subtitle); font-size: 15px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.pt-confirm .actions { margin-top: 0; }
.pt-confirm .btn { background: var(--accent); }
.pt-confirm .btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--tan); }
.pt-small { padding: 11px 24px; font-size: 14px; }
.pt-toast { position: fixed; left: 16px; right: 16px; bottom: 18px; z-index: 20; max-width: 420px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; background: #1B1B1A; color: var(--cream); font-family: var(--font-subtitle); font-size: 14px; text-align: center; box-shadow: 0 14px 30px -10px rgba(27, 27, 26, 0.6); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.pt-toast.on { opacity: 1; transform: none; }
.pt-msg p { font-family: var(--font-subtitle); font-size: 16px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.pt-skel { height: 180px; border-radius: 26px; background: linear-gradient(100deg, rgba(240, 232, 217, 0.06) 30%, rgba(240, 232, 217, 0.14) 50%, rgba(240, 232, 217, 0.06) 70%); background-size: 200% 100%; animation: ptSkel 1.4s linear infinite; }
@keyframes ptSkel { to { background-position: -200% 0; } }
.pt-disclaimer { font-family: var(--font-subtitle); font-size: 12px; line-height: 1.5; color: rgba(240, 232, 217, 0.7); text-align: center; max-width: 520px; margin: 14px auto 0; }

/* ---------- sign in ---------- */
.pt-login-wrap { min-height: calc(100dvh - 120px); display: flex; align-items: center; justify-content: center; }
body.app-mode .app.pt-login { max-width: 460px; }
body.app-mode .pt-login .card { padding: 34px 24px 28px; text-align: center; }
.pt-login h1 { font-family: var(--font-headline); font-weight: 500; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
.pt-login .pt-sub { margin-bottom: 20px; }
.pt-mark { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: #41412E; display: flex; align-items: center; justify-content: center; }
.pt-mark img { width: 28px; height: 28px; filter: brightness(0) invert(0.93); }
.pt-mark svg { width: 28px; height: 28px; stroke: #F0E8D9; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pt-mark.spin svg { animation: ptSpin 1.2s linear infinite; }
@keyframes ptSpin { to { transform: rotate(360deg); } }
.pt-field { width: 100%; padding: 14px 16px; border: 1px solid var(--sand); border-radius: 14px; background: #F0E8D9; color: var(--ink); font-family: var(--font-subtitle); font-size: 16px; text-align: left; }
.pt-field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-login form .btn { display: block; width: 100%; margin-top: 12px; background: var(--accent); padding: 15px 20px; }
.pt-login form .btn:hover { background: #1B1B1A; }
.pt-login form .btn:disabled { background: var(--sand); }
.pt-err { font-family: var(--font-subtitle); font-size: 14px; line-height: 1.5; color: #41412E; background: rgba(170, 148, 118, 0.2); border: 1px solid #AA9476; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; text-align: left; }
.pt-note { font-family: var(--font-subtitle); font-size: 12px; line-height: 1.5; color: rgba(65, 65, 46, 0.82); margin: 14px 0 0; }
.pt-login .pt-link { color: var(--accent); }
.pt-link.dark { color: var(--accent); }

/* ---------- small line on the private link page ---------- */
.me-signin { font-family: var(--font-subtitle); font-size: 14px; text-align: center; margin: 22px auto 0; }
.me-signin a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(240, 232, 217, 0.5); }
.me-signin a:hover { text-decoration-color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .pt-ring-fg, .pt-chart .line, .pt-chart .halo, .pt-skel, .pt-mark.spin svg { animation: none !important; }
  .pt-box, .pt-box svg, .pt-wk-badge, .pt-ring-fg, .pt-toast { transition: none !important; }
}

/* ---------- NeuroHaven Age (Raphael 2026-11-17): the latest full sitting's card and the age over time chart ---------- */
.pt-nha-card { margin: 4px 0 0; box-shadow: 0 24px 48px -30px rgba(27, 27, 26, 0.55); }
.pt-nha-card .nha-age { font-size: clamp(84px, 22vw, 116px); }
.pt-nha-card .nha-pill { margin-top: 12px; }
.pt-nha-card .nha-foot a.nha-learn { color: var(--cream) !important; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.pt-chart .ref { fill: none; stroke: #AA9476; stroke-width: 2; stroke-dasharray: 6 6; stroke-linecap: round; }
.pt-legend i.pt-lg-dot { width: 12px; height: 12px; border-radius: 50%; background: #41412E; }
.pt-legend i.pt-lg-ref { width: 20px; height: 0; border-radius: 0; background: none; border-top: 2px dashed #AA9476; }
.pt-score.pt-age-badge small { font-family: var(--font-body); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; margin-right: 2px; }
@media (prefers-reduced-motion: reduce) { .pt-nha-card { animation: none !important; } }
