:root {
  color-scheme:light;
  --paper:#f5f5f7;
  --surface:#ffffff;
  --ink:#1d1d1f;
  --muted:#626267;
  --green:#176b50;
  --line:#dedee2;
  --wash:#edf4f0;
  --error:#8b2929;
  --warm:#725327;
  --radius:14px;
  --control-line:#8a8a8e;
  --font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
* {
  box-sizing:border-box;
  scrollbar-color:#aeaeb2 var(--paper);
  scrollbar-width:thin;
}
body {
  margin:0;
  background:var(--surface);
  color:var(--ink);
  font:1rem/1.75 var(--font);
}
.install-help { max-width:46rem; margin:12px auto 0; text-align:left; font-size:.875rem; }
.install-help summary { min-height:44px; display:list-item; padding:10px 0; }
.install-help p { margin:8px 0 16px; }
.offline-page { max-width:46rem; min-height:0; margin:clamp(40px,12vh,120px) auto; }
.offline-page p { margin-top:18px; }
.offline-mark { border-radius:8px; }
.offline-retry { display:inline-block; min-height:44px; padding:10px 0; color:var(--green); font-weight:600; }
::selection {
  background:#d2e4c8;
  color:#17392e;
}
:focus-visible {
  outline:3px solid var(--green);
  outline-offset:4px;
}
input,textarea {
  caret-color:var(--green);
}
[hidden] {
  display:none!important;
}
a {
  color:inherit;
  text-underline-offset:4px;
}
header {
  min-height:72px;
  background:var(--paper);
  color:var(--ink);
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px clamp(20px,4vw,56px);
  gap:24px;
}
.brand {
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:12px;
  font:600 1.375rem/1.25 var(--font);
  letter-spacing:-.02em;
}
.brand .brand-caption {
  display:block;
  font:.75rem/1.5 var(--font);
  letter-spacing:0;
  color:var(--muted);
  margin-top:3px;
}
.header-actions {
  display:flex;
  align-items:center;
  gap:18px;
  font-size:.8125rem;
}
.skip {
  position:fixed;
  top:-100px;
  left:20px;
  padding:12px;
  background:var(--surface);
  z-index:5;
}
.skip:focus {
  top:12px;
}
main {
  max-width:1200px;
  margin:auto;
  padding:28px clamp(20px,4vw,56px) 64px;
  min-height:calc(100vh - 134px);
}
h1,h2,h3,p {
  margin:0;
}
h1 {
  font-size:2rem;
  line-height:1.3;
  letter-spacing:-.025em;
  font-weight:600;
  text-wrap:balance;
}
h2 {
  font-size:1.25rem;
  line-height:1.5;
  font-weight:600;
}
h3 {
  font-size:1rem;
  font-weight:600;
}
p {
  margin-top:12px;
}
.welcome {
  display:grid;
  grid-template-columns:1.15fr 1fr;
  align-items:center;
  gap:64px;
  min-height:520px;
  margin:24px auto;
  padding:56px;
  background:var(--surface);
}
.welcome h1 {
  font-weight:600;
  font-size:2.5rem;
  line-height:1.35;
}
.welcome-copy p {
  color:var(--muted);
  margin-top:26px;
}
.login-form {
  padding:8px 0 8px 40px;
  border-left:1px solid var(--line);
  max-width:420px;
}
.login-form h2 {
  margin-bottom:26px;
}
label {
  display:block;
  font-weight:600;
  font-size:.875rem;
  margin:24px 0 8px;
}
.login-form label {
  margin-top:0;
}
input,textarea,select {
  width:100%;
  border:1px solid var(--control-line);
  border-radius:10px;
  background:var(--surface);
  color:var(--ink);
  padding:12px 14px;
  font:inherit;
  min-height:48px;
}
textarea {
  resize:vertical;
  line-height:1.8;
}
input::placeholder,textarea::placeholder {
  color:var(--muted);
}
button {
  font-weight:600;
  font-family:inherit;
  font-size:.9375rem;
  line-height:1.4;
  min-height:46px;
  padding:12px 22px;
  border:1px solid transparent;
  border-radius:10px;
  background:var(--green);
  color:#fff;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease;
}
button:hover {
  background:#10563f;
}
button:disabled {
  background:#e8e8ed;
  color:var(--muted);
  cursor:wait;
}
.quiet {
  background:#e8e8ed;
  color:var(--ink);
  padding:9px 15px;
  min-height:44px;
}
.quiet:hover {
  background:var(--wash);
  color:var(--green);
}
form>button {
  margin-top:22px;
}
.login-form button {
  width:100%;
}
.hint,.optional {
  font-size:.8125rem;
  color:var(--muted);
}
.optional {
  font-weight:400;
  margin-left:8px;
}
.error {
  border:1px solid #c28888;
  border-radius:10px;
  background:#fff0ed;
  color:var(--error);
  padding:14px 18px;
  margin-bottom:24px;
  overflow-wrap:anywhere;
}
.notice {
  padding:14px 18px;
  background:#eee8d9;
  color:var(--warm);
  border-radius:10px;
  margin:0 0 24px;
  font-size:.875rem;
}
.workspace-grid {
  display:grid;
  grid-template-columns:208px minmax(0,1fr);
  gap:56px;
  align-items:start;
}
aside {
  padding:20px;
  background:var(--paper);
  border-radius:var(--radius);
  position:sticky;
  top:24px;
}
aside h2 {
  font-size:.875rem;
  color:var(--muted);
}
#goal-name {
  font-size:1rem;
  font-weight:600;
  line-height:1.6;
  overflow-wrap:anywhere;
}
details {
  margin:30px 0 24px;
}
summary {
  cursor:pointer;
  min-height:44px;
  display:list-item;
  align-content:center;
  font-size:.875rem;
  font-weight:600;
}
#history-list {
  padding-left:20px;
  margin:8px 0;
  font-size:.8125rem;
  color:var(--muted);
}
#history-list li {
  padding:6px 0;
  overflow-wrap:anywhere;
}
.study-column {
  max-width:740px;
  min-width:0;
  padding:8px 0 24px;
}
.intro {
  color:var(--muted);
  margin-top:16px;
}
.steps {
  display:flex;
  gap:28px;
  flex-wrap:wrap;
  margin-bottom:32px;
  font-size:.8125rem;
  color:var(--muted);
}
.steps span {
  display:flex;
  align-items:center;
  gap:8px;
}
.steps .active {
  color:var(--green);
  font-weight:600;
}
.prose {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  max-width:70ch;
  line-height:1.85;
}
#explanation {
  margin-top:14px;
}
.question {
  border-top:1px solid var(--line);
  padding-top:28px;
  margin-top:36px;
}
#submitted {
  background:var(--paper);
  padding:20px 24px;
  margin-top:24px;
  border-radius:var(--radius);
}
#submitted .prose {
  font-size:.9375rem;
}
.answer-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:12px;
}
#clarify {
  margin:24px 0 0;
}
.feedback {
  border-top:1px solid var(--line);
  padding-top:28px;
  margin-top:32px;
}
.feedback button {
  margin-top:26px;
}
.task {
  padding:0 0 24px;
  margin-bottom:28px;
  border-bottom:1px solid var(--line);
}
.task p {
  font-size:.875rem;
  color:var(--muted);
}
.task button {
  margin-top:18px;
}
#empty button,#choose-goal button {
  margin-top:24px;
}
footer {
  padding:20px 24px;
  text-align:center;
  color:var(--muted);
  font-size:.75rem;
  border-top:1px solid var(--line);
}
#course-panel { margin-bottom:28px; }
#course-content { margin-top:22px; }
#course-form button,#course-content button { margin-top:22px; margin-right:12px; }
#course-map li { white-space:pre-wrap; overflow-wrap:anywhere; margin:18px 0; }
#course-tools { border-top:1px solid var(--line); margin:28px 0; padding-top:8px; }
#course-tools form { margin-bottom:24px; }
#course-tools a { overflow-wrap:anywhere; }
#course-content blockquote { margin:24px 0 8px; padding:18px 24px; background:var(--wash); }
#course-content cite { font-size:14px; color:var(--muted); }

.brand-mark {
  width:36px;
  height:36px;
  padding:8px;
  flex-shrink:0;
  color:var(--surface);
  background:var(--green);
  border-radius:10px;
}
#connection {
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
input:hover,textarea:hover,select:hover {
  border-color:var(--green);
}
button:active:not(:disabled) {
  background:#102f28;
}
.quiet:active:not(:disabled) {
  background:var(--wash);
}
#history {
  padding-top:16px;
  border-top:1px solid var(--line);
}
#history-list:empty::before {
  content:"完成练习后，记录会出现在这里。";
  display:block;
  margin-left:-20px;
  padding:8px 0;
}
#course-tools>details {
  margin:0;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
#course-tools>details:last-child {
  border-bottom:0;
}
#course-tools summary:hover,#history summary:hover {
  color:var(--green);
}
#course-content blockquote {
  border-radius:10px;
}
.steps span::before {
  content:"";
  width:7px;
  height:7px;
  border:1px solid currentColor;
  border-radius:50%;
}
.steps .active::before { background:currentColor; }
#demo-note {
  padding:10px 14px;
  background:var(--paper);
  color:var(--muted);
  font-size:.8125rem;
  margin-bottom:32px;
}
@media(prefers-contrast:more) {
  :root { --line:#8a8a8e; --muted:#424247; }
}
@media(max-width:1000px) {
  .welcome { gap:32px; padding:36px; }
  .login-form { padding-left:28px; }
  .workspace-grid { grid-template-columns:180px minmax(0,1fr); gap:36px; }
  .study-column { padding:8px 0 24px; }
}
@media(max-width:760px) {
  h1 {
    font-size:1.75rem;
  }
  .welcome h1 {
    font-size:2rem;
  }
  header {
    padding:12px 20px;
    min-height:72px;
    gap:12px;
  }
  .brand {
    gap:9px;
    font-size:1.25rem;
  }
  .brand .brand-caption {
    font-size:.75rem;
  }
  .header-actions {
    gap:10px;
    font-size:.75rem;
  }
  main {
    padding-top:20px;
  }
  .workspace-grid {
    grid-template-columns:1fr;
    gap:28px;
  }
  aside {
    position:static;
    padding:16px 0;
    background:transparent;
    border-bottom:1px solid var(--line);
    border-radius:0;
  }
  aside h2,aside>.hint {
    display:none;
  }
  #goal-name {
    font-size:1rem;
    margin:0;
  }
  details {
    margin:8px 0 0;
  }
  summary {
    font-size:.8125rem;
  }
  #history-list {
    margin-bottom:12px;
  }
  .welcome {
    grid-template-columns:1fr;
    gap:32px;
    padding:28px;
    margin:0;
    min-height:auto;
  }
  .welcome-copy p {
    margin-top:14px;
  }
  .login-form {
    padding:28px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
    max-width:none;
  }
  .answer-footer {
    align-items:stretch;
    flex-direction:column;
    gap:10px;
  }
  .answer-footer button {
    width:100%;
  }
  .steps {
    margin-bottom:24px;
  }
  .task {
    padding:0 0 20px;
  }
  #submitted {
    padding:18px;
  }
  .question {
    margin-top:28px;
  }
  footer {
    font-size:.75rem;
  }
  .prose {
    line-height:1.9;
  }
  .study-column { padding:0; }
  .brand-mark { width:32px; height:32px; padding:7px; }
  .quiet { padding:8px 10px; }
  #history { margin:4px 0 0; padding-top:0; border-top:0; }
  #course-tools summary { font-size:14px; }
}
@media(max-width:380px) {
  header { flex-wrap:wrap; }
  .header-actions { margin-left:auto; }
  main { padding-right:14px; padding-left:14px; }
  .welcome { padding:22px; }
  .welcome h1 { font-size:1.75rem; }
  .steps { gap:20px; }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}
