:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f3f7ff;
  --text: #17212f;
  --muted: #59697c;
  --border: #dbe3ef;
  --accent: #2f6df6;
  --accent-dark: #1f57d6;
  --accent-soft: #e8efff;
  --success: #17643d;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(21, 52, 117, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 12% 18%, #eef4ff 0, transparent 36%),
    radial-gradient(circle at 88% 8%, #e9fff8 0, transparent 30%),
    var(--bg);
  font: 16px/1.6 "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  position: relative;
}

body.beta-locked {
  overflow: hidden;
}

body.beta-locked > *:not(#beta-gate) {
  filter: blur(10px) saturate(0.88);
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

.beta-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
}

.beta-gate-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 18%, rgba(71, 112, 255, 0.24) 0, transparent 38%),
    radial-gradient(circle at 78% 78%, rgba(39, 184, 140, 0.18) 0, transparent 34%), rgba(6, 14, 24, 0.82);
  backdrop-filter: blur(10px);
}

.beta-gate-card {
  position: relative;
  width: min(680px, calc(100% - 20px));
  border: 1px solid #355176;
  border-radius: 18px;
  background: linear-gradient(175deg, #0f1f35 0%, #132945 100%);
  box-shadow: 0 30px 80px rgba(4, 9, 18, 0.58);
  padding: 28px 28px 24px;
  text-align: left;
}

.beta-gate-kicker {
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(160, 194, 255, 0.42);
  border-radius: 999px;
  background: rgba(85, 131, 255, 0.2);
  color: #dbe8ff;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
}

.beta-gate-card h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  line-height: 1.25;
  color: #f4f8ff;
}

.beta-gate-copy {
  margin: 12px 0 0;
  color: #c8d8ee;
  font-size: 1rem;
  max-width: 62ch;
}

.beta-gate-form {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}

.beta-gate-form label {
  font-size: 0.79rem;
  color: #a8c1e4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.beta-gate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.beta-gate-row input {
  width: 100%;
  border: 1px solid #49658a;
  border-radius: 11px;
  background: #f4f8ff;
  color: #12253e;
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 13px;
}

.beta-gate-row button {
  border: 1px solid #5d84c9;
  border-radius: 11px;
  background: linear-gradient(180deg, #75a5ff 0%, #4d7ee0 100%);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 17px;
  cursor: pointer;
}

.beta-gate-row button:hover {
  background: linear-gradient(180deg, #6c9cf4 0%, #3f6ec9 100%);
}

.beta-gate-note {
  margin: 10px 0 0;
  color: #a7bddb;
  font-size: 0.83rem;
}

.beta-gate-error {
  margin: 10px 0 0;
  color: #ffd2cf;
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 560px) {
  .beta-gate-card {
    padding: 18px 16px 16px;
  }

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

  .beta-gate-row button {
    width: 100%;
  }
}

.bg-orb {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(1px);
  will-change: transform;
}

.bg-orb-a {
  --orb-size: clamp(180px, 22vmin, 360px);
  width: var(--orb-size);
  height: var(--orb-size);
  top: clamp(58px, 9vh, 90px);
  left: calc(var(--orb-size) * -0.26);
  background: rgba(74, 132, 255, 0.22);
  animation: orbFloatA 12s ease-in-out infinite alternate;
}

.bg-orb-b {
  --orb-size: clamp(170px, 20vmin, 320px);
  width: var(--orb-size);
  height: var(--orb-size);
  bottom: clamp(44px, 8vh, 80px);
  right: calc(var(--orb-size) * -0.24);
  background: rgba(45, 211, 161, 0.18);
  animation: orbFloatB 14s ease-in-out infinite alternate;
}

@keyframes orbFloatA {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(36px, -22px, 0) scale(1.05);
  }

  100% {
    transform: translate3d(68px, -40px, 0) scale(1.08);
  }
}

@keyframes orbFloatB {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-34px, 20px, 0) scale(1.04);
  }

  100% {
    transform: translate3d(-60px, 36px, 0) scale(1.07);
  }
}

.container {
  width: min(1120px, calc(100% - 72px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(219, 227, 239, 0.8);
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.brand {
  justify-self: start;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.08rem;
}

.center-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.center-nav a {
  text-decoration: none;
  color: #33465f;
  font-weight: 600;
}

.center-nav a:hover {
  color: var(--accent);
}

.coffee-btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  border: 0;
  background: none;
  padding: 0;
}

.coffee-btn-image {
  display: block;
  width: 160px;
  max-width: 160px;
  height: auto;
  border: 0;
  box-shadow: none;
}

.coffee-btn:hover .coffee-btn-image {
  filter: brightness(0.97);
}

.coffee-btn:focus,
.coffee-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.hero {
  text-align: center;
  padding: 94px 0 78px;
}

.eyebrow {
  margin: 0;
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #cfdcff;
  border-radius: 999px;
  padding: 4px 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  font-size: 0.74rem;
}

h1 {
  margin: 16px auto 18px;
  max-width: 900px;
  font-size: clamp(2.2rem, 3.8vw, 3.55rem);
  line-height: 1.13;
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 860px;
  color: var(--muted);
  font-size: 1.07rem;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  background: linear-gradient(180deg, #3e7bff 0%, #2f6df6 100%);
  color: #fff;
  border-radius: 11px;
  padding: 14px 24px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(47, 109, 246, 0.26);
}

.primary-cta:hover {
  background: linear-gradient(180deg, #346ef0 0%, #255ad0 100%);
}

.section {
  text-align: center;
  padding: 78px 0;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.22;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.section-copy {
  margin: 0 auto;
  max-width: 780px;
  color: var(--muted);
}

.section-copy.subtle {
  margin-top: 7px;
}

.queue-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.queue-status.queue-alert {
  color: #8d3d44;
  background: #f9e7ea;
  border: 1px solid #efc7cd;
  border-radius: 10px;
  padding: 8px 12px;
}

.how-section {
  padding-top: 34px;
}

.how-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 30px;
  align-items: center;
}

.how-copy {
  min-width: 0;
}

.how-visual {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-self: center;
}

.pipeline-demo {
  margin: 0;
  width: min(100%, 420px);
  max-width: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.pipeline-canvas {
  position: relative;
  min-height: 208px;
}

.pipeline-phase {
  position: absolute;
  inset: 0;
  min-height: 178px;
  border: 1px solid #d7e2f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fbff 0%, #f1f6ff 100%);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
}

.dropzone-mini {
  width: 138px;
  height: 78px;
  border: 2px dashed #94add7;
  border-radius: 12px;
  background: #f5f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dropZoneFlash 11s ease-in-out infinite;
}

.dropzone-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #466289;
}

.drag-group {
  position: absolute;
  left: 16px;
  top: 84px;
  width: 40px;
  height: 52px;
  animation: dragGroupMove 11s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.drag-zip-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: auto;
}

.drag-cursor {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 12px;
  height: auto;
  transform: rotate(-3deg);
  filter: drop-shadow(0 2px 3px rgba(33, 56, 94, 0.25));
}

.process-core {
  width: 176px;
  border-radius: 12px;
  border: 1px solid #bdd0f2;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  padding: 12px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.process-core::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(111, 167, 255, 0.24) 48%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-125%);
  animation: processSweep 2.1s ease-in-out infinite;
}

.process-dotline {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 10px;
}

.process-dotline span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #87a9e8;
  animation: processDot 1.2s ease-in-out infinite;
}

.process-dotline span:nth-child(2) {
  animation-delay: 0.2s;
}

.process-dotline span:nth-child(3) {
  animation-delay: 0.4s;
}

.process-bar {
  height: 11px;
  border-radius: 999px;
  background: #d6e3fb;
  position: relative;
  overflow: hidden;
}

.process-bar::after {
  content: "";
  position: absolute;
  left: -42%;
  top: 0;
  height: 100%;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5ea3ff 0%, #2f6df6 100%);
  animation: processFill 1.8s ease-in-out infinite;
}

.bar-a::after {
  animation-delay: 0s;
}

.bar-b::after {
  animation-delay: 0.25s;
}

.bar-c::after {
  animation-delay: 0.45s;
}

.download-card-mini {
  width: 214px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #bcd0f2;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 10px 20px rgba(62, 89, 143, 0.14);
  animation: docxLift 11s ease-in-out infinite;
}

.doc-download-icon {
  width: 50px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 10px rgba(62, 89, 143, 0.2));
}

.download-copy {
  display: grid;
  gap: 5px;
  min-width: 120px;
  justify-items: center;
  text-align: center;
}

.download-status {
  color: #1f5a3a;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #21b26b;
  box-shadow: 0 0 0 4px rgba(33, 178, 107, 0.18);
  animation: statusPulse 2.2s ease-in-out infinite;
}

.download-button-mini {
  margin-top: 2px;
  display: inline-block;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1d4ec0;
  background: #e8f0ff;
  border: 1px solid #b6ccfb;
  border-radius: 999px;
  padding: 2px 8px;
  cursor: pointer;
  line-height: 1.2;
}

.download-button-mini:hover {
  background: #dce8ff;
}

.phase-upload {
  animation: phaseUpload 11s ease-in-out infinite;
}

.phase-process {
  animation: phaseProcess 11s ease-in-out infinite;
}

.phase-ready {
  animation: phaseReady 11s ease-in-out infinite;
}

@keyframes phaseUpload {
  0%,
  29% {
    opacity: 1;
    transform: scale(1);
  }

  36%,
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

@keyframes phaseProcess {
  0%,
  30% {
    opacity: 0;
    transform: scale(0.96);
  }

  36%,
  62% {
    opacity: 1;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

@keyframes phaseReady {
  0%,
  63% {
    opacity: 0;
    transform: scale(0.96);
  }

  70%,
  95% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

@keyframes dragGroupMove {
  0%,
  8% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }

  10% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  27% {
    transform: translate(71px, -49px) scale(0.88);
    opacity: 1;
  }

  33% {
    transform: translate(71px, -49px) scale(0.88);
    opacity: 1;
  }

  36%,
  100% {
    transform: translate(71px, -49px) scale(0.88);
    opacity: 0;
  }
}

@keyframes dropZoneFlash {
  0%,
  18%,
  100% {
    border-color: #94add7;
    box-shadow: none;
  }

  20%,
  30% {
    border-color: #3a77ef;
    box-shadow: 0 0 0 5px rgba(58, 119, 239, 0.15);
  }
}

@keyframes processDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes processFill {
  0% {
    left: -42%;
    opacity: 0.2;
  }

  35% {
    opacity: 1;
  }

  100% {
    left: 104%;
    opacity: 0.4;
  }
}

@keyframes processSweep {
  0% {
    transform: translateX(-125%);
    opacity: 0;
  }

  20% {
    opacity: 0.85;
  }

  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes loadingTextSweep {
  from {
    background-position: 0 50%;
  }

  to {
    background-position: calc(var(--sweep-distance, 460px) * -1) 50%;
  }
}

@keyframes textHighlightSweep {
  from {
    transform: translateX(-220px);
  }

  to {
    transform: translateX(520px);
  }
}

@keyframes progressIndeterminate {
  0% {
    transform: translateX(-140%);
  }

  100% {
    transform: translateX(340%);
  }
}

@keyframes docxLift {
  0%,
  64%,
  100% {
    transform: translateY(8px);
    opacity: 0.6;
  }

  74% {
    transform: translateY(0);
    opacity: 1;
  }

  84% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.76;
    box-shadow: 0 0 0 2px rgba(33, 178, 107, 0.12);
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(33, 178, 107, 0.18);
  }
}

@keyframes dragActivePulse {
  from {
    box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.42), inset 0 0 0 2px rgba(47, 109, 246, 0.2);
  }

  to {
    box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.56), inset 0 0 0 2px rgba(47, 109, 246, 0.3);
  }
}

.upload-card {
  margin: 0;
  width: min(100%, 420px);
  min-height: 0;
  justify-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  transition: min-height 180ms ease;
}

.upload-card.is-busy {
  min-height: 304px;
}

.upload-card.is-ready {
  min-height: 332px;
}

.upload-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 30px;
  align-items: start;
}

.upload-copy {
  min-width: 0;
  max-width: 620px;
  text-align: left;
}

.upload-copy h2 {
  max-width: 620px;
}

.upload-copy .section-copy {
  margin-left: 0;
  margin-right: 0;
  max-width: 520px;
}

.file-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #9fb2cb;
  border-radius: 10px;
  padding: 20px 14px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 40ms linear, background-color 40ms linear, box-shadow 40ms linear, transform 40ms linear;
}

.file-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-name {
  color: var(--muted);
  font-size: 0.98rem;
  text-align: center;
  min-width: 0;
  font-weight: 600;
}

.file-selection-actions {
  margin-top: -2px;
  min-height: 26px;
  margin-bottom: -24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.clear-file-btn {
  border: 1px solid #e6b9b9;
  background: #fff3f3;
  color: #8f3a3a;
  font-size: 0.76rem;
  font-weight: 650;
  border-radius: 999px;
  padding: 5px 11px;
  line-height: 1.1;
  cursor: pointer;
}

.clear-file-btn:hover {
  background: #ffe9e9;
  border-color: #d8a4a4;
  color: #7a2e2e;
}

.file-field.drag-active {
  border-color: #2f6df6;
  background: linear-gradient(180deg, #eff5ff 0%, #dceaff 100%);
  box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.45), inset 0 0 0 2px rgba(47, 109, 246, 0.24);
  transform: scale(1.01);
  animation: dragActivePulse 850ms ease-in-out infinite alternate;
}

.file-field.drag-active .file-name {
  color: #174a9f;
  font-weight: 700;
}

.preflight-wrap {
  margin-top: 12px;
  border: 1px solid #dbe4f5;
  background: #f9fbff;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
}

.preflight-title {
  margin: 0 0 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #32455f;
}

.preflight-findings {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.preflight-item {
  font-size: 0.83rem;
}

.preflight-item.level-info {
  color: #2b4768;
}

.preflight-item.level-warning {
  color: #8a5a00;
}

.preflight-item.level-error {
  color: #b3261e;
}

.assumption-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
}

.assumption-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 44, 0.42);
}

.assumption-dialog {
  position: relative;
  width: min(820px, calc(100% - 36px));
  max-height: min(90vh, 860px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(17, 37, 72, 0.2);
  background: #fff;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  transition: max-height 180ms ease;
}

.assumption-modal.is-dropdown-open .assumption-dialog {
  max-height: min(94vh, 920px);
}

.assumption-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.assumption-header h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #1d3351;
}

.assumption-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.assumption-close {
  border: 1px solid #c7d5ec;
  background: #f8fbff;
  color: #264265;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.assumption-loading {
  padding: 12px 18px 0;
  display: grid;
  gap: 8px;
}

.assumption-loading-text {
  --sweep-distance: 460px;
  --sweep-base: #5f7391;
  margin: 2px 0 0;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  background: linear-gradient(
    90deg,
    var(--sweep-base) 0%,
    var(--sweep-base) 44%,
    #ffffff 50%,
    var(--sweep-base) 56%,
    var(--sweep-base) 100%
  );
  background-size: var(--sweep-distance) 100%;
  background-repeat: repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  will-change: background-position;
  animation: loadingTextSweep 2.1s linear infinite;
}

.assumption-loading-text.subtle {
  font-size: 0.78rem;
  opacity: 0.9;
}

.assumption-shimmer-row {
  height: 12px;
  border-radius: 999px;
  background: #e8eef9;
  position: relative;
  overflow: hidden;
}

.assumption-shimmer-row.short {
  width: 62%;
}

.assumption-shimmer-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 24%,
    rgba(255, 255, 255, 0.78) 48%,
    rgba(255, 255, 255, 0) 72%
  );
  transform: translateX(-125%);
  animation: processSweep 1.8s ease-in-out infinite;
}

.assumption-step {
  min-height: 0;
  max-height: 54vh;
  overflow: auto;
  padding: 12px 18px 8px;
  transition: min-height 180ms ease, max-height 180ms ease, padding-bottom 180ms ease;
}

.assumption-modal.is-dropdown-open .assumption-step {
  min-height: 320px;
  max-height: 62vh;
}

.assumption-question {
  border: 1px solid #dbe4f5;
  background: #f9fbff;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 8px;
}

.assumption-question-group {
  margin: 0;
  font-size: 0.8rem;
  color: #405977;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.assumption-question-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.assumption-question-head h4 {
  margin: 0;
  font-size: 1rem;
  color: #1f3558;
}

.assumption-detected-value {
  margin: 0;
  font-size: 0.82rem;
  color: #446188;
  font-weight: 600;
}

.assumption-question.processing .assumption-question-group,
.assumption-question.processing .assumption-question-head h4,
.assumption-question.processing .assumption-desc,
.assumption-question.processing .assumption-detected-value {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  position: relative;
  overflow: hidden;
}

.assumption-question.processing .assumption-question-group::after,
.assumption-question.processing .assumption-question-head h4::after,
.assumption-question.processing .assumption-desc::after,
.assumption-question.processing .assumption-detected-value::after {
  content: "";
  position: absolute;
  inset: -1px;
  width: 220px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 8%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0) 92%
  );
  pointer-events: none;
  animation: textHighlightSweep 2.1s linear infinite;
}

.assumption-desc {
  margin: 0;
  font-size: 0.83rem;
  color: #53657d;
}

.assumption-select,
.assumption-other {
  width: 100%;
  border: 1px solid #c5d5ef;
  border-radius: 9px;
  background: #fff;
  color: #1f3558;
  font: inherit;
  font-size: 0.86rem;
  padding: 8px 10px;
}

.assumption-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%234e6484' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 10px 6px;
}

.assumption-select-native {
  display: none;
}

.assumption-combobox {
  position: relative;
}

.assumption-combobox-trigger {
  width: 100%;
  border: 1px solid #c5d5ef;
  border-radius: 10px;
  background: #fff;
  color: #1f3558;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 10px 40px 10px 12px;
  position: relative;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.assumption-combobox-trigger::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 10px;
  height: 6px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%234e6484' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.assumption-combobox.is-open .assumption-combobox-trigger {
  border-color: #88a7d9;
  box-shadow: 0 0 0 3px rgba(76, 122, 199, 0.12);
}

.assumption-combobox.is-open .assumption-combobox-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.assumption-combobox-label {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.assumption-combobox-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 18;
  border: 1px solid #c5d5ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 26px rgba(27, 55, 96, 0.2);
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assumption-combobox-search {
  width: 100%;
  border: 1px solid #c5d5ef;
  border-radius: 9px;
  background: #fff;
  color: #1f3558;
  font: inherit;
  font-size: 0.84rem;
  padding: 8px 10px;
}

.assumption-combobox-search::placeholder {
  color: #6a7f9f;
}

.assumption-combobox-list {
  max-height: 280px;
  overflow: auto;
  display: block;
  padding: 0;
  background: #fff;
  border-radius: 8px;
}

.assumption-combobox-option {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #1f3558;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  padding: 8px 6px;
  cursor: pointer;
  border-bottom: 1px solid #eaf0fb;
}

.assumption-combobox-option:hover {
  background: #f6f9ff;
}

.assumption-combobox-option:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(78, 116, 191, 0.2);
}

.assumption-combobox-option.is-selected {
  background: #eef4ff;
  font-weight: 700;
}

.assumption-combobox-empty {
  padding: 8px 9px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #5a6f90;
  font-size: 0.82rem;
}

.assumption-other {
  margin-top: 5px;
}

.assumption-static-value {
  font-size: 0.86rem;
  color: #1f3558;
  font-weight: 600;
}

.assumption-checks-wrap {
  border-top: 1px solid var(--border);
  padding: 10px 18px 6px;
  text-align: left;
}

.assumption-checks-title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: #4f627f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.assumption-checks {
  margin: 0;
  padding-left: 18px;
  max-height: 17vh;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.assumption-checks li {
  font-size: 0.81rem;
}

.assumption-checks li.level-warning {
  color: #845300;
}

.assumption-checks li.level-error {
  color: #b3261e;
}

.assumption-actions {
  border-top: 1px solid var(--border);
  padding: 12px 18px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.assumption-btn {
  flex: 0 0 auto;
  border-radius: 9px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.assumption-btn.secondary {
  border-color: #b9cbe8;
  background: #f7faff;
  color: #28508b;
}

.assumption-btn.primary {
  background: #17212f;
  color: #fff;
  border-color: #17212f;
}

.assumption-btn.primary:hover:enabled {
  background: #0f1826;
}

.assumption-confirm {
  border: 1px solid #dbe4f5;
  background: #f9fbff;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}

.assumption-confirm-intro {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: #2e4668;
  font-weight: 650;
}

.assumption-confirm-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: #2d4464;
  font-size: 0.83rem;
}

.assumption-confirm-checks {
  margin-top: 10px;
  border: 1px solid #e5d5b2;
  background: #fff9ec;
  border-radius: 8px;
  padding: 8px 10px;
}

.assumption-confirm-checks-title {
  margin: 0 0 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6f4f07;
  font-weight: 700;
}

.assumption-confirm-checks-list {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
  font-size: 0.81rem;
}

.assumption-confirm-checks-list li.level-warning {
  color: #845300;
}

.assumption-confirm-checks-list li.level-error {
  color: #b3261e;
}

.assumption-final-convert {
  margin: 14px auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  background: #1d8a4e;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(29, 138, 78, 0.24);
}

.assumption-final-convert:hover:enabled {
  background: #157141;
}

.assumption-final-convert:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.assumption-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.assumption-empty {
  margin: 0;
  color: #53657d;
  font-size: 0.88rem;
}

.convert-btn {
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.convert-btn:hover:enabled {
  background: #0d1522;
}

.convert-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.progress-wrap {
  margin-top: 16px;
}

.progress-bar {
  height: 9px;
  background: #dbe5f7;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #5ed0ff, var(--accent));
  transition: width 80ms linear;
}

.progress-wrap.processing .progress-fill {
  width: 100% !important;
  background: #d6e2f5;
}

.progress-wrap.processing .progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 34%;
  background: linear-gradient(
    90deg,
    rgba(116, 149, 196, 0),
    rgba(116, 149, 196, 0.86),
    rgba(116, 149, 196, 0)
  );
  animation: progressIndeterminate 2.2s linear infinite;
}

.status-text,
.success-text {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.status-text.processing {
  --sweep-distance: 460px;
  --sweep-base: #5e7698;
  background: linear-gradient(
    90deg,
    var(--sweep-base) 0%,
    var(--sweep-base) 44%,
    #ffffff 50%,
    var(--sweep-base) 56%,
    var(--sweep-base) 100%
  );
  background-size: var(--sweep-distance) 100%;
  background-repeat: repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: loadingTextSweep 2.1s linear infinite;
  animation-direction: reverse;
}

.error-box {
  margin: 10px auto 0;
  width: min(560px, 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.error-text {
  margin: 0;
  max-width: 510px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--danger);
  text-align: center;
}

.error-support-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1px solid rgba(189, 47, 47, 0.35);
  background: rgba(189, 47, 47, 0.08);
  color: var(--danger);
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.error-support-link:hover,
.error-support-link:focus-visible {
  background: rgba(189, 47, 47, 0.16);
  transform: translateY(-1px);
}

.success-text {
  color: var(--success);
}

.upload-download-card {
  margin: 12px auto 0;
  width: min(470px, 100%);
  animation: none;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.upload-download-card .doc-download-icon {
  flex: 0 0 auto;
}

.upload-download-card .download-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  min-width: 0;
  max-width: 250px;
  flex: 1 1 auto;
}

.upload-download-card .download-status {
  display: inline-flex;
  justify-content: center;
  white-space: nowrap;
}

.upload-download-card .download-button-mini {
  margin-top: 0;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1d4ec0;
  background: #e8f0ff;
  border: 1px solid #b6ccfb;
  border-radius: 999px;
  padding: 8px 16px;
  line-height: 1.2;
  box-shadow: none;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease, box-shadow 130ms ease;
}

.upload-download-card .download-button-mini:hover {
  background: #cddfff;
  border-color: #7fa6eb;
  color: #123b95;
  box-shadow: 0 2px 8px rgba(24, 73, 166, 0.16);
}

.download-file-name {
  display: inline-block;
  max-width: 240px;
  font-size: 0.74rem;
  color: #4d6484;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-download-card .download-file-name {
  max-width: 100%;
}

.download-duration {
  display: inline-block;
  margin-top: 1px;
  font-size: 0.78rem;
  color: #3f5f8a;
  font-weight: 700;
}

.result-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #ead7aa;
  border-radius: 10px;
  background: #fff9eb;
  color: #6f4f07;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: justify;
}

.note-help {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle;
  isolation: isolate;
}

.note-help-trigger {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d7ba72;
  color: #7a5a13;
  background: #fff3cf;
  line-height: 1;
  transform: translateY(1px);
  cursor: help;
}

.note-help-glyph {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-0.4px);
}

.note-help-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  width: min(320px, 78vw);
  border: 1px solid #d8c48f;
  border-radius: 9px;
  background: #fffdf6;
  box-shadow: 0 10px 22px rgba(90, 70, 18, 0.14);
  color: #63470a;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  padding: 8px 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 4;
}

.note-help::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 44px;
  height: 10px;
}

.note-help-popover a {
  color: #1a4fc2;
  text-decoration: none;
  margin-left: 4px;
  font-size: 0.95rem;
}

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

.note-help:hover .note-help-popover,
.note-help:focus-within .note-help-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hidden {
  display: none;
}

.steps {
  margin: 0;
  max-width: 100%;
  padding-left: 22px;
  text-align: left;
  display: grid;
  gap: 18px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.faq-list {
  margin: 18px auto 0;
  max-width: 820px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 10px 0 0;
  color: var(--muted);
}

.examples-structure-section {
  padding-top: 70px;
}

.examples-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  text-align: left;
}

.limitations-layout {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.examples-copy h1 {
  margin: 0 0 14px;
  max-width: 720px;
}

.examples-copy .hero-sub {
  margin: 0 0 14px;
  max-width: 700px;
}

.examples-copy .section-copy {
  margin: 0 0 14px;
  max-width: 700px;
}

.limitations-layout .examples-copy {
  max-width: 860px;
  margin: 0 auto;
}

.limitations-list {
  margin: 20px 0 24px;
  display: grid;
  gap: 14px;
}

.limitation-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.limitation-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #2a3f59;
}

.limitation-card .section-copy {
  margin: 0 0 8px;
  max-width: none;
}

.limitation-card .section-copy:last-child {
  margin-bottom: 0;
}

.examples-checklist {
  margin: 0 0 26px;
  padding-left: 20px;
  color: #2f4158;
}

.examples-checklist li {
  margin-bottom: 8px;
}

.examples-visual {
  min-width: 0;
  display: flex;
  align-items: center;
}

.explorer-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.explorer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: #f7f9fe;
  padding: 11px 14px;
  color: #32455f;
  font-size: 0.85rem;
}

.explorer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9c9e6;
}

.explorer-dot:nth-child(1) {
  background: #88a6df;
}

.explorer-dot:nth-child(2) {
  background: #8ad3b6;
}

.explorer-dot:nth-child(3) {
  background: #f1c189;
}

.explorer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  min-height: 360px;
}

.explorer-tree-wrap {
  border-right: 1px solid var(--border);
  padding: 12px;
  background: #fff;
}

.explorer-tree {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #2f4058;
}

.explorer-tree-root,
.explorer-tree-children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.explorer-tree-children {
  margin-left: 10px;
}

.explorer-node details {
  margin-left: 2px;
}

.explorer-node summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 3px 6px;
  border-radius: 7px;
}

.explorer-node summary::marker,
.explorer-node summary::-webkit-details-marker {
  display: none;
  content: "";
}

.explorer-node summary:hover {
  background: #eff4ff;
}

.explorer-folder::before {
  content: "▸";
  margin-right: 6px;
  color: #5f77a3;
}

.explorer-node details[open] > summary.explorer-folder::before {
  content: "▾";
}

.explorer-file-btn {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  width: 100%;
  font: inherit;
  padding: 3px 6px 3px 26px;
  border-radius: 7px;
  cursor: pointer;
}

.explorer-file-btn::before {
  content: "•";
  color: #7d95be;
  margin-right: 8px;
}

.explorer-file-btn:hover {
  background: #eff4ff;
}

.explorer-file-btn.active {
  background: #e6efff;
  color: #1d3f80;
}

.explorer-preview {
  padding: 14px;
  background: #f9fbff;
}

.preview-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #647892;
  font-weight: 700;
}

.preview-path {
  margin: 0 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  color: #1f3558;
  font-weight: 700;
  word-break: break-word;
}

.preview-icon-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 8px;
}

.preview-icon {
  width: 86px;
  height: 104px;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.preview-icon::after {
  content: none;
}

.preview-ext {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2b4d87;
}

.preview-icon-img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.preview-kind {
  margin: 0;
  font-size: 0.86rem;
  color: #4f6076;
  text-align: center;
}

.preview-icon.is-fallback {
  border-color: #8db2f7;
  background: linear-gradient(180deg, #edf4ff 0%, #dfeaff 100%);
}

.legal-section {
  padding-top: 36px;
}

.legal-shell {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}

.legal-shell h1 {
  margin: 0 0 8px;
  line-height: 1.2;
}

.legal-shell h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.legal-shell .section-copy {
  margin: 0;
}

.legal-meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-list {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-list li + li {
  margin-top: 7px;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding: 24px 0 34px;
}

.footer-inner {
  display: flex;
  justify-content: center;
  gap: 26px;
  align-items: center;
}

.footer-inner a {
  text-decoration: none;
  color: #44566e;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.footer-inner a:hover {
  color: var(--accent);
}

@media (max-width: 1080px) {
  .container {
    width: min(1120px, calc(100% - 46px));
  }

  .header-inner {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    padding: 8px 0;
  }

  .center-nav {
    gap: 16px;
  }

  .center-nav a {
    font-size: 0.95rem;
  }

  .coffee-btn {
    padding: 0;
  }

  .coffee-btn-image {
    width: 146px;
    max-width: 146px;
    height: auto;
  }

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

  .file-name {
    min-width: 0;
    text-align: center;
  }

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

  .explorer-body {
    grid-template-columns: 1fr;
  }

  .explorer-tree-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .how-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 22px;
  }

  .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 22px;
  }

  .upload-card {
    width: min(100%, 390px);
  }

  .how-visual {
    justify-content: center;
  }

  .pipeline-demo {
    width: min(100%, 390px);
    padding: 16px;
  }

  .pipeline-phase {
    min-height: 156px;
  }
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    padding: 14px 0;
  }

  .brand,
  .coffee-btn {
    justify-self: center;
  }
}

@media (max-width: 960px) {
  .assumption-dialog {
    width: calc(100% - 18px);
    max-height: 92vh;
  }

  .assumption-modal.is-dropdown-open .assumption-dialog {
    max-height: 95vh;
  }

  .assumption-step {
    min-height: 0;
    max-height: 46vh;
  }

  .assumption-modal.is-dropdown-open .assumption-step {
    min-height: 280px;
    max-height: 54vh;
  }

  .assumption-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .assumption-btn {
    width: auto;
  }

  .examples-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .how-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .upload-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .upload-card {
    width: 100%;
    min-height: 0;
    justify-content: flex-start;
  }

  .upload-card.is-busy,
  .upload-card.is-ready {
    min-height: 0;
  }

  .upload-copy {
    text-align: center;
  }

  .upload-copy .section-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .how-visual {
    justify-content: center;
  }

  .upload-download-card {
    width: 100%;
    justify-content: center;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .upload-download-card .download-button-mini {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* Dashboard */
.dashboard-page .container {
  width: min(1240px, calc(100% - 56px));
}

.dashboard-page.is-locked {
  overflow: hidden;
}

.dashboard-main {
  padding: 30px 0 72px;
}

.dashboard-content {
  position: relative;
  z-index: 1;
}

.dashboard-lock {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 21, 33, 0.45);
  backdrop-filter: blur(5px);
}

.dashboard-lock.hidden {
  display: none;
}

.dashboard-lock-card {
  width: min(520px, 100%);
  background: #f8fbff;
  border: 1px solid #d8e3f5;
  border-radius: 16px;
  box-shadow: 0 24px 56px rgba(11, 32, 58, 0.26);
  padding: 22px;
}

.dashboard-lock-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.dashboard-lock-copy {
  margin: 0 0 14px;
  color: #4a5e78;
}

.dashboard-lock-card .dashboard-auth-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.dashboard-auth-error {
  margin: 10px 0 0;
  border-radius: 10px;
  border: 1px solid #efb9c0;
  background: #fdeef0;
  color: #9d2130;
  padding: 10px 12px;
  font-weight: 600;
}

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

.dashboard-title-wrap h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.55rem);
}

.dashboard-title-wrap p {
  margin: 0;
  color: var(--muted);
  max-width: 740px;
}

.dashboard-auth-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.dashboard-auth-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.dashboard-token-row {
  display: flex;
  gap: 10px;
}

.dashboard-token-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.dashboard-token-row button,
.dashboard-controls button,
.dashboard-card-actions button,
.events-filters button,
.events-pagination button {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-token-row button:hover,
.dashboard-controls button:hover,
.dashboard-card-actions button:hover,
.events-filters button:hover,
.events-pagination button:hover {
  background: var(--accent-dark);
}

.dashboard-token-row button:disabled,
.dashboard-controls button:disabled,
.events-pagination button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-token-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.dashboard-range-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-range-group label {
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-range-group input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
}

.dashboard-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-status[data-tone="ok"] {
  color: var(--success);
}

.dashboard-status[data-tone="error"] {
  color: var(--danger);
}

.dashboard-error {
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid #efb9c0;
  background: #fdeef0;
  color: #9d2130;
  padding: 10px 12px;
  font-weight: 600;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: var(--shadow);
}

.kpi-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.kpi-card p {
  margin: 7px 0 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text);
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.5fr 1fr;
  margin-bottom: 14px;
}

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.dashboard-card-map {
  min-height: 460px;
}

.dashboard-card-trend {
  grid-column: 1 / -1;
  position: relative;
}

.dashboard-card-resource {
  grid-column: 1 / -1;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-card-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.dashboard-card-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.map-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #fafdff 0%, #eef5ff 100%);
  overflow: hidden;
  min-height: 350px;
}

#country-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#country-map:active {
  cursor: grabbing;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  background: rgba(22, 33, 47, 0.94);
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.8rem;
  max-width: 260px;
}

.map-legend {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.88rem;
}

.map-legend-gradient {
  width: 180px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #d3deef;
  background: linear-gradient(90deg, #e8efff 0%, #2f6df6 100%);
}

.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px;
  align-items: center;
  gap: 10px;
}

.funnel-title {
  font-size: 0.89rem;
  font-weight: 700;
  color: #3d4f65;
}

.funnel-bar-wrap {
  height: 11px;
  background: #ecf1fb;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #dde6f5;
}

.funnel-bar {
  height: 100%;
  background: linear-gradient(90deg, #68a0ff 0%, #2f6df6 100%);
}

.funnel-meta {
  text-align: right;
  color: var(--muted);
  font-size: 0.82rem;
}

#trend-chart {
  width: 100%;
  height: 260px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
}

.trend-grid {
  stroke: #e4ebf8;
  stroke-width: 1;
}

.trend-axis-label {
  fill: #6b7f99;
  font-size: 11px;
}

.trend-empty {
  fill: #72829a;
  font-size: 14px;
}

.trend-hover-guide {
  stroke: #556f97;
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.trend-hover-dot {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.12));
}

.trend-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #41556f;
  font-size: 0.86rem;
}

.trend-legend-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.trend-tooltip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  min-width: 210px;
  max-width: 280px;
  border: 1px solid #d5dfef;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(25, 49, 90, 0.16);
  padding: 9px 10px;
  color: #33465f;
  font-size: 0.82rem;
}

.trend-tooltip-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.trend-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0;
}

.trend-tooltip-total {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #e5ecf8;
  color: #445975;
}

.resource-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.resource-kpi {
  border: 1px solid #dce7f7;
  border-radius: 10px;
  background: #f9fbff;
  padding: 8px 10px;
}

.resource-kpi h3 {
  margin: 0;
  color: #5c7291;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.resource-kpi p {
  margin: 5px 0 0;
  color: #2f4865;
  font-size: 0.98rem;
  font-weight: 800;
}

.resource-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.resource-table th,
.resource-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #e8eef8;
  vertical-align: top;
  text-align: left;
}

.resource-table th {
  background: #f6f9ff;
  color: #3e5167;
  position: sticky;
  top: 0;
}

.failure-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.failure-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e4ebf8;
  border-radius: 9px;
  padding: 8px 10px;
}

.failure-row span {
  color: #4c5f78;
}

.failure-row strong {
  color: #9d2130;
}

.dashboard-events {
  margin-bottom: 16px;
}

.events-mode-toggle {
  display: inline-flex;
  background: #eef4ff;
  border: 1px solid #d5e0f2;
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.events-mode-btn {
  border: 0;
  background: transparent;
  color: #3c516b;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.events-mode-btn.is-active {
  background: #2f6df6;
  color: #fff;
}

.events-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 90px 1fr 1fr 130px auto;
  gap: 8px;
  margin-bottom: 10px;
}

.trace-filters {
  grid-template-columns: 2fr 110px 140px auto auto;
  align-items: center;
}

.trace-important-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #445b78;
  font-size: 0.83rem;
  font-weight: 600;
}

.trace-important-toggle input {
  width: 15px;
  height: 15px;
}

.events-filters input:not([type="checkbox"]),
.events-filters select {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 9px;
  min-width: 0;
}

.trace-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 12px;
}

.trace-sessions-panel,
.trace-timeline-panel {
  border: 1px solid #d9e4f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
  padding: 12px;
}

.trace-panel-title {
  color: #3c5470;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.trace-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 575px;
  overflow: auto;
}

.trace-session-item {
  border: 1px solid #dde7f8;
  border-radius: 11px;
  background: #fff;
  text-align: left;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.trace-session-item:hover {
  border-color: #aec5ea;
  box-shadow: 0 6px 18px rgba(41, 73, 120, 0.08);
  transform: translateY(-1px);
}

.trace-session-item.is-selected {
  border-color: #2f6df6;
  background: linear-gradient(180deg, #f3f7ff 0%, #eaf1ff 100%);
  box-shadow: 0 8px 20px rgba(36, 86, 169, 0.16);
}

.trace-session-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.trace-session-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.77rem;
  color: #2a3a4f;
}

.trace-outcome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.trace-outcome-badge.tone-success,
.trace-event-badge.tone-success {
  color: #156638;
  border-color: #b8e6c8;
  background: #eaf9ef;
}

.trace-outcome-badge.tone-error,
.trace-event-badge.tone-error {
  color: #8f2430;
  border-color: #efc0c7;
  background: #fdeff2;
}

.trace-outcome-badge.tone-neutral,
.trace-event-badge.tone-neutral {
  color: #30547a;
  border-color: #cddcf0;
  background: #edf3fd;
}

.trace-session-time,
.trace-session-meta,
.trace-session-counts {
  font-size: 0.78rem;
  color: #536984;
}

.trace-session-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trace-pill {
  border: 1px solid #dbe4f3;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f8fbff;
  color: #4d6481;
  font-size: 0.74rem;
}

.trace-session-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.trace-step-chip {
  border: 1px dashed #d0dced;
  border-radius: 999px;
  padding: 2px 7px;
  color: #7185a0;
  background: #f8fbff;
  font-size: 0.72rem;
}

.trace-step-chip.is-done {
  border-style: solid;
  border-color: #b8dbbf;
  color: #1f6f3d;
  background: #ebf9ef;
}

.trace-summary {
  border: 1px solid #d8e4f5;
  border-radius: 11px;
  background: #fff;
  padding: 11px;
  color: #344a65;
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.trace-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.trace-summary-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #2f4663;
  font-size: 0.84rem;
  font-weight: 700;
}

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

.trace-stat {
  border: 1px solid #e2eaf7;
  border-radius: 9px;
  padding: 7px 8px;
  background: #f9fbff;
  display: grid;
  gap: 2px;
}

.trace-stat span {
  color: #607591;
  font-size: 0.72rem;
}

.trace-stat strong {
  color: #2f4865;
  font-size: 0.84rem;
}

.trace-summary-time {
  margin-top: 8px;
  color: #5f7490;
  font-size: 0.78rem;
}

.trace-journey-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.trace-strip-step {
  border: 1px dashed #d0dcec;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.75rem;
  color: #70839c;
  background: #f8fbff;
}

.trace-strip-step.is-done {
  border-style: solid;
  border-color: #b3d8bc;
  color: #1d6f3a;
  background: #ebf9ef;
}

.trace-timeline {
  list-style: none;
  margin: 0 0 0 12px;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 555px;
  overflow: auto;
  border-left: 2px solid #d7e4f6;
}

.trace-timeline-item {
  position: relative;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.trace-timeline-item.tone-success {
  border-color: #c7e8d0;
  background: #f8fdf9;
}

.trace-timeline-item.tone-error {
  border-color: #efcad0;
  background: #fff9fa;
}

.trace-event-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6f87ad;
  border: 2px solid #fff;
  left: -24px;
  top: 14px;
  box-shadow: 0 0 0 1px #c7d6ed;
}

.trace-timeline-item.tone-success .trace-event-dot {
  background: #2f9b53;
  box-shadow: 0 0 0 1px #b3ddbf;
}

.trace-timeline-item.tone-error .trace-event-dot {
  background: #bf3b4a;
  box-shadow: 0 0 0 1px #e6c3c9;
}

.trace-event-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.trace-event-badge {
  border-radius: 999px;
  border: 1px solid #d4deef;
  background: #f0f4fd;
  color: #355779;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
}

.trace-event-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #2f4662;
}

.trace-event-offset {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.73rem;
  color: #5e7491;
}

.trace-event-stamp {
  margin-top: 2px;
  color: #617792;
  font-size: 0.75rem;
}

.trace-event-meta {
  margin-top: 4px;
  color: #445c76;
  font-size: 0.77rem;
}

.trace-event-details {
  margin-top: 6px;
}

.trace-event-details summary {
  cursor: pointer;
  color: #43618a;
  font-size: 0.78rem;
}

.trace-event-details pre {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.74rem;
  max-height: 165px;
  overflow: auto;
  background: #f6f9ff;
  border: 1px solid #dce5f3;
  border-radius: 7px;
  padding: 7px;
}

.events-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.events-table th,
.events-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #e8eef8;
  vertical-align: top;
  text-align: left;
}

.events-table th {
  background: #f6f9ff;
  color: #3e5167;
  position: sticky;
  top: 0;
}

.events-table pre {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.74rem;
  max-width: 440px;
  max-height: 190px;
  overflow: auto;
  background: #f6f9ff;
  border: 1px solid #dce5f3;
  border-radius: 7px;
  padding: 7px;
}

.events-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

#events-page-info {
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-empty {
  color: var(--muted);
  font-style: italic;
}

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

  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .events-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trace-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trace-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .dashboard-page .container {
    width: min(1240px, calc(100% - 28px));
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .funnel-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .funnel-meta {
    text-align: left;
  }

  .events-filters {
    grid-template-columns: 1fr;
  }

  .trace-filters {
    grid-template-columns: 1fr;
  }

  .resource-kpis {
    grid-template-columns: 1fr;
  }

  .trace-summary-grid {
    grid-template-columns: 1fr;
  }

  .events-pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
