:root {
  --bg: #071024;
  --panel: #0d1a34;
  --line: #20345d;
  --text: #e8f0ff;
  --muted: #9eb3d9;
  --brand: #46a0ff;
  --brand2: #18d6ff;
  --ok: #4ade80;
  --warn: #f59e0b;
  --danger: #f87171;
  --nav-dyn-bg: linear-gradient(120deg, #173667 0%, #184987 45%, #0f7f9e 100%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft Yahei", sans-serif;
  background: radial-gradient(circle at top right, #0c1f44 0%, var(--bg) 55%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.shell { max-width: 1200px; margin: 0 auto; padding: 28px 20px 56px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.brand { font-weight: 700; letter-spacing: .5px; }
.brand span { color: var(--brand2); }
.nav { display: flex; gap: 12px; }
.nav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.nav a:hover { color: var(--text); border-color: var(--brand); }

.hero {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(70,160,255,.18), rgba(24,214,255,.08));
  padding: 36px;
}
.hero h1 { margin: 0 0 10px; font-size: 38px; }
.hero p { margin: 0; color: var(--muted); line-height: 1.7; }

.hero-banner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  margin-top: 14px;
}

.banner-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(24,214,255,.14), rgba(70,160,255,.08));
  padding: 20px;
  min-height: 220px;
}

.banner-card.small {
  background: linear-gradient(140deg, rgba(70,160,255,.10), rgba(10,23,48,.92));
}

.category-strip {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero .actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 18px;
}

.section h2 { margin: 0 0 12px; font-size: 24px; }
.section p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(12, 31, 68, .5);
  font-size: 12px;
}

.stack { display: grid; gap: 10px; }

.timeline { border-left: 1px solid var(--line); padding-left: 12px; margin-left: 6px; }
.timeline .item { margin: 8px 0; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #0a1730; color: var(--muted); }
.tabs button.active { color: #041124; background: linear-gradient(120deg, var(--brand), var(--brand2)); border: none; }

.grid { margin-top: 22px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.card {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 18px;
}
.card h3 { margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; line-height: 1.6; }


.product-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.product-card {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, #0a1730, #0d1a34);
  padding: 16px;
}

.product-card .name { font-size: 20px; margin-bottom: 6px; }
.product-card .price { margin-top: 8px; font-size: 18px; color: #d5e8ff; }

.news-list { display: grid; gap: 10px; }
.news-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #09152a; }
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
  margin-bottom: 14px;
}

.title { font-size: 18px; margin: 0 0 12px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
input, select, button, textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1730;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}
input, select { min-width: 180px; }
textarea { width: 100%; min-height: 100px; }

button {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  color: #041124;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 500; }
tr:hover td { background: rgba(24, 214, 255, .05); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1730;
  padding: 12px;
}
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 24px; margin-top: 6px; }

.ok { color: var(--ok); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.muted { color: var(--muted); }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, .68);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

.modal {
  width: min(960px, 92vw);
  max-height: 84vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #081429;
  padding: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

pre {
  white-space: pre-wrap;
  background: #071024;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 10px;
  color: #bed4ff;
}

@media (max-width: 900px) {
  .card { grid-column: span 12; }
  .product-card { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .cols-2 { grid-template-columns: 1fr; }
  .hero-banner { grid-template-columns: 1fr; }
}

/* homepage (mi-like structure, custom brand content) */
body.home-page {
  background: #f5f5f5;
  color: #333;
}

.site-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 100;
}

.site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nav-dyn-bg);
  opacity: .18;
  transition: background .45s ease, opacity .45s ease;
}

.site-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
}

.site-nav.scrolled::before {
  opacity: 0;
}

.site-nav.scrolled::after {
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid #ececec;
  backdrop-filter: blur(8px);
}

.site-nav-inner {
  position: relative;
  z-index: 2;
  min-height: 74px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: stretch;
  gap: 16px;
}

.code-logo {
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dff6ff;
  border-left: 2px solid rgba(111, 222, 255, .8);
  border-right: 2px solid rgba(111, 222, 255, .8);
}

.code-logo .logo-text {
  font-size: 34px;
  letter-spacing: 2px;
  line-height: 1;
  font-weight: 500;
  color: #73d3f4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.site-nav.scrolled .code-logo {
  border-left-color: rgba(15, 127, 158, .75);
  border-right-color: rgba(15, 127, 158, .75);
}

.site-nav.scrolled .code-logo .logo-text {
  color: #0f7f9e;
  text-shadow: none;
}

.site-nav-links,
.site-auth-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav-links a,
.site-auth-links a {
  height: 74px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-size: 17px;
  color: #fff;
  transition: background .2s ease, color .2s ease;
}

.site-nav.scrolled .site-nav-links a,
.site-nav.scrolled .site-auth-links a {
  color: #333;
}

.site-nav.scrolled .site-auth-links a {
  color: #666;
}

.site-auth-links a {
  font-size: 15px;
  color: #f2f2f2;
}

.home-user-menu {
  position: relative;
  margin-left: 10px;
}

.home-user-trigger {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-nav.scrolled .home-user-trigger {
  border-color: #d9e2ef;
  background: #fff;
}

.home-user-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #fff;
  color: #223042;
  box-shadow: 0 12px 28px rgba(9, 24, 50, .16);
  display: none;
  padding: 8px;
  z-index: 25;
}

.home-user-menu:hover .home-user-dropdown,
.home-user-menu:focus-within .home-user-dropdown,
.home-user-dropdown.show {
  display: block;
}

.home-user-id {
  padding: 8px 10px;
  font-size: 12px;
  color: #6b7f99;
  border-bottom: 1px solid #ecf1f7;
  margin-bottom: 4px;
  user-select: text;
}

.home-user-dropdown a,
.home-user-dropdown button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #223042;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  display: block;
}

.home-user-dropdown a:hover,
.home-user-dropdown button:hover {
  background: #f3f7fc;
}

.site-nav-links a:hover,
.site-auth-links a:hover {
  background: rgba(255, 255, 255, .12);
  color: #ffcfab;
}

.site-nav.scrolled .site-nav-links a:hover,
.site-nav.scrolled .site-auth-links a:hover {
  background: rgba(255, 103, 0, .08);
  color: #ff6700;
}

.home-wrap {
  width: min(1226px, calc(100vw - 32px));
  margin: 0 auto;
}

.home-topline {
  background: #333;
  color: #b0b0b0;
  font-size: 12px;
}

.home-topline-inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-topline-left,
.home-topline-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-topline a { color: #b0b0b0; }
.home-topline a:hover { color: #fff; }

.home-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .06);
}

.home-nav-inner {
  min-height: 100px;
  display: grid;
  grid-template-columns: 230px 1fr 320px;
  gap: 18px;
  align-items: center;
}

.home-logo {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
}

.home-logo img {
  width: 200px;
  max-width: 100%;
  height: auto;
  display: block;
}

.home-logo-text {
  font-size: 28px;
  color: #0f7f9e;
  font-weight: 700;
}

.home-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
}

.home-menu a {
  color: #333;
  font-size: 17px;
  white-space: nowrap;
  transition: color .2s ease;
}

.home-menu a:hover { color: #ff6700; }

.home-search-wrap {
  height: 50px;
  border: 1px solid #e0e0e0;
  display: grid;
  grid-template-columns: 1fr 70px;
  background: #fff;
}

.home-search-wrap input {
  border: none;
  min-width: 0;
  background: #fff;
  color: #333;
}

.home-search-wrap button {
  border-radius: 0;
  border-left: 1px solid #e0e0e0;
  background: #fff;
  color: #616161;
  font-weight: 500;
}

.home-search-wrap button:hover {
  background: #ff6700;
  color: #fff;
}

.home-main { padding: 0 0 34px; }

.home-landing {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
}

.home-landing .home-hero-main {
  min-height: 100vh;
}

.home-showcase {
  display: grid;
  grid-template-columns: 234px 1fr 234px;
  gap: 14px;
  margin-bottom: 14px;
}

.home-cate {
  background: #424242;
  padding: 10px 0;
}

.home-cate a {
  color: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 24px;
  font-size: 14px;
  transition: background .2s ease, padding-left .2s ease;
}

.home-cate a:hover {
  background: #ff6700;
  padding-left: 28px;
}

.home-hero-main {
  min-height: 460px;
  border-radius: 0;
  background: var(--nav-dyn-bg);
  color: #fff;
  display: flex;
  align-items: flex-end;
  transition: transform .28s ease, box-shadow .28s ease;
  position: relative;
  will-change: transform;
}

.home-hero-main.dragging {
  transition: none !important;
}

.home-hero-main.drag-snap {
  transition: transform .24s cubic-bezier(.22,.61,.36,1), opacity .24s ease;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 74px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease, color .2s ease;
}

.hero-arrow.left { left: 0; }
.hero-arrow.right { right: 0; }

.home-hero-main:hover .hero-arrow {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-arrow:hover {
  background: transparent;
  color: #ffcfab;
}

@media (hover: none), (pointer: coarse) {
  .hero-arrow {
    width: 34px;
    height: 52px;
    font-size: 24px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(0, 0, 0, .22);
    color: rgba(255, 255, 255, .92);
  }

  .hero-arrow.left { left: 6px; }
  .hero-arrow.right { right: 6px; }

  .hero-arrow:hover {
    background: rgba(0, 0, 0, .32);
    color: #fff;
  }
}

.home-hero-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(18, 44, 87, .26);
}

.home-hero-content { padding: 40px; }
.home-landing .home-hero-content {
  width: min(1226px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 140px 0 56px;
}

.home-hero-tag {
  margin: 0 0 8px;
  font-size: 14px;
  opacity: .9;
}

.home-hero-main h1 {
  margin: 0;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.2;
}

.home-hero-main > .home-hero-content > p {
  margin: 10px 0 0;
  font-size: 15px;
  color: #f1f6ff;
  line-height: 1.8;
  max-width: 620px;
}

.home-hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.home-hero-actions a {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
  padding: 10px 18px;
  border-radius: 20px;
}

.home-hero-actions a:hover {
  background: #fff;
  color: #0f7f9e;
}

.home-hero-actions a.ghost { background: rgba(255, 255, 255, .08); }

.home-hero-dots {
  margin-top: 22px;
  display: flex;
  gap: 8px;
}

.home-hero-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  display: inline-block;
}

.home-hero-dots .on { background: #fff; }

.home-service-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px;
}

.home-service-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #333;
}

.service-btn {
  display: block;
  border: 1px solid #e0e0e0;
  padding: 12px 12px;
  margin-bottom: 10px;
  color: #666;
  background: #fff;
  border-radius: 2px;
  font-size: 14px;
  transition: all .2s ease;
}

.service-btn:hover {
  border-color: #ff6700;
  color: #ff6700;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.home-shortcut {
  background: #fff;
  border: 1px solid #e0e0e0;
  min-height: 126px;
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-shortcut:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, .08);
}

.home-shortcut strong {
  color: #333;
  font-size: 18px;
  font-weight: 500;
}

.home-shortcut p {
  margin: 8px 0 0;
  color: #757575;
  font-size: 13px;
  line-height: 1.7;
}

.home-floor {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 24px;
}

.home-floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-floor-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 300;
  color: #333;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.home-card {
  min-height: 188px;
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 22px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
}

.home-card h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.home-card p {
  margin: 10px 0 0;
  color: #666;
  line-height: 1.7;
}

.home-row-block { margin-top: 20px; }

.home-row-block h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
}

.home-product-floor {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
}

.home-product-feature {
  background: linear-gradient(135deg, #fff2e6, #ffe9d6);
  border: 1px solid #f3d3bc;
  min-height: 386px;
  padding: 26px;
  transition: transform .24s ease, box-shadow .24s ease;
}

.home-product-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.home-product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px;
  min-height: 186px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
}

.home-product-feature .tag,
.home-product-card .tag {
  margin: 0;
  color: #999;
  font-size: 12px;
}

.home-product-feature h4,
.home-product-card h4 {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 500;
  color: #333;
}

.home-product-feature p,
.home-product-card p {
  margin: 0;
  color: #757575;
  line-height: 1.7;
  font-size: 14px;
}

.home-product-feature strong,
.home-product-card strong {
  display: inline-block;
  margin-top: 12px;
  color: #ff6700;
  font-size: 20px;
  font-weight: 500;
}

.home-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-news-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px;
  min-height: 176px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
}

.home-news-card .date {
  margin: 0;
  color: #999;
  font-size: 12px;
}

.home-news-card h3 {
  margin: 8px 0;
  color: #333;
  font-size: 18px;
  font-weight: 500;
}

.home-news-card p {
  margin: 0;
  color: #757575;
  line-height: 1.7;
  font-size: 14px;
}

.site-footer {
  background: #fafafa;
  border-top: 1px solid #e0e0e0;
  padding: 26px 0 34px;
}

.site-footer-inner {
  font-size: 12px;
  color: #8a8a8a;
  line-height: 1.9;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
  justify-content: center;
}

.footer-links a {
  color: #666;
}

.footer-links a:hover {
  color: #ff6700;
}

@media (max-width: 1200px) {
  .home-nav-inner {
    grid-template-columns: 220px 1fr;
  }
  .home-search-wrap { grid-column: 1 / -1; }
  .home-showcase { grid-template-columns: 1fr; }
  .home-cate { display: none; }
  .home-service-box { order: 3; }
  .home-shortcuts,
  .home-card-grid,
  .home-news-grid,
  .home-product-floor,
  .home-product-grid {
    grid-template-columns: 1fr;
  }
  .home-hero-main h1 { font-size: 34px; }
  .home-landing .home-hero-main { min-height: 100vh; }
  .home-landing .home-hero-content { padding: 120px 0 40px; }
}

.ownership-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 14px;
}

.ownership-card,
.home-feature-card,
.doc-card,
.doc-section,
.contact-card {
  border: 1px solid #e8edf5;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 50px rgba(21, 42, 71, .08);
}

.ownership-card {
  padding: 22px;
}

.ownership-card h2,
.home-feature-card h3,
.doc-card h3,
.doc-section h2,
.contact-card h3 {
  margin: 0 0 8px;
  color: #17304e;
}

.ownership-card p,
.home-feature-card p,
.doc-card p,
.doc-section p,
.contact-card p,
.doc-list,
.doc-meta {
  color: #50627a;
  line-height: 1.75;
}

.ownership-meta,
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ownership-meta span,
.doc-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4fb;
  color: #1d426e;
  font-size: 13px;
}

.home-section-grid,
.doc-grid,
.contact-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.home-feature-card,
.doc-card,
.contact-card {
  grid-column: span 4;
  padding: 20px;
}

.home-feature-card.large,
.contact-card.large {
  grid-column: span 6;
}

.contact-card.small {
  grid-column: span 6;
}

.home-feature-card .eyebrow,
.doc-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #21528d;
  font-size: 12px;
  font-weight: 700;
}

.home-cta-row,
.doc-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.home-link-btn,
.doc-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #173c72, #2ea7a2);
  color: #fff;
  font-weight: 700;
}

.home-link-btn.secondary,
.doc-link-btn.secondary {
  background: #eef4fb;
  color: #1d426e;
}

.doc-main {
  min-height: calc(100vh - 180px);
  padding: 116px 20px 52px;
}

.doc-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.doc-hero {
  padding: 30px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #173b67 0%, #1f5d96 45%, #22a89d 100%);
  box-shadow: 0 24px 60px rgba(14, 40, 74, .18);
}

.doc-hero h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.12;
}

.doc-hero p {
  margin: 0;
  max-width: 760px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .88);
}

.doc-section {
  margin-top: 14px;
  padding: 22px;
}

.doc-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.doc-list li + li {
  margin-top: 8px;
}

.contact-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.site-footer .footer-links a {
  color: #31455f;
}

.site-footer .footer-links a:hover {
  color: #173c72;
}

@media (max-width: 900px) {
  .ownership-strip,
  .home-section-grid,
  .doc-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card,
  .home-feature-card.large,
  .doc-card,
  .contact-card,
  .contact-card.large,
  .contact-card.small {
    grid-column: span 1;
  }

  .doc-hero h1 {
    font-size: 30px;
  }
}

/* portal page (login/register) */
body.portal-page {
  background: #f5f5f5;
  color: #333;
}

.portal-main {
  padding: 106px 0 48px;
}

.portal-wrap {
  width: min(1226px, calc(100vw - 32px));
  margin: 0 auto;
}

.portal-auth-layout {
  display: grid;
  grid-template-columns: 1.2fr .95fr;
  gap: 20px;
}

.portal-hero {
  min-height: 520px;
  padding: 42px;
  background: linear-gradient(120deg, #173667, #0f7f9e);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 46px rgba(15, 49, 93, 0.25);
}

.portal-hero .tag {
  margin: 0;
  font-size: 14px;
  opacity: .9;
}

.portal-hero h1 {
  margin: 14px 0 10px;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.2;
}

.portal-hero p {
  margin: 0;
  max-width: 580px;
  color: #edf4ff;
  line-height: 1.8;
}

.portal-auth-card {
  background: #fff;
  border: 1px solid #ececec;
  padding: 24px;
  min-height: 520px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(14, 24, 42, 0.08);
}

.portal-auth-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
}

.portal-auth-card .row {
  margin-bottom: 10px;
}

.row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 4px;
  background: #f7f9fc;
}

.auth-mode button {
  border-radius: 10px;
  background: transparent;
  color: #666;
  min-width: 0;
}

.auth-mode button.active {
  background: #ff6700;
  color: #fff;
}

.auth-method {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 4px;
  background: #fff;
}

.auth-method button {
  border-radius: 10px;
  background: transparent;
  color: #666;
  min-width: 0;
}

.auth-method button.active {
  background: #173667;
  color: #fff;
}

.scan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.scan-btn {
  border-radius: 10px;
  border: 1px solid #e3e7f0;
  background: #fff;
  color: #555;
  min-width: 0;
  font-size: 13px;
}

.scan-btn.active {
  border-color: #ff6700;
  color: #ff6700;
  background: #fff7f1;
}

.scan-tip {
  color: #999;
  font-size: 12px;
  margin-bottom: 8px;
}

.qr-panel {
  border: 1px dashed #d6ddeb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  text-align: center;
  background: #fbfcff;
}

.qr-panel img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: none;
  margin: 0 auto 8px;
  background: #fff;
}

.scan-link {
  font-size: 12px;
  color: #0f7f9e;
}

.scan-link:hover {
  color: #ff6700;
}

.portal-auth-card input,
.portal-auth-card select {
  min-width: 100%;
  border-radius: 12px;
  border: 1px solid #e3e7f0;
  background: #fff;
  color: #333;
}

.portal-auth-card button {
  min-width: 100%;
  border-radius: 12px;
  background: #ff6700;
  color: #fff;
}

.portal-auth-card button.ghost {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #666;
}

@media (max-width: 960px) {
  .portal-auth-layout {
    grid-template-columns: 1fr;
  }

  .portal-hero,
  .portal-auth-card {
    min-height: auto;
  }

  .row-inline {
    grid-template-columns: 1fr;
  }
}

.portal-panels {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.portal-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  min-height: 300px;
}

.portal-panel .title {
  color: #333;
  font-size: 22px;
  font-weight: 400;
}

.portal-panel button {
  border-radius: 0;
  background: #ff6700;
  color: #fff;
}

.portal-panel button.ghost {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #666;
}

.login-stage-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 420px);
  gap: 20px;
  align-items: stretch;
}

.login-hero-panel,
.login-auth-panel {
  border: 1px solid rgba(139, 92, 246, .16);
  border-radius: 28px;
  overflow: hidden;
}

.login-hero-panel {
  position: relative;
  min-height: 720px;
  background:
    radial-gradient(circle at 18% 16%, rgba(250, 204, 21, .24), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(251, 146, 60, .22), transparent 26%),
    radial-gradient(circle at 45% 78%, rgba(139, 92, 246, .24), transparent 30%),
    linear-gradient(145deg, #120b1f 0%, #191226 38%, #25182f 100%);
  padding: 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.login-auth-panel {
  background: linear-gradient(180deg, rgba(255, 248, 240, .98), rgba(255, 255, 255, .95));
  box-shadow: 0 22px 54px rgba(17, 24, 39, .18);
}

.login-auth-frame {
  height: 100%;
  padding: 34px 28px;
  color: #2a1d21;
  display: flex;
  flex-direction: column;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #ffe9b4;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.login-auth-frame .login-kicker {
  background: rgba(255, 176, 90, .12);
  color: #a04c00;
}

.login-display,
.login-auth-title {
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: -.03em;
}

.login-hero-copy {
  max-width: 620px;
}

.login-display {
  margin: 16px 0 14px;
  color: #fff8ea;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.login-hero-copy p {
  margin: 0;
  max-width: 540px;
  color: rgba(255, 245, 232, .78);
  line-height: 1.7;
}

.login-mood-strip {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-mood-pill {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 247, 235, .7);
  font-size: 12px;
}

.login-mood-pill.active {
  background: rgba(255, 233, 180, .16);
  color: #fff0cf;
  border-color: rgba(255, 214, 133, .35);
}

.login-stage-grid {
  position: absolute;
  inset: auto 34px 34px 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.login-mascot-card {
  position: relative;
  min-height: 240px;
  border-radius: 24px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .03)),
    linear-gradient(140deg, color-mix(in srgb, var(--card-color) 92%, #ffffff 8%), color-mix(in srgb, var(--card-color) 54%, #09070f 46%));
  transform: translateY(var(--float-y));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 24px 44px rgba(0, 0, 0, .25);
}

.login-mascot-glow {
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 70%);
  opacity: .44;
}

.login-mascot-figure {
  position: relative;
  width: 100%;
  height: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.login-mascot-head {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 42% 42% 46% 46%;
  background: linear-gradient(180deg, #fff7ed, #ffe8d6);
  box-shadow: inset 0 -10px 18px rgba(255, 181, 138, .24);
  transform: translateX(calc(var(--look-x) * .42)) rotate(var(--head-tilt));
  transition: transform .22s ease, border-radius .22s ease;
}

.login-mascot-body {
  margin-top: -10px;
  width: 132px;
  height: 84px;
  border-radius: 38px 38px 18px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-accent) 72%, #fff 28%), color-mix(in srgb, var(--card-color) 86%, #ffffff 14%));
}

.login-eye,
.login-brow,
.login-mouth,
.login-cheek {
  position: absolute;
}

.login-eye {
  top: 44px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #23161c;
  transform: translate(var(--look-x), var(--look-y));
  transition: transform .18s ease, height .18s ease, width .18s ease;
}

.login-eye::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  top: 2px;
  left: 2px;
}

.login-eye.left { left: 28px; }
.login-eye.right { right: 28px; }

.login-brow {
  top: 28px;
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: rgba(60, 31, 38, .72);
  transition: transform .18s ease, opacity .18s ease;
}

.login-brow.left { left: 22px; transform: rotate(-8deg); }
.login-brow.right { right: 22px; transform: rotate(8deg); }

.login-mouth {
  left: 50%;
  bottom: 24px;
  width: 28px;
  height: 14px;
  transform: translateX(-50%);
  border-bottom: 4px solid #8f3b2d;
  border-radius: 0 0 22px 22px;
  transition: all .18s ease;
}

.login-cheek {
  bottom: 30px;
  width: 14px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 152, 140, .28);
}

.login-cheek.left { left: 20px; }
.login-cheek.right { right: 20px; }

.login-mascot-meta {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: #fff8ec;
}

.login-mascot-meta strong {
  font-size: 18px;
}

.login-mascot-meta span {
  color: rgba(255, 249, 236, .72);
  font-size: 13px;
}

.login-mascot-card.mood-account .login-brow.left { transform: rotate(-16deg) translateY(-2px); }
.login-mascot-card.mood-account .login-brow.right { transform: rotate(16deg) translateY(-2px); }
.login-mascot-card.mood-account .login-mouth { width: 24px; height: 12px; border-bottom-width: 3px; }

.login-mascot-card.mood-password .login-brow.left { transform: rotate(16deg) translateX(4px); }
.login-mascot-card.mood-password .login-brow.right { transform: rotate(-16deg) translateX(-4px); }
.login-mascot-card.mood-password .login-mouth {
  width: 18px;
  height: 18px;
  border: 4px solid #8f3b2d;
  border-radius: 50%;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-color: transparent;
}

.login-mascot-card.mood-secret .login-mascot-head {
  border-radius: 48% 38% 44% 52%;
}

.login-mascot-card.mood-secret .login-eye {
  height: 12px;
}

.login-mascot-card.mood-secret .login-mouth {
  width: 22px;
  border-bottom-width: 3px;
  transform: translateX(-50%) rotate(-12deg);
}

.login-mascot-card.mood-success .login-eye {
  width: 18px;
  height: 10px;
  border-radius: 999px;
}

.login-mascot-card.mood-success .login-mouth {
  width: 38px;
  height: 18px;
  border-bottom-width: 5px;
  border-radius: 0 0 26px 26px;
}

.login-auth-title {
  font-size: 38px;
  margin: 14px 0 10px;
  color: #1d1116;
}

.login-auth-desc {
  margin: 0 0 18px;
  color: #71585c;
  line-height: 1.7;
}

.login-tab-row,
.login-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-tab-row button,
.login-chip-row button {
  min-width: 0;
}

.login-tab-row .active,
.login-chip-row .active {
  background: linear-gradient(120deg, #ffb457, #ff7a18);
  color: #fff;
}

.login-form-stack {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.login-label {
  display: grid;
  gap: 8px;
  color: #5d474a;
  font-size: 13px;
}

.login-auth-frame input {
  min-width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(136, 114, 116, .22);
  background: rgba(255, 255, 255, .92);
  color: #201114;
  padding: 14px 16px;
}

.login-auth-frame input:focus {
  outline: none;
  border-color: rgba(251, 146, 60, .66);
  box-shadow: 0 0 0 4px rgba(255, 180, 87, .16);
}

.login-auth-frame button {
  min-width: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
}

.login-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.login-password-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.login-visibility-toggle {
  padding-inline: 16px;
}

.login-status-board {
  margin-top: 16px;
  min-height: 48px;
}

.login-status-board .danger,
.login-status-board .muted {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .7);
}

.login-status-board .danger {
  color: #be3a3a;
  background: rgba(255, 235, 235, .86);
}

@media (max-width: 1100px) {
  .login-stage-shell {
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: 640px;
  }

  .login-stage-grid {
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 760px) {
  .login-hero-panel,
  .login-auth-panel {
    border-radius: 22px;
  }

  .login-hero-panel,
  .login-auth-frame {
    padding: 22px;
  }

  .login-display {
    font-size: 34px;
  }

  .login-stage-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-mascot-card {
    min-height: 210px;
  }

  .login-inline-fields,
  .login-password-shell {
    grid-template-columns: 1fr;
  }
}

.discuss-wrap {
  margin-top: 12px;
}

.discuss-panel {
  min-height: 560px;
}

.discuss-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.discuss-item {
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 12px;
}

.discuss-item .meta {
  color: #999;
  font-size: 12px;
  margin-bottom: 6px;
}

.discuss-item .content {
  color: #333;
  line-height: 1.7;
}

.discuss-panel textarea {
  width: 100%;
  min-height: 110px;
}

@media (max-width: 1100px) {
  .site-nav-inner,
  .site-nav-links,
  .site-auth-links {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }
  .site-nav-links a,
  .site-auth-links a,
  .code-logo {
    height: 52px;
  }
  .code-logo .logo-text {
    font-size: 24px;
  }
  .portal-auth-layout,
  .portal-panels,
  .site-nav-inner {
    grid-template-columns: 1fr;
  }
  .portal-hero h1 {
    font-size: 32px;
  }
  .scan-grid {
    grid-template-columns: 1fr;
  }
}
