:root {
  color-scheme: light;
  --ink: #171817;
  --muted: #5c625f;
  --quiet: #737b78;
  --paper: #faf9f5;
  --card: #ffffff;
  --soft: #f1f2ee;
  --line: #d6d8d2;
  --strong-line: #9ca39f;
  --teal: #176f73;
  --orange: #a94f36;
  --blue: #305ea7;
  --serif: Iowan Old Style, Baskerville, Georgia, Times New Roman, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.portal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(250,249,245,.96);
  backdrop-filter: blur(14px);
}
.portal-brand { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.portal-nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 12px; font-weight: 680; }
.portal-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 9px; }
.portal-nav .github-link { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }

.portal-main { min-height: calc(100vh - 72px); }
.portal-container { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.portal-hero { padding: 82px 0 54px; border-bottom: 1px solid var(--line); }
.portal-kicker { margin: 0 0 16px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.portal-hero h1 { max-width: 18ch; margin: 0; font-family: var(--serif); font-size: clamp(48px, 6vw, 84px); font-weight: 500; letter-spacing: -.045em; line-height: .98; text-wrap: balance; }
.portal-hero > .portal-container > p:not(.portal-kicker) { max-width: 790px; margin: 26px 0 0; color: var(--muted); font-family: var(--serif); font-size: clamp(19px, 2vw, 27px); line-height: 1.48; }
.portal-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; color: var(--quiet); font-size: 11px; }
.portal-meta strong { color: var(--teal); }

.portal-section { padding: 70px 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: .72fr 1.28fr; gap: 62px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 55px); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
.section-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.view-tabs { display: flex; gap: 8px; margin: 24px 0; }
.view-tab { padding: 9px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 700; }
.view-tab.active { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -2px var(--orange); }

.taxonomy-strip { display: flex; height: 52px; margin-top: 28px; overflow: hidden; border-radius: 8px; }
.taxonomy-strip span { display: grid; min-width: 62px; place-items: center; padding-inline: 10px; color: #fff; font-size: 10px; font-weight: 760; text-align: center; }
.taxonomy-strip span:nth-child(1) { flex: 62; background: #295d83; }
.taxonomy-strip span:nth-child(2) { flex: 46; background: #27806d; }
.taxonomy-strip span:nth-child(3) { flex: 113; background: #4d69ad; }
.taxonomy-strip span:nth-child(4) { flex: 80; background: #6b73ad; }
.taxonomy-strip span:nth-child(5) { flex: 16; background: #755da4; }
.taxonomy-strip span:nth-child(6) { flex: 69; background: #a44e71; }
.taxonomy-strip span:nth-child(7) { flex: 80; background: #a85b3e; }

.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; border-top: 1px solid var(--ink); }
.task-card { min-height: 258px; padding: 26px 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.task-card:nth-child(even) { border-right: 0; }
.task-card:last-child { grid-column: 1 / -1; border-right: 0; }
.task-card-top { display: flex; justify-content: space-between; gap: 18px; color: var(--quiet); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.task-card h3 { margin: 25px 0 0; font-family: var(--serif); font-size: 27px; font-weight: 550; letter-spacing: -.025em; }
.task-card .count { display: block; margin-top: 7px; color: var(--teal); font-family: var(--mono); font-size: 11px; }
.task-card p { min-height: 44px; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.task-example { display: inline-block; max-width: 100%; margin-top: 18px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #454c49; font-family: var(--mono); font-size: 9px; }
.split-mini { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3px; margin-top: 18px; }
.split-mini span { padding: 7px 6px; background: var(--soft); color: var(--quiet); font-family: var(--mono); font-size: 8px; text-align: center; text-transform: uppercase; }

.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 30px; border-block: 1px solid var(--ink); }
.skill-card { min-height: 310px; padding: 25px 22px; border-left: 1px solid var(--line); }
.skill-card:last-child { border-right: 1px solid var(--line); }
.skill-index { color: var(--orange); font-family: var(--mono); font-size: 9px; }
.skill-icon { display: grid; width: 48px; height: 48px; margin-top: 34px; place-items: center; border: 1px solid var(--strong-line); border-radius: 12px; background: #fff; color: var(--teal); font-family: var(--serif); font-size: 24px; }
.skill-card h3 { margin: 20px 0 0; font-family: var(--serif); font-size: 25px; font-weight: 550; }
.skill-card p { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.skill-list { margin: 18px 0 0; padding: 0; list-style: none; color: var(--quiet); font-family: var(--mono); font-size: 9px; line-height: 1.9; }
.skill-list li::before { margin-right: 7px; color: var(--orange); content: "+"; }

.plot-shell { margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.plot-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 18px; }
.plot-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.control-chip { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--paper); font-size: 10px; font-weight: 680; }
.control-chip.active { border-color: var(--teal); color: var(--teal); }
.illustrative-tag { padding: 8px 11px; border: 1px dashed #d39b86; border-radius: 7px; color: var(--orange); font-family: var(--mono); font-size: 9px; }
.leaderboard-plot { display: block; width: 100%; height: auto; }
.plot-caption { display: flex; gap: 20px; justify-content: space-between; margin-top: 14px; color: var(--quiet); font-size: 10px; line-height: 1.55; }
.plot-caption strong { color: var(--ink); }

.leader-table-wrap { margin-top: 34px; overflow-x: auto; }
.leader-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.leader-table th { padding: 12px 10px; border-block: 1px solid var(--ink); color: var(--quiet); font-size: 9px; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.leader-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); }
.leader-table td:not(:first-child), .leader-table th:not(:first-child) { text-align: center; }
.rank { color: var(--orange); font-family: var(--mono); font-weight: 800; }
.pending-value { color: #9b9f9d; }

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 72px; align-items: start; padding: 64px 0 92px; }
.docs-toc { position: sticky; top: 104px; padding: 18px 0; border-block: 1px solid var(--line); }
.docs-toc strong { display: block; margin-bottom: 12px; color: var(--quiet); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.docs-toc a { display: block; padding: 7px 0; color: var(--muted); font-size: 11px; }
.docs-article section { padding: 0 0 50px; scroll-margin-top: 96px; }
.docs-article h1 { margin: 0 0 28px; font-family: var(--serif); font-size: clamp(44px, 5vw, 70px); font-weight: 500; letter-spacing: -.04em; }
.docs-article h2 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.docs-article h3 { margin: 28px 0 10px; font-family: var(--serif); font-size: 22px; }
.docs-article p, .docs-article li { color: var(--muted); font-size: 13px; line-height: 1.75; }
.docs-article code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-family: var(--mono); font-size: .9em; }
.docs-note { margin: 20px 0; padding: 16px 18px; border-left: 3px solid var(--orange); background: #f3ede7; color: #574b45; font-size: 12px; line-height: 1.65; }
.protocol-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 24px 0; }
.protocol-flow div { position: relative; min-height: 110px; padding: 16px 12px; border: 1px solid var(--line); background: #fff; }
.protocol-flow b, .protocol-flow span { display: block; }
.protocol-flow b { font-family: var(--serif); font-size: 16px; }
.protocol-flow span { margin-top: 8px; color: var(--quiet); font-size: 9px; line-height: 1.5; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.registry-main { background: #f8f8fa; }
.registry-mast { padding: 54px 0 46px; border-bottom: 1px solid #e1e3e6; background: #fbfbfc; }
.registry-status { display: flex; align-items: center; gap: 11px; color: #646a6f; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.status-check { display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #149447; border-radius: 50%; color: #149447; font-size: 11px; font-weight: 900; }
.version-pill { margin-left: 3px; padding: 6px 10px; border-radius: 999px; background: #f1f2f3; color: #26292b; font-size: 10px; font-weight: 750; letter-spacing: .02em; text-transform: none; }
.registry-title-row { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 72px; align-items: end; margin-top: 40px; }
.registry-title-row h1 { max-width: 780px; margin: 0; font-family: var(--serif); font-size: clamp(44px, 5.2vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1; text-wrap: balance; }
.registry-title-row p { margin: 0 0 4px; color: #62686d; font-size: 14px; line-height: 1.75; }
.registry-actions { display: flex; gap: 12px; margin-top: 30px; }
.registry-action { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 21px; border: 1px solid #d8dadd; border-radius: 999px; background: #fff; color: #25282a; font-size: 11px; font-weight: 720; }
.registry-action.primary { border-color: #1d1f20; background: #1d1f20; color: #fff; }
.registry-action:hover { text-decoration: none; transform: translateY(-1px); }
.registry-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 44px; border: 1px solid #dfe1e4; border-radius: 13px; background: #fff; }
.registry-totals div { display: flex; min-height: 82px; align-items: baseline; gap: 10px; padding: 23px 24px; border-left: 1px solid #e2e4e6; }
.registry-totals div:first-child { border-left: 0; }
.registry-totals strong { color: #202325; font-family: var(--mono); font-size: 24px; font-weight: 650; }
.registry-totals span { color: #72787c; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }

.domain-browser, .skill-browser { padding: 62px 0; border-bottom: 1px solid #e0e2e4; background: #fff; }
.registry-section-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 64px; align-items: end; }
.registry-section-head h2 { max-width: 680px; margin: 0; font-family: var(--serif); font-size: clamp(35px, 4vw, 52px); font-weight: 500; letter-spacing: -.035em; line-height: 1.04; }
.registry-section-head > p { max-width: 650px; margin: 0; color: #686e72; font-size: 13px; line-height: 1.7; }
.domain-button-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 34px; }
.domain-button { --domain-color: #747b80; display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border: 1px solid #dfe1e4; border-left: 4px solid var(--domain-color); border-radius: 10px; background: #fbfbfc; color: #4f5559; font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.domain-button:hover { border-color: #aeb3b7; background: #fff; transform: translateY(-1px); }
.domain-button.active { border-color: var(--domain-color); background: #fff; box-shadow: 0 5px 18px rgba(25,29,32,.07); }
.domain-button span { max-width: 145px; font-size: 11px; font-weight: 720; line-height: 1.3; }
.domain-button strong { color: var(--domain-color); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.domain-button.terminal { --domain-color: #295d83; }
.domain-button.environment { --domain-color: #27806d; }
.domain-button.crafted { --domain-color: #4d69ad; }
.domain-button.public { --domain-color: #6b73ad; }
.domain-button.science { --domain-color: #755da4; }
.domain-button.frontier { --domain-color: #a44e71; }
.domain-button.reconstruction { --domain-color: #a85b3e; }

.difficulty-controls { display: flex; gap: 8px; margin: 34px 0 12px; }
.difficulty-controls button { padding: 9px 15px; border: 0; border-radius: 999px; background: #f0f1f2; color: #747a7e; font: 650 10px var(--sans); cursor: pointer; }
.difficulty-controls button.active { background: #1e2021; color: #fff; }
.difficulty-analysis-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); overflow: hidden; border: 1px solid #dfe1e4; border-radius: 16px; background: #fff; }
.radar-wrap { min-height: 540px; padding: 18px; border-right: 1px solid #e2e4e6; }
#difficulty-radar { display: block; width: 100%; height: 500px; overflow: visible; }
.radar-ring { fill: none; stroke: #e2e4e6; stroke-width: 1; }
.radar-axis { stroke: #e0e2e4; stroke-width: 1; }
.radar-label { cursor: pointer; outline: none; }
.radar-label text { fill: #686e72; font: 10px var(--sans); }
.radar-label:hover text, .radar-label:focus text { fill: #161819; font-weight: 750; }
.radar-label .radar-label-count { fill: #9a9fa2; font: 8px var(--mono); }
.difficulty-inspector { padding: 48px 38px 30px; }
.difficulty-inspector header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid #e2e4e6; }
.difficulty-inspector h3 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 550; letter-spacing: -.025em; }
.difficulty-inspector header > strong { color: #6b7175; font: 10px var(--mono); white-space: nowrap; }
.difficulty-row { --difficulty-color: #7f8790; margin-top: 25px; }
.difficulty-row.easy { --difficulty-color: #42a96b; }.difficulty-row.medium { --difficulty-color: #e8a23b; }.difficulty-row.hard { --difficulty-color: #dc6259; }.difficulty-row.unrated { --difficulty-color: #7f8790; }
.difficulty-row div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.difficulty-row span { grid-column: 1 / -1; height: 10px; overflow: hidden; border-radius: 999px; background: #f0f1f2; }
.difficulty-row i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--difficulty-color); transition: width .25s ease; }
.difficulty-row b { grid-column: 1; grid-row: 1; color: #5f6569; font-size: 11px; font-weight: 600; }
.difficulty-row strong { grid-column: 3; grid-row: 1; color: #5f6569; font: 10px var(--mono); }
.show-domain-tasks { width: 100%; height: 43px; margin-top: 30px; border: 1px solid #d5d8da; border-radius: 8px; background: #fff; color: #242728; font: 700 10px var(--sans); cursor: pointer; }
.difficulty-inspector > p { margin: 18px 0 0; color: #8a8f92; font-size: 9px; line-height: 1.65; }
.difficulty-legend { grid-column: 1 / -1; display: flex; min-height: 58px; align-items: center; gap: 23px; padding: 0 28px; border-top: 1px solid #e2e4e6; color: #73797d; font-size: 10px; }
.difficulty-legend strong { color: #323638; }
.difficulty-legend span { display: inline-flex; align-items: center; gap: 6px; }
.difficulty-legend i { width: 9px; height: 9px; border-radius: 50%; }
.easy-dot { background: #42a96b; }.medium-dot { background: #e8a23b; }.hard-dot { background: #dc6259; }.unrated-dot { background: #7f8790; }
.difficulty-legend small { margin-left: auto; color: #9a9fa2; }

.task-explorer { padding: 64px 0 82px; scroll-margin-top: 74px; background: #f8f8fa; }
.explorer-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.explorer-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.2vw, 56px); font-weight: 500; letter-spacing: -.04em; }
.verified-label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #67706b; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.verified-label span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #149447; border-radius: 50%; color: #149447; }
.catalog-controls { display: grid; grid-template-columns: minmax(310px, 2.1fr) repeat(3, minmax(160px, 1fr)); gap: 14px; margin-top: 34px; }
.catalog-controls label { position: relative; display: block; }
.catalog-controls input, .catalog-controls select { width: 100%; height: 58px; padding: 0 18px; border: 1px solid #d9dcdf; border-radius: 12px; outline: none; background-color: #fff; color: #232628; font: 500 13px var(--sans); transition: border-color .15s ease, box-shadow .15s ease; }
.catalog-controls input { padding-left: 51px; }
.catalog-controls input::placeholder { color: #8a8f93; }
.catalog-controls select { appearance: none; padding-right: 42px; background-image: linear-gradient(45deg,transparent 50%,#73797e 50%),linear-gradient(135deg,#73797e 50%,transparent 50%); background-position: calc(100% - 20px) 25px,calc(100% - 15px) 25px; background-repeat: no-repeat; background-size: 5px 5px,5px 5px; }
.catalog-controls input:focus, .catalog-controls select:focus { border-color: #5268b3; box-shadow: 0 0 0 3px rgba(82,104,179,.12); }
.search-mark { position: absolute; z-index: 1; top: 19px; left: 19px; width: 17px; height: 17px; border: 2px solid #71777c; border-radius: 50%; pointer-events: none; }
.search-mark::after { position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; background: #71777c; content: ""; transform: rotate(45deg); transform-origin: left center; }
.catalog-state { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 30px 0 15px; padding-bottom: 14px; border-bottom: 1px solid #dfe1e4; color: #777d81; font-size: 10px; }
.catalog-state p { margin: 0; color: #42474a; font-weight: 700; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.catalog-card { --domain-accent: #6c7479; display: flex; min-width: 0; min-height: 338px; flex-direction: column; overflow: hidden; border: 1px solid #dcdee1; border-top: 3px solid var(--domain-accent); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(18,22,25,.02); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.catalog-card:hover { border-color: #b9bdc1; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23,27,30,.07); }
.catalog-card[data-domain="terminal"] { --domain-accent: #295d83; }
.catalog-card[data-domain="environment-learning"] { --domain-accent: #27806d; }
.catalog-card[data-domain="crafted-swe"] { --domain-accent: #4d69ad; }
.catalog-card[data-domain="public-swe"] { --domain-accent: #6b73ad; }
.catalog-card[data-domain="science"] { --domain-accent: #755da4; }
.catalog-card[data-domain="frontier"] { --domain-accent: #a44e71; }
.catalog-card[data-domain="repo-reconstruction"] { --domain-accent: #a85b3e; }
.catalog-card { color: inherit; text-decoration: none; }
.catalog-card:hover { text-decoration: none; }
.catalog-card-heading { display: flex; gap: 18px; align-items: start; justify-content: space-between; padding: 25px 22px 0 26px; }
.catalog-card h3 { margin: 0; padding: 0; font-size: 18px; font-weight: 760; letter-spacing: -.018em; line-height: 1.3; overflow-wrap: anywhere; }
.catalog-open { flex: none; color: #8b9094; font-size: 16px; transition: color .15s ease, transform .15s ease; }
.catalog-card:hover .catalog-open { color: #2d3234; transform: translate(2px,-2px); }
.catalog-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 17px 26px 0; }
.catalog-chip { display: inline-flex; min-width: 0; align-items: center; padding: 5px 9px; overflow: hidden; border: 1px solid #dee0e2; border-radius: 999px; background: #fff; color: #666c70; font-size: 9px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.catalog-chip.domain-chip { border-color: color-mix(in srgb, var(--domain-accent) 35%, #fff); color: var(--domain-accent); }
.catalog-chip.train-chip { border-color: #b9dec6; background: #f1faf4; color: #267541; }
.catalog-chip.difficulty-chip.easy { border-color: #a9d9b8; background: #f1faf4; color: #267541; }
.catalog-chip.difficulty-chip.medium { border-color: #f0cea0; background: #fff8ed; color: #a35f00; }
.catalog-chip.difficulty-chip.hard { border-color: #efb3ae; background: #fff2f1; color: #b33b34; }
.catalog-chip.difficulty-chip.unrated { border-color: #d2d5d7; background: #f5f6f6; color: #676e72; }
.catalog-card > p { display: -webkit-box; margin: 22px 26px 26px; overflow: hidden; color: #6a7074; font-size: 12px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.catalog-card footer { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding: 15px 18px 15px 26px; border-top: 1px solid #e2e4e6; background: #fdfdfd; }
.catalog-files { display: flex; min-width: 0; align-items: center; gap: 7px; }
.catalog-files code { max-width: 132px; overflow: hidden; color: #72787c; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.catalog-source { flex: none; color: #646a6e; font-size: 9px; font-weight: 650; }
.catalog-empty { padding: 54px 20px; border: 1px dashed #cfd2d5; border-radius: 12px; background: #fff; color: #71777b; text-align: center; }
.task-more { display: block; min-width: 190px; height: 48px; margin: 30px auto 0; border: 1px solid #b9bdc0; border-radius: 9px; background: #fff; color: #34383a; font: 700 11px var(--sans); cursor: pointer; }
.task-more:hover { border-color: #5d6468; }

.skill-browser { background: #fbfbfc; }
.skill-catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; overflow: hidden; border: 1px solid #dadddf; border-radius: 14px; background: #fff; }
.skill-catalog-card { display: grid; min-height: 330px; grid-template-rows: auto auto auto 1fr; gap: 18px; padding: 25px 23px; border-left: 1px solid #e0e2e4; }
.skill-catalog-card:first-child { border-left: 0; }
.skill-number { color: #a94f36; font: 10px var(--mono); }
.skill-symbol { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #aeb4b7; border-radius: 13px; background: #fafbfb; color: #176f73; font: 25px var(--serif); }
.skill-catalog-card h3 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 550; }
.skill-catalog-card p { margin: 8px 0 0; color: #686e72; font-size: 11px; line-height: 1.65; }
.skill-catalog-card ul { align-self: end; margin: 0; padding: 0; list-style: none; color: #73797d; font: 9px/1.9 var(--mono); }
.skill-catalog-card li::before { margin-right: 7px; color: #a94f36; content: "+"; }

.task-detail-main { padding: 104px 0 80px; background: #f8f8fa; }
.task-breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; color: #7b8185; font-size: 10px; }
.task-breadcrumbs span:last-child { max-width: 520px; overflow: hidden; color: #4d5356; text-overflow: ellipsis; white-space: nowrap; }
.task-detail-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 72px; align-items: start; padding: 46px 0 58px; border-bottom: 1px solid #d8dadd; }
.task-detail-title .catalog-chips { padding: 0; }
.task-detail-title .domain-chip { border-color: #bfd1d2; color: #176f73; }
.task-detail-title h1 { max-width: 850px; margin: 25px 0 0; font-family: var(--serif); font-size: clamp(48px, 6vw, 78px); font-weight: 500; letter-spacing: -.05em; line-height: .98; overflow-wrap: anywhere; }
.task-detail-title > p { max-width: 780px; margin: 28px 0 0; color: #5f6569; font-family: var(--serif); font-size: 20px; line-height: 1.58; }
.task-facts { margin: 0; overflow: hidden; border: 1px solid #d9dcde; border-radius: 13px; background: #fff; }
.task-facts div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 14px; padding: 13px 16px; border-top: 1px solid #e3e5e6; }
.task-facts div:first-child { border-top: 0; }
.task-facts dt { color: #888e91; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.task-facts dd { min-width: 0; margin: 0; color: #404548; font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.task-facts code { font: 8px/1.45 var(--mono); }
.task-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 70px; align-items: start; padding: 64px 0; }
.task-brief section { padding: 0 0 44px; }
.task-brief section + section { padding-top: 40px; border-top: 1px solid #dfe1e3; }
.task-brief h2, .task-source-panel h2 { margin: 0; font-family: var(--serif); font-size: 35px; font-weight: 500; letter-spacing: -.025em; }
.task-brief section > p:last-child, .task-source-panel > p:not(.portal-kicker) { color: #62686c; font-size: 13px; line-height: 1.8; }
.task-source-panel { position: sticky; top: 100px; padding: 26px; border: 1px solid #dadddf; border-radius: 13px; background: #fff; }
.task-source-link { display: flex; min-height: 44px; align-items: center; justify-content: center; margin-top: 22px; border-radius: 8px; background: #1d2021; color: #fff; font-size: 10px; font-weight: 730; }
.task-source-link:hover { text-decoration: none; }
.task-source-panel > code { display: block; margin-top: 18px; padding: 12px; overflow-wrap: anywhere; border: 1px solid #e1e3e5; background: #f7f8f8; color: #777d81; font: 8px/1.6 var(--mono); }
.task-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid #d8dadd; }
.task-neighbors a { min-height: 112px; padding: 25px 0; }
.task-neighbors a:last-child { padding-left: 32px; border-left: 1px solid #d8dadd; text-align: right; }
.task-neighbors small, .task-neighbors strong { display: block; }
.task-neighbors small { color: #858b8f; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.task-neighbors strong { margin-top: 10px; font-family: var(--serif); font-size: 18px; font-weight: 550; }

.portal-footer { display: flex; gap: 24px; justify-content: space-between; padding: 32px max(24px, calc((100vw - 1240px) / 2)) 46px; color: var(--quiet); font-size: 10px; }
.portal-footer nav { display: flex; gap: 18px; }

@media (max-width: 900px) {
  .portal-header { padding-inline: 20px; }
  .portal-nav { max-width: calc(100vw - 150px); gap: 15px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .portal-nav::-webkit-scrollbar { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 18px; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-card:nth-child(3) { border-top: 1px solid var(--line); }
  .skill-card:nth-child(4) { border-top: 1px solid var(--line); }
  .docs-layout { grid-template-columns: 1fr; gap: 36px; }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 5px 16px; }
  .docs-toc strong { width: 100%; }
  .protocol-flow { grid-template-columns: 1fr; }
  .registry-title-row, .registry-section-head { grid-template-columns: 1fr; gap: 22px; }
  .registry-totals { grid-template-columns: repeat(2, 1fr); }
  .registry-totals div:nth-child(3) { border-left: 0; border-top: 1px solid #e2e4e6; }
  .registry-totals div:nth-child(4) { border-top: 1px solid #e2e4e6; }
  .domain-button-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .difficulty-analysis-card { grid-template-columns: 1fr; }
  .radar-wrap { border-right: 0; border-bottom: 1px solid #e2e4e6; }
  .catalog-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-control { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-catalog-card:nth-child(3) { border-top: 1px solid #e0e2e4; border-left: 0; }
  .skill-catalog-card:nth-child(4) { border-top: 1px solid #e0e2e4; }
  .task-detail-hero, .task-detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .task-source-panel { position: static; }
}

@media (max-width: 600px) {
  .portal-header { height: 64px; }
  .portal-brand { font-size: 17px; }
  .portal-container { width: calc(100% - 32px); }
  .portal-hero { padding: 54px 0 38px; }
  .portal-hero h1 { font-size: 46px; }
  .portal-section { padding: 54px 0; }
  .task-grid, .skill-grid { grid-template-columns: 1fr; }
  .task-card, .task-card:nth-child(even), .skill-card, .skill-card:last-child { border-right: 0; }
  .task-card:last-child { grid-column: auto; }
  .skill-card + .skill-card { border-top: 1px solid var(--line); }
  .taxonomy-strip { height: auto; flex-wrap: wrap; border-radius: 0; }
  .taxonomy-strip span { flex: 1 1 44% !important; min-height: 46px; }
  .plot-shell { padding: 12px; }
  .plot-caption, .portal-footer { display: block; }
  .portal-footer nav { margin-top: 12px; }
  .registry-mast { padding: 38px 0; }
  .registry-title-row { margin-top: 28px; }
  .registry-title-row h1 { font-size: 43px; }
  .registry-actions { display: grid; grid-template-columns: 1fr; }
  .registry-totals div { display: block; min-height: 76px; padding: 18px; }
  .registry-totals span { display: block; margin-top: 5px; }
  .domain-browser, .skill-browser, .task-explorer { padding: 48px 0; }
  .domain-button-grid, .catalog-controls, .catalog-grid, .skill-catalog-grid { grid-template-columns: 1fr; }
  .difficulty-controls { overflow-x: auto; padding-bottom: 4px; }
  .difficulty-controls button { flex: none; }
  .difficulty-analysis-card { overflow: visible; }
  .radar-wrap { min-height: 390px; padding: 0; overflow-x: auto; }
  #difficulty-radar { min-width: 540px; height: 390px; }
  .difficulty-inspector { padding: 30px 20px 24px; }
  .difficulty-legend { flex-wrap: wrap; gap: 11px 18px; padding: 16px 20px; }
  .difficulty-legend small { width: 100%; margin-left: 0; }
  .search-control { grid-column: auto; }
  .explorer-heading, .catalog-state { display: block; }
  .verified-label, .catalog-state > span { margin-top: 12px; }
  .skill-catalog-card, .skill-catalog-card:nth-child(3) { border-top: 1px solid #e0e2e4; border-left: 0; }
  .skill-catalog-card:first-child { border-top: 0; }
  .task-detail-main { padding: 50px 0 60px; }
  .task-detail-hero { padding-top: 30px; }
  .task-detail-title h1 { font-size: 45px; }
  .task-detail-title > p { font-size: 17px; }
  .task-facts div { grid-template-columns: 105px minmax(0, 1fr); }
  .task-neighbors { grid-template-columns: 1fr; }
  .task-neighbors a:last-child { padding-left: 0; border-top: 1px solid #d8dadd; border-left: 0; text-align: left; }
}
