:root {
  --ink: #18211c;
  --muted: #68736b;
  --line: #dfe4de;
  --paper: #fffaf0;
  --surface: #fffef9;
  --soft: #f1f6ef;
  --green: #2f7d5b;
  --green-dark: #205f45;
  --blue: #386a93;
  --rose: #9b555e;
  --gold: #a8742b;
  --shadow: 0 18px 48px rgba(28, 36, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9), transparent 28%),
    #f5f2ec;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  max-width: 1220px;
  min-height: 760px;
  margin: 20px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.view {
  padding: 24px;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 22px;
  align-items: start;
  padding: 28px 24px 32px;
}

.brief {
  padding: 8px 8px 0 4px;
}

.brief-kicker {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brief h1 {
  font-size: 28px;
}

.brief h2 {
  margin: 22px 0 10px;
}

.brief p,
.brief li {
  line-height: 1.5;
}

.brief ul,
.brief ol {
  margin: 0;
  padding-left: 18px;
}

.brief li + li {
  margin-top: 8px;
}

.check {
  padding: 14px 14px 14px 34px;
  background: var(--paper);
  border: 1px solid #e6dac6;
  border-radius: 8px;
}

.brief code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 13px;
}

.login {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 22px;
  font-weight: 850;
}

.quick-logins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.home-kicker {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.home-kicker span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.home-kicker strong {
  font-size: 18px;
}

.primary {
  padding: 10px 14px;
  background: var(--green);
  color: white;
  font-weight: 750;
}

.primary:hover {
  background: var(--green-dark);
}

.secondary,
.ghost,
.small,
.icon {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 700;
}

.secondary {
  padding: 10px 13px;
}

.ghost {
  padding: 8px 11px;
  color: var(--muted);
}

.small {
  padding: 7px 9px;
  font-size: 12px;
}

.icon {
  width: 34px;
  height: 34px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.continue {
  min-height: 310px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 28px;
  background: var(--paper);
  border: 1px solid #e6dac6;
  border-radius: 8px;
}

.cover {
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 7px;
  border: 1px solid rgba(24, 33, 28, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.34), transparent), #c9dccd;
  color: #294733;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 760;
  line-height: 1.18;
  text-align: center;
  overflow-wrap: anywhere;
}

.cue {
  margin: 18px 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.74);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  line-height: 1.45;
}

.progress {
  height: 8px;
  margin: 14px 0 18px;
  overflow: hidden;
  background: #e8dfd0;
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.stack {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty {
  padding: 13px;
  background: #f8faf7;
  border: 1px dashed #cfd8cf;
  border-radius: 7px;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
}

.empty p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid #edf0ed;
}

.row > div:first-child {
  min-width: 0;
}

.row:first-of-type {
  border-top: 0;
}

.row-title {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

.reader {
  min-height: 702px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #f7f1e7;
}

.reader-head,
.reader-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.reader-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.page {
  width: 760px;
  min-height: 520px;
  margin: 24px auto;
  padding: 46px 58px;
  background: #fffdf7;
  border: 1px solid #e4d9c7;
  box-shadow: 0 18px 36px rgba(70, 54, 33, 0.09);
}

.page p {
  margin: 0 0 14px;
  font-family: "Liberation Serif", "Noto Serif", "PT Serif", "Times New Roman", Georgia, serif;
  font-size: 12px;
  line-height: 1.72;
  cursor: text;
}

.page p.selected {
  background: #fff3bf;
  outline: 6px solid #fff3bf;
  border-radius: 2px;
}

.trace-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--gold);
  color: white;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.drawer {
  margin: 0 auto 22px;
  width: 760px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiet-tools summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 760;
}

.quiet-tools summary::marker {
  color: var(--green);
}

.quiet-tools h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.note-list {
  display: grid;
  gap: 10px;
}

.note {
  padding: 10px;
  border: 1px solid #edf0ed;
  border-radius: 7px;
  background: #fff;
}

.notice {
  padding: 11px 12px;
  margin-top: 10px;
  border-radius: 7px;
  background: var(--soft);
  color: #254b38;
}

.error {
  color: #8a3540;
}

.after {
  max-width: 620px;
  margin: 70px auto;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 14px;
  background: #1f2b24;
  color: white;
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(24, 33, 28, 0.22);
  font-weight: 700;
}

@media (max-width: 900px) {
  .shell {
    margin: 0;
    border-radius: 0;
  }

  .grid,
  .continue {
    grid-template-columns: 1fr;
  }

  .landing,
  .quick-logins {
    grid-template-columns: 1fr;
  }

  .page,
  .drawer {
    width: calc(100vw - 32px);
  }

  .page {
    padding: 34px 28px;
  }
}
