/* profile.css — extracted verbatim from profile.html's inline <style>.
   Strict-CSP sites (style-src 'self', no unsafe-inline) DISCARD inline
   style blocks, so this page rendered unstyled on them. Content is
   unchanged; only its delivery moved. Do not re-inline. */
    :root {
      --home-bg: #f8fafc;
      --home-card-bg: #ffffff;
      --home-text: #1e293b;
      --home-muted: #64748b;
      --home-border: #e2e8f0;
      --home-accent: #3b82f6;
      --home-accent-light: #eff6ff;
      --danger: #b91c1c;
      --danger-hover: #991b1b;
      --danger-soft: #fee2e2;
    }
    [data-theme="dark"] {
      --home-bg: #0f172a;
      --home-card-bg: #1e293b;
      --home-text: #f1f5f9;
      --home-muted: #94a3b8;
      --home-border: #334155;
      --home-accent: #60a5fa;
      --home-accent-light: #1e3a5f;
      --danger: #f87171;
      --danger-hover: #ef4444;
      --danger-soft: rgba(248, 113, 113, 0.1);
    }
    body {
      background: var(--home-bg);
      color: var(--home-text);
      font-family: 'Inter', system-ui, sans-serif;
      margin: 0;
      padding: 1.5rem;
    }
    .profile-card {
      background: var(--home-card-bg);
      border: 0.0625rem solid var(--home-border);
      border-radius: 0.75rem;
      padding: 1.5rem;
      margin-bottom: 1.5rem;
    }
    .profile-card h2 {
      font-size: 1rem;
      font-weight: 700;
      margin: 0 0 1rem 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .profile-card h2 i {
      color: var(--home-accent);
    }
    .profile-avatar {
      width: 5rem;
      height: 5rem;
      border-radius: 50%;
      background: var(--home-accent-light);
      color: var(--home-accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      font-weight: 700;
      flex-shrink: 0;
      border: 0.125rem solid var(--home-border);
    }
    .profile-field {
      margin-bottom: 1rem;
    }
    .profile-field:last-child {
      margin-bottom: 0;
    }
    .profile-label {
      display: block;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--home-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.375rem;
    }
    .profile-value {
      font-size: 0.9375rem;
      font-weight: 500;
      color: var(--home-text);
    }
    .profile-input {
      width: 100%;
      padding: 0.625rem 0.875rem;
      font-size: 0.875rem;
      font-family: inherit;
      color: var(--home-text);
      background: var(--home-bg);
      border: 0.0625rem solid var(--home-border);
      border-radius: 0.5rem;
      outline: none;
      transition: border-color 0.2s ease;
      min-height: 2.75rem;
      box-sizing: border-box;
    }
    .profile-input:focus {
      border-color: var(--home-accent);
      box-shadow: 0 0 0 0.1875rem var(--home-accent-light);
    }
    .profile-input:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
    .profile-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      padding: 0.25rem 0.75rem;
      font-size: 0.75rem;
      font-weight: 600;
      border-radius: 62.4375rem;
      background: var(--home-accent-light);
      color: var(--home-accent);
    }
    .profile-btn-primary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.625rem 1.5rem;
      font-size: 0.875rem;
      font-weight: 600;
      font-family: inherit;
      color: #ffffff;
      background: var(--home-accent);
      border: none;
      border-radius: 0.5rem;
      cursor: pointer;
      transition: opacity 0.2s ease;
      min-height: 2.75rem;
    }
    .profile-btn-primary:hover {
      opacity: 0.9;
    }
    .profile-card-danger {
      border-left: 0.1875rem solid var(--danger);
    }
    .profile-card-danger h2 {
      color: var(--danger);
    }
    .profile-card-danger h2 i {
      color: var(--danger);
    }
    .profile-btn-danger {
      min-height: 2.75rem;
      padding: 0.625rem 1.25rem;
      border-radius: 0.5rem;
      background: var(--danger);
      color: #ffffff;
      font-weight: 600;
      font-size: 0.875rem;
      font-family: inherit;
      border: none;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      transition: background 0.15s ease;
    }
    .profile-btn-danger:hover {
      background: var(--danger-hover);
    }
    .dam-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dam-overlay[hidden] {
      display: none;
    }
    .dam-modal {
      background: var(--home-card-bg);
      color: var(--home-text);
      border-radius: 0.75rem;
      padding: 1.5rem;
      width: min(90vw, 32rem);
      max-height: 85vh;
      display: flex;
      flex-direction: column;
    }
    .dam-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }
    .dam-header h3 {
      margin: 0;
      font-size: 1.125rem;
      font-weight: 700;
    }
    .dam-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      min-height: 2.75rem;
      min-width: 2.75rem;
      color: var(--home-text);
      line-height: 1;
    }
    .dam-body {
      overflow-y: auto;
      flex: 1;
      font-size: 0.875rem;
    }
    .dam-body p {
      margin: 0 0 0.75rem 0;
    }
    .dam-body ul {
      margin: 0 0 0.75rem 0;
      padding-left: 1.25rem;
    }
    .dam-body label {
      display: block;
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--home-muted);
      margin-bottom: 0.375rem;
    }
    .dam-body input[type="password"],
    .dam-body input[type="text"],
    .dam-body textarea {
      width: 100%;
      padding: 0.625rem 0.875rem;
      border: 0.0625rem solid var(--home-border);
      border-radius: 0.5rem;
      font-size: 0.875rem;
      font-family: inherit;
      color: var(--home-text);
      background: var(--home-bg);
      min-height: 2.75rem;
      box-sizing: border-box;
      outline: none;
    }
    .dam-body textarea {
      min-height: 5rem;
      resize: vertical;
    }
    .dam-body details {
      margin-top: 0.5rem;
      font-size: 0.8125rem;
    }
    .dam-body details summary {
      cursor: pointer;
      font-weight: 600;
      color: var(--home-accent);
    }
    .dam-error {
      color: var(--danger);
      font-size: 0.8125rem;
      margin: 0.5rem 0 0 0;
    }
    .dam-footer {
      display: flex;
      gap: 0.75rem;
      justify-content: flex-end;
      margin-top: 1rem;
      flex-wrap: wrap;
    }
    .dam-footer button {
      min-height: 2.75rem;
      padding: 0.625rem 1.25rem;
      border-radius: 0.5rem;
      font-size: 0.875rem;
      font-weight: 600;
      font-family: inherit;
      border: 0.0625rem solid var(--home-border);
      background: var(--home-card-bg);
      color: var(--home-text);
      cursor: pointer;
    }
    .dam-footer button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    #dam-submit {
      background: var(--danger);
      color: #ffffff;
      border-color: var(--danger);
    }
    #dam-submit:hover {
      background: var(--danger-hover);
      border-color: var(--danger-hover);
    }
    .info-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 0;
      border-bottom: 0.0625rem solid var(--home-border);
    }
    .info-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }
    .info-row:first-child {
      padding-top: 0;
    }
    .info-row-label {
      font-size: 0.8125rem;
      color: var(--home-muted);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .info-row-value {
      font-size: 0.875rem;
      font-weight: 500;
    }
    .toast {
      position: fixed;
      bottom: 1.5rem;
      right: 1.5rem;
      background: #10b981;
      color: #ffffff;
      padding: 0.75rem 1.25rem;
      border-radius: 0.5rem;
      font-size: 0.875rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
      transform: translateY(0.5rem);
      opacity: 0;
      transition: all 0.3s ease;
      z-index: 1000;
      pointer-events: none;
    }
    .toast.visible {
      transform: translateY(0);
      opacity: 1;
    }
    /* --- Layout/typography lifted out of profile.html's style="..."
       attributes. A strict style-src 'self' CSP discards style attributes the
       same way it discards an inline <style> block: .profile-header-inner in
       particular had NO base rule here, only the mobile override below, so on
       such a site the header lost its row layout and the media query flipped
       flex-direction on a non-flex box. Each rule carries the attribute's
       literals unchanged, so nothing moves on a site without that policy.
       These rules MUST stay above the @media block that overrides them.
       Do not re-inline. --- */
    .profile-shell {
      max-width: 42rem;
      margin: 0 auto;
    }
    .profile-header-inner {
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }
    .profile-header-text {
      flex: 1;
      min-width: 0;
    }
    .profile-header-name {
      font-size: 1.375rem;
      font-weight: 700;
      margin: 0 0 0.25rem 0;
    }
    .profile-header-email {
      color: var(--home-muted);
      margin: 0 0 0.5rem 0;
      font-size: 0.8125rem;
    }
    .profile-actions {
      margin-top: 1.25rem;
    }
    .info-row-value-mono {
      font-size: 0.75rem;
      color: var(--home-muted);
      font-family: monospace;
    }
    .profile-danger-text {
      margin: 0 0 1rem 0;
      font-size: 0.875rem;
      color: var(--home-muted);
    }
    /* Scoped with .dam-body where the generic `.dam-body p` / `.dam-body label`
       rules would otherwise out-specify a bare class and change the result. */
    .dam-body .dam-otp-divider {
      text-align: center;
      margin: 0.75rem 0;
    }
    .dam-otp-button {
      background: var(--home-muted);
    }
    .dam-otp-label {
      margin-top: 0.75rem;
    }
    .dam-body .dam-ack {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-weight: 500;
      color: var(--home-text);
    }
    .dam-body .dam-ack-spaced {
      margin-bottom: 0.75rem;
    }
    .dam-ack-box {
      margin-top: 0.25rem;
      min-height: 1.25rem;
      min-width: 1.25rem;
    }
    .dam-result-note {
      font-size: 0.8125rem;
      color: var(--home-muted);
    }

    @media (max-width: 40rem) {
      body { padding: 1rem; }
      .profile-header-inner { flex-direction: column; text-align: center; }
      .profile-avatar { margin: 0 auto; }
    }
  
