.template-directory, .template-page {
    color: var(--studio-white);
}

.template-library-head {
    position:relative; isolation:isolate; overflow:hidden;
    padding-block: clamp(46px, 5.3vw, 84px);
    background:var(--studio-canvas);
}
.template-library-head .guide-wrap,
.template-next .guide-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}
.template-library-art { position:absolute; inset:0 0 0 auto; width:55%; height:100%; object-fit:cover; z-index:-2; }
.template-library-head:after { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(0deg,var(--studio-canvas),transparent var(--studio-fade)),linear-gradient(90deg,var(--studio-canvas) 36%,#140f23f5 44%,#140f2399 57%,transparent 76%); }
.template-library-head .guide-wrap > div { width:48%; }
.template-library-head h1 { max-width: 13ch; }
.template-library-head .guide-wrap p { max-width: 46ch; }
.template-library-head .guide-search { width: min(100%, 375px); flex: none; }
.template-inventory { padding-block: clamp(24px, 3.2vw, 52px) clamp(42px, 6vw, 88px); }
.template-results { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.template-results p { margin: 0; }
.template-shelf {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(26px, 3.2vw, 50px) clamp(35px, 6vw, 104px);
}
.template-print { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:clamp(14px,1.7vw,28px); min-width:0; text-decoration:none; color:inherit; }
.template-symbol { display:grid; place-items:center; width:clamp(48px,5vw,72px); aspect-ratio:1; background:var(--studio-panel); color:var(--studio-accent); border-radius: 5px 20px 5px 20px; }
.template-symbol .icon { width:45%; height:45%; }
.template-print:is([data-medium=casting],[data-medium=film]) .template-symbol { color:#dacdfa; background:#352b4f; border-radius: 20px 5px 20px 5px; }
.template-print:is([data-medium=manuscript],[data-medium=general]) .template-symbol { color:#dcd4f6; background:#342c4d; }
.template-print:is([data-medium=photography],[data-medium=portfolio]) .template-symbol { color:#c6b7f8; background:#271d4a; border-radius:20px 5px 20px 5px; }
.template-print h2 { margin:0 0 6px; font-size:clamp(1.28rem,2vw,1.95rem); line-height:1.13; letter-spacing:-.04em; }
.template-print p { margin:0; font-size:1rem; max-width:39ch; }
.template-open { display: inline-flex; align-items: center; gap: .4em; margin-top: 12px; color: var(--studio-accent); font-size: .94rem; font-weight: 600; text-decoration: underline; text-underline-offset: .22em; }
.template-open .icon { width: 1em; height: 1em; }
.template-print:is(:hover,:focus-visible) .template-open { color: var(--studio-white); }
.template-next { padding-block: clamp(38px, 4.8vw, 76px); background: linear-gradient(var(--studio-canvas), var(--studio-surface) 45%, var(--studio-footer)); }
.template-next h2,.template-fit h2,.template-story h2 { margin: 0; font-weight: 700; letter-spacing: -.048em; text-wrap: balance; line-height: 1.06; }
.template-next h2 { font-size: clamp(1.9rem, 3.6vw, 3.5rem); }
.template-next .button { flex: none; }

.template-studio {
    background: radial-gradient(ellipse at 6% 0%, #44327b5e, transparent 64%), linear-gradient(var(--studio-hero), var(--studio-surface));
}
.template-studio > .guide-wrap {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-areas: "intro form" "fit form";
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: clamp(36px, 4vw, 65px) clamp(32px, 6vw, 96px);
    padding-block: clamp(40px, 5vw, 78px);
}
.template-intro { grid-area: intro; }
.template-intro h1 { font-size: clamp(3rem, 5.4vw, 6rem); max-width: 13ch; }
.template-intro > p { max-width: 37ch; }
.template-form { grid-area: form; min-width: 0; width: 100%; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 24px 68px #0b08154d; }
.template-form iframe { width: 100%; display: block; border: 0; }
.template-fit { grid-area: fit; max-width: 43ch; }
.template-fit h2 { font-size: clamp(1.42rem, 2.25vw, 2.15rem); }
.template-fit p { margin-top: .7em; }
.template-projects { display: grid; justify-items: start; margin-top: 24px; }
.template-projects h3 { margin: 0 0 6px; font-size: 1.12rem; }
.template-story {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    background: linear-gradient(var(--studio-surface),var(--studio-panel) 52%,var(--studio-surface));
}
.template-story figure { margin: 0; position: relative; min-height: 250px; }
.template-story img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.template-story > div { padding: clamp(40px, 5.5vw, 86px) max(var(--guide-gutter), calc((100vw - 1280px) / 2)) clamp(40px, 5.5vw, 86px) clamp(28px, 5vw, 80px); }
.template-story h2 { font-size: clamp(2rem, 3.8vw, 3.8rem); }
.template-story h3 { margin: 24px 0 8px; font-size: 1.2rem; }
.template-story p { margin-block: .85em 0; }
@media(max-width:950px) {
    .template-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .template-studio > .guide-wrap { column-gap: 25px; grid-template-columns: minmax(0, .76fr) minmax(0, 1fr); }
}
@media(max-width:720px) {
    .template-library-head .guide-wrap, .template-next .guide-wrap { align-items: flex-start; flex-direction: column; gap: 22px; }
    .template-library-head .guide-wrap > div { width:min(100%, 450px); }
    .template-library-head { padding-bottom:24px; }
    .template-library-art { width:100%; }
    .template-library-head:after { background:linear-gradient(0deg,var(--studio-canvas),transparent 30%),linear-gradient(90deg,#140f23ef,#140f23d9 40%,#140f2399); }
    .template-library-head .guide-search { width:min(100%, 360px); margin:20px 0 0; }
    .template-shelf { grid-template-columns:1fr; }
    .template-print { gap:17px; }
    .template-studio > .guide-wrap { grid-template-columns: minmax(0,1fr); grid-template-areas: "intro" "form" "fit"; grid-template-rows: auto; gap: 30px; }
    .template-intro h1 { max-width: 16ch; }
    .template-fit { max-width: 52ch; }
    .template-story { display: block; }
    .template-story figure { height: clamp(170px, 44vw, 290px); min-height: 0; }
    .template-story > div { padding: 35px var(--guide-gutter) 42px; }
}
@media(max-width:440px) {
    .template-shelf { grid-template-columns: minmax(0,1fr); gap: 24px; }

    .template-print h2 { margin-top: 0; }
    .template-open { margin-top: 9px; }
}
