/* SotaTek theme — activated by SOTADOCS_THEME=sotatek.
 *
 * Source of truth is sotatek.com: the brand tokens declared in the site's own
 * stylesheet (--c-main-6 #036ae5 primary, --c-main-1 #121a45 / --c-main-3
 * #01105b navy, --c-main-7 #101624 text, --c-main-9 #565c69 body grey,
 * --c-main-10 #71a2ff, --c-main-2 #2fabdd cyan, --c-bg-1 #f6f8fc,
 * --c-orange #fcb415, #e5e7ef borders), the Be Vietnam Pro typeface the site
 * loads from Google Fonts (self-hosted below so the app stays offline, OFL 1.1
 * — see fonts/OFL.txt) and the site's white header carrying only the mark.
 *
 * The site's look is not "grey admin dashboard with white cards". It is:
 *   - a WHITE page,
 *   - big rounded light-blue gradient panels (its hero/product bands) floating
 *     on that white, with a hairline edge,
 *   - very large, heavy, tightly tracked headings; band headings uppercase
 *     with a blue gradient running through the letters,
 *   - tiny uppercase blue micro-labels above headings ("01-PRODUCT",
 *     "WHITEPAPER", "OUR SERVICES"),
 *   - hairline dividers and tab strips instead of boxed frames,
 *   - brand blue used as an accent — icon chips, labels, links, compact CTAs —
 *     never as large filled areas,
 *   - generous whitespace and comfortable 16-20px card radii.
 *
 * That is what the rules below implement on top of the shared templates. The
 * default theme stays untouched; everything is scoped to this stylesheet, which
 * base.html loads last. Rules that must survive the base sheet's own media
 * queries are repeated at the bottom on purpose: at equal specificity source
 * order decides, and this sheet is last. A couple of !important flags are used
 * to beat inline styles written into the templates (margins in the dashboard
 * header row); each one is called out below. */

/* ---- Be Vietnam Pro (latin + vietnamese subsets, 400/600/700) ------------ */
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-400-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-600-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-700-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/themes/sotatek/fonts/bvp-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* White page: the blue comes from gradient panels, like the site. */
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f9ff; --surface-hover: #eff5ff;
  --border: #e4eaf4; --border-strong: #d0daea;
  --text: #101624; --muted: #565c69; --faint: #6b7789;
  --accent: #036ae5; --accent-press: #0257bd; --accent-soft: #e6f0ff;
  /* Stops pinched from the site's own blues/cyan, used in gradients. */
  --accent-deep: #0b4bb8; --cyan: #2fabdd; --sky: #2f8bf5;
  --gold: #2fabdd; --gold-soft: #e6f6fd;
  --header-1: #0e74ea; --header-2: #036ae5;
  --green: #067a46; --green-soft: #e3f6ec;
  --amber: #b45309; --amber-soft: #fef3c7;
  --red: #b42318; --red-soft: #fee4e2;
  --shadow-sm: 0 1px 2px rgba(16, 22, 36, .04);
  --card-shadow: none;
  --shadow: 0 24px 60px rgba(16, 22, 36, .14);
  --radius: 20px; --radius-sm: 10px;
  /* The site's signature band: a blue-to-white sweep with a cyan bloom in one
     corner and a soft blue glow in the other, so the panel has depth instead of
     reading as flat pale grey. */
  --band:
    radial-gradient(120% 130% at 92% 4%, rgba(47, 171, 221, .30) 0%, rgba(47, 171, 221, 0) 58%),
    radial-gradient(110% 120% at 4% 0%, rgba(3, 106, 229, .20) 0%, rgba(3, 106, 229, 0) 62%),
    linear-gradient(122deg, #d9e9ff 0%, #eaf4ff 44%, #fbfdff 100%);
  --band-edge: #d8e6fb;
}

body {
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15.5px; line-height: 1.6; color: var(--text); background: var(--bg);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.container { max-width: 1000px; padding: 20px 16px calc(44px + var(--safe-b)); }

/* ---- app bar: white, hairline, no colour bar ---- */
.appbar {
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.appbar, .appbar a, .appbar .appbar-title, .appbar .btn.icon, .appbar .strip-link { color: var(--text); }
.appbar .appbar-title { font-weight: 700; letter-spacing: -.015em; }
.appbar .btn.icon:hover, .appbar .strip-link:hover { background: var(--accent-soft); color: var(--accent); }
.strip-link { font-size: 12.5px; letter-spacing: .02em; }

/* ---- masthead: the brand mark inside a rounded gradient band ---- */
.masthead { background: transparent; border-bottom: 0; }
.masthead-inner {
  max-width: 1000px; margin: 16px auto 8px; padding: 22px 26px;
  background: var(--band); border: 1px solid var(--band-edge); border-radius: 26px;
  justify-content: flex-start;
}
.masthead-inner a { display: flex; align-items: center; gap: 18px; }
.masthead img { width: auto; height: 46px; max-width: none; }
.masthead-text { display: block; text-align: left; color: var(--text); }
.masthead-text .mh-unit { color: var(--text); font-size: 18px; font-weight: 800; letter-spacing: -.025em; }
.masthead-text .mh-org { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---- page / section headings: large, heavy, tight, hairline underneath ---- */
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }

/* Dashboard header row: title left, description right, rule below — the
   "Technology Insights" header on the site. The inline margins in
   dashboard.html have to be overridden, hence !important. */
.container > .row:first-of-type { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.container > .row:first-of-type > div:first-child {
  display: flex; align-items: baseline; gap: 24px; flex: 1 1 auto; flex-wrap: wrap;
}
.container > .row:first-of-type .page-title { font-size: 36px; }
.container > .row:first-of-type > div:first-child > .muted.small {
  margin: 0 0 0 auto !important; text-align: right; max-width: 42ch; font-size: 14px; line-height: 1.5;
}

/* ---- section headers: hairline tab-strip head, blue icon chip, no fill ---- */
.section-bar, details.panel > summary, .auth-panel-bar {
  background: var(--surface); color: var(--text);
  text-transform: none; letter-spacing: -.015em; font-size: 17px; font-weight: 700;
  box-shadow: none;
}
.section-bar { padding: 15px 20px; border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; }
.section-bar svg:first-child {
  width: 34px; height: 34px; padding: 8px; box-sizing: border-box; border-radius: 11px;
  background: linear-gradient(140deg, #eaf3ff 0%, #d8e8ff 100%); color: var(--accent);
}
.section-bar .count { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.bar-joined { border: 1px solid var(--border); border-top: 0; background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.bar-joined > * + * { border-top: 1px solid var(--border); }
.bar-joined .card-tap:hover { background: var(--surface-hover); }

/* ---- cards: hairline on white, radius 20, lift on hover (site cards) ---- */
.card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--card-shadow); }
.card-tap { transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.card-tap:hover { background: var(--surface); box-shadow: 0 12px 32px rgba(16, 22, 36, .09);
  transform: translateY(-2px); }
.card-tap:active { transform: translateY(0); background: var(--surface-hover); }

/* ---- micro-labels: tiny uppercase blue, as above every site heading ---- */
.tiny.muted.strong, .auth-intro .kicker, .ap-kicker {
  /* Deep brand blue: these labels are small, so they need 4.5:1 even on the
     gradient band, which the mid blue does not reach. */
  color: var(--accent-deep); font-weight: 800; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-intro .kicker { background: none; border: 0; border-radius: 0; padding: 0; }

/* ---- buttons: compact, 8px radius, flat with a whisper of shadow ---- */
.btn { min-height: 44px; padding: 0 20px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .08s ease; }
.btn:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(3, 106, 229, .20); }
.btn.primary:hover { background: var(--accent-press); border-color: var(--accent-press); color: #fff;
  box-shadow: 0 6px 18px rgba(3, 106, 229, .26); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.danger { color: var(--red); border-color: transparent; background: transparent; }
.btn.danger:hover { background: var(--red-soft); color: var(--red); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .45; }
.btn.sm { min-height: 40px; padding: 0 15px; font-size: 14px; border-radius: 7px; }
.btn.icon { border-color: transparent; background: transparent; }
.btn.icon:hover { background: var(--accent-soft); color: var(--accent); }

/* ---- badges: pills ---- */
.badge { border: 0; border-radius: 999px; padding: 5px 11px; font-size: 11px;
  font-weight: 700; letter-spacing: .06em; }
.badge.current { background: var(--green-soft); color: var(--green); }
.badge.draft { background: var(--amber-soft); color: var(--amber); }
.badge.archived { background: var(--surface-2); color: var(--muted); }

/* ---- forms ---- */
label.field { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 16px 0 7px; }
input[type=text], input[type=password], textarea {
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 13px 14px;
  background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease; }
input[type=text]:hover, input[type=password]:hover, textarea:hover { border-color: #bccbe2; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.filedrop { border: 1.5px dashed #bed4f4; border-radius: var(--radius); padding: 22px;
  background: var(--surface-2); }
.filedrop:hover { border-color: var(--accent); background: var(--accent-soft); }
.fd-icon { border: 0; border-radius: 11px; color: var(--accent);
  background: linear-gradient(140deg, #eaf3ff 0%, #d8e8ff 100%); }
.check { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.check:hover { border-color: var(--accent); }

/* ---- example chips inside the guide dialog ---- */
.ex-ok, .ex-no { border: 0; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.ex-ok { background: var(--green-soft); color: var(--green); }
.ex-no { background: var(--red-soft); color: var(--red); }
.urlbox-path { color: var(--accent); }

/* ---- disclosure panels ---- */
details.panel { border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--card-shadow); }
details.panel > summary { padding: 15px 20px; }
details.panel > summary .fd-icon { background: var(--accent-soft); color: var(--accent); border: 0; }
details.panel > summary .chev { color: var(--muted); }
.panel-body { padding: 20px; }

/* ---- misc ---- */
.empty .em-icon { width: 64px; height: 64px; border: 0; border-radius: 20px;
  background: linear-gradient(140deg, #eaf3ff 0%, #d8e8ff 100%); color: var(--accent); }
.empty { color: var(--muted); }
.footer { color: var(--faint); font-size: 12.5px; padding-top: 40px; }
code { background: var(--accent-soft); color: var(--accent); border-radius: 7px; padding: 2px 7px; }
.dot { width: 7px; height: 7px; }

/* =========================================================================
 * Login screen — the site's hero band, applied to the identity column:
 * gradient panel, uppercase gradient display heading, blue micro-label.
 * Gradient stops are kept dark enough to stay >=3:1 on the panel (WCAG AA
 * for large text): #036ae5 -> #2f8bf5 over #e7f1ff..#f2f8ff.
 * ========================================================================= */
.auth-main {
  /* A soft blue bloom behind the whole screen so the white page is not flat. */
  background:
    radial-gradient(1100px 520px at 50% -14%, #e9f3ff 0%, rgba(233, 243, 255, 0) 62%),
    var(--bg);
  background-repeat: no-repeat;
}
.auth-strip { background: var(--surface); color: var(--muted); border-bottom: 1px solid var(--border); }
.auth-strip-inner { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; }
.auth-masthead { background: transparent; }
/* The auth masthead holds nothing but the mark, so as a separate band it was
   mostly empty space. Drop the band and draw the mark inside the gradient panel
   instead — same place the site puts it. */
.auth-masthead { display: none; }
.auth-masthead img { width: auto; height: 52px; max-width: none; }

.auth-intro {
  position: relative; overflow: hidden;
  background-color: #eaf4ff;
  background-image: url("/static/themes/sotatek/logo.svg"), var(--band);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: 34px 32px, 0 0, 0 0, 0 0;
  background-size: 34px auto, auto, auto, auto;
  border: 1px solid var(--band-edge); border-radius: 28px;
  padding: 88px 34px 36px;
}
/* Cyan bloom in the lower-right corner — the site's panels all carry one. */
.auth-intro::after {
  content: ""; position: absolute; right: -70px; bottom: -90px; width: 260px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(47, 171, 221, .42) 0%, rgba(47, 171, 221, 0) 70%);
}
.auth-intro > * { position: relative; z-index: 1; }
.auth-intro h1 {
  margin-top: 16px; font-size: 46px; font-weight: 800; line-height: 1.05;
  letter-spacing: -.03em; text-transform: uppercase;
  background: linear-gradient(98deg, #0b4bb8 0%, #036ae5 55%, #2478ea 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-intro .org { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.auth-intro .lede { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.auth-points { border-top: 0; margin-top: 24px; }
.auth-points li { border-bottom: 0; padding: 12px 0; gap: 13px; }
.auth-points .pi { width: 34px; height: 34px; border: 0; border-radius: 11px;
  background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }
.auth-points b { font-weight: 700; }

/* The two columns are centred on one axis. Stretching the card to the band's
   full height just opened a hole in its middle — a compact card whose title,
   CTA and secondary row breathe reads better next to the tall band. */
.auth-panel { border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow);
  max-width: none; }
.auth-panel-bar { padding: 34px 30px 0; background: var(--surface); color: var(--text); }
.auth-panel-bar svg { width: 15px; height: 15px; color: var(--accent); }
.auth-panel-body { display: flex; flex-direction: column; padding: 24px 30px 30px; }
.auth-local { margin-top: 22px; }
.auth-panel-note { margin-top: 16px; }
.btn.google { min-height: 56px; }
.auth-panel-note { color: var(--faint); }
.auth-hint { border: 0; border-radius: 14px; background: var(--surface-2); padding: 13px 15px; }
.auth-err { border: 0; border-radius: 14px; background: var(--red-soft); color: var(--red);
  padding: 13px 15px; }
.auth-foot { background: transparent; border-top: 0; color: var(--faint); }
/* Google is the primary CTA: brand blue, taller than the rest, soft glow. */
.btn.google { border-radius: 14px; box-shadow: 0 8px 22px rgba(3, 106, 229, .26); }
.btn.google:hover { box-shadow: 0 12px 28px rgba(3, 106, 229, .32); }

/* ---- preview command bar ---- */
.pv-bar { border-top-color: var(--accent); }

/* =========================================================================
 * Responsive — repeated after the base sheet's media queries because an
 * equally specific rule later in the cascade wins, including inside @media.
 * ========================================================================= */
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; padding: 0 16px; }
  .check { padding: 16px 15px; }
  details.panel > summary { padding: 16px 18px; }
}

@media (max-width: 900px) {
  .container > .row:first-of-type { padding-bottom: 14px; }
  .container > .row:first-of-type > div:first-child > .muted.small { text-align: left; margin-left: 0 !important; }
  .container > .row:first-of-type .page-title { font-size: 30px; }
  .auth-intro { border-radius: 22px; padding: 82px 24px 28px;
    background-position: center 26px, 0 0, 0 0, 0 0; }
  .auth-intro h1 { font-size: 34px; }
}

@media (max-width: 480px) {
  .masthead-inner { margin: 10px auto 6px; padding: 16px 18px; border-radius: 18px; }
  .masthead img { display: block; height: 36px; }
  .masthead-text { display: block; }
  .masthead-text .mh-unit { font-size: 16px; }
  .masthead-text .mh-org { display: none; }
  .container { padding-left: 13px; padding-right: 13px; }
  .card { padding: 17px 16px; }
  .page-title, .container > .row:first-of-type .page-title { font-size: 24px; }
  .auth-masthead img { height: 44px; }
  .auth-intro { border-radius: 18px; padding: 76px 20px 24px; }
  .auth-intro h1 { font-size: 30px; }
  .auth-panel { border-radius: 20px; }
}
