:root {
  color-scheme: light;
  --ink: #17242d;
  --muted: #637079;
  --paper: #f3f0e9;
  --surface: #fffdf8;
  --line: #d8d7d0;
  --accent: #ff6846;
  --accent-soft: #ffe2d9;
  --green: #1f8f65;
  --green-soft: #dff4e9;
  --blue: #4e63d8;
  --blue-soft: #e5e9ff;
  --shadow: 0 24px 70px rgba(23, 36, 45, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 104, 70, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(78, 99, 216, 0.12), transparent 28rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.26;
  pointer-events: none;
}

.page-glow-left {
  top: 38%;
  left: -10rem;
  background: var(--accent);
}

.page-glow-right {
  right: -10rem;
  bottom: 4%;
  background: var(--blue);
}

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid rgba(23, 36, 45, 0.14);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(48px, 8vw, 110px);
  align-items: end;
  padding: 86px 0 64px;
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d49b38;
  box-shadow: 0 0 0 4px rgba(212, 155, 56, 0.13);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 143, 101, 0.13);
}

.status-dot.offline {
  background: #c64e42;
  box-shadow: 0 0 0 4px rgba(198, 78, 66, 0.13);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin: 24px 0 22px;
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 670px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-list span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #4d5961;
  background: rgba(255, 253, 248, 0.5);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.flow-card {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(23, 36, 45, 0.12);
  border-radius: 24px;
  list-style: none;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.flow-card li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
}

.flow-card li + li {
  border-top: 1px solid var(--line);
}

.flow-number {
  color: var(--accent);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.flow-card strong,
.flow-card small {
  display: block;
}

.flow-card strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.flow-card small {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.form-card,
.request-card,
.mail-card {
  border: 1px solid rgba(23, 36, 45, 0.13);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-card {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 30px;
}

.section-heading,
.result-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.section-heading h2,
.request-card h2,
.result-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.method-badge {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

form {
  margin-top: 36px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin: 0 0 8px 2px;
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #faf9f5;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input {
  height: 52px;
  padding: 0 16px;
}

.field textarea {
  min-height: 142px;
  padding: 15px 16px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa1a5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(78, 99, 216, 0.11);
}

.counter {
  display: block;
  margin-top: 6px;
  color: #8a9398;
  text-align: right;
  font-size: 11px;
}

.form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #58636a;
  background: #f0efe9;
  font-size: 12px;
}

.form-note span {
  display: grid;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font: 700 11px/1 Georgia, serif;
}

.form-note p {
  margin: 0;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--ink);
  box-shadow: 0 12px 30px rgba(23, 36, 45, 0.2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #263843;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.76;
}

.button-arrow {
  font-size: 18px;
}

.button-loader {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.submit-button.loading .button-loader {
  display: block;
}

.submit-button.loading .button-arrow {
  display: none;
}

.form-message {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 12px;
  color: #87382e;
  background: #ffe8e2;
  font-size: 13px;
}

.form-message.success {
  color: #176b4d;
  background: var(--green-soft);
}

.request-card {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4vw, 38px);
  border-radius: 30px;
  color: white;
  background: var(--ink);
}

.request-card::after {
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 240px;
  height: 240px;
  border: 50px solid rgba(255, 104, 70, 0.72);
  border-radius: 50%;
  content: "";
}

.request-card .section-kicker {
  color: #aab4ba;
}

.request-card h2 {
  max-width: 330px;
  margin-top: 10px;
  color: white;
}

.request-card > p {
  position: relative;
  z-index: 1;
  margin: 22px 0 32px;
  color: #b8c1c6;
  font-size: 14px;
}

.request-facts {
  position: relative;
  z-index: 1;
  margin: 0;
}

.request-facts div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.request-facts dt {
  color: #96a2a9;
  font-size: 12px;
}

.request-facts dd {
  margin: 0;
  text-align: right;
  font-size: 12px;
  font-weight: 750;
}

.result-section {
  padding: 92px 0 40px;
}

.result-section[hidden] {
  display: none;
}

.success-kicker {
  color: var(--green);
}

.result-heading p {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--muted);
}

.request-id {
  max-width: 300px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.64);
}

.request-id span,
.request-id code {
  display: block;
}

.request-id span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.request-id code {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-strip {
  display: grid;
  grid-template-columns: 0.55fr 0.7fr 0.7fr 2fr;
  margin: 30px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
}

.analysis-strip > div {
  min-width: 0;
  padding: 17px 19px;
}

.analysis-strip > div + div {
  border-left: 1px solid var(--line);
}

.analysis-strip span,
.analysis-strip strong {
  display: block;
}

.analysis-strip span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-strip strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.analysis-reply strong {
  white-space: normal;
}

.mail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mail-card {
  overflow: hidden;
  border-radius: 24px;
}

.mail-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8f6f1;
}

.mail-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mail-title strong,
.mail-title small {
  display: block;
}

.mail-title strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.mail-title small {
  color: var(--muted);
  font-size: 10px;
}

.mail-icon {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 850;
}

.owner-icon {
  color: #cc4b30;
  background: var(--accent-soft);
}

.client-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.delivery-badge {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-badge.failed {
  color: #a64034;
  background: #ffe3dc;
}

.mail-meta {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.mail-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 4px 0;
  font-size: 11px;
}

.mail-meta dt {
  color: var(--muted);
}

.mail-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-body {
  min-height: 280px;
  margin: 0;
  padding: 24px 22px 28px;
  overflow-x: auto;
  color: #34434c;
  background: var(--surface);
  font: 12px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding: 26px 0 36px;
  border-top: 1px solid rgba(23, 36, 45, 0.14);
  color: var(--muted);
  font-size: 11px;
}

footer p {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .hero {
    gap: 40px;
    padding-top: 62px;
  }

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

  .flow-card li {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .flow-card li + li {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

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

  .analysis-reply {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0 !important;
  }

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

@media (max-width: 620px) {
  .topbar,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 70px;
  }

  .brand > span:last-child,
  .nav a:nth-child(n + 2) {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

  h1 {
    font-size: clamp(43px, 14vw, 64px);
  }

  .flow-card {
    display: block;
  }

  .flow-card li {
    grid-template-columns: 38px 1fr;
  }

  .flow-card li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .form-card,
  .request-card {
    border-radius: 22px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .result-heading,
  .section-heading {
    display: block;
  }

  .method-badge {
    display: inline-block;
    margin-top: 14px;
  }

  .request-id {
    max-width: none;
    margin-top: 18px;
  }

  .analysis-strip {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-strip > div + div {
    border-left: 0;
  }

  .analysis-strip > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .analysis-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .analysis-reply {
    grid-column: 1 / -1;
  }

  .mail-toolbar {
    align-items: flex-start;
  }

  .mail-body {
    min-height: 0;
  }

  footer {
    display: block;
  }

  footer p + p {
    margin-top: 4px;
  }
}

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