:root {
  --hub-bg: #f4f5f7;
  --hub-panel: rgba(244, 245, 246, 0.92);
  --hub-panel-strong: rgba(249, 250, 250, 0.96);
  --hub-border: #c8d0da;
  --hub-border-strong: #b6c0cc;
  --hub-text: #24324b;
  --hub-muted: #52627d;
  --hub-blue: #1f5fa8;
  --hub-red: #ba3a33;
  --hub-green: #2f6a53;
}

body {
  background: var(--hub-bg);
}

.hub-shell {
  max-width: 1160px;
}

.hub-head {
  margin-bottom: 18px;
}

.hub-head .brand-mark {
  width: 44px;
  height: 32px;
}


.hub-head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hub-border-strong);
  border-radius: 999px;
  padding: 3px;
  background: rgba(247, 248, 249, 0.9);
}

.lang-switch-btn {
  border: 0;
  background: transparent;
  color: #425676;
  min-width: 46px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-switch-btn[aria-pressed="true"] {
  background: #ffffff;
  color: #213652;
  box-shadow: 0 1px 0 rgba(36, 50, 75, 0.06);
}

.lang-switch-btn:focus-visible {
  outline: 2px solid rgba(31, 95, 168, 0.28);
  outline-offset: 2px;
}

.hub-page {
  display: grid;
  gap: 22px;
}

.hub-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
  gap: 26px;
  align-items: start;
}

.hub-hero,
.hub-sidebar {
  border: 1px solid var(--hub-border);
  background: var(--hub-panel);
}

.hub-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 26px 26px 22px;
  background:
    radial-gradient(circle at top right, rgba(186, 58, 51, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(240, 242, 244, 0.9));
}

.hub-hero::after {
  content: "";
  position: absolute;
  inset: 18px 20px auto auto;
  width: 132px;
  height: 132px;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(31, 95, 168, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 168, 0.26) 1px, transparent 1px);
  background-size: 18px 18px;
  transform: rotate(10deg);
  pointer-events: none;
}

.hub-hero h1,
.hub-section h2 {
  text-wrap: balance;
}

.hub-sidebar {
  border-radius: 22px;
  padding: 22px 20px;
  background: var(--hub-panel-strong);
}

.hub-sidebar-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #213652;
}

.sitehub-desktop-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sitehub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #c8d5e6;
  background: #ffffff;
  color: #314663;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sitehub-link:hover,
.sitehub-link:focus-visible {
  background: #f3f6fb;
  border-color: #b2c2d6;
  color: #20344f;
  outline: none;
}

.hub-section {
  border-radius: 0;
  padding: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 26px 26px 24px;
  border-radius: 22px;
  border: 1px solid rgba(190, 202, 218, 0.55);
  background: #ffffff;
  color: var(--hub-text);
  text-decoration: none;
  box-shadow: 0 2px 14px rgba(28, 46, 72, 0.07), 0 1px 3px rgba(28, 46, 72, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-tile::before {
  content: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: var(--hub-blue);
}

.tool-tile:hover,
.tool-tile:focus-visible {
  transform: translateY(-4px);
  border-color: #C02318;
  background: rgba(192, 35, 24, 0.03);
  box-shadow: 0 16px 40px rgba(28, 46, 72, 0.13), 0 4px 8px rgba(28, 46, 72, 0.06);
  outline: none;
}

.tool-tile-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 95, 168, 0.1);
  color: var(--hub-blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-tile-glossary::before {
  background: var(--hub-red);
}

.tool-tile-glossary .tool-tile-badge {
  background: rgba(186, 58, 51, 0.1);
  color: var(--hub-red);
}

.tool-tile h3 {
  margin: 0;
  font-size: 1.28rem;
  color: #223751;
}

.tool-tile p {
  margin: 0;
}

.upload-diff-demo{
  position: relative;
  --upload-diff-demo-scale:1;
  margin:12px 0 14px;
  padding:10px 0 14px;
  border-top:1px solid rgba(201,212,228,.88);
  border-bottom:1px solid rgba(201,212,228,.88);
  overflow:hidden;
}

.upload-diff-demo-scale{
  width:312px;
  height:166px;
  margin:0 auto calc(166px * (var(--upload-diff-demo-scale) - 1));
  transform:scale(var(--upload-diff-demo-scale));
  transform-origin:top center;
}

.upload-diff-demo-flow{
  position:relative;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  align-items:center;
  gap:26px;
  width:312px;
  margin:0;
}

.upload-diff-loupe{
  position:absolute;
  top:34px;
  left:0;
  width:48px;
  height:48px;
  border-radius:999px;
  border:3px solid rgba(22,92,168,.94);
  background:
    radial-gradient(circle at 34% 34%, rgba(255,255,255,.76) 0%, rgba(255,255,255,.28) 42%, rgba(187,214,247,.34) 100%);
  box-shadow:
    0 12px 22px rgba(16,37,63,.14),
    inset 0 0 0 1px rgba(255,255,255,.58);
  opacity:0;
  transform:translate(14px,10px) scale(.84);
  transform-origin:center center;
  pointer-events:none;
  z-index:6;
  animation:uploadDiffLoupeScan 5.2s ease-in-out infinite;
}

.upload-diff-loupe::before{
  content:"";
  position:absolute;
  inset:9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.48);
  opacity:.9;
}

.upload-diff-loupe::after{
  content:"";
  position:absolute;
  right:-9px;
  bottom:4px;
  width:20px;
  height:7px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(35,92,156,.98) 0%, rgba(21,68,120,.96) 100%);
  box-shadow:0 3px 8px rgba(16,37,63,.16);
  transform:rotate(42deg);
  transform-origin:left center;
}

@keyframes uploadDiffLoupeScan{
  0%, 40%, 100%{
    opacity:0;
    transform:translate(14px,10px) scale(.84);
  }
  46%{
    opacity:1;
    transform:translate(24px,2px) scale(1);
  }
  56%{
    opacity:1;
    transform:translate(70px,22px) scale(1);
  }
  68%{
    opacity:1;
    transform:translate(128px,18px) scale(1);
  }
  80%{
    opacity:1;
    transform:translate(198px,56px) scale(1);
  }
  84%{
    opacity:0;
    transform:translate(198px,56px) scale(.92);
  }
}

.upload-diff-sheet{
  position:relative;
  width:min(100%, 126px);
  aspect-ratio:0.76;
  margin:0 auto;
  border-radius:18px;
  border:1px solid rgba(186,200,220,.96);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(244,248,254,.95) 100%);
  box-shadow:0 12px 26px rgba(17,37,63,.1);
  overflow:hidden;
  transform-origin:center bottom;
  opacity:0;
}

.upload-diff-sheet::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:24px;
  height:24px;
  background:linear-gradient(135deg, rgba(219,230,243,.2) 0%, rgba(219,230,243,.2) 49%, rgba(255,255,255,.96) 50%, rgba(235,242,251,.92) 100%);
  border-bottom-left-radius:10px;
  border-left:1px solid rgba(208,219,233,.82);
  border-bottom:1px solid rgba(208,219,233,.82);
}

.upload-diff-sheet.is-a{
  animation:uploadDiffRevealA 5.2s ease-in-out infinite;
}

.upload-diff-sheet.is-b{
  animation:uploadDiffRevealB 5.2s ease-in-out infinite;
}

@keyframes uploadDiffRevealA{
  0%, 6%, 100%{
    opacity:0;
    transform:translateY(18px) scale(.94) rotate(-2deg);
  }
  14%, 96%{
    opacity:1;
    transform:translateY(0) scale(1) rotate(-1deg);
  }
  100%{
    opacity:0;
    transform:translateY(12px) scale(.95) rotate(-1.4deg);
  }
}

@keyframes uploadDiffRevealB{
  0%, 24%, 100%{
    opacity:0;
    transform:translateY(18px) scale(.94) rotate(2deg);
  }
  34%, 96%{
    opacity:1;
    transform:translateY(0) scale(1) rotate(1deg);
  }
  100%{
    opacity:0;
    transform:translateY(12px) scale(.95) rotate(1.4deg);
  }
}

.upload-diff-badge{
  position:absolute;
  top:10px;
  left:10px;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#17375f;
  color:#fff;
  font-size:.78rem;
  font-weight:760;
  letter-spacing:.02em;
  box-shadow:0 4px 10px rgba(16,37,63,.18);
}

.upload-diff-line,
.upload-diff-block{
  position:absolute;
  left:18px;
  right:18px;
  border-radius:999px;
  background:rgba(81,104,134,.22);
}

.upload-diff-line{
  height:7px;
}

.upload-diff-line.line-1{ top:48px; width:58%; right:auto; }
.upload-diff-line.line-2{ top:64px; }
.upload-diff-line.line-3{ top:80px; width:74%; right:auto; }
.upload-diff-block.block-1{
  top:98px;
  height:30px;
  border-radius:11px;
  background:rgba(101,126,157,.14);
}

.upload-diff-sheet.is-b .upload-diff-block.block-1{
  border-radius:0;
  background:linear-gradient(90deg, rgba(115,138,168,.2) 0%, rgba(101,126,157,.14) 100%);
}
.upload-diff-line.line-4{ top:138px; width:66%; right:auto; }
.upload-diff-line.line-5{ top:154px; width:48%; right:auto; }

.upload-diff-change{
  position:absolute;
  top:88px;
  left:12px;
  width:108px;
  height:56px;
  --upload-diff-circle-stroke:5;
  transform:rotate(-8deg) scale(.94);
  transform-origin:center center;
  animation:uploadDiffHighlight 5.2s ease-in-out infinite;
  opacity:0;
  z-index:5;
}

.upload-diff-circle{
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}

.upload-diff-circle-stroke{
  fill:none;
  stroke:rgba(231,57,62,.94);
  stroke-width:var(--upload-diff-circle-stroke);
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:100;
  stroke-dashoffset:100;
  filter:drop-shadow(0 1px 2px rgba(217,35,50,.18));
  animation:uploadDiffDraw 5.2s cubic-bezier(.33,.12,.19,1) infinite;
}

@keyframes uploadDiffHighlight{
  0%, 79%{
    opacity:0;
    transform:rotate(-8deg) scale(.9);
  }
  84%, 99.6%{
    opacity:1;
    transform:rotate(-8deg) scale(1);
  }
  100%{
    opacity:0;
    transform:rotate(-8deg) scale(1.02);
  }
}

@keyframes uploadDiffDraw{
  0%, 83.9%{
    opacity:0;
    stroke-dashoffset:100;
  }
  84%{
    opacity:1;
    stroke-dashoffset:100;
  }
  92.5%, 99.6%{
    opacity:1;
    stroke-dashoffset:0;
  }
  100%{
    opacity:0;
    stroke-dashoffset:0;
  }
}

.glossary-roll-demo{
  position:relative;
  display:grid;
  place-items:center;
  height:190px;
  margin:12px 0 14px;
  padding:10px 0 14px;
  border-top:1px solid rgba(201,212,228,.88);
  border-bottom:1px solid rgba(201,212,228,.88);
  overflow:hidden;
}

.glossary-roll-stage{
  position:relative;
  width:124px;
  height:100%;
  display:grid;
  place-items:center;
}

.glossary-roll-stage::before,
.glossary-roll-stage::after{
  content:none;
}

.glossary-roll-shell{
  position:relative;
  width:110px;
  height:94px;
  border-radius:0;
  overflow:hidden;
  background:transparent;
  box-shadow:none;
  -webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 82%, transparent 100%);
  mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 82%, transparent 100%);
}

.glossary-roll-track{
  position:absolute;
  top:0;
  left:50%;
  display:grid;
  justify-items:stretch;
  width:max-content;
  will-change:transform, opacity, filter;
  animation:glossaryRoll 4.5s linear infinite;
}

.glossary-roll-track span{
  display:flex;
  align-items:center;
  justify-content:center;
  height:72px;
  line-height:1;
  font-size:5.15rem;
  font-weight:760;
  letter-spacing:-0.01em;
  color:rgba(186,58,51,.82);
  text-shadow:0 2px 8px rgba(186,58,51,.07);
}

@keyframes glossaryRoll{
  0%{
    transform:translate3d(-50%, 42px, 0);
    opacity:0;
    filter:blur(0);
    animation-timing-function:ease-out;
  }
  4%{
    transform:translate3d(-50%, 10px, 0);
    opacity:.92;
    filter:blur(0);
  }
  15%{
    transform:translate3d(-50%, 10px, 0);
    opacity:.92;
    filter:blur(0);
    animation-timing-function:cubic-bezier(0.92, 0, 0.98, 1);
  }
  86%{
    transform:translate3d(-50%, -1790px, 0);
    opacity:0;
    filter:blur(.5px);
  }
  100%{
    transform:translate3d(-50%, -1790px, 0);
    opacity:0;
    filter:blur(.5px);
  }
}

.tool-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-meta li {
  position: relative;
  margin: 0;
  padding-left: 18px;
  color: var(--hub-muted);
}

.tool-meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8ea4bc;
  transform: translateY(-50%);
}

.tool-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #C02318;
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-cta::after {
  content: none;
}

.mobile-hub-menu {
  display: none;
  position: relative;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mobile-hub-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #c4d2e4;
  background: #ffffff;
  color: #355375;
  cursor: pointer;
}

.mobile-hub-trigger:hover {
  background: #f3f7fc;
}

.mobile-hub-trigger:focus-visible {
  outline: 2px solid rgba(69, 113, 167, 0.4);
  outline-offset: 2px;
}

.mobile-hub-trigger::-webkit-details-marker {
  display: none;
}

.mobile-hub-icon {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.mobile-hub-menu[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 52, 0.22);
  backdrop-filter: blur(1px);
  z-index: 180;
}

.mobile-hub-drawer-wrap {
  display: none;
}

.mobile-hub-menu[open] .mobile-hub-drawer-wrap {
  display: block;
  position: fixed;
  top: 72px;
  left: 14px;
  right: 14px;
  z-index: 190;
  border: 1px solid #c8d5e6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(20, 38, 61, 0.2);
  padding: 12px 12px 10px;
}

.mobile-hub-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 1px solid #c8d5e6;
  border-radius: 999px;
  background: #f7f9fc;
  color: #4a6079;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.mobile-hub-close:hover,
.mobile-hub-close:focus-visible {
  background: #edf3fa;
  color: #274666;
  border-color: #b4c4d9;
  outline: none;
}

.mobile-hub-drawer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 2px 0 0;
}

.mobile-hub-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #314663;
  font-size: 0.86rem;
  font-weight: 620;
  text-decoration: none;
  text-align: left;
}

.mobile-hub-link:hover,
.mobile-hub-link:focus-visible {
  background: #f4f8fc;
  color: #223853;
  border-color: #d6e0ec;
  outline: none;
}

@media (max-width: 900px) {
  .hub-intro {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    padding-top: 18px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hub-shell {
    padding-bottom: 28px;
  }

  .hub-head-main {
    align-items: flex-start;
  }

  .hub-head-actions {
    justify-content: flex-end;
  }

  .mobile-hub-menu {
    display: block;
  }

  .sitehub-desktop-nav {
    display: none;
  }

  .hub-sidebar {
    display: none;
  }

  .hub-hero {
    padding: 20px 18px 18px;
    border-radius: 18px;
  }

  .upload-diff-demo{
    --upload-diff-demo-scale:.746;
    margin:10px 0 12px;
    padding:8px 0 12px;
  }

  .glossary-roll-demo{
    height:144px;
    margin:10px 0 12px;
    padding:8px 0 12px;
  }

  .glossary-roll-stage{
    width:110px;
  }

  .glossary-roll-shell{
    width:102px;
    height:88px;
  }

  .glossary-roll-track span{
    height:68px;
    font-size:4.55rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .upload-diff-loupe,
  .upload-diff-sheet.is-a,
  .upload-diff-sheet.is-b,
  .upload-diff-change,
  .upload-diff-circle-stroke,
  .glossary-roll-track{
    animation: none !important;
  }

  .upload-diff-sheet{
    opacity:1 !important;
    transform:translateY(0) scale(1) rotate(0) !important;
  }

  .upload-diff-change{
    opacity:1 !important;
  }

  .upload-diff-circle-stroke{
    opacity:1 !important;
    stroke-dashoffset:0 !important;
  }

  .upload-diff-loupe{
    opacity:1 !important;
    transform:translate(174px,6px) scale(1) !important;
  }

  .glossary-roll-track{
    display:grid;
    transform:translate3d(-50%, 10px, 0) !important;
    opacity:1 !important;
    filter:none !important;
  }

  .glossary-roll-track span{
    display:none;
  }

  .glossary-roll-track span:first-child{
    display:block;
  }

}
