:root {
  color-scheme: light;
  --canvas: #f2f6fc;
  --surface: #fff;
  --ink: #12233d;
  --muted: #4c607a;
  --line: #dce5f1;
  --primary: #245ed4;
  --primary-hover: #1649b1;
  --radius: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl, dd, ul { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #4982ee; outline-offset: 3px; }
.wrap { width: min(1100px, 100% - 48px); margin-inline: auto; }
.skip-link { position: absolute; top: -50px; left: 24px; padding: 8px 16px; background: white; }
.skip-link:focus { top: 8px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.toolbar, .brand, .account { display: flex; align-items: center; gap: 12px; }
.toolbar { min-height: 68px; justify-content: space-between; }
.portal-nav { display: flex; gap: 4px; margin-right: auto; }
.portal-nav a { padding: 7px 11px; border-radius: 7px; text-decoration: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
.portal-nav a:hover, .portal-nav [aria-current="page"] { color: var(--primary-hover); background: #edf4ff; }
.brand { text-decoration: none; font-size: 19px; font-weight: 750; }
.brand img { border-radius: 8px; }
.brand strong { color: var(--muted); font-weight: 600; }
.button {
  display: inline-flex; min-height: 42px; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px;
  font-size: 14px; font-weight: 650; padding: 8px 16px; text-decoration: none; white-space: nowrap;
}
.button:hover { border-color: #a3b5cf; background: #f6f9fe; }
.button.primary { color: white; border-color: var(--primary); background: var(--primary); }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button:disabled { opacity: .65; cursor: wait; }
main.wrap { padding-bottom: 72px; }
.hero { margin-block: 60px 30px; }
h1 { font-size: clamp(35px, 6vw, 56px); line-height: 1.12; letter-spacing: -.04em; }
.hero p, .sign-in p { color: var(--muted); margin-top: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.status { padding: 13px 16px; margin-bottom: 18px; border: 1px solid #d2deef; border-radius: 9px; background: #fff; }
.sign-in { padding: 30px; }
.sign-in h2 { font-size: 22px; }
.sign-in a { margin-top: 20px; }
.search { display: flex; align-items: end; gap: 12px; padding: 18px; }
.search-input { display: grid; gap: 7px; flex: 1; min-width: 0; }
.search label { font-size: 14px; font-weight: 650; }
.search input {
  min-height: 42px; width: 100%; padding: 8px 12px; border: 1px solid #acbfd7;
  border-radius: 8px; background: var(--surface); color: var(--ink);
}
.result-count { margin: 22px 0 10px; color: var(--muted); font-size: 14px; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr)); gap: 12px; padding: 0; list-style: none; }
.product { height: 100%; display: flex; flex-direction: column; align-items: start; gap: 10px; padding: 18px; }
.product h3 { font-size: 20px; overflow-wrap: anywhere; }
.product p { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.product .button { margin-top: auto; }
.more { margin: 22px auto 0; display: flex; }
.detail { width: min(600px, 100% - 36px); max-height: 85dvh; border: 1px solid var(--line); border-radius: 16px; padding: 24px; color: var(--ink); }
.detail::backdrop { background: rgb(13 25 45 / .58); }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.detail-context { font-size: 14px; color: var(--muted); }
.detail h2 { font-size: 28px; margin-bottom: 14px; overflow-wrap: anywhere; }
.detail h3 { margin-block: 23px 8px; font-size: 17px; }
.details-list { border-top: 1px solid var(--line); }
.detail-field { display: grid; grid-template-columns: minmax(85px, 1fr) 2fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.detail-field dt { color: var(--muted); }
.attachment-links { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-current { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px; }
.workspace-current h2 { margin-block: 3px; overflow-wrap: anywhere; }
.workspace-muted { color: var(--muted); font-size: 14px; }
.workspace-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 12px; }
.workspace-stat, .workspace-usage { padding: 22px; }
.workspace-stat h3 { font-size: 15px; margin-bottom: 7px; }
.workspace-quota { font-size: clamp(25px, 5vw, 34px); font-weight: 730; overflow-wrap: anywhere; }
.usage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.usage-toolbar h2 { font-size: 20px; }
.usage-toolbar + p, .usage-table-wrap, #more-usage { margin-top: 12px; }
.usage-table-wrap { overflow: auto; }
.usage-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.usage-table-wrap th, .usage-table-wrap td { padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.usage-table-wrap th { color: var(--muted); font-size: 13px; }
.usage-table-wrap th:last-child, .usage-table-wrap td:last-child { text-align: right; }
.picker-items { display: grid; gap: 8px; padding: 0; list-style: none; }
.picker-items .button { width: 100%; justify-content: space-between; gap: 8px; white-space: normal; text-align: left; }
.picker-items .button:disabled { cursor: default; }
.picker-items .button[aria-current="true"] { color: var(--primary-hover); border-color: #a4c0ff; background: #edf4ff; }

@media (max-width: 580px) {
  .wrap { width: calc(100% - 32px); }
  .hero { margin-block: 39px 23px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand strong { display: none; }
  .toolbar { gap: 5px; }
  .portal-nav a { padding: 7px; }
  .search, .sign-in { padding: 15px; }
  .workspace-current, .workspace-stat, .workspace-usage { padding: 15px; }
  .workspace-summary { grid-template-columns: 1fr; }
}
