:root {
  color-scheme: light;
  --ink: #092e46;
  --muted: #62788a;
  --nav: #0c3148;
  --teal: #277f78;
  --teal-soft: #e1f0ed;
  --paper: #f5f1e8;
  --card: #fffdf9;
  --line: #d8d4ca;
  --danger: #a43c35;
  --shadow: 0 14px 34px rgb(26 47 58 / 8%);
  font-family: "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.topbar {
  height: 72px; padding: 0 max(24px, calc((100vw - 1320px) / 2));
  background: var(--nav); color: white; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 3px solid #285f6a;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #71a8a4; border-radius: 5px; font: 26px Georgia, serif; background: #22656a; }
.brand strong { display: block; font-size: 19px; }
.brand small { display: block; margin-top: 2px; font: 9px/1.2 Consolas, monospace; letter-spacing: .15em; color: #b9d3d6; }
.beta-pill { border: 1px solid #45677b; border-radius: 999px; padding: 7px 12px; font-size: 12px; letter-spacing: .08em; }

main { max-width: 1320px; margin: 0 auto; padding: 64px 24px 90px; }
.hero { display: grid; grid-template-columns: 1.5fr .75fr; gap: 72px; align-items: center; min-height: 440px; }
.eyebrow { margin: 0 0 12px; font: 12px/1.3 Consolas, monospace; letter-spacing: .16em; color: var(--teal); }
h1 { margin: 0; font: 700 clamp(38px, 5vw, 70px)/1.08 Georgia, "Microsoft YaHei UI", serif; letter-spacing: -.025em; }
.lead { max-width: 720px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.privacy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.privacy-row span { padding: 8px 12px; border: 1px solid #a8c5c1; background: var(--teal-soft); border-radius: 3px; font-size: 13px; }
.flow-card { display: grid; grid-template-columns: 42px 1fr; gap: 0 16px; padding: 30px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.flow-card span { color: var(--teal); font: 12px Consolas, monospace; padding-top: 3px; }
.flow-card p { margin: 0; padding: 0 0 22px; border-left: 1px solid #c5d7d3; padding-left: 18px; line-height: 1.5; }
.flow-card p:last-child { padding-bottom: 0; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 30px; }
.auth-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding: 48px; }
.panel-copy h2, .account-heading h2 { margin: 0 0 14px; font: 700 38px Georgia, "Microsoft YaHei UI", serif; }
.panel-copy > p:last-child, .account-heading p, .password-card > p { color: var(--muted); line-height: 1.75; }
.auth-card { max-width: 620px; width: 100%; justify-self: end; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { border: 0; border-bottom: 3px solid transparent; padding: 13px; color: var(--muted); background: transparent; cursor: pointer; }
.tab.active { color: var(--ink); border-bottom-color: var(--teal); font-weight: 700; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 650; font-size: 14px; }
input { width: 100%; min-height: 48px; border: 1px solid #c9c7bf; border-radius: 6px; padding: 10px 12px; background: #fffefa; color: var(--ink); outline: none; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(39 127 120 / 13%); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { grid-template-columns: 18px 1fr; align-items: start; font-weight: 400; color: var(--muted); line-height: 1.5; }
.consent input { min-height: auto; margin-top: 3px; }
.primary, .secondary, .quiet { border-radius: 6px; min-height: 48px; padding: 0 18px; cursor: pointer; font-weight: 700; }
.primary { border: 1px solid var(--ink); background: var(--ink); color: white; }
.secondary { border: 1px solid var(--teal); background: var(--teal-soft); color: var(--ink); }
.quiet { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.small { min-height: 36px; font-size: 13px; }
.primary:disabled, .secondary:disabled, .quiet:disabled, .disabled { opacity: .5; cursor: not-allowed; }
.message { min-height: 20px; margin: 14px 0 0; color: var(--danger); line-height: 1.45; }
.message.success { color: var(--teal); }

.account-layout { display: grid; gap: 26px; }
.account-heading { display: flex; justify-content: space-between; align-items: end; padding: 0 4px; }
.account-heading p { margin-bottom: 0; }
.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: start; }
.dashboard-grid h3 { margin: 0 0 10px; font: 700 25px Georgia, "Microsoft YaHei UI", serif; }
.download-card { grid-row: span 2; }
.release-details { display: grid; gap: 13px; margin: 24px 0; }
.release-details div { display: grid; grid-template-columns: 88px minmax(0, 1fr); border-bottom: 1px solid #e5e1d8; padding-bottom: 11px; }
.release-details dt { color: var(--muted); }
.release-details dd { margin: 0; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 13px; }
.link-button { display: flex; text-decoration: none; align-items: center; justify-content: center; }
.fine-print { color: var(--muted); font-size: 13px; line-height: 1.6; }
.section-title { display: flex; justify-content: space-between; align-items: start; }
.device-list { display: grid; gap: 10px; margin-top: 18px; }
.device { border: 1px solid #dfdcd4; border-radius: 7px; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.device strong, .device span { display: block; }
.device span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.device.revoked { opacity: .55; }
.device button { align-self: center; min-height: 34px; border: 1px solid #d6b1ad; background: #fff4f2; color: var(--danger); border-radius: 5px; cursor: pointer; }
.muted { color: var(--muted); }

footer { max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); padding: 24px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .hero, .auth-panel, .dashboard-grid { grid-template-columns: 1fr; }
  .hero { gap: 36px; padding-bottom: 55px; }
  .auth-panel { gap: 24px; padding: 28px; }
  .auth-card { justify-self: stretch; max-width: none; }
  .download-card { grid-row: auto; }
}
@media (max-width: 560px) {
  main { padding: 40px 16px 64px; }
  .topbar { height: 64px; padding: 0 16px; }
  .beta-pill { display: none; }
  h1 { font-size: 39px; }
  .field-grid { grid-template-columns: 1fr; }
  .account-heading { align-items: start; gap: 18px; }
  .panel { padding: 22px; }
  footer { flex-direction: column; gap: 8px; padding: 20px 16px; }
}
