/* Section rhythm: distinct paper surfaces, graphite rules and small engraved accents. */
:root{--boundary-ink:#9ba6b4;--boundary-accent:#687c99;--boundary-paper:#fff;--boundary-gap:28px}
.home-experience .library-grid{display:grid;gap:var(--boundary-gap)}
.home-experience .product-item{position:relative;background:var(--boundary-paper);border:1px solid var(--boundary-ink);border-radius:8px;padding:24px;gap:32px;box-shadow:0 5px 0 -2px #f6f7f9,0 5px 0 -1px #c2c9d2;overflow:hidden}
.home-experience .product-item:hover{border-color:#526985;background:#fff}
.home-experience .product-body{min-width:0}
.home-experience .product-bottom{border-top:1px solid #c5ccd5;padding-top:18px}
.home-experience .home-collection{border-top:3px double var(--boundary-ink);margin-top:32px;padding-top:40px}
.home-experience .section-heading{border-left:3px solid var(--boundary-accent);padding-left:20px}
.home-experience .library-toolbar{border-bottom:1px solid var(--boundary-ink);margin-bottom:28px}
.home-experience .how-section{border-top:3px double var(--boundary-ink);margin-top:64px;padding-top:36px}
.home-experience .use-notes{gap:18px}
.home-experience .use-notes article{padding:22px!important;border:1px solid #bcc5d0;border-radius:6px;background:#fff}
.portal .catalogue-cards{gap:28px;align-items:stretch}
.portal .tool-card{position:relative;min-width:0;padding:24px;background:#fff;border:1px solid var(--boundary-ink);border-radius:8px;box-shadow:0 5px 0 -2px #f6f7f9,0 5px 0 -1px #c2c9d2;overflow:hidden}
.portal .tool-card:hover{background:#fff;border-color:#526985}
.portal .tool-card .catalogue-cover{margin:-24px -24px 22px;border-radius:7px 7px 0 0;border-bottom:1px solid #a7b0bd}
.portal .tool-card-top{border-bottom:1px solid #d1d7df;padding-bottom:16px;gap:12px;flex-wrap:wrap}
.portal .tool-card-bottom{border-top:1px solid #c5ccd5;padding-top:18px;margin-top:auto}
.portal .catalogue-bar{border-bottom:3px double var(--boundary-ink);padding-bottom:18px;margin-bottom:24px}
.portal .catalogue-filters{border-top:3px solid var(--boundary-accent);padding-top:18px}
.portal .page-heading{border-bottom:3px double var(--boundary-ink);padding-bottom:28px;margin-bottom:28px}
.portal .detail-layout{gap:32px}
.portal .detail-layout>section,.portal .purchase-box,.portal .surface,.portal .tool-form,.portal .tool-output{border:1px solid #a7b1be;border-radius:8px;background:#fff;padding:28px;min-width:0}
.portal .detail-layout>section>h2,.portal .purchase-box>h2{border-bottom:1px solid #c5ccd5;padding-bottom:16px;margin-bottom:20px}
.portal .feature-list li+li{border-top:1px solid #d2d8e0}
.portal .link-row{border:1px solid #a7b1be;border-left:3px solid var(--boundary-accent);border-radius:6px;background:#fff;padding:24px;margin:20px 0}
.portal .auth-layout{border:1px solid #a7b1be;border-top:3px solid var(--boundary-accent);padding:32px;border-radius:8px;background:#fff}
.product-stage,.illustrated-stage.product-stage{border-bottom:3px double var(--pd-line,#9ba6b4)}
.illustrated-stage .stage-illustration{border:1px solid var(--pd-line,#9ba6b4);box-shadow:0 4px 0 -1px var(--pd-soft,#edf0f4)}
[data-product-theme] .assessment-notice{border-color:var(--pd-accent,#687c99)}
[data-product-theme] .question-paper,[data-product-theme] .intro-paper,[data-product-theme] .result-card,[data-product-theme] .dimension-card{border:1px solid var(--pd-accent,#687c99)}
[data-product-theme] .quiz-navigation,[data-product-theme] .question-footer{border-top:1px solid var(--pd-line,#a7b1be);padding-top:20px;margin-top:20px}
[data-product-theme] .option-button{border-color:var(--pd-line,#a7b1be)}
/* Staff surfaces retain their own navigation and permission boundaries. */
.product-grid{gap:24px}
.product-grid>.product-card{border:1px solid #9faaa8;border-top:3px solid #798779;background:#fff;border-radius:8px;padding:24px}
.product-card .product-top{border-bottom:1px solid #c8d0c8;padding-bottom:14px;margin-bottom:16px}
.product-card .product-actions{border-top:1px solid #c8d0c8;padding-top:18px;margin-top:20px;gap:10px}
.delivery-panel{border-color:#9faaa8;border-top:3px solid #798779}
.delivery-row{border:1px solid #bac3bc;border-radius:6px;padding:20px;margin-top:16px;background:#fff}
@media(max-width:680px){
 :root{--boundary-gap:24px}
 .home-experience .product-item{padding:18px;gap:20px}
 .home-experience .home-collection{padding-top:28px;margin-top:24px}
 .home-experience .section-heading{padding-left:14px}
 .home-experience .how-section{margin-top:40px;padding-top:28px}
 .portal .catalogue-cards{gap:24px}
 .portal .tool-card{padding:20px}
 .portal .tool-card .catalogue-cover{margin:-20px -20px 20px}
 .portal .detail-layout{gap:24px}
 .portal .detail-layout>section,.portal .purchase-box,.portal .surface,.portal .tool-form,.portal .tool-output,.portal .auth-layout,.portal .link-row{padding:20px}
 .portal .page-heading{padding-bottom:22px}
 .product-grid>.product-card{padding:20px}
}
@media(prefers-reduced-motion:reduce){.product-item,.tool-card{transition:none!important}}

/* Card geometry is explicit: never nest horizontal cards inside narrow columns. */
.home-experience .library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;align-items:stretch}
.home-experience .product-item{display:flex;flex-direction:column;grid-template-columns:none;gap:0;padding:0;min-width:0;align-items:stretch}
.home-experience .product-item .product-art{display:block;width:100%;height:auto;min-height:0;aspect-ratio:3/2;padding:0;border-radius:7px 7px 0 0;overflow:hidden;flex:none}
.home-experience .product-item .product-art img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:3/2}
.home-experience .product-item .product-body{display:flex;flex-direction:column;width:100%;padding:22px;flex:1;min-width:0}
.home-experience .product-body h3{font-size:22px;line-height:1.4;letter-spacing:0;margin:16px 0 10px;overflow-wrap:break-word;word-break:normal}
.home-experience .product-meta{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:11px}
.home-experience .product-meta>span{white-space:nowrap}
.home-experience .product-body>p{font-size:13px;line-height:1.8;margin-bottom:20px}
.home-experience .product-bottom{margin-top:auto;display:flex;flex-wrap:wrap;gap:10px 18px;padding-top:16px}
.home-experience .product-bottom>span{font-size:12px}
.portal .tool-card{display:flex;flex-direction:column;min-width:0}
.portal .tool-card .catalogue-cover{flex:none;aspect-ratio:3/2}
.portal .tool-card .catalogue-cover img{width:100%;height:100%;object-fit:cover}
.portal .tool-card .tool-number{font:12px/1.6 var(--sans);letter-spacing:.04em;white-space:nowrap;color:#68707d}
.portal .tool-card h2{font-size:23px;line-height:1.4;margin-top:18px}
.portal .tool-card>p{margin-bottom:24px}
.portal .tool-card .money{font:13px/1.6 var(--sans);color:#586374}
@media(max-width:1150px){.home-experience .library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}}
@media(max-width:680px){.home-experience .library-grid{grid-template-columns:minmax(0,1fr);gap:24px}.home-experience .product-item{padding:0;gap:0}.home-experience .product-item .product-body{padding:20px}.home-experience .product-body h3{font-size:22px}}
