/* Profile & settings */

.profile { max-width: 860px; gap: 22px; }

.profile__head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.profile__avatar { width: 64px; height: 64px; font-size: 26px; }
.profile__who { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.profile__name { font-size: 28px; }
.profile__sub { font-size: 14px; color: var(--text-muted); }
.profile__plan-badge { padding: 8px 14px; font-weight: 700; text-decoration: none; }
.profile__plan-badge:hover { text-decoration: none; opacity: .9; }
.profile__plan-badge.chip--solid-clay:hover { color: var(--text-on-accent); }
.profile__plan-badge.chip--ink:hover { color: var(--peach); }

.profile__card { display: flex; flex-direction: column; gap: 14px; }
.profile__title { margin: 0; padding: 0; font-size: 15px; font-weight: 600; }
.profile__label { margin: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.profile__meta { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Radio/checkbox chips: the input is visually hidden inside a .toggle-chip label. */
.profile__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.profile__group legend { margin-bottom: 14px; }
.profile__choices { --row-gap: 6px; }
.profile__genius-ar { font-size: 1.2em; unicode-bidi: isolate; }
.profile__genius { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 10px 14px; }
@media (max-width: 560px) { .profile__genius { grid-template-columns: 1fr; gap: 6px; } }
.profile__choice { cursor: pointer; gap: 8px; }
.profile__choice--ink { border-color: var(--ink); }
.profile__choice:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.profile__choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.profile__choice-ar { font-size: 16px; line-height: 1; }

/* Learning: daily goal, kind of Arabic, reasons (the same choices Today, the Library and Genius ask) */
.profile__learning { gap: 24px; }
.profile__group--ruled { border-top: 1px solid var(--line-soft); padding-top: 22px; }
/* A floated legend sits in the flow, below the rule, not across it. */
.profile__learning .profile__group legend { float: left; width: 100%; margin-bottom: 2px; font-size: 17px; font-weight: 700; }
.profile__learning .profile__group legend + * { clear: both; }
.profile__hint { margin: 0 0 12px; font-size: 14px; color: var(--text-muted); }
.profile__any { font-weight: 400; font-size: 14px; color: var(--text-muted); }
.profile__goals .goal-option { cursor: pointer; padding: 14px 16px; }
.goal-option:has(input:checked) { border-color: var(--ink); background: var(--sand-hover); }
.goal-option:has(input:checked) .goal-option__radio { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--card); }
.goal-option:has(input:focus-visible), .profile__kind:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.goal-option__text--stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.profile__goals .goal-option__min { font-size: 28px; }
.profile__kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profile__kind {
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
}
.profile__kind:hover { border-color: var(--ink); }
.profile__kind-ar { font-size: 28px; line-height: 1.4; color: var(--green); align-self: flex-start; }
.profile__kind-name { font-size: 16px; font-weight: 700; }
.profile__kind-note { font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.profile__kind:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.profile__kind:has(input:checked) .profile__kind-ar { color: var(--peach); }
.profile__kind:has(input:checked) .profile__kind-note { color: var(--text-on-dark-muted); }
.profile__autosave { margin: 0; font-size: 13px; color: var(--green); font-weight: 600; }
@media (max-width: 700px) {
  .profile__goals { grid-template-columns: 1fr 1fr; }
  .profile__kinds { grid-template-columns: 1fr; }
}

/* Reading defaults & notifications */
.profile__settings { padding-top: 8px; padding-bottom: 8px; gap: 0; }
.profile__setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.profile__setting-text { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.profile__setting-label { font-size: 15px; font-weight: 600; }
.profile__setting-desc { font-size: 13px; color: var(--text-muted); }
.profile__settings-save { margin: 16px 0; }

/* Offline downloads */
.profile__offline { gap: 10px; }
.profile__offline-list { margin: 0; padding: 0; list-style: none; }
.profile__offline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
}
.profile__remove { color: var(--clay); font-size: 14px; font-weight: 600; padding: 6px; }
.profile__empty { margin: 0; font-size: 14px; color: var(--text-muted); }

/* Account */
.profile__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.profile__field--wide { grid-column: 1 / -1; }

.profile__time-zone { max-width: 420px; }

/* Your data: delete account */
.profile__delete summary { cursor: pointer; font-weight: 600; color: var(--clay); }
.profile__delete-form { margin-top: 12px; max-width: 420px; }
@media (scripting: none) { .profile__autosave { display: none; } }

/* A school login's account: facts, not a form. */
.profile__facts { margin: 0 0 12px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.profile__facts dt { color: var(--text-muted); }
.profile__facts dd { margin: 0; }
