/* MAD Home: MAD Core colours (ink, blue), square edges like the stamp. Fonts: Archivo Black and Archivo
   (install both in MAD Core → Fonts so they're served from your own site; until then a close backup font shows). */
.madh {
	--madh-bg: #f4f5f7; --madh-panel: #fff; --madh-line: #e2e5ea; --madh-fg: #151a23; --madh-mut: #5b6474;
	--madh-blue: #2563eb; --madh-soon: #f59e0b; --madh-atlas: #1f8a4c; --madh-games: #c2410c; --madh-web: #6d28d9; --madh-red: #c62828;
	--madh-head: "Archivo Black", Impact, "Arial Black", sans-serif;
	--madh-text: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
	background: var(--madh-bg); color: var(--madh-fg); font: 15px/1.5 var(--madh-text);
	padding: 10px max(16px, env(safe-area-inset-right, 0px)) 50px max(16px, env(safe-area-inset-left, 0px));
	box-sizing: border-box; width: 100%;
}
.madh *, .madh *::before, .madh *::after { box-sizing: border-box; }
.madh-hero { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 34px 0 20px; }
.madh .madh-logo { margin: 6px 0 0; line-height: 0; color: var(--madh-fg); }
.madh-stamp { width: clamp(200px, 52vw, 340px); height: auto; overflow: visible; animation: madh-thud .55s cubic-bezier(.2, .9, .3, 1.3) both; }
.madh-logo:hover .madh-stamp { animation: madh-thud .45s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes madh-thud { 0% { transform: scale(2.4) rotate(8deg); opacity: 0; } 60% { transform: scale(.94) rotate(-1deg); opacity: 1; } 100% { transform: none; } }
.madh .madh-tag { margin: 0; font: 800 13px var(--madh-text); letter-spacing: 3px; text-transform: uppercase; color: var(--madh-mut); }
.madh .madh-go { display: inline-block; margin-top: 4px; font: 400 16px var(--madh-head); letter-spacing: 1px; padding: 12px 28px; background: var(--madh-blue); color: #fff; text-decoration: none; text-transform: uppercase; border-radius: 0; }
.madh .madh-go:hover, .madh .madh-go:focus { color: #fff; }
.madh-go:active { transform: scale(.97); }
.madh-sec { margin-top: 34px; scroll-margin-top: 80px; }
.madh .madh-sec h2, .madh .madh-what h2 { font: 400 26px/1 var(--madh-head); letter-spacing: 1px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--madh-fg); text-transform: none; }
.madh .madh-sec h2::before { content: ""; width: 12px; height: 12px; background: var(--c); flex: none; }
.madh-sub { margin: -4px 0 12px; color: var(--madh-mut); max-width: 70ch; }
.madh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.madh .madh-tile { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 14px; background: var(--madh-panel); border: 1px solid var(--madh-line); border-left: 4px solid var(--c); color: var(--madh-fg); text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; border-radius: 0; }
.madh a.madh-tile:hover, .madh a.madh-tile:focus-visible { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--c); color: var(--madh-fg); }
.madh a.madh-tile:active { transform: scale(.97); }
.madh-ic { width: 52px; height: 52px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.madh-ic svg { width: 28px; height: 28px; }
.madh-txt { min-width: 0; }
.madh .madh-tile h3 { display: block; margin: 0; font: 800 16px/1.2 var(--madh-text); color: inherit; text-transform: none; letter-spacing: 0; }
.madh-mad { display: block; font: 400 11px/1.3 var(--madh-head); letter-spacing: 1px; text-transform: uppercase; color: var(--c); margin: 2px 0 3px; }
.madh-line { display: block; color: var(--madh-mut); font-size: 13px; line-height: 1.35; }
.madh-soon { opacity: .5; }
.madh-badge { position: absolute; top: 8px; right: 10px; font: 400 10px var(--madh-head); letter-spacing: 1px; text-transform: uppercase; padding: 2px 7px; background: var(--madh-soon); color: var(--madh-fg); }
.madh-admin { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--madh-red); }
.madh .madh-hot { grid-column: span 2; background: var(--c); border-color: var(--c); color: #fff; }
.madh a.madh-hot:hover, .madh a.madh-hot:focus-visible { color: #fff; }
.madh-hot .madh-ic { background: rgba(255, 255, 255, .18); color: #fff; }
.madh-hot .madh-mad, .madh-hot .madh-line { color: rgba(255, 255, 255, .9); }
.madh-hot.madh-soon .madh-admin { color: #fff; }
@media (max-width: 540px) { .madh .madh-hot { grid-column: auto; } }
.madh-atlas { --c: var(--madh-atlas); }
.madh-games { --c: var(--madh-games); }
.madh-web { --c: var(--madh-web); }
.madh-what { margin-top: 40px; padding: 20px; background: var(--madh-panel); border: 1px solid var(--madh-line); border-left: 4px solid var(--madh-fg); display: grid; gap: 6px; }
.madh-what p { margin: 0; color: var(--madh-mut); max-width: 70ch; }
.madh-foot { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.madh .madh-foot a, .madh .madh-foot button { font: 600 13px var(--madh-text); color: var(--madh-fg); text-decoration: none; padding: 8px 14px; border: 1px solid var(--madh-line); background: var(--madh-panel); border-radius: 0; cursor: pointer; line-height: 1.5; }
.madh .madh-foot .madh-app { background: var(--madh-blue); border-color: var(--madh-blue); color: #fff; }
.madh-todo { margin-top: 26px; padding: 12px 14px; border: 1px dashed var(--madh-red); background: var(--madh-panel); display: grid; gap: 4px; font-size: 13px; }
.madh-todo b { color: var(--madh-red); }
@media (prefers-reduced-motion: reduce) { .madh-stamp { animation: none; } .madh .madh-tile, .madh-go { transition: none; } }
