.account-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  max-width: 900px;
  margin: 36px auto;
  padding: 24px 0;
}
.account-welcome .art {
  width: 190px;
  margin: 0 0 22px;
}
.account-welcome h1 {
  margin: 12px 0 18px;
  font-family: var(--book);
  font-size: 36px;
}
.account-form {
  display: grid;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
}
.account-form h2 {
  margin-bottom: 8px;
}
.account-form label {
  font-weight: 600;
}
.account-form input,
.profile-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #b5bca9;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
}
.account-form .button {
  margin-top: 4px;
  min-height: 52px;
}
.account-form .error-text {
  min-height: 24px;
}
.account-form .small-note {
  font-size: 13px;
}
.account-entry .site-header nav,
.account-entry .header-tools {
  display: none;
}
.account-sync {
  font-size: 13px;
}
.profile-form {
  display: grid;
  grid-template-columns: 130px minmax(160px, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: 650px;
  margin: 20px 0;
}
.profile-form .error-text {
  grid-column: 1/-1;
}
.account-entry .main {
  display: grid;
  align-content: center;
}
.account-form button:disabled {
  opacity: 0.65;
}
@media (max-width: 680px) {
  .account-login {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0 auto;
    padding: 6px 0;
    width: 100%;
  }
  .account-welcome .art {
    width: 100px;
    float: right;
    margin: 0 0 0 12px;
  }
  .account-welcome h1 {
    font-size: 27px;
  }
  .account-welcome p {
    font-size: 14px;
  }
  .account-form {
    padding: 24px;
    gap: 10px;
  }
  .profile-form {
    grid-template-columns: 1fr;
  }
  .account-entry .main {
    min-height: auto;
  }
  .account-entry .site-header {
    height: 80px;
  }
  .account-entry .app-shell {
    padding: 0 20px;
  }
}
@media (max-height: 700px) and (min-width: 681px) {
  .account-login {
    margin: 8px auto;
    gap: 44px;
    padding: 8px 0;
  }
  .account-welcome .art {
    width: 130px;
  }
  .account-form {
    padding: 24px;
    gap: 8px;
  }
}
.account-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd2c2;
  border-radius: 12px;
  background: var(--white);
  color: var(--green-dark);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.account-logout-button:hover {
  background: var(--sage);
}
.account-center {
  padding: 22px 0 42px;
}
.center-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.center-heading h1 {
  font-size: 30px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.center-heading p {
  display: flex;
  align-items: center;
  gap: 12px;
}
.center-heading > .button {
  flex-shrink: 0;
}
.center-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
}
.center-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}
.center-nav :is(a, button) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
}
.center-nav :is(a, button) span {
  color: var(--green);
}
.center-nav :is(a, button)[aria-current='page'] {
  background: var(--sage);
  color: var(--green-dark);
  font-weight: 600;
}
.center-content {
  min-width: 0;
}
.center-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 20px;
}
.center-panel-heading {
  margin-bottom: 18px;
}
.center-panel-heading p {
  margin-top: 8px;
}
.center-panel p {
  line-height: 1.8;
}
.center-panel .button-row {
  margin-top: 20px;
  flex-wrap: wrap;
}
.center-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.center-metric {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 18px;
  background: #e6ebdc;
  border: 1px solid #d4ddc7;
  gap: 8px;
}
.center-metric strong {
  font-size: 32px;
  line-height: 1.3;
  color: var(--green-dark);
}
.center-metric span {
  font-size: 13px;
  color: #56614c;
}
.center-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border: 1px solid #d4dbc9;
  background: #f2f3e9;
  color: #59664d;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
.center-badge.is-done {
  background: #dfead4;
  color: #35583c;
}
.center-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}
.center-form label {
  font-size: 14px;
  font-weight: 600;
}
.center-form input,
.center-form select,
.center-search input {
  min-width: 0;
  min-height: 48px;
  width: 100%;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  border: 1px solid #aebba2;
  border-radius: 10px;
  font: inherit;
}
.center-form > .button {
  justify-self: start;
  margin-top: 6px;
}
.center-form-error {
  color: #9b422f;
  min-height: 24px;
  font-size: 14px;
}
.center-nickname-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper, #f4f5ed);
}
.center-nickname-preview p {
  margin: 0 0 12px;
}
.center-nickname-preview .button {
  min-height: 44px;
  margin-bottom: 12px;
}
.center-nickname-preview .center-form-error {
  margin: 0;
  min-height: 0;
}
.center-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.center-filters button {
  min-height: 44px;
  padding: 8px 16px;
  background: #f2f3e9;
  border: 1px solid #d7decd;
  border-radius: 12px;
  font-size: 14px;
}
.center-filters button[aria-pressed='true'] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.center-course {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.center-course-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.center-course h3 {
  font-size: 19px;
}
.center-course-heading p {
  font-size: 13px;
  margin-top: 6px;
}
.center-course progress {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 16px;
  accent-color: var(--green);
}
.center-text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border-radius: 9px;
  color: var(--green-dark);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.center-inspect-heading {
  margin-bottom: 24px;
}
.center-inspect-identity {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
}
.center-inspect-identity h2 {
  font-size: 27px;
  overflow-wrap: anywhere;
}
.center-inspect-identity > div {
  min-width: 0;
}
.center-inspect-identity p {
  overflow-wrap: anywhere;
}
.center-inspect-identity p,
.center-inspect-heading > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.center-inspect-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line);
}
.center-inspect-tabs a {
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 3px solid transparent;
}
.center-inspect-tabs a[aria-current='page'] {
  color: var(--green-dark);
  font-weight: 600;
  border-bottom-color: var(--green);
}
.center-records {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.center-records li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.center-records li > div {
  min-width: 0;
}
.center-records strong,
.center-records p {
  overflow-wrap: anywhere;
}
.center-records p {
  font-size: 14px;
  margin: 6px 0 10px;
}
.center-record-time {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.center-record-time small {
  display: block;
  margin-top: 8px;
}
@media (max-width: 600px) {
  .is-inspecting .center-nav {
    display: none;
  }
  .is-inspecting .center-heading {
    margin-bottom: 4px;
  }
  .is-inspecting .center-inspect-heading {
    margin-bottom: 16px;
  }
  .center-records li {
    flex-direction: column;
    gap: 12px;
  }
  .center-record-time {
    text-align: left;
  }
  .center-inspect-tabs a {
    padding: 12px;
    font-size: 14px;
  }
}
.center-text-button:hover {
  background: var(--sage);
}
.center-course details {
  margin-top: 14px;
}
.center-course summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  font-size: 14px;
  color: var(--green-dark);
}
.center-steps {
  padding: 0;
  list-style: none;
  margin: 0;
}
.center-steps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.center-steps strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.center-steps small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.center-steps li > div {
  display: flex;
  flex-shrink: 0;
}
.center-table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}
.center-table-wrap table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
.center-table-wrap th,
.center-table-wrap td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.center-table-wrap thead {
  background: #f0f2e7;
}
.center-table-wrap small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.center-table-wrap td .center-text-button {
  padding: 6px 8px;
}
.center-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.center-report-heading .center-filters {
  margin: 0;
}
.center-history {
  list-style: none;
  padding: 0;
  margin: 0;
}
.center-history li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.center-history strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.center-history span {
  font-size: 12px;
  color: var(--muted);
}
.center-user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.center-search {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 440px;
}
.center-search button {
  flex-shrink: 0;
}
.center-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}
.center-pagination span {
  font-size: 13px;
}
.center-empty,
.center-loading {
  padding: 26px 0;
  color: var(--muted);
}
.center-warning {
  padding: 18px 22px;
  border: 1px solid #d8c198;
  background: #f8efd9;
  border-radius: 14px;
  margin-bottom: 20px;
}
.center-dialog {
  width: min(540px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  border: 1px solid #c8d1bb;
  border-radius: 22px;
  padding: 28px;
  color: var(--ink);
  background: var(--white);
}
.center-dialog::backdrop {
  background: #27332970;
}
.center-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.center-dialog-heading h2 {
  font-size: 23px;
}
.center-dialog-heading button {
  min-height: 44px;
  min-width: 44px;
  border-radius: 50%;
  font-size: 25px;
  background: var(--sage);
}
.center-dialog .button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (min-width: 901px) and (max-width: 1200px) {
  .site-header {
    gap: 12px;
  }
  .site-header nav a,
  .site-header nav button {
    padding-left: 9px;
    padding-right: 9px;
  }
  .header-tools {
    gap: 6px;
  }
  .brand small {
    display: none;
  }
  .parent-button {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (max-width: 900px) {
  .center-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .center-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .center-nav :is(a, button) {
    padding: 10px 14px;
  }
  .center-nav :is(a, button) span {
    display: none;
  }
  .center-heading h1 {
    font-size: 27px;
  }
  .center-panel {
    padding: 22px;
  }
  .center-metric {
    padding: 20px;
  }
  .site-header .header-tools {
    gap: 5px;
  }
  .account-logout-button {
    font-size: 12px;
    padding: 8px 10px;
  }
}
@media (max-width: 600px) {
  .site-header {
    height: auto;
    min-height: 122px;
    row-gap: 8px;
    padding-bottom: 8px;
  }
  .site-header .brand {
    max-width: calc(100% - 90px);
  }
  .site-header .brand small {
    display: none;
  }
  .site-header .header-tools {
    order: 2;
    width: 100%;
    justify-content: flex-end;
    margin: 0;
    align-self: auto;
  }
  .site-header nav {
    order: 3;
    height: auto;
    min-height: 38px;
  }
  .with-town-return .site-header {
    height: auto;
    min-height: 122px;
  }
  .account-entry .site-header {
    min-height: 80px;
  }
  .account-center {
    padding-top: 12px;
  }
  .center-heading {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .center-heading h1 {
    font-size: 25px;
  }
  .center-heading > .button {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 12px;
  }
  .center-heading .eyebrow {
    font-size: 12px;
  }
  .center-nav :is(a, button) {
    font-size: 13px;
    padding: 9px 12px;
    min-height: 44px;
  }
  .center-panel {
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
  }
  .center-panel h2 {
    font-size: 19px;
  }
  .center-panel p {
    font-size: 13px;
  }
  .center-metrics {
    gap: 8px;
    margin-bottom: 16px;
  }
  .center-metric {
    padding: 16px 10px;
    gap: 6px;
  }
  .center-metric strong {
    font-size: 24px;
  }
  .center-metric span {
    font-size: 11px;
  }
  .center-course h3 {
    font-size: 17px;
  }
  .center-steps li {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .center-steps li > div {
    align-self: flex-end;
  }
  .center-report-heading,
  .center-user-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .center-report-heading .center-filters {
    margin-top: 12px;
  }
  .center-search {
    width: 100%;
  }
  .center-pagination {
    gap: 8px;
  }
  .center-pagination .button {
    padding: 8px 12px;
    min-height: 44px;
  }
  .center-dialog {
    padding: 22px;
  }
  .center-table-wrap th,
  .center-table-wrap td {
    padding: 12px 8px;
  }
}

@media (min-width: 601px) and (max-width: 1200px) {
  .site-header,
  .with-town-return .site-header {
    height: auto;
    min-height: 110px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin: 0;
    min-height: 44px;
  }
  .site-header .header-tools {
    margin-left: auto;
    align-self: center;
  }
  .account-entry .site-header {
    min-height: 80px;
  }
}

.entry-invitation h1,
.bear-guide strong {
  overflow-wrap: anywhere;
}

.center-nav button {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* Course management: scan the curriculum first, reveal actions on demand. */
.course-browser .center-filters {
  margin: 16px 0 12px;
}
.course-browser-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.course-query {
  flex: 1;
  min-width: 100px;
}
.course-browser-tools input,
.course-browser-tools select,
.course-pagination select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fffdf6;
  font: inherit;
  font-size: 14px;
}
.course-status {
  flex: 0 0 118px;
}
.course-browser-tools > button {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}
.course-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
}
.course-result-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.course-result-summary .center-text-button {
  flex-shrink: 0;
}
.compact-course.center-course {
  padding: 0;
  border-top: 1px solid var(--line);
}
.compact-course > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
}
.compact-course > summary::-webkit-details-marker {
  display: none;
}
.compact-course > summary:hover {
  background: #f0f3e9;
}
.compact-course > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  border-radius: 8px;
}
.course-order {
  color: var(--green);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.course-summary-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.course-summary-copy strong {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.course-summary-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.course-expand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--green);
}
.course-chevron {
  font-size: 22px;
  line-height: 1;
}
.compact-course:not([open]) .when-open,
.compact-course[open] .when-closed {
  display: none;
}
.compact-course[open] .course-chevron {
  transform: rotate(180deg);
}
.compact-course[open] > summary {
  background: #edf2e7;
}
.course-detail {
  padding: 0 16px 16px;
  background: #f5f6ed;
  border-radius: 0 0 10px 10px;
}
.course-detail > progress {
  margin: 0;
  padding: 0;
  height: 6px;
}
.course-detail h3 {
  margin: 16px 0 0;
  font-size: 15px;
}
.course-detail .center-steps {
  margin-top: 8px;
}
.course-detail .center-steps li {
  padding: 12px 0;
}
.course-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  flex-wrap: wrap;
}
.course-detail-actions > div {
  display: flex;
  flex-wrap: wrap;
}
.course-detail-actions > .button {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 14px;
}
.course-pagination {
  padding-top: 16px;
  margin-top: 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}
.course-pagination .button {
  min-height: 44px;
  font-size: 14px;
  padding: 8px 14px;
}
.course-pagination small {
  color: var(--muted);
  font-size: 12px;
}
.catalog-course-number {
  font-size: 0.7em;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
}
@media (max-width: 600px) {
  .course-browser.center-panel {
    padding: 16px 12px;
  }
  .course-browser-tools {
    flex-wrap: wrap;
  }
  .course-query {
    flex: 1 0 100%;
  }
  .course-status {
    flex: 1;
  }
  .compact-course > summary {
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    gap: 8px;
    min-height: 76px;
  }
  .course-summary-copy strong {
    font-size: 16px;
  }
  .course-order {
    font-size: 19px;
  }
  .course-expand > .when-closed,
  .course-expand > .when-open {
    display: none;
  }
  .course-detail {
    padding: 0 10px 12px;
  }
  .course-detail .center-steps li {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }
  .course-detail .center-steps li > div {
    justify-content: flex-end;
  }
  .course-pagination {
    justify-content: center;
    gap: 6px;
  }
  .course-pagination small {
    flex-basis: 100%;
    text-align: center;
  }
}
@media (max-width: 600px) {
  .account-center:has(.course-browser) .center-heading {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }
  .account-center:has(.course-browser) .center-heading .eyebrow {
    display: none;
  }
  .account-center:has(.course-browser) .center-heading > div {
    min-width: 0;
  }
  .account-center:has(.course-browser) .center-heading h1 {
    font-size: 22px;
    line-height: 1.4;
  }
  .account-center:has(.course-browser) .center-heading > .button {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
  }
}
.center-danger {
  color: #9b422f;
}
.button.danger {
  color: #fffdf6;
  background: #9b422f;
  border-color: #9b422f;
}
.button.danger:hover {
  background: #813525;
}
