:root {
  --ink: #203b32;
  --muted: #6f7e76;
  --green: #245d4a;
  --light: #eaf0e9;
  --paper: #f7f8f3;
  --line: #dfe5dc;
  --white: #fff;
  --gold: #b78942;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  transition:
    background 0.16s,
    border-color 0.16s;
}
a {
  color: var(--green);
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #bf954e;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.4;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 21px;
  line-height: 1.5;
}
h3 {
  font-size: 22px;
}
p {
  margin-top: 10px;
}
.muted,
.field-note {
  color: var(--muted);
}
.field-note {
  font-size: 12px;
  line-height: 1.7;
}
.eyebrow,
.section-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green);
  font-weight: 650;
  margin-bottom: 9px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px 14px 14px 3px;
  background: var(--green);
  color: white;
  font-family: serif;
  font-size: 26px;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.04fr 1fr;
}
.login-story {
  position: relative;
  padding: 48px 8vw;
  background: #e7eee4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid #cedcc9;
  border-radius: 50%;
  bottom: -200px;
  right: -120px;
}
.story {
  margin: auto 0;
  padding: 70px 0;
}
.story h1 {
  font-size: 47px;
  font-family: "Songti SC", STSong, serif;
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: 1px;
}
.story > p {
  font-size: 16px;
  color: #65775f;
  line-height: 2;
  margin-top: 23px;
}
.story-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 44px;
  font-size: 12px;
  color: #6e8067;
  letter-spacing: 1px;
}
.story-steps b {
  font-size: 14px;
  font-weight: 500;
  color: #455d43;
  margin-left: 18px;
}
.story-foot {
  font-size: 12px;
  color: #6b7b65;
}
.login-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 34px;
  background: #fcfcf9;
}
.login-card {
  width: 100%;
  max-width: 370px;
}
.login-card h2 {
  font-size: 30px;
}
.login-card form {
  margin-top: 32px;
}
.login-help {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
  line-height: 1.9;
}
.subtle-link {
  font-size: 12px;
  display: inline-block;
  margin-top: 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  margin: 0;
}
.login-card .field-note {
  margin: 6px 0 22px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}
input,
select {
  width: 100%;
  border: 1px solid #d6ded2;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  min-height: 45px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--green);
}
input::placeholder {
  color: #97a093;
}
.primary,
.secondary,
.outline-link {
  border-radius: 8px;
  padding: 11px 19px;
  font-size: 14px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 43px;
}
.primary {
  border: 1px solid var(--green);
  color: white;
  background: var(--green);
}
.primary:hover {
  background: #184d3b;
}
.secondary,
.outline-link {
  background: white;
  color: var(--green);
  border: 1px solid #cbd8c5;
}
.secondary:hover,
.outline-link:hover {
  background: #f0f4eb;
}
.full {
  width: 100%;
  justify-content: space-between;
}
.form-error {
  color: #a03831;
  font-size: 13px;
  min-height: 20px;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 19px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}
.topbar nav {
  display: flex;
  gap: 9px;
}
.topbar nav button,
.text-button,
.account-name {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 13px;
  font-size: 14px;
  border-radius: 7px;
}
.topbar nav button.active {
  background: var(--light);
  color: var(--green);
  font-weight: 650;
}
.topbar nav button:hover,
.text-button:hover,
.account-name:hover {
  background: var(--paper);
  color: var(--green);
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-name {
  font-weight: 550;
  color: var(--ink);
}
.account .text-button {
  font-size: 12px;
}
.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 55px;
}
.context-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 21px;
}
.context-bar label {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  gap: 10px;
}
.context-bar select {
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 650;
  min-width: 105px;
  padding: 7px 22px 7px 2px;
  min-height: 34px;
}
.context-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}
.context-note {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e9eee1;
  border: 1px solid #dfe7d5;
  border-radius: 16px;
  padding: 29px 37px;
  margin-bottom: 20px;
  overflow: hidden;
}
.welcome h1 {
  font-size: 34px;
}
.welcome p {
  color: #6a7a5f;
}
.welcome-stamp {
  width: 138px;
  height: 138px;
  border: 1px solid #bccda8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #6f855d;
  transform: rotate(-8deg);
  flex-shrink: 0;
  margin-right: 15px;
}
.welcome-stamp span {
  font-size: 10px;
  letter-spacing: 5px;
  border-bottom: 1px solid #bfceb0;
  padding-bottom: 4px;
  margin-bottom: 7px;
}
.welcome-stamp b {
  font-family: "Songti SC", serif;
  font-size: 19px;
  line-height: 1.6;
  font-weight: 500;
}
.learner-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 25px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  margin-bottom: 33px;
}
.avatar {
  display: grid;
  place-items: center;
  height: 49px;
  width: 49px;
  background: #f3e8d6;
  color: #947446;
  border-radius: 50%;
  font-size: 20px;
}
.learner-summary h2 {
  font-size: 18px;
}
.learner-summary p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.dot {
  margin: 0 9px;
}
.learner-summary .arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--green);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
}
.section-heading h2 {
  font-size: 24px;
}
.section-heading .section-kicker {
  font-size: 10px;
  margin-bottom: 4px;
}
.section-heading > .muted {
  font-size: 12px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 19px;
}
.module-card {
  padding: 25px 25px 22px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.module-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.module-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  background: #e8ede0;
  border-radius: 11px;
  color: #566d43;
  font-size: 24px;
  font-weight: 550;
}
.writing .module-icon {
  background: #f4e9dd;
  color: #947146;
}
.memorization .module-icon {
  background: #e9edf1;
  color: #708397;
}
.pill {
  background: #f5f0e4;
  color: #8b723b;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 10px;
  white-space: nowrap;
}
.pill.quiet {
  background: #f0f2ef;
  color: #7b867a;
}
.module-card > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  min-height: 49px;
}
.module-bottom {
  margin-top: auto;
  padding-top: 18px;
}
.module-note {
  font-size: 11px;
  color: #8a8f7e;
  margin: 0 0 12px;
}
.module-bottom .outline-link {
  width: 100%;
  padding: 8px 13px;
  font-size: 13px;
  justify-content: space-between;
  min-height: 39px;
}
.module-bottom small {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #8a9387;
  margin-top: 8px;
}
.coming {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 63px;
  background: #f7f8f5;
  border-radius: 7px;
  color: #8f9a8e;
  font-size: 12px;
}
.info-strip {
  margin-top: 26px;
  border: 1px dashed #cfdbc5;
  background: #f2f5ec;
  padding: 19px 22px;
  border-radius: 11px;
  display: flex;
  align-items: start;
  gap: 13px;
}
.info-icon {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid #9bab8c;
  color: #718760;
  border-radius: 50%;
  font-size: 12px;
  margin-top: 3px;
}
.info-strip b {
  font-size: 13px;
  font-weight: 550;
}
.info-strip p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
footer {
  max-width: 1116px;
  margin: 0 auto 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #8c9587;
  display: flex;
  justify-content: space-between;
}
.page-heading {
  padding: 12px 0 25px;
}
.page-heading h1 {
  font-size: 29px;
}
.page-heading p {
  font-size: 13px;
}
.panel {
  padding: 27px 29px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 13px;
  margin-bottom: 22px;
}
.panel h2 {
  margin-bottom: 18px;
  font-size: 20px;
}
.panel > .muted {
  font-size: 13px;
  margin-top: -9px;
  margin-bottom: 25px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.panel-heading .section-kicker {
  font-size: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.inline-form {
  display: flex;
  align-items: end;
  gap: 12px;
}
.inline-form label {
  flex: 1;
  margin-bottom: 0;
}
.inline-form button {
  margin-bottom: 0;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
}
.form-actions .muted {
  font-size: 11px;
}
hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 25px 0;
}
.history h2 {
  margin-bottom: 8px;
}
.history ol {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}
.history li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.history li b {
  display: block;
  font-size: 13px;
}
.history li span:not(.history-point),
.history li small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.history-point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9bab8a;
  margin-top: 7px;
  flex-shrink: 0;
}
.connection-note {
  margin-top: 26px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}
.check-grid p {
  font-size: 13px;
}
.check-grid span {
  color: var(--green);
  margin-right: 7px;
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.narrow {
  max-width: 540px;
}
.sessions {
  padding: 0;
  list-style: none;
}
.sessions li {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.sessions b {
  font-size: 13px;
}
.sessions small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.sessions button {
  font-size: 12px;
  padding: 7px 11px;
}
.status-page {
  max-width: 680px;
  margin: 60px auto;
  padding: 0 25px;
}
.status-page .brand {
  margin-bottom: 40px;
}
.status-page .panel {
  padding: 35px;
}
.status-page h1 {
  font-size: 28px;
}
.status-dot {
  display: inline-block;
  background: #5c9471;
  border: 5px solid #e7f0e7;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.status-page dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  font-size: 13px;
  gap: 15px;
  border-block: 1px solid var(--line);
  padding: 22px 0;
  margin: 25px 0;
}
.status-page dt {
  color: var(--muted);
}
.status-page dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.status-page .outline-link {
  margin-top: 24px;
}
#notice {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #214d3b;
  color: white;
  padding: 13px 22px;
  border-radius: 9px;
  box-shadow: 0 4px 24px #183a3326;
  max-width: calc(100% - 32px);
  z-index: 10;
  font-size: 13px;
}
#notice.error {
  background: #85443c;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 90vh;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .login-story {
    padding-inline: 10vw;
  }
}
@media (max-width: 900px) {
  .topbar {
    padding: 17px 25px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .main {
    padding: 22px 24px;
  }
  .module-grid {
    gap: 12px;
  }
  .module-card {
    padding: 20px 18px;
  }
  .settings-grid {
    grid-template-columns: 240px 1fr;
    gap: 16px;
  }
  .panel {
    padding: 23px;
  }
  .login-story {
    padding: 35px;
  }
  .story h1 {
    font-size: 39px;
  }
  .context-note {
    display: none;
  }
  footer {
    margin-inline: 25px;
  }
}
@media (max-width: 650px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 23px 26px;
  }
  .story,
  .story-foot {
    display: none;
  }
  .login-side {
    padding: 38px 26px 55px;
    align-items: start;
  }
  .login-card {
    max-width: 430px;
  }
  .login-card h2 {
    font-size: 28px;
  }
  .login-story:after {
    display: none;
  }
  .topbar .brand {
    font-size: 18px;
  }
  .account {
    gap: 0;
  }
  .account-name {
    font-size: 12px;
    padding-inline: 5px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 23px;
  }
  .topbar nav button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .main {
    padding: 20px 18px 38px;
  }
  .context-bar {
    gap: 11px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .context-bar label {
    font-size: 11px;
    gap: 5px;
  }
  .context-bar select {
    max-width: 145px;
    font-size: 12px;
    min-width: 75px;
  }
  .welcome {
    padding: 25px 23px;
  }
  .welcome h1 {
    font-size: 27px;
  }
  .welcome p {
    font-size: 12px;
  }
  .welcome-stamp {
    width: 82px;
    height: 82px;
    margin-right: 0;
  }
  .welcome-stamp b {
    font-size: 13px;
  }
  .welcome-stamp span {
    font-size: 8px;
    letter-spacing: 2px;
    margin-bottom: 2px;
  }
  .learner-summary {
    padding: 17px 15px;
    gap: 10px;
    margin-bottom: 26px;
    flex-wrap: wrap;
  }
  .learner-summary .arrow {
    font-size: 10px;
    padding: 7px 0;
  }
  .learner-summary p {
    font-size: 10px;
  }
  .avatar {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
  .section-heading {
    display: block;
  }
  .section-heading > .muted {
    display: block;
    margin-top: 8px;
    font-size: 11px;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .module-card {
    padding: 22px;
    min-height: 280px;
  }
  .module-top {
    margin-bottom: 13px;
  }
  .module-card > p {
    min-height: 0;
  }
  .module-bottom {
    padding-top: 20px;
  }
  .info-strip {
    padding: 17px;
    gap: 8px;
  }
  .info-icon {
    flex-shrink: 0;
  }
  .settings-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 22px 20px;
  }
  .form-grid {
    gap: 0 12px;
  }
  .form-grid label {
    font-size: 12px;
  }
  .form-grid input {
    padding: 10px;
    font-size: 12px;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .primary {
    width: 100%;
  }
  .check-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  footer {
    margin-inline: 20px;
    display: block;
    font-size: 10px;
  }
  footer span {
    display: block;
    margin-top: 5px;
  }
  .status-page {
    margin-top: 35px;
  }
  .status-page .panel {
    padding: 25px;
  }
  .status-page h1 {
    font-size: 24px;
  }
  .status-page dl {
    grid-template-columns: 75px 1fr;
    font-size: 12px;
  }
}
.check {
  flex-direction: row;
  justify-content: flex-start;
}
.check input {
  min-height: 16px;
  flex: 0 0 16px;
}

/* R1 native task and retained shared wallet surfaces. */
.task-panel {
  margin-top: 1.5rem;
}
.task-tabs,
.reward-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.task-tabs button[data-task-period] {
  border: 1px solid #dce4da;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #f6f8f2;
  color: #35574b;
  font: inherit;
  cursor: pointer;
}
.task-tabs button[aria-pressed="true"] {
  background: #183d37;
  color: white;
}
.task-row,
.redemption-row,
.ledger-row,
.wallet-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.task-row + .task-row,
.redemption-row + .redemption-row,
.ledger-row + .ledger-row {
  border-top: 1px solid #e0e8df;
}
.task-row h3 {
  margin: 0 0 0.45rem;
}
.task-row p {
  margin: 0.4rem 0;
}
.wallet-preview {
  padding: 1.5rem;
}
.coin-total {
  font-size: 2.2rem;
  font-variant-numeric: tabular-nums;
  color: #93691c;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.reward-card {
  background: #f7f8f2;
  border: 1px solid #e0e8df;
  border-radius: 16px;
  padding: 1.25rem;
  display: grid;
  gap: 0.65rem;
}
.reward-card h3,
.reward-card p {
  margin: 0;
}
#wallet-pin-form,
#wallet-catalog-form {
  max-width: 420px;
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}
@media (max-width: 640px) {
  .task-row,
  .wallet-preview,
  .redemption-row {
    align-items: stretch;
    flex-direction: column;
  }
  .task-panel .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .task-tabs button {
    padding: 0.6rem;
  }
}
