:root {
  --ink: #233c35;
  --forest: #183e37;
  --green: #285d4e;
  --sage: #e9efe8;
  --paper: #f7f7f2;
  --line: #e1e5dc;
  --muted: #7a8276;
  --gold: #bd9153;
  --white: #fff;
  --danger: #a33d32;
  --radius: 16px;
  font-family:
    Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.6;
}
button svg,
a svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
button {
  color: inherit;
}
svg {
  vertical-align: middle;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.35;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
}
h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
p {
  margin-bottom: 14px;
}
small {
  font-size: 12px;
}
input:not([type="checkbox"]):not([type="file"]),
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dce1d7;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input::placeholder,
textarea::placeholder {
  color: #9a9f95;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #6f8e75;
  box-shadow: 0 0 0 3px #dbe8d955;
}
textarea {
  resize: vertical;
  min-height: 50px;
  line-height: 1.65;
}
input[type="checkbox"] {
  accent-color: var(--forest);
  width: 16px;
  height: 16px;
}
select {
  width: auto;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #ba9855;
  outline-offset: 4px;
}
pre {
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.fine-print {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.meta,
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.eyebrow {
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 9px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  min-height: 43px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.5;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: #eff2eb;
  border-color: #cbd4c7;
}
.button.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}
.button.primary:hover {
  background: #2d594a;
}
.button.quiet {
  background: transparent;
}
.button.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}
.button.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.text-link,
.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  cursor: pointer;
}
.text-link {
  color: var(--green);
  font-weight: 600;
}
.text-link:hover {
  text-decoration: underline;
}
.small {
  font-size: 12px;
}
.error-text,
.danger-text {
  color: var(--danger) !important;
}
.success-text {
  color: var(--green);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.field small {
  font-weight: 400;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 400;
}
.notice {
  background: #f3efdf;
  border: 1px solid #e7dfc1;
  border-radius: 10px;
  padding: 14px 18px;
  color: #77623c;
  font-size: 13px;
  margin-bottom: 22px;
}
.notice p:last-child {
  margin-bottom: 0;
}
.notice .button {
  margin-right: 10px;
  margin-top: 8px;
}
.notice-link {
  display: block;
  color: var(--green);
  background: #e6eee2;
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}
.error-box {
  background: #fff0ed;
  border: 1px solid #f0c8bd;
  border-radius: 9px;
  padding: 12px 16px;
  color: #953d2e;
  font-size: 13px;
  white-space: pre-wrap;
  margin-bottom: 18px;
}
.loading,
.boot {
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h2,
.section-heading h3 {
  margin-bottom: 0;
}
.section-heading .muted {
  font-size: 12px;
}
.badge {
  display: inline-flex;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #f1efe7;
  color: #887756;
  white-space: nowrap;
}
.badge.green {
  background: #edf3e8;
  color: #54744d;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 8px 28px #122e3322;
  max-width: min(650px, 90vw);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 200;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%);
}
#toast.error {
  background: #913e31;
}
.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 440px;
  width: 90vw;
  padding: 30px;
  color: var(--ink);
}
.confirm-dialog::backdrop {
  background: #10261f77;
}
.confirm-dialog p {
  font-size: 14px;
  color: var(--muted);
}
.confirm-dialog .actions {
  justify-content: flex-end;
  margin-top: 26px;
}
/* Shared application frame */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #f0f2e9;
  border-right: 1px solid var(--line);
  padding: 33px 22px 22px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand strong {
  display: block;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 1px;
  line-height: 1.4;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 4px;
  color: #7e8979;
}
.brand img {
  flex-shrink: 0;
}
.nav-caption {
  margin: 54px 13px 13px;
  font-size: 10px;
  color: #8a9182;
  letter-spacing: 1px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 13px;
  color: #737e6e;
  white-space: nowrap;
}
.nav-item svg {
  width: 19px;
  height: 19px;
}
.nav-item:hover {
  background: #e7ecdf;
}
.nav-item.active {
  background: #dce6d4;
  color: var(--forest);
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.sidebar-note {
  border-bottom: 1px solid var(--line);
  padding: 20px 14px 22px;
  margin-bottom: 18px;
}
.sidebar-note svg {
  width: 28px;
  height: 28px;
  color: #87977b;
  margin-bottom: 12px;
}
.sidebar-note p {
  font-size: 12px;
  color: #88917e;
  line-height: 1.85;
  margin: 0;
}
.workspace {
  margin-left: 230px;
  width: calc(100% - 230px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  background: #fbfcf7;
}
.topbar-title {
  color: #939a8a;
  font-size: 12px;
  letter-spacing: 1px;
}
.topbar-account {
  display: flex;
  gap: 24px;
  align-items: center;
}
.account-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7eadd;
  border: 1px solid #d5ddc9;
  color: #52664c;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  font:
    14px Georgia,
    serif;
}
.role-tag {
  font-size: 9px;
  color: #8c826b;
}
.logout {
  font-size: 11px;
  color: #87917e;
}
.logout svg {
  width: 15px;
}
.main {
  padding: 40px 48px 46px;
  max-width: 1530px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-heading .muted {
  font-size: 13px;
  margin: 0;
  line-height: 1.8;
}
.page-heading .eyebrow {
  font-size: 9px;
  color: #89917c;
  margin-bottom: 10px;
}
.site-footer {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 18px 20px 26px;
  font-size: 10px;
  color: #9a9f92;
}
.site-footer span {
  color: #afb3a7;
}
/* Learning library */
.welcome-strip {
  border-radius: 16px;
  background: #e9eddf;
  border: 1px solid #e2e7d8;
  min-height: 169px;
  padding: 29px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.welcome-strip .eyebrow {
  font-size: 10px;
  color: #7e8f72;
  letter-spacing: 1px;
}
.welcome-strip h2 {
  font-size: 27px;
  margin-bottom: 9px;
  font-family: Georgia, "Noto Serif SC", serif;
  letter-spacing: 1px;
}
.welcome-strip p {
  font-size: 12px;
  color: #7d8b73;
  margin: 0;
}
.welcome-symbol {
  width: 115px;
  height: 115px;
  border: 1px solid #bac5aa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8d6;
  margin-right: 24px;
  position: relative;
}
.welcome-symbol:before {
  content: "";
  position: absolute;
  inset: -13px;
  border: 1px solid #ced6bf;
  border-radius: 50%;
}
.welcome-symbol svg {
  width: 58px;
  height: 58px;
  color: #7b9070;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  max-width: 100%;
}
.stats-row > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 28px;
  border-right: 1px solid var(--line);
}
.stats-row > div:first-child {
  padding-left: 5px;
}
.stats-row > div:last-child {
  border: 0;
}
.stats-row strong {
  font:
    30px Georgia,
    serif;
  color: #446045;
}
.stats-row span {
  font-size: 12px;
  color: #8a9181;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.segmented {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid transparent;
}
.segment {
  padding: 7px 1px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #91978b;
  background: none;
  font-size: 12px;
}
.segment.selected {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
input.search-input {
  width: 235px;
  font-size: 11px;
  padding: 9px 13px;
  background: #fcfcf9;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.material-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 13px;
  padding: 23px 23px 18px;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.material-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px #2b47300a;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.material-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  background: #edf1e7;
  color: #79936e;
  border-radius: 10px;
}
.material-icon svg {
  width: 22px;
  height: 22px;
}
.material-icon.ochre {
  background: #f7f0e2;
  color: #b69d6d;
}
.material-card .meta {
  letter-spacing: 0.5px;
  font-size: 10px;
  margin-bottom: 8px;
}
.material-card h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.card-date {
  font-size: 10px;
  margin-bottom: 22px;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0e8;
  padding-top: 15px;
  margin-top: auto;
  gap: 12px;
}
.card-bottom .text-link {
  font-size: 12px;
}
.card-bottom .icon-text {
  font-size: 10px;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 65px 22px;
  color: var(--ink);
}
.empty > svg {
  width: 44px;
  height: 44px;
  color: #a0af90;
  margin-bottom: 20px;
}
.empty h2 {
  font-size: 21px;
}
.empty p {
  font-size: 13px;
}
.empty .button {
  margin-top: 10px;
}
/* Import and proofreading */
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 26px;
  align-items: start;
}
.import-form {
  padding: 30px;
}
.import-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.import-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
}
.import-tab.selected {
  background: var(--sage);
  border-color: #bdcbb7;
  color: var(--forest);
}
.import-tab svg {
  width: 20px;
  height: 20px;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.form-footer > span {
  font-size: 11px;
  max-width: 220px;
}
.tip-card {
  padding: 29px 24px;
  background: #edf0e6;
  border: 1px solid #e1e6d7;
  border-radius: 14px;
}
.tip-card .eyebrow {
  font-size: 9px;
}
.tip-card h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 20px;
  margin: 16px 0 24px;
}
.step-tip {
  display: flex;
  gap: 16px;
  margin-bottom: 25px;
}
.step-tip > span {
  font:
    18px Georgia,
    serif;
  color: #99a387;
}
.step-tip strong {
  font-size: 13px;
  font-weight: 600;
}
.step-tip p {
  font-size: 11px;
  line-height: 1.9;
  color: #8a947e;
  margin: 4px 0 0;
}
.tip-card > .fine-print {
  border-top: 1px solid #dbe1d1;
  padding-top: 18px;
  margin-bottom: 0;
  font-size: 11px;
}
.upload-zone {
  border: 1px dashed #c4cdbd;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: #fafbf7;
  margin-bottom: 20px;
}
.upload-zone > svg {
  width: 36px;
  height: 36px;
  color: #91a284;
  margin-bottom: 20px;
}
.upload-zone .field {
  text-align: left;
}
.upload-zone input[type="file"] {
  font-size: 12px;
}
.import-preview {
  max-height: 260px;
  object-fit: contain;
  margin-top: 16px;
}
.draft-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.85fr) minmax(330px, 1.15fr);
  gap: 24px;
  align-items: start;
}
.source-panel {
  position: sticky;
  top: 24px;
  padding: 20px;
  max-height: calc(100vh - 60px);
  overflow: auto;
}
.source-panel h2 {
  font-size: 15px;
}
.original-text {
  font-size: 15px;
  line-height: 2;
  color: #62715b;
  max-height: 65vh;
  overflow: auto;
}
.image-scroll {
  max-height: 65vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.image-stage {
  position: relative;
  line-height: 0;
  width: 100%;
  min-width: 100%;
}
.image-stage.zoomed {
  width: 180%;
}
.image-stage img {
  width: 100%;
  max-width: none;
  display: block;
}
.source-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.source-overlay polygon {
  fill: #60ac712e;
  stroke: #1e7948;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.source-panel .fine-print {
  margin: 12px 0;
}
.draft-unit {
  padding: 21px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.draft-unit.focused {
  border-color: #729469;
  box-shadow: 0 0 0 2px #77936c22;
}
.unit-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.unit-number {
  font:
    22px Georgia,
    serif;
  color: #92a082;
}
.unit-heading select {
  font-size: 11px;
  padding: 6px 10px;
}
.unit-heading .checkbox {
  margin-left: auto;
}
.draft-unit .field {
  margin-bottom: 14px;
  font-size: 11px;
}
.draft-unit textarea {
  font-size: 13px;
}
.draft-unit > .text-link {
  margin: -5px 0 14px;
  font-size: 10px;
}
.unit-tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.unit-tools .small {
  font-size: 10px;
  padding: 5px 8px;
  min-height: 28px;
}
.add-unit {
  width: 100%;
  background: transparent;
  border-style: dashed;
}
.draft-footer {
  position: sticky;
  bottom: 16px;
  background: #fdfefbee;
  border: 1px solid var(--line);
  box-shadow: 0 2px 20px #263e2d11;
  border-radius: 12px;
  padding: 17px 22px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.draft-footer > .muted {
  font-size: 11px;
}
.draft-save-status {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.draft-save-status .error-box {
  margin: 8px 0 0;
}
.proof-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.proof-warning,
.proof-optional {
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.proof-warning summary,
.proof-optional summary,
.proof-more summary {
  cursor: pointer;
  padding: 8px 0;
}
.proof-warning li {
  margin: 8px 0;
}
.proof-unit .unit-heading {
  justify-content: flex-start;
  gap: 12px;
}
.proof-number {
  font-size: 22px;
  color: var(--muted);
}
.proof-review {
  margin-left: auto;
  font-size: 12px;
  color: #915531;
  background: #fbf0df;
  padding: 4px 8px;
  border-radius: 6px;
}
.proof-more {
  font-size: 12px;
  color: var(--muted);
}
.proof-more .field {
  margin-top: 12px;
}
.proof-section {
  font-size: 18px;
  margin: 12px 0;
}
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}
.review-organize-status:empty {
  display: none;
}
.review-organize-status:not(:empty) {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.review-layout.with-source {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.review-list-area {
  min-width: 0;
}
.review-list-area .draft-list {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}
.review-list-area .actions {
  margin-top: 12px;
}
.review-group {
  margin: 0;
  padding: 11px 18px;
  font-size: 14px;
  background: #eef2e9;
  border-bottom: 1px solid var(--line);
}
.review-document-title {
  margin: 0;
  padding: 15px 18px;
  font-size: 17px;
  border-bottom: 1px solid var(--line);
}
.review-speaker {
  font-size: 12px;
  margin-right: 8px;
}
.review-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: start;
  column-gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.review-row:last-child {
  border-bottom: 0;
}
.review-number {
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
}
.review-copy {
  min-width: 0;
}
.review-copy p {
  margin: 0;
  overflow-wrap: anywhere;
}
.review-copy .review-english {
  font-size: 16px;
  line-height: 1.5;
}
.review-copy .review-chinese {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.review-copy .review-pronunciation {
  margin-top: 4px;
  font-size: 12px;
  color: #38614c;
}
.review-pronunciation-settings {
  margin: 10px 0;
  font-size: 12px;
}
.review-pronunciation-settings summary {
  cursor: pointer;
  margin-bottom: 8px;
}
.review-flag {
  font-size: 11px;
  color: #8b5a32;
  padding-top: 4px;
}
.review-edit {
  grid-column: 4;
  padding: 3px 0;
  font-size: 12px;
  white-space: nowrap;
}
.review-inline-editor {
  grid-column: 2 / -1;
  margin-top: 10px;
}
.review-inline-editor .field {
  margin-bottom: 10px;
  font-size: 12px;
}
.review-inline-editor textarea {
  padding: 8px 10px;
  min-height: 40px;
  font-size: 15px;
}
.review-notes {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.review-notes summary {
  cursor: pointer;
}
.review-extra {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.review-extra > summary {
  cursor: pointer;
  padding: 8px 0;
}
.review-extra > details,
.review-extra > div {
  margin: 14px 0;
}
.review-footer .actions {
  flex-wrap: nowrap;
}
@media (max-width: 760px) {
  .review-layout.with-source {
    grid-template-columns: minmax(0, 1fr);
  }
  .review-layout .source-panel {
    position: static;
  }
  .review-row {
    padding: 11px 12px;
    column-gap: 8px;
    grid-template-columns: 22px minmax(0, 1fr) auto auto;
  }
  .review-copy .review-english {
    font-size: 15px;
  }
  .review-flag {
    font-size: 10px;
  }
  .review-footer .draft-save-status {
    width: 100%;
  }
}
/* Listening and speaking */
.study-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.study-sidebar {
  padding: 21px 0;
  overflow: hidden;
}
.study-sidebar > .section-heading {
  padding: 0 20px;
}
.study-sidebar h2 {
  font-size: 14px;
}
.study-sidebar strong {
  font-size: 11px;
  color: #8c9583;
  font-weight: 400;
}
.study-sidebar progress {
  display: block;
  width: calc(100% - 40px);
  height: 4px;
  margin: 0 20px 20px;
  accent-color: #7c9870;
}
.study-unit-list {
  max-height: 62vh;
  overflow: auto;
}
.study-unit {
  display: flex;
  gap: 12px;
  text-align: left;
  padding: 14px 17px;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  width: 100%;
  font-size: 12px;
  color: #88907e;
  line-height: 1.8;
}
.study-unit span:last-child {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.study-unit .list-number {
  font:
    12px Georgia,
    serif;
  padding-top: 4px;
  color: #a1aa95;
}
.study-unit.active {
  background: #ecf1e5;
  border-left-color: #68855c;
  color: #35513b;
}
.practice-card {
  padding: 28px 32px 20px;
}
.practice-card > .section-heading > .eyebrow {
  font-size: 10px;
}
.practice-card select {
  font-size: 11px;
  padding: 7px 10px;
}
.sentence {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.65;
  letter-spacing: -0.4px;
  padding: 25px 0 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 135px;
}
.word {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  padding: 0;
  border-radius: 3px;
  line-height: inherit;
  display: inline;
}
.word:hover {
  background: #edf0df;
}
.word.word-selected {
  background: #e7ebc9;
  box-shadow: 0 2px 0 #c1cb89;
}
.hidden-sentence {
  font-family: inherit;
  font-size: 19px;
  color: #a1a995;
  letter-spacing: 0;
}
.translation {
  color: #7b8573;
  font-size: 13px;
  line-height: 1.9;
  min-height: 25px;
}
.translation p {
  margin-bottom: 8px;
}
.translation .annotation {
  font-size: 11px;
}
.sentence-options {
  display: flex;
  gap: 17px;
  align-items: center;
  margin-top: 16px;
}
.sentence-options .icon-text {
  font-size: 11px;
  color: #96a088;
}
.sentence-options .checkbox {
  margin-left: auto;
  font-size: 11px;
  color: #839078;
}
.practice-steps {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 24px 0 17px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #96a28c;
}
.play-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.play-controls .button {
  flex: 1;
  font-size: 12px;
  padding: 12px;
  min-height: 48px;
}
.play-controls svg {
  width: 17px;
  height: 17px;
}
.record-button {
  background: #faf4e9;
  border-color: #e8dbc2;
  color: #9b7c4a;
}
.record-button.recording {
  background: #aa4d3e;
  color: white;
  border-color: #aa4d3e;
  animation: record-pulse 1.5s infinite;
}
.secondary-controls {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 22px 0 5px;
}
.secondary-controls .text-link {
  font-size: 11px;
  font-weight: 400;
}
.play-status {
  font-size: 12px;
  color: #74856b;
  text-align: center;
  margin: 18px 0 8px;
  min-height: 20px;
}
.practice-card > .fine-print {
  text-align: center;
  font-size: 10px;
  margin-bottom: 24px;
}
.learning-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.state-label {
  font-size: 10px;
  color: #89977c;
}
.sentence-navigation {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
}
.unit-recordings h3 {
  font-size: 14px;
}
.unit-recordings .section-heading .muted {
  font-size: 10px;
}
.unit-recordings > p {
  font-size: 12px;
  margin-bottom: 0;
}
.record-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #edf0e8;
}
.record-row > div {
  flex: 1;
}
.record-row strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.record-row small {
  display: block;
  font-size: 10px;
}
.word-picker {
  background: #f3f5ea;
  border: 1px solid #dfe6ce;
  padding: 19px;
  border-radius: 11px;
  margin-top: 20px;
}
.word-picker h3 {
  font:
    22px Georgia,
    serif;
  margin: 0;
}
.word-picker .section-heading {
  margin-bottom: 10px;
}
.dictionary-definition {
  font-size: 12px;
  white-space: pre-wrap;
  color: #718066;
  line-height: 1.8;
}
.word-picker input {
  font-size: 12px;
  margin-bottom: 13px;
}
.share-panel {
  margin-top: 24px;
}
.share-panel summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.share-panel > p {
  font-size: 12px;
  margin-top: 16px;
}
.inline-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
}
.inline-form input {
  min-width: 0;
}
.share-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.share-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--sage);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
}
/* Vocabulary, recordings and settings */
.vocabulary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.vocab-card h2 {
  font:
    27px Georgia,
    serif;
  overflow-wrap: anywhere;
}
.vocab-card .field {
  font-size: 11px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.vocab-card textarea,
.vocab-card input {
  font-size: 12px;
}
.vocab-card .fine-print {
  font-size: 10px;
}
.vocab-card > .text-link {
  margin-bottom: 18px;
}
.vocab-card details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
}
.vocab-card summary {
  cursor: pointer;
  color: #6a7f5d;
}
.vocab-context {
  border-left: 2px solid #d8dfc7;
  padding: 3px 0 4px 13px;
  margin: 19px 0;
}
.vocab-context > p {
  font:
    17px/1.7 Georgia,
    serif;
  margin-bottom: 8px;
}
.vocab-context > small {
  font-size: 10px;
}
.vocab-context .field {
  margin-bottom: 8px;
}
.vocab-card .card-bottom {
  margin-top: 0;
}
.recordings-list {
  margin-top: 20px;
}
.main > section.panel {
  margin-bottom: 22px;
}
.recording-card {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.recording-card:first-child {
  border-top: 0;
  padding-top: 0;
}
.recording-card:last-child {
  padding-bottom: 0;
}
.recording-card .meta {
  font-size: 10px;
  letter-spacing: 0.3px;
}
.recording-text {
  font:
    21px/1.7 Georgia,
    serif;
  margin-bottom: 16px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.settings-grid h2 {
  margin-bottom: 24px;
}
.settings-grid p {
  font-size: 12px;
}
.account-info {
  display: grid;
  grid-template-columns: 80px 1fr;
  font-size: 13px;
  gap: 18px;
  margin: 25px 0 32px;
}
.account-info dt {
  color: var(--muted);
}
.account-info dd {
  margin: 0;
}
.admin-section {
  margin-top: 25px;
}
.admin-section > p {
  font-size: 12px;
}
.account-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px 60px;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  align-items: center;
}
.account-row .badge {
  justify-self: start;
}
.account-create {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
  align-items: end;
}
.account-create .field {
  margin: 0;
}
.account-create .error-box {
  grid-column: 1/-1;
}
.account-create > .button {
  justify-self: start;
}
/* Sign in */
.login-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #e9eddf;
  padding: 42px 56px 28px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #dfe4d4;
  overflow: hidden;
}
.login-copy {
  margin: auto 0;
  padding: 68px 15px 40px;
}
.login-copy > .eyebrow {
  font-size: 9px;
  color: #8c997e;
  letter-spacing: 2.3px;
  margin-bottom: 24px;
}
.login-copy h1 {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.login-copy > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 2.1;
  color: #8a977c;
}
.quote-art {
  margin: 55px 0 0 16px;
  position: relative;
  border-left: 1px solid #bfccb0;
  padding: 16px 28px 10px;
}
.quote-art .quote-mark {
  font:
    70px Georgia,
    serif;
  color: #b7c4a8;
  position: absolute;
  top: -26px;
  left: 19px;
  line-height: 1;
}
.quote-art p {
  font:
    italic 24px/1.65 Georgia,
    serif;
  color: #7e926e;
  letter-spacing: 0.3px;
  margin: 0;
}
.sound-wave {
  display: flex;
  gap: 4px;
  height: 30px;
  align-items: center;
  margin: 18px 0 5px;
}
.sound-wave i {
  display: block;
  width: 3px;
  background: #adbc9c;
  border-radius: 2px;
}
.bar-0 {
  height: 7px;
}
.bar-1 {
  height: 15px;
}
.bar-2 {
  height: 23px;
}
.bar-3 {
  height: 29px;
}
.bar-4 {
  height: 17px;
}
.bar-5 {
  height: 24px;
}
.bar-6 {
  height: 12px;
}
.login-footnote {
  color: #9ba78f;
  font-size: 10px;
  margin: 0 15px;
  letter-spacing: 2px;
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 55px;
  background: #fcfcf8;
}
.login-form {
  width: 100%;
  max-width: 355px;
}
.login-form > .eyebrow {
  font-size: 9px;
  color: #98a08e;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.login-form h2 {
  font-size: 27px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.1px;
}
.login-form > .muted {
  font-size: 12px;
  margin-bottom: 37px;
}
.login-form .field {
  font-size: 12px;
  margin-bottom: 23px;
  gap: 10px;
}
.login-form input {
  min-height: 47px;
  background: #fff;
  font-size: 12px;
}
.login-submit {
  width: 100%;
  margin-top: 9px;
  min-height: 48px;
  justify-content: space-between;
  padding: 12px 17px;
}
.login-form > .fine-print {
  font-size: 10px;
  line-height: 1.9;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
  color: #a3a998;
}
@keyframes record-pulse {
  50% {
    box-shadow: 0 0 0 5px #a33d3218;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media (min-width: 1600px) {
  .main {
    padding-left: 64px;
    padding-right: 64px;
  }
  .material-grid {
    gap: 26px;
  }
  .material-card {
    padding: 28px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 205px;
    padding: 28px 17px;
  }
  .workspace {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  .main {
    padding: 32px 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .study-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
  }
  .practice-card {
    padding: 23px;
  }
  .sentence {
    font-size: 29px;
  }
  .import-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 20px;
  }
  .draft-layout {
    gap: 18px;
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  }
  .draft-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .draft-footer .actions {
    justify-content: flex-end;
  }
  .account-create {
    grid-template-columns: 1fr 1fr;
  }
  .page-heading h1 {
    font-size: 27px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: 170px;
    padding: 25px 12px;
  }
  .sidebar .brand {
    gap: 8px;
  }
  .sidebar .brand img {
    width: 34px;
    height: 34px;
  }
  .sidebar .brand strong {
    font-size: 17px;
  }
  .sidebar .brand small {
    font-size: 6px;
  }
  .nav-item {
    font-size: 12px;
    padding: 12px 10px;
    gap: 10px;
  }
  .workspace {
    margin-left: 170px;
    width: calc(100% - 170px);
  }
  .topbar {
    padding: 0 22px;
    height: 70px;
  }
  .topbar-title {
    display: none;
  }
  .topbar-account {
    margin-left: auto;
  }
  .main {
    padding: 28px 22px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }
  .welcome-strip {
    padding: 25px;
  }
  .welcome-symbol {
    width: 76px;
    height: 76px;
    margin-right: 8px;
  }
  .welcome-symbol svg {
    width: 40px;
    height: 40px;
  }
  .welcome-strip h2 {
    font-size: 24px;
  }
  .welcome-strip p {
    max-width: 230px;
    line-height: 1.8;
  }
  .welcome-strip .eyebrow {
    font-size: 9px;
  }
  .stats-row > div {
    gap: 9px;
    padding-left: 15px;
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-row strong {
    font-size: 25px;
  }
  .stats-row span {
    font-size: 10px;
  }
  .list-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 14px;
  }
  .segmented {
    gap: 20px;
  }
  input.search-input {
    width: 100%;
  }
  .material-grid {
    gap: 14px;
  }
  .material-card {
    padding: 20px;
    min-height: 260px;
  }
  .import-layout {
    grid-template-columns: 1fr;
  }
  .tip-card {
    display: none;
  }
  .study-layout {
    grid-template-columns: 1fr;
  }
  .study-sidebar {
    padding: 15px;
  }
  .study-sidebar > .section-heading {
    padding: 0;
  }
  .study-sidebar progress {
    width: 100%;
    margin: 0 0 14px;
  }
  .study-unit-list {
    display: flex;
    gap: 8px;
    max-height: 100px;
  }
  .study-unit {
    min-width: 145px;
    max-width: 200px;
    flex-shrink: 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 11px;
  }
  .study-unit.active {
    border-bottom-color: #7d956c;
  }
  .study-unit span:last-child {
    -webkit-line-clamp: 2;
  }
  .study-sidebar .section-heading {
    margin-bottom: 12px;
  }
  .draft-layout {
    grid-template-columns: 1fr;
  }
  .source-panel {
    position: relative;
    top: auto;
    max-height: none;
  }
  .image-scroll {
    max-height: 330px;
  }
  .original-text {
    max-height: 200px;
  }
  .vocabulary-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 32px;
  }
  .login-copy {
    padding: 40px 0;
  }
  .login-copy h1 {
    font-size: 36px;
  }
  .login-form-wrap {
    padding: 45px 30px;
  }
  .login-form h2 {
    font-size: 23px;
  }
  .quote-art {
    padding: 16px 20px;
  }
  .quote-art p {
    font-size: 20px;
  }
}
@media (max-width: 600px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    padding: 18px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand img {
    width: 35px;
    height: 35px;
  }
  .sidebar .brand strong {
    font-size: 18px;
  }
  .sidebar .brand small {
    font-size: 6px;
    letter-spacing: 1.8px;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-between;
    margin-top: 17px;
    gap: 2px;
  }
  .nav-item {
    font-size: 11px;
    gap: 6px;
    padding: 10px 7px;
    margin: 0;
    border-radius: 6px 6px 0 0;
    justify-content: center;
  }
  .nav-item svg {
    width: 15px;
    height: 15px;
  }
  .workspace {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 52px;
    padding: 0 20px;
    background: #f8faf3;
  }
  .account-link {
    font-size: 10px;
  }
  .avatar {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }
  .topbar-account {
    gap: 16px;
  }
  .logout {
    font-size: 10px;
  }
  .role-tag {
    font-size: 8px;
  }
  .main {
    padding: 26px 18px 30px;
  }
  .page-heading {
    gap: 16px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .page-heading .muted {
    font-size: 11px;
  }
  .page-heading > .actions {
    width: 100%;
  }
  .page-heading .button {
    font-size: 11px;
    padding: 9px 13px;
    min-height: 38px;
  }
  .welcome-strip {
    padding: 22px 20px;
    min-height: 150px;
  }
  .welcome-strip h2 {
    font-size: 23px;
  }
  .welcome-strip p {
    font-size: 10px;
    max-width: 220px;
  }
  .welcome-symbol {
    width: 57px;
    height: 57px;
    margin-left: 18px;
    margin-right: 0;
    flex-shrink: 0;
  }
  .welcome-symbol:before {
    inset: -8px;
  }
  .welcome-symbol svg {
    width: 30px;
    height: 30px;
  }
  .stats-row {
    padding: 19px 0;
    margin-bottom: 19px;
  }
  .stats-row > div {
    gap: 3px;
    padding-left: 18px;
  }
  .stats-row strong {
    font-size: 25px;
  }
  .segmented {
    gap: 24px;
  }
  .segment {
    font-size: 11px;
  }
  .material-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .material-card {
    min-height: 235px;
    padding: 22px;
  }
  .material-card h2 {
    font-size: 18px;
  }
  .card-top {
    margin-bottom: 17px;
  }
  .card-date {
    margin-bottom: 17px;
  }
  .material-card .meta {
    font-size: 10px;
  }
  .panel {
    padding: 21px;
  }
  .import-tabs {
    gap: 10px;
  }
  .import-tab {
    padding: 10px 15px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
  }
  .import-form {
    padding: 21px;
  }
  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .form-footer > span {
    max-width: none;
  }
  .field {
    font-size: 12px;
  }
  .field input,
  .field textarea {
    font-size: 13px;
  }
  .source-panel {
    padding: 18px;
  }
  .draft-unit {
    padding: 18px;
  }
  .unit-heading {
    gap: 10px;
  }
  .unit-heading .checkbox {
    font-size: 11px;
  }
  .draft-footer {
    padding: 14px;
    bottom: 8px;
  }
  .draft-footer > .muted {
    font-size: 10px;
  }
  .draft-footer .button {
    flex: 1;
    font-size: 11px;
    padding: 9px 8px;
  }
  .sentence {
    font-size: 28px;
    min-height: 120px;
    padding-top: 20px;
  }
  .practice-card {
    padding: 22px 19px 18px;
  }
  .practice-card .section-heading {
    gap: 9px;
  }
  .practice-card .section-heading .eyebrow {
    font-size: 8px;
  }
  .practice-card select {
    font-size: 10px;
    padding: 6px 8px;
  }
  .play-controls {
    gap: 7px;
  }
  .play-controls .button {
    font-size: 10px;
    padding: 11px 7px;
    gap: 5px;
  }
  .play-controls svg {
    width: 14px;
    height: 14px;
  }
  .secondary-controls {
    gap: 20px;
  }
  .secondary-controls .text-link {
    font-size: 10px;
  }
  .practice-steps {
    font-size: 9px;
    margin-top: 22px;
  }
  .sentence-options {
    gap: 13px;
  }
  .sentence-options .icon-text,
  .sentence-options .checkbox {
    font-size: 10px;
  }
  .unit-recordings .section-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .record-row {
    gap: 10px;
  }
  .record-row .button {
    padding: 6px 9px;
    font-size: 10px;
  }
  .state-label {
    font-size: 9px;
  }
  .learning-state .button {
    font-size: 10px;
    padding: 6px 9px;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form input {
    flex: 1;
    min-width: 170px;
  }
  .recording-text {
    font-size: 19px;
  }
  .recording-card .actions {
    gap: 9px;
  }
  .recording-card .button {
    font-size: 10px;
    padding: 6px 10px;
  }
  .account-row {
    grid-template-columns: 1fr 70px 65px;
    gap: 10px;
    font-size: 10px;
  }
  .account-row > span:nth-child(2) {
    display: none;
  }
  .account-create {
    grid-template-columns: 1fr;
  }
  .account-create .button {
    width: 100%;
  }
  .admin-section .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .admin-section h2 {
    font-size: 17px;
  }
  .admin-section .text-link {
    font-size: 11px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px 26px 27px;
    border-right: 0;
    border-bottom: 1px solid #dfe4d4;
  }
  .login-story .brand img {
    width: 38px;
    height: 38px;
  }
  .login-story .brand strong {
    font-size: 18px;
  }
  .login-copy {
    padding: 36px 0 0;
  }
  .login-copy > .eyebrow {
    font-size: 7px;
    margin-bottom: 14px;
  }
  .login-copy h1 {
    font-size: 32px;
    letter-spacing: 1px;
    line-height: 1.5;
    margin-bottom: 15px;
  }
  .login-copy > p:not(.eyebrow) {
    font-size: 11px;
    line-height: 1.9;
    margin-bottom: 0;
  }
  .quote-art,
  .login-footnote {
    display: none;
  }
  .login-form-wrap {
    padding: 34px 27px 40px;
  }
  .login-form {
    max-width: none;
  }
  .login-form > .eyebrow {
    font-size: 8px;
    margin-bottom: 12px;
  }
  .login-form h2 {
    font-size: 23px;
  }
  .login-form > .muted {
    font-size: 11px;
    margin-bottom: 26px;
  }
  .login-form .field {
    margin-bottom: 20px;
  }
  .login-form input {
    font-size: 13px;
  }
  .login-form > .fine-print {
    margin-top: 23px;
  }
  .site-footer {
    font-size: 9px;
    gap: 10px;
  }
}

.segmented {
  flex-shrink: 0;
}
.segment {
  white-space: nowrap;
}
input.search-input {
  max-width: 235px;
}
@media (max-width: 850px) {
  input.search-input {
    max-width: none;
  }
}

/* Canonical documents retain context beside sentence practice. */
.ai-panel,
.model-card,
.full-document {
  margin-bottom: 22px;
}
.ai-panel > button,
.ai-panel > div > button,
.model-card > button {
  margin: 5px 10px 8px 0;
}
.ai-panel details {
  margin: 18px 0;
}
.document-block {
  padding: 15px 0;
  border-bottom: 1px solid var(--line, #dce3d7);
  overflow-wrap: anywhere;
}
.document-block:last-child {
  border-bottom: 0;
}
.document-meta {
  font-size: 11px;
  color: var(--muted, #758077);
  letter-spacing: 0.04em;
}
.document-block h3 {
  margin: 8px 0;
}
.document-english {
  white-space: pre-wrap;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.85;
  margin: 8px 0;
}
.document-chinese,
.document-note {
  white-space: pre-wrap;
  line-height: 1.85;
  margin: 5px 0;
  color: #687369;
}
.document-note {
  font-size: 13px;
}
.depth-1 {
  margin-left: 12px;
}
.depth-2,
.depth-3,
.depth-4 {
  margin-left: 24px;
}
.structure-block select {
  max-width: 100%;
}
.structure-block .unit-heading {
  flex-wrap: wrap;
}
.structure-block .inline-form > .field {
  flex: 1;
  min-width: 0;
}
.practice-override {
  padding: 18px 0;
  border-top: 1px solid #dce3d7;
}
.practice-override > p {
  font-family: Georgia, serif;
  font-size: 20px;
}
.key-settings {
  border-top: 1px solid #dce3d7;
  border-bottom: 1px solid #dce3d7;
  padding: 20px 0;
  margin: 20px 0;
}
.key-settings > button {
  margin-right: 12px;
}
.binding-row {
  padding: 18px 0;
  border-top: 1px solid #dce3d7;
}
.model-card .settings-grid {
  gap: 0 24px;
}
.full-document summary,
.ai-panel summary {
  font-size: 16px;
}
@media (max-width: 600px) {
  .document-english {
    font-size: 18px;
  }
  .depth-1 {
    margin-left: 5px;
  }
  .depth-2,
  .depth-3,
  .depth-4 {
    margin-left: 10px;
  }
  .structure-block .unit-heading select {
    width: 100%;
  }
  .structure-block .inline-form {
    flex-wrap: wrap;
  }
}
