/* Authenticated workspace shell: vertical step rail + content canvas. */
body[data-shell='app'] { min-height: 100vh; }

.app-shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
}

.rail {
  position: sticky; top: 0; height: 100vh;
  border-inline-end: 1px solid var(--line);
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-4) 0;
}
.rail__brand { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); margin-bottom: var(--s-4); }
.rail__brand svg, .rail__brand img { width: 28px; height: 28px; object-fit: contain; }
.rail__step {
  position: relative;
  width: 56px; height: 48px; border-radius: var(--r-md);
  display: grid; grid-template-rows: auto auto; place-items: center; align-content: center; gap: 2px;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: var(--size-xs); font-weight: 600;
  border: 1px solid transparent;
  transition: color var(--t-state) var(--ease), background var(--t-state) var(--ease), border-color var(--t-state) var(--ease);
}
.rail__step:hover { color: var(--ink); border-color: var(--line); }
.rail__step[aria-current='step'] { background: var(--pine); color: var(--pine-ink); border-color: var(--pine); }
.rail__step[data-done='true'] { color: var(--ok); }
.rail__foot { margin-top: auto; display: grid; gap: var(--s-2); justify-items: center; }
.rail__avatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: var(--size-xs); color: var(--ink-2); text-decoration: none; }
.rail__lang { writing-mode: horizontal-tb; font-size: 11px; font-weight: 700; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 8px; }

/* Mobile: rail collapses to a top progress bar */
@media (max-width: 820px) {
  .rail { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; padding: var(--s-2) var(--s-3); gap: var(--s-1); border-inline-end: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .rail__brand { margin: 0; margin-inline-end: var(--s-2); width: 32px; height: 32px; }
  .rail__step { width: 36px; height: 36px; flex: 0 0 auto; }
  .rail__label { display: none; }
  .rail__foot { margin: 0; margin-inline-start: auto; display: flex; gap: var(--s-2); }
}

.canvas { min-width: 0; display: flex; flex-direction: column; }
.canvas__bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(6px);
}
.canvas__bar h1 { font-size: clamp(22px, 2.2vw, 30px); }
.canvas__actions { margin-inline-start: auto; display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.canvas__body { padding: var(--s-6); display: grid; gap: var(--s-5); max-width: 1180px; width: 100%; }
@media (max-width: 820px) { .canvas__body { padding: var(--s-4); } .canvas__bar { padding: var(--s-3) var(--s-4); } }

/* Brief: three-step guided composer (topic → length → language) */
.flow { width: min(100%, 880px); margin-inline: auto; display: grid; gap: var(--s-5); }
.flow-steps { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.flow-steps li { display: flex; align-items: center; gap: var(--s-3); }
.flow-steps li + li::before { content: ''; width: clamp(18px, 5vw, 56px); height: 1px; background: var(--line); }
.flow-step { display: inline-flex; align-items: center; gap: var(--s-2); border: 0; background: none; padding: 0; color: var(--muted); font-size: var(--size-sm); cursor: pointer; }
.flow-step:hover { color: var(--ink); }
.flow-step__no { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; font-size: var(--size-xs); font-weight: 700; }
.flow-step[aria-current='step'] { color: var(--ink); font-weight: 600; }
.flow-step[aria-current='step'] .flow-step__no { background: var(--pine); border-color: var(--pine); color: var(--pine-ink); }
.flow-step[data-done='true'] .flow-step__no { border-color: var(--pine); color: var(--pine); }
.flow-panel { display: grid; gap: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-6); animation: flow-in var(--t-route) var(--ease); }
.flow-panel__head { display: grid; gap: var(--s-2); }
.flow-panel__head h2 { font-size: clamp(24px, 3vw, 34px); }
@keyframes flow-in { from { opacity: 0; transform: translateY(8px); } }
.flow-title { min-height: 76px; font-size: var(--size-lg); line-height: 1.45; }
.flow-count { justify-self: end; }
.flow-more { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.flow-more > summary { display: flex; justify-content: space-between; gap: var(--s-3); cursor: pointer; font-size: var(--size-sm); font-weight: 600; list-style: none; }
.flow-more > summary::-webkit-details-marker { display: none; }
.flow-more__mark { color: var(--muted); transition: transform var(--t-state) var(--ease); }
.flow-more[open] .flow-more__mark { transform: rotate(45deg); }
.flow-more__body { display: grid; gap: var(--s-4); padding-top: var(--s-4); }
.flow-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.choice { position: relative; display: grid; gap: 2px; text-align: start; padding: var(--s-4); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); cursor: pointer; transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease); }
.choice:hover { border-color: var(--pine); }
.choice[aria-pressed='true'] { background: var(--pine-soft); border-color: var(--pine); }
.choice b { font-size: var(--size-base); font-variant-numeric: tabular-nums; }
.choice small { font-size: var(--size-xs); color: var(--muted); }
.choice__badge { position: absolute; top: -10px; inset-inline-end: var(--s-3); padding: 1px 8px; border-radius: var(--r-pill); background: var(--ochre); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.flow-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-2); max-height: 296px; overflow: auto; padding: 2px; }
.choice--lang { display: flex; align-items: center; gap: var(--s-2); padding: 9px 12px; background: var(--surface); }
.choice__name { display: grid; gap: 0; min-width: 0; }
.choice__name b { font-size: var(--size-sm); }
.choice__name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-2); }
.choice--addon { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface); }
.choice--addon input { accent-color: var(--pine); }
.choice--addon:has(input:checked) { background: var(--pine-soft); border-color: var(--pine); }
.flow-review { display: grid; gap: 2px; padding: var(--s-4) var(--s-5); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.flow-review h3 { font-size: var(--size-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.flow-review__row { display: flex; justify-content: space-between; gap: var(--s-4); padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: var(--size-sm); }
.flow-review__row:last-child { border-bottom: 0; }
.flow-review__row b { max-width: 70%; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-bar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) 0; background: color-mix(in srgb, var(--canvas) 94%, transparent); backdrop-filter: blur(6px); }
.flow-bar__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.flow-bar__meta b { font-size: var(--size-sm); }
.flow-bar__actions { display: flex; gap: var(--s-2); margin-inline-start: auto; }
@media (max-width: 640px) {
  .flow-panel { padding: var(--s-4); }
  .flow-steps li + li::before { width: 12px; }
  .flow-step__label { display: none; }
  .flow-bar__meta { order: 2; width: 100%; }
  .flow-bar__actions { width: 100%; }
  .flow-bar__actions .btn { flex: 1; }
}
.summary-card { position: sticky; top: 88px; display: grid; gap: var(--s-3); }
.summary-row { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--size-sm); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary-row:last-of-type { border-bottom: 0; }
.summary-row b { font-weight: 700; }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--r-md);
  padding: var(--s-5); text-align: center; background: var(--surface-2);
  transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease);
  cursor: pointer;
}
.dropzone[data-active='true'] { border-color: var(--pine); background: var(--pine-soft); }
.dropzone strong { display: block; margin-bottom: 4px; }
.file-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

/* Outline: editable tree + diagnosis */
.outline-grid { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 1080px) { .outline-grid { grid-template-columns: 1fr; } }
.tree { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.tree__chapter { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tree__chapter > .tree__row { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.tree__row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-2); align-items: center; }
.tree__no { font-family: var(--font-mono); font-size: var(--size-xs); color: var(--terra); font-weight: 600; }
.tree__title { border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; padding: 4px 6px; width: 100%; font-weight: 600; }
.tree__title:hover { border-color: var(--line); background: var(--surface-2); }
.tree__title:focus { border-color: var(--pine); background: var(--surface); }
.tree__sections { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-3) var(--s-6); display: grid; gap: 6px; }
.tree__section { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-2); align-items: center; }
.tree__handle { cursor: grab; color: var(--muted); border: 0; background: transparent; padding: 2px; }
.tree__subs { list-style: none; margin: 2px 0 0; padding-inline-start: var(--s-5); display: grid; gap: 2px; font-size: var(--size-sm); color: var(--ink-2); }
.budget { display: grid; gap: 6px; font-size: var(--size-sm); }
.budget__bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; display: flex; }
.budget__bar i { display: block; height: 100%; }

/* Checkout: receipt two-column */
.checkout-grid { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; }
@media (max-width: 1080px) { .checkout-grid { grid-template-columns: 1fr; } }
.receipt { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.receipt__head { padding: var(--s-4) var(--s-5); border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.receipt__lines { padding: var(--s-4) var(--s-5); display: grid; gap: 2px; }
.receipt__line { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--size-sm); padding: 7px 0; }
.receipt__line--total { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-3); font-weight: 700; font-size: var(--size-base); }
.receipt__foot { padding: var(--s-3) var(--s-5) var(--s-4); background: var(--surface-2); font-size: var(--size-xs); color: var(--muted); }
.pay-panel { display: grid; gap: var(--s-4); }
.pay-method { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: var(--s-4); display: grid; gap: var(--s-3); }
.pay-method--primary { border-color: var(--pine); }
/* 余额不足时购买区排在最前，用浅松绿底把点数包推成主动作。 */
.pay-method--buy { border-color: var(--pine); background: var(--pine-soft); }
.pay-method__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.paypal-slot { min-height: 48px; }
.pack-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, 1fr); }
.pack {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: var(--s-3); cursor: pointer; display: grid; gap: 2px; text-align: start;
  transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease);
}
.pack:hover { border-color: var(--pine); }
.pack[aria-pressed='true'] { border-color: var(--pine); background: var(--pine-soft); }
.pack b { font-family: var(--font-mono); font-size: var(--size-base); }
/* 点数包既是价格也是购买按钮：卡片底部再写一行“购买”，点击意图才明确。 */
.pack--buy { align-content: start; }
.pack__cta { margin-top: 2px; font-size: var(--size-xs); font-weight: 700; color: var(--pine); }
.pack--buy:hover .pack__cta { text-decoration: underline; }
details.collapse { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
details.collapse > summary { cursor: pointer; padding: var(--s-3) var(--s-4); font-size: var(--size-sm); font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > .collapse__body { padding: 0 var(--s-4) var(--s-4); display: grid; gap: var(--s-2); }

/* Generating: full-bleed stage timeline */
.gen-stage { display: grid; gap: var(--s-5); place-items: center; padding: var(--s-8) var(--s-4); text-align: center; }
.gen-stage h2 { max-width: 24ch; }
.gen-meter { width: min(560px, 100%); display: grid; gap: var(--s-2); }
.gen-timeline { width: min(560px, 100%); display: grid; gap: var(--s-3); text-align: start; margin-top: var(--s-4); }
.gen-timeline li { list-style: none; display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start; font-size: var(--size-sm); color: var(--muted); }
.gen-timeline li[data-state='active'] { color: var(--ink); font-weight: 600; }
.gen-timeline li[data-state='done'] { color: var(--ok); }
.gen-timeline .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; margin-top: 5px; }
.gen-timeline li[data-state='done'] .dot { background: currentColor; }

/* Draft: document canvas + outline tree + report tab */
.draft-grid { display: grid; gap: var(--s-5); grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.canvas__body > *, .stack > *, .draft-grid > * { min-width: 0; }
@media (max-width: 1080px) { .draft-grid { grid-template-columns: 1fr; } }
.doc-toc { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: var(--s-3); max-height: calc(100vh - 120px); overflow: auto; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--size-sm); }
.doc-toc a { display: block; padding: 5px 8px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; }
.doc-toc a:hover { background: var(--surface-2); color: var(--ink); }
.doc-toc .toc__l1 { font-weight: 600; margin-top: var(--s-2); }
.doc-toc .toc__l2 { padding-inline-start: var(--s-5); font-size: var(--size-xs); }
.doc-sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(24px, 4vw, 56px);
  font-family: var(--font-display);
  font-size: 17px; line-height: 1.9; color: var(--ink);
}
.doc-sheet h2 { font-size: 24px; margin: var(--s-6) 0 var(--s-3); }
.doc-sheet figure { overflow-x: auto; max-width: 100%; }
.doc-sheet h3 { font-size: 19px; margin: var(--s-5) 0 var(--s-2); font-family: var(--font-display); }
.doc-sheet p { text-indent: 2em; margin-bottom: var(--s-3); }
.doc-sheet p.no-indent, .doc-sheet li p { text-indent: 0; }
/* 可编辑段落：悬停浮出“编辑本段”徽标，编辑中给一圈柔和的双层描边。 */
.doc-sheet p[data-pid] { position: relative; cursor: text; border-radius: 8px; }
.doc-sheet p[data-pid]:hover,
.doc-sheet p[data-pid]:focus-visible {
  outline: 1px dashed color-mix(in srgb, var(--pine) 40%, transparent);
  outline-offset: 5px;
}
.doc-sheet p[data-pid]::after {
  content: "✎  " attr(data-hint);
  position: absolute;
  top: -17px;
  inset-inline-end: 2px;
  z-index: 3;
  padding: 3px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .03em;
  color: var(--pine-ink);
  background: var(--pine);
  border-radius: var(--r-pill);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pine) 30%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--pine-ink) 24%, transparent);
  opacity: 0;
  transform: translateY(-3px) scale(.94);
  transform-origin: 50% 100%;
  transition: opacity .16s ease, transform .18s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}
.doc-sheet p[data-pid]:hover::after,
.doc-sheet p[data-pid]:focus-visible::after { opacity: 1; transform: translateY(0) scale(1); }
.doc-sheet p[data-pid].is-editing {
  outline: none;
  background: color-mix(in srgb, var(--pine) 6%, transparent);
  box-shadow: 0 0 0 2px var(--pine), 0 0 0 7px color-mix(in srgb, var(--pine) 10%, transparent);
  caret-color: var(--pine);
}
.doc-sheet p[data-pid].is-editing::after { display: none; }
/* 触屏没有悬停：摘要段常显提示，手机端也能发现整段编辑入口。 */
@media (hover: none) {
  .doc-sheet .abstract p[data-pid] { outline: 1px dashed color-mix(in srgb, var(--pine) 32%, transparent); outline-offset: 5px; }
  .doc-sheet .abstract p[data-pid]::after { opacity: 1; transform: none; }
  .doc-sheet .abstract p[data-pid].is-editing { outline: none; }
}
/* 编辑中的段落：浮在段落上方的 AI 改写 / 还原原文工具条。 */
.para-tools {
  position: fixed;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--pine) 18%, var(--line));
  border-radius: var(--r-pill);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--pine) 18%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--pine-ink) 55%, transparent);
}
.para-tools[hidden] { display: none; }
.para-tools .btn { min-height: 30px; padding: 0 11px; border-radius: var(--r-pill); }
.para-tools .btn:active { transform: none; }
.para-tools .btn[hidden] { display: none; }
.doc-sheet .doc-title { font-size: clamp(24px, 3vw, 34px); text-align: center; text-indent: 0; margin: var(--s-5) 0; }
.doc-sheet .doc-meta { text-align: center; font-size: var(--size-sm); color: var(--muted); text-indent: 0; font-family: var(--font-sans); }
.doc-sheet .abstract { background: var(--surface-2); border-inline-start: 3px solid var(--pine); padding: var(--s-4); font-size: 15px; }
.doc-sheet .abstract p { text-indent: 0; }
.doc-sheet ul, .doc-sheet ol { padding-inline-start: var(--s-6); }
.doc-sheet .refs p { text-indent: 0; padding-inline-start: var(--s-5); text-indent: -20px; font-size: 15px; }
.doc-toolbar { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.tabbar { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button {
  border: 0; background: transparent; cursor: pointer; padding: var(--s-3) var(--s-4);
  font-size: var(--size-sm); font-weight: 600; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabbar button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--terra); }
.tabbar button:hover:not([aria-selected='true']) { color: var(--ink); }
.report-table { width: 100%; border-collapse: collapse; font-size: var(--size-sm); }
.report-table th, .report-table td { text-align: start; padding: var(--s-3); border-bottom: 1px solid var(--line); }

/* 第四步附加材料：开题报告、任务书与答辩 PPT 预览 */
.material-doc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(24px, 4vw, 48px); font-family: var(--font-display); font-size: 16px; line-height: 1.8;
}
.material-doc__title { margin: 0 0 var(--s-2); font-size: clamp(20px, 2.4vw, 26px); text-align: center; }
.material-doc__sub { text-align: center; color: var(--muted); font-size: var(--size-sm); margin-bottom: var(--s-5); }
.material-section h4 { margin: var(--s-5) 0 var(--s-2); font-size: 17px; }
.material-section p { margin-bottom: var(--s-3); text-indent: 2em; }
.material-note { text-indent: 0; border-top: 1px solid var(--line); padding-top: var(--s-3); margin-top: var(--s-4); }
.material-table { font-size: var(--size-sm); }
.material-table th, .material-table td { border: 1px solid var(--line); vertical-align: top; padding: var(--s-3); }
.material-table__key { width: 26%; background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.slide-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.slide-card {
  aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-4); overflow: auto; display: flex; flex-direction: column; gap: var(--s-2);
}
.slide-card__head { display: flex; justify-content: space-between; gap: var(--s-2); align-items: center; }
.slide-card__kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--terra); }
.slide-card__page { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.slide-card h4 { margin: 0; font-family: var(--font-display); font-size: clamp(15px, 1.6vw, 19px); line-height: 1.35; }
.slide-card__lead { margin: 0; color: var(--muted); font-size: var(--size-xs); line-height: 1.5; }
.slide-card ul { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 4px; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.slide-card__keywords { margin: 0; color: var(--muted); font-size: 11px; }
.slide-card--cover, .slide-card--end { border-color: var(--pine); }
@media (max-width: 640px) {
  .slide-grid { grid-template-columns: 1fr; }
  .material-doc { padding: var(--s-4); }
  .material-table__key { width: 34%; white-space: normal; }
}

/* Account */
.account-grid { display: grid; gap: var(--s-5); grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
/* 右侧只摆当前菜单对应的一块面板；hidden 切换，别让卡片的 display 盖掉它。 */
.account-panels { display: grid; gap: var(--s-5); }
.account-panels > [data-panel][hidden] { display: none; }
.account-nav { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: var(--s-2); position: sticky; top: 88px; }
/* 菜单项都是按钮：点一下切换右侧面板，退出登录按钮也用同一套样式。 */
.account-nav button {
  border: 0; background: transparent; text-align: start; cursor: pointer;
  padding: var(--s-3); border-radius: var(--r-sm); font-size: var(--size-sm); font-weight: 600; color: var(--ink-2);
  text-decoration: none; justify-content: flex-start;
}
.account-nav button:hover { color: var(--ink); background: var(--surface-2); }
/* 退出登录是动作不是面板，上面加一条分隔线，别让它读成第五个菜单项。 */
.account-nav__split { border: 0; border-top: 1px solid var(--line); margin: var(--s-2) var(--s-2) 0; }
/* 属性值写不写 'true' 都该点亮（aria-current="" 也不是合法值，两边都兼容）。 */
.account-nav button[aria-current]:not([aria-current='false']) { background: var(--pine); color: var(--pine-ink); }
/* 窄屏没有左右分栏：菜单折成顶部一横条，面板跟在它下面。 */
@media (max-width: 980px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; position: static; }
    .account-nav__split { display: none; }
}
/* 卡片里的标题默认 margin:0，不补间距会让 h2 紧贴后面的内容。 */
.account-section > h2 { margin-bottom: var(--s-4); }
/* 购买点数：用一块带松绿色描边的区域把“买什么、多少钱、点哪里”放在一起。 */
.buy-block { display: grid; gap: var(--s-3); border: 1px solid var(--pine); border-radius: var(--r-md); background: var(--pine-soft); padding: var(--s-4); margin-bottom: var(--s-5); }
.buy-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.buy-block__head strong { font-family: var(--font-display); font-size: var(--size-lg); }
.buy-block__note { color: var(--ink-2); font-size: var(--size-xs); }
/* 工作台顶部的点数余额本身就是购买入口。 */
.chip--buy { text-decoration: none; }
.chip--buy .chip__plus { color: var(--pine); font-weight: 700; line-height: 1; }
.chip--buy:hover { border-color: var(--pine); background: var(--pine-soft); color: var(--pine); }
.account-section > h3 { margin: var(--s-5) 0 var(--s-3); }
.account-section .row--between > h2 { margin-bottom: 0; }
.account-section > .row--between { margin-bottom: var(--s-4); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: var(--s-2) var(--s-4); font-size: var(--size-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 620px) { .kv { grid-template-columns: 1fr; } }
/* Invite panel: the readonly link and the copy button share one row. */
.copy-row { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.copy-row .input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 620px) { .copy-row { flex-wrap: wrap; } }

/* 每个步骤直接显示序号与名称，页面顶部只保留同一个步骤名，避免和页面内标题重复。 */
.rail__label { display: block; font-family: var(--font-sans); font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0; }
.rail__tail { margin-top: auto; display: grid; gap: var(--s-2); justify-items: center; }
.canvas__bar-left { display: flex; align-items: center; gap: var(--s-3); min-width: 0; flex-wrap: wrap; }
.canvas__bar-right { display: flex; align-items: center; gap: var(--s-3); margin-inline-start: auto; flex-wrap: wrap; }
.canvas__title { font-size: clamp(22px, 2.2vw, 30px); }
@media (max-width: 820px) { .rail__tail { margin: 0; margin-inline-start: auto; display: flex; gap: var(--s-2); } }

/* Drafts table + misc workspace blocks. */
.table-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow-x: auto; }
.page-head { display: grid; gap: var(--s-2); }
.page-head h2 { font-size: clamp(24px, 2.6vw, 34px); }
.action-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.doc-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--size-xs); color: var(--muted); }
