:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #696969;
  --soft: #9a9a9a;
  --line: #deded8;
  --line-strong: #c8c8c0;
  --black: #050505;
  --cream: #fbfaf4;
  --accent: #ff6900;
  --danger: #b42318;
  --success: #117a37;
  --content: 1360px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    MiSans,
    "MiSans VF",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(var(--content), calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(247, 247, 242, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.header-action {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.brand-word {
  font-size: 17px;
}

.site-nav {
  gap: 30px;
  color: #262626;
  font-size: 15px;
}

.site-nav a,
.header-action {
  min-height: 44px;
}

.site-nav a:hover,
.header-action:hover {
  color: var(--accent);
}

.header-action {
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 650;
}

.mimo-hero {
  position: relative;
  min-height: 680px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.word-field {
  position: absolute;
  inset: 58px 0 auto;
  display: grid;
  gap: 18px;
  color: rgba(17, 17, 17, 0.08);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.word-field span {
  animation: fieldShift 26s linear infinite;
}

.word-field span:nth-child(2n) {
  transform: translateX(-160px);
  animation-direction: reverse;
}

@keyframes fieldShift {
  from {
    translate: -80px 0;
  }
  to {
    translate: 80px 0;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 40px));
  text-align: center;
  padding: 108px 0 64px;
}

.small-kicker,
.section-index {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin: 16px 0 0;
  font-size: 92px;
  line-height: 1;
  font-weight: 800;
}

.hero-copy {
  max-width: 690px;
  margin: 28px auto 0;
  color: #3f3f3f;
  font-size: 20px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.pill-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
}

.pill-button.dark {
  background: var(--black);
  color: #fff;
}

.pill-button.light {
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.pill-button:hover {
  transform: translateY(-1px);
}

.section {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
}

.about-section,
.docs-layout,
.login-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 70px;
  align-items: start;
}

.section-body,
.prose,
.login-copy,
.login-panel,
.docs-layout > *,
.dashboard-hero > *,
.main-panel,
.summary-card,
.code-card {
  min-width: 0;
}

.prose h2,
.section h2,
.login-copy h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.12;
  font-weight: 800;
}

.prose p,
.login-copy p {
  max-width: 820px;
  margin: 28px 0 0;
  color: #3f3f3f;
  font-size: 18px;
  line-height: 1.9;
}

.card-grid {
  margin-top: 34px;
}

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

.show-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.show-card:hover,
.line-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}

.dark-card {
  background: var(--black);
  color: #fff;
}

.card-no {
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.show-card h3 {
  margin: auto 0 0;
  font-size: 30px;
  line-height: 1.18;
}

.show-card p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.dark-card p {
  color: #bdbdbd;
}

.arrow {
  margin-top: 28px;
  font-size: 28px;
}

.card-link {
  width: max-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 800;
}

.dark-card .card-link {
  color: #fff;
}

.experience-grid {
  display: grid;
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.line-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 70px 1fr minmax(240px, 0.7fr) 34px;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  transition: transform 0.2s ease;
}

.line-card span {
  color: var(--accent);
  font-weight: 800;
}

.line-card strong {
  font-size: 28px;
}

.line-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.line-card b {
  font-size: 28px;
  font-weight: 500;
}

.login-section {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
}

.login-panel {
  padding: 28px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 26px 80px rgba(17, 17, 17, 0.08);
}

.form {
  display: grid;
  gap: 12px;
}

label {
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.phone-row,
.code-row {
  min-height: 56px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream);
}

.phone-row {
  grid-template-columns: 64px 1fr;
}

.phone-row span {
  text-align: center;
  color: var(--accent);
  font-weight: 800;
  border-right: 1px solid var(--line);
}

.code-row {
  grid-template-columns: minmax(0, 1fr) 132px;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 18px;
}

input::placeholder {
  color: var(--soft);
}

.code-row button,
.session button,
.primary {
  cursor: pointer;
  font-weight: 800;
}

.code-row button,
.session button {
  min-height: 44px;
  margin-right: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.primary {
  min-height: 56px;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
}

.code-row button:disabled,
.primary:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.session[hidden] {
  display: none;
}

.session-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.session-phone {
  margin: 0;
  font-weight: 800;
}

.session button {
  padding: 0 18px;
  margin: 0;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.docs-layout {
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
}

.docs-models {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.docs-models span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 54px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.contact-form label {
  color: var(--muted);
  font-weight: 800;
}

.code-card {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--black);
  color: #fff;
}

.code-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #c8c8c8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.toolbar-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 24px;
}

code {
  color: #f5f5f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre;
}

.site-footer {
  width: min(var(--content), calc(100% - 40px));
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-body,
.ops-body {
  background: var(--bg);
}

.dashboard-shell,
.ops-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 90px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: end;
  padding: 54px 0;
}

.dashboard-hero h1 {
  font-size: 70px;
}

.summary-card {
  padding: 24px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

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

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.summary-card span {
  display: block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 800;
}

.ops-auth {
  display: grid;
  gap: 12px;
}

.ops-auth-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

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

.side-panel,
.main-panel,
.metric-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.side-panel {
  padding: 20px;
}

.side-panel a,
.side-panel button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.main-panel {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

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

.metric-card {
  padding: 22px;
}

.metric-card span {
  color: var(--accent);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 34px;
}

.table-card {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 90px;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row.header {
  background: var(--cream);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.action-panel {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.inline-form,
.stack-form {
  display: grid;
  gap: 12px;
}

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

.text-input,
.textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}

.text-input {
  min-height: 48px;
}

.model-select {
  padding: 0 16px;
  cursor: pointer;
}

.model-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.model-chip {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.model-chip:hover {
  border-color: var(--ink);
}

.textarea {
  resize: vertical;
  padding: 14px 18px;
  line-height: 1.7;
}

#playground .textarea {
  min-height: 150px;
}

.compact-primary {
  min-height: 48px;
  margin-top: 0;
  padding: 0 22px;
}

.status-strip {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream);
}

.dashboard-message {
  min-height: 24px;
  max-width: 1280px;
  margin: -18px auto 22px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-message.success {
  color: var(--success);
}

.dashboard-message.error {
  color: var(--danger);
}

.status-strip strong {
  font-size: 14px;
}

.status-strip span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.status-strip.ok {
  border-color: rgba(17, 122, 55, 0.45);
}

.status-strip.test {
  border-color: rgba(255, 105, 0, 0.5);
}

.status-strip.warn {
  border-color: rgba(180, 35, 24, 0.45);
}

.status-strip.ok span {
  color: var(--success);
}

.status-strip.test span {
  color: var(--accent);
}

.status-strip.warn span {
  color: var(--danger);
}

.secret-box,
.quickstart-box,
.list-row,
.empty-state {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.secret-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.secret-box p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.secret-box code {
  display: block;
  min-width: 0;
  overflow: auto;
  color: var(--ink);
  white-space: nowrap;
}

.quickstart-box {
  overflow: hidden;
  border-color: var(--ink);
  background: var(--black);
  color: #fff;
}

.quickstart-header {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.quickstart-header strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.quickstart-box pre {
  padding: 16px;
}

.quickstart-box code {
  display: block;
  color: #f5f5f5;
  white-space: pre;
}

.quickstart-box .mini-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.list-row strong {
  display: block;
  margin-bottom: 6px;
}

.list-row p,
.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.empty-state {
  padding: 14px;
}

.mini-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.danger-button:not(:disabled) {
  color: var(--danger);
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.playground-output {
  min-height: 260px;
  margin-top: 18px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family:
    MiSans,
    "MiSans VF",
    "Microsoft YaHei UI",
    "PingFang SC",
    system-ui,
    sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.playground-output p {
  max-width: 980px;
  margin: 0 0 16px;
}

.playground-output p:last-child {
  margin-bottom: 0;
}

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

.output-error {
  color: var(--danger);
}

.output-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.output-gallery figure {
  margin: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.output-gallery img {
  width: auto;
  max-width: 100%;
  max-height: 720px;
  height: auto;
  display: block;
  object-fit: contain;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.ops-list {
  display: grid;
  gap: 14px;
}

.ops-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.ops-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-row-title strong {
  font-size: 18px;
}

.ops-row-title span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.ops-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.ops-actions {
  min-width: 250px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.ops-note {
  min-height: 38px;
  max-width: 220px;
}

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

  h1 {
    font-size: 68px;
  }

  .about-section,
  .docs-layout,
  .contact-layout,
  .login-section,
  .dashboard-hero,
  .dashboard-grid,
  .ops-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ops-actions {
    min-width: 0;
    justify-content: flex-start;
  }

  .model-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .line-card {
    grid-template-columns: 42px 1fr 28px;
    gap: 16px;
    padding: 20px 0;
  }

  .line-card em {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .login-section,
  .site-footer,
  .dashboard-shell,
  .ops-shell {
    width: calc(100vw - 24px);
    max-width: var(--content);
  }

  .header-action {
    display: none;
  }

  .mimo-hero {
    min-height: 560px;
  }

  .word-field {
    font-size: 20px;
  }

  .hero-inner {
    width: calc(100vw - 24px);
    max-width: 900px;
  }

  h1,
  .dashboard-hero h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  .hero-copy,
  .prose p,
  .login-copy p {
    font-size: 16px;
  }

  .hero-copy,
  .prose h2,
  .section h2,
  .login-copy h2,
  .prose p,
  .line-card,
  .show-card,
  .metric-card,
  .action-panel {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-actions {
    width: min(100%, 320px);
    margin-left: auto;
    margin-right: auto;
  }

  .pill-button {
    width: 100%;
  }

  .contact-form {
    padding: 18px;
  }

  .prose h2,
  .section h2,
  .login-copy h2 {
    font-size: 28px;
    line-height: 1.18;
  }

  .section,
  .login-section {
    padding: 58px 0;
  }

  .show-card {
    min-height: 280px;
  }

  .code-row {
    grid-template-columns: 1fr;
    padding-bottom: 5px;
  }

  .code-row button {
    margin-left: 5px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .list-row,
  .secret-box,
  .ops-auth-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .quickstart-header {
    align-items: stretch;
    flex-direction: column;
  }

  .list-row {
    flex-direction: column;
  }

  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-strip span {
    text-align: left;
  }
}
