/* Personal learning: warm editorial surfaces, clear actions, quiet progress. */
.study-shell {
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 80px;
}
.study-nav,
.study-nav > div,
.study-nav form,
.today-heading,
.panel-heading,
.feedback-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.study-nav {
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 22px;
  font-size: 14px;
}
.study-nav a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}
.study-nav span {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.study-nav > div {
  min-width: 0;
  flex-wrap: wrap;
}
.study-nav form {
  flex-shrink: 0;
}
.study-nav :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.study-nav button {
  background: none;
  border: 0;
}
.study-heading {
  padding: 54px 0 38px;
}
.study-heading h1,
.feedback-wrap h1,
.account-wrap h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 14px 0 20px;
}
.goal-heading {
  padding: clamp(24px, 4vw, 46px) 0 28px;
}
.goal-heading h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  margin: 0 0 14px;
  text-wrap: balance;
}
.goal-try {
  margin-top: 12px;
}
.study-heading > p:last-child:not(.goal-try),
.goal-heading > p:first-of-type,
.study-heading > div > p:last-child {
  max-width: 620px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 17px;
}
.today-heading {
  justify-content: space-between;
  align-items: flex-end;
}
.study-label {
  font-weight: 600;
  display: block;
  margin-bottom: 18px;
}
.goal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.goal-card {
  display: flex;
  position: relative;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.goal-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent);
}
.goal-card:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.goal-card input {
  position: absolute;
  top: 21px;
  right: 20px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  outline: none;
}
.goal-title {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 8px;
  padding-inline-end: 26px;
  letter-spacing: -0.025em;
}
.goal-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}
.goal-audience {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 14px;
}
.study-preferences {
  margin-top: 28px;
  padding: clamp(16px, 2.5vw, 28px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.study-preferences h2,
.study-panel h2 {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 8px 0 14px;
}
.study-preferences h2 {
  margin: 0 0 6px;
}
.study-preferences header > p {
  font-size: 14px;
}
.study-preferences p,
.study-panel > p,
.study-panel > div > p {
  line-height: 1.65;
  color: var(--text-secondary);
}
.preference-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.preference-fields > div,
.study-form fieldset {
  min-width: 0;
}
.study-form label:not(.goal-card) {
  font-size: 14px;
}
.preference-fields label {
  display: block;
  font-weight: 500;
}
.study-form
  input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.study-form select {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-primary);
}
.study-form :is(input, select)[aria-invalid="true"] {
  border-color: var(--form-error);
}
.study-select {
  position: relative;
  margin-top: 8px;
}
.study-select select {
  appearance: none;
  margin-top: 0;
  padding-inline-end: 34px;
}
.study-select::after {
  position: absolute;
  inset-inline-end: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: solid var(--text-secondary);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-72%) rotate(45deg);
  pointer-events: none;
  content: "";
}
.field-help {
  font-size: 12px !important;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 8px;
}
.study-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 20px;
}
.study-form-footer p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 380px;
}
.study-shell .editorial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.study-form .errorlist {
  color: var(--form-error);
  margin: 12px 0;
  list-style: disc;
  padding-left: 22px;
}
.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}
.study-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 28px;
  margin-bottom: 24px;
  min-width: 0;
}
.panel-heading {
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.study-pill {
  display: inline-block;
  font:
    11px/1.5 ui-monospace,
    monospace;
  padding: 6px 9px;
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--text-secondary);
}
.study-pill.is-due {
  background: var(--ce-mint);
  color: #25351b;
}
.next-activity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  margin-top: 12px;
  padding: clamp(14px, 2.4vw, 22px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
}
.next-activity > div {
  flex: 1 1 210px;
  min-width: 0;
}
.next-activity h3 {
  margin-top: 7px;
  font-size: clamp(19px, 2.5vw, 25px);
  font-weight: 500;
  line-height: 1.25;
}
.session-follow-up {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
}
.session-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.session-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-light);
}
.session-item:hover h3 {
  color: var(--editorial-accent);
}
.session-item > div {
  flex: 1;
  min-width: 0;
}
.session-list h3,
.next-project h3,
.revision-list h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  margin: 6px 0;
}
.session-item p:last-child {
  font-size: 12px;
  color: var(--text-secondary);
}
.session-go {
  font-size: 22px;
  color: var(--accent);
  padding: 12px;
}
.rhythm-panel {
  background: var(--bg-surface);
}
.week-number {
  font-size: 64px;
  letter-spacing: -0.06em;
  line-height: 1.2;
  margin-top: 18px;
}
.week-number span {
  font-size: 30px;
  color: var(--text-muted);
}
.rhythm-panel h2 {
  font-size: 16px;
}
.rhythm-panel progress {
  width: 100%;
  height: 7px;
  accent-color: var(--accent);
  border: 0;
  display: block;
  margin: 20px 0;
}
.rhythm-panel p {
  font-size: 13px;
}
.study-stats {
  margin-top: 24px;
}
.study-stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 12px 0;
  font-size: 13px;
}
.study-stats dd {
  font-size: 22px;
}
.save-panel {
  background: var(--accent-light);
}
.save-panel .editorial-button {
  margin: 20px 0 10px;
  font-size: 14px;
}
.save-panel > p {
  font-size: 14px;
}
.upcoming-list,
.study-history,
.revision-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.upcoming-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
}
.upcoming-list span {
  display: block;
  font:
    11px ui-monospace,
    monospace;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.upcoming-list a {
  font-size: 14px;
}
.next-project .quiet-link {
  display: inline-block;
  margin-top: 20px;
}
.study-history li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
}
.study-history li a {
  overflow-wrap: anywhere;
}
.study-history span {
  font-size: 12px;
  color: var(--text-secondary);
}
.study-empty {
  padding: 30px 0;
  color: var(--text-secondary);
}
.study-empty > span {
  font-size: 28px;
  color: var(--accent);
}
.study-empty h3 {
  font-size: 24px;
  color: var(--text-primary);
  margin: 12px 0;
}
.study-empty p {
  margin-bottom: 20px;
}
.exercise-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 64px;
  padding-top: 42px;
}
.exercise-panel header {
  margin: 32px 0;
}
.exercise-panel h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 10px 0 16px;
}
.exercise-panel header > p:last-child {
  color: var(--text-secondary);
  line-height: 1.65;
}
.exercise-prompt {
  margin-bottom: 30px;
  max-width: none;
}
.exercise-prompt pre {
  overflow-x: auto;
  font-size: 14px;
  max-width: 100%;
  padding: 20px;
  background: var(--bg-surface);
  color: var(--text-primary);
}
.answer-form #id_answer > div {
  margin-bottom: 10px;
}
.answer-form #id_answer label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
}
.answer-form #id_answer label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}
.answer-form input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.exercise-hint {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin: 24px 0;
  font-size: 14px;
}
.exercise-hint summary {
  cursor: pointer;
  color: var(--accent);
}
.exercise-hint p {
  margin-top: 14px;
  line-height: 1.7;
}
.support-field {
  margin-bottom: 26px;
}
.exercise-aside {
  padding-top: 50px;
}
.exercise-aside h2 {
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1.15;
  margin: 18px 0;
}
.exercise-aside p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.exercise-aside-note {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 22px;
}
.exercise-aside-note strong {
  font-weight: 500;
}
.exercise-aside-note p {
  font-size: 13px;
  margin-top: 12px;
}
.feedback-wrap {
  max-width: 760px;
  margin: 54px auto;
}
.feedback-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.feedback-wrap .prose {
  max-width: none;
}
.revision-notice {
  display: flex;
  gap: 18px;
  padding: 22px;
  background: var(--accent-light);
  border-radius: 10px;
  margin: 24px 0;
}
.revision-notice > span {
  font-size: 28px;
  color: var(--accent);
}
.revision-notice p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 8px;
}
.feedback-actions {
  flex-wrap: wrap;
}
.guest-save-note {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 30px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 14px;
}
.guest-save-note p + p {
  margin-top: 8px;
}
.guest-save-note a,
.account-wrap a:not(.editorial-button) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.revision-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}
.revision-list li > div:last-child {
  flex-shrink: 0;
}
.revision-list li > div:last-child > a {
  display: block;
  margin-top: 12px;
}
.revision-list p {
  font-size: 13px;
  color: var(--text-secondary);
}
.revision-explainer {
  max-width: 750px;
}
.account-wrap {
  max-width: 540px;
  margin: 50px auto;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.account-wrap h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0;
}
.account-wrap > p {
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 20px 0;
}
.account-form > div,
.account-form > p {
  margin: 22px 0;
}
.account-form .helptext {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
}
.account-form ul {
  padding-left: 20px;
  list-style: disc;
}
.account-form button {
  margin-top: 16px;
  width: 100%;
}
@media (min-width: 1150px) {
  .preference-fields {
    grid-template-columns: minmax(235px, 1.15fr) repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .today-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .exercise-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 28px;
  }
  .goal-card {
    padding: 20px;
  }
  .goal-title {
    font-size: 21px;
  }
  .study-panel {
    padding: 22px;
  }
}
@media (max-width: 760px) {
  .goal-grid,
  .today-layout,
  .exercise-layout {
    grid-template-columns: 1fr;
  }
  .study-nav {
    gap: 12px;
    align-items: flex-start;
    font-size: 12px;
  }
  .study-nav > div {
    gap: 16px;
    flex-wrap: wrap;
  }
  .study-nav > div:last-child {
    justify-content: flex-end;
  }
  .study-heading {
    padding-top: 36px;
  }
  .study-heading.goal-heading {
    padding-top: 26px;
  }
  .today-heading {
    display: block;
  }
  .today-heading > a {
    display: inline-block;
    margin-top: 18px;
  }
  .study-form :is(input,select):not([type="radio"]):not([type="checkbox"]) {
    font-size: 16px;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
  .study-panel {
    padding: 22px;
  }
  .exercise-aside {
    padding: 0 0 30px;
  }
  .exercise-panel h1 {
    font-size: 30px;
  }
  .revision-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .revision-list li > div:last-child {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .revision-list li > div:last-child > a {
    margin: 0;
  }
  .feedback-wrap {
    margin-top: 36px;
  }
  .account-wrap {
    margin-top: 36px;
  }
  .study-shell {
    padding-bottom: 40px;
  }
  .today-layout > aside {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
  }
  .session-item {
    gap: 12px;
  }
  .session-list h3 {
    font-size: 18px;
  }
  .exercise-layout {
    padding-top: 28px;
  }
  .feedback-actions .editorial-button {
    width: 100%;
  }
}
@media (max-width: 500px) {
  .preference-fields {
    grid-template-columns: 1fr;
  }
  .study-form-footer .editorial-button,
  .answer-form .editorial-button {
    width: 100%;
  }
  .study-nav > div:last-child > span {
    display: none;
  }
}
@media (max-width: 400px) {
  .study-nav > div {
    gap: 12px;
  }
  .study-panel {
    padding: 18px;
  }
}

.calendar-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.calendar-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.calendar-form input,
.calendar-form button {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}

.weekly-achievements li {
  border-top: 1px solid var(--border);
  padding-block: 14px;
}
.weekly-achievements a,
.weekly-achievements .field-help {
  display: block;
}
