/* RunLine — account self-service styles (Phase 4 W-1)

   Reuses tokens from /styles.css (--cream, --ink, --signal, --hairline,
   --pad, --maxw, --muted). All sizing/spacing follows the legal page
   pattern so account screens feel consistent with the rest of the site.
*/

.account {
  padding: clamp(40px, 6vw, 80px) var(--pad);
}

.account__inner {
  max-width: 540px;
  margin: 0 auto;
}

.account__inner h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}

.account__lede {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 32px;
  line-height: 1.55;
}

.account__lede a {
  color: var(--accent);
  text-decoration: none;
}

.account__lede a:hover {
  text-decoration: underline;
}

/* ────────── Form ────────── */

.account__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account__label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.account__field input {
  font: inherit;
  font-size: 15.5px;
  padding: 12px 14px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  transition: border-color 120ms ease;
}

.account__field input:focus {
  outline: none;
  border-color: var(--accent);
}

.account__field input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ────────── Select (Quest-Modell etc.) ────────── */

.account__field select {
  font: inherit;
  font-size: 15.5px;
  padding: 12px 38px 12px 14px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23808080' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 120ms ease;
}

.account__field select:focus {
  outline: none;
  border-color: var(--accent);
}

.account__field select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ────────── Password show/hide toggle ────────── */

.account__pw {
  position: relative;
  display: flex;
}

.account__pw input {
  flex: 1;
  /* Reserve room for the toggle button so long passwords don't overlap. */
  padding-right: 56px;
}

.account__pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 0;
  border-radius: 8px;
  transition: color 120ms ease, background-color 120ms ease;
}

.account__pw-toggle:hover {
  color: var(--fg);
  background: color-mix(in oklab, var(--fg) 6%, transparent);
}

.account__pw-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  color: var(--fg);
}

.account__pw-toggle[aria-pressed="true"] {
  color: var(--accent);
}

/* ────────── ToS checkbox + form hints ────────── */

.account__checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  color: var(--fg);
}

.account__checkbox input {
  margin-top: 3px;
  cursor: pointer;
  flex: 0 0 auto;
}

.account__checkbox a {
  color: var(--accent);
  text-decoration: none;
}

.account__checkbox a:hover {
  text-decoration: underline;
}

.account__hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -2px;
  line-height: 1.4;
}

.account__optional {
  font-weight: 400;
  color: var(--muted);
}

/* Stage-switch helper (forgot.html success-state, etc.). The [hidden]
   attribute already does display:none, but keeping the rule explicit
   makes it discoverable + safe against future CSS-overrides. */
.account__stage[hidden] {
  display: none;
}

.account__form .btn {
  align-self: flex-start;
  margin-top: 8px;
}

.account__err {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: #B91C1C; /* red-700, sufficient contrast on cream + ink themes */
  background: color-mix(in oklab, #B91C1C 10%, transparent);
  border: 1px solid color-mix(in oklab, #B91C1C 30%, transparent);
  border-radius: 10px;
}

.account__ok {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: #166534; /* green-800 — paired with cream/ink for AAA contrast */
  background: color-mix(in oklab, #166534 10%, transparent);
  border: 1px solid color-mix(in oklab, #166534 30%, transparent);
  border-radius: 10px;
}

.account__notice {
  margin: 0 0 4px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #1E40AF; /* blue-800 — info tone, AAA on cream + ink */
  background: color-mix(in oklab, #1E40AF 8%, transparent);
  border: 1px solid color-mix(in oklab, #1E40AF 28%, transparent);
  border-radius: 10px;
}

.account__warn {
  margin: 6px 0 0;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #92400E; /* amber-800 — caution, distinguishable from red err */
  background: color-mix(in oklab, #92400E 10%, transparent);
  border: 1px solid color-mix(in oklab, #92400E 30%, transparent);
  border-radius: 10px;
}

.account__ok a {
  color: var(--accent);
  text-decoration: none;
}

.account__ok a:hover {
  text-decoration: underline;
}

/* ────────── Courses table (W-3) ────────── */

.account__courses-stage {
  /* Overrides .account__inner max-width — the courses table needs
     more horizontal real estate. */
  max-width: 980px;
}

.account__courses {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 14.5px;
}

.account__courses thead th {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.account__courses tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  color: var(--fg);
  vertical-align: top;
}

.account__courses tbody tr:hover td {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}

.account__courses tbody td:first-child {
  font-weight: 500;
}

/* Click-to-preview (course list): rows toggle an inline preview row. */
.account__courses-hint {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.account__courses tbody tr.account__course-row {
  cursor: pointer;
}

.account__courses tbody tr.account__course-row.is-expanded td {
  background: color-mix(in oklab, var(--accent) 6%, transparent);
  border-bottom-color: transparent;
}

/* The preview row itself is not clickable — suppress the generic
   row-hover tint so it reads as detail, not as another action. */
.account__courses tbody tr.account__preview-row:hover td {
  background: transparent;
}

.account__preview-box {
  padding: 6px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.account__preview-img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.account__pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.account__pagination .btn {
  min-width: 110px;
  justify-content: center;
}

.account__pagination .btn[disabled],
.account__pagination .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.account__pagination .account__pagination-indicator {
  flex: 1;
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

[data-account-courses][data-state="loading"] table,
[data-account-courses][data-state="loading"] .account__pagination {
  visibility: hidden;
}

[data-account-courses][data-state="loading"]::before {
  content: 'Loading…';
  display: block;
  text-align: center;
  color: var(--muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  padding: 40px 0;
}

/* ────────── Facts list (account overview) ────────── */

.account__facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 28px;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.account__fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

/* Honor the [hidden] HTML attribute on fact rows. Without this rule the
   author `display: flex` above beats the user-agent default
   `[hidden] { display: none }` in the cascade (author > UA), and rows
   set hidden via JS (data-me-slots, data-me-waitlist-bridge) stay
   visually rendered with empty content. Specificity 0,2,0 wins over
   the 0,1,0 of `.account__fact` alone. */
.account__fact[hidden] {
  display: none;
}

.account__fact dt {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.account__fact dd {
  margin: 0;
  font-size: 15.5px;
  color: var(--fg);
  text-align: right;
}

/* Phase 2.5: inline action button inside a fact row (e.g. "Clear bridge"
   next to the waitlist-bridge email). Smaller than .btn--text so it
   doesn't dominate the row visually but stays poke-touch-friendly. */
.account__fact dd .account__inline-action {
  margin-left: 10px;
  font-size: 13px;
  padding: 4px 10px;
}

.account__actions {
  display: flex;
  /* Wrap is load-bearing on phones: 6 action links no longer fit one
     row — without it the overflow hid entries (Plan-Import, 2026-07-19
     mobile report). */
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* Mobile: stack the account actions as a left-aligned column — full
   tap targets instead of a two-line wrapped row. */
@media (max-width: 480px) {
  .account__actions {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }
}

/* Loading / error stage states. The page hides these using the
   data-state attribute (set by account.js once /me resolves).
   Keeping it CSS-driven means a flash of incorrect content is
   prevented even before JS boots. */
[data-account-stage][data-state="loading"] .account__facts,
[data-account-stage][data-state="loading"] .account__actions {
  visibility: hidden;
}

[data-account-stage][data-state="ready"] .account__loading {
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────
   Phase 2.12: register-form optional-fields fieldset
   ───────────────────────────────────────────────────────────────────── */

.account__optional-group {
  border: 1px dashed var(--c-border, #d0d0d0);
  border-radius: 6px;
  padding: 14px 16px 10px;
  margin: 18px 0;
  display: grid;
  gap: 12px;
}

.account__optional-legend {
  padding: 0 8px;
  font-size: 13px;
  color: var(--c-muted, #666);
  font-style: italic;
}

.account__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .account__field-row {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   Phase 2.12: account-overview inline edit mode
   ───────────────────────────────────────────────────────────────────── */

.account__fact--editing dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.account__fact--editing input[type="text"],
.account__fact--editing input[type="password"],
.account__fact--editing select {
  padding: 4px 8px;
  font-size: 14px;
  min-width: 180px;
}

.account__checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─────────────────────────────────────────────────────────────────────
   Phase 2.12: success banner (e.g. ?deleted=1 confirmation on login)
   ───────────────────────────────────────────────────────────────────── */

.account__success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 0 0 16px 0;
}

/* ─────────────────────────────────────────────────────────────────────
   Phase 2.12: danger zone + delete account
   ───────────────────────────────────────────────────────────────────── */

.account__danger {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Danger button styles live in /styles.css since the button-system
   unification (2026-07-26): .btn--danger (filled pill, modal confirms)
   and .btn--danger-text (quiet red link, inline discard/delete). */

/* ─────────────────────────────────────────────────────────────────────
   Phase 2.12: account-delete modal (two-step)
   ───────────────────────────────────────────────────────────────────── */

.account__modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.account__modal[hidden] {
  display: none;
}

.account__modal-panel {
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.account__modal-panel h2 {
  margin: 0 0 12px 0;
  font-size: 22px;
}

.account__modal-panel p,
.account__modal-panel ul {
  margin: 0 0 14px 0;
}

.account__modal-panel ul {
  padding-left: 22px;
}

.account__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

/* ─────────────────────────────────────────────────────────────────────
   F58: app-settings page (mobile-first)

   Single column of cards; every interactive control keeps a ≥44px
   touch target. The stage uses the same data-state loading gate as
   the account overview.
   ───────────────────────────────────────────────────────────────────── */

[data-account-settings][data-state="loading"] .settings__card,
[data-account-settings][data-state="loading"] .settings__savebar {
  visibility: hidden;
}

[data-account-settings][data-state="ready"] .account__loading {
  display: none;
}

.settings__card {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 16px 16px 18px;
  margin: 0 0 16px;
}

.settings__card h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.settings__card .account__hint {
  margin: 0 0 12px;
}

.settings__row {
  padding: 10px 0 4px;
}

.settings__row + .settings__row {
  border-top: 1px solid var(--hairline);
}

.settings__row-label {
  display: block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Swatch grid. 44px wells wrap on narrow screens. */
.settings__swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.settings__swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--swatch, #888);
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
}

.settings__swatch.is-active {
  /* Ring offset from the fill so it reads on both light AND dark
     swatch colours (cream vs. ink). */
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

/* Custom-colour well: hue wheel while unset, picked colour once set.
   The native input is stretched invisibly across the well so a tap
   anywhere on it opens the platform colour picker. */
.settings__swatch--custom {
  display: inline-block;
  background: var(--swatch, conic-gradient(
    #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000));
  overflow: hidden;
}

.settings__swatch--custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}

/* Default chip — resets a setting to the app default (null). */
.settings__chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  flex: 0 0 auto;
}

.settings__chip.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ── F90: course tag filter ────────── */

.settings__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.settings__tags-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 0;
}

.settings__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--bg-alt);
  font-size: 14px;
}

.settings__tag-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 50%;
}

.settings__tag-remove:hover {
  color: var(--danger);
}

.settings__taginput {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.settings__taginput input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15.5px;
  padding: 10px 14px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  transition: border-color 120ms ease;
}

.settings__taginput input:focus {
  outline: none;
  border-color: var(--accent);
}

.settings__tag-add {
  flex: 0 0 auto;
}

.settings__tags-err {
  color: var(--danger);
  font-size: 13px;
  margin: 8px 0 0;
}

/* Segmented control (size class S/M/I/L). */
.settings__segments {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
}

.settings__segment {
  flex: 1 1 0;
  min-height: 52px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
}

.settings__segment strong {
  font-size: 17px;
}

.settings__segment small {
  font-size: 10.5px;
  color: var(--muted);
}

.settings__segment.is-active {
  background: var(--fg);
  border-color: var(--fg);
}

.settings__segment.is-active strong,
.settings__segment.is-active small {
  color: var(--bg);
}

/* Stepper (dimensions). − value + in one row, chip beside/below. */
[data-stepper-mount] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
}

.settings__stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
}

.settings__step {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 22px;
  cursor: pointer;
  flex: 0 0 auto;
}

.settings__step:active {
  background: var(--bg-alt);
}

.settings__step-value {
  min-width: 92px;
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 15px;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Default state shows the concrete app-default number, muted so the
   "you haven't overridden this" state stays readable at a glance. */
.settings__step-value.is-default {
  color: var(--muted);
}

/* Sticky save bar — appears only when the working copy is dirty. */
.settings__savebar {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 6px 24px rgba(11, 26, 56, 0.14);
  margin: 4px 0 8px;
}

.settings__savebar[hidden] {
  display: none;
}

.settings__savebar-note {
  font-size: 13px;
  color: var(--muted);
  margin-right: auto;
}

.settings__saved-flash {
  font-size: 14px;
  color: var(--accent);
  text-align: right;
  margin: 0 0 8px;
}

/* ── P6b: plan import ──────────────────────────────────────────────── */

.account__import-drop {
  display: block;
  border: 1.5px dashed var(--hairline);
  border-radius: 12px;
  padding: 22px 16px;
  margin: 18px 0 14px;
}

.account__import-drop input[type="file"] {
  max-width: 100%;
}

.account__import-drop-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.account__import-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.account__import-sources [data-import-picked] {
  font-size: 13px;
  color: var(--muted);
}

.account__import-status {
  color: var(--muted);
  margin: 24px 0;
}

/* F74: single detection overlay, full column width, click to enlarge.
   (Replaced the original-vs-overlay compare grid — the original adds
   nothing over the overlay, which contains it.) */
.account__import-overlay-box {
  margin: 16px 0;
}

.account__import-overlay-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.account__import-overlay-zoom img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
}

.account__import-overlay-box figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* Fullscreen lightbox (created lazily by account.js). Default: image
   fitted to the viewport; .zoomed switches to natural size and the
   container scrolls (PC detail check — F74). */
.account__lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  padding: 24px;
  background: rgba(10, 12, 16, 0.88);
  cursor: zoom-out;
  display: flex;
}

.account__lightbox img {
  display: block;
  /* margin:auto inside flex = safe centering: collapses to 0 when the
     zoomed image overflows, so the top/left edge stays scrollable. */
  margin: auto;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}

.account__lightbox.zoomed img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* F73: save-to-SA opt-in on the review view */
.account__import-sa-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
  cursor: pointer;
}

.account__import-sa-opt input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.account__import-sa-hint {
  margin-top: 2px;
  font-size: 14px;
}

.account__import-warnings ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.account__import-warning {
  margin: 10px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
}

/* Severity chip: colored pill in front of the explanation. */
.account__import-sev {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
}

.sev-info .account__import-sev {
  background: rgba(30, 107, 255, 0.12);
  color: #1E6BFF;
}

.sev-warn .account__import-sev {
  background: rgba(224, 158, 0, 0.16);
  color: #8a6100;
}

.sev-problem .account__import-sev {
  background: rgba(235, 0, 0, 0.10);
  color: #b40000;
}

.account__import-warning-text {
  font-size: 14px;
}

/* Raw technical string, small print under the explanation (support). */
.account__import-warning-raw {
  grid-column: 2;
  font-size: 11px;
  color: var(--muted);
  word-break: break-word;
}

.account__import-title-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.account__import-actions {
  display: flex;
  gap: 12px;
  margin: 18px 0 8px;
}

/* Clipboard-API fallback: raw SAD export for manual copying. */
.account__import-export {
  width: 100%;
  min-height: 90px;
  margin-top: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
}

/* Delete action inside the expanded course-preview row (extracted
   courses only). */
.account__extracted-delete {
  margin-top: 10px;
}

/* F80: overlay <-> diff view tabs above the import review figure. */
.account__import-viewtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.account__import-viewtabs button {
  font: inherit;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.account__import-viewtabs button[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.account__import-viewtabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────
   Extractor feedback (2026-07-26): bottom sheet, reason chips, thumbs
   row, image pins. Mobile first — sheet slides from the bottom on
   phones, centres on wider screens; touch targets ≥44px.
   ───────────────────────────────────────────────────────────────────── */

.account__fb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1010; /* above .account__lightbox (1000) — the pin-mode sheets open over it */
  background: color-mix(in oklab, var(--ink) 45%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.account__fb-backdrop--kind { z-index: 1030; }
@media (min-width: 640px) {
  .account__fb-backdrop { align-items: center; }
}

.account__fb-sheet {
  background: var(--bg);
  width: 100%;
  max-width: 520px;
  border-radius: 20px 20px 0 0;
  padding: 20px clamp(16px, 5vw, 24px) calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px color-mix(in oklab, var(--ink) 30%, transparent);
}
@media (min-width: 640px) {
  .account__fb-sheet { border-radius: 20px; padding: 24px; }
}
.account__fb-sheet h3 { margin: 0 0 14px; font-size: 18px; }

.account__fb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.account__fb-comment-toggle { margin-bottom: 12px; }
.account__fb-comment {
  width: 100%;
  min-height: 72px;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  margin-bottom: 12px;
}
.account__fb-comment:focus { outline: none; border-color: var(--accent); }

.account__fb-pinrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.account__fb-pincount { color: var(--muted); font-size: 11.5px; }

.account__fb-consent {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 14px;
}
.account__fb-consent a { color: var(--accent); }

.account__fb-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Thumbs row on the success view */
.account__fb-thumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0 20px;
}
.account__fb-thumbs.is-thanked { color: var(--muted); font-size: 14.5px; }
.account__fb-thumb {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
}
.account__fb-thumb:hover { border-color: var(--fg); }
.account__fb-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Pin mode inside the lightbox: %-positioned dots on a relative stage
   track the image through fit, layout zoom and browser pinch. */
.account__lightbox-stage {
  position: relative;
  margin: auto;
}
.account__pin {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  padding: 0;
  border-radius: 50%;
  background: var(--signal);
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.account__pin::after {
  content: '';
  position: absolute;
  inset: -8px; /* 44px effective hit area */
}

.account__pinbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020; /* above the lightbox, below the kind sheet */
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  border-top: 1px solid var(--hairline);
}
.account__pinbar span {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* Import action row: keep both CTAs reachable on narrow phones */
@media (max-width: 480px) {
  .account__import-actions { flex-wrap: wrap; }
}
