:root {
  --canvas: #fdfdfc;
  --sidebar: #fbfaf7;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --ink: #171b19;
  --ink-soft: #737a76;
  --ink-faint: #9da3a0;
  --green: #176a56;
  --green-soft: #e9efec;
  --green-line: #a8c7ba;
  --line: #e0e2e0;
  --line-strong: #d2d6d3;
  --focus: #176a56;
  --sidebar-width: 15rem;
  --sidebar-collapsed-width: 5rem;
  color: var(--ink);
  background: var(--canvas);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  clip-path: inset(50%);
  text-decoration: none;
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

html.is-sidebar-collapsed .portal-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 42rem;
  flex-direction: column;
  padding: 2.6rem 1.5rem 2.25rem;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  transition: padding 180ms ease;
}

.portal-sidebar__masthead {
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: flex-start;
}

.portal-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  white-space: nowrap;
}

.portal-brand__wordmark {
  display: block;
  width: 8.75rem;
  height: auto;
}

.portal-brand__monogram {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.portal-brand--mobile {
  display: none;
}

.sidebar-toggle {
  position: absolute;
  z-index: 2;
  top: 5.25rem;
  right: -0.9rem;
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0.2rem 0.8rem rgb(28 44 37 / 8%);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.sidebar-toggle:hover {
  border-color: var(--green-line);
  background: #f7f9f7;
  box-shadow: 0 0.3rem 1rem rgb(28 44 37 / 12%);
}

.sidebar-toggle img {
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0.7;
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

html.is-sidebar-collapsed .portal-sidebar {
  padding-inline: 0.75rem;
}

html.is-sidebar-collapsed .portal-sidebar__masthead {
  justify-content: center;
}

html.is-sidebar-collapsed .portal-brand--sidebar .portal-brand__wordmark {
  display: none;
}

html.is-sidebar-collapsed .portal-brand--sidebar .portal-brand__monogram {
  display: block;
}

html.is-sidebar-collapsed .sidebar-toggle img {
  transform: none;
}

.category-nav {
  display: grid;
  margin-top: 3.5rem;
  gap: 0.5rem;
}

.category-nav a {
  position: relative;
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  margin-inline: -0.9rem;
  padding: 0 1.6rem;
  border-radius: 0.75rem;
  color: #242b2f;
  font-size: 0.98rem;
  font-weight: 500;
  gap: 0.9rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.category-nav a::before {
  position: absolute;
  top: 0.8rem;
  bottom: 0.8rem;
  left: 0;
  width: 0.25rem;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.category-nav a:hover {
  background: #f1f2ef;
}

.category-nav a.is-current {
  background: var(--green-soft);
  color: #1f2d29;
}

.category-nav a.is-current::before {
  background: var(--green);
}

.category-nav img {
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 auto;
  opacity: 0.82;
}

.category-nav a.is-current img {
  filter: invert(32%) sepia(15%) saturate(1370%) hue-rotate(109deg) brightness(88%) contrast(92%);
  opacity: 1;
}

html.is-sidebar-collapsed .category-nav {
  margin-top: 2.6rem;
}

html.is-sidebar-collapsed .category-nav a {
  width: 3.5rem;
  justify-content: center;
  margin-inline: 0;
  padding-inline: 0;
  gap: 0;
}

html.is-sidebar-collapsed .category-nav a::before {
  left: -0.75rem;
}

html.is-sidebar-collapsed .category-nav span,
html.is-sidebar-collapsed .sidebar-account-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.portal-sidebar__account {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.sidebar-account-button {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  gap: 0.7rem;
  text-align: left;
  transition: background-color 160ms ease;
}

.sidebar-account-button:hover {
  background: #f1f2ef;
}

.sidebar-account-button__avatar {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

html.is-sidebar-collapsed .portal-sidebar__account {
  display: flex;
  justify-content: center;
}

html.is-sidebar-collapsed .sidebar-account-button {
  width: 3.5rem;
  justify-content: center;
  padding-inline: 0;
}

.portal-workspace {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.portal-header {
  position: absolute;
  z-index: 10;
  top: 2.2rem;
  right: 2.8rem;
  display: none;
  align-items: center;
}

.account-button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  padding: 0;
  background: transparent;
  color: #171b19;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  gap: 0.65rem;
}

.account-button__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
}

.account-button__chevron {
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0.9;
}

.category-tabs {
  display: none;
}

.portal-main {
  display: flex;
  width: 100%;
  min-height: 100vh;
  flex: 1;
  flex-direction: column;
  padding: 4.85rem 3.5rem 0;
}

.page-kicker {
  display: flex;
  align-items: center;
  margin-bottom: 1.45rem;
  color: #6f7472;
  gap: 0.65rem;
}

.page-kicker img {
  width: 1.2rem;
  height: 1.2rem;
  opacity: 0.7;
}

.page-kicker p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
}

.portal-intro {
  max-width: 48rem;
  margin-top: 4rem;
}

.portal-intro h1,
.category-heading h1,
.service-heading h1 {
  margin: 0;
  font-size: clamp(2.05rem, 1.95vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.portal-intro__copy {
  margin: 0.95rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.category-page {
  width: 100%;
}

.category-heading {
  max-width: 70rem;
}

.service-page {
  width: 100%;
}

.service-breadcrumb {
  margin-bottom: 1.45rem;
}

.service-breadcrumb a {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  gap: 0.5rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.service-breadcrumb a:hover,
.service-breadcrumb a:focus-visible {
  color: var(--green);
}

.service-breadcrumb img {
  width: 1rem;
  height: 1rem;
  opacity: 0.62;
  transition: filter 160ms ease, opacity 160ms ease;
}

.service-breadcrumb a:hover img,
.service-breadcrumb a:focus-visible img {
  filter: invert(32%) sepia(15%) saturate(1370%) hue-rotate(109deg) brightness(88%) contrast(92%);
  opacity: 1;
}

.service-section-tabs {
  display: flex;
  width: min(100%, 45.5rem);
  margin-top: 2.15rem;
  border-bottom: 1px solid var(--line);
  gap: 1.9rem;
}

.service-section-tabs button {
  position: relative;
  min-height: 2.85rem;
  padding: 0 0.1rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 500;
}

.service-section-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.service-section-tabs button:hover,
.service-section-tabs button.is-current {
  color: var(--green);
}

.service-section-tabs button.is-current::after {
  background: var(--green);
}

.service-preview-panel {
  width: min(100%, 45.5rem);
  min-height: 14rem;
  margin-top: 1.4rem;
  padding: 1.55rem 1.65rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
}

.service-preview-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.service-preview-panel__heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.service-preview-panel__heading span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
}

.service-preview-panel__empty {
  margin: 3.25rem 0 0;
  color: #444c48;
  font-size: 1rem;
  font-weight: 500;
}

.service-preview-panel__message {
  max-width: 34rem;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
}

.service-grid {
  display: grid;
  width: min(100%, 45.5rem);
  margin-top: 2.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  position: relative;
  display: flex;
  min-height: 11.25rem;
  flex-direction: column;
  padding: 1.35rem 1.55rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
}

.service-card--enabled {
  border-color: var(--green-line);
  box-shadow: 0 0.45rem 1.5rem rgb(21 61 50 / 4%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.service-card--enabled::before {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 0.28rem;
  background: var(--green);
  content: "";
}

.service-card--enabled:hover {
  border-color: #7eaa99;
  box-shadow: 0 0.9rem 2.4rem rgb(21 61 50 / 9%);
  transform: translateY(-2px);
}

.service-card--enabled:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgb(23 106 86 / 13%);
}

.service-card--disabled {
  border-color: #dbdedc;
  background: var(--surface-muted);
  color: #8b918e;
}

.service-card__hit-area {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.service-card__hit-area:focus-visible {
  outline: 0;
}

.service-card__heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-card__icon {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  filter: invert(32%) sepia(15%) saturate(1370%) hue-rotate(109deg) brightness(88%) contrast(92%);
}

.service-card--disabled .service-card__icon {
  filter: none;
  opacity: 0.26;
}

.service-card h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.service-card > p {
  position: relative;
  z-index: 1;
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.86rem, 0.82vw, 0.92rem);
  line-height: 1.65;
}

.service-card--disabled > p {
  color: #969b98;
}

.service-card__action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: auto;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.7rem;
}

.service-card__action img {
  width: 1.1rem;
  height: 1.1rem;
  filter: invert(32%) sepia(15%) saturate(1370%) hue-rotate(109deg) brightness(88%) contrast(92%);
}

.service-card--disabled .service-card__action {
  color: #a0a5a2;
}

.preview-dialog {
  width: min(calc(100% - 2rem), 29rem);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1.5rem 5rem rgb(32 42 38 / 18%);
}

.preview-dialog::backdrop {
  background: rgb(32 42 38 / 30%);
  backdrop-filter: blur(2px);
}

.preview-dialog form {
  padding: 2rem;
}

.preview-dialog h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.preview-dialog p {
  margin: 0.9rem 0 1.6rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.preview-dialog button {
  min-width: 6.5rem;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-radius: 0.55rem;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.locked-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
  background: var(--canvas);
}

.locked-message {
  width: min(100%, 34rem);
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  text-align: center;
}

.locked-message__brand {
  margin: 0 0 2rem;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.13em;
}

.locked-message h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.locked-message > p:last-child {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 14.5rem;
  }

  .portal-sidebar {
    padding-inline: 1.5rem;
  }

  .portal-brand__wordmark {
    width: 8.25rem;
  }

  .category-nav a {
    margin-inline: -0.65rem;
    padding-inline: 1.6rem;
    font-size: 0.92rem;
    gap: 0.75rem;
  }

  .sidebar-account-button {
    font-size: 0.9rem;
    gap: 0.75rem;
  }

  .portal-main {
    padding-inline: 2.5rem;
  }

  .service-grid {
    gap: 1rem;
  }

  .service-card {
    padding-inline: 1.35rem;
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 9.2rem;
  }

  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    display: none;
  }

  .portal-header {
    position: sticky;
    z-index: 20;
    top: 0;
    right: auto;
    display: flex;
    min-height: 4.2rem;
    justify-content: space-between;
    padding: 0 1.15rem;
    border-bottom: 1px solid var(--line);
    background: rgb(253 253 252 / 96%);
    backdrop-filter: blur(12px);
  }

  .portal-brand--mobile {
    display: inline-flex;
  }

  .portal-brand--mobile .portal-brand__wordmark {
    display: block;
    width: 6.85rem;
  }

  .account-button {
    min-height: 2.7rem;
    font-size: 0.82rem;
    gap: 0.55rem;
  }

  .account-button__avatar {
    width: 2.2rem;
    height: 2.2rem;
  }

  .account-button__chevron {
    width: 0.85rem;
    height: 0.85rem;
  }

  .category-tabs {
    position: sticky;
    z-index: 15;
    top: 4.2rem;
    display: grid;
    padding: 0.6rem 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: rgb(253 253 252 / 96%);
    backdrop-filter: blur(12px);
  }

  .category-tabs a {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.15rem;
    border-radius: 0.6rem;
    color: #656d69;
    font-size: clamp(0.7rem, 3vw, 0.82rem);
    gap: 0.28rem;
    text-decoration: none;
  }

  .category-tabs a img {
    width: 1rem;
    height: 1rem;
    opacity: 0.65;
  }

  .category-tabs a.is-current {
    background: var(--green-soft);
    color: #234a3f;
    font-weight: 600;
  }

  .category-tabs a.is-current img {
    filter: invert(32%) sepia(15%) saturate(1370%) hue-rotate(109deg) brightness(88%) contrast(92%);
    opacity: 1;
  }

  .portal-main {
    min-height: calc(100vh - 7.6rem);
    padding: 1.8rem 1rem 0;
  }

  .page-kicker {
    margin-bottom: 1.25rem;
    gap: 0.55rem;
  }

  .page-kicker img {
    width: 1.1rem;
    height: 1.1rem;
  }

  .page-kicker p {
    font-size: 0.88rem;
  }

  .portal-intro {
    margin-top: 2rem;
  }

  .portal-intro h1,
  .category-heading h1,
  .service-heading h1 {
    font-size: clamp(1.75rem, 7.2vw, 2rem);
  }

  .portal-intro__copy {
    margin-top: 0.8rem;
    font-size: 0.9rem;
  }

  .service-grid {
    width: 100%;
    margin-top: 1.75rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-breadcrumb {
    margin-bottom: 1.2rem;
  }

  .service-section-tabs {
    margin-top: 1.75rem;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .service-section-tabs button {
    flex: 1;
    font-size: 0.84rem;
  }

  .service-preview-panel {
    min-height: 13.5rem;
    margin-top: 1.15rem;
    padding: 1.3rem 1.25rem;
  }

  .service-preview-panel__empty {
    margin-top: 2.8rem;
  }

  .service-card {
    min-height: 11rem;
    padding: 1.2rem 1.25rem 1.1rem;
  }

  .service-card__icon {
    width: 1.45rem;
    height: 1.45rem;
  }

  .service-card h2 {
    font-size: 1.08rem;
  }

  .service-card > p {
    margin-top: 0.7rem;
    font-size: 0.84rem;
  }

  .service-card__action {
    font-size: 0.9rem;
  }

}

@media (max-width: 370px) {
  .account-button > span {
    display: none;
  }

  .category-tabs a {
    flex-direction: column;
    font-size: 0.72rem;
  }

  .service-card {
    padding-inline: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
