:root {
  --bg: #f4f7ff;
  --bg2: #fefefe;
  --card: rgba(255,255,255,0.92);
  --text: #162033;
  --muted: #637188;
  --line: #dbe4f5;
  --accent: #4157ff;
  --accent-2: #7a4df5;
  --accent-3: #0fb9b1;
  --danger: #cc4859;
  --warning: #d99223;
  --shadow: 0 18px 48px rgba(39, 53, 93, 0.10);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(109, 128, 255, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(122, 77, 245, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f9ff 0%, #edf2ff 100%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .92; }
img { max-width: 100%; }
.container { width: min(1200px, calc(100vw - 40px)); margin: 0 auto; }
.main-area { padding: 28px 0 56px; }
.glassy { backdrop-filter: blur(12px); }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(220,229,247,.9);
}
.header-inner, .footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.header-inner { padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--text); }
.brand strong { display: block; font-size: 1.08rem; }
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(65, 87, 255, 0.25);
}
.nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.nav a { padding: 10px 14px; border-radius: 999px; color: var(--text); font-weight: 600; }
.nav a:hover { background: rgba(65,87,255,.08); }
.global-banner {
  border-top: 1px solid rgba(220,229,247,.8);
  background: linear-gradient(90deg, rgba(65,87,255,.08), rgba(122,77,245,.08));
  color: var(--text);
}
.global-banner .container { display: flex; gap: 12px; padding: 12px 0; font-size: .95rem; }
.hero { margin-bottom: 30px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr); gap: 22px; }
.hero-card, .card {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(224, 232, 248, .95);
  box-shadow: var(--shadow);
  padding: 24px;
}
.gradient-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(131, 154, 255, .18), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(122, 77, 245, .16), transparent 32%),
    rgba(255,255,255,.88);
}
.soft-card { background: rgba(255,255,255,.84); }
.hero-card h1 { font-size: clamp(2rem, 3vw, 3.2rem); line-height: 1.05; margin: 8px 0 14px; }
.hero-copy { max-width: 820px; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.hero-metrics > div, .score-box {
  background: rgba(255,255,255,.82); border: 1px solid rgba(218,227,246,.95); border-radius: 20px; padding: 16px;
}
.hero-metrics strong, .big-metric { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-metrics span, .score-box span { color: var(--muted); font-size: .88rem; }
.stack-grid { display: grid; gap: 18px; }
.section-block { margin: 28px 0; }
.section-head, .page-head, .split-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 16px; }
.page-head { display: block; }
.split-head { display: flex; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 12px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.05rem; }
.muted, .meta, small { color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(65,87,255,.1); color: var(--accent); font-size: .82rem; font-weight: 700;
}
.badge.secondary { background: rgba(15,185,177,.12); color: #08706b; }
.badge.tertiary { background: rgba(122,77,245,.12); color: var(--accent-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700;
  box-shadow: 0 12px 24px rgba(65, 87, 255, 0.22);
}
.btn.secondary { background: rgba(65,87,255,.08); color: var(--accent); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #e86174, var(--danger)); }
.btn.small { padding: 10px 14px; font-size: .92rem; }
.ghost-link { color: var(--muted) !important; }
.card-grid { display: grid; gap: 18px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.list-stack { display: grid; gap: 16px; }
.list-card { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.list-card.slim { display: block; }
.user-section {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(222,229,245,.9);
  background: rgba(248,250,255,.9);
}
.user-section:first-child { margin-top: 0; }
.user-section h4 {
  margin: 0 0 8px;
  font-size: .98rem;
}
.role-check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin: 4px 0;
}
.role-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}
.role-check-row span {
  line-height: 1.4;
}
.danger-panel {
  border: 1px solid rgba(230, 119, 130, .4);
  background: rgba(255, 245, 246, .95);
}
.compact-stack { gap: 10px; }
.compact-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  border: 1px solid rgba(225,233,248,.95); background: rgba(255,255,255,.84);
  border-radius: 16px; padding: 12px 14px; color: var(--text);
}
.list-side, .score-pill {
  min-width: 112px; text-align: center; border-radius: 20px; padding: 14px;
  background: rgba(245,247,255,.9); border: 1px solid rgba(220,228,245,.95);
}
.score-pill strong { font-size: 1.4rem; display: block; }
.metric { display: grid; gap: 4px; }
.metric span, .score-pill span, .score-pill small { color: var(--muted); }
.section-card { position: relative; overflow: hidden; color: var(--text); }
.section-card::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 5px;
  background: var(--board-accent, var(--accent));
}
.board-dot {
  width: 18px; height: 18px; border-radius: 999px; background: var(--board-accent, var(--accent)); margin-bottom: 12px;
}
.author-card { text-align: center; }
.avatar-circle {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.35rem;
  background: linear-gradient(135deg, rgba(65,87,255,.16), rgba(122,77,245,.18)); color: var(--accent);
}
.auth-wrap { max-width: 620px; margin: 24px auto; }
.wide-wrap { max-width: 900px; }
.auth-card { padding: 30px; }
.stack-form { display: grid; gap: 14px; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form.wrap { flex-wrap: wrap; }
.toolbar-grid {
  display: grid; grid-template-columns: minmax(0,1.4fr) minmax(180px,.8fr) minmax(160px,.8fr) auto;
  gap: 12px; align-items: end;
}
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.98); color: var(--text); font: inherit;
}
label { display: grid; gap: 8px; font-weight: 600; color: var(--text); }
.helptext { color: var(--muted); font-size: .86rem; }
ul.errorlist { margin: 0; padding-left: 18px; color: var(--danger); }
.notice {
  margin-top: 12px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(229, 217, 166, .7);
  background: #fff7db;
}
.notice-info { background: rgba(65,87,255,.08); border-color: rgba(65,87,255,.16); }
.meta-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 16px;
}
.meta-grid > div {
  background: rgba(245,247,255,.88); border: 1px solid rgba(222,229,245,.9); border-radius: 18px; padding: 14px;
}
.meta-grid strong { display: block; margin-bottom: 6px; }
.abstract-box {
  margin-top: 18px; padding: 18px; border-radius: 20px;
  background: rgba(248,250,255,.9); border: 1px solid rgba(222,229,245,.9);
}
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, .9fr); gap: 22px; }
.detail-main, .detail-side { display: grid; gap: 18px; }
.article-top { padding-bottom: 26px; }
.article-body { line-height: 1.9; font-size: 1rem; white-space: normal; }
.section-divider { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
.score-cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
.comment-stack { display: grid; gap: 12px; margin-top: 18px; }
.comment-item { border-top: 1px solid rgba(222,229,245,.9); padding-top: 14px; }
.staff-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 22px; }
.staff-main { display: grid; gap: 20px; }
.staff-nav { position: sticky; top: 110px; height: fit-content; }
.staff-nav-head h3 { margin-top: 4px; }
.staff-menu { display: grid; gap: 8px; margin-top: 14px; }
.staff-menu a {
  padding: 12px 14px; border-radius: 16px; color: var(--text); font-weight: 600;
  background: rgba(247,249,255,.9); border: 1px solid rgba(223,231,248,.95);
}
.staff-menu a:hover { background: rgba(65,87,255,.08); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 10px; border-top: 1px solid rgba(223,231,248,.95); vertical-align: top; }
.messages { display: grid; gap: 10px; margin-bottom: 18px; }
.message {
  padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(226,232,246,.95); background: rgba(255,255,255,.96);
}
.message.success { background: #ebfaef; color: #1f6d38; border-color: #cce9d3; }
.message.error { background: #fff0f1; color: #9e233a; border-color: #f2c9d1; }
.message.info { background: #eef3ff; color: #2342a4; border-color: #d8e0fb; }
.site-footer { margin-top: 44px; border-top: 1px solid rgba(220,229,247,.95); background: rgba(255,255,255,.88); }
.footer-grid { padding: 28px 0; align-items: start; }
.footer-grid > div { flex: 1; }
.footer-title { font-weight: 800; margin-bottom: 10px; }
.footer-links { display: grid; gap: 8px; }
.footer-brand { margin-bottom: 12px; }
.accent-info { border-left: 4px solid var(--accent); }
.accent-success { border-left: 4px solid var(--accent-3); }
.accent-warning { border-left: 4px solid var(--warning); }
@media (max-width: 1040px) {
  .hero-split, .detail-layout, .staff-layout, .card-grid.three, .card-grid.two, .score-cards, .toolbar-grid, .meta-grid, .hero-metrics {
    grid-template-columns: 1fr;
  }
  .header-inner, .footer-grid, .list-card, .split-head { flex-direction: column; align-items: flex-start; }
  .staff-nav { position: static; }
}


.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(223,231,248,.95);
  box-shadow: 0 10px 24px rgba(40,52,98,.08);
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  transition: .2s ease;
}
.lang-chip:hover {
  color: var(--text);
  background: rgba(65,87,255,.08);
}
.lang-chip.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px rgba(65,87,255,.24);
}
@media (max-width: 1040px) {
  .lang-switcher { width: 100%; justify-content: flex-start; }
  .nav-main { width: 100%; justify-content: flex-start; }
}

.header-three-zone{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;}

.header-right-tools{display:flex;align-items:center;gap:14px;justify-self:end;flex-wrap:wrap;}

.brand-logo{width:44px;height:44px;object-fit:cover;border-radius:12px;}
.lang-chip{min-width:44px;padding:8px 10px;}
.about-layout .staff-nav{top:96px;}
.check-label{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:12px 14px;border:1px solid rgba(223,231,248,.95);border-radius:16px;background:rgba(255,255,255,.84);}
.check-label input{width:auto;margin-top:4px;}
.staff-menu a.active{background:rgba(65,87,255,.12);color:var(--accent);}
@media (max-width: 1180px){.header-three-zone{grid-template-columns:1fr;}.nav-center,.nav-user{justify-content:flex-start;}.header-right-tools{justify-self:start;}}


/* Header v5 */
.header-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 14px 0 10px; }
.header-nav-row { display: flex; justify-content: center; padding: 0 0 14px; }
.nav-main { flex-wrap: nowrap; justify-content: center; gap: 8px; padding: 6px 10px; background: rgba(255,255,255,.72); border: 1px solid rgba(220,229,247,.95); border-radius: 999px; box-shadow: 0 10px 22px rgba(39,53,93,.06); overflow-x: auto; scrollbar-width: none; }
.nav-main::-webkit-scrollbar { display: none; }
.nav-main a { white-space: nowrap; }
.header-right-tools { display: flex; align-items: center; gap: 10px; justify-self: end; }
.brand { align-self: start; }
.brand strong { font-size: 1.16rem; }
.brand small { margin-top: 2px; max-width: 420px; line-height: 1.4; }

.lang-switcher { display: flex; align-items: center; gap: 8px; }
.lang-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(220,229,247,.95); background: rgba(255,255,255,.75); color: var(--text); font-weight: 800; }
.lang-chip.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(220,229,247,.95); background: rgba(255,255,255,.86); color: var(--text); font-weight: 700; cursor: pointer; user-select: none; }
.user-menu[open] .user-menu-trigger, .user-menu:hover .user-menu-trigger { background: rgba(65,87,255,.08); }
.user-menu-caret { color: var(--muted); font-size: .9rem; }
.user-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; width: 220px; padding: 10px; border-radius: 18px; border: 1px solid rgba(220,229,247,.98); background: rgba(255,255,255,.98); box-shadow: 0 18px 48px rgba(39,53,93,.14); display: grid; gap: 4px; z-index: 60; }
.user-menu-panel a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 600; }
.user-menu-panel a:hover { background: rgba(65,87,255,.08); }

@media (max-width: 1180px) {
  .header-topbar { grid-template-columns: 1fr; }
  .header-right-tools { justify-self: start; }
  .header-nav-row { justify-content: flex-start; }
  .nav-main { justify-content: flex-start; width: 100%; }
}

@media (max-width: 720px) {
  .brand { width: 100%; }
  .brand small { max-width: none; }
  .header-right-tools { width: 100%; justify-content: space-between; }
  .user-menu-panel { left: 0; right: auto; width: min(240px, calc(100vw - 40px)); }
}


/* v4.2 layout refinement */
.site-header { background: rgba(255,255,255,.82); }
.header-topbar { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 28px; padding: 18px 0 12px; }
.header-topbar::after { content: ""; }
.brand { gap: 12px; min-width: 210px; }
.brand strong { font-size: 1.18rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); max-width: 320px; line-height: 1.45; }
.brand-mark {
  width: auto; height: auto; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--accent); font-size: 1.1rem; font-weight: 900; letter-spacing: .08em; padding: 0;
}
.brand-logo { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; }
.header-nav-row { padding: 2px 0 16px; }
.nav-main {
  gap: 2px; padding: 6px; background: transparent; border: none; box-shadow: none; overflow: visible;
}
.nav-main a {
  padding: 12px 18px; border-radius: 14px; font-weight: 700; letter-spacing: -.01em;
}
.nav-main a:hover { background: rgba(65,87,255,.08); }
.header-right-tools { gap: 12px; }
.lang-switcher {
  gap: 4px; padding: 4px 6px; border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: none;
}
.lang-chip {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px; border: none; background: transparent;
}
.lang-chip.active { box-shadow: none; }
.user-menu-trigger {
  min-height: 40px; padding: 0 14px; border-radius: 14px; box-shadow: none;
}
.user-menu-panel { border-radius: 16px; }
.submission-wrap { max-width: 1080px; }
.submission-head { margin-bottom: 18px; }
.submission-card { padding: 28px; }
.submission-form .card-grid.two { gap: 18px; }
.declaration-box { margin-top: 8px; }
.declaration-head { margin-bottom: 14px; }
.declaration-stack { display: grid; gap: 14px; }
.declaration-item {
  display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(223,231,248,.95); border-radius: 18px; background: rgba(255,255,255,.86);
}
.declaration-body { line-height: 1.75; margin-top: 8px; }
.consent-check {
  display: inline-flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px;
  width: fit-content; min-width: 220px; border-radius: 14px; background: rgba(65,87,255,.06); border: 1px solid rgba(210,221,248,.95);
}
.consent-check input { width: 18px; height: 18px; }
.score-help { margin-top: 6px; line-height: 1.6; }
@media (max-width: 1180px) {
  .header-topbar { grid-template-columns: 1fr; gap: 16px; align-items: flex-start; }
  .header-right-tools { justify-self: start; }
  .header-nav-row { justify-content: flex-start; }
  .nav-main { width: 100%; justify-content: flex-start; overflow-x: auto; }
}
@media (max-width: 720px) {
  .brand small { max-width: none; }
  .nav-main a { padding: 11px 14px; }
  .lang-switcher, .user-menu-trigger { background: rgba(255,255,255,.92); }
  .consent-check { width: 100%; }
}


/* v4.3 submission and article enhancements */
.submission-shell { display: grid; gap: 20px; }
.submission-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .9fr); gap: 22px; align-items: start; }
.submission-layout > .submission-panel { min-width: 0; }
.submission-side { display: grid; gap: 18px; align-content: start; }
.sticky-panel { position: sticky; top: 124px; }
.submission-panel { padding: 28px; }
.epoch-panel { padding: 28px; }
.epoch-meta-grid > div {
  border: 1px solid rgba(223,231,248,.95);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(248,250,255,.82);
}
.roomy-grid { gap: 20px; }
.roomy-stack { gap: 16px; }
.relaxed-head p { max-width: 900px; }
.section-head.compact { align-items: start; margin-bottom: 14px; }
.declaration-panel { max-height: calc(100vh - 170px); overflow: auto; }
.declaration-empty {
  padding: 14px 16px;
  border: 1px dashed rgba(210,220,240,.95);
  border-radius: 16px;
  background: rgba(248,250,255,.82);
  line-height: 1.7;
}
.helptext { display:block; margin-top:6px; }
.relaxed-declaration-stack { gap: 14px; }
.roomy-declaration-item { padding: 16px 0; border-top: 1px solid rgba(223,231,248,.9); }
.roomy-declaration-item:first-child { border-top: 0; padding-top: 0; }
.declaration-copy { display: grid; gap: 8px; }
.consent-check-inline { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; }
.consent-check-inline input { width: auto; min-width: 18px; height: 18px; }
.submit-primary { width: 100%; min-height: 50px; }
.article-body.rich-article-body { white-space: normal; overflow-wrap: anywhere; }
.article-body.rich-article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-body.rich-article-body th, .article-body.rich-article-body td { border: 1px solid rgba(210,220,240,.95); padding: 8px 10px; vertical-align: top; }
.article-body.rich-article-body img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 12px; }
.article-body.rich-article-body h1, .article-body.rich-article-body h2, .article-body.rich-article-body h3 { margin: 22px 0 10px; }
.admin-body { max-height: 780px; overflow: auto; }
@media (max-width: 1120px) {
  .submission-layout { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .declaration-panel { max-height: none; }
}

.domain-requirement-form .scope-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(223,231,248,.95);
  background: rgba(248,250,255,.82);
}
.checkbox-inline {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-weight: 700;
  justify-items: start;
}
.checkbox-inline .checkbox-control {
  display: grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
}
.checkbox-inline .checkbox-text {
  line-height: 1.45;
}
.checkbox-inline input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}
.checkbox-inline-strong {
  font-size: 1rem;
}
.boolean-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.domain-picker {
  display: grid;
  gap: 12px;
}
.domain-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.domain-search-input {
  min-height: 46px;
}
.domain-checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(223,231,248,.95);
  background: rgba(255,255,255,.88);
}
.domain-checkbox-list.is-disabled {
  opacity: .62;
}
.domain-check-item {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(245,247,255,.9);
  border: 1px solid rgba(223,231,248,.95);
  cursor: pointer;
}
.domain-check-control {
  display: grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
}
.domain-check-text {
  display: block;
  line-height: 1.45;
}
.domain-check-item:hover {
  background: rgba(65,87,255,.08);
}
.domain-check-item.is-disabled {
  cursor: not-allowed;
}
.domain-check-item input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}
.scope-toggle-row,
.form-boolean-row {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(223,231,248,.95);
  background: rgba(255,255,255,.78);
}
.small-text {
  font-size: .9rem;
}
.form-error {
  color: var(--danger);
  font-size: .92rem;
}
.btn.small {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 14px;
}
@media (max-width: 1040px) {
  .domain-checkbox-list,
  .boolean-grid,
  .domain-picker-toolbar {
    grid-template-columns: 1fr;
  }
}

/* v5 simplified shell with collapsible left navigation */
.sidebar-toggle { position: fixed; left: -9999px; top: -9999px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.app-sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 18px;
  background: rgba(255,255,255,.88); border-right: 1px solid rgba(220,229,247,.95);
  box-shadow: 10px 0 36px rgba(39,53,93,.05); overflow-y: auto; z-index: 70;
  transition: width .22s ease, transform .22s ease, opacity .22s ease;
}
.sidebar-brand { padding: 4px 4px 18px; border-bottom: 1px solid rgba(222,229,245,.9); margin-bottom: 14px; }
.sidebar-menu { display: grid; gap: 8px; }
.sidebar-menu a { display:flex; align-items:center; min-height: 44px; padding: 11px 13px; border-radius: 14px; color: var(--text); font-weight: 700; }
.sidebar-menu a:hover { background: rgba(65,87,255,.08); color: var(--accent); }
.sidebar-foot { margin-top: 22px; padding: 14px; border-radius: 16px; background: rgba(248,250,255,.9); line-height: 1.65; font-size: .9rem; }
.page-frame { min-width: 0; }
.compact-header { position: sticky; top: 0; z-index: 50; }
.slim-header { display:grid; grid-template-columns:auto 1fr auto; gap:16px; align-items:center; padding: 12px 0; }
.sidebar-button { display:inline-flex; width:42px; height:42px; align-items:center; justify-content:center; border-radius:14px; border:1px solid rgba(220,229,247,.95); background:rgba(255,255,255,.92); cursor:pointer; font-weight:900; color:var(--accent); }
.mobile-brand { color: var(--text); font-weight:900; letter-spacing:-.02em; }
.site-header.compact-header .brand { display: none; }
.site-header.compact-header .header-topbar::after { display:none; }
.simple-hero { margin-bottom: 28px; padding: 30px; }
.simple-hero h1 { font-size: clamp(2rem, 3vw, 3.1rem); margin-bottom: 10px; }
.latest-article-list .list-card { align-items: stretch; }
.simplified-submission-layout { grid-template-columns: 1fr; max-width: 1080px; }
.simplified-submit .submission-panel { position: static; }
.lang-switcher { background: rgba(255,255,255,.8); }
.global-banner .container { align-items:center; }
.global-banner span { line-height:1.6; }

.sidebar-toggle:checked ~ .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar-toggle:checked ~ .app-shell .app-sidebar { transform: translateX(-100%); opacity: 0; pointer-events: none; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left:0; top:0; width: 280px; transform: translateX(-100%); }
  .sidebar-toggle:checked ~ .app-shell .app-sidebar { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .sidebar-toggle:checked ~ .app-shell { grid-template-columns: 1fr; }
  .slim-header { grid-template-columns: auto 1fr; }
  .header-right-tools { grid-column: 1 / -1; justify-self: start; width: 100%; justify-content: space-between; }
}
.multilingual-editor { display: grid; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(248,250,255,.82); border: 1px solid rgba(223,231,248,.95); }
.multilingual-editor label { margin: 0; }


/* v5.3.1 homepage layout and i18n polish */
.app-sidebar { padding-bottom: 26px; }
.sidebar-brand { margin-bottom: 18px; }
.sidebar-brand .brand { align-items: center; }
.sidebar-brand .brand strong { font-size: 1.7rem; line-height: 1.1; }
.sidebar-brand .brand small { margin-top: 4px; max-width: 170px; line-height: 1.45; }
.sidebar-menu { margin-top: 10px; }
.sidebar-menu a { min-height: 46px; font-size: 1.02rem; }
.sidebar-foot { display: none !important; }
.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.78fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 26px;
}
.home-slogan-card {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  padding: 34px 36px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at top left, rgba(65,87,255,.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(15,185,177,.09), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(245,248,255,.98));
}
.home-slogan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(122,77,245,.03) 100%);
  pointer-events: none;
}
.home-slogan-card > * { position: relative; z-index: 1; }
.hero-slogan {
  max-width: 11ch;
  font-size: clamp(2.2rem, 4vw, 4.1rem) !important;
  line-height: 1.12;
  letter-spacing: -.04em;
  margin: 6px 0 14px;
}
.home-slogan-card .hero-copy { max-width: 700px; font-size: 1.05rem; line-height: 1.8; }
.notice-side-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 290px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,249,255,.98));
}
.notice-panel-header { margin-bottom: 2px; }
.notice-panel-header h2 { font-size: 1.8rem; line-height: 1.2; }
.compact-notice-list { display: grid; gap: 12px; }
.compact-notice-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(223,231,248,.95);
  background: rgba(250,251,255,.92);
  box-shadow: none;
}
.compact-notice-card h3 { font-size: 1.05rem; line-height: 1.35; margin-bottom: 6px; }
.compact-notice-card .muted, .compact-notice-card p { line-height: 1.65; margin-bottom: 0; }
.home-latest-direct { margin-top: 2px; }
.home-latest-section .section-head { margin-bottom: 18px; }
.home-latest-section .list-card { align-items: center; }
.badge-row { align-items: center; }
.badge { font-size: .8rem; }
@media (max-width: 1120px) {
  .home-hero-grid { grid-template-columns: 1fr; }
  .home-slogan-card, .notice-side-card { min-height: auto; }
  .hero-slogan { max-width: 100%; }
}


/* v5.4.1 language-aware homepage slogan sizing */
html[lang="en"] .home-slogan-card {
  align-content: center;
}
html[lang="en"] .hero-slogan {
  max-width: min(980px, 100%) !important;
  font-size: clamp(2.4rem, 4.2vw, 4.9rem) !important;
  line-height: 1.04;
  letter-spacing: -.055em;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}
html[lang="en"] .home-slogan-card .hero-copy {
  max-width: 880px;
}
html[lang="zh-hans"] .hero-slogan,
html[lang="zh-hant"] .hero-slogan {
  max-width: 13em;
  font-size: clamp(2.1rem, 3.8vw, 4.3rem) !important;
  line-height: 1.16;
  text-wrap: balance;
}
@media (max-width: 1280px) {
  html[lang="en"] .hero-slogan {
    font-size: clamp(2.1rem, 3.8vw, 4.2rem) !important;
  }
}
@media (max-width: 900px) {
  html[lang="en"] .hero-slogan,
  html[lang="zh-hans"] .hero-slogan,
  html[lang="zh-hant"] .hero-slogan {
    max-width: 100% !important;
    font-size: clamp(2rem, 8vw, 3.4rem) !important;
    line-height: 1.1;
  }
}


/* thumbs up/down feedback */
.reaction-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.reaction-count { border: 1px solid rgba(223,231,248,.95); border-radius: 18px; padding: 18px; text-align: center; background: rgba(250,251,255,.9); }
.reaction-count strong { display: block; font-size: 2rem; line-height: 1; color: var(--ink); }
.reaction-count span { display: block; margin-top: 8px; color: var(--muted); font-size: .92rem; }
.reaction-form { display: flex; gap: 12px; flex-wrap: wrap; }
.reaction-form .btn { min-width: 120px; justify-content: center; }
.btn.active-reaction { background: linear-gradient(135deg, #3b82f6, #6d5dfc); color: #fff; box-shadow: 0 12px 24px rgba(79,70,229,.18); }
.btn.active-reaction.danger { background: linear-gradient(135deg, #64748b, #ef4444); }


/* v5.7 deployment + admin email polish */
.email-admin-help .code-card { margin: 14px 0; padding: 16px 18px; border-radius: 16px; background: rgba(15, 23, 42, .04); border: 1px solid rgba(148, 163, 184, .24); line-height: 1.75; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: .94rem; }
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.inline-form input[type="email"] { min-width: 260px; flex: 1; }
.email-settings-card .helptext, .email-admin-help .muted { line-height: 1.7; }

/* v5.8 responsive header/navigation patch */
.app-shell {
  grid-template-columns: 1fr;
}
.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.sidebar-toggle:checked ~ .app-shell .app-sidebar {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 39, .34);
  opacity: 0;
  pointer-events: none;
  z-index: 65;
}
.sidebar-toggle:checked ~ .app-shell .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}
.site-header.compact-header .brand {
  display: inline-flex;
}
.slim-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.sidebar-button {
  display: none;
}
.header-nav-row {
  display: flex;
}

@media (max-width: 920px) {
  .sidebar-button {
    display: inline-flex;
  }
  .slim-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .inline-nav {
    display: none;
  }
  .mobile-brand {
    min-width: 0;
  }
  .mobile-brand strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-right-tools {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    justify-content: space-between;
  }
}

/* v5.9 compact top header row for title + nav + account */
.header-nav-row { display: none !important; }
.slim-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.inline-nav {
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.inline-nav::-webkit-scrollbar { display: none; }
.inline-nav a {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .94rem;
}
@media (max-width: 920px) {
  .slim-header {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 10px 0;
  }
}

.risk-warning-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e63946;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
}
