/* Gallery-only layout. Previews remain readable text, not images of reports. */
.template-gallery .gallery-example{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(24px,5vw,72px);align-items:start}
.template-gallery .gallery-copy{min-width:0}
.template-gallery .gallery-copy h2{margin-top:18px}
.template-gallery .gallery-meta{display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px 18px;margin:24px 0;padding:20px 0;border-top:1px solid #706972;border-bottom:1px solid #706972}
.template-gallery .gallery-meta dt{font-weight:700}
.template-gallery .gallery-meta dd{margin:0}
.template-gallery .gallery-specimen{min-width:0;margin:0;background:#eae3db;border:1px solid #a69b93;border-radius:12px;overflow:hidden;color:#28232a}
.template-gallery .gallery-specimen>figcaption{padding:14px 22px;font:700 12px/1.6 Montserrat,sans-serif;letter-spacing:.04em;color:#4e4145}
.template-gallery .gallery-paper{margin:0 16px 16px;padding:clamp(18px,3vw,34px);background:#fff;color:#28232a;box-shadow:0 6px 16px #28232a15;font:16px/1.6 Georgia,serif}
.template-gallery .gallery-paper p{color:inherit;font:inherit;margin:14px 0}
.template-gallery .gallery-paper h3{font:700 23px/1.3 Georgia,serif;color:#28232a;margin:20px 0}
.template-gallery .gallery-paper h4{font:700 17px/1.4 Georgia,serif;color:#28232a;margin:24px 0 6px}
.template-gallery .gallery-paper .paper-label{font:700 11px/1.5 Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.06em;color:#823122}
.template-gallery .gallery-paper table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px;line-height:1.5;margin:20px 0;color:#28232a;background:#fff}
.template-gallery .gallery-paper caption{font-weight:700;text-align:left;padding:0 0 8px}
.template-gallery .gallery-paper th,.template-gallery .gallery-paper td{padding:10px 7px;text-align:left;overflow-wrap:anywhere;border:0;border-bottom:1px solid #d4cdd1;background:#fff;color:#28232a}
.template-gallery .gallery-paper thead th{border-top:2px solid #28232a;border-bottom:1px solid #28232a;vertical-align:bottom}
.template-gallery .gallery-paper th:first-child{width:43%}
.template-gallery .gallery-paper .paper-callout{border-left:3px solid #a62d1d;padding:12px;background:#f7f2ed;font-size:14px}
.template-gallery .paper-fields{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px 12px;font-size:14px}
.template-gallery .paper-fields dt{font-weight:700}
.template-gallery .paper-fields dd{margin:0}
.template-gallery .paper-outline{padding-left:22px}
.template-gallery .paper-outline li{padding:10px 0;border-bottom:1px solid #d4cdd1}
.template-gallery .paper-outline span{display:block;font-size:14px}
.template-gallery .gallery-visually-hidden{position:absolute;width:1px;height:1px;padding:0!important;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:800px){.template-gallery .gallery-example{grid-template-columns:1fr}.template-gallery .gallery-paper{margin:0 10px 10px}.template-gallery .gallery-meta{grid-template-columns:110px minmax(0,1fr)}.template-gallery .gallery-paper th,.template-gallery .gallery-paper td{padding:9px 5px}}
@media(prefers-reduced-motion:reduce){.template-gallery{scroll-behavior:auto}}

.template-gallery .gallery-paper td:nth-child(2),.template-gallery #sld-preview .gallery-paper td:nth-child(3){white-space:nowrap}

/* Page-local helpers adapted to the current AUTOMATA brand shell. */
.template-gallery .home-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:22px 0}
.template-gallery .resource-badge{display:inline-block;font:700 12px/1.5 Montserrat,sans-serif;color:var(--red-deep)}
.template-gallery .resource-jumps{display:flex;gap:12px 20px;flex-wrap:wrap;margin-top:28px;border:0;position:static;background:transparent;box-shadow:none;padding:0}
.template-gallery .resource-jumps a{display:inline-block;min-height:44px;padding:10px 0;font:600 14px/1.6 Montserrat,sans-serif}
.template-gallery section{scroll-margin-top:90px}
