/* Account Settings (/account/, pages/account.php), in the purple look (the mockup's Profile page:
   mockups/redesign/site-a-hub/account.js, viewProfile). The page links it itself and carries its
   own copies of the purple skin's colours, so it draws the same under either theme. */
.acc-page {
  --a-plum: #341e60; --a-ink: #2a1b4d; --a-muted: #6b6485; --a-line: #eee8f6; --a-bg: #f3eef9;
  --a-orange: #ff9500; --a-orange-d: #e07f00; --a-violet: #634bf5; --a-violet-d: #4a37c9;
  max-width: 780px; margin: 0 auto; box-sizing: border-box; width: 100%;
  padding: 40px 24px 72px; font-family: 'DM Sans', -apple-system, 'Segoe UI', sans-serif; color: var(--a-ink);
}
/* a short page still fills the window, so the footer never rides up */
body.page-account-settings { min-height: 100vh; display: flex; flex-direction: column; }
body.page-account-settings .acc-page { flex: 1 0 auto; }
.acc-page [hidden] { display: none !important; }

/* who is signed in: the header button's orange circle with the initial */
.acc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; min-height: 60px; }
.acc-av { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--a-orange); color: var(--a-plum); display: grid; place-items: center; font: 700 26px 'DM Sans', sans-serif; }
.acc-av:empty { display: none; }
.acc-head h1 { font: 600 38px/1.1 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 0 !important; letter-spacing: 0 !important; }
.acc-who { margin: 4px 0 0; font-size: 15px; color: var(--a-muted); overflow-wrap: anywhere; }
.acc-who:empty { display: none; }
.acc-loading { color: var(--a-muted); font-size: 15px; padding: 24px 0; }

/* cards */
.acc-card { background: #fff; border-radius: 24px; box-shadow: 0 6px 20px rgba(52,30,96,.05); padding: 6px 26px 8px; margin-bottom: 18px; }
.acc-h { display: flex; align-items: center; gap: 12px; font: 600 21px/1.2 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 18px 0 4px !important; letter-spacing: 0 !important; }
.acc-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--a-violet); color: #fff; }
.acc-ic svg { width: 18px; height: 18px; }
.acc-ic-prefs { background: var(--a-plum); }
.acc-note { margin: 0 0 4px 46px; font-size: 13.5px; color: var(--a-muted); }

/* a row a setting: label | value | button, the form opening under them */
.acc-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--a-line); }
.acc-h + .acc-row, .acc-note + .acc-row { border-top: 0; }
.acc-l { font-size: 13.5px; font-weight: 700; color: var(--a-muted); }
.acc-l label { font: inherit; color: inherit; }
.acc-v { min-width: 0; }
.acc-v b { display: block; font-size: 16px; font-weight: 700; color: var(--a-plum); overflow-wrap: anywhere; }
.acc-v small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--a-muted); }
.acc-dots { letter-spacing: 2px; }
.acc-edit { justify-self: end; border: 0; border-radius: 999px; background: var(--a-bg); color: var(--a-plum); font: 700 14px 'DM Sans', sans-serif; padding: 9px 18px; cursor: pointer; transition: background .12s; }
.acc-edit:hover { background: #e7def6; }
.acc-edit:focus-visible, .acc-btn:focus-visible, .acc-cancel:focus-visible, .acc-seg button:focus-visible, .acc-pw-toggle:focus-visible { outline: 3px solid rgba(99,75,245,.35); outline-offset: 2px; }

.acc-form { grid-column: 1 / -1; margin-top: 8px; padding: 18px 20px 20px; background: #faf7fd; border: 1px solid var(--a-line); border-radius: 18px; }
.acc-field { margin-bottom: 14px; max-width: 420px; }
.acc-field label { display: block; font-size: 14px; font-weight: 700; color: var(--a-plum); margin-bottom: 6px; }
.acc-page input[type="text"], .acc-page input[type="email"], .acc-page input[type="password"], .acc-page select {
  display: block; width: 100%; box-sizing: border-box; padding: 11px 14px; margin: 0;
  font: 16px/1.4 'DM Sans', -apple-system, sans-serif; color: var(--a-ink);
  background: #fff; border: 1.5px solid #ddd3ee; border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.acc-page input:focus, .acc-page select:focus { outline: none; border-color: var(--a-violet); box-shadow: 0 0 0 3px rgba(99,75,245,.18); }
.acc-page select { max-width: 420px; cursor: pointer; padding-right: 36px; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23341e60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.acc-hint { margin: 6px 0 0; font-size: 13px; color: var(--a-muted); line-height: 1.45; }
.acc-hint a, .acc-close a, .acc-v small a { color: var(--a-violet-d); font-weight: 700; text-decoration: none; }
.acc-hint a:hover, .acc-close a:hover { text-decoration: underline; }
.acc-pw { position: relative; }
.acc-pw input { padding-right: 70px !important; }
.acc-pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 8px; background: none; padding: 6px 10px; font: 700 13px 'DM Sans', sans-serif; color: var(--a-muted); cursor: pointer; }
.acc-pw-toggle:hover { background: var(--a-bg); color: var(--a-plum); }

.acc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.acc-btn, a.acc-btn { display: inline-block; border: 0; border-radius: 999px; background: var(--a-orange) !important; color: var(--a-plum) !important; font: 700 15px 'DM Sans', sans-serif; padding: 11px 24px; cursor: pointer; text-decoration: none !important; transition: background .15s; }
.acc-btn:hover { background: var(--a-orange-d) !important; }
.acc-btn:disabled { opacity: .6; cursor: default; }
.acc-cancel { border: 0; background: none; padding: 8px 4px; font: 700 14px 'DM Sans', sans-serif; color: var(--a-muted); cursor: pointer; }
.acc-cancel:hover { color: var(--a-plum); text-decoration: underline; }

.acc-msg { padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; margin: 0 0 14px; max-width: 520px; }
.acc-msg.error { background: #fff1f1; color: #b4232a; border: 1px solid #ffd0d1; }
.acc-msg.ok { background: #ecfbf4; color: #1f6a55; border: 1px solid #bfeedd; }
/* what a form did, left in its row once it closes */
.acc-done { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; padding: 11px 14px; border-radius: 14px; background: #ecfbf4; color: #1f6a55; font-size: 14px; line-height: 1.5; }
.acc-done-ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2fa776; color: #fff; margin-top: 0; }
.acc-done-ic svg { width: 13px; height: 13px; stroke-width: 3; }
.acc-done strong { overflow-wrap: anywhere; }

/* preferences */
.acc-row-pref { align-items: start; }
.acc-row-pref .acc-l { padding-top: 12px; }
.acc-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 8px 8px 0; background: var(--a-bg); border-radius: 999px; }
.acc-seg button { border: 0; border-radius: 999px; background: none; color: var(--a-muted); font: 700 14px 'DM Sans', sans-serif; padding: 8px 16px; cursor: pointer; transition: background .12s, color .12s; }
.acc-seg button:hover { color: var(--a-plum); }
.acc-seg button.on { background: #fff; color: var(--a-plum); box-shadow: 0 2px 6px rgba(52,30,96,.12); }
.acc-row-pref small { margin-top: 2px; }
.acc-row-pref select + small { margin-top: 8px; }
.acc-saved { align-self: start; padding-top: 12px; min-width: 52px; font-size: 13px; font-weight: 700; color: #2fa776; opacity: 0; transition: opacity .25s; }
.acc-saved.show { opacity: 1; }

/* signed out, and the emailed confirmation link */
.acc-center { text-align: center; padding: 40px 32px 38px; max-width: 520px; margin: 8px auto 18px; }
.acc-big-ic { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--a-violet); color: #fff; margin-bottom: 16px; }
.acc-big-ic svg { width: 34px; height: 34px; }
.acc-center h2 { font: 600 26px/1.2 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 0 0 8px !important; letter-spacing: 0 !important; }
.acc-center p { font-size: 15.5px; line-height: 1.55; color: var(--a-muted); margin: 0 auto 20px; max-width: 400px; overflow-wrap: anywhere; }
.acc-center p strong { color: var(--a-plum); }
.acc-center .acc-msg { margin: 0 auto 18px; text-align: left; }
.acc-center-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.acc-link { color: var(--a-violet-d) !important; font-weight: 700; font-size: 14.5px; text-decoration: none !important; }
.acc-link:hover { text-decoration: underline !important; }

.acc-close { margin: 22px 4px 0; font-size: 13.5px; line-height: 1.55; color: var(--a-muted); }

/* a quieter button beside or in place of the orange one (Stop the Weekly Email) */
.acc-btn.acc-btn-quiet, a.acc-btn.acc-btn-quiet { background: var(--a-bg) !important; }
.acc-btn.acc-btn-quiet:hover { background: #e7def6 !important; }

/* an on/off switch: the account's own settings (Weekly Email, Printing) */
.acc-row-switch { grid-template-columns: 150px minmax(0, 1fr) auto; align-items: start; }
.acc-row-switch .acc-l { padding-top: 4px; }
.acc-switch { position: relative; flex: none; justify-self: end; width: 52px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: #d9d1e8; cursor: pointer; transition: background .18s; }
.acc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(52,30,96,.25); transition: transform .18s; }
.acc-switch[aria-checked="true"] { background: #2fa776; }
.acc-switch[aria-checked="true"]::after { transform: translateX(22px); }
.acc-switch:disabled { opacity: .55; cursor: default; }
.acc-switch:focus-visible { outline: 3px solid rgba(99,75,245,.35); outline-offset: 2px; }
.acc-v .acc-state { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: #2fa776; }
.acc-v .acc-state.off { color: var(--a-muted); }
.acc-v .acc-state.error { color: #b4232a; }
.acc-ic-mail { background: #14a3a0; }
.acc-ic-print { background: var(--a-orange); color: var(--a-plum); }

/* the weekly email page (/weekly-email/, pages/weekly-email.php) */
.wk-page { max-width: 640px; }
.wk-hero { text-align: center; margin: 4px 0 24px; }
.wk-hero-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #14a3a0; color: #fff; margin-bottom: 12px; }
.wk-hero-ic svg { width: 34px; height: 34px; }
.wk-hero h1 { font: 600 38px/1.1 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 0 0 10px !important; letter-spacing: 0 !important; }
.wk-hero p { font-size: 16.5px; line-height: 1.55; color: var(--a-muted); margin: 0 auto; max-width: 480px; }
.wk-card { padding: 22px 28px 24px; }
.wk-h { font: 600 22px/1.2 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 0 0 14px !important; letter-spacing: 0 !important; }
.wk-text { font-size: 15.5px; line-height: 1.55; color: var(--a-ink); margin: 0 0 16px; overflow-wrap: anywhere; }
.wk-text strong { color: var(--a-plum); }
.wk-card .acc-field { max-width: none; }
.wk-card .acc-hint { margin-top: 12px; }
.wk-alt { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--a-line); font-size: 14px; color: var(--a-muted); }
.wk-alt a, .wk-other { color: var(--a-violet-d); font: 700 14px 'DM Sans', sans-serif; text-decoration: none; }
.wk-other { border: 0; background: none; padding: 0; cursor: pointer; }
.wk-alt a:hover, .wk-other:hover { text-decoration: underline; }
.wk-again { border: 0; background: none; padding: 0; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.wk-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wk-what { display: grid; gap: 12px; margin-top: 22px; }
.wk-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 20px; padding: 16px 20px; box-shadow: 0 6px 20px rgba(52,30,96,.05); }
.wk-item h3 { font: 600 17px/1.25 'Fredoka', sans-serif !important; color: var(--a-plum) !important; margin: 2px 0 4px !important; letter-spacing: 0 !important; }
.wk-item p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--a-muted); }
.wk-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; }
.wk-ic svg { width: 20px; height: 20px; }
.wk-ic-new { background: var(--a-violet); }
.wk-ic-cal { background: var(--a-orange); }
.wk-ic-tip { background: #2fa776; }

@media (max-width: 640px) {
  .acc-page { padding: 26px 16px 56px; }
  .acc-head { gap: 12px; margin-bottom: 20px; }
  .acc-av { width: 50px; height: 50px; font-size: 22px; }
  .acc-head h1 { font-size: 30px !important; }
  .acc-card { padding: 4px 18px 6px; border-radius: 20px; }
  .acc-note { margin-left: 0; }
  /* label and button on one line, the value under them */
  .acc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l b" "v v"; }
  .acc-row > .acc-l { grid-area: l; padding-top: 0; }
  .acc-row > .acc-v { grid-area: v; }
  .acc-row > .acc-edit, .acc-row > .acc-saved { grid-area: b; padding-top: 0; }
  .acc-row > .acc-edit { padding: 7px 16px; }
  .acc-form { padding: 16px 14px 16px; }
  .acc-center { padding: 32px 20px 30px; }
  .acc-row-switch { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l b" "v v"; }
  .acc-row-switch > .acc-switch { grid-area: b; }
  .wk-hero h1 { font-size: 30px !important; }
  .wk-card { padding: 18px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { .acc-saved, .acc-edit, .acc-seg button { transition: none; } }
