:root {
  --ink: #18222b;
  --muted: #687780;
  --line: rgba(24, 34, 43, 0.12);
  --line-strong: rgba(24, 34, 43, 0.2);
  --surface: rgba(255, 255, 255, 0.86);
  --paper: #f2f7f9;
  --cyan: #009cdf;
  --cyan-deep: #0079ad;
  --cyan-soft: #e3f6fd;
  --lime: #9cc613;
  --lime-soft: #f0f7d7;
  --warn: #df8b22;
  --warn-soft: #fff3df;
  --shadow: 0 24px 70px rgba(27, 57, 70, 0.12);
  --radius: 20px;
  --font-ui: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(242, 247, 249, 0.92)),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(0, 156, 223, 0.035) 80px),
    repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(0, 156, 223, 0.035) 80px),
    var(--paper);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 156, 223, 0.3);
  outline-offset: 3px;
}

svg {
  display: block;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.ambient-one {
  top: 70px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 174, 249, 0.14), transparent 68%);
}

.ambient-two {
  bottom: -240px;
  left: -140px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(156, 198, 19, 0.1), transparent 68%);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(18px, 3.5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
}

.brand img {
  display: block;
  width: 138px;
  height: auto;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4d5c65;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.demo-label__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(156, 198, 19, 0.13);
}

.topbar__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.demo-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  background: white;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: rgba(0, 156, 223, 0.38);
  color: var(--cyan-deep);
  transform: rotate(-18deg);
}

.page-shell {
  width: min(1480px, calc(100% - clamp(24px, 5vw, 80px)));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 0 28px;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 34px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 9px;
  color: var(--cyan-deep);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(35px, 4.3vw, 68px);
  font-weight: 720;
  letter-spacing: -0.052em;
  line-height: 0.99;
  text-wrap: balance;
}

.intro__copy {
  max-width: 690px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
}

.intro__controls {
  flex: 0 0 auto;
  min-width: 252px;
}

.primary-button {
  display: inline-flex;
  min-height: 52px;
  padding: 8px 20px 8px 10px;
  border: 0;
  border-radius: 999px;
  align-items: center;
  gap: 11px;
  color: white;
  background: var(--ink);
  box-shadow: 0 14px 30px rgba(24, 34, 43, 0.2);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  background: var(--cyan-deep);
  box-shadow: 0 16px 34px rgba(0, 121, 173, 0.22);
  transform: translateY(-2px);
}

.primary-button.is-playing {
  background: var(--cyan-deep);
}

.button-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  background: white;
}

.button-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.primary-button.is-playing .button-icon svg {
  fill: none;
  stroke: currentColor;
}

.control-hint {
  margin: 10px 0 0 8px;
  color: #7b8990;
  font-size: 11px;
  line-height: 1.4;
}

.flow-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 0 24px;
  gap: 8px;
}

.flow-track {
  position: absolute;
  right: 8%;
  bottom: 8px;
  left: 8%;
  height: 2px;
  overflow: hidden;
  background: rgba(24, 34, 43, 0.09);
}

.flow-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-step {
  position: relative;
  display: flex;
  padding: 10px 8px 13px;
  border: 0;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #89959b;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease;
}

.flow-step::after {
  position: absolute;
  right: 8px;
  bottom: -20px;
  left: 8px;
  z-index: 2;
  height: 8px;
  border: 3px solid var(--paper);
  border-radius: 99px;
  background: #cad4d9;
  content: "";
  transition: background 240ms ease, transform 240ms ease;
}

.flow-step:hover {
  color: var(--ink);
}

.flow-step.is-active {
  color: var(--ink);
}

.flow-step.is-active::after {
  background: var(--cyan);
  transform: scale(1.35);
}

.flow-step.is-complete::after {
  background: var(--lime);
}

.flow-step__number {
  color: currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.flow-step span:last-child {
  display: grid;
  gap: 2px;
}

.flow-step strong {
  font-size: 13px;
}

.flow-step small {
  color: #95a1a7;
  font-size: 10px;
}

.story-guide {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 82px;
  margin: 4px 0 14px;
  padding: 15px 22px 17px;
  border: 1px solid rgba(24, 34, 43, 0.1);
  border-radius: 18px;
  align-items: center;
  gap: 17px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(230, 246, 252, 0.72));
  box-shadow: 0 12px 30px rgba(27, 57, 70, 0.07);
  transition: border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.story-guide.is-playing {
  border-color: rgba(0, 156, 223, 0.28);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(220, 243, 252, 0.84));
  box-shadow: 0 14px 36px rgba(0, 121, 173, 0.1);
}

.story-guide.is-paused {
  border-color: rgba(223, 139, 34, 0.25);
}

.story-guide__counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--cyan-deep);
  font-family: var(--font-mono);
}

.story-guide__counter strong {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.08em;
  line-height: 1;
}

.story-guide__counter span {
  color: #9aa5aa;
  font-size: 9px;
  font-weight: 700;
}

.story-guide__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.story-guide__copy > span {
  color: var(--cyan-deep);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-guide__copy > strong {
  font-size: 13px;
  letter-spacing: -0.015em;
}

.story-guide__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.story-guide__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(24, 34, 43, 0.06);
}

.story-guide__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition-property: width;
  transition-timing-function: linear;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(620px, 1.18fr);
  min-height: 760px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.panel {
  min-width: 0;
}

.source-panel {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 251, 0.82));
}

.source-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 115px;
  height: 115px;
  border-bottom: 1px solid rgba(0, 156, 223, 0.12);
  border-left: 1px solid rgba(0, 156, 223, 0.12);
  background:
    linear-gradient(135deg, transparent 49.5%, rgba(0, 156, 223, 0.07) 50%);
  content: "";
  pointer-events: none;
}

.order-panel {
  display: flex;
  padding: clamp(24px, 3vw, 40px);
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.unread-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 3px solid rgba(0, 156, 223, 0.13);
  border-radius: 50%;
  background: var(--cyan);
  box-sizing: content-box;
}

.email-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin-top: 29px;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--cyan), var(--cyan-deep));
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(0, 156, 223, 0.2);
}

.email-meta div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.email-meta strong {
  font-size: 13px;
}

.email-meta span,
.email-meta time {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-subject {
  display: grid;
  margin-top: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  gap: 7px;
}

.email-subject span {
  color: #8a979d;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-subject strong {
  font-size: 16px;
  line-height: 1.35;
}

.email-body {
  padding: 13px 0 12px;
  color: #46545c;
  font-size: 13px;
  line-height: 1.72;
}

.email-body p {
  margin: 11px 0;
}

.email-body mark {
  padding: 2px 3px;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

body[data-sequence]:not([data-sequence="0"]):not([data-sequence="1"]) .email-body mark {
  color: #006f9e;
  background: rgba(0, 156, 223, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 156, 223, 0.08);
}

.email-body.story-focus {
  border-radius: 12px;
  background: rgba(227, 246, 253, 0.54);
  box-shadow:
    0 0 0 8px rgba(227, 246, 253, 0.54),
    inset 0 0 0 1px rgba(0, 156, 223, 0.12);
}

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

.attachment {
  display: flex;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.78);
}

.attachment__icon {
  display: grid;
  width: 32px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 6px;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
}

.attachment__icon--sheet {
  color: #3a7c22;
  background: #e8f5df;
}

.attachment__icon--image {
  color: #8d5a00;
  background: #fff0c7;
}

.attachment span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.attachment strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment small {
  color: var(--muted);
  font-size: 8px;
}

.source-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.source-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.source-footer svg {
  width: 15px;
  height: 15px;
}

.source-footer__status {
  padding: 5px 8px;
  border-radius: 999px;
  color: #6d5b26;
  background: #fff4ce;
  font-weight: 800;
  transition: color 220ms ease, background 220ms ease;
}

body[data-step]:not([data-step="0"]) .source-footer__status {
  color: #47710a;
  background: var(--lime-soft);
}

.processing-state {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: white;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease;
}

.processing-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #abb6bb;
  transition: background 220ms ease, box-shadow 220ms ease;
}

body[data-step]:not([data-step="0"]) .processing-state {
  border-color: rgba(156, 198, 19, 0.34);
  color: #527613;
  background: var(--lime-soft);
}

body[data-step]:not([data-step="0"]) .processing-state span {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(156, 198, 19, 0.14);
}

.order-summary {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.7fr;
  margin-top: 25px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(248, 251, 252, 0.9);
}

.summary-cell {
  display: grid;
  min-width: 0;
  min-height: 65px;
  padding: 12px 13px;
  border-right: 1px solid var(--line);
  align-content: center;
  gap: 6px;
}

.summary-cell:last-child {
  border-right: 0;
}

.summary-cell small {
  color: var(--muted);
  font-size: 9px;
}

.summary-cell strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body [data-sequence] {
  transition:
    opacity 680ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 680ms ease,
    background 420ms ease,
    box-shadow 420ms ease;
}

body [data-sequence]:not(.is-visible) {
  opacity: 0;
  filter: blur(3px);
  pointer-events: none;
  transform: translateY(12px);
}

.skeleton-value:not(.is-visible) {
  position: relative;
  display: block;
  width: 78%;
  min-height: 12px;
  border-radius: 5px;
  background: #e6ecef;
  color: transparent;
  filter: none;
  opacity: 1;
  transform: none;
}

.skeleton-value:not(.is-visible)::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  content: "";
  animation: skeleton 1.8s linear infinite;
  transform: translateX(-100%);
}

.story-focus {
  position: relative;
  z-index: 3;
  box-shadow:
    inset 0 0 0 2px rgba(0, 156, 223, 0.22),
    0 15px 38px rgba(0, 121, 173, 0.13);
}

.source-panel.story-focus,
.order-panel.story-focus {
  box-shadow:
    inset 0 0 0 3px rgba(0, 156, 223, 0.16),
    0 18px 46px rgba(0, 121, 173, 0.11);
}

.order-summary.story-focus {
  border-color: rgba(0, 156, 223, 0.32);
  background: rgba(227, 246, 253, 0.72);
}

.product-row.story-focus {
  z-index: 1;
  background: linear-gradient(90deg, rgba(227, 246, 253, 0.9), rgba(255, 255, 255, 0.84));
  box-shadow: inset 4px 0 0 var(--cyan);
}

.checks-block.story-focus {
  border-radius: 14px;
  box-shadow:
    0 0 0 8px rgba(0, 156, 223, 0.055),
    inset 0 0 0 1px rgba(0, 156, 223, 0.15);
}

.draft-block.story-focus,
.status-block.story-focus {
  border-color: rgba(0, 156, 223, 0.4);
  box-shadow:
    0 0 0 6px rgba(0, 156, 223, 0.06),
    0 14px 30px rgba(0, 121, 173, 0.1);
}

@keyframes skeleton {
  to {
    transform: translateX(100%);
  }
}

.order-block {
  margin-top: 22px;
}

.block-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  gap: 12px;
}

.block-title > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.block-title > div > span {
  color: var(--cyan-deep);
  font-family: var(--font-mono);
  font-size: 9px;
}

.block-title h3,
.draft-block h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: -0.015em;
}

.count-chip,
.check-summary,
.status-note {
  color: var(--muted);
  font-size: 9px;
}

.count-chip,
.check-summary {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf3f6;
  font-weight: 750;
}

.product-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.product-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1.2fr) minmax(120px, 0.85fr) auto;
  min-height: 66px;
  padding: 9px 12px;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.product-row + .product-row {
  border-top: 1px solid var(--line);
}

.board-preview {
  position: relative;
  display: grid;
  width: 46px;
  height: 40px;
  place-items: center;
}

.board-preview::before {
  width: 34px;
  height: 25px;
  border: 1px solid rgba(49, 73, 85, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(199, 229, 240, 0.58));
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.9),
    0 6px 12px rgba(24, 63, 80, 0.11);
  content: "";
}

.board-preview::after {
  position: absolute;
  bottom: 4px;
  width: 28px;
  height: 3px;
  border-radius: 50%;
  background: rgba(24, 34, 43, 0.1);
  filter: blur(2px);
  content: "";
}

.board-preview--rect::before {
  border-radius: 3px;
}

.board-preview--hex::before {
  width: 29px;
  height: 29px;
  border-color: rgba(0, 114, 178, 0.28);
  background: linear-gradient(145deg, rgba(26, 159, 220, 0.92), rgba(0, 92, 157, 0.78));
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}

.product-main,
.product-option {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.product-main strong,
.product-option strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-main span,
.product-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quantity {
  min-width: 42px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 750;
}

.quantity small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.check-card {
  display: flex;
  min-width: 0;
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  align-items: flex-start;
  gap: 7px;
  background: rgba(255, 255, 255, 0.74);
}

.check-card--ok {
  border-color: rgba(156, 198, 19, 0.22);
  background: rgba(240, 247, 215, 0.56);
}

.check-card--warn {
  border-color: rgba(223, 139, 34, 0.23);
  background: rgba(255, 243, 223, 0.66);
}

.check-icon {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 50%;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.check-card--ok .check-icon {
  color: #5e810f;
  background: #e3f0b8;
}

.check-card--warn .check-icon {
  color: #9b5a0e;
  background: #fce1b9;
}

.check-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.check-card > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.check-card strong {
  overflow: hidden;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-card small {
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.35;
}

.draft-block,
.status-block {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 156, 223, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(227, 246, 253, 0.74), rgba(255, 255, 255, 0.82));
}

.draft-block__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.draft-block .panel-kicker {
  margin-bottom: 5px;
  font-size: 8px;
}

.draft-badge {
  padding: 4px 7px;
  border-radius: 999px;
  color: #765f28;
  background: #fff0c7;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.draft-block p {
  margin: 10px 0;
  color: #53636b;
  font-size: 9px;
  line-height: 1.55;
}

.draft-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.draft-actions button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--cyan-deep);
  font-size: 8px;
  font-weight: 800;
  opacity: 1;
}

.draft-actions span {
  color: var(--muted);
  font-size: 7.5px;
}

.status-block {
  border-color: rgba(156, 198, 19, 0.2);
  background: linear-gradient(135deg, rgba(240, 247, 215, 0.64), rgba(255, 255, 255, 0.85));
}

.status-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 16px;
  gap: 5px;
}

.status-line::before {
  position: absolute;
  top: 6px;
  right: 7%;
  left: 7%;
  height: 1px;
  background: rgba(24, 34, 43, 0.15);
  content: "";
}

.status-item {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.status-item > span {
  width: 12px;
  height: 12px;
  border: 3px solid #f8fbf1;
  border-radius: 50%;
  background: #c6d0d3;
  box-sizing: content-box;
}

.status-item.is-current > span {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(156, 198, 19, 0.16);
}

.status-item strong {
  font-size: 7.5px;
}

.status-item small {
  color: var(--muted);
  font-size: 6.5px;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 21px;
  border-top: 1px solid var(--line);
  gap: 18px;
}

.step-caption {
  display: grid;
  gap: 4px;
}

.step-caption span {
  color: var(--cyan-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-caption strong {
  font-size: 10px;
}

.next-button {
  display: inline-flex;
  min-height: 39px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  align-items: center;
  gap: 9px;
  color: white;
  background: var(--ink);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.next-button:hover {
  background: var(--cyan-deep);
  transform: translateY(-1px);
}

.next-button svg {
  width: 14px;
  height: 14px;
}

.concept-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 4px 0;
  gap: 20px;
}

.concept-note > div {
  display: flex;
  max-width: 820px;
  align-items: flex-start;
  gap: 10px;
}

.concept-note__icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.concept-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.concept-note a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--cyan-deep);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.concept-note a:hover {
  text-decoration: underline;
}

.concept-note a svg {
  width: 14px;
  height: 14px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: flex;
  max-width: calc(100vw - 44px);
  padding: 11px 15px 11px 10px;
  border: 1px solid rgba(156, 198, 19, 0.32);
  border-radius: 13px;
  align-items: center;
  gap: 10px;
  color: #30430b;
  background: rgba(247, 251, 233, 0.96);
  box-shadow: 0 16px 36px rgba(40, 58, 15, 0.16);
  font-size: 10px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast__icon {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  place-items: center;
  color: #5f810d;
  background: #e4f0ba;
}

.toast__icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(360px, 0.78fr) minmax(540px, 1.22fr);
  }

  .page-shell {
    width: min(1100px, calc(100% - 32px));
  }

  .checks-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .check-card:nth-child(4),
  .check-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .demo-label {
    display: none;
  }

  .intro {
    align-items: flex-start;
  }

  .intro__controls {
    min-width: 230px;
  }

  .flow-step {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .flow-step small {
    display: none;
  }

  .flow-step__number {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .source-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-panel {
    min-height: 760px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 60px;
    padding: 9px 16px;
  }

  .brand img {
    width: 112px;
  }

  .demo-badge {
    display: none;
  }

  .page-shell {
    width: min(100% - 24px, 620px);
    padding-top: 30px;
  }

  .intro {
    display: grid;
    margin-bottom: 26px;
  }

  .intro h1 {
    font-size: clamp(36px, 11vw, 54px);
  }

  .intro__controls {
    min-width: 0;
  }

  .flow-nav {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .flow-nav::-webkit-scrollbar {
    display: none;
  }

  .flow-step {
    min-width: 58px;
    padding-inline: 2px;
  }

  .flow-step strong {
    font-size: 9px;
  }

  .story-guide {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 88px;
    padding: 14px 15px 16px;
    border-radius: 14px;
    gap: 12px;
  }

  .story-guide__counter strong {
    font-size: 24px;
  }

  .story-guide__copy > strong {
    font-size: 11px;
  }

  .story-guide__copy p {
    font-size: 8px;
  }

  .workspace {
    min-height: 0;
    border-radius: 20px;
  }

  .source-panel,
  .order-panel {
    padding: 22px 18px;
  }

  .email-meta {
    grid-template-columns: auto 1fr;
  }

  .email-meta time {
    display: none;
  }

  .attachment-row {
    grid-template-columns: 1fr;
  }

  .order-panel {
    min-height: 900px;
  }

  .order-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-cell:nth-child(2) {
    border-right: 0;
  }

  .summary-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .product-row {
    grid-template-columns: 44px 1fr auto;
    padding-block: 11px;
  }

  .product-option {
    display: none;
  }

  .checks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .check-card:last-child {
    grid-column: span 2;
  }

  .draft-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-line {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 16px;
  }

  .status-line::before {
    display: none;
  }

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

  .next-button {
    justify-content: center;
  }

  .concept-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 430px) {
  .source-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-header .processing-state {
    align-self: flex-start;
  }

  .block-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .checks-grid {
    grid-template-columns: 1fr;
  }

  .check-card:last-child {
    grid-column: auto;
  }

  .status-note {
    max-width: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
