/* A functional two-page codex: class index on the left, one readable page on the right. */
.doctrine{padding:clamp(48px,4vw,72px) 0}
.codex-intro{display:flex;justify-content:space-between;align-items:end;gap:28px;margin-bottom:28px}
.codex-intro .display{font-size:clamp(2.5rem,4.7vw,4.6rem);line-height:.94}
.codex-intro>p{font-size:16px;line-height:1.55;color:var(--muted);padding-bottom:5px}
.skillbook-builder{min-width:0}
.codex-origins{border:0;padding:0;margin:0 0 22px;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px;min-inline-size:0}
.codex-origins legend{font:500 14px/1.4 var(--mono);color:var(--muted);margin-bottom:10px}
.codex-origins button{display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;padding:12px 6px;border:1px solid var(--line-2);font:600 14px/1.2 var(--sans);border-radius:3px;color:var(--muted)}
.codex-origins svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.25;flex:none}
.codex-origins button:hover,.codex-origins button[aria-pressed="true"]{color:var(--text);background:#29261d;border-color:var(--amber)}
.codex{--codex-accent:#e0a068;position:relative;display:grid;grid-template-columns:1fr 1fr;isolation:isolate;perspective:1800px;min-width:0;min-height:600px;background:#0d1514;border:1px solid #7c6745;border-radius:7px;box-shadow:0 6px 0 #18201b,0 9px 0 #65563d,0 14px 0 #101713,0 28px 80px #0009}
.codex::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:24px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#0009 45%,#cfb47922 50%,#0009 55%,transparent);pointer-events:none;z-index:3}
.codex-index,.codex-sheet{padding:24px 28px 18px;min-width:0;background:linear-gradient(100deg,#17201d,#0b1412 90%);border-radius:6px}
.codex-sheet{display:flex;flex-direction:column;background:linear-gradient(90deg,#0a1210,#17201d 12%,#141c19 90%,#263029);border-left:1px solid #d2b47733}
.codex-kicker{font:500 12px/1.5 var(--mono);letter-spacing:.11em;text-transform:uppercase;color:#b7a885}
.codex-index>.codex-kicker{padding-bottom:16px;border-bottom:1px solid #d2b47733;margin-bottom:15px}
.codex-classes{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;min-inline-size:0}
.codex-classes legend{font:400 14px/1.5 var(--sans);color:#bdc5b9;margin-bottom:16px;max-width:32ch}
.codex-classes button{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;padding:9px 4px 8px;min-width:0;border:1px solid #c0ae7d26;border-radius:2px;line-height:1.3;color:#bdc5b9;background:#080f0bcc;transition:border-color .2s,background .2s}
.codex-classes button:hover,.codex-classes button[aria-pressed="true"]{border-color:var(--codex-accent);color:#f3eee1;background:#293125}
.codex-classes button span:not(.codex-art){font-size:14px;overflow-wrap:anywhere}
.codex-art{display:block;width:70px;aspect-ratio:1;background-repeat:no-repeat;flex:none;border-radius:3px}
.codex-classes .codex-art{width:min(70px,100%)}
.codex-classes svg{width:65px;height:65px;fill:none;stroke:var(--codex-accent);stroke-width:1}
.codex-classes small{font:400 12px/1.3 var(--sans);color:#c5b897}
.codex-index-note{margin-top:18px;color:#b4bfb3;font-size:14px;line-height:1.5;max-width:30ch}
.codex-page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:27px}
.codex-page-head button{font-size:12px;color:#bec4b5;text-decoration:underline;text-underline-offset:4px}
.codex-sheet h3{font:800 clamp(1.8rem,2.9vw,2.7rem)/1.05 var(--display);font-stretch:65%;text-transform:uppercase;color:#f2ead9;margin:12px 0 8px;overflow-wrap:anywhere}
.codex-summary{font-size:16px;line-height:1.45;min-height:47px;color:#c4cbbb}
.codex-tabs{display:flex;gap:18px;border-bottom:1px solid #c6af773b;margin:16px 0 0}
.codex-tabs button{font-size:14px;line-height:1.3;padding:0 0 10px;color:#aeb9ab;position:relative}
.codex-tabs button[aria-selected="true"]{color:#f2cd8d}
.codex-tabs button[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#d8ad6c}
.codex-content{flex:1;min-height:310px;padding-top:17px;outline-offset:5px}
.codex-skills{display:grid;gap:13px}
.codex-skill{display:flex;gap:14px;align-items:center;min-height:84px}
.codex-skill .codex-art{width:82px}
.codex-content h4{font:600 18px/1.25 var(--sans);color:#eee5d1;margin:0 0 5px}
.codex-content p{font-size:16px;line-height:1.4;color:#c1c9bb}
.codex-utility-preview{display:flex;gap:14px;align-items:center;margin-top:16px;padding-top:14px;border-top:1px solid #c6af773b}
.codex-utility-preview .codex-art{width:64px}
.codex-utility-preview span:not(.codex-art){display:block;font-size:12px;color:#a5b39f;margin-bottom:3px}
.codex-utility-preview b{font-size:16px;color:#e3d7bc}
.codex-utility-preview p{font-size:14px;margin-top:3px}
.codex-content .codex-catch{font-size:14px;line-height:1.5;color:#a8b5a3;margin-top:16px}
.codex-catch b{color:#d8bb85;font-weight:500}
.codex-page-nav{display:flex;justify-content:space-between;align-items:center;padding-top:15px;border-top:1px solid #c6af773b;margin-top:12px;gap:12px}
.codex-page-nav button{font-size:14px;min-height:32px;padding:5px 8px;border:1px solid #c6af775c;color:#e6d7b5;border-radius:2px}
.codex-page-nav button:disabled{opacity:.3;cursor:default}
.codex-page-nav p{font:400 12px/1.3 var(--mono);color:#aeb9a9}
.codex-training-rule{margin-bottom:16px}
.codex-select-label{display:block;font-size:14px;color:#d9c79e;margin-bottom:7px}
.codex-content select{width:100%;min-height:44px;background:#101a14;color:#e8e6d4;border:1px solid #b7a47473;border-radius:3px;font-size:16px;padding:8px 10px}
.codex-training-card{display:flex;gap:15px;align-items:center;margin-top:16px}
.codex-training-card .codex-art{width:130px}
.codex-content .codex-kicker{font-size:12px;color:#b7a885}
.codex-innate{display:flex;align-items:center;gap:18px;min-height:300px}
.codex-innate img{width:37%;height:280px;object-fit:contain;flex:none;filter:drop-shadow(0 10px 22px #0008)}
.codex-pending{display:flex;flex-direction:column;gap:12px;align-items:flex-start;padding-top:10px;max-width:38ch}
.codex-pending svg{width:100px;height:100px;fill:none;stroke:var(--codex-accent);stroke-width:1.2;margin-bottom:8px}
.codex-leaf,.codex-turn-rest{--page-top:24px;--page-outer:28px;--page-bottom:26px;position:absolute;top:0;bottom:0;left:50%;width:50%;z-index:5;pointer-events:none;display:none;transform-origin:left center;border-radius:3px}
.codex-leaf{transform-style:preserve-3d;border:0;background:none;will-change:transform}
/* Only the inner ivory paper moves; the copper/leather/crystal frame stays on the book. */
.codex-page-face{position:absolute;inset:var(--page-top) var(--page-outer) var(--page-bottom) 0;overflow:hidden;background:linear-gradient(90deg,#6d492114,transparent 5%,#fff8df33 92%,#b5945d22),url('assets/art/classes/codex-spread.webp') 83.3333% 50% / 400% 200% no-repeat,#eadbc0;backface-visibility:hidden;border:1px solid #d3c09d;border-radius:1px 3px 3px 1px;box-shadow:inset 3px 0 9px #67422218,1px 0 0 #f8edce,2px 1px 2px #65442122}
.codex-page-face--front{transform:translateZ(.7px)}
.codex-page-face--back{transform:rotateY(180deg) translateZ(.7px);background-position:0 0,16.6667% 50%;border-radius:3px 1px 1px 3px;box-shadow:inset -3px 0 9px #67422222}
.codex-page-face::after{content:"";position:absolute;inset:0 0 0 auto;width:15%;pointer-events:none;background:linear-gradient(90deg,transparent,#fff9dc77 54%,#b5976644 87%,#f9eac9);border-radius:0 35% 35% 0;box-shadow:inset -2px 0 4px #78563233;animation:codex-page-curl .9s ease-in-out both}
.codex-page-face--back::after{left:0;right:auto;transform:scaleX(-1)}
.codex-page-copy.codex-sheet{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;overflow:hidden;background:transparent;border:0;pointer-events:none}
/* Counter the face inset and its 1px border so the impressions keep exact live-text positions. */
.codex-page-face .codex-page-copy.codex-sheet{inset:calc(-1 * var(--page-top) - 1px) calc(-1 * var(--page-outer) - 1px) calc(-1 * var(--page-bottom) - 1px) -1px;width:auto;height:auto}
.codex-turn-rest{z-index:4;background:none;overflow:hidden}
.codex-turn-rest::before{content:"";position:absolute;inset:var(--page-top) var(--page-outer) var(--page-bottom) 0;background:url('assets/art/classes/codex-spread.webp') 83.3333% 50% / 400% 200% no-repeat,#eadbc0}
.codex-leaf::after{content:"";position:absolute;inset:var(--page-top) var(--page-outer) var(--page-bottom) 0;z-index:2;background:linear-gradient(90deg,#51301a16,transparent 8%,transparent 72%,#fff8dd66 87%,#96754633 97%,#fff1c999);border-right:1px solid #efdfbc;box-shadow:inset -3px 0 8px #5c36161a;backface-visibility:hidden;pointer-events:none}
.codex-leaf::before{content:"";position:absolute;inset:var(--page-top) var(--page-outer) var(--page-bottom) 0;background:linear-gradient(90deg,#54361b33,transparent 20%);transform:translateZ(-1px);pointer-events:none}
.codex.is-turning::after{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;background:linear-gradient(90deg,transparent 12%,#34200b33 44%,#34200b66 50%,transparent 77%);animation:codex-binding-shadow .9s ease-in-out both}
.is-turning .codex-leaf{display:block;animation:codex-turn-forward .9s cubic-bezier(.34,.03,.25,1) both}
.is-turning.turn-backward .codex-leaf{animation-name:codex-turn-backward}
.is-turning.turn-backward .codex-turn-rest{display:block;animation:codex-old-page .9s linear both}
@keyframes codex-turn-forward{0%{transform:rotateY(0deg) skewY(0deg)}24%{transform:rotateY(-34deg) skewY(-1.2deg)}52%{transform:rotateY(-94deg) skewY(-2deg)}80%{transform:rotateY(-153deg) skewY(-.9deg)}100%{transform:rotateY(-180deg) skewY(0deg)}}
@keyframes codex-turn-backward{0%{transform:rotateY(-180deg) skewY(0deg)}24%{transform:rotateY(-148deg) skewY(1deg)}52%{transform:rotateY(-86deg) skewY(1.8deg)}80%{transform:rotateY(-26deg) skewY(.8deg)}100%{transform:rotateY(0deg) skewY(0deg)}}
@keyframes codex-old-page{0%,44%{opacity:1}56%,100%{opacity:0}}
@keyframes codex-binding-shadow{0%,100%{opacity:0}48%{opacity:1}}
@keyframes codex-page-curl{0%,100%{width:2%;opacity:.25}35%,65%{width:15%;opacity:.8}}
.codex-cover{position:absolute;top:-4px;bottom:-9px;left:50%;width:50%;z-index:7;transform-origin:left center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px;gap:20px;background:linear-gradient(105deg,#070d0a,#283122 8%,#111b12 22%,#172419 92%,#070c08);border:2px solid #9b8251;border-radius:3px 7px 7px 3px;box-shadow:inset 0 0 0 10px #0b140c,inset 0 0 0 11px #9b825166,0 12px 32px #0008;backface-visibility:hidden;transition:transform .85s cubic-bezier(.25,.7,.2,1),opacity .2s .6s,visibility 0s .85s;visibility:visible}
.codex-cover strong{font:500 clamp(2.4rem,4vw,4.5rem)/.95 var(--display);font-stretch:65%;text-transform:uppercase;letter-spacing:.035em;color:#e4c690;text-align:center}
.codex-cover>span:not(.codex-kicker):not(.codex-cover-art){font-size:14px;color:#c0ae84}
.codex-cover>b{font:500 14px/1.4 var(--sans);border-bottom:1px solid #b8a076;padding-bottom:6px;color:#ecdfbe}
.codex-cover-art{width:150px;aspect-ratio:1;background:url('assets/art/classes/class-identities.webp') 66.6667% 100% / 400% 400% no-repeat}
.codex.is-open .codex-cover{transform:rotateY(-175deg);opacity:0;visibility:hidden;pointer-events:none}
.codex:not(.is-open) .codex-cover{transition:transform .85s cubic-bezier(.25,.7,.2,1),opacity .2s .6s,visibility 0s}
.codex:not(.is-open) .codex-sheet{visibility:hidden}
.codex.is-opening .codex-cover{visibility:visible;animation:codex-open .9s ease-in-out both}
@keyframes codex-open{0%,10%{transform:rotateY(0);opacity:1}80%{opacity:1}100%{transform:rotateY(-175deg);opacity:0}}
.codex-foot{display:flex;justify-content:space-between;gap:20px;margin-top:28px;color:var(--muted)}
.codex-foot p{font-size:14px;line-height:1.5;max-width:60ch}
.skillbook-builder button:focus-visible,.skillbook-builder select:focus-visible{outline:2px solid #7ee8ff;outline-offset:4px}
html.motion-off .codex *,html.motion-off .codex *::after{animation:none!important;transition:none!important}
html.motion-off .codex-leaf,html.motion-off .codex-turn-rest,html.motion-off .codex.is-turning::after{display:none!important}
@media(prefers-reduced-motion:reduce){.codex *,.codex *::after{animation:none!important;transition:none!important}.codex-leaf,.codex-turn-rest,.codex.is-turning::after{display:none!important}}
@media(max-width:1100px){.codex-index,.codex-sheet{padding:22px 20px}.codex-classes{gap:6px}.codex-classes .codex-art{width:57px}.codex-origins button{gap:5px;font-size:13px}.codex-origins svg{width:16px}.codex-tabs{gap:12px}.codex-skill .codex-art{width:70px}}
@media(max-width:760px){
  .codex-intro{display:block}.codex-intro>p{margin-top:18px}.codex-origins{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.codex-origins button{flex-direction:column;min-height:56px;font-size:13px;padding:7px 4px}.codex-origins svg{width:15px;height:15px}
  .codex{grid-template-columns:1fr}.codex::before{display:none}.codex-index{padding:20px 18px 16px}.codex-index>.codex-kicker{margin-bottom:10px;padding-bottom:10px}.codex-classes legend{max-width:none;margin-bottom:12px}.codex-classes button{flex-direction:column;gap:4px;padding:7px 4px;min-height:72px}.codex-classes .codex-art{width:36px}.codex-classes svg{width:32px;height:32px;flex:none}.codex-classes button span:not(.codex-art){font-size:13px;overflow-wrap:normal}.codex-classes small{display:none}.codex-exclusive span{font-size:12px!important}.codex-index-note{margin-top:12px;max-width:none}
  .codex-sheet{padding:20px 18px 16px;border-left:0;border-top:1px solid #c6af775c;min-height:560px}.codex-summary{min-height:45px}.codex-content{min-height:310px}.codex-tabs{gap:16px}.codex-skill .codex-art{width:70px}.codex-skill{gap:10px}.codex-content h4{font-size:17px}.codex-training-card .codex-art{width:95px}.codex-innate{gap:13px}.codex-innate img{height:250px;width:33%}
  .codex-cover,.codex-leaf,.codex-turn-rest{left:0;width:100%;top:auto;height:560px;bottom:0;transform-origin:left center}.codex.is-turning{overflow:clip}.codex.is-turning::after{display:none}.codex-cover{border-radius:3px}.codex.is-open .codex-cover{transform:rotateY(-100deg)}.codex-cover strong{font-size:3.5rem}.codex-cover-art{width:140px}.codex-foot{display:block}.codex-foot p+p{margin-top:10px}
}

@media(max-width:360px){.codex-index,.codex-sheet{padding-left:14px;padding-right:14px}.codex-classes{grid-template-columns:repeat(2,minmax(0,1fr))}.codex-classes button{flex-direction:row;gap:3px;min-height:50px}.codex-classes .codex-art,.codex-classes svg{width:24px;height:24px}.codex-classes button span:not(.codex-art){font-size:12px}.codex-tabs{gap:12px}.codex-tabs button{font-size:13px}.codex-skill .codex-art{width:56px}.codex-training-card .codex-art{width:80px}}

/* The original Shardline parchment spread, with live controls laid over its pages. */
.doctrine{padding:clamp(28px,calc(4vw - 20px),52px) 0}
.codex{--codex-ink:#392c21;--codex-muted:#65513e;--codex-rule:#85634066;background:#eadbc0 url('assets/art/classes/codex-spread.webp') center / 100% 100% no-repeat;border-color:#785535}
.codex::before{width:18px;background:linear-gradient(90deg,transparent,#482f1d33,transparent)}
.codex-index{background:transparent;padding:54px 52px 50px 80px}
.codex-sheet{background:transparent;padding:54px 80px 50px 60px;border-left:0}
.codex-page-head{padding-right:16px}
.codex-classes .codex-art{width:60px}
.codex-summary{min-height:0}
.codex-tabs{margin-top:12px}
.codex-content{min-height:286px;padding-top:14px}
.codex-skills{gap:10px}
.codex-skill{min-height:76px}
.codex-skill .codex-art{width:74px}
.codex-utility-preview{margin-top:12px;padding-top:12px}
.codex-utility-preview .codex-art{width:56px}
.codex-content .codex-catch{margin-top:12px}
.codex-pending{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;gap:18px;max-width:none;min-height:230px;padding-top:0}
.codex-pending>.codex-art{width:120px}
.codex-pending .codex-kicker{margin-bottom:8px}
.codex-page-nav{margin-top:8px;padding-top:12px}
.codex-kicker,.codex-content .codex-kicker{color:#785539}
.codex-index>.codex-kicker,.codex-tabs,.codex-utility-preview,.codex-page-nav{border-color:var(--codex-rule)}
.codex-classes legend,.codex-index-note,.codex-summary,.codex-content p{color:var(--codex-muted)}
.codex-index-note{max-width:none;text-align:center}.codex-index-note span{display:block}
.codex-classes button{color:var(--codex-ink);background:#fff5de44;border-color:#88664555}
.codex-classes button:hover{background:#fff6dfaa;border-color:#805b35;color:var(--codex-ink)}
.codex-classes button[aria-pressed="true"]{background:#594732;color:#fff5df;border-color:#68431f;box-shadow:inset 0 0 0 2px #e4c89766}
.codex-classes small{color:#705335}
.codex-classes button[aria-pressed="true"] small{color:#ecd6b6}
.codex-classes svg,.codex-pending svg{stroke:#78502e}
.codex-classes button[aria-pressed="true"] svg{stroke:#edc98f}
.codex-art{box-shadow:0 1px 3px #3d291d44;border:1px solid #8f704955}
.codex-page-head button{color:var(--codex-muted)}
.codex-sheet h3,.codex-content h4,.codex-utility-preview b{color:var(--codex-ink)}
.codex-tabs button{color:var(--codex-muted)}
.codex-tabs button[aria-selected="true"]{color:#783c19}
.codex-tabs button[aria-selected="true"]::after{background:#8c5026}
.codex-content .codex-catch,.codex-utility-preview span:not(.codex-art){color:#71573e}
.codex-catch b{color:#704322}
.codex-page-nav button{color:var(--codex-ink);border-color:#85634099;background:#fff5dd55}
.codex-page-nav p{color:var(--codex-muted)}
.codex-select-label{color:#704322}
.codex-content select{background:#f9eed6;color:var(--codex-ink);border-color:#85634099}
.codex-innate img{filter:drop-shadow(0 8px 10px #71502b33)}
.codex-cover .codex-kicker{color:#cbb991}
.codex-leaf{background:none;border:0}
.skillbook-builder .codex button:focus-visible,.skillbook-builder .codex select:focus-visible,.codex-content:focus-visible{outline-color:#155b6c}
.skillbook-builder .codex .codex-cover:focus-visible{outline-color:#7ee8ff}
@media(min-width:761px) and (max-width:1100px){.codex-index{padding-left:54px;padding-right:34px}.codex-sheet{padding-left:34px;padding-right:54px}.codex-classes .codex-art{width:50px}}
@media(max-width:760px){
  /* Each stacked panel uses one full painted page rather than shrinking two pages. */
  .codex-intro{margin-bottom:22px}.codex-intro>p{margin-top:12px}
  .codex-origins{margin-bottom:18px}.codex-origins legend{margin-bottom:8px}
  .codex{background:#eadbc0;margin-inline:-10px}
  .codex-index{padding:42px 36px 44px;background:url('assets/art/classes/codex-spread.webp') left center / 200% 100% no-repeat}
  .codex-sheet{padding:46px 36px 50px;background:url('assets/art/classes/codex-spread.webp') right center / 200% 100% no-repeat;border-top:1px solid #85634066}
  .codex-cover,.codex-leaf,.codex-turn-rest{grid-row:2;grid-column:1;top:0;bottom:0;height:auto}
  .codex-classes .codex-art{width:36px}
  .codex-skill .codex-art{width:66px}
  .codex-pending{grid-template-columns:90px minmax(0,1fr);gap:13px}
  .codex-pending>.codex-art{width:90px}
}
@media(max-width:360px){.codex-intro{margin-bottom:18px}.codex-origins{gap:4px}.codex-origins button{min-height:48px;padding-block:6px}.codex-index,.codex-sheet{padding-left:26px;padding-right:26px}.codex-classes .codex-art{width:24px}.codex-skill .codex-art{width:54px}.codex-pending{grid-template-columns:68px minmax(0,1fr);gap:10px}.codex-pending>.codex-art{width:68px}}

/* An original Shardline book, opened as a modal rather than adding more page length. */
.codex-launch{width:100%;text-align:left;perspective:1800px}
.codex-launch-cover{width:170px;height:238px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:#e5c58a;background:linear-gradient(100deg,#050c08,#385044 8%,#15271e 13%,#0b1913 85%,#30483b);border:3px solid #9b7748;border-radius:3px 9px 9px 3px;box-shadow:inset 0 0 0 9px #08130d,inset 0 0 0 10px #bd965c88,-7px 3px 0 #c6b18d,-10px 5px 0 #55402a,0 22px 40px #0009;transform:rotateY(-18deg) rotateZ(-5deg);transition:transform .35s}
.codex-launch:hover .codex-launch-cover{transform:rotateY(-8deg) rotateZ(-2deg)}
.codex-launch-cover>span{font:500 12px var(--mono);letter-spacing:.18em;text-transform:uppercase}
.codex-launch-cover strong{font:700 42px/.95 var(--display);text-align:center;text-transform:uppercase}
.codex-launch-cover>b{font-size:36px;font-weight:400}
.codex-launch-copy{display:flex;flex-direction:column;gap:17px;max-width:360px;min-width:0;overflow-wrap:anywhere}
.codex-launch-copy>strong{font:700 clamp(2rem,3.5vw,3.2rem)/1 var(--display);text-transform:uppercase;color:#f1e4c8}
.codex-launch-copy>span:not(.eyebrow){font-size:16px;line-height:1.55;color:#b9c6bb}
.codex-launch-copy>b{font:500 13px var(--mono);color:#e7b76d}
.codex-dialog{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:20px clamp(12px,3vw,48px);border:0;color:var(--text);background:radial-gradient(ellipse at 50% 60%,#243c34,#07110f 75%);overflow:hidden}
.codex-dialog::backdrop{background:#020907ee;backdrop-filter:blur(5px)}
.codex-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0;align-items:stretch}
.codex-dialog .codex-origins{width:min(1320px,100%);margin:0 auto 12px;gap:6px}
.codex-dialog .codex-origins legend{margin-bottom:8px;padding-right:145px;font-size:12px}
.codex-dialog .codex-origins button{min-height:32px;padding:7px 4px;font-size:12px}
.codex-dialog .codex-origins svg{width:16px;height:16px}
.codex-motion{position:absolute;top:18px;right:clamp(12px,3vw,48px);font:500 12px var(--mono);color:#bdc6b1;padding:4px 8px;border:1px solid #98815a66;border-radius:3px}
.codex-dialog .codex{width:min(1320px,100%);margin:0 auto;min-height:0;height:100%;grid-template-columns:1fr 1fr;overflow:visible}
.codex-dialog .codex-index,.codex-dialog .codex-sheet{min-height:0;padding:clamp(22px,3.3vh,36px) clamp(28px,4.6vw,68px);border-radius:0}
.codex-dialog .codex-sheet{padding-bottom:64px}
.codex-dialog .codex-page-head button{color:#49311e;background:#f4e6cbd9;padding:5px 9px;border:1px solid #8c684955;border-radius:3px;text-decoration:none}
.codex-dialog .codex-index{padding-right:36px}
.codex-dialog .codex-sheet{padding-left:36px;overflow:hidden}
.codex-dialog .codex-index>.codex-kicker{padding-bottom:10px;margin-bottom:12px}
.codex-dialog .codex-classes{gap:8px}
.codex-dialog .codex-classes legend{font-size:13px;margin-bottom:12px}
.codex-dialog .codex-classes button{padding:8px 4px;min-height:100px}
.codex-dialog .codex-classes .codex-art{width:clamp(40px,5.1vw,68px)}
.codex-dialog .codex-index-note{font-size:12px;margin-top:12px}
.codex-dialog .codex-sheet h3{font-size:clamp(22px,2.7vw,36px);margin:8px 0 5px}
.codex-dialog .codex-summary{font-size:14px;line-height:1.35}
.codex-dialog .codex-tabs{position:relative;gap:8px;margin-top:10px;border:0}
.codex-dialog .codex-tabs button{padding:7px 9px;background:#a3855788;color:#49311e;font-size:12px;border-radius:2px 9px 2px 2px;box-shadow:0 2px 0 #70523155}
.codex-dialog .codex-tabs button[aria-selected="true"]{background:#623c24;color:#fff0cd}
.codex-dialog .codex-tabs button[aria-selected="true"]::after{display:none}
.codex-dialog .codex-content{min-height:0;overflow:auto;scrollbar-width:thin;padding-top:14px;overscroll-behavior:contain}
.codex-browse-hint{font-size:12px!important;margin-bottom:12px}
.codex-spell-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.codex-spell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 5px;min-width:0;min-height:124px;border:1px solid #85634044;border-radius:3px;background:#fff8df44;color:var(--codex-ink);text-align:center}
.codex-spell:hover{background:#fff8dca6;border-color:#785539}
.codex-spell[aria-pressed="true"]{background:#ebd0a6;border-color:#704820;box-shadow:inset 0 0 0 2px #ad875c44}
.codex-spell .codex-art{width:clamp(54px,5vw,72px);border-radius:50%}
.codex-spell strong{font:600 14px/1.15 var(--sans);overflow-wrap:anywhere}
.codex-spell small{font:400 10px/1.2 var(--mono);color:#795c40}
.codex-inspect{min-height:68px;margin-top:12px;padding:10px 12px;border-top:1px solid #85634055;background:#f6e6c44a;border-radius:2px}
.codex-inspect h4{font-size:16px;margin-bottom:4px}
.codex-dialog .codex-content p{font-size:14px;line-height:1.35}
.codex-dialog .codex-content .codex-catch{font-size:12px;margin-top:10px}
.codex-dialog .codex-training-rule{font-size:12px;margin-bottom:10px}
.codex-training-grid{gap:6px}
.codex-training-grid .codex-spell{min-height:93px;padding:6px 4px;gap:3px}
.codex-training-grid .codex-art{width:45px}
.codex-training-grid strong{font-size:12px}
.codex-training-grid small{font-size:9px}
.codex-empty-art{display:flex;align-items:center;justify-content:center;font-size:30px;width:45px;height:45px;border:1px solid #8c674355;border-radius:50%;color:#94704d}
.codex-dialog .codex-select-label{font-size:11px;margin:7px 0 4px}
.codex-dialog .codex-content select{min-height:30px;padding:4px 6px;font-size:13px}
.codex-dialog .codex-page-nav{padding-top:8px;margin-top:8px;flex:none}
.codex-dialog .codex-page-nav button{position:relative;font-size:12px;border:0;background:linear-gradient(135deg,transparent 75%,#a37d4866 76%,#ead6ad 95%);padding:6px 10px;min-height:32px}
.codex-dialog .codex-page-nav button:first-child{background:linear-gradient(225deg,transparent 75%,#a37d4866 76%,#ead6ad 95%)}
.codex-dialog .codex-foot{margin:12px auto 0;width:min(1320px,100%);gap:15px}
.codex-dialog .codex-foot p{font-size:11px;margin:0;color:#aab6a4}
.codex-dialog .codex-innate{min-height:0;height:100%}
.codex-dialog .codex-innate img{height:min(280px,40vh)}
.codex-dialog .codex-pending{min-height:180px}
.codex.is-opening{animation:codex-unfold .9s cubic-bezier(.2,.7,.2,1) both}
.codex.is-closing{animation:codex-shut .75s cubic-bezier(.45,0,.65,1) both;pointer-events:none}
.codex.is-closing .codex-cover{visibility:visible;opacity:1;animation:codex-cover-shut .75s ease-in-out both}
.codex.is-closing .codex-index{transform-origin:right center;animation:codex-left-fold .75s ease-in-out both}
@keyframes codex-unfold{0%,48%{clip-path:inset(-20px -20px -50px 49%)}100%{clip-path:inset(-20px -20px -50px -20px)}}
@keyframes codex-shut{0%{clip-path:inset(-20px -20px -50px -20px)}55%,100%{clip-path:inset(-20px -20px -50px 49%)}}
@keyframes codex-cover-shut{0%{transform:rotateY(-175deg);opacity:0}20%{opacity:1}100%{transform:rotateY(0deg);opacity:1}}
@keyframes codex-left-fold{0%{transform:none;opacity:1}70%,100%{transform:rotateY(82deg);opacity:0}}
html.motion-off .codex,html.motion-off .codex-launch-cover{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.codex,.codex-launch-cover{animation:none!important;transition:none!important}}
@media(min-width:1000px){
  .codex-dialog .codex-sheet{overflow:visible}
  .codex-dialog .codex-tabs{position:absolute;right:-17px;top:145px;width:38px;z-index:8;flex-direction:column;gap:7px;margin:0}
  .codex-dialog .codex-tabs button{writing-mode:vertical-rl;min-height:104px;padding:12px 9px;border-radius:0 6px 6px 0;color:#f9ecd4;border:1px solid #d0b77c88;box-shadow:2px 3px 4px #0008;background:#70462f}
  .codex-dialog .codex-tabs button:nth-child(2){background:#3e655c}
  .codex-dialog .codex-tabs button:nth-child(3){background:#575269}
  .codex-dialog .codex-tabs button[aria-selected="true"]{transform:translateX(5px);outline:2px solid #e6c98a;outline-offset:1px}
}
@media(max-width:760px){
  .codex-launch{min-height:250px;padding:24px 14px;gap:22px}.codex-launch-cover{width:112px;height:172px;gap:12px}.codex-launch-cover strong{font-size:30px}.codex-launch-cover>span{font-size:9px}.codex-launch-cover>b{font-size:26px}.codex-launch-copy{gap:12px}.codex-launch-copy>.eyebrow{font-size:9px}.codex-launch-copy>strong{font-size:25px}.codex-launch-copy>span:not(.eyebrow){font-size:12px}.codex-launch-copy>b{font-size:10px}
  .codex-dialog{padding:10px}.codex-motion{top:8px;right:10px;font-size:10px}.codex-dialog .codex-origins{margin-bottom:8px;gap:4px}.codex-dialog .codex-origins legend{font-size:10px;margin-bottom:6px}.codex-dialog .codex-origins button{flex-direction:row;min-height:27px;padding:5px 2px;font-size:10px;gap:3px}.codex-dialog .codex-origins svg{width:12px;height:12px}
  .codex-dialog .codex{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);margin:0;overflow:hidden;background-size:200% 100%;background-position:right center}
  .codex-dialog .codex-index{padding:10px 16px 8px;background:#eadbc0;border-bottom:1px solid #94714566}.codex-dialog .codex-index>.codex-kicker,.codex-dialog .codex-index-note{display:none}.codex-dialog .codex-classes{display:flex;gap:5px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}.codex-dialog .codex-classes legend{font-size:10px;margin-bottom:6px}.codex-dialog .codex-classes button{width:68px;min-width:68px;min-height:68px;flex:none;flex-direction:column;padding:5px 2px;gap:3px}.codex-dialog .codex-classes .codex-art{width:28px}.codex-dialog .codex-classes button span:not(.codex-art){font-size:10px;overflow-wrap:anywhere}.codex-dialog .codex-classes small{display:none}
  .codex-dialog .codex-sheet{padding:12px 20px 44px;background-size:200% 100%;min-height:0}.codex-dialog .codex-page-head{padding:0;min-height:18px}.codex-dialog .codex-kicker{font-size:9px}.codex-dialog .codex-sheet h3{font-size:23px;margin-top:5px}.codex-dialog .codex-summary{font-size:12px}.codex-dialog .codex-tabs{gap:5px;margin-top:8px}.codex-dialog .codex-tabs button{padding:5px 7px;font-size:10px}.codex-dialog .codex-content{padding-top:10px}.codex-spell-grid{gap:6px}.codex-spell{min-height:106px;padding:7px 3px}.codex-spell .codex-art{width:44px}.codex-spell strong{font-size:12px}.codex-spell small{font-size:9px}.codex-dialog .codex-content p{font-size:12px}.codex-inspect{min-height:58px;margin-top:8px;padding:8px}.codex-inspect h4{font-size:14px}.codex-training-grid .codex-spell{min-height:83px}.codex-training-grid .codex-art{width:35px}.codex-training-grid strong{font-size:11px}.codex-training-grid small{font-size:8px}.codex-dialog .codex-foot{display:flex;margin-top:8px}.codex-dialog .codex-foot p{font-size:9px;max-width:50%}.codex-dialog .codex-cover{grid-row:1 / 3;left:0;top:0;width:100%;height:100%;background-color:#0b1913}.codex-dialog .codex-leaf,.codex-dialog .codex-turn-rest{grid-row:2;left:0;width:100%;height:100%}.codex-dialog .codex-innate img{height:190px;width:35%}.codex-dialog .codex-pending{min-height:140px;grid-template-columns:68px 1fr;gap:10px}.codex-dialog .codex-pending>.codex-art{width:68px}
  @keyframes codex-unfold{0%,48%{clip-path:inset(-20px -20px -50px 49%)}100%{clip-path:inset(-20px -20px -50px -20px)}}@keyframes codex-shut{0%{clip-path:inset(-20px -20px -50px -20px)}55%,100%{clip-path:inset(-20px -20px -50px 49%)}}
}

/* The same illustrated hardback and page-sized silhouette in both states. */
.doctrine{padding:20px 0}
.doctrine .sec-top{padding-top:10px;margin-bottom:16px}
.skillbook-builder{--codex-book-height:clamp(320px,min(calc(100dvh - 224px),calc((100vw - 2 * var(--g)) * .6667)),610px);--codex-book-width:min(1320px,calc(100vw - 2 * var(--g)));position:relative}
.skillbook-builder>.codex-intro{position:absolute;z-index:2;left:4%;right:55%;top:8%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:20px;margin:0;text-align:left}
.skillbook-builder>.codex-intro .display{font-size:clamp(28px,4.6vw,64px)}
.skillbook-builder>.codex-intro>p{font-size:15px;line-height:1.55;margin:0;padding:0}
.codex-launch{position:relative;display:block;width:var(--codex-book-width);height:var(--codex-book-height);min-height:0;max-width:100%;margin:0 auto;padding:0;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none;perspective:1800px;cursor:pointer}
.codex-launch:hover{background:none;border:0}
.codex-table-book{position:absolute;left:50%;top:0;width:50%;height:100%;transform:none;transform-style:preserve-3d;filter:drop-shadow(12px 18px 18px #0009)}
.codex-table-pages{position:absolute;inset:9px 1px -4px 4px;background:repeating-linear-gradient(#e5d3b3 0 2px,#8b795c 3px,#f0e4cb 4px 5px);border-radius:5px 14px 14px 5px;box-shadow:0 3px 0 #433327;clip-path:inset(0 round 5px 14px 14px 5px)}
.codex-table-cover{position:absolute;inset:0;display:block;border:0;border-radius:0;background:none;box-shadow:none;transform-origin:left center;transition:transform .5s;backface-visibility:hidden;isolation:isolate}
.codex-table-cover::before,.codex-hardback-front::before{content:"";position:absolute;inset:1.7% 1.4% 1.5% 1.5%;border-radius:3%;background:#151310;z-index:0}
.codex-table-cover::after,.codex-hardback-front::after{content:"";position:absolute;inset:0;background:url('assets/art/classes/codex-hardback-cover-v1.webp') center / 100% 100% no-repeat;z-index:1;pointer-events:none}
.codex-cover-title{position:absolute;left:17%;right:12%;top:18%;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;color:#e9c78f;text-shadow:0 2px 5px #000;z-index:2}
.codex-cover-title>span{font:500 11px/1.4 var(--mono);letter-spacing:.14em;text-transform:uppercase}.codex-cover-title strong{font:700 clamp(36px,4.5vw,66px)/.94 var(--display);text-transform:uppercase}.codex-cover-title>span:last-child{font-size:9px;letter-spacing:.04em}
.codex-launch:hover .codex-table-cover,.codex-launch:focus-visible .codex-table-cover{transform:rotateY(-16deg)}
.codex-table-hint{position:absolute;left:4%;right:55%;top:62%;text-align:left;color:#c8b798;font:400 12px/1.5 var(--mono)}.codex-table-hint strong{display:block;margin-bottom:8px;color:#f0d19c;font:700 clamp(22px,3.5vw,44px)/1 var(--display);text-transform:uppercase}
.codex-launch:focus-visible{outline:0}.codex-launch:focus-visible .codex-table-book{outline:2px solid #7ee8ff;outline-offset:6px}
.codex-dialog .codex{width:var(--codex-book-width);max-width:100%;height:var(--codex-book-height);max-height:100%;align-self:center;border:0;transform:none}
.codex-dialog[open]{grid-template-rows:auto auto minmax(0,1fr) auto}
.codex-dialog>.codex-classes{display:flex;gap:6px;overflow-x:auto;width:min(1320px,100%);margin:0 auto 12px;padding:0 0 4px;scrollbar-width:thin}
.codex-dialog>.codex-classes legend{font:500 10px var(--mono);color:#c4cbb6;margin-bottom:5px;max-width:none}
.codex-dialog>.codex-classes button{flex:1;flex-direction:row;gap:6px;min-width:90px;min-height:42px;padding:5px 7px;background:#112019;color:#c9cebb;border-color:#7d775955}
.codex-dialog>.codex-classes button:hover{background:#2c3a28;border-color:#b79863}.codex-dialog>.codex-classes button[aria-pressed="true"]{background:#685331;color:#fff1d5;border-color:#ddb378}
.codex-dialog>.codex-classes .codex-art{width:27px}.codex-dialog>.codex-classes button span:not(.codex-art){font-size:11px;line-height:1.2}.codex-dialog>.codex-classes small{display:none}
.codex-dialog .codex-index{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;z-index:2;padding-bottom:64px}
.codex-dialog .codex-index>.codex-kicker{align-self:stretch;text-align:center;margin:0;font-size:11px}
.codex-frontispiece{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;text-align:center;flex:1}
.codex-frontispiece>.codex-art{width:clamp(110px,18vw,220px);border-radius:50%;border:3px double #9a744b;box-shadow:0 15px 25px #6c472333}
.codex-frontispiece h4{font:700 clamp(22px,3vw,42px)/1.1 var(--display);color:var(--codex-ink);text-transform:uppercase}.codex-frontispiece p{font:500 12px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:#785539}
.codex-landed{position:absolute;left:0;top:0;width:50%;height:100%;z-index:4;overflow:hidden;isolation:isolate;pointer-events:auto}
.codex-landed[hidden]{display:none}
.codex-landed::before{content:"";position:absolute;inset:24px 0 26px 28px;background:#eadbc0 url('assets/art/classes/codex-spread.webp') 16.6667% 50% / 400% 200% no-repeat;border:1px solid #b39871;box-shadow:1px 2px 3px #4c2f2144}
.codex-dialog .codex-landed>.codex-page-copy{position:absolute;inset:0;width:100%;height:100%;padding-left:clamp(28px,4.6vw,68px);padding-right:36px;background:transparent;pointer-events:auto}
.codex-dialog .codex-page-face--back>.codex-page-copy{padding-left:clamp(28px,4.6vw,68px);padding-right:36px}
.codex-landed .codex-page-head{min-height:29px}.codex-landed .codex-spell{cursor:default}.codex-landed .codex-content{overflow:auto;color:#493d2c}
.codex-landed .codex-select-label{display:none}
.codex.has-left-page .codex-index{visibility:hidden}
.codex.is-closing .codex-landed{transform-origin:right center;animation:codex-left-fold .75s ease-in-out both}
.is-turning.turn-backward .codex-turn-rest{animation:none;opacity:1}
.codex-dialog .codex-cover{display:block;padding:0;background:none;border:0;box-shadow:none;transform-style:preserve-3d;backface-visibility:visible;opacity:1;transition:transform .9s;z-index:1}
.codex-hardback-front,.codex-hardback-back{position:absolute;inset:0;display:block;border:0;border-radius:0;backface-visibility:hidden;box-shadow:none}
.codex-hardback-front{background:none;transform:translateZ(2px);isolation:isolate}
.codex-dialog .codex-cover{top:0;bottom:0;height:100%}
.codex-hardback-front .codex-cover-title strong{font:700 clamp(36px,4.5vw,66px)/.94 var(--display);letter-spacing:0;color:#e9c78f}
.codex-hardback-back{background:#dcc8a5 url('assets/art/classes/codex-spread.webp') left center / 200% 100% no-repeat;transform:rotateY(180deg) translateZ(2px);color:#937249}.codex-hardback-back>span{font-size:80px;opacity:.45}
.codex-dialog .codex.is-open .codex-cover{transform:rotateY(-180deg);visibility:visible;opacity:1;pointer-events:none}
.codex-dialog .codex.is-opening .codex-cover,.codex-dialog .codex.is-closing .codex-cover{z-index:7;visibility:visible;opacity:1}
@keyframes codex-open{0%,10%{transform:rotateY(0);opacity:1}100%{transform:rotateY(-180deg);opacity:1}}
@keyframes codex-cover-shut{0%{transform:rotateY(-180deg);opacity:1}100%{transform:rotateY(0);opacity:1}}
@media(max-width:760px){
  .skillbook-builder{--codex-book-height:clamp(320px,calc(100dvh - 244px),600px)}
  .skillbook-builder>.codex-intro{left:3%;right:54%;top:7%;gap:14px}.skillbook-builder>.codex-intro .display{font-size:clamp(24px,7vw,34px)}.skillbook-builder>.codex-intro>p{font-size:11px;line-height:1.5}
  .codex-launch{min-height:0;padding:0}.codex-table-book{width:50%;height:100%;transform:none}.codex-cover-title{top:18%;gap:9px}.codex-cover-title>span{font-size:8px;letter-spacing:.05em}.codex-cover-title strong,.codex-hardback-front .codex-cover-title strong{font-size:clamp(26px,5vw,36px)}.codex-cover-title>span:last-child{font-size:6px;letter-spacing:0}.codex-table-hint{left:3%;right:54%;top:62%;font-size:9px}.codex-table-hint strong{font-size:23px}
  .codex-dialog>.codex-classes{margin-bottom:8px;gap:4px}.codex-dialog>.codex-classes button{width:94px;min-width:94px;min-height:44px;height:44px;flex:none;flex-direction:row;padding:4px}.codex-dialog>.codex-classes .codex-art{width:22px}.codex-dialog>.codex-classes button span:not(.codex-art){font-size:9px}.codex-dialog>.codex-classes .codex-exclusive span:not(.codex-art){font-size:9px!important}
  .codex-dialog .codex{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);background-image:url('assets/art/classes/codex-spread.webp');background-size:100% 100%;background-position:center;overflow:visible}
  .codex-dialog .codex-index{padding:22px 10px 34px;background:transparent;border:0}.codex-dialog .codex-index>.codex-kicker,.codex-dialog .codex-index-note{display:block;font-size:8px}.codex-frontispiece{gap:12px}.codex-frontispiece>.codex-art{width:clamp(50px,22vw,110px)}.codex-frontispiece h4{font-size:20px}.codex-frontispiece p{font-size:9px}
  .codex-dialog .codex-sheet{padding:18px 10px 38px;background:transparent;border:0}.codex-dialog .codex-sheet h3{font-size:18px}.codex-dialog .codex-summary{font-size:11px}.codex-dialog .codex-page-head{flex-wrap:wrap;gap:4px}.codex-dialog .codex-page-head button{font-size:9px;padding:3px 5px;min-height:25px}.codex-dialog .codex-kicker{font-size:8px}.codex-dialog .codex-tabs{gap:3px;flex-wrap:wrap}.codex-dialog .codex-tabs button{padding:4px 5px;font-size:9px}
  .codex-spell-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.codex-spell{min-height:82px;padding:5px 2px}.codex-spell .codex-art{width:30px}.codex-spell strong{font-size:10px}.codex-spell small{font-size:8px}.codex-training-grid .codex-spell{min-height:74px}.codex-training-grid .codex-art{width:27px}.codex-training-grid strong{font-size:9px}.codex-training-grid small{font-size:8px}.codex-dialog .codex-content p{font-size:11px}.codex-inspect{padding:6px 0}.codex-inspect h4{font-size:12px}.codex-dialog .codex-content .codex-catch{font-size:10px}.codex-dialog .codex-content select{font-size:11px}
  .codex-dialog .codex-page-nav{gap:3px;flex-wrap:wrap;justify-content:space-between}.codex-dialog .codex-page-nav button{font-size:10px;padding:4px 3px}.codex-dialog .codex-page-nav p{font-size:9px;order:-1;flex-basis:100%;text-align:center}
  .codex-dialog .codex-leaf,.codex-dialog .codex-turn-rest,.codex-dialog .codex-cover{left:50%;width:50%;top:0;height:100%;grid-row:1;grid-column:auto}
  .codex-landed::before{inset:18px 0 20px 10px}.codex-dialog .codex-landed>.codex-page-copy,.codex-dialog .codex-page-face--back>.codex-page-copy{padding:18px 10px 38px}.codex-landed .codex-page-head{min-height:29px}
  .codex-dialog .codex-innate{display:block}.codex-dialog .codex-innate img{height:150px;width:100%}.codex-dialog .codex-pending{display:block;min-height:0}.codex-dialog .codex-pending>.codex-art{width:60px;margin-bottom:10px}
}
html.motion-off .codex-table-book,html.motion-off .codex-table-cover{transition:none!important}
@media(prefers-reduced-motion:reduce){.codex-table-book,.codex-table-cover{transition:none!important}}
