/* ==========================================================================
   TaTech document theme - the ONE look every product doc shares.
   Customer pitch, investor pitch, step-by-step guide, and brochure all link
   this file, so the whole sales/docs kit stays consistent: same TaTech
   signature colours (blue -> cyan), same chrome, same footer signature.

   Per-product identity shows only as a thin accent ribbon + chip. Set it per
   doc with:  :root { --accent-a:#0a1f4d; --accent-b:#e8b23a; }
   (defaults below are the TaTech blue->cyan if a doc sets nothing.)
   ========================================================================== */

:root {
  --tt-blue: #2563eb;
  --tt-cyan: #06b6d4;
  --ink:     #0f172a;
  --body:    #1f2937;
  --dim:     #64748b;
  --line:    #e6ebf2;
  --bg:      #f8fafc;
  --card:    #ffffff;
  --soft:    #eef2f9;
  /* per-product accent ribbon (override per doc) */
  --accent-a: var(--tt-blue);
  --accent-b: var(--tt-cyan);
  --radius: 16px;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --- per-product accent ribbon (the only product colour in the chrome) --- */
.tt-ribbon { height: 5px; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }

/* --- header: the TaTech signature gradient --- */
.tt-head {
  background: linear-gradient(135deg, var(--tt-blue) 0%, var(--tt-cyan) 100%);
  color: #fff;
  padding: 46px 0 52px;
}
.tt-head .wrap { display: block; }
.tt-eyebrow {
  display: inline-block; background: rgba(255,255,255,.16); color: #fff;
  font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; backdrop-filter: blur(2px);
}
.tt-head h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 16px 0 6px; font-weight: 800; }
.tt-head .lead { font-size: clamp(16px, 2.4vw, 20px); opacity: .94; margin: 0; max-width: 40em; }

/* --- logo lockup (header = white, footer = white on dark) --- */
.tt-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.tt-logo img { width: 34px; height: 34px; display: block; border-radius: 9px; }
.tt-logo .wordmark { font-weight: 800; letter-spacing: .02em; font-size: 18px; color: #fff; }
.tt-logo .wordmark .dot { opacity: .7; }
.tt-head .tt-logo { margin-bottom: 22px; }

/* --- body sections --- */
main { padding: 8px 0 10px; }
section { padding: 26px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { font-size: clamp(20px, 3vw, 26px); color: var(--ink); margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 17px; color: var(--ink); margin: 18px 0 6px; font-weight: 700; }
p  { margin: 0 0 12px; }
a  { color: var(--tt-blue); }
.lead-in { font-size: 18px; color: var(--ink); }
.dim { color: var(--dim); }

/* eyebrow label inside body */
.kicker { color: var(--tt-blue); font-weight: 800; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }

/* --- cards + grids --- */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 680px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* numbered steps (guide) */
.step { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.badge {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); color: #fff;
  font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 4px 0 8px; font-size: 19px; }

/* stats row (investor / brochure) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { background: var(--soft); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat .n { font-size: 30px; font-weight: 800; color: var(--ink);
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .l { font-size: 13px; color: var(--dim); margin-top: 4px; }

/* bullets */
ul.ticks { list-style: none; padding: 0; margin: 8px 0; }
ul.ticks li { position: relative; padding: 6px 0 6px 30px; }
ul.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan));
}

/* quote / pull */
.quote { border-left: 4px solid var(--tt-cyan); background: var(--soft); padding: 14px 18px; border-radius: 0 12px 12px 0; font-size: 18px; color: var(--ink); }
.tip { background: var(--soft); border-left: 4px solid var(--accent-b); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-top: 10px; font-size: 14px; color: var(--body); }

/* table */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 700; background: var(--soft); }

/* CTA */
.cta { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); color: #fff; font-weight: 700; text-decoration: none; padding: 12px 22px; border-radius: 12px; }
.cta:hover { opacity: .94; }

/* download / print-to-PDF button (sits in the header, hidden when printing) */
.tt-dl { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; margin-top: 20px;
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.45);
  font: 700 13.5px/1 inherit; padding: 10px 16px; border-radius: 10px; }
.tt-dl:hover { background: rgba(255,255,255,.28); }

/* --- footer: the TaTech signature --- */
.tt-foot { background: var(--ink); color: #cfd8e8; padding: 34px 0 30px; }
.tt-foot .wrap { display: block; }
.tt-foot .tt-logo .wordmark { color: #fff; }
.tt-foot .motto { font-style: italic; color: #fff; opacity: .9; margin: 14px 0 12px; font-size: 15px; }
.tt-foot .meta { font-size: 13.5px; line-height: 1.9; }
.tt-foot a { color: #9ec5ff; }
.tt-foot .powered { margin-top: 12px; font-size: 12.5px; color: #8aa0c0; }

/* --- language switcher pill (top-right) --- */
.langsw { position: fixed; top: 12px; right: 14px; z-index: 9999; font-size: 12px; font-weight: 700;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px; box-shadow: 0 1px 8px rgba(15,23,42,.14); }
.langsw a { text-decoration: none; padding: 3px 9px; border-radius: 999px; color: var(--tt-blue); }
.langsw a.on { background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); color: #fff; }

/* --- back-to-overview pill (top-left) --- */
.tt-back { position: fixed; top: 12px; left: 14px; z-index: 9999; font-size: 12px; font-weight: 700;
  text-decoration: none; color: var(--tt-blue); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; box-shadow: 0 1px 8px rgba(15,23,42,.14); }
.tt-back:hover { background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); color: #fff; }

/* --- searchable chapter index ("the book of the app") --- */
.tt-toc { position: fixed; top: 56px; left: 16px; width: 244px; max-height: calc(100vh - 76px);
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 6px 24px rgba(15,23,42,.10); padding: 14px 12px; z-index: 9990; }
.tt-toc-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tt-blue); margin: 0 4px 8px; }
.tt-toc-search { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; margin-bottom: 6px; outline: none; }
.tt-toc-search:focus { border-color: var(--tt-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tt-toc-count { font-size: 11px; color: #64748b; min-height: 14px; margin: 0 4px 6px; }
.tt-toc-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.tt-toc-list li { margin: 0; }
.tt-toc-list a { display: block; text-decoration: none; color: #334155; font-size: 13px; line-height: 1.3;
  padding: 5px 8px; border-radius: 8px; }
.tt-toc-list a:hover { background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); color: #fff; }
.tt-toc-list li.lv3 a { padding-left: 20px; font-size: 12px; color: #64748b; }
.tt-toc-toggle { display: none; position: fixed; bottom: 18px; left: 16px; z-index: 9991;
  font: inherit; font-size: 13px; font-weight: 700; color: #fff; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-cyan)); border-radius: 999px;
  padding: 10px 16px; box-shadow: 0 4px 16px rgba(15,23,42,.22); }

@media (max-width: 1200px) {
  .tt-toc { transform: translateX(-115%); transition: transform .22s ease; left: 12px; width: 80vw; max-width: 320px; }
  .tt-toc.open { transform: translateX(0); }
  .tt-toc-toggle { display: block; }
}

@media print {
  .langsw, .tt-dl, .tt-back, .tt-toc, .tt-toc-toggle { display: none; }
  .tt-head, .tt-foot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  section { break-inside: avoid; }
}
