:root {
  color-scheme: light;
  --ink: #07111f;
  --muted: #526173;
  --quiet: #788697;
  --canvas: #f6f8fb;
  --paper: #ffffff;
  --panel: #fdfefe;
  --line: #dfe5ec;
  --line-strong: #c8d2df;
  --blue: #1e5bff;
  --blue-dark: #123fb7;
  --green: #0f8a68;
  --red: #b4233b;
  --amber: #9a6700;
  --shadow: 0 18px 48px rgba(21, 35, 51, 0.08);
  --radius: 8px;
  --max-width: 1160px;
  --header-height: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 38%, #f5f7fa 100%);
}

#top,
section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px clamp(14px, 3vw, 28px);
  background: rgba(251, 252, 254, 0.76);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max-width), 100%);
  min-height: 64px;
  margin: 0 auto;
  padding: 10px 12px 10px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 26px;
  border: 1px solid rgba(223, 229, 236, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(21, 35, 51, 0.07);
}

.brand,
.brand-mark {
  display: inline-flex;
  align-items: center;
}

.brand-mark {
  width: 132px;
  height: 34px;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  font-size: 13px;
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
  color: rgba(7, 17, 31, 0.72);
}

.nav-links a:hover {
  color: var(--ink);
}

.menu-console {
  display: none;
}

.nav-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f7fa;
}

.language-switch button {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: var(--quiet);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.language-switch button.is-active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(21, 35, 51, 0.08);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 21px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: #07111f;
  box-shadow: 0 12px 24px rgba(7, 17, 31, 0.16);
}

.button-secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

.section-frame {
  width: min(var(--max-width), calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 5vw, 64px) 0 clamp(30px, 4vw, 50px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.key-panel h2,
.closing-cta h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 4.5vw, 58px);
  line-height: 1.03;
}

.hero-summary {
  max-width: 620px;
  margin: 24px 0 0;
  color: #263447;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.48;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 30px;
}

.architecture-card,
.visibility-card,
.security-principle,
.compact-item,
.key-panel,
.faq-list details,
.closing-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.architecture-card {
  margin: 0;
  padding: clamp(18px, 2.2vw, 26px);
  container-type: inline-size;
}

.architecture-card figcaption {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.flow-diagram {
  display: grid;
  grid-template-columns:
    minmax(118px, 1fr) 20px minmax(118px, 1fr) 20px
    minmax(118px, 1fr) 20px minmax(118px, 1fr);
  grid-template-areas: "n1 a1 n2 a2 n3 a3 n4";
  align-items: stretch;
  gap: 8px;
}

.flow-node.plaintext {
  grid-area: n1;
}

.flow-node.encrypt {
  grid-area: n2;
}

.flow-node.storage {
  grid-area: n3;
}

.flow-node.decrypt {
  grid-area: n4;
}

.flow-node {
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.node-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6fa;
}

.node-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.encrypt .node-icon,
.storage .node-icon {
  color: var(--blue-dark);
  border-color: #d5e1ff;
  background: #eef3ff;
}

.decrypt .node-icon {
  color: var(--green);
  border-color: #cce8df;
  background: #eef8f5;
}

.node-label {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.node-meta {
  display: block;
  margin-top: auto;
  padding-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: break-word;
}

.flow-arrow {
  position: relative;
  display: block;
  width: 20px;
  min-width: 20px;
  height: 18px;
  align-self: center;
}

.flow-arrow:nth-of-type(1) {
  grid-area: a1;
}

.flow-arrow:nth-of-type(2) {
  grid-area: a2;
}

.flow-arrow:nth-of-type(3) {
  grid-area: a3;
}

.flow-arrow::before,
.flow-arrow::after {
  position: absolute;
  top: 50%;
  content: "";
}

.flow-arrow::before {
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-0.5px);
}

.flow-arrow::after {
  right: 1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}

.crypto-note {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.crypto-note div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.crypto-note dt {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.crypto-note dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.flow-section,
.security-section,
.visibility-section,
.controls-section,
.key-section,
.faq-section,
.closing-cta {
  padding: clamp(54px, 8vw, 98px) 0;
}

.flow-section {
  padding-top: 16px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 26px;
}

.section-heading h2,
.key-panel h2,
.closing-cta h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06;
}

.timeline-grid,
.compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.timeline-step,
.compact-item {
  min-height: 220px;
  padding: 22px;
}

.timeline-step {
  border-top: 1px solid var(--line);
}

.step-number {
  display: block;
  margin-bottom: 44px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
}

h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.16;
  font-weight: 850;
}

p {
  margin: 0;
}

.timeline-step p,
.security-principle p,
.compact-item p,
.key-panel p,
.faq-list p,
.footer-copy p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.security-principle {
  min-height: 198px;
  padding: 22px;
}

.security-principle.emphasized {
  color: #ffffff;
  background: #07111f;
  border-color: #07111f;
}

.security-principle.emphasized h3,
.security-principle.emphasized p {
  color: #ffffff;
}

.visibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.visibility-card {
  padding: 24px;
}

.visibility-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visibility-card h3::before {
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
}

.can-see h3::before {
  background: var(--amber);
}

.cannot-see h3::before {
  background: var(--green);
}

.visibility-card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.visibility-card li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

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

.compact-item {
  min-height: 176px;
}

.key-panel {
  padding: clamp(26px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 32px;
  align-items: center;
}

.key-panel p {
  max-width: 620px;
  font-size: 16px;
}

.key-lifecycle {
  display: grid;
  gap: 10px;
  counter-reset: key-step;
}

.key-lifecycle span {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  background: #f8fafc;
  counter-increment: key-step;
}

.key-lifecycle span::before {
  content: counter(key-step, decimal-leading-zero);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.faq-list summary::marker {
  color: var(--blue-dark);
}

.closing-cta {
  margin-bottom: 38px;
  padding: clamp(32px, 6vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.closing-cta .hero-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.site-footer .brand-mark {
  width: 122px;
}

.footer-copy {
  text-align: right;
}

.footer-copy .app-version {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 750;
}

@container (max-width: 720px) {
  .flow-diagram {
    grid-template-columns:
      minmax(0, 1fr) 14px minmax(0, 1fr) 14px
      minmax(0, 1fr) 14px minmax(0, 1fr);
    gap: 6px;
  }

  .flow-node {
    padding: 14px;
  }

  .node-label {
    font-size: 13px;
  }

  .flow-arrow {
    width: 14px;
    min-width: 14px;
    height: 14px;
  }

  .flow-arrow::after {
    width: 6px;
    height: 6px;
  }
}

@container (max-width: 620px) {
  .flow-diagram {
    grid-template-columns: 1fr;
    grid-template-areas:
      "n1"
      "a1"
      "n2"
      "a2"
      "n3"
      "a3"
      "n4";
    gap: 5px;
  }

  .flow-node {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 5px;
    align-content: center;
    min-height: 82px;
  }

  .node-icon {
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
  }

  .node-label,
  .node-meta {
    grid-column: 2;
  }

  .node-label {
    font-size: 14px;
    text-wrap: initial;
  }

  .node-meta {
    margin: 0;
    padding: 0;
  }

  .flow-arrow {
    width: 1px;
    min-width: 0;
    height: 14px;
    margin-left: 34px;
  }

  .flow-arrow::before {
    top: 0;
    width: 1px;
    height: 100%;
    transform: none;
  }

  .flow-arrow::after {
    top: auto;
    left: 50%;
    right: auto;
    bottom: 1px;
    transform: translateX(-50%) rotate(135deg);
  }
}

@media (max-width: 1080px) {
  .nav-shell {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
    grid-column: 3;
    order: initial;
    justify-self: end;
  }

  .nav-links {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 86px;
    display: none;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .menu-console {
    display: block;
  }

  .nav-actions {
    grid-column: 2;
    justify-self: end;
    margin-right: 8px;
  }

  .hero,
  .key-panel,
  .closing-cta {
    grid-template-columns: 1fr;
  }

  .closing-cta .hero-actions {
    justify-content: flex-start;
  }

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

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

@media (max-width: 760px) {
  :root {
    --header-height: 78px;
  }

  .section-frame {
    width: min(100% - 24px, var(--max-width));
  }

  .site-header {
    padding: 12px;
  }

  .nav-shell {
    min-height: 58px;
    padding-left: 12px;
  }

  .brand-mark {
    width: 116px;
    height: 30px;
  }

  .nav-console,
  .nav-cta {
    display: none;
  }

  .nav-actions {
    margin-right: 38px;
  }

  .language-switch button {
    min-width: 31px;
  }

  .hero {
    min-height: auto;
    padding: 50px 0 34px;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.02;
  }

  .hero-summary {
    font-size: 17px;
  }

  .hero-actions,
  .closing-cta .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .architecture-card {
    padding: 18px;
  }

  .crypto-note,
  .timeline-grid,
  .security-grid,
  .visibility-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-step,
  .compact-item,
  .security-principle {
    min-height: auto;
  }

  .step-number {
    margin-bottom: 26px;
  }

  .section-heading h2,
  .key-panel h2,
  .closing-cta h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .flow-section,
  .security-section,
  .visibility-section,
  .controls-section,
  .key-section,
  .faq-section,
  .closing-cta {
    padding-block: 48px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pricing-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: flex; flex-direction: column; align-items: flex-start; }
.pricing-card .plan-price { font-size: 1.8rem; font-weight: 700; margin: 12px 0 0; }
.pricing-card .plan-annual { color: var(--muted); min-height: 2.5em; }
.pricing-card ul { padding-left: 1.1rem; line-height: 1.8; flex: 1; }
.pricing-notes {
  display: grid;
  gap: 8px;
  margin: 24px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pricing-note {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
@media (max-width: 800px) { .pricing-grid { grid-template-columns: 1fr; } }
