:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-soft: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #4f4f55;
  --line: #d7d7dd;
  --line-soft: #ececf1;
  --accent: #0071e3;
  --accent-dark: #0057b8;
  --accent-soft: #edf6ff;
  --green-soft: #ebf8f2;
  --warning-soft: #fff7ed;
  --glass: rgba(255, 255, 255, 0.74);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.07);
  --shadow-lift: 0 28px 90px rgba(0, 0, 0, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #eceff4 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-shell {
  min-height: 100vh;
}

.site-header,
.brand,
.header-actions,
.language-switcher,
.section-tabs,
.nav-button,
.ghost-button,
.account-button,
.credit-button,
.header-cta,
.primary-button,
.secondary-button,
.preview-topbar,
.preview-file,
.progress-row,
.uploaded-item,
.feedback-section h2 {
  display: flex;
  align-items: center;
}

.site-header {
  position: relative;
  z-index: 20;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 34px 0;
}

.brand {
  gap: 12px;
}

.brand img {
  width: 34px;
  height: 34px;
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 760;
}

.header-actions {
  gap: 10px;
}

.language-switcher {
  gap: 2px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.language-switcher button {
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.language-switcher button.active {
  background: #1d1d1f;
  color: #fff;
}

.ghost-button,
.account-button,
.credit-button,
.header-cta,
.primary-button,
.secondary-button {
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 740;
  white-space: nowrap;
}

.ghost-button {
  padding: 0 15px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-strong);
}

.header-cta {
  padding: 0 17px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.account-button {
  max-width: 180px;
  padding: 0 14px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.account-button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-button.is-authenticated {
  border-color: rgba(0, 113, 227, 0.24);
  background: var(--accent-soft);
  color: #064f96;
}

.credit-button {
  max-width: 210px;
  padding: 0 14px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.credit-button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.credit-button.has-credit {
  border-color: rgba(52, 199, 89, 0.28);
  background: var(--green-soft);
  color: #14783d;
}

.logout-button[hidden] {
  display: none;
}

.workspace {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 34px 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.section-tabs {
  position: sticky;
  top: 14px;
  z-index: 12;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  margin: 12px auto 34px;
  padding: 5px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  border-radius: 999px;
  background: rgba(251, 251, 253, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar {
  display: none;
}

.nav-button {
  flex: 0 0 auto;
  justify-content: center;
  min-height: 38px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-button:hover {
  color: var(--text);
}

.nav-button.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 420ms ease both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: 72px;
  min-height: calc(100vh - 164px);
  padding: 34px 0 60px;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 {
  max-width: 690px;
  font-size: clamp(31px, 4.4vw, 52px);
  font-weight: 760;
  line-height: 1.13;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 520px;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stair-stage {
  --stair-step-width: min(438px, calc(100% - 102px));
  --stair-offset: 34px;
  position: relative;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  min-height: 520px;
  padding: 26px 0 22px 0;
}

.stair-stage::before {
  content: none;
}

.stair-copy {
  width: var(--stair-step-width);
  margin-left: 0;
  padding: 22px;
  border: 1px solid rgba(210, 210, 215, 0.8);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(18px);
}

.stair-copy span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stair-copy strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.16;
}

.stair-copy p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.staircase {
  display: grid;
  gap: 0;
  width: calc(var(--stair-step-width) + (var(--stair-offset) * 3));
  max-width: 100%;
  perspective: 900px;
}

.stair-step {
  --shift: 0px;
  --lift: 0px;
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: var(--stair-step-width);
  min-height: 82px;
  margin-top: -8px;
  margin-left: 0;
  padding: 16px 20px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
  transform: translate(var(--shift), var(--lift)) rotateX(0deg);
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.stair-step:nth-child(1) {
  --shift: 0px;
}

.stair-step:nth-child(2) {
  --shift: 34px;
}

.stair-step:nth-child(3) {
  --shift: 68px;
}

.stair-step:nth-child(4) {
  --shift: 102px;
}

.stair-step:hover,
.stair-step.active {
  --lift: -5px;
  border-color: rgba(0, 113, 227, 0.32);
  background: rgba(237, 246, 255, 0.9);
  box-shadow: 0 24px 58px rgba(0, 113, 227, 0.14);
}

.stair-step.active {
  color: #075ca8;
}

.stair-step span {
  grid-row: 1 / span 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
}

.stair-step strong {
  font-size: 20px;
  line-height: 1.16;
}

.stair-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.stair-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: var(--stair-step-width);
  max-width: 100%;
  margin-left: calc(var(--stair-offset) * 3);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.home-guide {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: end;
  margin: -18px 0 28px;
  padding: 28px 0;
  border-top: 1px solid rgba(210, 210, 215, 0.8);
  border-bottom: 1px solid rgba(210, 210, 215, 0.8);
}

.home-guide h2 {
  max-width: 420px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-steps article {
  min-width: 0;
  padding-top: 14px;
  border-top: 2px solid rgba(29, 29, 31, 0.13);
}

.guide-steps span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
}

.guide-steps strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
}

.guide-steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 113, 227, 0.2);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid rgba(210, 210, 215, 0.82);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.product-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.stage-path {
  position: absolute;
  inset: 22px 4px;
  opacity: 0.88;
  pointer-events: none;
}

.stage-path span {
  position: absolute;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 29, 31, 0.08), rgba(0, 113, 227, 0.34));
  transform-origin: center;
}

.stage-path span:nth-child(1) {
  width: 58%;
  top: 74px;
  left: 6%;
  transform: rotate(-14deg);
}

.stage-path span:nth-child(2) {
  width: 72%;
  top: 246px;
  right: 0;
  transform: rotate(12deg);
}

.stage-path span:nth-child(3) {
  width: 52%;
  bottom: 78px;
  left: 15%;
  transform: rotate(-8deg);
}

.preview-window {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid rgba(210, 210, 215, 0.78);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(22px);
}

.preview-topbar {
  justify-content: space-between;
  min-height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
}

.preview-topbar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #34c759;
}

.preview-topbar strong {
  font-size: 15px;
}

.preview-topbar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.preview-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.preview-file {
  gap: 14px;
  min-height: 78px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(251, 251, 253, 0.72);
}

.preview-file.active {
  border-color: rgba(0, 113, 227, 0.26);
  background: var(--accent-soft);
}

.preview-file svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.preview-file strong,
.preview-file span {
  display: block;
}

.preview-file strong {
  font-size: 16px;
}

.preview-file span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.preview-output {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 18px;
  border-radius: 22px;
  background: #1d1d1f;
  color: #fff;
}

.preview-output span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 720;
}

.preview-output strong {
  align-self: end;
  font-size: 19px;
  line-height: 1.35;
}

.home-modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -14px;
}

.module-tile {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 160px;
  padding: 20px;
  border: 1px solid rgba(210, 210, 215, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.module-tile:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.module-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 18px 24px 36px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.module-tile strong {
  font-size: 23px;
  font-weight: 760;
}

.module-tile small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.module-tile.live {
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(237, 246, 255, 0.76);
}

.feature-panel,
.work-panel {
  border: 1px solid rgba(210, 210, 215, 0.78);
  border-radius: 32px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.8fr);
  gap: 52px;
  align-items: center;
  min-height: 520px;
  padding: 48px;
}

.feature-panel h2,
.panel-header h2 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.06;
}

.feature-panel p:not(.eyebrow),
.panel-header p {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
}

.feature-preview {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
}

.feature-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 94px;
  padding: 0 22px;
  border-top: 1px solid var(--line-soft);
}

.feature-row:first-child {
  border-top: 0;
}

.feature-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.feature-row strong {
  font-size: 21px;
}

.library-shelves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.library-shelves span {
  min-height: 74px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 19px;
  font-weight: 760;
}

.work-panel {
  padding: 30px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.progress-row {
  gap: 8px;
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

.progress-row::-webkit-scrollbar {
  display: none;
}

.progress-row span {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(232, 232, 237, 0.72);
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-align: center;
}

.progress-row span.active {
  background: #1d1d1f;
  color: #fff;
}

.upload-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.drop-zone {
  display: grid;
  min-height: 232px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border: 1px dashed rgba(110, 110, 115, 0.42);
  border-radius: 28px;
  background: rgba(251, 251, 253, 0.72);
  text-align: center;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone svg {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.drop-zone strong {
  font-size: 21px;
}

.drop-zone small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.drop-zone:hover,
.drop-zone.dragging,
.required-drop {
  border-color: rgba(0, 113, 227, 0.42);
  background: rgba(237, 246, 255, 0.7);
}

.drop-zone:hover {
  transform: translateY(-2px);
}

.uploaded-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.uploaded-item {
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(251, 251, 253, 0.84);
}

.uploaded-item div {
  min-width: 0;
  flex: 1;
}

.uploaded-item strong,
.uploaded-item small {
  display: block;
}

.uploaded-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-item small {
  color: var(--muted);
}

.uploaded-item mark {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #14783d;
  font-size: 12px;
  font-weight: 800;
}

.upload-remove {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted-strong);
}

.upload-remove:hover {
  border-color: rgba(255, 59, 48, 0.24);
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
}

.type-grid,
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.type-card,
.discipline-card {
  display: grid;
  min-height: 132px;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(210, 210, 215, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.type-card:hover,
.discipline-card:hover {
  transform: translateY(-2px);
  background: #fff;
}

.type-card svg,
.discipline-card svg,
.uploaded-item svg,
button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.type-card svg,
.discipline-card svg,
.uploaded-item svg {
  color: var(--accent);
}

.type-card strong {
  font-size: 18px;
}

.type-card small {
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
}

.type-card.dissertation-type {
  min-height: 156px;
}

.type-card.selected,
.discipline-card.selected {
  border-color: rgba(0, 113, 227, 0.42);
  background: var(--accent-soft);
  color: #075ca8;
}

.auto-card {
  grid-column: span 2;
}

.discipline-card strong {
  font-size: 18px;
}

.feedback-report {
  padding-top: 6px;
}

.report-reader {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.report-note {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(210, 210, 215, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.report-note > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-note strong {
  font-size: 20px;
  line-height: 1.22;
}

.report-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.report-note small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-download-button {
  width: 100%;
  margin-top: 4px;
}

.markdown-report {
  min-width: 0;
  padding: 8px 0 0;
}

.markdown-report h2,
.markdown-report h3,
.markdown-report h4 {
  color: var(--text);
  letter-spacing: 0;
}

.markdown-report h2 {
  margin: 34px 0 14px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.13;
}

.markdown-report h2:first-child {
  margin-top: 0;
}

.markdown-report h3 {
  margin: 26px 0 12px;
  font-size: 23px;
  line-height: 1.22;
}

.markdown-report h4 {
  margin: 20px 0 10px;
  font-size: 18px;
}

.markdown-report p,
.markdown-report li,
.markdown-report td,
.markdown-report th {
  color: #33343a;
  font-size: 16px;
  line-height: 1.72;
}

.markdown-report p + p {
  margin-top: 12px;
}

.markdown-report blockquote {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  background: rgba(237, 246, 255, 0.78);
}

.markdown-report blockquote p {
  color: #1d4771;
  font-weight: 680;
}

.markdown-report ol,
.markdown-report ul {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding-left: 24px;
}

.markdown-report code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(232, 232, 237, 0.82);
  font-size: 0.92em;
}

.markdown-report pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #1d1d1f;
  color: #fff;
}

.markdown-report pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.feedback-loading {
  display: grid;
  gap: 26px;
  max-width: 720px;
  padding: 34px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 251, 253, 0.78)),
    radial-gradient(circle at 16% 8%, rgba(0, 113, 227, 0.12), transparent 34%);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.06);
}

.feedback-loading-orbit {
  position: relative;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.feedback-loading-orbit::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: inherit;
  content: "";
}

.feedback-loading-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  transform-origin: 39px 39px;
  animation: feedbackOrbit 1.7s linear infinite;
}

.feedback-loading-orbit span:nth-child(1) {
  left: 34px;
  top: 4px;
}

.feedback-loading-orbit span:nth-child(2) {
  left: 34px;
  top: 4px;
  animation-delay: -0.56s;
  opacity: 0.62;
}

.feedback-loading-orbit span:nth-child(3) {
  left: 34px;
  top: 4px;
  animation-delay: -1.12s;
  opacity: 0.34;
}

@keyframes feedbackOrbit {
  to {
    transform: rotate(360deg);
  }
}

.feedback-loading-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.1;
}

.feedback-loading-copy p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.feedback-progress {
  display: grid;
  gap: 12px;
}

.feedback-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
}

.feedback-progress-top span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.feedback-progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(232, 232, 237, 0.94);
}

.feedback-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0071e3, #66b7ff);
  box-shadow: 0 0 22px rgba(0, 113, 227, 0.34);
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feedback-progress small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.md-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.markdown-report table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.markdown-report th,
.markdown-report td {
  padding: 13px 14px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.markdown-report th {
  border-top: 0;
  background: rgba(245, 245, 247, 0.94);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 820;
}

.feedback-section {
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}

.feedback-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.feedback-section.important {
  padding: 24px;
  border: 1px solid #f2c78a;
  border-radius: 24px;
  background: var(--warning-soft);
}

.feedback-section.important + .feedback-section {
  border-top: 0;
}

.feedback-section h2 {
  gap: 10px;
  margin-bottom: 14px;
  font-size: 26px;
}

.feedback-section h2::before {
  display: block;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.feedback-section p,
.feedback-section li {
  color: #33343a;
  font-size: 17px;
  line-height: 1.75;
}

.feedback-section p + p {
  margin-top: 12px;
}

.feedback-section ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 24px;
}

.history-privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 210, 215, 0.78);
  border-radius: 18px;
  background: rgba(251, 251, 253, 0.78);
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 680;
}

.history-privacy svg {
  color: var(--accent);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-record {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.9fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.history-record:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.history-record-main {
  min-width: 0;
}

.history-record-main mark {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #14783d;
  font-size: 12px;
  font-weight: 820;
}

.history-record-main strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 21px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.history-files span {
  max-width: 220px;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(232, 232, 237, 0.72);
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.history-meta div {
  min-width: 0;
}

.history-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.history-meta dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-danger-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 999px;
  background: rgba(255, 242, 241, 0.86);
  color: #b42318;
}

.icon-danger-button:hover {
  background: #fff2f1;
}

.history-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 42px;
  border: 1px dashed rgba(110, 110, 115, 0.34);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.history-empty svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.history-empty strong {
  font-size: 24px;
}

.history-empty p {
  max-width: 360px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
}

.auth-modal.is-open {
  display: grid;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(28px);
  animation: modalIn 360ms ease both;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: 0;
}

.auth-card > p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 760;
}

.auth-delivery-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(210, 210, 215, 0.92);
  border-radius: 14px;
  background: rgba(251, 251, 253, 0.9);
  color: var(--text);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.auth-field input:focus {
  border-color: rgba(0, 113, 227, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.auth-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auth-code-row .secondary-button {
  min-height: 48px;
  padding-inline: 14px;
  font-size: 13px;
}

.auth-status {
  min-height: 20px;
  color: #0b5cab;
  font-size: 13px;
  line-height: 1.45;
}

.auth-status.is-error {
  color: #b42318;
}

.auth-submit {
  width: 100%;
}

.auth-link,
.auth-switch {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 760;
}

.auth-link {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 14px;
}

.auth-switch {
  margin-top: 2px;
}

.credit-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: none;
  place-items: center;
  padding: 24px;
}

.credit-modal.is-open {
  display: grid;
}

.credit-card {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(92vh, 820px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(28px);
  animation: modalIn 360ms ease both;
}

.credit-card h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0;
}

.credit-card > p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.credit-balance-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.credit-balance-strip div {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(251, 251, 253, 0.88);
}

.credit-balance-strip span,
.pricing-list span,
.qq-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.credit-balance-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  letter-spacing: 0;
}

.credit-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.pricing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pricing-list article {
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 251, 253, 0.88));
}

.pricing-list strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 27px;
  letter-spacing: 0;
}

.pricing-list small {
  color: var(--text);
  font-weight: 760;
}

.qq-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #1d1d1f;
  color: #fff;
}

.qq-panel img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: #111;
}

.qq-panel strong {
  font-size: 18px;
}

.qq-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.redeem-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
}

.intro-modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 245, 247, 0.68);
  backdrop-filter: blur(26px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 42px;
  border: 1px solid rgba(210, 210, 215, 0.86);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-lift);
  animation: modalIn 360ms ease both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(232, 232, 237, 0.74);
  color: var(--muted-strong);
}

.modal-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
}

.modal-card h2 {
  max-width: 500px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
}

.modal-card > p:not(.eyebrow) {
  max-width: 520px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.modal-detail {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.modal-detail div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(251, 251, 253, 0.72);
}

.modal-detail span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 820;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 980px) {
  .site-header,
  .workspace {
    padding-inline: 22px;
  }

  .section-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 36px;
  }

  .nav-button {
    flex: 0 0 auto;
    min-width: 92px;
  }

  .hero-panel,
  .feature-panel {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-panel {
    min-height: auto;
  }

  .stair-stage,
  .product-stage {
    min-height: 430px;
  }

  .home-guide,
  .report-reader {
    grid-template-columns: 1fr;
  }

  .history-record {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .history-actions {
    justify-content: flex-start;
  }

  .home-guide {
    align-items: start;
  }

  .report-note {
    position: static;
  }

  .home-modules,
  .type-grid,
  .discipline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel {
    padding: 34px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    align-items: stretch;
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .ghost-button {
    display: none;
  }

  .account-button {
    width: 100%;
    min-width: 0;
  }

  .credit-button {
    width: 100%;
    max-width: none;
  }

  .logout-button:not([hidden]) {
    display: flex;
    grid-column: 1 / -1;
  }

  .header-cta {
    grid-column: 1 / -1;
    width: 100%;
  }

  .language-switcher {
    justify-content: flex-start;
  }

  .section-tabs {
    gap: 2px;
    overflow-x: visible;
  }

  .nav-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
    font-size: 12px;
  }

  .hero-copy h1 {
    font-size: 31px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 15px;
  }

  .hero-actions,
  .modal-actions {
    display: grid;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .modal-actions .primary-button,
  .modal-actions .secondary-button {
    width: 100%;
  }

  .product-stage {
    min-height: 380px;
  }

  .stair-stage {
    --stair-step-width: 100%;
    --stair-offset: 0px;
    min-height: auto;
    padding-top: 4px;
  }

  .stair-copy {
    width: 100%;
    margin-left: 0;
  }

  .stair-step {
    --shift: 0px !important;
    width: 100%;
    min-height: 76px;
  }

  .stair-hint {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    border-radius: 18px;
    text-align: center;
  }

  .guide-steps {
    grid-template-columns: 1fr;
  }

  .history-meta {
    grid-template-columns: 1fr;
  }

  .history-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    width: 100%;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .credit-balance-strip,
  .credit-layout,
  .pricing-list {
    grid-template-columns: 1fr;
  }

  .qq-panel img {
    max-height: 360px;
  }

  .preview-window {
    border-radius: 28px;
  }

  .home-modules,
  .upload-pair,
  .type-grid,
  .discipline-grid,
  .library-shelves {
    grid-template-columns: 1fr;
  }

  .auto-card {
    grid-column: auto;
  }

  .feature-panel,
  .work-panel {
    padding: 24px;
    border-radius: 28px;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .drop-zone {
    min-height: 210px;
  }

  .auth-card,
  .credit-card,
  .modal-card {
    padding: 30px 24px 24px;
    border-radius: 30px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  html,
  body {
    background: #fff !important;
  }

  body.printing-report {
    color: #111;
  }

  body.printing-report .site-header,
  body.printing-report .section-tabs,
  body.printing-report .progress-row,
  body.printing-report .report-note,
  body.printing-report .panel-header .secondary-button,
  body.printing-report .auth-modal,
  body.printing-report .credit-modal,
  body.printing-report .intro-modal {
    display: none !important;
  }

  body.printing-report .workspace {
    max-width: none;
    padding: 0;
  }

  body.printing-report .view {
    display: none !important;
  }

  body.printing-report [data-view="report"] {
    display: block !important;
    animation: none !important;
  }

  body.printing-report .work-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.printing-report .panel-header {
    display: block;
    margin-bottom: 18mm;
    padding-bottom: 8mm;
    border-bottom: 1px solid #d7d7dd;
  }

  body.printing-report .panel-header h2 {
    font-size: 28pt;
    line-height: 1.12;
  }

  body.printing-report .panel-header p {
    margin-top: 6px;
    color: #555;
    font-size: 11pt;
  }

  body.printing-report .report-reader {
    display: block;
  }

  body.printing-report .feedback-report {
    padding: 0;
  }

  body.printing-report .markdown-report h2 {
    margin: 18pt 0 8pt;
    color: #111;
    font-size: 21pt;
    break-after: avoid;
  }

  body.printing-report .markdown-report h3 {
    margin: 14pt 0 7pt;
    color: #111;
    font-size: 15pt;
    break-after: avoid;
  }

  body.printing-report .markdown-report h4 {
    margin: 11pt 0 6pt;
    color: #111;
    font-size: 12pt;
    break-after: avoid;
  }

  body.printing-report .markdown-report p,
  body.printing-report .markdown-report li,
  body.printing-report .markdown-report td,
  body.printing-report .markdown-report th,
  body.printing-report .feedback-section p,
  body.printing-report .feedback-section li {
    color: #222;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  body.printing-report .markdown-report blockquote,
  body.printing-report .feedback-section.important {
    border: 1px solid #c9dff4;
    border-left: 4px solid #0071e3;
    border-radius: 8px;
    background: #f4f9ff;
    break-inside: avoid;
  }

  body.printing-report .md-table-wrap {
    overflow: visible;
    border-radius: 8px;
    break-inside: auto;
  }

  body.printing-report .markdown-report table {
    min-width: 0;
    width: 100%;
    page-break-inside: auto;
  }

  body.printing-report .markdown-report tr {
    break-inside: avoid;
  }

  body.printing-report .markdown-report th,
  body.printing-report .markdown-report td {
    padding: 7pt 8pt;
  }

  body.printing-report .feedback-section {
    padding: 14pt 0;
    break-inside: avoid;
  }
}
