/* pages.mattlabs.ai: the Matt Labs app look (rna-os DESIGN.md + globals.css, Ace palette).
   Inter 400/500 only; title 16/20, label 13/16, body 14/20; white cards with a hairline, no shadow. */
@font-face { font-family: 'Inter'; src: url(/assets/Inter-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url(/assets/Inter-latin-ext.woff2) format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ace-bg: #FFFFFF; --ace-bg-1: #FAFAFA; --ace-bg-2: #F4F4F4;
  --ace-line: #EBEBEB; --ace-line-2: #E2E2E2;
  --ace-tx: #1D1D1D; --ace-tx-2: #5C5C5C; --ace-tx-3: #707070;
  --ace-accent-ink: #007A57; --ace-accent-soft: #E2F5EC;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ace-bg: #1B1B1B; --ace-bg-1: #0F0F0F; --ace-bg-2: #232323;
    --ace-line: #2E2E2E; --ace-line-2: #3A3A3A;
    --ace-tx: #EDEDED; --ace-tx-2: #C4C4C4; --ace-tx-3: #9C9C9C;
    --ace-accent-ink: #5BD9A6; --ace-accent-soft: #173327;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ace-bg: #1B1B1B; --ace-bg-1: #0F0F0F; --ace-bg-2: #232323;
  --ace-line: #2E2E2E; --ace-line-2: #3A3A3A;
  --ace-tx: #EDEDED; --ace-tx-2: #C4C4C4; --ace-tx-3: #9C9C9C;
  --ace-accent-ink: #5BD9A6; --ace-accent-soft: #173327;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ace-bg-1); color: var(--ace-tx); font: 400 14px/20px 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ace-accent-ink); outline-offset: 2px; }

/* Top: logo, then the path bar (same surface as the page, no hairline, not sticky) */
.top { max-width: 1120px; margin: 0 auto; padding: 20px 16px 0; display: grid; gap: 14px; }
.logo { display: inline-flex; width: 140px; }
.logo img { width: 140px; height: auto; display: block; }
.logo .dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .light { display: none; } :root:not([data-theme="light"]) .logo .dark { display: block; } }
:root[data-theme="dark"] .logo .light { display: none; }
:root[data-theme="dark"] .logo .dark { display: block; }
.caminho { display: flex; align-items: center; min-height: 46px; gap: 13px; color: var(--ace-tx-3); min-width: 0; }
.caminho a:hover { color: var(--ace-tx); }
.caminho [aria-current] { color: var(--ace-tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 8px 16px 64px; display: grid; gap: 16px; }
.head { display: grid; gap: 4px; }
h1 { margin: 0; font-size: 16px; line-height: 20px; font-weight: 500; }
.sub { margin: 0; color: var(--ace-tx-3); font-size: 13px; line-height: 16px; font-weight: 500; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: grid; background: var(--ace-bg); border: 1px solid var(--ace-line); border-radius: 18px; overflow: hidden; transition: border-color .15s, transform .15s; }
.card:hover, .card:focus-visible { border-color: var(--ace-accent-ink); outline: none; transform: translateY(-1px); }
.card-body { padding: 14px 16px; display: grid; gap: 4px; }
.card h2 { margin: 0; font-size: 16px; line-height: 20px; font-weight: 500; }
.card p { margin: 0; color: var(--ace-tx-3); font-size: 13px; line-height: 16px; font-weight: 500; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.row .card-body { padding: 0; }
.icone { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--ace-bg-2); display: grid; place-items: center; color: var(--ace-tx-2); font-size: 13px; font-weight: 500; }
.tag { justify-self: start; height: 20px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--ace-accent-soft); color: var(--ace-accent-ink); font-size: 13px; line-height: 16px; font-weight: 500; margin-top: 4px; }

/* Page preview: the real page in a scaled, non-interactive iframe */
.preview { position: relative; aspect-ratio: 16 / 10; background: var(--ace-bg-2); overflow: hidden; border-bottom: 1px solid var(--ace-line); }
.preview iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
