:root {
  --ink: #271c29;
  --muted: #665965;
  --line: #ded4da;
  --green: #663251;
  --green-dark: #2d1b2f;
  --green-soft: #f2e4ed;
  --surface: #fffdfa;
  --paper: #f7f2eb;
  --accent: #f3cf72;
  --shadow: none;
  background: var(--paper);
}

.marking-assistant > header {
  background: var(--green-dark);
  gap: 16px;
  z-index: 3;
}
.marking-assistant > header::before { content: none; }
.marking-assistant .brand {
  gap: 10px;
  color: #fffdfa;
  font: 700 1.35rem/1 Georgia, serif;
  white-space: nowrap;
}
.marking-assistant .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  font: 700 1.1rem/1 system-ui, sans-serif;
}
.marking-assistant .header-right nav > a,
.marking-assistant .pro-menu summary {
  display: block;
  padding: 8px 11px;
  border-radius: 6px;
  color: #fff4fa;
  line-height: 1.35;
}
.marking-assistant .header-right nav > a:hover,
.marking-assistant .pro-menu summary:hover { background: #ffffff20; }
.marking-assistant .header-right nav > a.active,
.marking-assistant .header-right nav > a.button {
  background: var(--accent);
  color: var(--green-dark);
}
.marking-assistant .header-right nav a.active::after { content: none; }
.marking-assistant .header-right .user-chip {
  border: 0;
  color: #e4d6e0;
  overflow-wrap: anywhere;
}
.marking-assistant > main,
.marking-assistant > footer { min-width: 0; }
.marking-assistant > main { width: 100%; }
.marking-assistant .page-heading { height: auto; }
.marking-assistant h1, .marking-assistant h2, .marking-assistant h3 {
  font-family: Georgia, serif;
  letter-spacing: -.025em;
}
.marking-assistant h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.marking-assistant h2 { font-size: 1.55rem; }
.marking-assistant h3 { font-size: 1.2rem; }

.marking-assistant :is(.card, main section, .legal-document) {
  border-radius: 6px;
  box-shadow: none;
}
.marking-assistant .stat-card { border-top: 4px solid var(--green); }
.marking-assistant .stat-card strong {
  font: 700 2.75rem/1.15 Georgia, serif;
  color: var(--green);
}
.marking-assistant .stat-label, .marking-assistant th { color: var(--muted); }
.marking-assistant th { background: var(--green-soft); }
.marking-assistant :is(th, td) { border-color: var(--line); }
.marking-assistant tbody tr:hover { background: #faf3f7; }
.marking-assistant .empty-state {
  background: var(--paper);
  border: 1px dashed #b99daa;
  border-radius: 6px;
}
.marking-assistant .empty-icon { border-radius: 50%; }
.marking-assistant :is(button, .button) { border-radius: 6px; }
.marking-assistant :is(button, .button):not(.secondary, .subtle):hover { background: #4d223c; }
.marking-assistant :is(input:not([type=checkbox]), textarea, select):focus-visible,
.marking-assistant :focus-visible {
  outline: 3px solid #a64e81;
  outline-offset: 3px;
}
.marking-assistant > header :focus-visible { outline-color: var(--accent); }
.marking-assistant :is(.upload-credit-quote, .upload-pricing-column, .credit-calculator, .hero-note) {
  background: #f5ecef;
  border-color: var(--line);
}
.marking-assistant .notice:not(.error) {
  background: var(--green-soft);
  border-color: #ddc6d5;
  color: var(--ink);
}
.marking-assistant .tag.success { background: #e2eee1; border-color: #b8d3ba; color: #285336; }
.marking-assistant .legal-footer { border-color: var(--line); }
.marking-assistant .legal-footer a { color: var(--green); }
.marking-assistant .auth-card { margin-block: 0; }

.marking-assistant-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  max-width: 980px;
  margin: clamp(0px, 4vw, 44px) auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.marking-assistant-entry-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 11px 0 0 11px;
  background: var(--green-dark);
  color: #fff4fa;
}
.marking-assistant-entry-intro h1 {
  max-width: 9ch;
  margin: 12px 0 18px;
  font: 400 clamp(2.6rem, 5vw, 5.3rem)/.99 Georgia, serif;
  letter-spacing: -.055em;
  color: var(--accent);
}
.marking-assistant-entry-intro p { max-width: 31ch; margin: 0; }
.marking-assistant-entry .auth-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(22px, 5vw, 58px);
  align-self: center;
  border: 0;
  background: transparent;
}

@media (min-width: 1060px) {
  .marking-assistant-workspace:not(.review-wide) {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .marking-assistant-workspace:not(.review-wide) > header {
    grid-row: 1 / -1;
    height: auto;
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: start;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 30px 18px 20px;
    gap: 28px;
  }
  .marking-assistant-workspace:not(.review-wide) .brand { white-space: normal; }
  .marking-assistant .brand-mark { flex-shrink: 0; }
  .marking-assistant-workspace:not(.review-wide) .header-right,
  .marking-assistant-workspace:not(.review-wide) .header-right nav {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }
  .marking-assistant-workspace:not(.review-wide) .pro-menu-links {
    position: static;
    min-width: 0;
    box-shadow: none;
  }
  .marking-assistant-workspace:not(.review-wide) .pro-menu-links a { white-space: normal; }
  .marking-assistant-workspace:not(.review-wide) .user-chip {
    border-top: 1px solid #ffffff35;
    margin-top: 18px;
    padding: 12px 11px 0;
  }
  .marking-assistant-workspace:not(.review-wide) .header-right button { width: 100%; }
  .marking-assistant-workspace:not(.review-wide) > footer { grid-column: 2; width: 100%; }
}

@media (max-width: 1059px) {
  .marking-assistant > header { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 12px; }
  .marking-assistant .header-right, .marking-assistant .header-right nav { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 700px) {
  .marking-assistant-entry { grid-template-columns: 1fr; }
  .marking-assistant-entry-intro { border-radius: 11px 11px 0 0; }
  .marking-assistant-entry-intro h1 { max-width: none; font-size: clamp(2.3rem, 9vw, 3.65rem); }
  .marking-assistant .page-heading-row { align-items: flex-start; flex-wrap: wrap; }
  .marking-assistant .upload-credit-quote-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .marking-assistant :is(button, .button) { transition: none; }
}
