:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#5b6472;
  --primary:#1677ff;
  --primary-soft:#e9f2ff;
  --border:#d9e0ea;
  --shadow:0 10px 30px rgba(18, 32, 56, 0.08);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:'Inter', Arial, sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#f7f9fc 0%, #eef3f8 100%);
  line-height:1.6;
}

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

.hero{
  background:linear-gradient(135deg,#0f3d8c 0%, #1677ff 55%, #4fa6ff 100%);
  color:#fff;
  padding:56px 0 46px;
  box-shadow:var(--shadow);
}

.eyebrow{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.14);
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:14px;
}

h1{
  margin:0 0 12px;
  font-size:clamp(2rem, 5vw, 3.5rem);
  line-height:1.05;
  color:#fff;
}

.lead{
  max-width:860px;
  font-size:1.08rem;
  color:rgba(255,255,255,.92);
  margin:0 0 18px;
}

.hero-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.hero-badges span,
.hero-badges .manual-home-link{
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  padding:8px 12px;
  border-radius:999px;
  font-size:.95rem;
  color:#fff;
  text-decoration:none;
}

.hero-badges .manual-home-link{
  background:#fff;
  color:#0f3d8c;
  font-weight:800;
}

main > .section{
  margin:10px 0;
  padding:0;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:26px;
  box-shadow:var(--shadow);
}

.toc{
  margin-top:-24px;
  position:relative;
}

.toc h2,
.section h2{
  margin-top:0;
  line-height:1.2;
}

.toc ol{
  margin:0;
  padding-left:20px;
}

.toc a{
  color:var(--primary);
  text-decoration:none;
}

.toc a:hover{text-decoration:underline}

.figure{
  margin:18px 0 24px;
}

.figure img{
  width:100%;
  max-width:100%;
  height:auto!important;
  aspect-ratio:auto!important;
  object-fit:contain;
  border-radius:18px;
  border:1px solid var(--border);
  display:block;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  margin:0 auto;
}

.figure figcaption{
  margin-top:10px;
  color:var(--muted);
  font-size:.95rem;
}

.step{
  display:grid;
  grid-template-columns:56px 1fr;
  gap:16px;
  align-items:flex-start;
  padding:16px 0;
  border-top:1px solid #edf1f6;
}

.step:first-of-type{border-top:none}

.step-number{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--primary-soft);
  color:var(--primary);
  font-weight:800;
  font-size:1.25rem;
  border:1px solid #cfe1ff;
}

.step h3{
  margin:2px 0 6px;
}

.note,
.tip,
.red-note{
  margin-top:18px;
  padding:16px 18px;
  border-radius:16px;
  border:1px solid var(--border);
}

.note{background:#f8fbff}
.tip{background:#f1fbf3;border-color:#caebd2}
.red-note{background:#ffeded;border-color:#f86868}

.comparison{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin:18px 0 22px;
}

.comparison-card,
.example-card{
  background:#fbfcfe;
  border:1px solid var(--border);
  border-radius:18px;
  padding:20px;
}

.simple-table,
.field-table{
  width:100%;
  border-collapse:collapse;
  margin-top:14px;
  overflow:hidden;
  border-radius:16px;
}

.simple-table th,
.simple-table td,
.field-table th,
.field-table td{
  border:1px solid var(--border);
  padding:14px;
  text-align:left;
  vertical-align:top;
}

.simple-table thead th,
.field-table th{
  background:#f5f9ff;
  color:#0f3d8c;
}

.example-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.screenshot-placeholder{
  margin:18px 0 24px;
  padding:22px;
  border:2px dashed #9ec5ff;
  border-radius:18px;
  background:linear-gradient(180deg,#f8fbff 0%,#eef6ff 100%);
}

.screenshot-placeholder h3{
  margin:0 0 10px;
  color:#0f3d8c;
}

.screenshot-placeholder p{
  margin:8px 0;
}

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

.footer{
  padding:30px 0 40px;
  color:var(--muted);
  text-align:center;
}

.page-row-section{
  margin-top:0px!important;
}

.page-section{
  padding-top:0px!important;
}

@media only screen and (max-width:960px){
  .container{
    width:100%;
    max-width:960px!important;
    margin:0 auto;
  }
}

@media (max-width:860px){
  .comparison,
  .example-grid{
    grid-template-columns:1fr;
  }

  .card{
    padding:20px;
    border-radius:18px;
  }

  .step{
    grid-template-columns:48px 1fr;
  }

  .step-number{
    width:48px;
    height:48px;
    font-size:1.05rem;
  }
}

@media (max-width:700px){
  .step{
    grid-template-columns:1fr;
  }
}


/* Documentation-only responsive containment for references and examples. */
.card{min-width:0;}
.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.card pre{max-width:100%;overflow-x:auto;white-space:pre;}
.card td,.card th,.card a{overflow-wrap:anywhere;}
.card pre code{overflow-wrap:normal;word-break:normal;}
@media (max-width:700px){
  .field-table,.simple-table{display:block;max-width:100%;overflow-x:auto;}
}

/* Isolate manuals from the app theme's generic layout class names. */
.trubuy-manual{
  display:block!important;
  position:relative!important;
  inset:auto!important;
  float:none!important;
  clear:both!important;
  width:min(1100px,calc(100% - 32px))!important;
  max-width:1100px!important;
  height:auto!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:visible!important;
  transform:none!important;
}

.trubuy-manual > .section{
  display:block!important;
  position:relative!important;
  inset:auto!important;
  float:none!important;
  clear:both!important;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  margin:10px 0!important;
  padding:0!important;
  overflow:visible!important;
  transform:none!important;
}

.trubuy-manual .card,
.trubuy-manual .figure,
.trubuy-manual .step{
  position:relative!important;
  inset:auto!important;
  float:none!important;
  clear:both!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  box-sizing:border-box!important;
  transform:none!important;
}

.trubuy-manual .card{
  display:block!important;
  overflow:visible!important;
}

.trubuy-manual .card::before,
.trubuy-manual .card::after{
  content:none!important;
  display:none!important;
}

.trubuy-manual .figure{
  display:block!important;
  overflow:visible!important;
}

.trubuy-manual .step{
  display:grid!important;
  grid-template-columns:56px minmax(0,1fr)!important;
  overflow:visible!important;
}

.trubuy-manual .step > *{
  min-width:0!important;
  max-width:100%!important;
}

.trubuy-manual .step-number{
  position:static!important;
  inset:auto!important;
  float:none!important;
  flex:none!important;
  transform:none!important;
}

@media (max-width:860px){
  .trubuy-manual .step{
    grid-template-columns:48px minmax(0,1fr)!important;
  }
}

@media (max-width:700px){
  .trubuy-manual{
    width:calc(100% - 20px)!important;
  }

  .trubuy-manual .step{
    grid-template-columns:1fr!important;
  }
}
