:root {
  color-scheme: light;
  --ink: #18212f;
  --ink-muted: #526173;
  --ink-soft: #7a8798;
  --canvas: #ffffff;
  --page: #f6f9fc;
  --page-warm: #fffaf2;
  --page-cool: #eef8ff;
  --page-mint: #effbf4;
  --line: #dce5ee;
  --line-soft: #eaf0f6;
  --blue: #2563eb;
  --blue-soft: #e8f1ff;
  --blue-strong: #1749b5;
  --teal: #0f9f8d;
  --teal-soft: #e7f8f4;
  --amber: #b7791f;
  --amber-soft: #fff3d8;
  --rose: #c2416b;
  --rose-soft: #ffeaf1;
  --violet: #6d5bd0;
  --violet-soft: #f0edff;
  --lime: #4d8f24;
  --lime-soft: #edf8df;
  --shadow-sm: 0 8px 24px rgba(36, 52, 72, 0.08);
  --shadow-md: 0 18px 42px rgba(36, 52, 72, 0.12);
  --radius: 8px;
  --page-width: 1180px;
  --content-width: 920px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-cjk: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", "Noto Sans CJK TC", "Noto Sans CJK SC", "Noto Sans", sans-serif;
  --font-ja: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --font-ko: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  --font-th: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans Thai", "Thonburi", Tahoma, Arial, sans-serif;
  --font-ar: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, var(--page) 460px),
    var(--page);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.58;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

:lang(ar) body {
  font-family: var(--font-ar);
}

:lang(ja) body {
  font-family: var(--font-ja);
}

:lang(ko) body {
  font-family: var(--font-ko);
}

:lang(th) body {
  font-family: var(--font-th);
}

:lang(zh) body,
:lang(zh-Hans) body,
:lang(zh-Hant) body,
:lang(zh-CN) body,
:lang(zh-TW) body {
  font-family: var(--font-cjk);
}

img {
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-strong);
  text-decoration: underline;
}

main :where(a:not(.wiki-card-media):not(.wiki-card-link):not(.card-action)) {
  color: var(--blue-strong);
  font-weight: 750;
  text-decoration-line: underline;
  text-decoration-color: rgba(37, 99, 235, 0.34);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  background: linear-gradient(180deg, transparent 58%, rgba(232, 241, 255, 0.86) 0);
}

main :where(a:not(.wiki-card-media):not(.wiki-card-link):not(.card-action):hover) {
  color: var(--blue);
  text-decoration-color: rgba(37, 99, 235, 0.7);
  background: linear-gradient(180deg, transparent 42%, rgba(231, 248, 244, 0.95) 0);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(220, 229, 238, 0.9);
  box-shadow: 0 10px 28px rgba(41, 58, 80, 0.06);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: var(--page-width);
  min-height: 58px;
  margin: 0 auto;
  padding: 10px clamp(16px, 3vw, 28px);
  overflow: visible;
  white-space: normal;
}

header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  color: var(--ink-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

header nav a:first-child {
  color: var(--ink-muted);
  background: transparent;
  border-color: transparent;
}

header nav a.is-active {
  color: var(--ink);
  background: linear-gradient(135deg, var(--amber-soft), var(--teal-soft));
  border-color: rgba(15, 159, 141, 0.22);
  box-shadow: 0 8px 18px rgba(15, 159, 141, 0.1);
}

header nav a:hover {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.16);
  text-decoration: none;
}

.home-intent-router,
.tool-panel {
  max-width: var(--page-width);
  margin: 0 auto 26px;
  padding: clamp(18px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(232, 241, 255, 0.9), rgba(231, 248, 244, 0.82)),
    #fff;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.home-intent-router h2 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.tool-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 14px;
}

.tool-panel-title {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
}

.tool-panel-title::after {
  display: none;
}

.tool-result-count {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 800;
}

.intent-actions,
.filter-groups,
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.intent-actions button,
.filter-chip {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--page-cool);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.1;
  cursor: pointer;
}

.intent-actions button:hover,
.filter-chip:hover,
.filter-chip[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.tool-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.tool-search {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius);
  font: inherit;
  font-size: 17px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.tool-search-submit {
  display: grid;
  min-height: 52px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
}

.tool-search-submit:hover {
  background: var(--blue-strong);
  border-color: var(--blue-strong);
}

.tool-search:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 0;
}

.filter-groups {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  align-items: stretch;
  gap: 12px;
}

.filter-group {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.04);
}

.filter-label {
  flex: 0 0 100%;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.tool-empty {
  padding: 14px 16px;
  color: var(--ink-muted);
  background: var(--amber-soft);
  border: 1px solid rgba(183, 121, 31, 0.18);
  border-radius: var(--radius);
}

.is-highlighted {
  animation: section-highlight 1.1s ease;
}

@keyframes section-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.26);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(37, 99, 235, 0);
  }
}

main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 74px) clamp(16px, 3vw, 28px) 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  margin: 0 auto 16px;
  font-size: clamp(42px, 6.4vw, 74px);
  line-height: 1.02;
  text-align: center;
  overflow-wrap: anywhere;
}

h1 + p,
.page-hero > p:not(.eyebrow):not(.meta-row) {
  max-width: 820px;
  margin: 0 auto 18px;
  color: var(--ink-muted);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.32;
  text-align: center;
}

h2 {
  position: relative;
  margin: 0 0 18px;
  color: #203454;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--amber));
  border-radius: 999px;
}

h3 {
  margin: 24px 0 10px;
  color: #25405f;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 16px;
  color: var(--ink-muted);
}

strong {
  color: var(--ink);
  font-weight: 800;
}

small,
time {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

main > h1:first-child,
main > p:first-child + h1,
main > h1:first-child + p {
  text-align: center;
}

main > h2,
main > h3,
main > p,
main > ul,
main > ol,
main > dl,
main > article,
main > .tier-table {
  max-width: var(--content-width);
  margin-inline: auto;
}

main > h2 {
  margin-top: 56px;
}

main > h3 {
  margin-top: 28px;
}

main > p {
  font-size: 17px;
}

main > p:last-child {
  color: var(--ink-soft);
  text-align: center;
}

.home-hero,
.page-hero {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto clamp(36px, 6vw, 64px);
  padding: clamp(30px, 5vw, 54px);
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(232, 241, 255, 0.95), rgba(231, 248, 244, 0.92) 48%, rgba(255, 243, 216, 0.9)),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.home-hero-with-image {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(238, 248, 255, 0.95) 52%, rgba(255, 243, 216, 0.92)),
    #ffffff;
}

.home-hero-with-tool {
  max-width: var(--page-width);
  padding: clamp(18px, 4vw, 38px) 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-tool-panel {
  width: 100%;
  margin-top: clamp(16px, 3vw, 26px);
  text-align: start;
}

.hero-tool-controls {
  margin-bottom: 16px;
}

.card-grid.hero-tool-results {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  padding: 0;
  overflow: visible;
}

.card-grid.hero-tool-results .wiki-card {
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
  align-items: start;
  min-height: 0;
  padding: 14px;
}

.card-grid.hero-tool-results .quick-facts-list {
  display: none;
}

.card-grid.hero-tool-results .wiki-card-media {
  width: 92px;
  max-height: none;
}

.page-hero {
  max-width: 940px;
}

.page-hero > p:not(.eyebrow):not(.meta-row) {
  overflow: visible;
}

.eyebrow {
  justify-self: center;
  width: fit-content;
  margin: 0;
  padding: 6px 10px;
  color: #0f766e;
  background: rgba(231, 248, 244, 0.95);
  border: 1px solid rgba(15, 159, 141, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-hero-summary {
  max-width: 820px;
  margin: 0 auto;
  overflow: visible;
  color: var(--ink-muted);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.32;
  text-align: center;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

main .home-hero-actions a,
main > p > a:only-child,
main section > p > a:only-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 15px;
  color: #123057;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

main .home-hero-actions a:hover,
main > p > a:only-child:hover,
main section > p > a:only-child:hover {
  color: #ffffff;
  background: var(--blue);
  text-decoration: none;
  transform: translateY(-2px) scale(1.01);
}

main > section {
  width: min(100%, var(--page-width));
  margin: clamp(26px, 5vw, 54px) auto 0;
  padding: clamp(30px, 5vw, 52px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

main > section:nth-of-type(3n + 1) {
  background: linear-gradient(180deg, #ffffff, var(--page-cool));
}

main > section:nth-of-type(3n + 2) {
  background: linear-gradient(180deg, #ffffff, var(--page-mint));
}

main > section:nth-of-type(3n) {
  background: linear-gradient(180deg, #ffffff, var(--page-warm));
}

main > section.content-block-section {
  background: #ffffff;
  border-inline-start: 4px solid rgba(37, 99, 235, 0.22);
}

main > section > * {
  max-width: var(--content-width);
  margin-inline: auto;
}

main > section > .card-grid,
main > section > .home-hub-grid,
main > section > .home-task-grid,
main > section > .code-list,
main > section > .tier-summary,
main > section > .tier-table {
  max-width: none;
}

main > article {
  padding: clamp(26px, 4vw, 44px);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ad-wrapper {
  display: grid;
  width: min(100%, 760px);
  min-height: 250px;
  place-items: center;
  margin: 30px auto;
  padding: 12px;
  clear: both;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.ad-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.adsbygoogle {
  width: 100%;
  min-height: 220px;
}

.section-intro {
  max-width: 820px;
  margin: 0 auto 22px;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.58;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 20px;
  padding-inline-start: 0;
  list-style: none;
}

main li {
  min-width: 0;
}

main ul:not(.card-grid):not(.home-hub-grid):not(.home-task-grid) > li,
main ol > li {
  position: relative;
  margin: 10px 0;
  padding: 14px 16px;
  padding-inline-start: 42px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(36, 52, 72, 0.04);
  overflow-wrap: anywhere;
}

main ul:not(.card-grid):not(.home-hub-grid):not(.home-task-grid) > li::before {
  content: "";
  position: absolute;
  top: 23px;
  inset-inline-start: 18px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(15, 159, 141, 0.12);
}

ol {
  counter-reset: step;
}

main ol > li {
  counter-increment: step;
  padding-inline-start: 58px;
}

main ol > li::before {
  content: counter(step);
  position: absolute;
  top: 12px;
  inset-inline-start: 14px;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
}

section > ul:last-child,
section > ol:last-child,
section > p:last-child,
article > p:last-child {
  margin-bottom: 0;
}

dl,
.quick-facts-list {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: 0;
  margin: 0 0 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(36, 52, 72, 0.04);
}

dt,
dd,
.quick-facts-list dt,
.quick-facts-list dd {
  min-width: 0;
  margin: 0;
  padding: 13px 16px;
  background: transparent;
  border-bottom: 1px solid var(--line-soft);
  overflow-wrap: anywhere;
}

dt,
.quick-facts-list dt {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

dd,
.quick-facts-list dd {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.42;
}

dt:nth-last-child(2),
dd:last-child,
.quick-facts-list dt:nth-last-child(2),
.quick-facts-list dd:last-child {
  border-bottom: 0;
}

.entity-overview-section {
  padding-top: clamp(30px, 5vw, 48px);
}

.entity-overview {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
  min-width: 0;
}

.entity-overview > div:only-child {
  grid-column: 1 / -1;
}

.entity-media-column,
.entity-facts-column {
  min-width: 0;
}

.entity-facts-column .meta-row {
  margin-top: 0;
}

.entity-media {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 260px;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--blue-soft), var(--teal-soft)),
    var(--page-cool);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.entity-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.entity-media-placeholder span,
.wiki-card-placeholder span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.card-grid,
.home-hub-grid,
.home-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 16px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.home-hub-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.home-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.card-grid > li,
.home-hub-grid > li,
.home-task-grid > li {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.card-grid > li::before,
.home-hub-grid > li::before,
.home-task-grid > li::before {
  display: none;
}

.wiki-card,
.code-card,
.tier-summary-item {
  position: relative;
  min-width: 0;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(36, 52, 72, 0.07);
}

.wiki-card {
  display: grid;
  gap: 11px;
  height: 100%;
  min-height: 178px;
  padding: 18px;
  overflow: hidden;
}

.home-task-card {
  min-height: 178px;
  padding: 20px;
}

.home-task-title {
  margin: 0;
  font-size: clamp(19px, 2vw, 23px);
}

.wiki-card::before,
.code-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal), var(--amber));
}

.wiki-card::after,
.code-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 243, 216, 0.42), transparent 38%);
  opacity: 0;
}

.card-grid > li:nth-child(4n + 1) .wiki-card::before,
.home-hub-grid > li:nth-child(4n + 1) .wiki-card::before,
.home-task-grid > li:nth-child(4n + 1) .wiki-card::before {
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.card-grid > li:nth-child(4n + 2) .wiki-card::before,
.home-hub-grid > li:nth-child(4n + 2) .wiki-card::before,
.home-task-grid > li:nth-child(4n + 2) .wiki-card::before {
  background: linear-gradient(180deg, var(--rose), var(--amber));
}

.card-grid > li:nth-child(4n + 3) .wiki-card::before,
.home-hub-grid > li:nth-child(4n + 3) .wiki-card::before,
.home-task-grid > li:nth-child(4n + 3) .wiki-card::before {
  background: linear-gradient(180deg, var(--violet), var(--blue));
}

.card-grid > li:nth-child(4n) .wiki-card::before,
.home-hub-grid > li:nth-child(4n) .wiki-card::before,
.home-task-grid > li:nth-child(4n) .wiki-card::before {
  background: linear-gradient(180deg, var(--lime), var(--teal));
}

.wiki-card:hover,
.code-card:hover,
.tier-summary-item:hover {
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.wiki-card:hover::after,
.code-card:hover::after {
  opacity: 1;
}

.wiki-card-feature {
  max-width: 760px;
}

.wiki-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  max-height: 220px;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--blue-soft), var(--teal-soft)),
    var(--page-cool);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.wiki-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.wiki-card-title {
  min-width: 0;
  margin: 0;
  color: #17263a;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.section-label {
  margin: 1.4rem 0 .75rem;
  color: var(--color-muted);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wiki-card .wiki-card-title a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  margin-inline-start: -7px;
  color: var(--blue-strong);
  background: rgba(232, 241, 255, 0.66);
  border-radius: 999px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wiki-card .wiki-card-title a::after {
  content: ">";
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.wiki-card .wiki-card-title a:hover {
  color: #ffffff;
  background: var(--blue);
  text-decoration: none;
}

.card-action-row {
  margin: auto 0 0;
  padding-top: 6px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.card-action::after {
  content: ">";
  margin-inline-start: 8px;
  font-size: 13px;
  font-weight: 950;
  opacity: 0.88;
}

.card-action:hover {
  color: #ffffff;
  filter: saturate(1.08);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  text-decoration: none;
  transform: translateY(-1px);
}

.step-list {
  display: grid;
  gap: 12px;
  padding-inline-start: 24px;
}

.step-list li {
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.wiki-card .wiki-card-title a:hover::after {
  color: #ffffff;
  transform: translateX(2px);
}

html[dir="rtl"] .wiki-card .wiki-card-title a::after,
html[dir="rtl"] .card-action::after {
  content: "<";
}

html[dir="rtl"] .wiki-card .wiki-card-title a:hover::after {
  transform: translateX(-2px);
}

.wiki-card-summary {
  min-width: 0;
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.page-hero .meta-row {
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 9px;
  color: #153f7a;
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.badge-muted {
  color: #41625b;
  background: var(--teal-soft);
  border-color: rgba(15, 159, 141, 0.16);
}

.meta-row .badge:nth-child(3n + 1) {
  color: #153f7a;
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.16);
}

.meta-row .badge:nth-child(3n + 2) {
  color: #7d2947;
  background: var(--rose-soft);
  border-color: rgba(194, 65, 107, 0.16);
}

.meta-row .badge:nth-child(3n) {
  color: #41621e;
  background: var(--lime-soft);
  border-color: rgba(77, 143, 36, 0.18);
}

.code-list {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
}

.code-card {
  display: grid;
  gap: 9px;
  padding: 18px 18px 18px 22px;
  overflow: hidden;
}

.code-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.code-value {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.8vw, 38px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.code-reward {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.code-meta {
  color: var(--ink-soft);
}

.code-note {
  max-width: 820px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.copy-button:hover {
  background: var(--blue-strong);
  transform: translateY(-2px) scale(1.01);
}

.tier-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.tier-summary-item {
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, var(--amber-soft));
}

.tier-summary-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 26px;
  line-height: 1;
}

.tier-group:not(:has([data-filter-item]:not([hidden]))) {
  display: none;
}

.tier-table {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(36, 52, 72, 0.06);
}

.tier-row {
  display: grid;
  grid-template-columns: minmax(70px, 0.7fr) minmax(150px, 1.2fr) minmax(0, 3fr);
  gap: 0;
  border-bottom: 1px solid var(--line-soft);
}

.tier-row:last-child {
  border-bottom: 0;
}

.tier-row > span {
  min-width: 0;
  padding: 14px 16px;
  color: var(--ink-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tier-row > span:first-child,
.tier-row > span:nth-child(2) {
  color: #1c2f48;
  font-weight: 800;
}

.tier-head > span {
  color: #385069;
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

footer {
  margin-top: clamp(56px, 8vw, 86px);
  color: var(--ink-muted);
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  border-top: 1px solid var(--line);
}

footer section,
footer nav {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 30px clamp(16px, 3vw, 28px);
}

footer section {
  border-bottom: 1px solid var(--line-soft);
}

footer h2,
.footer-heading {
  color: var(--ink);
}

footer h2 {
  font-size: 24px;
}

.footer-heading {
  max-width: var(--page-width);
  margin: 0 auto 16px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  padding-bottom: 12px;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  color: #123057;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

footer nav a:hover {
  color: var(--blue);
  text-decoration: none;
}

footer ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
}

footer li,
footer li li {
  padding: 0;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow-wrap: anywhere;
}

footer li::before,
footer li li::before {
  display: none;
}

footer li ul {
  display: block;
  margin-top: 8px;
  padding-inline-start: 0;
}

footer li li {
  margin: 4px 0;
  font-size: 14px;
}

footer .site-legal {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 28px) 30px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes card-rise-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  a,
  button,
  .wiki-card,
  .code-card,
  .tier-summary-item,
  .home-hero-actions a,
  main > p > a:only-child,
  section > p > a:only-child {
    transition:
      color 160ms ease,
      background-color 160ms ease,
      border-color 160ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .wiki-card,
  .code-card,
  .tier-summary-item,
  main > section {
    animation: card-rise-in 360ms ease both;
  }

  .card-grid > li:nth-child(2) .wiki-card,
  .home-hub-grid > li:nth-child(2) .wiki-card,
  .home-task-grid > li:nth-child(2) .wiki-card {
    animation-delay: 40ms;
  }

  .card-grid > li:nth-child(3) .wiki-card,
  .home-hub-grid > li:nth-child(3) .wiki-card,
  .home-task-grid > li:nth-child(3) .wiki-card {
    animation-delay: 80ms;
  }

  .card-grid > li:nth-child(4) .wiki-card,
  .home-hub-grid > li:nth-child(4) .wiki-card,
  .home-task-grid > li:nth-child(4) .wiki-card {
    animation-delay: 120ms;
  }
}

@media (max-width: 780px) {
  header nav {
    justify-content: flex-start;
    gap: 7px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  main {
    padding: 34px 14px 0;
  }

  h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  h1 + p,
  .page-hero > p:not(.eyebrow):not(.meta-row),
  .home-hero-summary {
    font-size: 19px;
  }

  .home-hero,
  .page-hero,
  main > section {
    padding: 24px 16px;
  }

  .card-grid,
  .home-hub-grid,
  .home-task-grid {
    grid-template-columns: 1fr;
  }

  .card-grid.hero-tool-results {
    gap: 10px;
  }

  .card-grid.hero-tool-results .wiki-card {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
  }

  .card-grid.hero-tool-results .wiki-card-media {
    width: 86px;
    max-height: none;
  }

  .card-grid.hero-tool-results .wiki-card-summary {
    overflow: visible;
  }

  .filter-group {
    min-width: 100%;
  }

  .entity-overview {
    grid-template-columns: 1fr;
  }

  dl,
  .quick-facts-list {
    grid-template-columns: 1fr;
  }

  dt,
  .quick-facts-list dt {
    padding-bottom: 3px;
    border-bottom: 0;
  }

  dd,
  .quick-facts-list dd {
    padding-top: 3px;
  }

  .tier-head {
    display: none;
  }

  .tier-row {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .tier-row > span {
    padding: 6px 14px;
  }

  .tier-row > span::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .code-card-header {
    align-items: flex-start;
  }

  .copy-button {
    width: 100%;
  }

  main ul:not(.card-grid):not(.home-hub-grid) > li,
  main ol > li {
    padding-inline-end: 14px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  header nav a {
    font-size: 13px;
    min-height: 32px;
    padding: 7px 10px;
  }

  .home-hero,
  .page-hero,
  main > section {
    padding: 22px 14px;
  }

  .wiki-card,
  .code-card {
    padding: 16px;
  }
}
