/* Complete dark palette. The light theme retains the approved editorial colours. */
[data-theme="dark"]{color-scheme:dark}
[data-theme="light"]{color-scheme:light}
[data-theme="dark"] body{background:#19121d;color:#f6f2ed}
[data-theme="dark"] .works{background:radial-gradient(ellipse at 65% 0%,#302236 0%,#19121d 75%);color:#f6f2ed;border-top:1px solid #d6cbea24}
[data-theme="dark"] .work-image{border-color:#d6cbea40;box-shadow:0 18px 35px #09060d45}
[data-theme="dark"] .work-caption{color:#f6f2ed}
[data-theme="dark"] .work-caption span,[data-theme="dark"] .section-heading>p{color:#c9bed5}
[data-theme="dark"] .services{background:radial-gradient(ellipse at 10% 15%,#51405a,#382c40 72%);color:#f6f2ed;border-top:1px solid #d6cbea35;border-bottom:1px solid #d6cbea35}
[data-theme="dark"] .services:before{background:linear-gradient(115deg,transparent 40%,#d6cbea08 40.1%,transparent 75%)}
[data-theme="dark"] .service-intro h2 span,[data-theme="dark"] .service-number{color:#dcef69}
[data-theme="dark"] .service-row{border-color:#d6cbea40}
[data-theme="dark"] .service-word small,[data-theme="dark"] .service-detail p,[data-theme="dark"] .service-signature,[data-theme="dark"] .service-meta{color:#ded5e5}
[data-theme="dark"] .service-meta b,[data-theme="dark"] .service-detail .text-link{color:#dcef69}
[data-theme="dark"] .service-photo{box-shadow:0 10px 18px #10091540}
[data-theme="dark"] .service-row[open]{background:#180f1e24}
[data-theme="dark"] .resources{background:#19121d}
[data-theme="dark"] .themes-card{background:radial-gradient(ellipse at 85% 80%,#544060,#33263d 80%);color:#f3edf8}
[data-theme="dark"] .apps-card{background:radial-gradient(ellipse at 85% 80%,#485035,#252d23 80%);color:#f3f2e7}
[data-theme="dark"] .resource-card{border:1px solid #d6cbea30}
[data-theme="dark"] .themes-card h3{color:#e0d2f1}
[data-theme="dark"] .apps-card h3,[data-theme="dark"] .apps-card .platforms{color:#dcef69}
[data-theme="dark"] .resource-card>p{color:#e4dfe8}
[data-theme="dark"] .resource-card .resource-bottom,[data-theme="dark"] .resource-card .resource-bottom b{color:#f6f2ed}
[data-theme="dark"] .resource-card .resource-corner{color:#e8e1ef}
[data-theme="dark"] .resource-fold{background:linear-gradient(145deg,#655173,#44334f);border-bottom-color:#8b729d}
[data-theme="dark"] .resource-card>img{filter:drop-shadow(0 18px 16px #08040c55)}
[data-theme="dark"] .contact{background:radial-gradient(ellipse at 75% 15%,#3b2540,#221627 80%);color:#f6f2ed}
[data-theme="dark"] .contact-action p,[data-theme="dark"] .footer-identity p{color:#d6cbea}
[data-theme="dark"] .footer-identity{border-color:#d6cbea40}
[data-theme="dark"] footer{background:#160f19;color:#cfc3d9}
[data-theme="dark"] footer:before{background:#d6cbea30}
[data-theme="dark"] .mobile-nav,[data-theme="dark"] dialog{background:#302337;color:#f6f2ed;border:1px solid #d6cbea50}
[data-theme="dark"] dialog>p{color:#dcd2e4}
[data-theme="dark"] dialog input,[data-theme="dark"] dialog textarea{background:#1d1422;color:#f6f2ed;border-color:#a48caf88}
[data-theme="dark"] dialog .form-note{background:#dcef6912;border-color:#dcef69}
[data-theme="dark"] #brief-result{border-color:#d6cbea40}
[data-theme="dark"] .service-row:focus-within{outline-color:#dcef69}
@media(prefers-reduced-motion:no-preference){
 .works,.services,.resource-card,.contact,footer,dialog,.mobile-nav{transition:background-color .3s,color .3s,border-color .3s}
}


/* Shared card edge: the decorative fold must not add a second bottom border. */
.resource-grid{align-items:stretch}
.resource-card{box-sizing:border-box;border:1px solid #35223825;box-shadow:none;border-radius:3px}
.resource-fold,[data-theme="dark"] .resource-fold{border-bottom:0}
@media(max-width:700px){
 .works .section-heading>p{font-size:9px;line-height:1.55;max-width:180px}
 .work-caption span{font-size:11px;line-height:1.5;display:block;padding-right:25px}
 .work-caption h3{font-size:24px}
 .service-word small{font-size:13px;line-height:1.45}
 .service-meta{font-size:8px;letter-spacing:.06em;padding-left:12px}
 .service-signature{font-size:9px!important}
 .service-detail p{font-size:14px}
 .service-detail .text-link{font-size:12px;line-height:1.5;text-align:left}
 .resource-card{height:365px}
 .resource-card>p:not(.eyebrow){font-size:12px;line-height:1.4;max-width:55%}
 .resource-corner,.apps-card .resource-corner{font-size:8px;letter-spacing:.08em}
 .resource-card .platforms{font-size:14px}
 .resource-card>img{bottom:15%}
 .contact-action p{font-size:14px;line-height:1.5}
 .contact-action .round-link{font-size:14px;min-height:44px}
 .footer-identity p{font-size:10px;text-align:left}
 footer>span{font-size:10px}
 footer nav{font-size:12px;gap:20px;flex-wrap:wrap}
 footer nav a,footer nav button{min-height:36px;display:inline-flex;align-items:center}
 dialog>p,dialog label{font-size:14px}
 dialog input,dialog textarea{font-size:16px}
}

@media(max-width:360px){.header{gap:9px}.header .brand{width:155px}.header .menu-toggle{padding:10px 7px}.service-row summary{grid-template-columns:20% 46% 34%}.service-number{font-size:52px}.resource-card{padding-left:22px;padding-right:22px}.resource-card>h3,.apps-card h3{font-size:40px}.resource-bottom{left:22px;font-size:10px}.contact-action{display:flex;flex-wrap:wrap;gap:20px}.contact-action p{margin-bottom:0}}
