/* jt-oz-bridge project site. Self-contained: no external fonts, scripts or CDNs. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --band: #f3f7fb;
  --band-teal: #eef7f5;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #55626f;
  --border: #dde3ea;
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --accent-soft: #e2f3f0;
  --blue: #2563eb;
  --blue-soft: #e8effd;
  --violet: #7c3aed;
  --violet-soft: #f1ebfd;
  --amber: #d97706;
  --amber-soft: #fdf3e3;
  --rose: #e11d48;
  --rose-soft: #fdecef;
  --green: #16a34a;
  --green-soft: #eaf7ee;
  --warn-bg: #fff8eb;
  --warn-border: #f0c36d;
  --warn-text: #5f4208;
  --code-bg: #eef2f6;
  --code-text: #1f2a36;
  --pre-bg: #111a22;
  --pre-text: #dfe7ee;
  --chat-bg: #ffffff;
  --chat-head: #f5f7fa;
  --chat-me: #f6fbfa;
  --bot-tag: #e8ecf0;
  --line: #6b7b8c;
  --shadow-sm: 0 1px 2px rgba(20, 40, 60, 0.06), 0 2px 8px rgba(20, 40, 60, 0.05);
  --shadow: 0 1px 2px rgba(20, 40, 60, 0.06), 0 10px 30px rgba(20, 40, 60, 0.1);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body:lang(zh-Hant) {
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
}

body:lang(ja) {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-strong);
}

img,
svg {
  max-width: 100%;
}

code,
pre {
  font-family: var(--mono);
}

code {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
}

pre {
  background: var(--pre-bg);
  color: var(--pre-text);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(20, 40, 60, 0.04);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

.lang {
  position: relative;
  font-size: 13px;
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary:hover,
.lang[open] summary {
  color: var(--accent);
  border-color: var(--accent);
}

.lang summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.lang-caret {
  transition: transform 0.15s ease;
}

.lang[open] .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 40, 60, 0.12);
}

.lang-menu a {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}

.lang-menu a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.lang-menu a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}

.lang-menu a[aria-current]::after {
  content: "✓";
  float: right;
  margin-left: 12px;
}

/* Hero */

.hero {
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(15, 118, 110, 0.16), transparent 62%),
    radial-gradient(760px 420px at -4% 108%, rgba(37, 99, 235, 0.12), transparent 60%),
    linear-gradient(180deg, #f2faf8 0%, #eef3fb 100%);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 68px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

.version {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.version b {
  font-family: var(--mono);
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 10px;
}

.kicker {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px 14px;
  border: 1px solid #a9d8cf;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.hero h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.18;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #0f3d3a 0%, var(--accent) 55%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .nowrap {
  white-space: nowrap;
}

.hero .lead {
  font-size: 17px;
  color: #3f4c59;
  margin: 0 0 26px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.button {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 13px;
}

.stack li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 12px;
  color: #3f4c59;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.stack li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--accent));
}

.stack li:nth-child(2) {
  --dot: var(--blue);
}

.stack li:nth-child(3) {
  --dot: var(--amber);
}

.stack li:nth-child(4) {
  --dot: var(--violet);
}

.stack li:nth-child(5) {
  --dot: var(--rose);
}

/* Chat sample */

.chat {
  background: var(--chat-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(20, 40, 60, 0.06), 0 24px 48px rgba(20, 60, 80, 0.16);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}

.chat-head {
  background: var(--chat-head);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 9px 14px;
  font-size: 13px;
  color: var(--muted);
}

.chat-head b {
  color: var(--text);
}

.msg {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px;
}

.msg + .msg {
  border-top: 1px solid var(--border);
}

.msg.me {
  background: var(--chat-me);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: var(--blue);
}

.msg.bot .avatar {
  background: var(--accent);
}

.who {
  font-weight: 600;
  font-size: 13px;
}

.who small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

.who .tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--bot-tag);
  color: var(--muted);
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
}

.msg p {
  margin: 2px 0 0;
}

.msg code {
  white-space: nowrap;
}

.msg .tools {
  color: var(--muted);
  font-size: 13px;
}

.msg .btns {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.msg .btns span {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;
}

.msg .btns span:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chat-note {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 2px 0;
}

/* On premises: the self-hosted chain from the phone to the model. */

.onprem {
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(217, 119, 6, 0.08), transparent 60%),
    var(--band-teal);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 60px;
}

.chain {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 30px;
}

.chain li {
  --tone: var(--accent);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--tone);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px 16px;
}

.chain li + li::before {
  content: "→";
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.chain b {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.chain span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.chain .zulip {
  --tone: var(--blue);
}

.chain .oc {
  --tone: var(--violet);
}

.chain .model {
  --tone: var(--amber);
}

.chain .core {
  background: var(--accent);
  border-color: var(--accent-strong);
}

.chain .core b,
.chain .core span {
  color: #ffffff;
}

.perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.perks li {
  background: rgba(255, 255, 255, 0.75);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

.perks b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 15px;
}

/* Sections: each one is a full-width band, alternating white and tinted. */

main section {
  position: relative;
  padding: 64px 0;
}

main #use,
main #how,
main #security {
  background: var(--band);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
}

main #use {
  margin-top: 48px;
}

h2 {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 10px;
}

h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

p {
  margin: 0 0 12px;
}

.intro {
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 28px;
}

.muted {
  color: var(--muted);
}

.status {
  margin-top: 40px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 5px solid var(--amber);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 15px;
}

.status p {
  margin: 0;
}

/* Cards shared by the feature list, install steps and security list. */

.uses,
.steps {
  counter-reset: card;
}

.uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.uses > div,
.steps > div,
#security .plain > li {
  --tone: var(--accent);
  --tone-soft: var(--accent-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}

.uses > div:nth-child(6n + 2),
.steps > div:nth-child(3n + 2),
#security .plain > li:nth-child(5n + 2) {
  --tone: var(--blue);
  --tone-soft: var(--blue-soft);
}

.uses > div:nth-child(6n + 3),
.steps > div:nth-child(3n + 3),
#security .plain > li:nth-child(5n + 3) {
  --tone: var(--violet);
  --tone-soft: var(--violet-soft);
}

.uses > div:nth-child(6n + 4),
#security .plain > li:nth-child(5n + 4) {
  --tone: var(--amber);
  --tone-soft: var(--amber-soft);
}

.uses > div:nth-child(6n + 5),
#security .plain > li:nth-child(5n + 5) {
  --tone: var(--rose);
  --tone-soft: var(--rose-soft);
}

.uses > div:nth-child(6n + 6) {
  --tone: var(--green);
  --tone-soft: var(--green-soft);
}

.uses h3,
.steps h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.uses h3::before,
.steps h3::before {
  counter-increment: card;
  content: counter(card);
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 13px;
  font-weight: 700;
}

.uses p {
  margin: 0;
  color: var(--muted);
}

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

.fit > div {
  border: 1px solid #bfe5cd;
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.fit > .no {
  border-color: #f5c6d0;
  background: var(--rose-soft);
}

.fit h3 {
  margin-bottom: 12px;
  color: #166534;
}

.fit .no h3 {
  color: #9f1239;
}

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

.fit li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.fit li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
}

.fit .no li::before {
  content: "✕";
  background: var(--rose);
}

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

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

/* Diagram */

.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  overflow-x: auto;
}

.diagram svg {
  display: block;
  min-width: 720px;
  width: 100%;
  height: auto;
}

.diagram .zone {
  fill: rgba(15, 118, 110, 0.04);
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 6 5;
}

.diagram .zone-label {
  fill: var(--accent-strong);
  font: 700 12px var(--font);
}

.diagram .node {
  fill: #ffffff;
  stroke: #a9b7c4;
  stroke-width: 1.2;
}

.diagram .node.zulip {
  fill: var(--blue-soft);
  stroke: #8fb0f3;
}

.diagram .node.oc {
  fill: var(--violet-soft);
  stroke: #bba1f2;
}

.diagram .node.store {
  fill: var(--amber-soft);
  stroke: #ebc07d;
}

.diagram .node.core {
  fill: var(--accent);
  stroke: var(--accent-strong);
  stroke-width: 1.6;
}

.diagram .node.core + .title,
.diagram .node.core + .title + .sub {
  fill: #ffffff;
}

.diagram .title {
  fill: var(--text);
  font: 600 14px var(--font);
}

.diagram .sub {
  fill: var(--muted);
  font: 12px var(--font);
}

.diagram .edge {
  stroke: var(--line);
  stroke-width: 1.5;
  fill: none;
}

.diagram .edge-label {
  fill: var(--muted);
  font: 11px var(--font);
}

.diagram .head {
  fill: var(--line);
}

.scroll-hint {
  display: none;
  font-size: 13px;
  margin-top: 8px;
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

#how .two > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--band);
  font-size: 13px;
  color: var(--muted);
}

td:first-child {
  white-space: nowrap;
}

/* Install */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.steps > div {
  display: flex;
  flex-direction: column;
}

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

.steps li {
  margin-bottom: 6px;
}

.steps li::marker {
  color: var(--tone);
  font-weight: 700;
}

.steps > div > a {
  margin-top: auto;
  font-weight: 600;
}

.steps > div > a::after {
  content: " →";
}

/* Security */

#security .plain {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

#security .plain > li {
  margin: 0;
  color: var(--muted);
}

#security .plain > li strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}

/* Documents and related projects */

#more .plain {
  list-style: none;
  padding: 0;
}

#more .plain li {
  position: relative;
  padding-left: 18px;
}

#more .plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

#more .two > ul:last-child li::before {
  background: var(--blue);
}

footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #eef3f8, #e7eef6);
  font-size: 14px;
  color: var(--muted);
  padding: 26px 0;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

@media (max-width: 920px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .nav {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

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

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .chain {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .chain li + li::before {
    content: "↓";
    left: 50%;
    top: -24px;
    transform: translateX(-50%);
  }

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

@media (max-width: 720px) {
  .hero {
    padding: 36px 0 40px;
  }

  .wrap {
    padding: 0 16px;
  }

  .topbar .wrap {
    gap: 10px;
  }

  .brand {
    font-size: 15px;
  }

  .lang summary {
    padding: 5px 8px;
  }

  .uses,
  .fit,
  .two,
  .perks {
    grid-template-columns: minmax(0, 1fr);
  }

  .onprem {
    padding: 40px 0 44px;
  }

  #security .plain {
    grid-template-columns: minmax(0, 1fr);
  }

  main section {
    padding: 44px 0;
  }

  main #use {
    margin-top: 36px;
  }

  h2 {
    font-size: 24px;
  }

  .scroll-hint {
    display: block;
  }

  td:first-child {
    white-space: normal;
  }
}
