@import url("./typography.css?v=20260905-1");

:root {
  --bg: #fff8f2;
  --surface: #fff8f2;
  --surface-muted: #f4e8de;
  --line: #ead9cc;
  --text: #2d1b12;
  --muted: #705f55;
  --brand: #a94800;
  --brand-dark: #7c3200;
  --accent: #c9763e;
  --shadow: 0 8px 24px rgba(74, 42, 27, 0.06);
}

html.dark {
  --bg: #181917;
  --surface: #211d19;
  --surface-muted: #2b2520;
  --line: #49372c;
  --text: #f2eee7;
  --muted: #b7aaa0;
  --brand: #d96516;
  --brand-dark: #f08b4a;
  --accent: #efaa77;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html.embedded .site-header, html.embedded .site-footer, html.embedded .page-intro { display: none; }
html.embedded .page-shell { max-width: none; padding: 20px; }
html.embedded .rule-bar, html.embedded .toolbar, html.embedded .group-picker,
html.embedded .pricing-card { box-shadow: none; }
html { background: var(--bg); }
body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mc-pricing-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand { color: var(--brand); font-family: "Noto Serif", serif; font-size: 24px; font-weight: 700; letter-spacing: 0; }
.top-nav { display: flex; align-items: center; gap: 30px; color: var(--muted); }
.top-nav a { padding: 25px 0 22px; border-bottom: 2px solid transparent; }
.top-nav a:hover, .top-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; color: var(--muted); }
.icon-button { width: 34px; height: 34px; padding: 0; border: 0; background: transparent; font-size: 21px; }
.start-button { padding: 8px 18px; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 700; }
.account-entry.is-dashboard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  padding: 12px 24px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(169, 72, 0, 0.14);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.account-entry.is-dashboard:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 42, 27, 0.08);
}

.page-shell { max-width: 1180px; margin: 0 auto; padding: 70px 24px 96px; }
.page-intro { max-width: 720px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: 0; }
h1 { margin: 0 0 12px; font-size: 36px; font-weight: 700; line-height: 40px; }
.page-intro > p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; line-height: 24px; }
.rule-bar, .toolbar, .group-picker, .pricing-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.rule-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 16px 20px; border-radius: 8px; color: var(--muted); font-size: 14px; line-height: 20px; }
.rule-bar div { display: flex; align-items: center; gap: 14px; color: var(--text); }
.rule-bar strong { color: var(--brand); }
.rule-bar div strong { flex-shrink: 0; white-space: nowrap; }
#updated-at { margin-left: auto; color: var(--accent); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 12px; border-radius: 8px; box-shadow: none; }
.platform-tabs, .view-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-tabs button, .view-toggle button, .group-card {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
}
.platform-tabs button, .view-toggle button { padding: 9px 14px; color: var(--muted); }
.platform-tabs button { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 500; line-height: 28px; }
.view-toggle button { font-size: 12px; font-weight: 600; line-height: 16px; }
.pricing-product-icon { width: 24px; height: 24px; object-fit: contain; }
.pricing-product-icon-anthropic,
.pricing-product-icon-openai,
.pricing-product-icon-gemini,
.pricing-product-icon-grok { filter: none; }
.platform-tabs button:hover, .view-toggle button:hover { background: var(--surface-muted); color: var(--text); }
.platform-tabs button.selected, .view-toggle button.selected { background: var(--brand); color: #fff; }
.domestic-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.domestic-filters[hidden] { display: none; }
.domestic-category-tabs { display: flex; gap: 16px; }
.domestic-category-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 88px; min-height: 40px; padding: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.domestic-category-tabs .pricing-product-icon { flex-shrink: 0; }
.domestic-category-tabs button.selected { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.domestic-category-tabs button:hover { color: var(--brand); }
.period-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  align-items: baseline;
  width: 100%;
  min-width: 194px;
  column-gap: 4px;
}
.period-part { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.period-separator { position: relative; text-align: center; }
.period-column-title { grid-column: 1 / -1; text-align: center; white-space: nowrap; }
.period-header {
  margin-top: 4px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 600;
}
.period-price { display: grid; }
.period-value { display: inline-block; position: relative; }
.period-price.has-comparison { padding-bottom: 18px; }
.subprice.period-official { position: absolute; top: 100%; left: 0; text-align: left; white-space: nowrap; }
.period-separator .period-official { width: 100%; text-align: center; }
.period-table { min-width: 1100px; }
.period-table th:nth-child(4) .period-pair { min-width: 144px; }
.group-picker { display: flex; gap: 10px; overflow-x: auto; margin-top: 18px; padding: 14px; border-radius: 8px; box-shadow: none; }
.group-picker[hidden] { display: none; }
.group-card { min-width: 180px; padding: 12px 14px; border-color: var(--line); text-align: left; }
.group-card:hover, .group-card.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.group-name { display: block; font-weight: 700; }
.group-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 16px; }
.pricing-content { margin-top: 18px; }
.admin-model-visibility { margin: 18px 0 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.admin-model-visibility-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-model-visibility-head strong { font-size: 16px; }
.admin-model-visibility-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.admin-model-visibility-head button { border: 0; border-radius: 6px; padding: 9px 14px; color: #fff; background: var(--brand); cursor: pointer; white-space: nowrap; }
.model-visibility-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.model-visibility-actions button.secondary { color: var(--text); background: var(--surface-muted); border: 1px solid var(--line); }
.admin-model-visibility button:disabled { opacity: .55; cursor: wait; }
.model-visibility-platform { grid-column: 1 / -1; margin-top: 8px; }
.model-visibility-empty { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.model-visibility-item span { overflow-wrap: anywhere; min-width: 0; }
.model-visibility-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 14px; margin-top: 16px; }
.model-visibility-item { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.model-visibility-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-visibility-status { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.pricing-card { overflow: hidden; border-radius: 8px; }
.pricing-card h2 { margin: 0; padding: 18px 20px 4px; font-size: 20px; font-weight: 700; line-height: 28px; }
.pricing-card .description { margin: 0; padding: 0 20px 16px; color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { padding: 14px 20px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-muted); color: var(--muted); font-size: 14px; font-weight: 500; }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.price { color: var(--brand); font-size: 16px; line-height: 24px; font-weight: 700; white-space: nowrap; }
.pricing-card[data-view="official"] .price { font-size: 18px; line-height: 28px; }
.subprice { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 400; }
.cache-create-empty { text-align: center; vertical-align: middle; }
.loading-state, .empty-state, .error-state { padding: 46px 20px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.error-state { color: #b14e39; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer span { color: var(--brand); font-weight: 700; }
.footer-brand { font-family: Georgia, "Microsoft YaHei", serif; font-size: 22px; font-weight: 700; color: var(--text); }
.copyright { margin: 10px 0 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 32px; font-weight: 600; }
.footer-links a { overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; gap: 12px 20px; padding-top: 14px; }
  .top-nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; }
  .top-nav a { padding: 8px 0 12px; white-space: nowrap; }
  .header-actions { margin-left: auto; }
  .page-shell { padding-top: 46px; }
  .rule-bar, .toolbar { align-items: flex-start; flex-direction: column; }
  #updated-at { margin-left: 0; }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; }
  .site-footer { flex-wrap: wrap; }
  .account-entry.is-dashboard { min-width: 80px; padding: 10px 15px; font-size: 13px; }
}
@media (max-width: 767px) {
  h1 { font-size: 30px; line-height: 36px; }
}
@media (max-width: 639px) {
  .platform-tabs button { font-size: 16px; line-height: 24px; }
}
@media (max-width: 640px) {
  .admin-model-visibility-head { flex-direction: column; }
  .model-visibility-actions { width: 100%; }
  .admin-model-visibility-head button { flex: 1; }
}
