:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --paper: #ffffff;
  --ink: #0b1420;
  --text: #243447;
  --muted: #617287;
  --line: #d9e4ef;
  --blue: #0b6cff;
  --blue-ink: #0954bd;
  --green: #168864;
  --red: #d84d5f;
  --amber: #a96b16;
  --soft-blue: #eaf3ff;
  --soft-green: #eaf8f2;
  --soft-red: #fff0f2;
  --soft-amber: #fff5e1;
  --shadow: 0 20px 54px rgba(13, 35, 58, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(217, 228, 239, 0.86);
  background: rgba(255, 255, 255, 0.92);
}

@supports (backdrop-filter: blur(18px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
  }
}

.nav-inner {
  display: flex;
  width: min(100%, 1160px);
  margin: 0 auto;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
}

.brand-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0b1420 0%, #1b2a3c 100%);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(11, 20, 32, 0.2);
}

.nav-scroll {
  display: flex;
  min-width: 0;
  margin-left: auto;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-scroll a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav-scroll a:hover,
.nav-scroll a:focus-visible,
.nav-scroll a[aria-current="page"] {
  background: var(--soft-blue);
  color: var(--blue-ink);
  outline: none;
}

.container {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 0 18px;
}

.narrow {
  width: min(100%, 900px);
}

.hero {
  position: relative;
  height: 690px;
  max-height: calc(100vh - 64px);
  min-height: 610px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, #f8fbff 0%, #eef6fd 54%, #ffffff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 251, 255, 0.98) 0%, rgba(247, 251, 255, 0.92) 32%, rgba(247, 251, 255, 0.2) 64%, rgba(247, 251, 255, 0.42) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 40%, rgba(245, 248, 251, 0.28) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  align-items: center;
}

.hero-copy {
  width: min(100%, 610px);
  padding-bottom: 34px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  font-size: 48px;
  line-height: 0.98;
}

h2 {
  font-size: 32px;
  line-height: 1.08;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

.lead {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(11, 20, 32, 0.16);
  outline: none;
}

.button.secondary {
  border-color: rgba(11, 20, 32, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.hero-proof span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(11, 20, 32, 0.1);
  border-radius: var(--radius);
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.signal-strip {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.signal-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 0 18px;
}

.signal-item {
  min-height: 92px;
  border-left: 1px solid var(--line);
  padding: 18px 16px;
}

.signal-item:last-child {
  border-right: 1px solid var(--line);
}

.signal-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.signal-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 76px 0;
}

.section-white {
  background: #fff;
}

.section-head {
  display: grid;
  max-width: 760px;
  gap: 11px;
  margin-bottom: 30px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.feature-lab {
  display: grid;
  grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.feature-tabs {
  display: grid;
  gap: 10px;
}

.feature-tab {
  display: grid;
  grid-template-columns: 42px 1fr;
  width: 100%;
  min-height: 70px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfdff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.feature-tab span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--soft-blue);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 950;
}

.feature-tab strong {
  font-size: 16px;
}

.feature-tab:hover,
.feature-tab:focus-visible {
  border-color: rgba(11, 108, 255, 0.3);
  outline: none;
}

.feature-tab.is-active {
  border-color: rgba(11, 108, 255, 0.45);
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-content {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 1.14fr);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.76), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.preview-kicker {
  margin: 0 0 9px;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 900;
}

.feature-content p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.ledger-surface {
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.surface-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}

.surface-top span {
  width: 120px;
  height: 10px;
  border-radius: var(--radius);
  background: #dce6ef;
}

.surface-top strong {
  border-radius: var(--radius);
  padding: 5px 8px;
  background: var(--soft-green);
  color: var(--green);
  font-size: 12px;
}

.surface-chart {
  display: flex;
  height: 92px;
  align-items: end;
  gap: 12px;
  border-block: 1px solid var(--line);
  padding: 12px 0;
}

.surface-chart span {
  flex: 1;
  border-radius: var(--radius) var(--radius) 2px 2px;
  background: #cfe2fb;
}

.surface-chart span:nth-child(1) { height: 36%; }
.surface-chart span:nth-child(2) { height: 62%; }
.surface-chart span:nth-child(3) { height: 48%; }
.surface-chart span:nth-child(4) { height: 78%; background: var(--blue); }
.surface-chart span:nth-child(5) { height: 54%; }

.surface-row {
  display: grid;
  grid-template-columns: 32px 1fr 64px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.surface-row:last-child {
  border-bottom: 0;
}

.surface-row i {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--soft-red);
}

.surface-row span {
  height: 10px;
  border-radius: var(--radius);
  background: #dce6ef;
}

.surface-row b {
  height: 8px;
  border-radius: var(--radius);
  background: var(--red);
}

.surface-row.income i {
  background: var(--soft-green);
}

.surface-row.income b {
  background: var(--green);
}

.feature-grid,
.compliance-grid,
.data-grid,
.permission-grid,
.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature-card,
.compliance-card,
.data-card,
.permission-card,
.summary-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.feature-card,
.compliance-card,
.data-card,
.permission-card {
  padding: 18px;
}

.feature-card,
.compliance-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover,
.compliance-card:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 108, 255, 0.28);
  box-shadow: var(--shadow);
}

.feature-card p,
.compliance-card p,
.data-card p,
.permission-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.feature-icon {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: var(--radius);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 950;
}

.feature-icon.blue { background: var(--soft-blue); color: var(--blue-ink); }
.feature-icon.green { background: var(--soft-green); color: var(--green); }
.feature-icon.red { background: var(--soft-red); color: var(--red); }
.feature-icon.amber { background: var(--soft-amber); color: var(--amber); }

.trust-band {
  border-block: 1px solid #16304b;
  background:
    linear-gradient(135deg, #071521 0%, #0d263b 52%, #0e3429 100%);
  color: #d9e6f2;
}

.trust-band h2,
.trust-band .eyebrow {
  color: #fff;
}

.trust-band .section-head p {
  color: #b7c7d7;
}

.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-pill {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  padding: 16px;
}

.permission-pill strong {
  display: block;
  color: #fff;
}

.permission-pill span {
  display: block;
  margin-top: 5px;
  color: #c5d3e1;
  font-size: 13px;
}

.compliance-card {
  position: relative;
  color: var(--text);
  text-decoration: none;
}

.compliance-card::after {
  content: "Open";
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.compliance-card h3 {
  padding-right: 54px;
}

.document-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.94) 0%, rgba(255, 255, 255, 0.98) 55%, rgba(234, 248, 242, 0.88) 100%);
  padding: 58px 0 34px;
}

.document-hero h1 {
  max-width: 800px;
  font-size: 38px;
}

.document-hero .lead {
  max-width: 780px;
}

.meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
}

.summary-item {
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(13, 35, 58, 0.04);
}

.summary-item strong {
  display: block;
  color: var(--ink);
}

.toc {
  position: sticky;
  top: 63px;
  z-index: 15;
  margin: 0 -18px;
  padding: 10px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 248, 251, 0.95);
  scrollbar-width: none;
  white-space: nowrap;
}

.toc::-webkit-scrollbar {
  display: none;
}

.toc a {
  display: inline-flex;
  margin-right: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  background: #fff;
  outline: 1px solid var(--line);
}

.policy {
  padding: 24px 0 60px;
}

.policy-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.policy-section h2 {
  font-size: 26px;
}

.policy-section h3 {
  margin-top: 20px;
  font-size: 17px;
}

.policy-section p,
.policy-section li {
  color: var(--text);
}

.policy-section p {
  margin: 10px 0 0;
}

.policy-section ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.policy-section li {
  margin: 8px 0;
}

.data-grid,
.permission-grid {
  margin-top: 16px;
}

.data-card,
.permission-card {
  background: #fbfdff;
}

.code-text {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  margin-top: 10px;
  border-radius: var(--radius);
  padding: 5px 8px;
  background: var(--soft-blue);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
}

.tag.red { background: var(--soft-red); color: var(--red); }
.tag.green { background: var(--soft-green); color: var(--green); }

.delete-shell {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 42px 18px 58px;
}

.delete-panel {
  scroll-margin-top: 82px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.phone-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.prefix,
input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.prefix {
  display: grid;
  place-items: center;
  font-weight: 900;
}

input {
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: rgba(11, 108, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(11, 108, 255, 0.12);
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.form-button {
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
}

.form-button:hover:not(:disabled),
.form-button:focus-visible:not(:disabled) {
  box-shadow: 0 12px 24px rgba(11, 20, 32, 0.16);
  outline: none;
}

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

.form-button.danger {
  border-color: var(--red);
  background: var(--red);
}

.form-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.status {
  display: none;
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
}

.status.show {
  display: block;
}

.status.ok {
  border: 1px solid rgba(22, 136, 100, 0.32);
  background: var(--soft-green);
  color: #176246;
}

.status.error {
  border: 1px solid rgba(216, 77, 95, 0.32);
  background: var(--soft-red);
  color: #a1303e;
}

.status.info {
  border: 1px solid rgba(11, 108, 255, 0.26);
  background: var(--soft-blue);
  color: var(--blue-ink);
}

.divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 10px 0;
  padding-left: 30px;
  color: var(--text);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(22, 136, 100, 0.35);
  border-radius: 5px;
  background: var(--soft-green);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 7px;
  width: 4px;
  height: 8px;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.success-panel {
  display: grid;
  gap: 16px;
  text-align: center;
}

.success-panel .check-list {
  text-align: left;
}

.success-badge {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  place-items: center;
  border: 1px solid rgba(22, 136, 100, 0.28);
  border-radius: var(--radius);
  background: var(--soft-green);
  color: var(--green);
  font-weight: 950;
}

.reference {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 12px;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  width: min(100%, 1160px);
  margin: 0 auto;
  gap: 10px;
  padding: 26px 18px;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reveal,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (min-width: 680px) {
  h1 {
    font-size: 76px;
  }

  h2 {
    font-size: 42px;
  }

  .lead {
    font-size: 19px;
  }

  .document-hero h1 {
    font-size: 54px;
  }

  .policy-section h2 {
    font-size: 30px;
  }

  .feature-grid,
  .compliance-grid,
  .data-grid,
  .permission-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .delete-panel {
    padding: 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 980px) {
  h1 {
    font-size: 92px;
  }

  h2 {
    font-size: 50px;
  }

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

@media (max-width: 980px) {
  .feature-lab,
  .feature-content,
  .trust-layout {
    grid-template-columns: 1fr;
  }

  .signal-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .signal-inner::-webkit-scrollbar {
    display: none;
  }

  .signal-item {
    flex: 0 0 220px;
  }
}

@media (max-width: 620px) {
  .nav-inner {
    gap: 12px;
    padding-inline: 12px;
  }

  .brand-link span:last-child {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-scroll a {
    padding-inline: 9px;
  }

  .hero {
    height: 660px;
    min-height: 660px;
    max-height: none;
  }

  .hero-bg {
    object-fit: cover;
    object-position: 63% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.92) 48%, rgba(248, 251, 255, 0.2) 100%),
      linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0.72) 62%, rgba(248, 251, 255, 0.26) 100%);
  }

  .hero-inner {
    align-items: flex-start;
  }

  .hero-copy {
    padding-top: 38px;
    padding-bottom: 0;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-proof {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-proof span {
    justify-content: center;
  }

  .section {
    padding: 56px 0;
  }

  .feature-content {
    padding: 18px;
  }

  .surface-row {
    grid-template-columns: 30px 1fr 52px;
  }

  .permission-list {
    grid-template-columns: 1fr;
  }
}

/* App WebView public pages */
.webview-page {
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -8%, rgba(11, 108, 255, 0.14), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(22, 136, 100, 0.11), transparent 27%),
    linear-gradient(180deg, #f7fbff 0%, #f4f8fb 44%, #ffffff 100%);
  color: #223144;
  -webkit-text-size-adjust: 100%;
}

.webview-page a {
  overflow-wrap: anywhere;
}

.app-topbar {
  display: grid;
  width: min(100%, 980px);
  margin: 0 auto;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
}

.app-brand {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
}

.app-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #071521 0%, #12324b 52%, #0b6cff 100%);
  box-shadow: 0 12px 28px rgba(11, 20, 32, 0.18);
}

.app-nav {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app-nav::-webkit-scrollbar,
.doc-jump::-webkit-scrollbar {
  display: none;
}

.app-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.72);
  color: #314255;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a:focus-visible,
.app-nav a[aria-current="page"] {
  border-color: rgba(11, 108, 255, 0.26);
  background: #eaf3ff;
  color: var(--blue-ink);
  outline: none;
}

.app-doc-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 12px max(14px, env(safe-area-inset-right)) calc(44px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.delete-webview {
  width: min(100%, 860px);
}

.app-doc-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(234, 243, 255, 0.92) 58%, rgba(234, 248, 242, 0.88) 100%);
  padding: 22px 18px;
  box-shadow: 0 18px 48px rgba(13, 35, 58, 0.09);
}

.app-doc-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--green));
}

.app-doc-hero > * {
  position: relative;
  z-index: 1;
}

.webview-page .eyebrow {
  margin-bottom: 10px;
  color: var(--blue-ink);
  font-size: 12px;
  text-transform: uppercase;
}

.danger-label {
  color: #b93140 !important;
}

.webview-page h1 {
  max-width: 820px;
  font-size: 34px;
  line-height: 1.06;
}

.webview-page h2 {
  font-size: 22px;
  line-height: 1.18;
}

.webview-page h3 {
  font-size: 16px;
  line-height: 1.28;
}

.webview-page .lead {
  max-width: 760px;
  margin-top: 12px;
  color: #53677d;
  font-size: 16px;
  line-height: 1.62;
}

.doc-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 18px;
}

.doc-meta span {
  min-width: 0;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 11px 12px;
  color: #53677d;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.doc-meta strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.doc-jump {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.doc-jump a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #314255;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.doc-jump a:focus-visible,
.doc-jump a:hover {
  border-color: rgba(11, 108, 255, 0.28);
  background: var(--soft-blue);
  color: var(--blue-ink);
  outline: none;
}

.app-doc {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.doc-panel {
  scroll-margin-top: 16px;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 12px 34px rgba(13, 35, 58, 0.055);
}

.doc-panel.highlight {
  border-color: rgba(11, 108, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.84), rgba(255, 255, 255, 0.98));
}

.doc-panel p,
.doc-panel li,
.delete-panel p,
.delete-panel li {
  color: #314255;
  font-size: 15px;
  line-height: 1.72;
}

.doc-panel p,
.delete-panel p {
  margin: 10px 0 0;
}

.doc-panel h2 + p,
.delete-panel h2 + p {
  margin-top: 10px;
}

.doc-panel h3 {
  margin-top: 18px;
}

.doc-panel h3:first-child {
  margin-top: 0;
}

.doc-panel ul,
.delete-panel ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.doc-panel li,
.delete-panel li {
  margin: 7px 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.doc-grid > div {
  min-width: 0;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.doc-grid p {
  margin-top: 6px;
}

.webview-page .permission-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.webview-page .permission-card {
  min-width: 0;
  border-color: rgba(11, 20, 32, 0.08);
  background: #fbfdff;
  padding: 16px;
  box-shadow: none;
}

.webview-page .permission-card p {
  color: #314255;
  line-height: 1.68;
}

.webview-page .code-text {
  display: block;
  width: 100%;
  border: 1px solid rgba(11, 20, 32, 0.08);
  border-radius: 8px;
  background: #f3f8fd;
  padding: 9px 10px;
  color: #0d263b;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.webview-page .tag {
  max-width: 100%;
  margin: 10px 0 2px;
  white-space: normal;
}

.webview-page .delete-panel {
  margin-top: 12px;
  border-color: rgba(11, 20, 32, 0.08);
  background: rgba(255, 255, 255, 0.96);
  padding: 18px;
  box-shadow: 0 14px 38px rgba(13, 35, 58, 0.075);
}

.webview-page .hint {
  color: #617287;
  line-height: 1.55;
}

.webview-page .phone-row {
  grid-template-columns: 64px minmax(0, 1fr);
}

.webview-page .prefix,
.webview-page input {
  min-width: 0;
  min-height: 52px;
  border-color: rgba(11, 20, 32, 0.12);
  border-radius: 8px;
}

.webview-page .prefix {
  background: #f3f8fd;
}

.webview-page input {
  background: #fff;
}

.webview-page .actions {
  gap: 10px;
}

.webview-page .form-button {
  min-width: 0;
  min-height: 52px;
  border-radius: 8px;
  touch-action: manipulation;
}

.webview-page .form-button.secondary {
  background: #fbfdff;
}

.webview-page .status {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.webview-page .success-panel h1 {
  font-size: 28px;
  line-height: 1.1;
}

.webview-page .success-badge,
.webview-page .reference {
  border-radius: 8px;
}

@media (min-width: 680px) {
  .app-topbar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding-inline: 20px;
  }

  .app-nav {
    justify-content: flex-end;
  }

  .app-doc-shell {
    padding-inline: 20px;
    padding-top: 18px;
  }

  .app-doc-hero {
    padding: 34px;
  }

  .webview-page h1 {
    font-size: 48px;
  }

  .webview-page h2 {
    font-size: 26px;
  }

  .webview-page .lead {
    font-size: 18px;
  }

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

  .webview-page .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-doc,
  .webview-page .delete-panel {
    margin-top: 16px;
  }

  .doc-panel,
  .webview-page .delete-panel {
    padding: 24px;
  }
}

@media (max-width: 679px) {
  .app-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .app-nav a {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 4px;
    text-align: center;
    white-space: normal;
    line-height: 1.12;
  }
}

@media (max-width: 420px) {
  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-nav a {
    padding-inline: 8px;
    font-size: 13px;
  }

  .doc-jump {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .doc-jump a {
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.12;
  }
}

@media (max-width: 380px) {
  .app-topbar,
  .app-doc-shell {
    padding-inline: max(12px, env(safe-area-inset-left));
  }

  .app-nav a {
    padding-inline: 6px;
    font-size: 13px;
  }

  .app-doc-hero,
  .doc-panel,
  .webview-page .delete-panel {
    padding: 16px;
  }

  .webview-page h1 {
    font-size: 30px;
  }

  .webview-page h2 {
    font-size: 21px;
  }

  .webview-page .phone-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .webview-page input {
    padding-inline: 11px;
  }
}
