:root {
  --page: #f7f7f4;
  --paper: #ffffff;
  --ink: #171c21;
  --secondary: #46515b;
  --line: #cfd4d8;
  --line-soft: #e4e7e9;
  --accent: #173a59;
  --accent-hover: #102d46;
  --accent-soft: #eef3f7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.58 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible {
  outline: 3px solid rgba(23, 58, 89, .28);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}
.site-header {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}
.header-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
}
.header-note span:last-child { color: var(--accent); }

.document {
  width: min(780px, calc(100% - 40px));
  min-height: calc(100vh - 138px);
  margin: 0 auto;
  padding: 52px 0 64px;
}
.stage { text-align: left; }
.section-label, .progress {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}
h1, h2, h3 { color: var(--ink); }
h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 44px);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -.035em;
}
h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 680;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.lead {
  max-width: 710px;
  margin: 20px 0 0;
  color: var(--secondary);
  font-size: 19px;
  line-height: 1.5;
}
.manager-role { max-width: 710px; margin: 14px 0 0; font-size: 17px; }
.demo-note {
  max-width: 710px;
  margin: 14px 0 28px;
  color: var(--secondary);
  font-size: 16px;
}
.demo-note strong { color: var(--ink); }

.message {
  margin-top: 0;
  padding: 20px 0 21px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.message-meta strong, .message-meta span { display: block; }
.message-meta strong { font-size: 16px; }
.message-meta span, .message-meta time { color: var(--secondary); font-size: 14px; }
.message > p { max-width: 700px; margin: 16px 0 0; font-size: 17px; line-height: 1.62; }

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 50px;
  margin-top: 24px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.primary-action:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.primary-action:disabled { opacity: .62; cursor: default; }
.primary-action > span { flex-shrink: 0; }

.analysis-stage, .assignment-stage { padding-top: 10px; }
.stage-intro { max-width: 690px; margin: 14px 0 28px; color: var(--secondary); font-size: 17px; }
.task-list { border-top: 1px solid var(--line); }
.task-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.task-number { color: var(--accent); font-size: 14px; font-weight: 700; }
.task-kind { margin: 0 0 3px; color: var(--secondary); font-size: 14px; }
.task-row h3 { margin: 0; font-size: 20px; font-weight: 680; letter-spacing: -.01em; }
.task-row div > p:last-child { margin: 5px 0 0; color: var(--secondary); font-size: 15px; }

.history {
  margin-top: 26px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
}
.history-label { margin: 0 0 4px; color: var(--accent); font-size: 14px; font-weight: 700; }
.history h3 { margin: 0; font-size: 19px; font-weight: 680; }
.history p:last-child { margin: 4px 0 0; color: var(--secondary); font-size: 15px; }
.clarification { margin-top: 24px; padding: 18px 20px; background: var(--accent-soft); }
.clarification > p, .client-reply > p { margin: 0 0 6px; color: var(--accent); font-size: 14px; font-weight: 700; }
.clarification blockquote, .client-reply blockquote { margin: 0; font-size: 16px; font-style: normal; }

.assignment-stage > h2 { margin-bottom: 0; }
.client-reply { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.assignment {
  background: var(--paper);
  border: 1px solid var(--line);
}
.assignment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 2px solid var(--accent);
}
.assignment-header p { margin: 0 0 2px; color: var(--secondary); font-size: 14px; }
.assignment-header h3 { margin: 0; font-size: 26px; font-weight: 680; letter-spacing: -.02em; }
.schedule { flex: 0 0 auto; text-align: right; }
.schedule strong, .schedule span { display: block; }
.schedule strong { color: var(--accent); font-size: 17px; }
.schedule span { color: var(--secondary); font-size: 14px; }
.assignment-details { margin: 0; padding: 0 24px; }
.assignment-details > div { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--line-soft); }
.assignment-details dt { color: var(--secondary); font-size: 14px; }
.assignment-details > .assignment-reasons { grid-template-columns: 1fr; gap: 8px; }
.assignment-reasons dt { color: var(--ink); font-size: 16px; font-weight: 650; }
.assignment-details dd { margin: 0; font-size: 16px; }
.assignment-details ol, .assignment-details ul { margin: 0; padding-left: 21px; }
.assignment-details li + li { margin-top: 6px; }
.assignment-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 16px 24px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
}
.assignment-status span { color: var(--secondary); }
.result-line {
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  font-size: 17px;
  font-weight: 650;
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px 28px;
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact h3 { margin: 0; font-size: 21px; font-weight: 680; }
.contact p { margin: 4px 0 0; color: var(--secondary); font-size: 15px; }
.contact-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.telegram-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.telegram-action:hover { background: var(--accent-hover); }
.max-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 17px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.max-action:hover { background: var(--accent-soft); }
.handoff-button, .reset-button {
  min-height: 40px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.handoff-text { grid-column: 1 / -1; margin: 0 !important; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.disclosure { margin-top: 18px; color: var(--secondary); font-size: 14px; }
.disclosure summary { width: max-content; color: var(--accent); cursor: pointer; }
.disclosure p { max-width: 720px; margin: 10px 0 0; }
.reset-button { display: block; margin: 10px 0 0; }
.site-footer { min-height: 66px; border-top: 1px solid var(--line); color: var(--secondary); font-size: 14px; }
.site-footer a { color: var(--accent); font-weight: 650; }

.reveal { animation: reveal .2s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 620px) {
  .site-header, .site-footer, .document { width: calc(100% - 32px); }
  .site-header { align-items: flex-start; min-height: 0; padding: 14px 0; }
  .header-note { max-width: 235px; font-size: 14px; }
  .document { min-height: auto; padding: 34px 0 46px; }
  h1 { font-size: 32px; line-height: 1.15; }
  h2 { font-size: 28px; }
  .lead { margin-top: 16px; font-size: 17px; }
  .demo-note { margin-bottom: 22px; font-size: 16px; }
  .message { padding: 18px 0; }
  .message > p { font-size: 16px; }
  .primary-action { width: 100%; min-height: 52px; padding: 11px 15px; }
  .task-row { grid-template-columns: 36px 1fr; gap: 10px; padding: 18px 0; }
  .task-row h3 { font-size: 18px; }
  .clarification { padding: 16px; }
  .assignment-header { flex-direction: column; gap: 10px; padding: 19px 16px; }
  .schedule { text-align: left; }
  .assignment-details { padding: 0 16px; }
  .assignment-details > div { grid-template-columns: 1fr; gap: 5px; padding: 16px 0; }
  .assignment-details dt { font-weight: 700; }
  .assignment-status { align-items: flex-start; flex-direction: column; gap: 4px; padding: 15px 16px; }
  .contact { grid-template-columns: 1fr; padding: 21px 0; }
  .contact-actions { width: 100%; }
  .telegram-action { min-height: 50px; }
  .max-action { min-height: 50px; }
  .site-footer { min-height: 62px; }
}

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