/*
  Portal preview: the app in a browser window, shared by the home and the owners page.
  Semantic tokens only, same rules as components.css.
*/

.portal-band .section-intro { max-width: 40rem; }
.browser { border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-float); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--color-surface-sunken); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--color-surface-strong); }
.browser-url { flex: 1; margin-left: var(--space-3); padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-xs); color: var(--color-text-muted); text-align: center; }
.app-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-5); }
.app-brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.app-brand .brand-mark { width: 22px; height: 22px; }
.app-brand .brand-mark svg { width: 12px; height: 12px; }
.app-links { display: flex; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.app-links > * { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); }
.app-links b { background: var(--color-surface-sunken); color: var(--color-text); font-weight: var(--weight-medium); }
.portal { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-5); padding: var(--space-4) var(--space-5) var(--space-5); background: var(--color-bg); font-size: var(--text-sm); }
.results { display: grid; gap: var(--space-3); align-content: start; }
.search-row { display: flex; gap: var(--space-2); }
.search-box { flex: 1; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-surface-sunken); color: var(--color-text-muted); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-go { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-brand); color: var(--color-text-on-brand); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.filters span { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--color-surface-sunken); font-size: var(--text-xs); }
.results-n { margin-top: var(--space-1); }
.rcard { display: grid; grid-template-columns: 0.95fr 1.05fr; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.rcard-pics { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-content: start; background: var(--color-surface-sunken); }
.rcard-pics img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pic-count { position: absolute; top: var(--space-2); left: var(--space-2); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
.rcard-price { padding: var(--space-3) var(--space-3) var(--space-3); grid-column: 1 / -1; }
.rcard-price b { display: block; font-size: var(--text-lg); font-weight: var(--weight-semibold); font-variation-settings: var(--flare-heading); }
.rcard-body { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-3) var(--space-4) var(--space-4); }
.rcard-top { display: flex; justify-content: space-between; align-items: start; gap: var(--space-3); }
.rcard-top .h3 { font-size: var(--text-md); }
.ring { position: relative; isolation: isolate; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--color-success) calc(var(--v) * 1%), var(--color-surface-strong) 0); font-size: var(--text-xs); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.ring::before { content: ""; position: absolute; z-index: -1; inset: 4px; border-radius: 50%; background: var(--color-surface); }
.ring-lg { width: 54px; height: 54px; font-size: var(--text-md); }
.ring-lg::before { inset: 6px; }
.specs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--text-xs); color: var(--color-text-muted); }
.rcard-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--text-xs); }
.rcard-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.rcard-next { opacity: 0.55; }
.detail { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.gallery-main { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-1); margin-top: var(--space-1); }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.detail .rcard-tags { margin-top: 0; }
.detail-title { font-size: var(--text-lg); }
.detail-price b { font-size: var(--text-lg); font-weight: var(--weight-semibold); font-variation-settings: var(--flare-heading); }
.owner-box { display: grid; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-bg); }
.owner { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.owner > span:last-child { display: grid; line-height: 1.25; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--color-brand-soft); color: var(--color-brand-strong); font-weight: var(--weight-semibold); }
.owner-box .btn { font-size: var(--text-xs); padding: var(--space-2) var(--space-3); pointer-events: none; }
.why { padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-sunken); }
.why-head { display: flex; align-items: center; gap: var(--space-3); }
.why .factors { margin-top: var(--space-3); gap: var(--space-2); }
.why .factors li { grid-template-columns: 6.5rem 1fr; font-size: var(--text-xs); }
.why .factors .meter { height: 8px; }
.portal-notes { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-7); font-size: var(--text-sm); color: var(--color-text-muted); }
.portal-notes b { display: block; margin-bottom: var(--space-1); color: var(--color-text); font-weight: var(--weight-semibold); }
.portal-band .more-link { margin-top: var(--space-7); }


/* Match meters (shared with the owners page's match panel) */
.factors { list-style: none; display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.factors li { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.factors .meter { height: 10px; border-radius: var(--radius-pill); background: var(--color-surface-strong); overflow: hidden; }
.factors .meter i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--color-success); }

/* Built on AI, one criterion */
.ai-band { padding-block: var(--space-8); }
.ai-band .section-intro { max-width: 44rem; margin: 0 auto; text-align: center; }
.ai-band .badge { margin-bottom: var(--space-5); }
.tools-intro { max-width: 44rem; margin: var(--space-8) auto 0; text-align: center; }
.tools-intro .lead { margin-top: var(--space-4); }
.tools { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr; gap: var(--space-5); margin-top: var(--space-7); }
.tool { display: grid; align-content: center; border-radius: var(--radius-lg); background: var(--color-bg); box-shadow: var(--shadow-sm); overflow: hidden; }
.tool img { display: block; width: 100%; height: auto; }
.tool:first-child img, .tool-tall img { padding: var(--space-4) var(--space-4) 0; }
.tool-tall img { padding: 0; margin: var(--space-4) var(--space-4) 0; width: calc(100% - 2 * var(--space-4)); object-fit: contain; border-radius: var(--radius-md); }
.tool figcaption, .tool-list { padding: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); }
.tool figcaption b { display: block; margin-bottom: var(--space-1); font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--color-text); }
.tool-list .checks { gap: var(--space-3); }
.tool-list .checks li { font-size: var(--text-sm); }
.tool-list .small { margin-top: var(--space-5); }


@media (max-width: 960px) {
  .tools { grid-template-columns: 1fr 1fr; }
  .tools .tool:first-child { grid-column: 1 / -1; }
  .portal { grid-template-columns: 1fr; }
  .portal-notes { grid-template-columns: 1fr; gap: var(--space-4); }
}
@media (max-width: 600px) {
  .tools { grid-template-columns: 1fr; }
  .rcard { grid-template-columns: 1fr; }
  .rcard-pics img { aspect-ratio: 4 / 3; }
  .app-links { display: none; }
  .portal { padding: var(--space-3); }
}
