:root {
  color-scheme: light;
  --base: #eeece8;
  --canvas: #f7f6f3;
  --paper: #fffefa;
  --ink: #242127;
  --muted: #605c62;
  --outline: #e7e2dc;
  --orange: #ffa94f;
  --clay: #a24f24;
  --night: #252229;
  --radius: 22px;
  --gap: clamp(16px, 1.5vw, 24px);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body { margin: 0; color: var(--ink); background: var(--base); font-size: 15px; line-height: 1.55; }
h1,h2,h3,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button,input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #a14c24; outline-offset: 4px; }
.sr-only,.icon-bank { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 12px; background: var(--paper); transform: translateY(-130%); border-radius: 8px; }
.skip-link:focus { transform: none; }

.shell {
  --inset: clamp(12px, 1.5vw, 24px);
  display: grid;
  grid-template-columns: clamp(142px, 13vw, 194px) minmax(0, 1fr);
  gap: var(--gap);
  width: min(100%, 1840px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(var(--inset), env(safe-area-inset-top)) max(var(--inset), env(safe-area-inset-right)) max(var(--inset), env(safe-area-inset-bottom)) max(var(--inset), env(safe-area-inset-left));
}
.rail {
  position: sticky; top: clamp(12px,1.5vw,24px); align-self: start;
  display: flex; flex-direction: column; min-height: min(690px, calc(100svh - 44px));
  border-radius: 25px; padding: 19px 12px 13px; color: #f9f6ef; background: var(--night);
}
.brand { min-height: 54px; display: flex; align-items: center; gap: 9px; padding: 0 4px; }
.brand-icon { width: 39px; height: 39px; border-radius: 13px; background: var(--orange); color: #332116; display: grid; place-items: center; flex: none; }
.brand-icon svg { width: 25px; height: 25px; transform: translateX(-1px); }
.brand strong { display: block; font-size: 20px; font-weight: 800; line-height: 1.22; letter-spacing: -.03em; }
.brand small { display: block; margin-top: 3px; color: #c7bdc6; font: 650 8px/1.2 system-ui, sans-serif; letter-spacing: .13em; }
.rail-nav { display: grid; gap: 7px; margin-top: 27px; }
.rail-link,.rail-history { display: flex; align-items: center; min-height: 47px; gap: 10px; padding: 9px 11px; border-radius: 11px; font-size: 14px; font-weight: 650; }
.rail-link { color: #ebe5ed; }
.rail-link.active { background: #41362f; color: #ffbd7b; }
.rail-link:hover,.rail-history:hover { background: #453c47; color: #fff; }
.rail-link svg,.rail-history svg { width: 19px; height: 19px; }
.rail-history { margin-top: auto; padding-top: 10px; color: #d1c9d2; }
.rail :focus-visible { outline-color: #ffbb77; }

.main { min-width: 0; border-radius: 26px; padding: clamp(15px, 2vw, 27px); background: var(--canvas); border: 1px solid #fffefa; }
.topbar { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.top-title { min-width: max-content; font-size: clamp(17px, 1.45vw, 23px); font-weight: 780; letter-spacing: -.035em; }
.search-form { width: min(43%, 390px); }
.search-field { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--outline); border-radius: 12px; background: #fffefa; color: #777179; }
.search-field:focus-within { border-color: #a14c24; box-shadow: 0 0 0 2px #eac9b3; }
.search-field svg { width: 18px; height: 18px; }
.search-field input { width: 100%; min-width: 0; min-height: 42px; border: 0; background: transparent; outline: 0; color: var(--ink); font-size: 14px; }
.search-field input::placeholder { color: #706a72; }

.dashboard-content {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(210px, 1fr);
  grid-template-areas: "hero overview" "featured updates" "guides plan" "archive reading";
  align-items: start;
  gap: var(--gap);
}
.surface { border: 1px solid var(--outline); background: var(--paper); border-radius: var(--radius); }
.hero { grid-area: hero; position: relative; display: grid; min-height: 300px; align-content: center; overflow: hidden;
  padding: clamp(24px, 3vw, 39px); background: #f6e8d4; border-color: #eadcc8;
}
.hero-copy { position: relative; z-index: 1; max-width: 68%; }
.hero-topic { display: flex; align-items: center; gap: 7px; color: #854124; font-size: 12px; font-weight: 720; letter-spacing: .05em; }
.hero-topic span { width: 8px; height: 8px; background: #b95d28; border-radius: 50%; }
h1 { font-size: clamp(31px, 3.6vw, 62px); font-weight: 860; line-height: 1.15; letter-spacing: -.06em; margin: 11px 0 13px; overflow-wrap: anywhere; }
h1 span { color: #a24f24; }
.hero-deck { max-width: 23em; color: #534940; font-size: 14px; line-height: 1.75; }
.hero-image { position: absolute; z-index: 0; inset: auto -2% -2.5% auto; width: 51%; height: auto; object-fit: contain; pointer-events: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; margin-top: 16px; padding: 9px 13px; border-radius: 11px; background: var(--night); color: #fff6e7; font-size: 14px; font-weight: 690; }
.button:hover { background: #473642; }
.button svg { width: 16px; height: 16px; }

.overview { grid-area: overview; align-self: stretch; display: flex; flex-direction: column; min-height: 300px; padding: 16px; background: #f2efec; }
h2 { font-size: clamp(17px,1.55vw,23px); font-weight: 780; line-height: 1.3; letter-spacing: -.035em; }
.overview h2 { margin: 0 0 11px 2px; }
.overview-link { display: flex; flex: 1; min-width: 0; min-height: 70px; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--outline); border-radius: 13px; background: var(--paper); }
.overview-link + .overview-link { margin-top: 8px; }
.overview-link:hover { border-color: #c99172; }
.access-icon { display: grid; flex: none; width: 35px; height: 35px; place-items: center; border-radius: 10px; }
.access-icon svg { width: 20px; height: 20px; }
.clay { background: #fbe7cd; color: #8a481f; }
.violet { background: #eae5f3; color: #514366; }
.green { background: #e8eee1; color: #365846; }
.access-copy { min-width: 0; }
.access-copy small { display: block; color: var(--muted); font-size: 12px; }
.access-copy strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; font: 780 clamp(20px, 2.1vw, 29px)/1.04 system-ui,sans-serif; letter-spacing: -.04em; }
.access-copy strong span { color: #3b3740; font: 590 12px/1.35 "PingFang SC","Microsoft YaHei",sans-serif; letter-spacing: 0; white-space: nowrap; }
.trailing { width: 17px; height: 17px; margin-left: auto; color: #716369; }

.featured { grid-area: featured; min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 33px; margin-bottom: 10px; }
.subtle-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: #704330; font-size: 13px; font-weight: 670; white-space: nowrap; }
.subtle-link:hover { text-decoration: underline; text-underline-offset: .24em; }
.subtle-link svg { width: 14px; height: 14px; }
.featured-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.feature { min-width: 0; min-height: 175px; padding: 13px; border-radius: 17px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; border: 1px solid #eadbc7; overflow-wrap: anywhere; }
.feature:hover { border-color: #aa6a49; }
.feature.orbit { background: #2b2630; border-color: #2b2630; color: #fcf5f0; background-image: radial-gradient(ellipse at 102% 97%, #67473b64 0%, transparent 65%); }
.feature.orbit:hover { border-color: #e39567; }
.feature.desktop { background: #f6e9d7; }
.feature.notes { background: #ede8f2; border-color: #e3dce9; }
.feature.notes:hover { border-color: #856a94; }
.feature-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.feature-top > span:last-child { font-size: 11px; font-weight: 590; color: #5e5360; text-align: right; }
.orbit .feature-top > span:last-child { color: #e0d3df; }
.feature-top img,.feature-icon { border-radius: 12px; width: 44px; height: 44px; }
.feature-icon { background: #fff9eccc; color: #6e4b33; display: grid; place-items: center; flex: none; }
.feature.notes .feature-icon { background: #faf6fa; color: #604e74; }
.feature h3 { font-size: clamp(15px, 1.55vw, 22px); letter-spacing: -.03em; line-height: 1.3; font-weight: 780; }
.feature p { margin-top: 5px; color: #514955; font-size: 12px; line-height: 1.55; }
.feature.orbit p { color: #e5dce4; }
.feature-end { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #534753; font-size: 12px; font-variant-numeric: tabular-nums; }
.feature.orbit .feature-end { color: #ffc086; }
.feature-end svg { width: 16px; height: 16px; margin-left: auto; }

.updates { grid-area: updates; padding: 13px 14px; align-self: stretch; }
.updates .section-head { min-height: 36px; margin-bottom: 3px; }
.update-link { display: grid; min-height: 45px; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--outline); padding: 5px 0; font-size: 13px; }
.update-link:last-child { border: 0; }
.update-link:hover > span:nth-child(2) { text-decoration: underline; text-underline-offset: .3em; }
.update-link > span:nth-child(2) { font-weight: 680; overflow-wrap: anywhere; }
.update-dot { width: 7px; height: 7px; border-radius: 50%; }
.orange { background: #b85b31; }.sage { background: #577d65; }.lavender { background: #7e6294; }
.version { border-radius: 6px; background: #eeeaf1; color: #4e4058; padding: 3px 5px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-user-text { white-space: pre-line; overflow-wrap: anywhere; }

.guides { grid-area: guides; padding: clamp(12px, 1.6vw, 20px); min-width: 0; }
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.guide-card { display: flex; flex-direction: column; min-width: 0; padding: 12px; gap: 6px; border: 1px solid var(--outline); border-radius: 12px; background: #faf3e8; }
.guide-card:nth-child(2) { background: #f1f4ec; }
.guide-card.guide-compare { background: #f3eef7; }
.guide-card:hover { border-color: #c59172; }
.guide-card-category { color: #824523; font-size: 11px; font-weight: 680; }
.guide-card h3 { font-size: clamp(14px, 1.3vw, 18px); line-height: 1.35; overflow-wrap: anywhere; }
.guide-card p { color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.guide-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; font-size: 11px; color: var(--muted); }
.guide-card-foot svg { width: 15px; height: 15px; color: #8c4927; }
.small-plan { grid-area: plan; padding: 13px 14px 8px; }
.small-plan .section-head { margin-bottom: 3px; }
.small-plan ol { display: grid; list-style: none; padding: 0; margin: 0; }
.small-plan li { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--outline); font-size: 12px; align-items: baseline; }
.small-plan li b { color: #814520; font-size: 11px; font-variant-numeric: tabular-nums; }

.archive { grid-area: archive; min-width: 0; padding: clamp(14px,1.8vw,23px); scroll-margin-top: 12px; }
#dashboard-count { color: var(--muted); font-size: 12px; }
.filter-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.filter-list button,.empty button { min-height: 40px; padding: 6px 11px; border: 1px solid var(--outline); border-radius: 9px; background: #f9f7f4; cursor: pointer; font-size: 12px; font-weight: 620; }
.filter-list button:hover,.empty button:hover { border-color: #bc967e; }
.filter-list button[aria-pressed="true"] { color: #4d2a15; background: #f9e0c5; border-color: #eac9a8; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.work-card { min-width: 0; border: 1px solid var(--outline); border-radius: 12px; background: #faf8f4; scroll-margin-top: 16px; }
.work-card:hover,.work-card:focus-within { border-color: #c59172; }
.work-link { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 125px; padding: 11px; }
.work-kicker { align-self: flex-start; padding-right: 40px; color: #7d4528; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.work-card[data-kind="skills"] .work-kicker { color: #6c497d; }
.work-card[data-kind="notes"] .work-kicker { color: #765638; }
.work-card[data-kind="repositories"] .work-kicker { color: #3e624a; }
.work-link h3 { margin-top: 4px; font-size: 15px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.work-description { color: var(--muted); margin-top: 4px; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.work-meta { margin-top: auto; padding-top: 7px; color: #655b59; font-size: 11px; overflow-wrap: anywhere; }
.work-arrow { position: absolute; top: 8px; right: 10px; color: #874731; font-size: 11px; font-weight: 650; }
.empty { padding: 12px 3px; }
.empty p { margin: 5px 0 8px; color: var(--muted); }

.reading { grid-area: reading; padding: 13px 14px; }
.reading .section-head { margin: 0 0 4px; }
.reading-link { display: grid; gap: 2px; min-height: 80px; padding: 10px; background: #fbf6ee; border: 1px solid var(--outline); border-radius: 11px; }
.reading-link + .reading-link { margin-top: 7px; background: #f6f2f8; }
.reading-link:hover { border-color: #c59172; }
.read-type { color: #844929; font-size: 11px; font-weight: 710; }
.reading-link strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.reading-link small { color: var(--muted); font-size: 11px; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; border-top: 1px solid var(--outline); margin-top: 22px; padding: 10px 0 0; color: var(--muted); font-size: 12px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 3px 13px; }
.footer a { display: inline-flex; align-items: center; min-height: 38px; }
.footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-brand { color: var(--ink); font-weight: 690; }
@media (min-width: 1540px) {
  .hero { min-height: 350px; }
  .overview { min-height: 350px; padding: 21px; }
  .overview-link { min-height: 82px; }
  .hero-image { width: 49%; }
}
@media (max-width: 1100px) and (min-width: 811px) {
  .shell { grid-template-columns: 63px minmax(0,1fr); }
  .rail { padding: 15px 7px 9px; }
  .rail-nav { margin-top: 14px; }
  .brand { min-height: 49px; justify-content: center; padding: 0; }
  .brand > span:last-child,.rail-link span,.rail-history span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rail-link,.rail-history { justify-content: center; padding: 8px; }
  .rail-history { font-size: 0; }
}
@media (max-width: 810px) {
  .shell { display: block; }
  .rail { position: static; display: flex; align-items: center; flex-direction: row; gap: 8px 14px; flex-wrap: wrap; min-height: 0; border-radius: 18px; padding: 7px 10px; margin-bottom: 10px; }
  .brand { min-height: 44px; }
  .brand-icon { width: 33px; height: 33px; border-radius: 9px; }
  .brand-icon svg { width: 22px; height: 22px; }
  .brand strong { font-size: 18px; }
  .rail-nav { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 0 auto; }
  .rail-link { min-height: 42px; padding: 4px 7px; gap: 4px; font-size: 12px; }
  .rail-link svg { width: 15px; height: 15px; }
  .rail-history { display: none; }
  .main { border-radius: 18px; padding: 13px; }
  .dashboard-content { grid-template-columns: minmax(0,1fr); grid-template-areas: "hero" "overview" "featured" "guides" "plan" "archive" "updates" "reading"; gap: 15px; }
  .topbar { margin-bottom: 12px; gap: 8px; }
  .top-title { font-size: 16px; }
  .search-form { width: min(72%,375px); }
  .hero { min-height: 272px; }
  .hero-image { width: 45%; right: 0; bottom: 0; }
  .overview { min-height: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 7px; padding: 11px; }
  .overview h2 { grid-column: 1/-1; margin: 0 0 2px 1px; font-size: 16px; }
  .overview-link { align-items: flex-start; min-height: 65px; padding: 7px; }
  .overview-link + .overview-link { margin: 0; }
  .access-icon { width: 30px; height: 30px; }
  .access-icon svg { width: 16px; height: 16px; }
  .trailing { display: none; }
  .featured-grid { gap: 8px; }
  .feature { min-height: 157px; }
}
@media (min-width: 811px) and (max-width: 1020px) and (max-height: 470px) {
  .hero { min-height: 260px; padding: 20px 22px; }
  .overview { min-height: 260px; padding: 12px; }
  .overview-link { min-height: 60px; }
}
@media (max-width: 520px) {
  .shell { --inset: 8px; }
  .rail { gap: 2px; }
  .rail-nav { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .rail-link { justify-content: center; padding-inline: 4px; min-height: 40px; }
  .rail-link svg { width: 13px; height: 13px; }
  .main { padding: 9px; }
  .topbar { min-height: 37px; }
  .search-field { min-height: 39px; padding-inline: 7px; gap: 3px; }
  .search-field input { min-height: 37px; font-size: 13px; }
  .hero { background: #f6e8d4; min-height: 0; padding: 18px 15px 0; border-radius: 17px; }
  .hero-copy { max-width: none; }
  h1 { margin: 8px 0; font-size: clamp(27px, 8.5vw, 43px); }
  .hero-deck { max-width: 26em; font-size: 13px; }
  .hero .button { margin: 11px 0 2px; }
  .hero-image { position: static; justify-self: end; width: min(88%, 320px); margin: -14px -9px -5px 0; }
  .overview { border-radius: 17px; padding: 8px; gap: 5px; }
  .overview-link { display: grid; gap: 4px; min-height: 86px; border-radius: 10px; }
  .access-icon { width: 25px; height: 25px; border-radius: 7px; }
  .access-copy small { font-size: 10px; }
  .access-copy strong { font-size: 18px; }
  .access-copy strong span { font-size: 10px; }
  .featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feature.orbit { grid-column: 1/-1; min-height: 142px; }
  .feature { padding: 10px; min-height: 140px; }
  .feature-top img,.feature-icon { width: 36px; height: 36px; }
  .feature h3 { font-size: 17px; }
  .guide-cards { grid-template-columns: minmax(0,1fr); }
  .archive { padding: 9px; border-radius: 16px; }
  .filter-list { gap: 4px; }
  .filter-list button { min-height: 38px; padding-inline: 6px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .work-link { min-height: 107px; }
}
@media (max-width: 365px) {
  .rail-link svg { display: none; }
  .search-field input::placeholder { font-size: 12px; }
  .hero-image { margin-top: -5px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
