:root {
  --cream: #f5efe6;
  --paper: #fffdf9;
  --green: #164d43;
  --sage: #6f7d68;
  --terra: #c65f36;
  --ink: #173f38;
  --muted: #69746f;
  --line: rgba(22, 77, 67, .14);
  --shadow: 0 20px 50px rgba(39, 57, 51, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); background: rgba(255,253,249,.88); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand-mark { width: 35px; height: 35px; border: 1.5px solid var(--green); border-radius: 9px 9px 13px 13px; display: grid; place-items: center; font-family: Georgia, serif; font-size: 18px; box-shadow: inset 0 -5px 0 rgba(111,125,104,.13); }
.brand-mark span { color: var(--terra); font-style: italic; }
.brand-name { font-family: "Libre Caslon Display", Georgia, serif; font-size: 25px; white-space: nowrap; }
.brand-name span { color: var(--terra); font-style: italic; }
.profile-button { border: 1px solid var(--line); color: var(--green); background: transparent; padding: 9px 14px; border-radius: 999px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.profile-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terra); }
main { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.welcome { min-height: 330px; padding: 72px 0 40px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; position: relative; }
.welcome::after { content: ""; position: absolute; right: 14%; top: 44px; width: 190px; height: 190px; border: 1px dashed rgba(198,95,54,.24); border-radius: 50%; pointer-events: none; }
.eyebrow { color: var(--terra); font-weight: 700; letter-spacing: .17em; font-size: 12px; margin: 0 0 13px; }
h1, h2, h3 { margin: 0; }
h1 { font: 400 clamp(48px, 7vw, 84px)/.95 "Libre Caslon Display", Georgia, serif; max-width: 760px; letter-spacing: -.035em; }
h1 em { color: var(--terra); font-weight: 400; }
.intro { color: var(--muted); max-width: 570px; font-size: 18px; line-height: 1.55; margin: 25px 0 0; }
.experience-pill { background: var(--green); color: white; border-radius: 50%; width: 155px; height: 155px; display: grid; place-content: center; text-align: center; transform: rotate(4deg); box-shadow: var(--shadow); position: relative; z-index: 1; }
.experience-pill strong { font: 46px/1 "Libre Caslon Display", Georgia, serif; }
.experience-pill span { font-size: 12px; line-height: 1.35; opacity: .85; margin-top: 6px; }
.search-section { padding: 20px 0 18px; }
.search-box { height: 58px; display: flex; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; gap: 12px; box-shadow: 0 10px 30px rgba(39,57,51,.05); }
.search-box:focus-within { outline: 2px solid rgba(198,95,54,.35); border-color: var(--terra); }
.search-box svg { width: 22px; fill: none; stroke: var(--sage); stroke-width: 1.7; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-box input::placeholder { color: #89918d; }
.pillars { display: flex; gap: 9px; overflow-x: auto; padding: 5px 0 22px; scrollbar-width: none; }
.pillars::-webkit-scrollbar { display: none; }
.pillar { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; background: transparent; color: var(--ink); cursor: pointer; }
.pillar.active { background: var(--green); border-color: var(--green); color: white; }
.library-heading { display: flex; justify-content: space-between; align-items: end; border-top: 1px solid var(--line); padding: 36px 0 22px; }
.library-heading h2 { font: 38px/1.1 "Libre Caslon Display", Georgia, serif; }
.library-heading > span { color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: 84px; }
.card { display: grid; grid-template-columns: 42% 1fr; min-height: 270px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(39,57,51,.055); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-visual { min-height: 100%; position: relative; background: #e4ded3 center/cover no-repeat; }
.card-visual::after { content: ""; inset: 0; position: absolute; background: linear-gradient(120deg, transparent 55%, rgba(22,77,67,.09)); }
.card-body { padding: 25px; display: flex; flex-direction: column; align-items: flex-start; }
.tag { font-size: 11px; letter-spacing: .12em; font-weight: 700; text-transform: uppercase; color: var(--terra); }
.card h3 { font: 28px/1.08 "Libre Caslon Display", Georgia, serif; margin: 13px 0 12px; }
.card p { color: var(--muted); line-height: 1.5; font-size: 14px; margin: 0 0 18px; }
.meta { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.access { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--green); }
.access.free { color: var(--terra); }
.open-card { text-decoration: none; color: inherit; display: contents; }
.empty-state { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 56px 24px; text-align: center; margin-bottom: 70px; }
.empty-state span { color: var(--terra); font-size: 36px; }
.empty-state h3 { font: 30px "Libre Caslon Display", Georgia, serif; margin: 8px 0; }
.empty-state p { max-width: 520px; margin: 0 auto 20px; color: var(--muted); }
.empty-state a { color: var(--terra); font-weight: 700; }
footer { border-top: 1px solid var(--line); min-height: 150px; padding: 38px max(20px, calc((100vw - 1160px)/2)); background: #eae4da; }
footer p { margin: 8px 0 0; color: var(--muted); }
dialog { width: min(500px, calc(100% - 28px)); border: 0; padding: 0; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(17,42,37,.28); }
dialog::backdrop { background: rgba(14,39,34,.6); backdrop-filter: blur(4px); }
.dialog-card { padding: 38px; position: relative; }
.dialog-card h2 { font: 40px/1.05 "Libre Caslon Display", Georgia, serif; margin-bottom: 14px; }
.dialog-card > p { color: var(--muted); line-height: 1.5; }
.dialog-card label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; margin-top: 25px; }
.dialog-card input { border: 1px solid var(--line); background: white; border-radius: 12px; height: 50px; padding: 0 14px; outline: 0; }
.dialog-card input:focus { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(198,95,54,.12); }
.primary { border: 0; border-radius: 12px; height: 50px; padding: 0 20px; background: var(--green); color: white; font-weight: 700; cursor: pointer; width: 100%; margin-top: 12px; }
.primary:disabled { opacity: .55; cursor: wait; }
.close { position: absolute; right: 18px; top: 15px; border: 0; background: transparent; color: var(--muted); font-size: 30px; cursor: pointer; }
.form-message { min-height: 24px; color: var(--green) !important; font-weight: 600; font-size: 14px; }
.small { font-size: 13px; text-align: center; margin-bottom: 0; }
.small a { color: var(--terra); }
@media (max-width: 800px) {
  .topbar { height: 68px; padding: 0 18px; }
  .brand-name { font-size: 22px; }
  .profile-button { padding: 8px 11px; }
  main { width: min(100% - 28px, 680px); }
  .welcome { min-height: auto; padding: 48px 0 28px; display: block; }
  .welcome::after { width: 105px; height: 105px; right: 3%; top: 38px; }
  .experience-pill { display: none; }
  h1 { font-size: clamp(45px, 13vw, 64px); max-width: 550px; }
  .intro { font-size: 16px; margin-top: 18px; max-width: 470px; }
  .search-section { padding-top: 10px; }
  .library-heading { padding-top: 29px; }
  .library-heading h2 { font-size: 33px; }
  .cards { grid-template-columns: 1fr; gap: 16px; padding-bottom: 60px; }
  .card { min-height: 235px; grid-template-columns: 38% 1fr; border-radius: 18px; }
  .card-body { padding: 21px; }
  .card h3 { font-size: 25px; }
}
@media (max-width: 470px) {
  .profile-button span:last-child { display: none; }
  .profile-button { width: 38px; height: 38px; justify-content: center; }
  .profile-dot { width: 11px; height: 11px; }
  .card { grid-template-columns: 1fr; }
  .card-visual { min-height: 170px; }
  .card-body { min-height: 220px; }
  .library-heading > span { display: none; }
  .dialog-card { padding: 32px 23px 25px; }
}
