:root {
  --bg: #f6f9fd;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --border: rgba(17, 85, 204, 0.14);
  --text: #0c1b3a;
  --muted: #4b5b7c;
  --blue: #1155cc;
  --blue-deep: #0b2f7d;
  --blue-soft: #e8f0ff;
  --shadow: 0 20px 55px rgba(11, 47, 125, 0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(17, 85, 204, 0.09), transparent 24%),
    radial-gradient(circle at top right, rgba(17, 85, 204, 0.06), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 36%, #edf4fb 100%);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; }

/* Home */
.home-shell {
  position: relative;
  overflow: hidden;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 22px 30px;
}
.home-ornament { position: absolute; pointer-events: none; }
.home-ornament-left {
  top: -70px;
  left: -90px;
  width: 360px;
  height: 360px;
  border-left: 14px solid rgba(17, 85, 204, 0.08);
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px rgba(17, 85, 204, 0.05);
}
.home-ornament-right {
  top: 54px;
  right: 0;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(17, 85, 204, 0.2) 0 3px, transparent 3px) 0 0 / 24px 24px;
  opacity: 0.55;
}
.home-dots {
  position: absolute;
  top: 40px;
  right: 44px;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(17, 85, 204, 0.24) 0 3px, transparent 3px) 0 0 / 22px 22px;
  opacity: 0.5;
}
.home-hero,
.home-banner,
.home-process,
.home-service-card,
.home-summary-card,
.home-card {
  position: relative;
  z-index: 1;
}
.home-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 30px 20px 18px;
}
.home-logo {
  width: min(330px, 72vw);
  height: auto;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 14px 30px rgba(17, 85, 204, 0.06));
}
.home-kicker,
.home-banner-kicker,
.home-process-kicker,
.home-service-label {
  margin: 0;
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.74rem;
}
.home-hero h1 {
  margin: 14px 0 0;
  max-width: 13ch;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.home-hero h1 span,
.home-summary-card h3,
.home-card h2,
.home-service-card h3,
.home-process-head h2,
.home-banner-copy h2 {
  color: var(--blue-deep);
}
.home-subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}
.home-capabilities {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}
.home-capabilities span { color: var(--blue); font-weight: 700; font-size: 0.95rem; }
.home-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}
.home-cta {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.home-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(17, 85, 204, 0.12); }
.home-cta-primary { background: linear-gradient(135deg, var(--blue), #1d77e8); color: #fff; border-color: transparent; }
.home-cta-secondary { background: #fff; color: var(--blue); }
.home-card-grid,
.home-service-grid,
.home-summary-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.home-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-card {
  min-height: 280px;
  padding: 26px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.home-card-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  position: relative;
}
.home-card-icon::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 10px 22px rgba(17, 85, 204, 0.2);
}
.home-card-icon-bars::before {
  clip-path: polygon(0 100%, 0 60%, 18% 60%, 18% 40%, 36% 40%, 36% 18%, 54% 18%, 54% 0, 72% 0, 72% 32%, 90% 32%, 90% 52%, 100% 52%, 100% 100%);
}
.home-card-icon-lock::before {
  clip-path: polygon(28% 42%, 28% 31%, 34% 17%, 50% 10%, 66% 17%, 72% 31%, 72% 42%, 78% 42%, 78% 82%, 22% 82%, 22% 42%);
}
.home-card h2,
.home-service-card h3,
.home-summary-card h3,
.home-process-head h2 {
  margin: 0;
  letter-spacing: -0.04em;
}
.home-card h2 { text-align: center; font-size: 1.35rem; }
.home-card p { margin: 10px 0 0; text-align: center; color: var(--muted); line-height: 1.7; }
.home-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1763dd, #0b47aa);
  color: #fff;
  box-shadow: 0 20px 50px rgba(11, 71, 170, 0.24);
}
.home-banner-copy h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.home-banner-copy p:last-child { margin: 10px 0 0; max-width: 56ch; line-height: 1.7; color: rgba(255, 255, 255, 0.9); }
.home-banner-chip {
  min-width: 128px;
  min-height: 128px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.1rem;
  font-weight: 800;
}
.home-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-summary-card {
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}
.home-summary-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.home-service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-service-card {
  padding: 22px 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.home-service-card p { color: var(--muted); line-height: 1.7; }
.home-process {
  margin-top: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.home-process-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.home-process-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}
.home-process-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 85, 204, 0.1);
  background: linear-gradient(180deg, #fff, #f7fbff);
}
.home-process-list li span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}
.home-process-list li p { margin: 0; color: var(--text); font-weight: 600; }

/* Delivery page */
.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}
.appbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 85, 204, 0.06), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(17, 85, 204, 0.12);
  box-shadow: 0 14px 28px rgba(17, 85, 204, 0.12);
  flex: none;
}
.brand-logo {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 22px;
  background: #fff;
  flex: none;
}
.appbar-kicker, .eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.appbar h1 { margin: 0; font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.status-pill, .subtle-chip, .button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: #fff;
  color: #3c4757;
  font-size: 0.88rem;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
}
.viewer-shell, .panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.viewer-shell {
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.viewer-shell::before {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 8px solid rgba(17, 85, 204, 0.08);
  pointer-events: none;
}
.viewer-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.viewer-head h2 { margin: 0; font-size: clamp(1.4rem, 2vw, 2rem); letter-spacing: -0.04em; color: var(--blue-deep); }
.viewer-head-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.doc-stage {
  position: relative;
  min-height: 1800px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: #e8ebef;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 85, 204, 0.05);
}
.doc-frame { width: 100%; height: 1800px; border: 0; background: #fff; display: block; }
.doc-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(238, 241, 244, 0.32), rgba(238, 241, 244, 0.84));
  backdrop-filter: blur(6px);
  transition: opacity 180ms ease;
}
.cover-card {
  width: min(420px, calc(100% - 32px));
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.cover-logo {
  display: block;
  width: 122px;
  max-width: 100%;
  height: auto;
  margin: 0 0 14px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(17, 85, 204, 0.12);
}
.cover-card h3 { margin: 0 0 8px; font-size: 1.6rem; letter-spacing: -0.04em; color: var(--blue-deep); }
.cover-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.sidebar-column { display: grid; gap: 14px; align-content: start; }
.panel { padding: 18px; }
.panel h3 { margin: 0; font-size: 1.05rem; color: var(--blue-deep); }
.payment-stack { display: grid; gap: 10px; margin-top: 14px; }
.project-board { display: grid; gap: 12px; margin-top: 6px; }
.project-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow);
}
.project-row-copy strong { display: block; font-size: 1rem; color: var(--blue-deep); }
.project-row-copy small { display: block; margin-top: 4px; color: var(--muted); }
.project-chip {
  min-width: 76px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 85, 204, 0.16);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.82rem;
  background: #fff;
}
.project-list { display: grid; gap: 10px; margin-top: 14px; }
.project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.project-item strong { display: block; color: var(--blue-deep); }
.project-item small { display: block; color: var(--muted); margin-top: 2px; }
.project-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 0 0 4px rgba(17, 85, 204, 0.08);
  background: #94a3b8;
}
.project-dot.is-done,
.project-row.is-done .project-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12); }
.project-dot.is-progress,
.project-row.is-progress .project-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14); }
.project-dot.is-waiting,
.project-row.is-waiting .project-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12); }
.project-item.is-done .project-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12); }
.project-item.is-progress .project-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14); }
.project-item.is-waiting .project-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12); }
.status-legend { display: grid; gap: 10px; margin-top: 14px; }
.status-legend div { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status-legend small { font-weight: 600; }
.button {
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
}
.button.primary {
  background: linear-gradient(145deg, rgba(17, 85, 204, 0.96), rgba(15, 157, 88, 0.76));
  color: #fff;
  border-color: transparent;
}
.button.ghost { background: #f9fafb; }
.fineprint { margin: 14px 0 0; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }
.download-btn.disabled { opacity: 0.42; pointer-events: none; }
.is-unlocked .doc-cover { opacity: 0; pointer-events: none; }
.is-unlocked .status-pill { border-color: rgba(15, 157, 88, 0.25); background: rgba(15, 157, 88, 0.08); color: #0f9d58; }
.is-unlocked .button.download-btn { border-color: rgba(15, 157, 88, 0.25); }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .appbar, .viewer-head { flex-direction: column; align-items: flex-start; }
  .appbar-right { justify-content: flex-start; }
  .sidebar-column, .home-card-grid, .home-summary-grid, .home-service-grid {
    grid-template-columns: 1fr;
  }
  .doc-stage, .doc-frame { min-height: 1500px; height: 1500px; }
  .workspace { padding: 12px; }
}

@media (max-width: 760px) {
  .home-shell { padding: 18px 14px 22px; }
  .home-hero { padding-inline: 6px; }
  .home-hero h1 { max-width: 100%; font-size: clamp(2.7rem, 12vw, 4.5rem); }
  .home-banner { flex-direction: column; align-items: stretch; }
  .home-banner-chip { min-width: 0; min-height: 72px; }
}
