:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceff2;
  --ink: #414852;
  --muted: #77828e;
  --line: #d7dce2;
  --primary: #4fb866;
  --primary-dark: #2f7d45;
  --section-accent: #378d4e;
  --logo-gold: #daa32b;
  --logo-orbit: #737a82;
  --logo-word: #525b66;
  --sun: #76d982;
  --sun-soft: #effaf1;
  --sun-line: rgba(79, 184, 102, 0.3);
  --shadow: 0 20px 40px rgba(32, 35, 38, 0.1);
  --drawer-width: clamp(320px, 30vw, 430px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(79, 184, 102, 0.48);
  outline-offset: 2px;
}

.shell {
  width: 100%;
  min-height: 100vh;
  transition: width 180ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 14px 22px;
  background: rgba(244, 245, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-symbol {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(14, 42, 88, 0.08));
}

.brand-symbol .orbit,
.brand-symbol .planet {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-symbol .orbit {
  stroke-width: 1.35;
}

.brand-symbol .star {
  fill: var(--logo-gold);
}

.brand-symbol .planet {
  fill: #fff;
  stroke-width: 1.6;
}

.action-progress {
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(79, 184, 102, 0.14);
}

.action-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(79, 184, 102, 0.3), var(--primary), rgba(79, 184, 102, 0.3));
  animation: action-progress 1.1s ease-in-out infinite;
}

@keyframes action-progress {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  max-width: 760px;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  font-size: 1rem;
  font-weight: 680;
}

h3 {
  font-size: 0.98rem;
  font-weight: 700;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.context-menu {
  position: relative;
}

.context-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
  list-style: none;
}

.context-menu summary::-webkit-details-marker {
  display: none;
}

.context-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 6px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 130px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.context-choice {
  display: grid;
  gap: 3px;
  padding: 10px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
}

.context-choice:hover {
  border-color: rgba(79, 184, 102, 0.26);
  background: rgba(79, 184, 102, 0.05);
}

.context-choice span {
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 740;
  text-transform: uppercase;
}

.context-choice strong {
  font-size: 0.88rem;
  line-height: 1.3;
}

.auth-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-chip span {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(244, 245, 247, 0.84);
  backdrop-filter: blur(18px);
}

.auth-panel {
  position: relative;
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.auth-brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: contain;
}

.auth-panel h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.45rem;
}

.auth-note,
.auth-status {
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}

.auth-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 680;
}

.auth-form input {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.ghost,
.primary,
.icon-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--primary-dark);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
}

.ghost.disabled,
.ghost[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
  opacity: 0.62;
}

.primary {
  padding: 0 16px;
  color: #fff;
  background: var(--primary);
}

.qa-float {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 154px;
  min-height: 54px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(47, 125, 69, 0.18);
  cursor: pointer;
}

.qa-float span {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}

.qa-float small {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 620;
  line-height: 1.1;
  opacity: 0.88;
}

.icon-button {
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-2);
}

.workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 960px);
  gap: 18px;
  align-items: start;
  justify-content: start;
  padding: 18px 22px 96px;
}

.source-rail {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 118px);
  overflow: auto;
}

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

.disclosure {
  padding: 0;
  overflow: hidden;
}

.disclosure summary {
  padding: 13px 14px;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 680;
}

.disclosure[open] summary {
  border-bottom: 1px solid var(--line);
}

.disclosure .meta,
.disclosure pre {
  margin: 0;
  padding: 16px;
}

.meta {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 680;
  text-transform: uppercase;
}

.meta dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.meta a {
  color: var(--primary-dark);
}

.paper-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.paper-choice {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.paper-choice:hover,
.paper-choice.active {
  border-color: rgba(79, 184, 102, 0.2);
  background: #fbfcfd;
}

.paper-choice strong {
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 680;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-choice span,
.paper-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.source-excerpt pre,
.source-inline pre {
  white-space: pre-wrap;
  color: #3a3f46;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.reading {
  width: 100%;
  min-width: 0;
  max-width: 960px;
  padding: 26px min(4vw, 44px) 56px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.reading-head {
  margin-bottom: 28px;
}

.reading-head h2 {
  font-size: 1.55rem;
}

body.writing-standalone .workspace {
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  padding-right: clamp(22px, 4vw, 64px);
  padding-left: clamp(22px, 4vw, 64px);
}

body.standalone-tool .source-rail {
  display: none;
}

body.tool-screen .reading {
  max-width: none;
  border-left: 1px solid var(--line);
}

body.standalone-tool .reading {
  border-right: 1px solid var(--line);
}

.standalone-writing-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(79, 184, 102, 0.2);
  border-radius: 8px;
  background: #fbfcfd;
}

.standalone-writing-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.standalone-writing-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

body.tool-screen .pf1-content {
  display: grid;
  gap: 18px;
}

body.tool-screen .tool-panel.active {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(560px, 1fr);
  gap: clamp(24px, 3vw, 46px);
  align-items: start;
}

body.tool-screen .pf5-form,
body.tool-screen .pf5-output {
  min-width: 0;
}

body.tool-screen .pf5-output {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 136px);
  overflow: auto;
}

.tool-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.pf1-section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.pf1-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.pf1-section h3 {
  margin-bottom: 12px;
  color: var(--section-accent);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.pf1-section p,
.pf1-section li {
  color: #3a3f46;
  font-size: 1rem;
  line-height: 1.72;
}

.pf1-item {
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 3px solid rgba(79, 184, 102, 0.22);
}

.pf1-item h4 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.pf1-item p {
  margin: 0;
}

.grounding-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--section-accent);
  background: #fbfcfd;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.grounding-toggle small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 620;
  text-transform: none;
}

.grounding-table-wrap {
  margin-top: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.grounding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.grounding-table th,
.grounding-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.grounding-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.grounding-row.active {
  background: #f7eff3;
}

.source-link {
  min-height: 30px;
  padding: 0 10px;
  color: var(--primary-dark);
  border: 1px solid rgba(79, 184, 102, 0.24);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.source-inline {
  margin: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.source-inline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.source-inline-head strong {
  color: var(--primary-dark);
}

.source-inline-head span,
.source-inline-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.source-page {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.source-page:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.pf2-content {
  margin: 24px 0 30px;
}

.pf2-panel {
  border: 1px solid rgba(79, 184, 102, 0.22);
  border-left: 4px solid rgba(79, 184, 102, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.pf2-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  color: var(--section-accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pf2-panel summary small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 620;
  text-transform: none;
}

.pf2-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.pf2-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.pf2-body p {
  margin: 0;
  color: #3a3f46;
  line-height: 1.65;
}

.pf2-examples {
  display: grid;
  gap: 12px;
}

.pf2-example {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pf2-example h4,
.pf2-boundaries h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.pf2-example small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.pf2-boundaries {
  padding-top: 4px;
}

.pf2-boundaries ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.pf2-takeaway {
  padding: 12px 14px;
  border-left: 3px solid rgba(79, 184, 102, 0.24);
  background: #fff;
}

.pf2-error {
  color: var(--primary-dark) !important;
}

.pf2-loading {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.pf2-loading h3,
.pf2-loading p {
  margin: 0;
}

.clarify-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: var(--drawer-width);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.clarify-drawer.open {
  transform: translateX(0);
}

body.pf5-open {
  --drawer-width: clamp(390px, 36vw, 560px);
}

@media (min-width: 761px) {
  body.qa-open .shell,
  body.feedback-open .shell,
  body.start-open .shell,
  body.pf5-open .shell {
    width: calc(100vw - var(--drawer-width));
  }

  body.qa-open .qa-float,
  body.feedback-open .qa-float,
  body.start-open .qa-float,
  body.pf5-open .qa-float {
    opacity: 0;
    pointer-events: none;
  }

  body.qa-open .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
    justify-content: start;
    padding-right: 0;
  }

  body.qa-open .reading {
    max-width: none;
  }

  body.qa-open .reading-head,
  body.qa-open .pf1-content {
    max-width: 1040px;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.messages {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  overflow: auto;
}

.message {
  padding: 12px;
  border-radius: 8px;
  line-height: 1.55;
}

.message.user {
  color: #fff;
  background: var(--primary);
}

.message.system {
  background: var(--surface-2);
}

.message-source {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.message pre {
  white-space: pre-wrap;
  font-size: 0.76rem;
}

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

.clarify-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.clarify-form textarea:focus {
  border-color: rgba(79, 184, 102, 0.58);
}

.feedback-form {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.feedback-form label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 720;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
}

.feedback-form textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  border-color: rgba(79, 184, 102, 0.58);
}

.feedback-questions {
  display: grid;
  gap: 14px;
}

.feedback-question span {
  color: var(--ink);
  line-height: 1.35;
}

.feedback-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pf5-form {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.pf5-scroll {
  overflow: auto;
}

.pf5-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 18px 0;
}

.pf5-mode-tabs button {
  min-height: 36px;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.pf5-mode-tabs button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.pf5-mode-panel {
  display: none;
}

.pf5-mode-panel.active {
  display: block;
}

.pf5-drawer.pf5-blueprint-only .pf5-mode-tabs,
.pf5-drawer.pf5-review-only .pf5-mode-tabs {
  display: none;
}

.pf5-drawer.pf5-blueprint-only #pf5-review-panel,
.pf5-drawer.pf5-review-only #pf5-blueprint-panel {
  display: none;
}

.pf5-intro {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(79, 184, 102, 0.2);
  border-radius: 8px;
  background: #fbfcfd;
}

.pf5-intro strong {
  color: var(--ink);
}

.pf5-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pf5-readiness {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.pf5-readiness-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.pf5-readiness-head span {
  color: var(--primary-dark);
  font-weight: 760;
}

.pf5-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe3e8;
}

.pf5-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.pf5-readiness p,
.pf5-readiness ul {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.pf5-readiness ul {
  padding-left: 18px;
}

.pf5-source-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(79, 184, 102, 0.24);
  border-radius: 8px;
  background: #fff;
}

.pf5-file-label {
  padding: 12px;
  border: 1px dashed rgba(79, 184, 102, 0.36);
  border-radius: 8px;
  background: rgba(79, 184, 102, 0.04);
}

.pf5-file-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.pf5-file-status.warning {
  color: #a5522f;
}

.pf5-form label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 720;
}

.pf5-form .pf5-checks label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 580;
  line-height: 1.35;
}

.pf5-checks {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.pf5-checks legend {
  padding: 0 4px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 720;
}

.pf5-checks label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 580;
  line-height: 1.35;
}

.pf5-checks input {
  width: auto;
  margin-top: 2px;
}

.pf5-form input,
.pf5-form textarea,
.pf5-form select {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
}

.pf5-form textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.5;
}

.pf5-form input:focus,
.pf5-form textarea:focus,
.pf5-form select:focus {
  border-color: rgba(79, 184, 102, 0.58);
}

.pf5-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pf5-output {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.pf5-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pf5-result {
  display: grid;
  gap: 16px;
}

.pf5-result h3,
.pf5-block h4,
.pf5-mini-section h4 {
  margin: 0;
}

.pf5-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pf5-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.pf5-summary span,
.pf5-subhead {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pf5-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.86rem;
}

.pf5-block,
.pf5-mini-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pf5-block p,
.pf5-mini-section p {
  margin: 0;
  color: #3a3f46;
  line-height: 1.55;
}

.pf5-block ul,
.pf5-mini-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.pf5-constructs {
  color: var(--primary-dark) !important;
}

.pf5-length {
  padding: 10px 12px;
  border-left: 3px solid rgba(79, 184, 102, 0.24);
  background: #fbfcfd;
  color: var(--muted) !important;
}

.start-form {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.start-form label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 720;
}

.start-form input {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
}

.workspace-rule {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(79, 184, 102, 0.2);
  border-radius: 8px;
  background: #fbfcfd;
}

.workspace-rule strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.workspace-rule p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.file-drop {
  padding: 16px;
  border: 1px dashed rgba(79, 184, 102, 0.34);
  border-radius: 8px;
  background: #fbfcfd;
}

.process-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.process-panel p {
  margin: 0;
  color: var(--ink);
  font-weight: 680;
}

.process-panel ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.process-panel li.done {
  color: var(--primary-dark);
}

.process-panel li.active {
  color: var(--ink);
  font-weight: 720;
}

.home-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(79, 184, 102, 0.055) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #f7f8fa 0%, #f2f4f6 48%, #f4f5f7 100%);
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 98px;
  padding: 16px 28px;
  background: rgba(244, 245, 247, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.home-identity {
  color: inherit;
  text-decoration: none;
}

.brand-copy {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-top: 1px;
}

.brand-wordmark {
  display: block;
  width: 214px;
  max-width: min(42vw, 260px);
  height: auto;
  max-height: 45px;
  object-fit: contain;
  object-position: left center;
}

.home-topbar .brand-wordmark {
  width: 244px;
}

.brand-word {
  position: relative;
  display: inline-block;
  width: max-content;
  margin: 0;
  color: var(--logo-word);
  font-family: "Calibri Light", Calibri, "Aptos", "Aptos Display", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-word::before {
  content: none;
}

.brand-word::after {
  content: none;
}

.home-identity h1 {
  margin: 0;
  color: #4b535e;
  font-size: 0.75rem;
  font-weight: 330;
}

.home-shell main {
  display: grid;
  gap: 68px;
  width: 100%;
  min-width: 0;
  max-width: 1720px;
  margin: 0 auto;
  padding: 74px clamp(28px, 4vw, 76px) 88px;
  overflow: hidden;
}

.home-shell h2,
.home-shell h3 {
  color: #4a525d;
  font-weight: 620;
}

.home-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(430px, 0.72fr);
  gap: clamp(48px, 6vw, 108px);
  align-items: center;
  min-height: min(660px, calc(100vh - 120px));
}

.home-intro {
  min-width: 0;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.hero-kicker .eyebrow {
  margin: 0;
  color: #526f7e;
  letter-spacing: 0.06em;
}

.home-intro h2 {
  max-width: min(720px, 100%);
  margin-top: 0;
  font-size: clamp(2.25rem, 3.45vw, 3.55rem);
  font-weight: 560;
  line-height: 1.08;
  background: linear-gradient(112deg, #4f5d67 0%, #617d8b 54%, #8ca1ac 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0;
  overflow-wrap: normal;
  text-wrap: balance;
}

.home-lede {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.home-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.home-proof-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: #606b77;
  border: 1px solid rgba(215, 220, 226, 0.88);
  border-left-color: var(--sun-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  font-weight: 660;
}

.continue-strip {
  display: inline-flex;
  align-items: center;
  max-width: 620px;
  min-height: 42px;
  margin-top: 28px;
}

.continue-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 620px);
  max-width: 100%;
  padding: 10px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}

.continue-link span,
.continue-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.continue-link strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-band {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 620px;
  justify-self: end;
}

.console-head {
  display: grid;
  gap: 8px;
  padding: 0 2px 2px;
}

.console-head h3 {
  max-width: 420px;
  margin: 0;
  color: #4b535e;
  font-size: 1.28rem;
  line-height: 1.25;
}

.start-option,
.demo-pane,
.trust-band article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.start-option {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 18px;
}

.start-hub {
  gap: 24px;
  padding: clamp(22px, 2.4vw, 30px);
  background: rgba(255, 255, 255, 0.82);
}

.primary-option {
  border-color: var(--line);
  box-shadow: 0 18px 42px rgba(32, 35, 38, 0.07);
}

.start-option h3,
.demo-after h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.36rem;
}

.review-entry {
  gap: 14px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.review-entry p:not(.eyebrow):not(.home-status) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.path-card {
  position: relative;
  overflow: hidden;
}

.path-card::before {
  content: none;
}

.path-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.path-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #536779;
  border: 1px solid var(--sun-line);
  border-radius: 999px;
  background: var(--sun-soft);
  font-size: 0.76rem;
  font-weight: 720;
}

.path-head h3 {
  font-size: 1.08rem;
}

.path-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.writing-entry {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.54);
}

.writing-entry .ghost {
  justify-self: stretch;
  margin-left: 0;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.start-methods {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.method-panel {
  align-content: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.method-panel h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.method-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

.home-form {
  display: grid;
  gap: 15px;
}

.home-form label {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 680;
}

.home-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.start-combined {
  max-width: 100%;
}

.input-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
  text-transform: uppercase;
}

.input-divider::before,
.input-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.home-form input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 0 12px;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.home-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.topic-brief small {
  color: var(--muted);
  font-size: 0.76rem;
}

.topic-brief {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(79, 184, 102, 0.18);
  border-radius: 8px;
  background: #fbfcfd;
}

.topic-brief p {
  margin: 0;
  line-height: 1.45;
}

.section-head {
  display: grid;
  gap: 6px;
  max-width: 780px;
}

.section-head h2 {
  font-size: 1.7rem;
}

.workspace-preview {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  padding: 10px 0 6px;
}

.preview-copy {
  display: grid;
  gap: 10px;
  max-width: 480px;
}

.preview-copy h2 {
  margin: 0;
  color: #48515d;
  font-size: clamp(1.6rem, 2.1vw, 2.35rem);
  line-height: 1.14;
}

.preview-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

.preview-window {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(215, 220, 226, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 60px rgba(32, 35, 38, 0.08);
}

.preview-bar {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 250, 0.84);
}

.preview-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6f8192;
}

.preview-bar strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-bar em {
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}

.preview-body {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  min-height: 330px;
}

.preview-body aside {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(242, 244, 246, 0.72);
}

.preview-body aside div {
  min-height: 42px;
  padding: 12px;
  color: var(--ink);
  border: 1px solid rgba(215, 220, 226, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
}

.preview-main {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
}

.preview-kicker {
  margin: 0;
  color: #5c6f81;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.preview-body h3 {
  margin: 0 0 2px;
  color: #48515d;
  font-size: 1.52rem;
  line-height: 1.2;
}

.preview-line {
  width: 84%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c5cbd2, rgba(197, 203, 210, 0.2));
}

.preview-line.wide {
  width: 100%;
}

.preview-note {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 16px;
  border-left: 4px solid rgba(79, 184, 102, 0.22);
  background: rgba(255, 255, 255, 0.66);
}

.preview-note strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.preview-note span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.preview-chip {
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  padding: 7px 11px;
  color: #536779;
  border: 1px solid var(--sun-line);
  border-radius: 999px;
  background: var(--sun-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-chip.muted-chip {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.transformation-demo,
.pf-home {
  display: grid;
  gap: 24px;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.demo-pane {
  padding: 24px;
}

.demo-label {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.demo-pane p:not(.demo-label) {
  margin: 0;
  color: #3a3f46;
  font-size: 1rem;
  line-height: 1.78;
}

.demo-after {
  border-color: rgba(79, 184, 102, 0.28);
  background: #fbfcfd;
}

.demo-after h3 {
  margin-bottom: 8px;
}

.demo-after small {
  display: inline-block;
  margin-top: 14px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 680;
}

.capability-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.capability-flow article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 186px;
  padding: 18px;
  border: 1px solid rgba(215, 220, 226, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  scroll-snap-align: start;
}

.capability-flow span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  color: #657486;
  border: 1px solid rgba(79, 184, 102, 0.18);
  border-radius: 999px;
  background: rgba(238, 243, 247, 0.76);
  font-size: 0.72rem;
  font-weight: 680;
}

.capability-flow h3 {
  margin: 0;
  color: #4a525d;
  font-size: 1rem;
  font-weight: 660;
}

.capability-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.52;
}

.trust-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.trust-band article {
  padding: 18px;
}

.trust-band p,
.local-note {
  color: var(--muted);
  line-height: 1.58;
}

.trust-band p {
  margin: 10px 0 0;
}

.local-note {
  margin: 0;
  font-size: 0.88rem;
}

.logo-options-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(79, 184, 102, 0.055) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #f7f8fa 0%, #f2f4f6 100%);
}

.logo-options-main {
  display: grid;
  gap: 34px;
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 74px 0 88px;
}

.logo-options-intro {
  display: grid;
  gap: 10px;
  max-width: 700px;
}

.logo-options-intro h2 {
  max-width: 620px;
  color: #4a525d;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  font-weight: 560;
  line-height: 1.08;
}

.logo-options-intro p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.logo-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(215, 220, 226, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.logo-grid svg {
  width: 100%;
  max-width: 142px;
  aspect-ratio: 1;
  justify-self: center;
  margin: 6px 0 10px;
  fill: none;
  stroke: #405f70;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.logo-grid svg circle {
  fill: rgba(111, 147, 166, 0.2);
}

.logo-grid svg .soft {
  stroke: rgba(79, 184, 102, 0.55);
}

.logo-grid span {
  color: #657486;
  font-size: 0.72rem;
  font-weight: 680;
}

.logo-grid h3 {
  margin: 0;
  color: #4a525d;
  font-size: 1.05rem;
  font-weight: 660;
}

.logo-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading {
    order: 1;
  }

  .source-rail {
    order: 2;
  }

  .source-rail {
    position: static;
    max-height: none;
  }

  .reading {
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  body.tool-screen .tool-panel.active {
    grid-template-columns: minmax(0, 1fr);
  }

  body.tool-screen .pf5-output {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .home-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    min-height: auto;
  }

  .start-band {
    max-width: 100%;
    justify-self: stretch;
  }

  .workspace-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-copy {
    max-width: 680px;
  }

  .capability-flow {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }

  .logo-grid {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --drawer-width: 100vw;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .home-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  h1 {
    white-space: normal;
  }

  .actions {
    flex-wrap: wrap;
  }

  .ghost,
  .primary {
    flex: 1;
  }

  .qa-float {
    right: 16px;
    bottom: 16px;
    width: 136px;
    min-height: 50px;
  }

  .workspace {
    padding: 12px 12px 88px;
  }

  .reading {
    padding: 20px 16px 42px;
  }

  .home-shell main {
    gap: 40px;
    padding: 34px 14px 42px;
  }

  .home-intro h2 {
    max-width: 100%;
    font-size: 2rem;
    line-height: 1.08;
    text-wrap: normal;
  }

  .home-lede {
    max-width: 100%;
  }

  .home-proof-strip {
    gap: 8px;
  }

  .continue-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .continue-link strong {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .demo-grid,
  .trust-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .capability-flow {
    grid-template-columns: repeat(5, minmax(220px, 78vw));
    margin-right: -14px;
    padding-right: 14px;
  }

  .logo-options-main {
    width: calc(100vw - 28px);
    padding: 34px 0 48px;
  }

  .logo-grid {
    grid-template-columns: repeat(5, minmax(220px, 78vw));
    margin-right: -14px;
    padding-right: 14px;
  }

  .path-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .writing-entry .ghost {
    margin-left: 0;
  }

  .workspace-preview {
    gap: 20px;
  }

  .preview-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-body aside {
    display: none;
  }

  .preview-main {
    padding: 20px;
  }

  .capability-flow article {
    min-height: auto;
    padding: 18px;
  }

  .clarify-drawer {
    top: auto;
    bottom: 0;
    width: 100vw;
    height: min(72vh, 620px);
    border-top: 1px solid var(--line);
    border-left: 0;
    transform: translateY(104%);
  }

  .clarify-drawer.open {
    transform: translateY(0);
  }
}
