/* Memlow account pages (sign up, sign in, confirm email, password reset, the account dashboard).
   Sits on top of site.css: same paper, ink, note colours, Bricolage + DM Sans. Cards follow the notes
   app's soft, colourful style. Light or dark follows the site's switch (html[data-mode], set by site.js); Arabic and Urdu read right to left. */

:root {
  --acc-field: #FFFFFF;
  --acc-field-line: rgba(30, 27, 38, .34);
  --acc-field-hover: rgba(30, 27, 38, .55);
  --acc-ring: 0 0 0 4px rgba(30, 27, 38, .14);
  --acc-danger: #B4431D;
  --acc-danger-text: #A63E1C;
  --acc-on-danger: #FFFFFF;
  --acc-weak: #C2522B;
  --acc-fair: #C98E12;
  --acc-good: #5C9A48;
  --acc-strong: #2E7D4F;
  --acc-scrim: rgba(20, 18, 24, .55);
  --acc-card-shadow: 0 30px 80px -34px rgba(30, 27, 38, .32);
  --acc-tab-track: var(--paper-deep);
  --acc-tab-on: var(--card);
}

:root[data-mode="dark"] {
  --acc-field: #17151C;
  --acc-field-line: rgba(243, 241, 236, .3);
  --acc-field-hover: rgba(243, 241, 236, .5);
  --acc-ring: 0 0 0 4px rgba(243, 241, 236, .16);
  --acc-danger: #F08A62;
  --acc-danger-text: #F4A385;
  --acc-on-danger: #1E1B26;
  --acc-weak: #F08A62;
  --acc-fair: #E8C15A;
  --acc-good: #8CC97A;
  --acc-strong: #6FD39A;
  --acc-scrim: rgba(0, 0, 0, .65);
  --acc-card-shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  --acc-tab-track: #0F0D13;
  --acc-tab-on: #2E2A37;
}

/* ---- Page frame: header, main, footer ---------------------------------------------------------- */

body:has(.acc) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(.acc) > main { flex: 1; display: flex; flex-direction: column; }
.acc [hidden], .acc-header [hidden] { display: none !important; }
.acc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.acc-noscript { max-width: 520px; margin: 0 auto 32px; padding: 0 16px; text-align: center; color: var(--muted); }

.acc-header { position: relative; z-index: 40; border-bottom: 1px solid var(--line); background: var(--paper); }
.acc-header .container { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.acc-header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.lang-pick { position: relative; }
.lang-pick summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 14px;
  border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 15px/1.2 var(--body); color: var(--ink-soft); cursor: pointer; user-select: none;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--acc-field-line); }
.lang-pick summary .icon { width: 20px; height: 20px; }
.lang-pick summary .chev { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .15s ease; }
.lang-pick[open] summary .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  width: 248px; max-height: min(70vh, 560px); overflow-y: auto; margin: 0; padding: 8px; list-style: none;
  border-radius: 20px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px;
  border-radius: 12px; color: var(--ink-soft); font-size: 16px; text-decoration: none;
}
.lang-menu a:hover { background: var(--paper-deep); color: var(--ink); }
.lang-menu a[aria-current] { background: var(--paper); color: var(--ink); font-weight: 700; }
.lang-menu .tick { width: 18px; height: 18px; stroke-width: 2.4; }
.lang-menu a:focus-visible { outline-offset: -3px; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px;
  color: var(--ink-soft); font-size: 15px; font-weight: 600; text-decoration: none;
}
.back-link:hover { background: var(--card); color: var(--ink); }
.back-link .icon { width: 20px; height: 20px; }
[dir="rtl"] .back-link .icon { transform: scaleX(-1); }

@media (max-width: 640px) {
  .acc-header .container { padding-inline: 16px; min-height: 64px; }
  .acc-header .brand img { width: 34px; height: 34px; }
  .acc-header .brand span { font-size: 25px; }
  .lang-pick summary { padding: 0 12px; gap: 4px; }
  .lang-name, .back-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .back-link { width: 48px; padding: 0; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
  .lang-menu { width: min(248px, calc(100vw - 32px)); }
}

.acc-footer { border-top: 1px solid var(--line); padding: 14px 0 22px; }
.acc-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.acc-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 2px; margin: 0; margin-inline-start: -12px; padding: 0; }
.acc-footer a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--ink-soft); font-size: 15px; font-weight: 600; text-decoration: none;
}
.acc-footer a:hover { background: var(--card); color: var(--ink); }
.acc-footer p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- The sign-in pages' card ------------------------------------------------------------------- */

.acc.auth {
  flex: 1; display: grid; place-items: center; padding: clamp(20px, 5vw, 56px) 16px clamp(32px, 6vw, 72px);
  background-image: radial-gradient(var(--dots) 1.6px, transparent 2px); background-size: 28px 28px;
}
.auth-card {
  width: min(480px, 100%); overflow: hidden; border-radius: 32px;
  background: var(--card); box-shadow: var(--acc-card-shadow), inset 0 0 0 1px var(--line);
}
.auth-main { padding: clamp(24px, 6vw, 44px); min-width: 0; }
.auth-side { display: none; }
@media (min-width: 960px) {
  .auth-card.has-side { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
  .auth-card.has-side .auth-main { padding: 48px 52px; }
  .auth-side {
    display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 48px 40px;
    background-color: var(--paper-deep);
    background-image: radial-gradient(var(--dots) 1.6px, transparent 2px); background-size: 28px 28px;
  }
}

.auth-mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 18px;
  transform: rotate(-4deg); box-shadow: 0 12px 28px -12px rgba(30, 27, 38, .45); color: var(--ink);
}
.auth-mark img { width: 56px; height: 56px; border-radius: 16px; }
.auth-mark .icon { width: 26px; height: 26px; }
.auth-main h1, .auth-main .done h2 { font-size: clamp(30px, 5.4vw, 38px); margin-bottom: 10px; }
.auth-main .lead { margin: 0 0 24px; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: none; }
.auth-main .lead strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.auth-main > .alert, .auth-main > div > .alert { margin-bottom: 18px; }
.done h2:focus { outline: none; }

.side-heading { margin: 0; font: 800 30px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.side-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.side-note {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 22px; color: var(--ink);
  box-shadow: 0 14px 28px -22px rgba(30, 27, 38, .55);
}
.side-note:nth-child(1) { transform: rotate(-1.2deg); }
.side-note:nth-child(2) { transform: rotate(.9deg); margin-inline-start: 18px; }
.side-note:nth-child(3) { transform: rotate(-.6deg); margin-inline-end: 12px; }
.side-note .badge { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .62); }
.side-note .badge .icon { width: 21px; height: 21px; }
.side-note strong { display: block; font-size: 17px; line-height: 1.3; }
.side-note small { display: block; margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
[data-mode="dark"] .side-note .badge { background: rgba(0, 0, 0, .22); }

/* ---- Forms ---------------------------------------------------------------------------------------- */

.acc .form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .choices legend { font: 700 15px/1.35 var(--body); color: var(--ink); }
.field > label strong { font-weight: 800; letter-spacing: .04em; }
.input {
  width: 100%; min-height: 52px; margin: 0; padding: 12px 16px; border-radius: 14px;
  border: 1.5px solid var(--acc-field-line); background: var(--acc-field); color: var(--ink);
  font: 400 17px/1.4 var(--body); transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: var(--acc-field-hover); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: var(--acc-ring); }
.input[aria-invalid="true"] { border-color: var(--acc-danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc-danger) 24%, transparent); }
.input[autocomplete="one-time-code"] { font: 700 26px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .42em; text-align: center; padding-inline: 16px 6px; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--acc-field) inset; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 58px; }
[dir="rtl"] .pw-wrap .input { padding-right: 16px; padding-left: 58px; }
.pw-toggle {
  position: absolute; inset-inline-end: 2px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--paper); }
.pw-toggle:focus-visible { outline-offset: -4px; }
.pw-toggle .icon { width: 22px; height: 22px; }
.pw-toggle .hide, .pw-toggle[aria-pressed="true"] .show { display: none; }
.pw-toggle[aria-pressed="true"] .hide { display: block; }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 46px; cursor: pointer; }
.select-wrap .chev { position: absolute; inset-inline-end: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); pointer-events: none; stroke-width: 2.2; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 2px; }
.meter i { height: 5px; border-radius: 99px; background: var(--paper-deep); transition: background-color .2s ease; }
.meter[data-level="0"] i:first-child, .meter[data-level="1"] i:first-child { background: var(--acc-weak); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--acc-fair); }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--acc-good); }
.meter[data-level="4"] i { background: var(--acc-strong); }
[data-mode="dark"] .meter i { background: rgba(243, 241, 236, .12); }
.strength { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.strength:empty { display: none; }

.hint { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.field-error { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--acc-danger-text); }
.field-error:empty { display: none; }
.field-error .icon, .alert .icon { width: 18px; height: 18px; margin-top: 2px; stroke-width: 2.2; }

.form-msg:empty { display: none; }
.alert {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px;
  color: var(--ink); font-size: 15px; line-height: 1.5;
}
.alert p { margin: 0; }
.alert a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.alert .icon { width: 20px; height: 20px; margin-top: 1px; }
.alert-info { background: var(--sky); }
.alert-ok { background: var(--sage); }
.alert-error { background: var(--rose); }
.alert .more { display: block; margin-top: 4px; }

/* Buttons: the site's .btn, plus full width, small, Google, danger and busy. */
.btn-block { width: 100%; }
.acc .btn-sm, .acc-header .btn-sm { min-height: 48px; padding: 0 20px; font-size: 15px; }
.acc .btn .icon { width: 19px; height: 19px; stroke-width: 2; }
.btn-google { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--acc-field-line); }
.btn-google:hover { background: var(--paper); }
.g-logo { width: 20px; height: 20px; flex: none; }
.btn-danger { background: var(--acc-danger); color: var(--acc-on-danger); }
.acc .btn[aria-disabled="true"] { cursor: progress; transform: none; opacity: .8; }
.acc .btn[aria-busy="true"]::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: acc-spin .75s linear infinite;
}
.acc .btn[aria-busy="true"] > .icon { display: none; }
@keyframes acc-spin { to { transform: rotate(360deg); } }
.link-btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; border: 0; background: none;
  color: var(--ink); font: 700 16px/1.3 var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn[aria-disabled="true"] { color: var(--muted); text-decoration: none; cursor: default; }

.divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.forgot { margin: -8px 0 -6px; text-align: end; }
.forgot a { display: inline-block; padding: 10px 0; font-size: 15px; font-weight: 700; color: var(--ink); text-underline-offset: 3px; }
.fine { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.fine a { color: var(--ink-soft); font-weight: 600; text-underline-offset: 2px; }
.auth-switch { margin: 22px 0 0; text-align: center; font-size: 16px; color: var(--muted); }
.auth-switch a { display: inline-block; padding: 8px 2px; color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.resend { display: grid; justify-items: center; gap: 4px; margin-top: 18px; text-align: center; }
.resend .hint:empty { display: none; }

/* ---- The account dashboard -------------------------------------------------------------------- */

.acc.dash { flex: 1; padding: clamp(24px, 4vw, 48px) 0 72px; }
.dash-wrap { max-width: 920px; }
.dash-wrap > .alert { margin-bottom: 20px; }
.dash-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 96px 0; color: var(--muted); font-size: 17px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: acc-spin .8s linear infinite; }
.dash-failed { display: grid; gap: 16px; justify-items: start; padding: 48px 0; }

.dash-head { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.dash-who { flex: 1; min-width: 0; }
.dash-who h1 { margin: 0 0 2px; font: 700 13px/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dash-name { margin: 0; font: 800 clamp(28px, 4.6vw, 42px)/1.08 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.dash-email { margin: 6px 0 0; font-size: 16px; color: var(--muted); overflow-wrap: anywhere; }
.dash-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.head-msg { margin: -10px 0 20px; }
.signout { flex: none; }
@media (max-width: 640px) {
  .dash-head { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .dash-head .avatar-lg { width: 64px; height: 64px; font-size: 27px; }
  .dash-who { flex-basis: calc(100% - 80px); }
  .signout { width: 100%; }
}

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--paper-deep); color: var(--ink-soft); font: 700 13px/1.35 var(--body); white-space: nowrap;
}
.pill:empty { display: none; }
.pill .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.pill.tone-sage, .pill.tone-mint, .pill.tone-butter, .pill.tone-sky { color: var(--ink); }

.avatar {
  position: relative; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: var(--butter); color: var(--butter-ink); font: 800 30px/1 var(--display); letter-spacing: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 76px; height: 76px; font-size: 32px; box-shadow: 0 0 0 4px var(--card), 0 12px 26px -14px rgba(30, 27, 38, .55); }
.avatar-xl { width: 112px; height: 112px; font-size: 46px; box-shadow: inset 0 0 0 1px var(--line); }

.tabs {
  display: flex; gap: 4px; margin-bottom: 22px; padding: 5px; border-radius: 999px; background: var(--acc-tab-track);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: 700 16px/1.2 var(--body); white-space: nowrap; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--acc-tab-on); color: var(--ink); box-shadow: 0 1px 2px rgba(30, 27, 38, .08), 0 8px 18px -12px rgba(30, 27, 38, .4); }
.tab .icon { width: 20px; height: 20px; }
.tab:focus-visible { outline-offset: -3px; border-radius: 999px; }
@media (max-width: 440px) { .tab .icon { display: none; } .tab { padding: 0 12px; font-size: 15px; } }

.panel { display: grid; gap: 18px; }
.card { min-width: 0; padding: clamp(20px, 3.6vw, 30px); border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.card-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.card-head .badge { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; color: var(--ink); }
.card-head .badge .icon { width: 22px; height: 22px; }
.card-head h2 { margin: 1px 0 4px; font: 700 20px/1.3 var(--body); letter-spacing: -.01em; }
.card-head h2:focus { outline: none; }
.card-head p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card .form { max-width: 540px; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions:not(:has(> :not([hidden]))) { display: none; }
.card .form-msg + .form-msg, .card .rows + .form-msg { margin-top: 0; }
.card > .form-msg { margin-top: 16px; }
.card > .actions { margin-top: 16px; }
#card-delete { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc-danger) 38%, transparent); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows[aria-busy="true"]:empty { min-height: 48px; background: linear-gradient(90deg, var(--paper-deep), var(--paper), var(--paper-deep)); background-size: 200% 100%; border-radius: 14px; animation: acc-shimmer 1.2s linear infinite; }
@keyframes acc-shimmer { to { background-position: -200% 0; } }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row:last-child { padding-bottom: 0; }
.row-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--paper-deep); color: var(--ink); }
.row-icon .icon { width: 21px; height: 21px; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: inline; margin-inline-end: 8px; font-size: 16px; line-height: 1.4; }
.row-main .pill { vertical-align: 2px; }
.row-sub { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.row-sub:empty { display: none; }
.row > .btn { flex: none; }
.rows.log .row { padding: 11px 0; }
.rows.log .row:first-child { padding-top: 0; }
.rows.log .row-icon { width: 36px; height: 36px; border-radius: 11px; }
.rows.log .row-icon .icon { width: 18px; height: 18px; }
.rows .row.empty { padding: 14px 0 0; color: var(--muted); font-size: 15px; }
.rows .row.empty:first-child { padding-top: 0; }
@media (max-width: 560px) {
  .row { flex-wrap: wrap; }
  .row > .pill { order: 3; }
  .row > .btn { order: 4; margin-inline-start: 58px; }
  .rows.methods .row > .pill { margin-inline-start: 58px; }
}

.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.photo-row + .choices { margin-top: 24px; }
.photo-actions { display: grid; justify-items: start; gap: 8px; min-width: 0; flex: 1; }
.file-btn { position: relative; cursor: pointer; white-space: nowrap; }
@media (max-width: 480px) {
  .avatar-xl { width: 84px; height: 84px; font-size: 36px; }
  .photo-row { gap: 16px; }
}
.file-btn:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choices legend { margin-bottom: 10px; padding: 0; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; line-height: 1.35; cursor: pointer;
}
.choice:hover { box-shadow: inset 0 0 0 1.5px var(--acc-field-line); }
.choice:has(input:checked) { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--ink); }
.choice input:focus-visible { outline: none; }
.card[data-photo-card] .form-msg { margin-top: 16px; }

.fresh { display: grid; justify-items: start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--butter); }
.fresh p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.confirm-box { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.confirm-box p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.card .unlink-needs { margin-top: 16px; }
.auth-main h1 + .alert { margin-top: 18px; }

/* ---- Photo cropper ---------------------------------------------------------------------------- */

.crop-dialog {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: clamp(18px, 5vw, 26px); border: 0; border-radius: 28px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.crop-dialog::backdrop { background: var(--acc-scrim); }
.crop-dialog h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; }
.crop-stage { display: grid; place-items: center; margin: 16px 0 10px; }
.crop-canvas { display: block; width: 100%; max-width: 380px; aspect-ratio: 1; border-radius: 22px; background: var(--paper-deep); touch-action: none; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-canvas:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.zoom-row { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--muted); }
.zoom-row input { flex: 1; min-width: 0; height: 48px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.zoom-row .icon { width: 20px; height: 20px; }
.crop-dialog .actions { justify-content: flex-end; margin-top: 4px; }
.crop-dialog .form-msg { margin-bottom: 12px; }

/* ---- Note colours (last, so they win over each element's plain background) ---------------------- */

.acc .tone-butter, .tone-butter { background-color: var(--butter); }
.acc .tone-sky, .tone-sky { background-color: var(--sky); }
.acc .tone-sage, .tone-sage { background-color: var(--sage); }
.acc .tone-peach, .tone-peach { background-color: var(--peach); }
.acc .tone-lilac, .tone-lilac { background-color: var(--lilac); }
.acc .tone-rose, .tone-rose { background-color: var(--rose); }
.acc .tone-mint, .tone-mint { background-color: var(--mint); }
.acc .tone-plain { background-color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- Urdu: Nastaliq needs taller lines everywhere ---------------------------------------------- */

html[lang="ur"] .input { line-height: 1.9; padding-block: 6px; }
html[lang="ur"] :is(.field > label, .choices legend, .hint, .field-error, .strength, .alert, .pill, .tab, .link-btn, .lang-pick summary, .lang-menu a, .back-link, .acc-footer a, .row-main strong, .row-sub, .card-head h2, .card-head p, .fine, .auth-switch, .side-note strong, .side-note small, .divider, .dash-email, .choice) { line-height: 2; }
html[lang="ur"] :is(.auth-main h1, .auth-main .done h2, .dash-name, .side-heading, .crop-dialog h2) { line-height: 1.75; }
html[lang="ur"] .dash-who h1 { font-size: 15px; line-height: 2; }
html[lang="ur"] .pill { padding-block: 2px; }
