/* ==========================================================================
   DS 组件样式（PRD-11481 首页技术方案 3.1）
   数值见 ai_doc/blog/v2/PRD-11481-DS数值对照.md（Figma「DS 元件狀態對照」200:2823）
   只定义变量和 .ds- 开头的 class，不改任何现有元素；各区块的模板套用这些 class 后才生效
   ========================================================================== */

/* ---------- 颜色 ----------
   Figma 里有 style 名的用 style 名；#1B2338 / #465566 / #B1BBC5 / #E3EAF0 是绑定的 Figma 变量（名字拿不到），按用途命名 */
:root {
  --ds-primary: #015FE5;          /* primary */
  --ds-primary-dark: #0A51B6;     /* primary-dark：hover */
  --ds-primary-darker: #033D90;   /* primary-darker */
  --ds-text-1: #1B2338;           /* 标题、正文 */
  --ds-text-2: #465566;           /* 次要文字 */
  --ds-text-3: #7E8F9F;           /* blue-grey-dark：弱文字、图标 */
  --ds-text-4: #B1BBC5;           /* meta、占位文字 */
  --ds-blue-grey: #CBD6E1;        /* blue-grey：禁用、描边、分隔线 */
  --ds-line: #E3EAF0;             /* 卡片边框、Label 底 */
  --ds-fill: #F0F4F8;             /* white-dark：浅底 */
  --ds-fill-hover: rgba(240, 244, 248, 0.4); /* 描边按钮、分页、FAQ 的 hover 底 */
  --ds-white: #FFFFFF;
  --ds-navy: #131B29;             /* denim-darker：footer 底、导航文字 */
  --ds-red: #FF5B5A;              /* accent-red */
  --ds-green: #00B15D;            /* accent-green */
  --ds-yellow: #E6B230;           /* accent-yellow */
  --ds-focus: #31B5FF;            /* 输入框 hover / focus 描边 */
  --ds-radius: 4px;
  --ds-radius-card: 16px;
}

/* ---------- 文字（字号 / 行高 / 字重，对照表第 2 节） ---------- */
.ds-t-48b { font-size: 48px; line-height: 57.6px; font-weight: 700; }
.ds-t-34b { font-size: 34px; line-height: 51px; font-weight: 700; }
.ds-t-28b { font-size: 28px; line-height: 33.6px; font-weight: 700; }
.ds-t-24b { font-size: 24px; line-height: 28.8px; font-weight: 700; }
.ds-t-24b-150 { font-size: 24px; line-height: 36px; font-weight: 700; }
.ds-t-18b { font-size: 18px; line-height: 27px; font-weight: 700; }
.ds-t-18b-auto { font-size: 18px; line-height: 23.4px; font-weight: 700; }
.ds-t-18m { font-size: 18px; line-height: 27px; font-weight: 500; }
.ds-t-18r { font-size: 18px; line-height: 27px; font-weight: 400; }
.ds-t-16b { font-size: 16px; line-height: 24px; font-weight: 700; }
.ds-t-16m { font-size: 16px; line-height: 24px; font-weight: 500; }
.ds-t-16r { font-size: 16px; line-height: 24px; font-weight: 400; }
.ds-t-14b { font-size: 14px; line-height: 21px; font-weight: 700; }
.ds-t-14b-auto { font-size: 14px; line-height: 18.2px; font-weight: 700; }
.ds-t-14m { font-size: 14px; line-height: 21px; font-weight: 500; }
.ds-t-14r { font-size: 14px; line-height: 21px; font-weight: 400; }
.ds-t-12m { font-size: 12px; line-height: 18px; font-weight: 500; }
.ds-t-12r { font-size: 12px; line-height: 18px; font-weight: 400; }

/* ---------- 图标：mask 方式，颜色跟着 currentColor（路径取自 Figma 导出的 SVG） ---------- */
.ds-ic {
  display: inline-block;
  flex: none;
  width: 28px;
  height: 28px;
  background-color: currentColor;
  -webkit-mask: var(--ds-ic) center / contain no-repeat;
  mask: var(--ds-ic) center / contain no-repeat;
}
.ds-ic--chevron-left {
  --ds-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath fill-rule='evenodd' d='M16.6876 20.6083C16.9804 20.3154 16.9804 19.8406 16.6876 19.5477L11.561 14.4212L16.6876 9.29463C16.9804 9.00174 16.9804 8.52687 16.6876 8.23397C16.3947 7.94108 15.9198 7.94108 15.6269 8.23397L9.43971 14.4212L15.6269 20.6083C15.9198 20.9012 16.3947 20.9012 16.6876 20.6083Z'/%3E%3C/svg%3E");
}
.ds-ic--chevron-right {
  --ds-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath fill-rule='evenodd' d='M11.1367 20.0303C10.8438 19.7374 10.8438 19.2626 11.1367 18.9697L16.2632 13.8432L11.1367 8.71663C10.8438 8.42374 10.8438 7.94886 11.1367 7.65597C11.4296 7.36308 11.9044 7.36308 12.1973 7.65597L18.3845 13.8432L12.1973 20.0303C11.9044 20.3232 11.4296 20.3232 11.1367 20.0303Z'/%3E%3C/svg%3E");
}
.ds-ic--arrow-left {
  width: 32px;
  height: 32px;
  --ds-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M14.0903 19.8058C14.5067 20.1685 14.5067 20.7566 14.0903 21.1193C13.6738 21.482 12.9985 21.482 12.582 21.1193L7.16896 16.4053L6.41484 15.7485L7.16896 15.0918L12.582 10.3777C12.9985 10.015 13.6738 10.015 14.0902 10.3777C14.5067 10.7404 14.5067 11.3285 14.0902 11.6912L10.5028 14.8154L24.5845 14.8154C25.1368 14.8154 25.5845 15.2631 25.5845 15.8154C25.5845 16.3676 25.1368 16.8154 24.5845 16.8154L10.6564 16.8154L14.0903 19.8058Z'/%3E%3C/svg%3E");
}
.ds-ic--arrow-right {
  width: 32px;
  height: 32px;
  --ds-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M17.91 19.8058C17.493 20.1685 17.493 20.7565 17.91 21.1192C18.326 21.482 19.001 21.482 19.418 21.1192L24.831 16.4052L25.585 15.7485L24.831 15.0917L19.418 10.3777C19.001 10.015 18.326 10.015 17.91 10.3777C17.493 10.7404 17.493 11.3284 17.91 11.6912L21.497 14.8153L7.415 14.8153C6.863 14.8153 6.415 15.263 6.415 15.8153C6.415 16.3676 6.863 16.8153 7.415 16.8153L21.343 16.8153L17.91 19.8058Z'/%3E%3C/svg%3E");
}

/* ---------- Label（Type=Neutral 等） ---------- */
.ds-label {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: var(--ds-radius);
  background: var(--ds-line);
  color: var(--ds-text-2);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.ds-label--red { background: rgba(255, 91, 90, 0.2); color: var(--ds-red); }
.ds-label--green { background: rgba(0, 177, 93, 0.2); color: var(--ds-green); }
.ds-label--yellow { background: rgba(230, 178, 48, 0.2); color: var(--ds-yellow); }

/* ---------- Label-24Change（color=red / green，不显示图标） ---------- */
.ds-change {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--ds-radius);
  font-size: 18px;
  line-height: 23.4px;
  font-weight: 700;
  letter-spacing: 0;
}
.ds-change--red { background: rgba(255, 91, 90, 0.2); color: var(--ds-red); }
.ds-change--green { background: rgba(0, 177, 93, 0.2); color: var(--ds-green); }

/* ---------- Button-Based ----------
   尺寸：XS 24 高（header Register）、S 32 高、M 40 高
   类型：--primary 实心蓝、--outline 描边蓝、--neutral 实心白、--outline-neutral 描边灰
   状态：:hover、.is-disabled / [disabled]（整体 50% 不透明） */
.ds-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--ds-radius);
  font-family: inherit;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.ds-btn--xs { height: 24px; padding: 3px 7px; font-size: 14px; line-height: 16.1px; font-weight: 700; }
.ds-btn--s { height: 32px; padding: 6px 11px; font-size: 16px; line-height: 17.6px; font-weight: 500; }
.ds-btn--m { height: 40px; padding: 8px 15px; font-size: 16px; line-height: 19.2px; font-weight: 700; }
/* Figma 的内边距（XS 4/8、S 7/12、M 9/16）不含边框；这里统一留 1px 透明边框，内边距各减 1，外形尺寸不变 */

.ds-btn--primary { background: var(--ds-primary); color: var(--ds-white); }
.ds-btn--primary:hover { background: var(--ds-primary-dark); color: var(--ds-white); }

.ds-btn--outline { background: transparent; border-color: var(--ds-primary); color: var(--ds-primary); }
.ds-btn--outline:hover { background: var(--ds-fill-hover); border-color: var(--ds-primary-dark); color: var(--ds-primary-dark); }

.ds-btn--neutral { background: var(--ds-white); color: var(--ds-text-2); }
.ds-btn--neutral:hover { background: var(--ds-fill); color: var(--ds-text-2); }

.ds-btn--outline-neutral { background: transparent; border-color: var(--ds-blue-grey); color: var(--ds-text-2); }
.ds-btn--outline-neutral:hover { background: var(--ds-fill-hover); color: var(--ds-text-2); }
.ds-btn--m.ds-btn--outline-neutral:hover { border-color: var(--ds-text-3); }

.ds-btn.is-disabled,
.ds-btn[disabled] { opacity: .5; pointer-events: none; }
.ds-btn--block { display: flex; width: 100%; }

/* ---------- Button-Text（L：16 / 20.8 / 700；M：14 / 18.2 / 500） ---------- */
.ds-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ds-primary);
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}
.ds-link:hover { color: var(--ds-primary-dark); }
.ds-link .ds-ic { width: 16px; height: 16px; }
.ds-link--m { font-size: 14px; line-height: 18.2px; font-weight: 500; }
.ds-link--neutral { color: var(--ds-text-3); }
.ds-link--neutral:hover { color: var(--ds-text-2); }
.ds-link.is-disabled { color: var(--ds-blue-grey); pointer-events: none; }

/* ---------- TabItem-Secondary（高 36：文字 20 + 间距 12 + 选中条 4） ----------
   DS 的 hover 和 normal 完全一样（对照表），所以不写 hover */
.ds-tab {
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  height: 36px;
  color: var(--ds-text-3);
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.ds-tab::after {
  content: '';
  display: block;
  height: 4px;
}
.ds-tab.is-active {
  color: var(--ds-text-2);
  font-weight: 700;
}
.ds-tab.is-active::after { background: var(--ds-primary); }
.ds-tabs {
  display: flex;
  gap: 24px;
}

/* ---------- Pagination（每格 28×28，间距 4；不做 Show 10 / Go to） ---------- */
.ds-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ds-pager__item {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 2px;
  border-radius: var(--ds-radius);
  color: var(--ds-text-2);
  font-size: 16px;
  line-height: 22.4px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}
/* 箭头图标本身就是 28×28（Figma 导出整格），抵掉左右 2px 内边距，格子保持 28 宽 */
.ds-pager__item > .ds-ic { margin: 0 -2px; }
a.ds-pager__item:hover { background: var(--ds-fill-hover); color: var(--ds-text-2); }
.ds-pager__item.is-current { color: var(--ds-primary); }
.ds-pager__item.is-ellipsis { align-items: flex-start; padding-top: 2px; line-height: 18px; } /* Figma：「...」文字框 18 高，贴格子上边 2px */
.ds-pager__item.is-disabled { color: var(--ds-text-3); opacity: .5; pointer-events: none; }

/* ---------- Input-Text（高 48，不显示标题） ---------- */
.ds-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid transparent; /* Figma 内边距 16 不含边框；hover / focus 才出现描边 */
  border-radius: var(--ds-radius);
  background: var(--ds-fill);
  color: var(--ds-text-1);
  font-family: inherit;
  font-size: 16px;
  line-height: 20.8px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  outline: none;
}
.ds-input::placeholder { color: var(--ds-text-4); opacity: 1; }
.ds-input:hover,
.ds-input:focus { border-color: var(--ds-focus); }
.ds-input.is-error { border-color: var(--ds-red); }
.ds-input:disabled { color: var(--ds-blue-grey); }
.ds-input:disabled::placeholder { color: var(--ds-blue-grey); }
.ds-input:disabled:hover { border-color: transparent; }
.ds-input-error {
  margin-top: 4px;
  color: var(--ds-red);
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
}

/* ---------- Carousel-Indicator（State=grey：箭头 #CBD6E1；圆点 8×8、间距 12，当前项 56×8 不透明，其余 60%） ---------- */
.ds-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ds-carousel__arrow {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ds-blue-grey);
  cursor: pointer;
}
.ds-carousel__arrow:hover { color: var(--ds-text-3); }
.ds-carousel__dots {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 224px;
  justify-content: center;
}
.ds-carousel__dot {
  display: block;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ds-line);
  opacity: .6;
  cursor: pointer;
  transition: width .2s;
}
.ds-carousel__dot.is-active {
  width: 56px;
  opacity: 1;
}

/* ---------- Divider ---------- */
.ds-divider { height: 1px; border: 0; margin: 0; background: var(--ds-blue-grey); }
.ds-divider--v { display: inline-block; width: 1px; height: 20px; vertical-align: middle; }
