/* A theme-independent baseline; Maddagu Minimal supplies the shared design tokens. */
.mtdl {
  --mtdl-card: var(--card, #fff);
  --mtdl-ink: var(--ink, #1d1d1f);
  --mtdl-muted: var(--muted, #68686e);
  --mtdl-soft: var(--soft, #e8ebe8);
  --mtdl-accent: var(--accent, #335b48);
  --mtdl-button-text: var(--page, #f5f5f7);
  --mtdl-shadow: var(--shadow, 0 4px 22px rgb(0 0 0 / .035));
  width: 100%;
  max-width: none;
  color: var(--mtdl-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.mtdl *, .mtdl *::before, .mtdl *::after { box-sizing: border-box; }
.mtdl h1, .mtdl h2, .mtdl h3, .mtdl p, .mtdl figure, .mtdl dl, .mtdl dd { margin: 0; }
.mtdl a { color: inherit; }
.mtdl :focus-visible { outline: 3px solid var(--mtdl-accent); outline-offset: 5px; }
.mtdl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.mtdl-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--mtdl-card); border-radius: 20px; box-shadow: var(--mtdl-shadow); }
.mtdl .mtdl-preview { display: grid; place-items: center; aspect-ratio: 1.5; overflow: hidden; padding: 24px; background: var(--mtdl-soft); text-decoration: none; }
.mtdl .mtdl-preview img { display: block; width: 100%; max-height: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; object-position: top; border-radius: 7px; box-shadow: 0 6px 18px rgb(0 0 0 / .1); transition: transform .25s ease; }
.mtdl .mtdl-preview:hover img { transform: translateY(-3px); }
.mtdl-no-preview { font-size: 28px; font-weight: 600; text-align: center; letter-spacing: -.03em; overflow-wrap: anywhere; }
.mtdl-card-body { flex: 1; display: flex; flex-direction: column; padding: 28px; }
.mtdl-card-heading { display: flex; align-items: baseline; gap: 16px; justify-content: space-between; }
.mtdl .mtdl-card-heading h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.8px; font-weight: 650; overflow-wrap: anywhere; }
.mtdl .mtdl-card-heading h2 a { text-decoration: none; }
.mtdl .mtdl-card-heading h2 a:hover { color: var(--mtdl-accent); }
.mtdl-price { color: var(--mtdl-muted); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.mtdl-card-heading .mtdl-price { flex: 0 1 auto; max-width: 45%; text-align: end; }
.mtdl .mtdl-summary { margin-top: 12px; font-size: 15px; color: var(--mtdl-muted); line-height: 1.65; overflow-wrap: anywhere; }
.mtdl .mtdl-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 18px 0 0; font-size: 12px; color: var(--mtdl-muted); }
.mtdl-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: auto; padding-top: 24px; }
.mtdl-download-form { margin: 0; padding: 0; }
.mtdl .mtdl-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 11px 18px; border: 0; border-radius: 10px; background: var(--mtdl-accent); color: var(--mtdl-button-text); font-family: inherit; font-size: 13px; line-height: 1.5; font-weight: 500; text-decoration: none; cursor: pointer; text-align: center; }
.mtdl .mtdl-button:hover { filter: brightness(.93); }
.mtdl-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mtdl .mtdl-details-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; color: var(--mtdl-accent); text-decoration: none; }
.mtdl-details-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.mtdl-details-link > span[aria-hidden] { font-size: 20px; }
.mtdl-unavailable { display: inline-block; padding-block: 11px; font-size: 13px; color: var(--mtdl-muted); }
.mtdl .mtdl-back { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-bottom: 20px; font-size: 14px; color: var(--mtdl-accent); text-decoration: none; }
.mtdl-back > span { font-size: 23px; }
.mtdl-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 36px; margin-bottom: 32px; }
.mtdl-detail-header > div:first-child { max-width: 660px; min-width: 0; }
.mtdl .mtdl-detail-header h1, .mtdl .mtdl-detail-header h2 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -.04em; font-weight: 650; overflow-wrap: anywhere; }
.mtdl .mtdl-detail-summary { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--mtdl-muted); overflow-wrap: anywhere; }
.mtdl-detail-offer { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 12px; padding-top: 5px; }
.mtdl .mtdl-detail-preview { overflow: hidden; background: var(--mtdl-soft); border-radius: 20px; padding: 36px; box-shadow: var(--mtdl-shadow); }
.mtdl .mtdl-detail-preview img { display: block; width: 100%; height: auto; border-radius: 9px; box-shadow: 0 8px 28px rgb(0 0 0 / .1); }
.mtdl-specs-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px; padding-block: 28px; }
.mtdl-specs { display: flex; gap: 20px 44px; flex-wrap: wrap; }
.mtdl-specs dt { color: var(--mtdl-muted); font-size: 12px; margin-bottom: 6px; }
.mtdl-specs dd { color: var(--mtdl-ink); font-size: 14px; }
.mtdl .mtdl-description { max-width: 760px; font-size: 17px; line-height: 1.75; padding-top: 16px; overflow-wrap: anywhere; }
.mtdl-description > * + * { margin-top: 18px; }
.mtdl-description h2, .mtdl-description h3 { font-size: 26px; line-height: 1.25; letter-spacing: -.03em; margin-top: 30px; }
.mtdl-description img { max-width: 100%; height: auto; border-radius: 12px; }
.mtdl-description a, .mtdl-empty a { color: var(--mtdl-accent); text-decoration: underline; text-underline-offset: 3px; }
.mtdl .mtdl-install { max-width: 760px; margin-top: 32px; padding: 20px 24px; border-radius: 14px; background: var(--mtdl-card); box-shadow: var(--mtdl-shadow); font-size: 14px; }
.mtdl-install summary { cursor: pointer; font-weight: 550; min-height: 24px; }
.mtdl-install ol { margin: 16px 0 0; padding-inline-start: 20px; line-height: 1.8; }
.mtdl-install li + li { margin-top: 8px; }
.mtdl-empty { padding: 28px; border-radius: 16px; background: var(--mtdl-card); color: var(--mtdl-muted); }
.mtdl-pagination ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.mtdl-pagination a, .mtdl-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: var(--mtdl-card); text-decoration: none; }
.mtdl-pagination .current { background: var(--mtdl-accent); color: var(--mtdl-button-text); }
/* A shortcode in the Downloads page uses the same full-width catalogue. */
.tpl-downloads-page .tpl-content:has(.mtdl) { max-width: 100%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mtdl { --mtdl-card: var(--card, #1d1e20); --mtdl-ink: var(--ink, #f5f5f7); --mtdl-muted: var(--muted, #a8a9ae); --mtdl-soft: var(--soft, #2b302d); --mtdl-accent: var(--accent, #b3cbbd); --mtdl-button-text: var(--page, #101112); }
}
:root[data-theme="dark"] .mtdl { --mtdl-card: var(--card, #1d1e20); --mtdl-ink: var(--ink, #f5f5f7); --mtdl-muted: var(--muted, #a8a9ae); --mtdl-soft: var(--soft, #2b302d); --mtdl-accent: var(--accent, #b3cbbd); --mtdl-button-text: var(--page, #101112); }
@media (max-width: 700px) {
  .mtdl-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mtdl-card-body { padding: 24px; }
  .mtdl .mtdl-preview { padding: 20px; }
  .mtdl-detail-header { flex-direction: column; gap: 20px; }
  .mtdl-detail-offer { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px; }
  .mtdl .mtdl-detail-preview { padding: 16px; border-radius: 14px; }
  .mtdl .mtdl-detail-summary { font-size: 17px; }
  .mtdl-specs { column-gap: 28px; }
}
@media (prefers-reduced-motion: reduce) { .mtdl .mtdl-preview img { transition: none; } .mtdl .mtdl-preview:hover img { transform: none; } }
