:root {
  --primary: #1a6057;
  --primary-hover: #164a43;
  --ink: #0e2029;
  --muted: #80909f;
  --soft: #7b8b99;
  --teal: #2b7a73;
  --line: #e2e9e8;
  --card-bg: rgba(248, 251, 249, 0.94);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  font-synthesis: none;
}
#app { min-height: 100vh; }

/* ── Page frame (mirrors the marketing-site gate) ── */
.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(125deg, #fff 32%, #fafcfb 78%, #fff);
  padding: 26px 5% 28px;
}
.decor {
  pointer-events: none;
  position: absolute;
  right: -80px;
  top: 76px;
  height: 753px;
  width: 800px;
  opacity: 0.64;
  -webkit-mask-image: url(bg-oke.png);
  mask-image: url(bg-oke.png);
  -webkit-mask-mode: luminance;
  mask-mode: luminance;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.82), rgba(255,255,255,.5) 45%, rgba(255,255,255,.15) 100%),
    url(background-lake-forest.jpg);
  background-size: cover;
  background-position: 50% 50%;
}
.decor-mobile {
  pointer-events: none;
  position: absolute;
  right: -140px;
  top: 120px;
  height: 353px;
  width: 375px;
  opacity: 0.62;
  -webkit-mask-image: url(bg-oke.png);
  mask-image: url(bg-oke.png);
  -webkit-mask-mode: luminance;
  mask-mode: luminance;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-image: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.3)), url(background-lake-forest-mobile.jpg);
  background-size: cover;
  background-position: 50% 50%;
}
.decor { display: none; }
@media (min-width: 768px) {
  .decor { display: block; }
  .decor-mobile { display: none; }
  .page { padding: 42px 7.1% 28px; }
}

main { position: relative; z-index: 2; margin-top: 49px; }
h1.brand {
  margin: 12px 0 14px;
  max-width: 800px;
  font-size: 47px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.052em;
}
@media (min-width: 1024px) { h1.brand { font-size: 65px; } }
.divider { width: 35px; height: 2px; background: var(--teal); margin: 22px 0; }

.cols { display: flex; flex-direction: column; gap: 30px; }
@media (min-width: 768px) {
  .cols { display: grid; grid-template-columns: minmax(360px, 520px) minmax(280px, 1fr); gap: 25px; }
}
@media (min-width: 1024px) {
  .cols { grid-template-columns: minmax(420px, 530px) minmax(280px, 340px); gap: 38px; }
}

.lede {
  max-width: 490px;
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.52;
  color: var(--muted);
}
@media (min-width: 1024px) { .lede { font-size: 21px; } }

/* ── Card ── */
.card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card-bg);
  box-shadow: 0 15px 38px rgba(32, 65, 57, 0.025);
  padding: 19px 20px;
}
@media (min-width: 768px) { .card { padding: 20px 28px; } }
.card h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 6px; }
.card .sub { font-size: 13px; line-height: 1.42; color: var(--soft); margin-bottom: 20px; max-width: 400px; }

/* ── Tabs (code / request) ── */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button {
  flex: 1; padding: 9px; border: 1px solid #d3dfdf; background: transparent;
  border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted);
}
.tabs button.on { border-color: var(--teal); color: var(--teal); font-weight: 600; }

/* ── Fields ── */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: #344e56; margin-bottom: 7px; }
.field .wrap { position: relative; }
.field .icon {
  pointer-events: none;
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  fill: none; stroke: #8b9eaa; stroke-width: 1.6;
}
.field input, .field textarea {
  display: block; width: 100%; height: 44px;
  border: 1px solid #d3dfdf; border-radius: 7px;
  background: #fff; font: inherit; font-size: 13px; color: var(--ink);
  padding: 0 12px 0 43px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 10px 12px; }
.field input.noicon, .field textarea { padding-left: 12px; }
.field input::placeholder, .field textarea::placeholder { color: #a5b0ba; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: #1c685e;
  box-shadow: 0 0 0 3px rgba(21, 107, 94, .1);
}
.field .hint { margin-top: 5px; font-size: 11px; color: #7c9292; }

/* ── Buttons ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  width: 100%; min-height: 47px; margin-top: 8px; margin-bottom: 11px;
  border: 0; border-radius: 7px;
  background: var(--primary); color: #fff;
  font: inherit; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); }
.btn:disabled { cursor: wait; opacity: .65; }
.btn.link {
  display: block; width: auto; min-height: 0; margin: 0 auto 9px;
  padding: 9px 6px; background: transparent; color: var(--primary-hover);
  font-size: 12px; text-decoration: underline; text-underline-offset: 3px;
}
.btn.link:hover { color: var(--teal); }

/* ── Flash ── */
.flash {
  margin-bottom: 11px; padding: 10px 12px; border-radius: 8px;
  font-size: 12px; line-height: 1.45; border: 1px solid transparent;
}
.flash.ok  { border-color: #c5d8d1; background: #f0f7f3; color: #214e3f; }
.flash.err { border-color: #ebceca; background: #fef4f3; color: #8a3735; }
.flash.info{ border-color: #c5d8d1; background: #f0f7f3; color: #214e3f; }

/* ── Trust badges (card footer) ── */
.badges { margin-top: 8px; padding-top: 15px; border-top: 1px solid #dce7e4; display: grid; gap: 10px; }
.badge { display: grid; grid-template-columns: 39px 1fr; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: #315f62; }
.badge .tile {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 999px; background: #e8f2ed; color: #195c55;
}
.badge .tile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.badge small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; line-height: 1.4; color: #8797a1; }

/* ── Aside ── */
.aside { width: 100%; }
@media (min-width: 768px) {
  .aside { margin-top: 9px; border-left: 1px solid #d6e0df; padding-left: 28px; }
}
.aside h3 {
  margin-bottom: 26px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; color: #769399;
}
.aside h3::after { content: ''; display: block; margin-top: 16px; width: 31px; height: 1px; background: #589589; }
.aside ul { list-style: none; padding: 0; background: #fff; }
@media (min-width: 768px) { .aside .inside { margin-top: 70px; } }
.inside-item {
  display: flex; align-items: center; gap: 17px;
  min-height: 75px; margin-bottom: 16px; padding-bottom: 17px;
  border-bottom: 1px solid #e0e8e6;
}
.inside-item:last-child { border-bottom: 0; }
.inside-item .tile {
  display: grid; place-items: center; flex-shrink: 0;
  width: 59px; height: 59px; border-radius: 15px; background: #f1f6f3;
}
.inside-item .tile svg { width: 28px; height: 28px; fill: none; stroke: #2d5961; stroke-width: 1.6; }
.inside-item strong { font-size: 15px; letter-spacing: -0.01em; }
.inside-item p { margin-top: 7px; font-size: 13px; line-height: 1.43; color: #899aa7; }
@media (min-width: 768px) {
  .inside-item { min-height: 82px; gap: 24px; }
  .inside-item .tile { width: 69px; height: 69px; border-radius: 16px; }
}

/* ── Room ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.topbar .who { font-size: 13px; color: var(--soft); }
.topbar button {
  margin-left: 12px; padding: 8px 14px; border: 1px solid #d3dfdf; border-radius: 7px;
  background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: #344e56; cursor: pointer;
}
.topbar button:hover { border-color: var(--teal); color: var(--teal); }
.cat { margin-bottom: 22px; }
.cat > h2 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: #769399; margin-bottom: 12px;
}
.doc {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid #e0e8e6; border-radius: 10px;
  margin-bottom: 8px; background: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.doc:hover { border-color: #b9d2cb; box-shadow: 0 4px 14px rgba(32,65,57,.05); }
.doc .t { font-size: 14px; font-weight: 600; }
.doc .meta { margin-top: 3px; font-size: 11px; color: var(--muted); }
.doc a { font-size: 12px; color: var(--primary-hover); font-weight: 600; text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.children { margin-left: 18px; }
.empty { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* ── Viewer modal ── */
.viewer {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(14,32,41,.45); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 20px;
}
.viewer .box {
  background: #fff; border-radius: 15px; max-width: 720px; width: 100%;
  max-height: 80vh; overflow: auto; padding: 28px; position: relative;
}
.viewer .box h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 14px; padding-right: 40px; }
.viewer .x {
  position: absolute; top: 14px; right: 14px; border: 0; background: #f1f6f3;
  width: 30px; height: 30px; border-radius: 999px; cursor: pointer; font-size: 13px; color: #344e56;
}
.viewer pre {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.6; color: #344e56; background: #f8fbfa;
  border: 1px solid var(--line); border-radius: 8px; padding: 14px;
}
.viewer .box a { color: var(--primary-hover); font-weight: 600; }
