:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18332f;
  background: #f5f7f2;
  font-synthesis: none;
  --ink: #18332f;
  --forest: #173d34;
  --forest-2: #255849;
  --lime: #b7e873;
  --sage: #dfead9;
  --paper: #fffefb;
  --line: #dfe7dd;
  --muted: #70847a;
  --amber: #e7b876;
  --shadow: 0 14px 40px rgba(24, 51, 47, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.top-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; gap: 12px; align-items: center; color: #173a33; text-decoration: none; font-size: 18px; font-weight: 850; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 1px; font-size: 9px; letter-spacing: .24em; color: #82978d; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--forest); color: #fff; font-size: 21px; }
.brand-mark span { color: var(--lime); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions .privacy { margin-right: 10px; }
.privacy { color: #56766b; font-size: 12px; }
.app-link { color: var(--forest); text-decoration: none; border: 1px solid #cfdcd1; border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 800; }
.app-link:hover { background: #edf4e9; }

.hero { min-height: 340px; margin: 32px 0 44px; padding: 52px 58px; border-radius: 30px; background: var(--forest); color: #fff; display: flex; justify-content: space-between; gap: 40px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: -130px; bottom: -190px; border-radius: 50%; background: rgba(183,232,115,.11); }
.hero-copy { position: relative; z-index: 2; max-width: 690px; }
.eyebrow { font-size: 11px; font-weight: 850; letter-spacing: .18em; color: #6d9a70; }
.hero .eyebrow { color: var(--lime); }
.hero h1 { font-size: clamp(42px, 6vw, 68px); line-height: 1.02; letter-spacing: -.068em; margin: 16px 0 18px; }
.hero em { color: var(--lime); font-style: normal; }
.hero p { max-width: 650px; margin: 0; color: #c5d8cd; line-height: 1.6; font-size: 16px; }
.hero-meta { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }
.hero-meta span { border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.06); border-radius: 999px; padding: 9px 13px; color: #bed0c7; font-size: 12px; }
.hero-meta strong { color: #fff; font-size: 15px; margin-right: 4px; }
.hero-art { width: 300px; min-width: 300px; position: relative; display: grid; place-items: center; z-index: 1; }
.book-shape { position: absolute; width: 118px; height: 185px; border-radius: 7px 14px 14px 7px; border-left: 8px solid rgba(0,0,0,.12); box-shadow: 0 18px 30px rgba(0,0,0,.18); }
.book-one { background: #b7e873; transform: rotate(-16deg) translate(-55px, 4px); }
.book-two { background: #e7b876; transform: rotate(9deg) translate(42px, 10px); }
.book-three { width: 105px; height: 166px; background: #a6d3bb; transform: rotate(-2deg) translate(0, -20px); }
.art-word { position: relative; z-index: 2; color: #173d34; text-align: center; font-weight: 950; letter-spacing: .12em; line-height: 1.35; transform: translateY(-18px); }
.art-word b { font-size: 20px; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.section-head h2 { margin: 7px 0 4px; font-size: clamp(29px, 4vw, 40px); letter-spacing: -.05em; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.button { border: 0; border-radius: 11px; padding: 12px 18px; font-weight: 800; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.ghost { background: #e7f0e4; color: #245345; }
.secondary { background: var(--forest); color: #fff; }

.toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 170px 230px; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.search-field { display: flex; align-items: center; gap: 10px; background: #f8faf6; border: 1px solid #dce7dc; border-radius: 12px; padding: 0 13px; color: #688076; }
.search-field span { font-size: 23px; transform: rotate(-18deg); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; padding: 13px 0; color: var(--ink); }
.select-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: #657b71; font-size: 11px; font-weight: 800; background: #f8faf6; border: 1px solid #dce7dc; border-radius: 12px; padding: 0 10px 0 13px; }
.select-field select { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 13px 0; font-size: 12px; font-weight: 750; }

.category-filters { display: flex; gap: 8px; margin: 18px 0; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.category-filter { white-space: nowrap; border: 1px solid #d6e2d5; background: #fff; color: #547064; border-radius: 999px; padding: 10px 14px; font-size: 12px; font-weight: 800; }
.category-filter span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #edf3eb; font-size: 10px; }
.category-filter.active { background: var(--forest); color: #fff; border-color: var(--forest); }
.category-filter.active span { background: rgba(255,255,255,.15); }

.progress-card { display: grid; grid-template-columns: 230px minmax(220px,1fr) 200px; align-items: center; gap: 20px; padding: 20px 22px; background: #e9f2e4; border: 1px solid #d5e4ce; border-radius: 17px; margin-bottom: 30px; }
.progress-card strong { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -.035em; }
.progress-track { height: 10px; border-radius: 999px; background: rgba(23,61,52,.12); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--forest); transition: width .25s ease; }
.progress-side { text-align: right; color: #567066; font-size: 12px; font-weight: 750; }

.book-groups { display: grid; gap: 38px; }
.book-group { scroll-margin-top: 100px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid #dce5da; margin-bottom: 15px; padding-bottom: 12px; }
.group-head h3 { margin: 0; font-size: 24px; letter-spacing: -.045em; }
.group-head span { color: var(--muted); font-size: 12px; font-weight: 750; }
.category-nuggets { --accent: #6f9f64; display: grid; grid-template-columns: 185px 1fr; gap: 22px; margin: 0 0 15px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--accent) 28%, #dfe7dd); border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, #fffefb); }
.nugget-label { color: color-mix(in srgb, var(--accent) 80%, #173d34); font-size: 10px; font-weight: 900; letter-spacing: .15em; line-height: 1.5; }
.nugget-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.nugget-side p { margin: 0; color: #6b7e75; font-size: 11px; line-height: 1.45; }
.nugget-context-link { color: color-mix(in srgb, var(--accent) 76%, #173d34); font-size: 11px; font-weight: 850; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 42%, transparent); padding-bottom: 2px; }
.nugget-context-link:hover { color: var(--forest); border-color: var(--forest); }
.category-nuggets ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: nuggets; }
.category-nuggets li { position: relative; padding-left: 28px; color: #49635a; font-size: 11px; line-height: 1.52; counter-increment: nuggets; }
.category-nuggets li::before { content: counter(nuggets); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 9px; font-weight: 900; }
.book-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.book-card { --accent: #7ca66a; min-height: 136px; display: grid; grid-template-columns: 6px 1fr auto; gap: 16px; align-items: stretch; background: var(--paper); border: 1px solid #e0e7de; border-radius: 16px; padding: 17px 17px 17px 0; box-shadow: 0 7px 24px rgba(24,51,47,.045); }
.book-card::before { content: ""; background: var(--accent); border-radius: 0 999px 999px 0; }
.book-card[data-status="reading"] { background: #fffaf1; border-color: #ead8b8; }
.book-card[data-status="read"] { background: #f0f6ec; border-color: #cfdfc8; }
.book-main { min-width: 0; padding: 2px 0; }
.book-number { color: #91a198; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.book-main h4 { margin: 6px 0 4px; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; }
.book-author { margin: 0; color: #60776d; font-size: 12px; }
.book-note { margin: 10px 0 0; color: #71837a; font-size: 11px; line-height: 1.45; }
.book-insights { margin-top: 12px; border-top: 1px solid #e5ebe2; padding-top: 10px; }
.book-insights summary { width: fit-content; color: #315f50; font-size: 11px; font-weight: 850; cursor: pointer; list-style: none; }
.book-insights summary::-webkit-details-marker { display: none; }
.book-insights summary::before { content: "+"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 7px; border-radius: 50%; background: #e5f0df; color: #315f50; font-size: 13px; vertical-align: -1px; }
.book-insights[open] summary::before { content: "–"; }
.book-insights ol { display: grid; gap: 8px; margin: 12px 0 2px; padding-left: 20px; }
.book-insights li { padding-left: 3px; color: #526b61; font-size: 11px; line-height: 1.48; }
.book-insights li::marker { color: var(--accent); font-weight: 900; }
.status-button { align-self: start; min-width: 83px; border: 1px solid #d9e3d8; background: #f7faf5; color: #5a7267; border-radius: 999px; padding: 8px 10px; font-size: 10px; font-weight: 850; }
.book-card[data-status="reading"] .status-button { color: #7b5721; background: #fff1d7; border-color: #ead0a0; }
.book-card[data-status="read"] .status-button { color: #25563b; background: #dcefd5; border-color: #c2dfb7; }
.status-button:hover { filter: brightness(.98); }

.empty-state { text-align: center; background: #fff; border: 1px dashed #cbd9ca; border-radius: 20px; padding: 52px 24px; }
.empty-state span { color: #6e9a70; font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.empty-state h3 { margin: 8px 0 6px; font-size: 25px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: 20px; color: #83978b; font-size: 12px; border-top: 1px solid var(--line); margin-top: 50px; padding-top: 24px; padding-bottom: 34px; }

@media (max-width: 900px) {
  .hero { padding: 44px 40px; }
  .hero-art { display: none; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .progress-card { grid-template-columns: 1fr; gap: 12px; }
  .progress-side { text-align: left; }
  .book-list { grid-template-columns: 1fr; }
  .category-nuggets { grid-template-columns: 1fr; gap: 10px; }
  .category-nuggets ul { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 620px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .top-inner { min-height: 64px; }
  .privacy { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .privacy { margin-right: 0; }
  .app-link { overflow: hidden; white-space: nowrap; padding: 7px 9px; font-size: 0; }
  .fit-link::before { content: "Fit ↗"; font-size: 12px; }
  .life-ops-link::before { content: "Life Ops ↗"; font-size: 12px; }
  .hero { min-height: 0; margin-top: 16px; margin-bottom: 34px; padding: 34px 24px; border-radius: 22px; }
  .hero h1 { font-size: 43px; }
  .hero p { font-size: 14px; }
  .hero-meta { gap: 7px; }
  .section-head { align-items: start; flex-direction: column; }
  .toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .select-field { grid-template-columns: 70px 1fr; }
  .progress-card { padding: 18px; }
  .book-card { grid-template-columns: 5px 1fr; padding-right: 14px; }
  .status-button { grid-column: 2; justify-self: start; }
  .footer { display: block; line-height: 1.7; }
}
