/* MoragaDev Core: component styles. Uses theme color variables with safe fallbacks. */
.md-section { margin: 3rem 0; }
.md-section__title { font-size: 1.35rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--base-3, #262d36); }
.md-two-col { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.md-two-col h3 { font-size: 1rem; margin-bottom: .5rem; }
.md-list { margin: 0 0 1rem 1.1rem; }
.md-list li { margin-bottom: .3rem; }
.md-links { list-style: none; margin: 0; padding: 0; }
.md-links li { padding: .45rem 0; border-bottom: 1px solid var(--base-3, #262d36); }
.md-links li:last-child { border-bottom: 0; }
.md-mono { font-family: var(--md-font-mono, ui-monospace, monospace); }

/* Spec tables */
.md-spec { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: .95rem; }
.md-spec th, .md-spec td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--base-3, #262d36); vertical-align: top; }
.md-spec th { width: 34%; font-family: var(--md-font-mono, monospace); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--contrast-2, #9aa4af); }
.md-glance { margin-bottom: 2rem; }

/* Data tables */
.md-table-wrap { overflow-x: auto; border: 1px solid var(--base-3, #262d36); border-radius: 10px; }
.md-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0; }
.md-table th, .md-table td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--base-3, #262d36); vertical-align: top; }
.md-table tr:last-child td { border-bottom: 0; }
.md-table th { background: var(--base-2, #161b22); font-family: var(--md-font-mono, monospace); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--contrast-2, #9aa4af); white-space: nowrap; }
.md-table__desc { font-size: .82rem; color: var(--contrast-2, #9aa4af); margin-top: .2rem; }
.md-ext { font-family: var(--md-font-mono, monospace); font-size: .72rem; color: var(--contrast-2, #9aa4af); }

/* Buttons */
.md-button { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 6px; background: var(--accent, #3ddc97); color: var(--base, #0e1116) !important; font-weight: 600; text-decoration: none; transition: background-color .15s, transform .15s; }
.md-button:hover { background: var(--accent-hover, #2bb57a); transform: translateY(-1px); }
.md-button__ext, .md-button__size { font-family: var(--md-font-mono, monospace); font-size: .75rem; opacity: .75; }
.md-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }

/* File box */
.md-filebox { background: var(--base-2, #161b22); border: 1px solid var(--base-3, #262d36); border-radius: 10px; padding: 1.25rem; margin: 0 0 2rem; }
.md-filebox .md-spec { margin-bottom: 1rem; }
.md-hash { word-break: break-all; font-size: .78rem; }
.md-locked { margin: 0; color: var(--accent-2, #ffb547); }

/* Firmware cards */
.md-fwgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 2rem; }
.md-fwcard { background: var(--base-2, #161b22); border: 1px solid var(--base-3, #262d36); border-radius: 10px; padding: 1.25rem; }
.md-fwcard--beta { border-color: color-mix(in srgb, var(--accent-2, #ffb547) 45%, var(--base-3, #262d36)); }
.md-fwcard__version { font-size: 1.9rem; font-weight: 600; line-height: 1.2; margin: .35rem 0 .15rem; color: var(--contrast, #e6edf3); }
.md-fwcard__date { font-size: .85rem; color: var(--contrast-2, #9aa4af); margin-bottom: .75rem; }
.md-fwcard p { margin: 0; font-size: .9rem; }

/* Resources hub on project pages */
.md-hub { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.md-hub__item { background: var(--base-2, #161b22); border: 1px solid var(--base-3, #262d36); border-radius: 10px; padding: 1.25rem; }
.md-hub__item .md-fwcard { background: none; border: 0; padding: 0; }
.md-hub__item p { margin: .4rem 0 0; }

/* Changelog */
.md-changelog__release { padding: 1.25rem 0; border-bottom: 1px solid var(--base-3, #262d36); }
.md-changelog__release:last-child { border-bottom: 0; }
.md-changelog__release header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; margin-bottom: .5rem; }
.md-changelog__release h3 { margin: 0; font-size: 1.15rem; }
.md-changelog__release h4 { font-family: var(--md-font-mono, monospace); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent, #3ddc97); margin: .9rem 0 .35rem; }
.md-changelog__date, .md-changelog__revs { font-size: .85rem; color: var(--contrast-2, #9aa4af); }

/* Cards (theme may override) */
.md-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.md-card { display: block; color: inherit; text-decoration: none; }
.md-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.md-card__body { padding: 1.1rem 1.25rem 1.25rem; }
.md-card__meta { margin-bottom: .5rem; }
.md-card__title { font-size: 1.1rem; margin: 0 0 .35rem; }
.md-card__text { font-size: .92rem; color: var(--contrast-2, #9aa4af); margin: 0; }
.md-card--static:hover { transform: none; }

/* Docs navigation */
.md-docnav { background: var(--base-2, #161b22); border: 1px solid var(--base-3, #262d36); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: .92rem; }
.md-docnav__root { font-weight: 600; display: inline-block; margin-bottom: .5rem; }
.md-docnav ol { margin: 0 0 0 1.25rem; columns: 2 220px; }
.md-docnav li { margin-bottom: .25rem; }
.md-docnav .is-current > a, .md-docnav__root.is-current { color: var(--accent, #3ddc97); }
.md-prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--base-3, #262d36); }

/* License */
.md-license__name { font-weight: 600; font-size: 1.1rem; margin-bottom: .5rem; }
.md-perms { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.md-perm { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border: 1px solid var(--base-3, #262d36); border-radius: 6px; font-size: .9rem; }
.md-perm--yes strong { color: var(--accent, #3ddc97); }
.md-perm--no strong { color: #ff6b6b; }
.md-perm--conditions strong { color: var(--accent-2, #ffb547); }

/* Filters, chips, misc */
.md-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; }
.md-filters input[type="search"] { flex: 1 1 240px; }
.md-filters select { flex: 0 1 200px; }
.md-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.md-chip { padding: .35rem .8rem; border: 1px solid var(--base-3, #262d36); border-radius: 999px; font-size: .85rem; color: var(--contrast-2, #9aa4af); text-decoration: none; }
.md-chip:hover, .md-chip.is-current { border-color: var(--accent, #3ddc97); color: var(--accent, #3ddc97); }
.md-archive__header { margin-bottom: 2rem; }
.md-archive__intro { color: var(--contrast-2, #9aa4af); max-width: 720px; }
.md-empty { color: var(--contrast-2, #9aa4af); }
.md-backlinks { font-size: .92rem; margin-top: 2rem; }
.md-notice { padding: .8rem 1rem; border-radius: 6px; border: 1px solid var(--base-3, #262d36); }
.md-notice--warn { border-color: var(--accent-2, #ffb547); color: var(--accent-2, #ffb547); }
.md-updates { list-style: none; margin: 0; padding: 0; }
.md-updates li { border-bottom: 1px solid var(--base-3, #262d36); }
.md-updates a { display: flex; gap: 1rem; padding: .7rem 0; text-decoration: none; }
.md-updates__date { margin-left: auto; color: var(--contrast-2, #9aa4af); font-size: .85rem; }

/* Home blocks */
.md-home-block { margin: 0 0 4.5rem; }
.md-home-block__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.md-home-block__head h2 { margin: 0; }
.md-home-block__head .md-eyebrow { margin: 0 0 .35rem; }
.md-home-block__more { white-space: nowrap; font-size: .92rem; }

/* WooCommerce */
.md-product-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.md-product-meta a.md-badge { text-decoration: none; }
.md-product-video { margin: 2rem 0; }
.md-product-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 10px; }
.md-lab-link { margin: 2rem 0; padding: 1.25rem; border: 1px solid var(--base-3, #262d36); border-radius: 10px; background: var(--base-2, #161b22); }
.md-lab-link p { margin: 0; }
.md-lab-link .md-eyebrow { margin-bottom: .35rem; }
.md-faq details { border-bottom: 1px solid var(--base-3, #262d36); padding: .85rem 0; }
.md-faq summary { cursor: pointer; font-weight: 600; }
.md-faq details p { margin: .6rem 0 0; color: var(--contrast-2, #9aa4af); }
