/* AI历史书生态 · 工具库整合层
   保留原有工具检索与数据组件，只统一品牌、层级与阅读节奏。 */

:root {
  --history-ink: #111114;
  --history-muted: #66657a;
  --history-line: #e9e9f3;
  --history-violet: #6e40ff;
  --history-violet-deep: #4b22d6;
  --history-sky: #0797ff;
  --history-mint: #00c8a5;
  --history-sun: #ffe045;
  --ecosystem-header-height: 74px;
  --tools-toolbar-height: 76px;
  color-scheme: light;
}

html,
body {
  width: 100%;
  height: auto;
  min-height: 100%;
  background: #fff;
  color: var(--history-ink);
}

html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-width: 320px;
  overflow: visible;
  background:
    radial-gradient(circle at 96% 220px, color-mix(in srgb, var(--green) 7%, transparent), transparent 24rem),
    #fff;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 30%, transparent);
  outline-offset: 3px;
}

.notice-strip {
  display: none !important;
}

.site-shell {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

.ecosystem-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: var(--ecosystem-header-height);
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--history-line);
  background: rgba(255, 255, 255, 0.96);
}

.ecosystem-brand {
  color: var(--history-ink);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.ecosystem-brand span {
  color: var(--history-violet);
}

.ecosystem-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 14px);
  min-width: 0;
}

.ecosystem-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #474653;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}

.ecosystem-nav a:hover {
  background: #f4f3ff;
  color: var(--history-ink);
}

.ecosystem-nav a[aria-current="page"] {
  background: #f0ecff;
  color: var(--history-violet-deep);
}

.ecosystem-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 88px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cfcfe0;
  border-radius: 14px;
  background: #fff;
  color: var(--history-ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ecosystem-account:hover {
  transform: translateY(-1px);
  border-color: var(--history-violet);
  box-shadow: 0 10px 26px rgba(65, 47, 140, 0.12);
}

.ecosystem-account.is-signed-in {
  border-color: color-mix(in srgb, var(--green) 28%, var(--history-line));
  background: color-mix(in srgb, var(--green) 7%, #fff);
}

.tools-toolbar {
  position: fixed;
  top: var(--ecosystem-header-height);
  right: 0;
  left: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  min-height: var(--tools-toolbar-height);
  padding: 10px clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--history-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(52, 45, 94, 0.04);
}

.tools-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 196px;
  padding: 5px 8px 5px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tools-title:hover,
.tools-title:focus-visible {
  background: #f6f5fb;
}

.tools-title .career-identity-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--history-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 20px rgba(40, 27, 93, 0.2);
}

.tools-title.is-career .career-identity-mark {
  background: linear-gradient(145deg, var(--history-violet), color-mix(in srgb, var(--green) 76%, #163957));
}

.career-identity-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tools-title strong {
  color: var(--history-ink);
  font-size: 1.05rem;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.tools-title span {
  color: var(--history-muted);
  font-size: 0.72rem;
}

.career-identity-copy > strong,
.career-identity-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.career-mini-progress {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--history-line) 80%, transparent);
}

.career-mini-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.top-nav {
  display: flex;
  grid-area: auto;
  justify-content: flex-start;
  gap: 4px;
  width: auto;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar,
.top-actions::-webkit-scrollbar {
  display: none;
}

.top-nav button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #555363;
  font-size: 0.84rem;
  font-weight: 680;
  text-decoration: none;
}

.top-nav button:hover {
  background: #f6f5fb;
  color: var(--history-ink);
  text-decoration: none;
}

.top-nav button.is-active {
  background: color-mix(in srgb, var(--green) 11%, #fff);
  color: color-mix(in srgb, var(--green) 84%, #24155f);
  text-decoration: none;
}

.top-actions {
  display: flex;
  flex-wrap: nowrap;
  grid-area: auto;
  justify-self: end;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.ghost-button,
.tools-toolbar .theme-panel {
  min-height: 38px;
  border: 1px solid var(--history-line);
  border-radius: 11px;
  background: #f8f8fb;
  color: #555363;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
}

.ghost-button:hover {
  border-color: color-mix(in srgb, var(--green) 26%, var(--history-line));
  background: color-mix(in srgb, var(--green) 7%, #fff);
  color: var(--history-ink);
}

.mode-switch-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding-inline: 10px;
}

.mode-status-dot {
  width: 8px;
  height: 8px;
  border: 2px solid color-mix(in srgb, var(--history-muted) 55%, #fff);
  border-radius: 50%;
  background: #fff;
}

.mode-switch-button.is-career {
  border-color: color-mix(in srgb, var(--green) 28%, var(--history-line));
  background: color-mix(in srgb, var(--green) 8%, #fff);
  color: color-mix(in srgb, var(--green) 82%, var(--history-ink));
}

.mode-switch-button.is-career .mode-status-dot {
  border-color: color-mix(in srgb, var(--green) 52%, #fff);
  background: var(--green);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--green) 26%, transparent);
}

.compare-entry strong {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 0.66rem;
}

.tools-toolbar .theme-panel {
  padding: 4px 6px 4px 10px;
}

.tools-toolbar .theme-panel > span {
  font-size: 0.7rem;
}

.page-shell {
  width: min(1360px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: calc(var(--ecosystem-header-height) + var(--tools-toolbar-height)) clamp(20px, 4vw, 56px) 64px;
}

.page-shell > *,
.content-surface,
.content-view,
#homeContent {
  min-width: 0;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: 0;
  padding: clamp(44px, 7vh, 72px) 0 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.hero-stage::before,
.hero-stage::after {
  display: none;
}

.hero-copy {
  display: block;
}

.agi-title {
  max-width: 12ch;
  margin: 0;
  color: var(--history-ink);
  font-size: clamp(3.1rem, 6vw, 5.7rem);
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.agi-title em {
  position: relative;
  display: inline;
  color: var(--history-violet);
  font-style: normal;
}

.agi-title em::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.03em;
  left: 0;
  z-index: -1;
  height: 0.12em;
  background: var(--history-sun);
}

.hero-copy > p:not(.eyebrow):not(.hero-kicker) {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--history-muted);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.75;
}

.eyebrow,
.hero-kicker {
  display: none !important;
}

.search-form {
  margin-top: 28px;
}

.search-box {
  max-width: 780px;
  min-height: 58px;
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(55, 47, 97, 0.1);
}

.search-box:focus-within {
  border-color: color-mix(in srgb, var(--green) 46%, var(--history-line));
  box-shadow: 0 18px 48px color-mix(in srgb, var(--green) 14%, transparent);
}

.search-box input {
  color: var(--history-ink);
}

.search-box input::placeholder {
  color: #777587;
}

.search-box select {
  color: #555363;
}

.search-box button {
  margin: 6px;
  border-radius: 11px;
  background: var(--green);
  box-shadow: none;
}

.need-list {
  max-width: 780px;
  margin-top: 16px;
}

.need-button {
  min-height: 34px;
  border-color: var(--history-line);
  background: #f8f8fb;
  color: #5e5c6c;
}

.need-button:hover {
  border-color: color-mix(in srgb, var(--green) 30%, var(--history-line));
  background: color-mix(in srgb, var(--green) 7%, #fff);
  color: var(--history-ink);
}

.hero-art {
  display: block;
  position: relative;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #f2efff;
  box-shadow: 0 20px 56px rgba(69, 51, 150, 0.15);
}

.hero-art img {
  width: 100%;
  height: 260px;
  min-height: 0;
  object-fit: cover;
}

.hero-art figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 17, 20, 0.86);
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-art figcaption span {
  color: #d9d5ea;
  font-size: 0.7rem;
}

.hero-art figcaption strong {
  font-size: 0.72rem;
}

.metric-ribbon {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 50px;
  margin: 0 0 28px;
  padding: 0;
  overflow-x: auto;
  border-block: 1px solid var(--history-line);
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.metric-ribbon > div {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 5px;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-right: 1px solid var(--history-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.metric-ribbon > div:first-child {
  padding-left: 0 !important;
}

.metric-ribbon strong {
  color: var(--history-ink);
  font-size: 0.82rem;
}

.metric-ribbon span {
  color: var(--history-muted);
  font-size: 0.74rem;
}

.content-surface {
  margin-top: 0;
  padding-bottom: 20px;
  background: transparent;
}

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

.poster-card {
  min-height: 148px;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(32, 28, 58, 0.13);
}

.poster-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(32, 28, 58, 0.18);
}

.poster-card span {
  margin-bottom: 20px;
  padding: 5px 8px;
  font-size: 0.65rem;
  backdrop-filter: none;
}

.poster-card h2 {
  margin-bottom: 5px;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  letter-spacing: -0.03em;
}

.poster-card p {
  font-size: 0.72rem;
}

.agi-tool-stage {
  width: 100%;
  margin: 0 auto 32px;
}

.agi-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--history-line);
  border-radius: 14px;
  background: #f7f7fb;
  scrollbar-width: none;
}

.agi-tabs button {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.agi-tabs button span,
.agi-task-card > span {
  display: none;
}

.agi-tabs button:hover,
.agi-tabs button.is-active {
  color: var(--history-violet-deep);
  box-shadow: 0 8px 22px rgba(59, 53, 104, 0.08);
}

.agi-task-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.agi-task-card {
  grid-template-columns: 1fr;
  grid-template-areas: "title" "summary";
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--history-line);
  border-radius: 14px;
  box-shadow: none;
}

.agi-task-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 24%, var(--history-line));
  box-shadow: 0 14px 32px rgba(66, 60, 112, 0.09);
}

.agi-task-card strong {
  font-size: 0.98rem;
}

.agi-task-card small {
  color: var(--history-muted);
  font-size: 0.78rem;
}

.section-block,
.tool-view {
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.section-block {
  padding: 22px;
}

.section-head h2,
.view-heading h2 {
  margin: 0;
  color: var(--history-ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: -0.025em;
}

.knowledge-card,
.mini-tool-card,
.directory-card,
.source-card,
.agent-card,
.prompt-card,
.review-ranking-card {
  border-color: var(--history-line);
  border-radius: 14px;
  box-shadow: none;
}

.knowledge-card:hover,
.mini-tool-card:hover,
.directory-card:hover,
.source-card:hover,
.agent-card:hover,
.prompt-card:hover {
  border-color: color-mix(in srgb, var(--green) 24%, var(--history-line));
  box-shadow: 0 12px 30px rgba(57, 50, 92, 0.08);
}

.site-shell:not([data-view="home"]) .content-surface {
  margin-top: 26px;
}

.tool-view {
  padding: 20px;
}

.filter-panel {
  border-color: var(--history-line);
  border-radius: 14px;
  background: #fafafe;
  box-shadow: none;
}

.category-button,
.select-grid select {
  border-color: var(--history-line);
  border-radius: 10px;
  background: #fff;
}

.tool-view .virtual-list {
  height: min(58vh, 650px);
  min-height: 420px;
  border-color: var(--history-line);
  border-radius: 14px;
  background: #fafafe;
}

.tool-card {
  height: 100%;
  padding: 14px;
  border: 1px solid var(--history-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.tool-card:hover {
  border-color: color-mix(in srgb, var(--green) 28%, var(--history-line));
  box-shadow: 0 12px 28px rgba(58, 49, 102, 0.09);
}

.tool-title h3 {
  font-size: 0.98rem;
}

.tool-name-link:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prompt-actions .tool-action:not(.primary) {
  border-color: var(--history-line);
  background: #f7f7fb;
  color: var(--history-ink);
}

.career-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.5fr);
  margin: 2px 0 24px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(47, 35, 103, 0.13);
  animation: career-workspace-enter 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes career-workspace-enter {
  from {
    clip-path: inset(0 0 8% 0 round 16px);
    transform: translateY(8px);
    opacity: 0.94;
  }
  to {
    clip-path: inset(0 round 16px);
    transform: translateY(0);
    opacity: 1;
  }
}

.career-path-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(24px, 3vw, 38px);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 218, 91, 0.28), transparent 34%),
    linear-gradient(145deg, #2b1b68 0%, #4c3097 56%, #174c57 120%);
  color: #fff;
}

.career-path-heading,
.career-modal-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}

.career-path-mark,
.career-modal-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--history-sun);
  color: #2b1b68;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(17, 8, 52, 0.22);
}

.career-path-heading h2,
.career-task-list-heading h2,
.career-task-copy h3,
.career-modal-heading h2,
.mode-confirm-panel h2 {
  margin: 0;
  letter-spacing: -0.025em;
}

.career-path-heading h2 {
  color: #fff;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
}

.career-path-heading p {
  margin: 5px 0 0;
  color: #d9d2f8;
  font-size: 0.78rem;
}

.career-path-description {
  max-width: 42ch;
  margin: 28px 0;
  color: #eeeafd;
  font-size: 0.92rem;
  line-height: 1.75;
}

.career-progress-block {
  display: grid;
  gap: 9px;
}

.career-progress-block > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.career-progress-block span:first-child {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 850;
}

.career-progress-block span:last-child {
  color: #d9d2f8;
  font-size: 0.68rem;
  text-align: right;
}

.career-progress-block > i {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.19);
}

.career-progress-block > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--history-sun);
}

.career-path-actions {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.career-path-actions button,
.career-path-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.career-path-actions button:hover,
.career-path-actions a:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.17);
}

.career-path-summary > small {
  margin-top: auto;
  padding-top: 28px;
  color: #cbc3ed;
  font-size: 0.66rem;
  line-height: 1.6;
}

.career-task-list {
  min-width: 0;
  padding: clamp(24px, 3vw, 38px);
}

.career-task-list-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 15px;
}

.career-task-list-heading h2 {
  color: var(--history-ink);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.career-task-list-heading p {
  margin: 7px 0 0;
  color: var(--history-muted);
  font-size: 0.78rem;
}

.career-task-list-heading > a {
  flex: 0 0 auto;
  color: var(--history-violet);
  font-size: 0.72rem;
  font-weight: 750;
}

.career-task-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 0.75fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 17px 0;
  border-top: 1px solid var(--history-line);
}

.career-task-copy,
.career-task-copy h3,
.career-task-copy p {
  min-width: 0;
}

.career-task-copy h3 {
  color: var(--history-ink);
  font-size: 0.98rem;
}

.career-task-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--history-muted);
  font-size: 0.73rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.career-task-tools,
.career-task-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.career-task-tools {
  flex-wrap: wrap;
}

.career-task-tools button,
.career-task-actions button,
.career-task-actions a {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--history-line);
  border-radius: 9px;
  background: #f7f7fb;
  color: var(--history-ink);
  font: inherit;
  font-size: 0.67rem;
  font-weight: 740;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.career-task-actions button {
  border-color: color-mix(in srgb, var(--green) 28%, var(--history-line));
  background: color-mix(in srgb, var(--green) 8%, #fff);
  color: color-mix(in srgb, var(--green) 82%, var(--history-ink));
}

.career-task-tools button:hover,
.career-task-actions button:hover,
.career-task-actions a:hover {
  border-color: color-mix(in srgb, var(--history-violet) 34%, var(--history-line));
  background: #fff;
}

.career-role-panel,
.mode-confirm-panel {
  width: min(610px, calc(100vw - 36px));
}

.career-role-panel {
  padding: clamp(24px, 4vw, 38px);
}

.career-modal-heading {
  align-items: flex-start;
  padding-right: 32px;
}

.career-modal-heading h2,
.mode-confirm-panel h2 {
  color: var(--history-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.career-modal-heading p,
.mode-confirm-panel > p {
  max-width: 58ch;
  margin: 8px 0 0;
  color: var(--history-muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.career-role-form {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  margin-top: 28px;
}

.career-role-form label {
  display: grid;
  gap: 8px;
  color: var(--history-muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.career-role-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--history-line);
  border-radius: 12px;
  background-color: #f8f8fb;
  color: var(--history-ink);
  font: inherit;
  font-size: 0.86rem;
}

.career-modal-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  margin-top: 7px;
}

.career-modal-actions .tool-action {
  min-height: 46px;
  justify-content: center;
}

.career-modal-actions .tool-action:not(.primary) {
  border-color: var(--history-line);
  background: #f7f7fb;
  color: var(--history-ink);
}

.career-modal-actions .tool-action:not(.primary):hover,
.career-modal-actions .tool-action:not(.primary):focus-visible {
  border-color: color-mix(in srgb, var(--history-violet) 30%, var(--history-line));
  background: #fff;
  color: var(--history-violet);
}

.career-form-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #9a2d43;
  font-size: 0.76rem;
}

.career-level-note {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--history-line);
  color: var(--history-muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.mode-confirm-panel {
  padding: clamp(28px, 5vw, 44px);
  text-align: left;
}

.mode-confirm-signal {
  position: relative;
  display: block;
  width: 74px;
  height: 38px;
  margin-bottom: 25px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--history-violet) 14%, #fff);
}

.mode-confirm-signal i {
  position: absolute;
  top: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.mode-confirm-signal i:first-child {
  left: 8px;
  background: var(--history-violet);
}

.mode-confirm-signal i:last-child {
  right: 8px;
  background: var(--green);
}

.mode-confirm-panel .career-modal-actions {
  margin-top: 26px;
}

.detail-panel {
  border-radius: 20px;
  background: #fff;
}

.auth-provider-note span,
.tool-action.primary,
.search-box button {
  background: var(--green);
}

.toast {
  z-index: 120;
}

@media (max-width: 1180px) {
  .tools-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    padding-bottom: 2px;
  }

  :root {
    --tools-toolbar-height: 118px;
  }

  .poster-wall,
  .agi-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .career-workspace {
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.4fr);
  }

  .career-task-row {
    grid-template-columns: minmax(150px, 1fr) auto;
  }

  .career-task-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  :root {
    --ecosystem-header-height: 116px;
    --tools-toolbar-height: 116px;
  }

  .ecosystem-header {
    grid-template-columns: auto auto;
    grid-template-rows: 58px 58px;
    gap: 0 12px;
    padding: 0 16px;
  }

  .ecosystem-brand {
    font-size: 1.35rem;
  }

  .ecosystem-account {
    justify-self: end;
    min-width: 76px;
    min-height: 40px;
    padding: 0 12px;
  }

  .ecosystem-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ecosystem-nav::-webkit-scrollbar {
    display: none;
  }

  .ecosystem-nav a {
    padding: 9px 10px;
  }

  .tools-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 16px;
  }

  .tools-title span {
    display: none;
  }

  .tools-title .career-identity-copy,
  .tools-title .career-identity-copy > strong,
  .tools-title .career-mini-progress {
    display: grid;
  }

  .tools-title .career-identity-copy > span {
    display: none;
  }

  .tools-title {
    min-width: 168px;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .top-actions {
    grid-column: 1 / -1;
  }

  .tools-toolbar .theme-panel > span,
  #exportFavorites,
  #clearFavorites {
    display: none;
  }

  .page-shell {
    padding-inline: 16px;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    padding-top: 38px;
  }

  .hero-art {
    display: none;
  }

  .agi-title {
    max-width: 10ch;
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .home-columns,
  .split-board {
    grid-template-columns: 1fr;
  }

  .career-workspace {
    grid-template-columns: 1fr;
  }

  .career-path-summary > small {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .tools-toolbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 5px;
    min-height: 148px;
  }

  :root {
    --tools-toolbar-height: 176px;
  }

  .tools-title {
    display: grid;
    width: 100%;
    min-width: 0;
    padding-inline: 2px;
  }

  .career-identity-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .tools-title .career-identity-copy > span {
    display: block;
  }

  .top-nav {
    width: 100%;
  }

  .top-nav button {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 0.78rem;
  }

  .top-actions {
    grid-column: auto;
  }

  .mode-switch-button {
    flex: 0 0 auto;
  }

  .hero-stage {
    width: 100%;
    min-width: 0;
    padding: 30px 0 22px;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero-copy > p:not(.eyebrow):not(.hero-kicker) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .agi-title {
    max-width: 100%;
    font-size: clamp(2.65rem, 13vw, 3.2rem);
    line-height: 1;
    text-wrap: wrap;
  }

  .agi-title em {
    display: block;
    width: fit-content;
    margin-top: 5px;
  }

  .search-box {
    grid-template-columns: 36px minmax(0, 1fr) 64px !important;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    overflow: hidden;
  }

  .search-box select {
    display: none;
  }

  .search-box button {
    display: block !important;
    grid-column: 3 !important;
    min-width: 64px;
    margin-inline: 2px 5px;
    padding-inline: 8px;
  }

  .search-box input {
    grid-column: 2 !important;
    width: 100%;
    min-width: 0;
    font-size: 0.86rem;
  }

  .search-box > span {
    grid-column: 1 !important;
    width: 36px;
    height: 36px;
  }

  .need-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .metric-ribbon {
    margin-bottom: 20px;
  }

  .poster-wall {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    padding: 0 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .career-workspace {
    margin-bottom: 18px;
  }

  .career-path-summary,
  .career-task-list {
    padding: 20px;
  }

  .career-task-list-heading {
    display: grid;
    gap: 10px;
  }

  .career-task-list-heading > a {
    width: fit-content;
  }

  .career-task-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .career-task-actions {
    grid-column: auto;
  }

  .career-role-form {
    grid-template-columns: 1fr;
  }

  .career-modal-actions {
    display: grid;
    grid-column: auto;
  }

  .poster-card {
    flex: 0 0 78vw;
    min-height: 144px;
    scroll-snap-align: start;
  }

  .agi-task-grid {
    grid-template-columns: 1fr 1fr;
  }

  .agi-task-card {
    min-height: 112px;
    padding: 14px;
  }

  .section-block,
  .tool-view {
    padding: 15px;
  }

  .tool-view .virtual-list {
    height: calc(100dvh - 352px);
    min-height: 360px;
  }
}

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