:root {
  color-scheme: light dark;
  --bg:#f4f7fb;
  --panel:#fff;
  --soft:#ecf2f8;
  --ink:#20334a;
  --muted:#586d83;
  --line:#d3e0eb;
  --blue:#1e64a5;
  --teal:#267d71;
  --primary:linear-gradient(
      150deg,#2f76bd,#1e5b9f);
  --shadow:0 16px 40px -25px #23436a70;
  --clip:polygon(50% 0,96% 16%,93% 54%,84% 74%,69% 88%,50% 100%,31% 88%,16% 74%,7% 54%,4% 16%);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.65 "Microsoft YaHei",
    "PingFang SC",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 3px solid #428abf;
  outline-offset: 3px;
}
.inner,
.manage,
.management main > .notice {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}
.mast {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px #12213913;
}
.mast-inner,
.foot > .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mast-inner {
  min-height: 74px;
}
.logo {
  display: block;
  width: 178px;
  height: auto;
}
.mast nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 36px);
}
.mast nav a {
  display: block;
  padding: 20px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.mast nav .current {
  color: var(--blue);
  box-shadow: inset 0 -3px var(--blue);
}
.banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(
      ellipse at 88% 110%,
      #227f81 0,
      transparent 52%),
    linear-gradient(
      109deg,
      #122139 4%,
      #1c4b73 55%,
      #277e93 100%);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  background-image:
    linear-gradient(#abe1f02b 1px, transparent 1px),
    linear-gradient(
      90deg,
      #abe1f02b 1px,
      transparent 1px);
  background-size: 52px 52px;
  mask-image:
    linear-gradient(
      105deg,
      transparent,
      #000);
}
.banner-inner {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(270px, 26vw, 365px);
  padding-block: 24px 42px;
}
.crumb {
  margin: 0;
  color: #c2d9e7;
  font-size: 14px;
}
.crumb a {
  color: inherit;
}
.banner h1 {
  font-size: clamp(50px, 5.7vw, 82px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .04em;
  margin: 12px 0 9px;
}
.lead {
  color: #d3e5ee;
  margin: 0;
  font-size: 17px;
}
.workspace {
  padding-block: clamp(44px, 5vw, 72px) 82px;
  scroll-margin-top: 76px;
  min-height: 475px;
}
.tabs,
.chips,
.switch {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.tabs a,
.chips a {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-weight: 600;
  padding: 9px 21px;
}
.tabs .selected,
.chips .selected,
.input-row button,
.manage button {
  background: var(--primary);
  border-color: #2468a4;
  color: white;
}
.tabs a:hover,
.chips a:hover {
  border-color: var(--blue);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(26px, 2.5vw, 34px);
  margin: 24px 0 18px;
  line-height: 1.3;
}
.section-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  background:
    linear-gradient(
      135deg,
      #27898b,
      #174975);
  color: white;
  clip-path: var(--clip);
  font: bold 26px Arial;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(200px, 1fr);
  gap: clamp(24px, 6vw, 88px);
  align-items: start;
}
.frame,
.record,
.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 2.6vw, 34px);
}
.frame h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  margin: 26px 0 13px;
}
.frame h3:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.lookup {
  margin: 0;
}
.switch {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  gap: 14px;
}
.switch label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.switch input {
  accent-color: var(--blue);
}
.input-row {
  display: flex;
  align-items: stretch;
}
.input-row input {
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 7px 0 0 7px;
  padding: 14px 16px;
  background: var(--panel);
  color: var(--ink);
  min-width: 0;
  flex: 1;
}
.input-row button,
.manage button {
  border: 0;
  border-radius: 0 7px 7px 0;
  font-weight: 600;
  padding: 12px 23px;
  white-space: nowrap;
}
.chips a {
  font-size: 14px;
  padding: 7px 13px;
  background: var(--soft);
}
.chips .selected {
  background: var(--primary);
}
.insignia {
  display: grid;
  place-items: center;
  align-self: start;
  padding: 0 0 10px;
}
.empty {
  margin: 20px 0 0;
  color: var(--muted);
}
.listing {
  list-style: none;
  margin: 17px 0;
  padding: 0;
}
.listing a {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.listing span {
  color: var(--muted);
}
.listing strong {
  margin-left: auto;
  font-size: 13px;
}
#query-results {
  scroll-margin-top: 96px;
}
.record,
.notice {
  margin: 18px 0 0;
}
.record-title,
.record-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.record h2 {
  font-size: 22px;
  margin: 0;
  overflow-wrap: anywhere;
}
.record dl {
  display: grid;
  gap: 9px;
  margin: 19px 0;
}
.record dl > div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 10px;
}
.record dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.record dt,
.record-foot,
.notice,
.empty {
  color: var(--muted);
}
.record-foot {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.record-foot strong {
  color: var(--ink);
}
.status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  background: var(--soft);
}
.valid {
  color: #155d49;
  background: #e2f4ed;
}
.revoked,
.expired {
  color: #913f36;
  background: #f9e9e6;
}
.pending {
  color: #795318;
  background: #fbefd3;
}
.foot {
  background: #122139;
  color: #c3d2e1;
  font-size: 14px;
}
.foot .inner {
  padding: 32px 0;
  flex-wrap: wrap;
}
.foot a {
  color: #cce6f8;
}
.rail {
  position: fixed;
  right: 9px;
  bottom: 12vh;
  z-index: 2;
  display: grid;
  gap: 6px;
}
.rail a {
  background: var(--panel);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  box-shadow: var(--shadow);
  font-size: 12px;
}
.manage,
.management main > .notice {
  margin-block: 44px;
}
.manage .table-wrap {
  overflow: auto;
}
.manage table {
  border-collapse: collapse;
  background: var(--panel);
  width: 100%;
  text-align: left;
}
.manage td,
.manage th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.manage td small {
  display: block;
}
.manage fieldset {
  border: 1px solid var(--line);
  margin-bottom: 15px;
}
.manage label {
  margin-right: 14px;
  display: inline-block;
}
.manage button {
  border-radius: 5px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#161b1e;
    --ink:#edf1f3;
    --muted:#adbdc6;
    --panel:#20272b;
    --soft:#29343c;
    --line:#384852;
    --blue:#8bc2ec;
    --teal:#81cbb9;
  }
  .mast .logo {
    content: url(/public/gom-dark.webp);
  }
}
@media (max-width: 1370px) {
  .rail {
    position: static;
    display: flex;
    justify-content: center;
    margin: -40px 18px 30px;
  }
  .management .rail {
    display: none;
  }
}
@media (max-width: 760px) {
  .inner,
  .manage,
  .management main > .notice {
    width: calc(100% - 36px);
  }
  .mast-inner {
    min-height: 60px;
    gap: 10px;
  }
  .mast .logo {
    width: 120px;
  }
  .banner-inner {
    min-height: 235px;
  }
  .banner h1 {
    font-size: 46px;
  }
  .lead {
    font-size: 14px;
    max-width: 20em;
  }
  .banner-inner > div:first-child {
    z-index: 1;
  }
  .workspace {
    padding-block: 32px 67px;
    scroll-margin-top: 60px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .insignia {
    padding-bottom: 0;
  }
  .section-title {
    margin: 19px 0 14px;
    font-size: 25px;
  }
  .tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  .tabs a {
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
  }
  .frame {
    padding: 18px;
  }
  .input-row input {
    font-size: 16px;
    padding: 11px 8px;
  }
  .input-row button {
    font-size: 14px;
    padding: 10px 12px;
  }
  .foot .inner {
    gap: 12px;
    font-size: 12px;
  }
  .foot .logo {
    width: 110px;
  }
  .foot > .inner > a:last-child {
    margin-left: auto;
  }
  .record dl > div {
    grid-template-columns: 6em 1fr;
  }
  .record {
    font-size: 14px;
  }
  #query-results {
    scroll-margin-top: 70px;
  }
}
.foot > .inner {
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(22px, 6vw, 84px);
}
.foot-links {
  display: grid;
  gap: 4px;
}
.foot-links b {
  color: #fff;
  margin-bottom: 4px;
}
.foot > .inner > span {
  margin-left: auto;
}
@media (max-width: 760px) {
  .foot > .inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .foot > .inner > a,
  .foot > .inner > span {
    grid-column: 1/-1;
    margin: 0;
  }
}
/* 首页导航与账户控件。窄屏复用同一组链接。 */
.mast .mast-inner { width: min(1240px, calc(100% - 64px)); min-height: 76px; }
.brand { flex-shrink: 0; }
.mast .logo { width: 190px; }
.site-menu, .account-actions, .mast .home-links { display: flex; align-items: center; gap: 4px; }
.site-menu { margin-left: auto; gap: 16px; }
.mast .home-links a, .account-actions > * { padding: 10px 11px; border-radius: 7px; color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.mast .home-links a:hover, .mast .home-links a[aria-current], .account-actions > :hover { background: var(--soft); color: var(--blue); text-decoration: none; }
.account-actions > * { font: inherit; font-size: 14px; padding: 6px 14px; border: 1px solid var(--line); background: var(--panel); }
.account-actions :is([data-login], .signup) {
  color: white;
  background: var(--primary);
  border-color: #276cb5;
  transition: filter 100ms ease-out;
}
@media (hover: hover) {
  .account-actions :is([data-login]:enabled, .signup):hover {
    filter: brightness(1.07);
  }
}
.account-actions :is([data-login]:enabled, .signup):active {
  filter: brightness(.90);
}
@media (prefers-reduced-motion: reduce) {
  .account-actions :is([data-login], .signup) { transition: none; }
}
.account-actions[hidden], .menu-button { display: none; }
.auth-feedback:empty { display: none; }
.sx-login form { display: grid; gap: 16px; max-width: 26rem; }
.sx-login label { display: grid; gap: 6px; font-weight: 600; }
.sx-login input { padding: 10px 12px; border: 1px solid #8d98a7; border-radius: 5px; font: inherit; }
.sx-login button { justify-self: start; }
.sx-login #login-outcome { min-height: 1.5em; font-weight: 600; }
.auth-feedback { position: absolute; right: 16px; top: 100%; background: var(--panel); padding: 8px 12px; }
.hero-certificate { width: clamp(245px, 29vw, 425px); height: auto; margin-right: clamp(0px, 3vw, 55px); }
.work-grid { align-items: center; }
.query-label { display: block; font-weight: 600; margin-bottom: 12px; }
.verify-badge { padding: 0; border: 0; background: transparent; border-radius: 32%; display: block; }
.verify-badge img { display: block; width: clamp(188px, 19vw, 244px); height: auto; filter: drop-shadow(0 8px 9px #102a471b); }
.verify-badge:hover img { filter: drop-shadow(0 9px 11px #102a4745) brightness(1.04); }
.insignia { align-self: center; }
@media(max-width:1280px) and (min-width:1121px) { .mast .mast-inner{width:calc(100% - 42px)} .mast .home-links a{font-size:14px;padding-inline:7px} .mast .logo{width:160px} .site-menu{gap:8px} }
@media(max-width:1120px) {
  .menu-button { display:grid; align-content:center; justify-items:center; gap:4px; width:42px; height:42px; margin-left:auto; border:1px solid var(--line); border-radius:7px; background:var(--panel); }
  .menu-button span { width:19px; height:2px; border-radius:2px; background:var(--ink); }
  .site-menu { display:none; position:absolute; top:100%; left:0; right:0; padding:12px max(18px,4vw); max-height:calc(100dvh - 74px); overflow-y:auto; background:var(--panel); border-bottom:1px solid var(--line); box-shadow:var(--shadow); }
  .site-menu.open { display:block; } .mast .home-links { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:3px; }
  .mast .home-links a { padding:10px 12px; } .account-actions { margin-top:10px; padding-top:10px; border-top:1px solid var(--line); gap:10px; }
}
@media(max-width:760px) {
  .mast .mast-inner { width:calc(100% - 36px);min-height:64px; } .mast .logo{width:160px}
  .hero-certificate { width:clamp(105px,32vw,215px); flex-shrink:0; margin-right:-7px; }
  .banner-inner { gap:4px; } .banner h1{font-size:clamp(38px,10vw,52px)}
  .tabs { display:flex; } .tabs a{padding-inline:16px} .verify-badge img{width:166px}
}

.certificate-preview { position: relative; width: min(100%, 48rem); margin: 1rem 0 0; }
.certificate-preview img { display: block; width: 100%; height: auto; }
.certificate-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.certificate-detail { max-width: 54rem; padding-block: 1.5rem 3rem; }
.certificate-share { margin-top: 1rem; }
.certificate-share summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.certificate-share label { display: block; margin: .8rem 0 .35rem; }
.certificate-share :is(input,textarea) { display: block; width: 100%; min-width: 0; margin-top: .35rem; padding: .5rem; font: inherit; }
.certificate-share textarea { resize: vertical; }
.certificate-share button { cursor: pointer; padding: .35rem .7rem; }
