:root {
  color-scheme: light;
  --ink-950: #151816;
  --ink-900: #1d211e;
  --ink-800: #2a2f2b;
  --ink-700: #444a45;
  --ink-600: #5e655f;
  --ink-500: #747c75;
  --ink-400: #8d958e;
  --canvas: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #ecefe8;
  --line: #dde1da;
  --line-strong: #c7cdc5;
  --brand-700: #176b45;
  --brand-600: #1f7a50;
  --brand-500: #2b8c5d;
  --brand-100: #ddf1e5;
  --brand-50: #eff8f2;
  --purple: #7557b7;
  --purple-soft: #eee9fa;
  --orange: #c65f3a;
  --orange-soft: #f9e8e1;
  --blue: #2776a8;
  --blue-soft: #e2f0f8;
  --gold: #a66b14;
  --gold-soft: #f7edd7;
  --danger: #b9473f;
  --danger-soft: #f8e4e2;
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --display: "DM Sans", Inter, ui-sans-serif, sans-serif;
  --shadow-card: 0 10px 30px rgba(21, 24, 22, 0.06);
  --shadow-float: 0 20px 60px rgba(21, 24, 22, 0.14);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-950);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(43, 140, 93, 0.24);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-700);
  transform: translateY(-150%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 112px), 1240px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(221, 225, 218, 0.84);
  background: rgba(245, 246, 242, 0.88);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand__mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--brand-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__name {
  font-size: 18px;
}

.brand--small .brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 10px;
}

.brand--small .brand__name {
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  position: relative;
  color: var(--ink-600);
  font-size: 14px;
  font-weight: 600;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition:
    opacity 160ms var(--ease),
    transform 160ms var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink-950);
}

.site-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition:
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.icon-button:hover,
.avatar-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.favorite-count {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding-inline: 4px;
  place-items: center;
  border: 2px solid var(--canvas);
  border-radius: 99px;
  color: #fff;
  background: var(--brand-600);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.avatar-button {
  display: none;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink-950);
  font-size: 12px;
  font-weight: 700;
}

.is-signed-in .avatar-button {
  display: inline-grid;
}

.is-signed-in .header-signin {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  background: var(--brand-600);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.button:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
}

.button:disabled {
  color: var(--ink-400);
  background: var(--surface-soft);
  cursor: not-allowed;
  transform: none;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button--secondary {
  color: var(--ink-950);
  border-color: var(--line);
  background: var(--surface);
}

.button--secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button--ghost {
  color: var(--ink-700);
  background: transparent;
}

.button--ghost:hover {
  background: var(--surface-soft);
}

.button--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.button--danger:hover {
  color: #fff;
  background: var(--danger);
}

.button--light {
  color: var(--ink-950);
  background: #fff;
}

.button--light:hover {
  background: var(--brand-50);
}

.button--large {
  min-height: 52px;
  padding-inline: 22px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 650px;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: 88px 104px;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 5px var(--brand-100);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(52px, 6.5vw, 82px);
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.hero h1 span {
  color: var(--brand-600);
}

.hero__lede {
  max-width: 610px;
  margin: 30px 0 32px;
  color: var(--ink-600);
  font-size: 18px;
  line-height: 1.65;
}

.tool-search {
  position: relative;
  display: flex;
  max-width: 620px;
  min-height: 62px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.tool-search:focus-within {
  border-color: var(--brand-500);
  box-shadow:
    0 0 0 3px rgba(43, 140, 93, 0.14),
    var(--shadow-card);
}

.tool-search > svg {
  width: 22px;
  height: 22px;
  margin-left: 20px;
  color: var(--ink-500);
}

.tool-search input {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.tool-search input::placeholder {
  color: var(--ink-400);
}

.tool-search kbd {
  margin-right: 14px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-500);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 12px;
  white-space: nowrap;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 22px;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 550;
}

.hero__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand-600);
  stroke-width: 2.2;
}

.tools-section {
  padding-block: 96px 108px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.section-heading h2,
.workspace-cta h2 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-heading > p {
  max-width: 370px;
  margin: 0 0 3px;
  color: var(--ink-600);
  font-size: 14px;
  text-align: right;
}

.section-kicker {
  margin: 0;
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-kicker--light {
  color: #98cfad;
}

.category-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-600);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    color 160ms var(--ease),
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.filter-chip:hover {
  color: var(--ink-950);
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  color: #fff;
  border-color: var(--ink-950);
  background: var(--ink-950);
}

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

.tool-card {
  position: relative;
  min-height: 246px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition:
    transform 200ms var(--ease),
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.tool-card:hover,
.tool-card:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.tool-card__link {
  display: flex;
  height: 100%;
  min-height: 246px;
  flex-direction: column;
  padding: 20px;
}

.tool-card__link:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(43, 140, 93, 0.22);
}

.tool-card__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 13px;
}

.tool-card__icon svg {
  width: 25px;
  height: 25px;
}

.tool-card__icon--purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.tool-card__icon--orange {
  color: var(--orange);
  background: var(--orange-soft);
}

.tool-card__icon--green {
  color: var(--brand-600);
  background: var(--brand-100);
}

.tool-card__icon--blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.tool-card__icon--gold {
  color: var(--gold);
  background: var(--gold-soft);
}

.tool-card__topline {
  display: flex;
  min-height: 21px;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.tool-card__category {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 650;
}

.tool-card__status {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-card__content {
  display: grid;
  gap: 7px;
}

.tool-card__content strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.tool-card__content > span {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 1.55;
}

.tool-card__open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 700;
}

.tool-card__open svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms var(--ease);
}

.tool-card:hover .tool-card__open svg {
  transform: translateX(3px);
}

.tool-card__favorite {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-500);
  background: var(--surface);
  cursor: pointer;
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease),
    transform 160ms var(--ease);
}

.tool-card__favorite:hover {
  color: var(--brand-600);
  background: var(--brand-50);
  transform: scale(1.04);
}

.tool-card__favorite svg {
  width: 18px;
  height: 18px;
}

.tool-card__favorite.is-saved {
  color: var(--brand-600);
  border-color: var(--brand-100);
  background: var(--brand-50);
}

.tool-card__favorite.is-saved svg {
  fill: currentColor;
}

.empty-state {
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 16px;
  color: var(--ink-600);
  background: var(--surface-soft);
  font-size: 28px;
}

.empty-state h3 {
  margin: 0;
}

.empty-state p {
  margin: 5px 0 20px;
  color: var(--ink-600);
}

.workspace-cta {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 96px;
  padding: 54px 60px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 80% -20%, rgba(75, 172, 112, 0.3), transparent 45%),
    var(--ink-950);
}

.workspace-cta > div {
  max-width: 650px;
}

.workspace-cta h2 {
  margin-top: 8px;
  font-size: clamp(34px, 4.5vw, 54px);
}

.workspace-cta p:not(.section-kicker) {
  margin: 16px 0 0;
  color: #b9c1ba;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 32px;
  min-height: 110px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a:hover {
  color: var(--ink-950);
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-width: 290px;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #303632;
  border-radius: 14px;
  color: #fff;
  background: var(--ink-950);
  box-shadow: var(--shadow-float);
  font-size: 13px;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(12px);
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #84d5a3;
}

.toast span {
  flex: 1;
}

.toast button {
  padding: 5px 7px;
  color: #9addb3;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Account CMS */
.account-page {
  min-height: 100vh;
  background: #f2f3ef;
}

.account-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 270px minmax(0, 1fr);
}

.cms-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 18px 18px;
  color: #ecf1ed;
  background:
    radial-gradient(circle at 40% 0%, rgba(43, 140, 93, 0.22), transparent 32%),
    var(--ink-950);
}

.cms-sidebar .brand {
  margin: 0 10px 38px;
  color: #fff;
}

.cms-sidebar .brand__mark {
  color: var(--ink-950);
  background: #e4f2e8;
}

.cms-nav-label {
  margin: 0 13px 9px;
  color: #778179;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cms-nav {
  display: grid;
  gap: 5px;
}

.cms-nav a {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 11px;
  color: #9ea79f;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease);
}

.cms-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.cms-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.cms-nav a.is-active::before {
  position: absolute;
  left: -1px;
  width: 3px;
  height: 19px;
  border-radius: 3px;
  background: #77c895;
  content: "";
}

.cms-nav svg {
  width: 19px;
  height: 19px;
}

.cms-nav .nav-badge {
  min-width: 22px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  color: #cde7d6;
  background: rgba(119, 200, 149, 0.15);
  font-size: 10px;
  text-align: center;
}

.cms-sidebar__bottom {
  margin-top: auto;
}

.sidebar-help {
  margin: 20px 5px 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-help strong {
  display: block;
  font-size: 12px;
}

.sidebar-help p {
  margin: 5px 0 10px;
  color: #89938b;
  font-size: 11px;
  line-height: 1.5;
}

.sidebar-help a {
  color: #a9dcb9;
  font-size: 11px;
  font-weight: 700;
}

.user-switcher {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.user-switcher__avatar,
.cms-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-950);
  background: #cfead8;
  font-size: 11px;
  font-weight: 750;
}

.user-switcher > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.user-switcher strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-switcher small {
  overflow: hidden;
  color: #89938b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-switcher > svg {
  width: 16px;
  height: 16px;
  color: #89938b;
}

.cms-main {
  min-width: 0;
}

.cms-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  min-height: 72px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 243, 239, 0.9);
  backdrop-filter: blur(18px);
}

.cms-mobile-menu {
  display: none;
}

.cms-global-search {
  position: relative;
  display: flex;
  width: min(100%, 380px);
  align-items: center;
}

.cms-global-search svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--ink-400);
}

.cms-global-search input {
  width: 100%;
  height: 40px;
  padding: 0 15px 0 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  outline: 0;
  background: #e7e9e4;
  font-size: 12px;
}

.cms-global-search input:focus {
  border-color: var(--brand-500);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(43, 140, 93, 0.12);
}

.cms-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cms-topbar__actions .icon-button {
  width: 40px;
  height: 40px;
  background: transparent;
}

.cms-topbar__actions .cms-avatar {
  width: 40px;
  height: 40px;
}

.cms-content {
  width: min(calc(100% - 84px), 1280px);
  margin: 0 auto;
  padding-block: 40px 72px;
}

.cms-view[hidden] {
  display: none;
}

.cms-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.cms-page-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.cms-page-heading p {
  margin: 7px 0 0;
  color: var(--ink-600);
  font-size: 13px;
}

.cms-page-heading__actions {
  display: flex;
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  min-height: 146px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 650;
}

.stat-card__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--brand-600);
  background: var(--brand-50);
}

.stat-card__icon svg {
  width: 17px;
  height: 17px;
}

.stat-card strong {
  display: block;
  margin-top: 18px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 10px;
}

.progress-bar {
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-500);
}

.cms-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.75fr);
  gap: 22px;
}

.cms-panel {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.cms-panel + .cms-panel {
  margin-top: 22px;
}

.cms-panel__header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.cms-panel__header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.cms-panel__header p {
  margin: 2px 0 0;
  color: var(--ink-500);
  font-size: 10px;
}

.text-link {
  color: var(--brand-700);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cms-table-wrap {
  overflow-x: auto;
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
}

.cms-table th {
  height: 42px;
  padding: 0 16px;
  color: var(--ink-500);
  background: #fafbf9;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.cms-table td {
  height: 64px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-700);
  font-size: 11px;
}

.cms-table tbody tr:first-child td {
  border-top: 0;
}

.cms-table tbody tr:hover {
  background: #fbfcfa;
}

.file-cell {
  display: flex;
  min-width: 210px;
  align-items: center;
  gap: 11px;
}

.file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--purple);
  background: var(--purple-soft);
  font-size: 8px;
  font-weight: 800;
}

.file-cell > span:last-child {
  display: grid;
  min-width: 0;
}

.file-cell strong {
  overflow: hidden;
  max-width: 260px;
  color: var(--ink-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-cell small {
  color: var(--ink-400);
  font-size: 9px;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: 9px;
  font-weight: 700;
}

.privacy-chip::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-500);
  content: "";
}

.row-action {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-500);
  background: transparent;
  cursor: pointer;
}

.row-action:hover {
  color: var(--ink-950);
  background: var(--surface-soft);
}

.row-action svg {
  width: 16px;
  height: 16px;
}

.favorite-list {
  display: grid;
  padding: 8px;
}

.favorite-list__item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 11px;
}

.favorite-list__item:hover {
  background: #f7f8f5;
}

.favorite-list__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
}

.favorite-list__icon svg {
  width: 18px;
  height: 18px;
}

.favorite-list__text {
  display: grid;
}

.favorite-list__text strong {
  font-size: 11px;
}

.favorite-list__text small {
  color: var(--ink-500);
  font-size: 9px;
}

.favorite-list__item > svg {
  width: 15px;
  height: 15px;
  color: var(--ink-400);
}

.activity-list {
  display: grid;
  padding: 8px 18px 16px;
}

.activity-item {
  position: relative;
  display: grid;
  min-height: 56px;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px 0;
}

.activity-item:not(:last-child)::after {
  position: absolute;
  top: 37px;
  bottom: -8px;
  left: 9px;
  width: 1px;
  background: var(--line);
  content: "";
}

.activity-item__dot {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  border: 5px solid var(--brand-50);
  border-radius: 50%;
  background: var(--brand-500);
}

.activity-item span:last-child {
  display: grid;
}

.activity-item strong {
  color: var(--ink-800);
  font-size: 10px;
  font-weight: 650;
}

.activity-item small {
  color: var(--ink-400);
  font-size: 9px;
}

.account-hero {
  display: flex;
  min-height: 145px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
  padding: 28px 30px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 85% -100%, rgba(119, 200, 149, 0.36), transparent 58%),
    var(--ink-950);
}

.account-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.account-hero p {
  margin: 6px 0 0;
  color: #aeb8b0;
  font-size: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.toolbar-search {
  position: relative;
  display: flex;
  min-width: 260px;
  flex: 1;
  align-items: center;
}

.toolbar-search svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--ink-400);
}

.toolbar-search input,
.toolbar select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  font-size: 11px;
}

.toolbar-search input {
  width: 100%;
  padding: 0 14px 0 39px;
}

.toolbar select {
  min-width: 130px;
  padding: 0 34px 0 12px;
}

.toolbar-search input:focus,
.toolbar select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(43, 140, 93, 0.12);
}

.upload-dropzone {
  display: grid;
  min-height: 235px;
  margin-bottom: 22px;
  place-items: center;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
  transition:
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.upload-dropzone.is-dragging {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.upload-dropzone__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-600);
  background: var(--brand-100);
}

.upload-dropzone__icon svg {
  width: 24px;
  height: 24px;
}

.upload-dropzone h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
}

.upload-dropzone p {
  margin: 5px 0 16px;
  color: var(--ink-500);
  font-size: 11px;
}

.upload-dropzone small {
  display: block;
  margin-top: 12px;
  color: var(--ink-400);
  font-size: 9px;
}

.favorite-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.favorite-manage-card {
  display: grid;
  min-height: 154px;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.favorite-manage-card .favorite-list__icon {
  width: 42px;
  height: 42px;
}

.favorite-manage-card h3 {
  margin: 2px 0 3px;
  font-size: 13px;
}

.favorite-manage-card p {
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.5;
}

.favorite-manage-card__actions {
  display: flex;
  grid-column: 1 / -1;
  align-self: end;
  justify-content: space-between;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.favorite-manage-card__actions a,
.favorite-manage-card__actions button {
  color: var(--brand-700);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.favorite-manage-card__actions button {
  color: var(--ink-500);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.settings-form {
  padding: 22px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}

.field label {
  color: var(--ink-700);
  font-size: 10px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  font-size: 12px;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(43, 140, 93, 0.12);
}

.security-list {
  display: grid;
  padding: 8px 20px;
}

.security-item {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.security-item:last-child {
  border-bottom: 0;
}

.security-item strong {
  display: block;
  font-size: 11px;
}

.security-item small {
  display: block;
  color: var(--ink-500);
  font-size: 9px;
}

.security-item button {
  color: var(--brand-700);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 5%, rgba(43, 140, 93, 0.14), transparent 30%),
    radial-gradient(circle at 88% 92%, rgba(117, 87, 183, 0.11), transparent 32%),
    var(--canvas);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(36px, 5vw, 80px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(75, 172, 112, 0.24), transparent 38%),
    var(--ink-950);
}

.auth-story .brand {
  color: #fff;
}

.auth-story .brand__mark {
  color: var(--ink-950);
  background: #dff1e5;
}

.auth-story__copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.auth-story__copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-story__copy h1 span {
  color: #8fd1a7;
}

.auth-story__copy p {
  max-width: 430px;
  margin: 24px 0 0;
  color: #aab4ac;
}

.auth-story__footer {
  color: #768078;
  font-size: 11px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px;
}

.auth-card {
  width: min(100%, 440px);
}

.auth-card__mobile-brand {
  display: none;
  margin-bottom: 42px;
}

.auth-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.auth-card__intro {
  margin: 7px 0 28px;
  color: var(--ink-600);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.auth-tabs button {
  min-height: 38px;
  border-radius: 9px;
  color: var(--ink-500);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.auth-tabs button.is-active {
  color: var(--ink-950);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(21, 24, 22, 0.07);
}

.auth-form[hidden] {
  display: none;
}

.auth-form .button {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  bottom: 6px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-500);
  background: transparent;
  cursor: pointer;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 0 20px;
  color: var(--ink-600);
  font-size: 10px;
}

.check-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.check-control input {
  accent-color: var(--brand-600);
}

.form-options a {
  color: var(--brand-700);
  font-weight: 700;
}

.auth-note {
  margin: 22px 0 0;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

/* Tool workspace */
.tool-page {
  min-height: 100vh;
}

.tool-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tool-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 650;
}

.back-link svg {
  width: 17px;
  height: 17px;
}

.tool-workspace {
  width: min(calc(100% - 64px), 1080px);
  margin-inline: auto;
  padding-block: 62px 90px;
}

.tool-title {
  max-width: 650px;
  margin-bottom: 32px;
}

.tool-title__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-title h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 1;
}

.tool-title > p {
  margin: 16px 0 0;
  color: var(--ink-600);
}

.tool-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.tool-panel__header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.tool-panel__header h2 {
  margin: 0;
  font-size: 14px;
}

.tool-panel__header span {
  color: var(--ink-500);
  font-size: 10px;
}

.tool-panel__body {
  min-height: 290px;
  padding: 24px;
}

.tool-textarea {
  width: 100%;
  min-height: 240px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  resize: vertical;
}

.tool-textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(43, 140, 93, 0.12);
}

.tool-file-drop {
  display: grid;
  min-height: 240px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #fafbf9;
  text-align: center;
}

.tool-file-drop h3 {
  margin: 12px 0 4px;
  font-size: 14px;
}

.tool-file-drop p {
  margin: 0 0 15px;
  color: var(--ink-500);
  font-size: 11px;
}

.tool-file-drop .upload-dropzone__icon {
  margin: 0 auto;
}

.tool-panel__footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}

.tool-privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-500);
  font-size: 10px;
}

.tool-privacy-note svg {
  width: 15px;
  height: 15px;
  color: var(--brand-600);
}

.tool-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.tool-result {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.tool-result strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.tool-result span {
  color: var(--ink-500);
  font-size: 10px;
}

/* China passport photo */
.passport-photo-tool .tool-workspace {
  width: min(calc(100% - 64px), 1240px);
}

.passport-photo-tool .tool-title {
  max-width: 760px;
}

.passport-photo-tool .tool-panel__body {
  min-height: 0;
  padding: 0;
}

.passport-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  padding: 28px;
}

.passport-intro[hidden] {
  display: none;
}

.passport-dropzone {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 15%, rgba(43, 140, 93, 0.08), transparent 42%),
    #fafbf9;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.passport-dropzone:hover,
.passport-dropzone.is-dragging {
  border-color: var(--brand-500);
  background-color: var(--brand-50);
}

.passport-dropzone__icon,
.passport-requirements__icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  color: var(--brand-700);
  background: var(--brand-100);
}

.passport-dropzone__icon svg {
  width: 27px;
  height: 27px;
}

.passport-dropzone > strong {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.025em;
}

.passport-dropzone > span:nth-of-type(2) {
  max-width: 380px;
  margin: 8px 0 20px;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.6;
}

.passport-requirements {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.passport-requirements > div {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 13px;
}

.passport-requirements__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.passport-requirements__icon svg {
  width: 21px;
  height: 21px;
}

.passport-requirements strong {
  font-size: 13px;
}

.passport-requirements p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.5;
}

.passport-requirements ul {
  display: grid;
  gap: 12px;
  margin: 25px 0;
  padding: 21px 0 21px 20px;
  border-block: 1px solid var(--line);
  color: var(--ink-600);
  font-size: 12px;
  line-height: 1.55;
}

.passport-requirements li::marker {
  color: var(--brand-600);
}

.passport-requirements > a {
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
}

.passport-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.passport-workbench[hidden] {
  display: none;
}

.passport-editor {
  min-width: 0;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: #f8f9f6;
}

.passport-editor__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.passport-editor__topline > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.passport-editor__topline strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passport-editor__topline span {
  color: var(--ink-500);
  font-size: 10px;
}

.passport-editor__topline .text-link {
  flex: 0 0 auto;
  cursor: pointer;
}

.passport-canvas-wrap {
  position: relative;
  width: min(100%, 370px);
  aspect-ratio: 33 / 48;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(45deg, #e9ece6 25%, transparent 25%),
    linear-gradient(-45deg, #e9ece6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9ece6 75%),
    linear-gradient(-45deg, transparent 75%, #e9ece6 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  box-shadow: 0 18px 44px rgba(21, 24, 22, 0.11);
}

.passport-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.passport-guide {
  position: absolute;
  inset: 0;
  color: rgba(21, 24, 22, 0.82);
  pointer-events: none;
}

.passport-guide__axis {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px dashed rgba(31, 122, 80, 0.4);
}

.passport-guide__head {
  position: absolute;
  top: 6.25%;
  left: 16.66%;
  width: 66.66%;
  height: 68.75%;
  border: 1px dashed rgba(31, 122, 80, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(21, 24, 22, 0.06);
}

.passport-guide__top,
.passport-guide__chin {
  position: absolute;
  right: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(21, 24, 22, 0.66);
  font-size: 8px;
  line-height: 1.2;
}

.passport-guide__top {
  top: 7px;
}

.passport-guide__chin {
  bottom: 7px;
}

.passport-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.passport-controls label {
  display: grid;
  gap: 8px;
}

.passport-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 650;
}

.passport-controls output {
  color: var(--brand-700);
}

.passport-controls input[type="range"] {
  width: 100%;
  accent-color: var(--brand-600);
}

.passport-reset {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 38px;
  padding-block: 7px;
  font-size: 11px;
}

.passport-review {
  min-width: 0;
  padding: 26px;
}

.passport-review__summary {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid #ead8b4;
  border-radius: 13px;
  background: var(--gold-soft);
}

.passport-review__summary.is-good {
  border-color: #c9e4d2;
  background: var(--brand-50);
}

.passport-review__summary.has-errors {
  border-color: #ebc3bf;
  background: var(--danger-soft);
}

.passport-review__summary-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.7);
}

.passport-review__summary.is-good .passport-review__summary-icon {
  color: var(--brand-700);
}

.passport-review__summary.has-errors .passport-review__summary-icon {
  color: var(--danger);
}

.passport-review__summary-icon svg {
  width: 20px;
  height: 20px;
}

.passport-review__summary > div {
  display: grid;
  gap: 3px;
}

.passport-review__summary strong {
  font-size: 12px;
}

.passport-review__summary span:last-child {
  color: var(--ink-600);
  font-size: 9px;
}

.passport-checks {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.passport-check {
  display: grid;
  min-height: 56px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.passport-check + .passport-check {
  border-top: 1px solid var(--line);
}

.passport-check > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: var(--gold);
  background: var(--gold-soft);
}

.passport-check--pass > span {
  color: var(--brand-700);
  background: var(--brand-100);
}

.passport-check--error > span {
  color: var(--danger);
  background: var(--danger-soft);
}

.passport-check svg {
  width: 14px;
  height: 14px;
}

.passport-check > div {
  display: grid;
  gap: 2px;
}

.passport-check strong {
  font-size: 10px;
}

.passport-check small {
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.4;
}

.passport-manual {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding: 15px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.passport-manual > strong {
  margin-bottom: 2px;
  font-size: 10px;
}

.passport-manual label {
  display: grid;
  grid-template-columns: 15px 1fr;
  align-items: start;
  gap: 7px;
  color: var(--ink-600);
  font-size: 9px;
  line-height: 1.45;
}

.passport-manual input {
  margin: 1px 0 0;
  accent-color: var(--brand-600);
}

.passport-download {
  width: 100%;
  margin-top: 18px;
}

.passport-disclaimer {
  margin: 10px 3px 0;
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.55;
}

@media (max-width: 899px) {
  .passport-photo-tool .tool-workspace {
    width: min(calc(100% - 48px), 820px);
  }

  .passport-intro,
  .passport-workbench {
    grid-template-columns: 1fr;
  }

  .passport-editor {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 619px) {
  .passport-photo-tool .tool-workspace {
    width: calc(100% - 32px);
  }

  .passport-intro {
    gap: 16px;
    padding: 16px;
  }

  .passport-dropzone {
    min-height: 300px;
    padding: 24px 18px;
  }

  .passport-requirements,
  .passport-editor,
  .passport-review {
    padding: 18px;
  }

  .passport-editor__topline {
    align-items: start;
  }

  .passport-controls {
    grid-template-columns: 1fr;
  }

  .passport-reset {
    grid-column: auto;
    width: 100%;
  }
}

/* Local file hash tool */
.hash-tool-page .tool-workspace {
  width: min(calc(100% - 64px), 1240px);
}

.hash-tool-page .tool-title {
  max-width: 760px;
}

.hash-tool-page .tool-panel__body {
  min-height: 0;
  padding: 0;
}

.hash-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  padding: 26px;
}

.hash-files {
  min-width: 0;
}

.hash-dropzone {
  display: grid;
  min-height: 210px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 20%, rgba(39, 118, 168, 0.08), transparent 38%),
    #fafbf9;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.hash-dropzone:hover,
.hash-dropzone.is-dragging {
  border-color: var(--blue);
  background-color: #f5fafc;
}

.hash-dropzone__icon,
.hash-section-title > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: var(--blue-soft);
}

.hash-dropzone__icon svg {
  width: 27px;
  height: 27px;
}

.hash-dropzone > span:nth-of-type(2) {
  display: grid;
  gap: 4px;
}

.hash-dropzone strong {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.hash-dropzone small {
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.5;
}

.hash-file-list {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hash-file-list[hidden] {
  display: none;
}

.hash-file-list__header {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbf9;
}

.hash-file-list__header > span {
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 650;
}

.hash-file-item {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.hash-file-item + .hash-file-item {
  border-top: 1px solid var(--line);
}

.hash-file-item__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
}

.hash-file-item__icon svg {
  width: 17px;
  height: 17px;
}

.hash-file-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.hash-file-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-file-item small {
  color: var(--ink-500);
  font-size: 9px;
}

.hash-file-item > button,
.hash-copy {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-500);
  background: transparent;
  cursor: pointer;
}

.hash-file-item > button:hover,
.hash-copy:hover {
  color: var(--ink-950);
  background: var(--surface-soft);
}

.hash-file-item > button svg,
.hash-copy svg {
  width: 15px;
  height: 15px;
}

.hash-algorithms {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.hash-section-title {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
}

.hash-section-title > span {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.hash-section-title svg {
  width: 19px;
  height: 19px;
}

.hash-section-title > div {
  display: grid;
  gap: 2px;
}

.hash-section-title strong {
  font-size: 12px;
}

.hash-section-title small {
  color: var(--ink-500);
  font-size: 9px;
}

.hash-algorithm-list {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.hash-algorithm {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.hash-algorithm:has(input:checked) {
  border-color: #bcd7e7;
  background: #f3f9fc;
}

.hash-algorithm input {
  accent-color: var(--blue);
}

.hash-algorithm > span {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hash-algorithm strong {
  font-size: 10px;
}

.hash-algorithm small {
  color: var(--ink-500);
  font-size: 8px;
}

.hash-local-note {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 11px;
  color: var(--brand-700);
  background: var(--brand-50);
}

.hash-local-note > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.hash-local-note svg {
  width: 17px;
  height: 17px;
}

.hash-local-note p {
  margin: 0;
  color: var(--ink-600);
  font-size: 9px;
  line-height: 1.5;
}

.hash-local-note strong {
  display: block;
  color: var(--brand-700);
}

.hash-legacy-note {
  margin: 10px 2px 0;
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.5;
}

.hash-progress {
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}

.hash-progress[hidden],
.hash-results-panel[hidden],
.hash-verify__result[hidden] {
  display: none;
}

.hash-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  font-size: 10px;
}

.hash-progress > div span {
  color: var(--blue);
  font-weight: 700;
}

.hash-progress__track {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.hash-progress__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms var(--ease);
}

.hash-results-panel,
.hash-verify {
  margin: 0 26px 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.hash-results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.hash-results-header h3,
.hash-verify h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.025em;
}

.hash-results-header p,
.hash-verify header p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 9px;
}

.hash-export-actions {
  display: flex;
  gap: 8px;
}

.hash-export-actions .button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 10px;
}

.hash-table-wrap {
  overflow-x: auto;
}

.hash-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.hash-table th,
.hash-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.hash-table tr:last-child td {
  border-bottom: 0;
}

.hash-table th {
  color: var(--ink-500);
  background: #fafbf9;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hash-table th:first-child {
  width: 22%;
}

.hash-table th:nth-child(2) {
  width: 12%;
}

.hash-table th:last-child {
  width: 48px;
}

.hash-table td:first-child {
  min-width: 0;
}

.hash-table td:first-child strong,
.hash-table td:first-child small {
  display: block;
}

.hash-table td:first-child strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-table td:first-child small {
  color: var(--ink-500);
  font-size: 8px;
}

.hash-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.hash-table code,
.hash-verify__result code {
  color: var(--ink-700);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.hash-verify {
  padding: 20px;
}

.hash-verify > header {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hash-verify__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--brand-700);
  background: var(--brand-100);
}

.hash-verify__icon svg {
  width: 19px;
  height: 19px;
}

.hash-verify__fields {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) 130px minmax(240px, 1.8fr) auto;
  align-items: end;
  gap: 10px;
}

.hash-verify__fields .field {
  min-width: 0;
  margin: 0;
}

.hash-verify__fields .field > span {
  color: var(--ink-700);
  font-size: 9px;
  font-weight: 700;
}

.hash-verify__fields input,
.hash-verify__fields select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  font-size: 10px;
}

.hash-verify__fields input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.hash-verify__fields input:focus,
.hash-verify__fields select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 118, 168, 0.12);
}

.hash-verify__fields > .button {
  min-height: 42px;
  white-space: nowrap;
}

.hash-verify__result {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #c9e4d2;
  border-radius: 11px;
  color: var(--brand-700);
  background: var(--brand-50);
}

.hash-verify__result.is-error,
.hash-verify__result.is-mismatch {
  color: var(--danger);
  border-color: #ebc3bf;
  background: var(--danger-soft);
}

.hash-verify__result > svg {
  width: 20px;
  height: 20px;
  margin: 4px 0 0 5px;
}

.hash-verify__result > div {
  display: grid;
  gap: 2px;
}

.hash-verify__result strong {
  font-size: 10px;
}

.hash-verify__result span {
  color: var(--ink-600);
  font-size: 9px;
}

.hash-verify__result code {
  margin-top: 5px;
}

@media (max-width: 899px) {
  .hash-tool-page .tool-workspace {
    width: min(calc(100% - 48px), 820px);
  }

  .hash-setup {
    grid-template-columns: 1fr;
  }

  .hash-verify__fields {
    grid-template-columns: 1fr 1fr;
  }

  .hash-verify__expected {
    grid-column: 1 / -1;
  }
}

@media (max-width: 619px) {
  .hash-tool-page .tool-workspace {
    width: calc(100% - 32px);
  }

  .hash-setup {
    padding: 16px;
  }

  .hash-dropzone {
    min-height: 280px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 28px 18px;
    text-align: center;
  }

  .hash-dropzone > span:nth-of-type(2) {
    justify-items: center;
  }

  .hash-results-panel,
  .hash-verify {
    margin: 0 16px 16px;
  }

  .hash-results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hash-export-actions {
    width: 100%;
  }

  .hash-export-actions .button {
    flex: 1;
  }

  .hash-table {
    min-width: 720px;
  }

  .hash-verify__fields {
    grid-template-columns: 1fr;
  }

  .hash-verify__expected {
    grid-column: auto;
  }

  .hash-verify__fields > .button {
    width: 100%;
  }
}

/* Dialog */
.dialog-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(21, 24, 22, 0.5);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms var(--ease),
    visibility 180ms;
}

.dialog-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.dialog {
  width: min(100%, 440px);
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms var(--ease);
}

.dialog-backdrop.is-open .dialog {
  transform: translateY(0) scale(1);
}

.dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}

.dialog p {
  margin: 8px 0 22px;
  color: var(--ink-600);
  font-size: 12px;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

@media (max-width: 1179px) {
  .shell {
    width: min(calc(100% - 80px), 1100px);
  }

  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .favorite-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .shell {
    width: min(calc(100% - 48px), 820px);
  }

  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 70px 82px;
  }

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

  .site-footer {
    grid-template-columns: 1fr auto;
    padding-block: 26px;
  }

  .site-footer p {
    display: none;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .cms-sidebar {
    position: fixed;
    z-index: 100;
    width: 270px;
    transform: translateX(-102%);
    transition: transform 220ms var(--ease);
  }

  .sidebar-is-open .cms-sidebar {
    transform: translateX(0);
  }

  .sidebar-is-open::after {
    position: fixed;
    z-index: 90;
    inset: 0;
    background: rgba(21, 24, 22, 0.4);
    content: "";
  }

  .cms-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    padding-inline: 24px;
  }

  .cms-mobile-menu {
    display: inline-grid;
  }

  .cms-content {
    width: min(calc(100% - 48px), 820px);
  }

  .cms-dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-story {
    display: none;
  }

  .auth-card__mobile-brand {
    display: inline-flex;
  }
}

@media (max-width: 619px) {
  .shell {
    width: calc(100% - 32px);
  }

  .site-header__inner {
    min-height: 66px;
  }

  .brand__name {
    font-size: 16px;
  }

  .site-actions .button {
    display: none;
  }

  .hero {
    padding-block: 52px 64px;
  }

  .hero h1 {
    font-size: clamp(46px, 15vw, 64px);
  }

  .hero__lede {
    margin-top: 24px;
    font-size: 16px;
  }

  .tool-search {
    min-height: 56px;
  }

  .tool-search input {
    height: 54px;
  }

  .tool-search kbd {
    display: none;
  }

  .hero__meta {
    display: grid;
  }

  .tools-section {
    padding-block: 70px 80px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 12px;
    text-align: left;
  }

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

  .tool-card,
  .tool-card__link {
    min-height: 220px;
  }

  .workspace-cta {
    display: grid;
    min-height: 340px;
    margin-bottom: 70px;
    padding: 34px 26px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .site-footer nav {
    display: none;
  }

  .site-footer > span {
    font-size: 10px;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .toast {
    min-width: 0;
  }

  .cms-topbar {
    padding-inline: 16px;
  }

  .cms-global-search {
    min-width: 0;
  }

  .cms-content {
    width: calc(100% - 32px);
    padding-block: 26px 52px;
  }

  .account-hero,
  .cms-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-hero {
    display: flex;
  }

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

  .stat-card {
    min-height: 130px;
    padding: 16px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .favorite-management-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .cms-table thead {
    display: none;
  }

  .cms-table,
  .cms-table tbody,
  .cms-table tr,
  .cms-table td {
    display: block;
    width: 100%;
  }

  .cms-table tr {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .cms-table td {
    height: auto;
    padding: 4px;
    border: 0;
  }

  .cms-table td:nth-child(2),
  .cms-table td:nth-child(3),
  .cms-table td:nth-child(4) {
    display: inline-block;
    width: auto;
    margin-right: 10px;
    color: var(--ink-500);
  }

  .cms-table td:last-child {
    position: absolute;
    top: 18px;
    right: 12px;
  }

  .auth-panel {
    padding: 32px 22px;
  }

  .tool-workspace {
    width: calc(100% - 32px);
    padding-block: 42px 70px;
  }

  .tool-header__inner {
    min-height: 64px;
  }

  .tool-results {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-panel__footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
