/* The Portal (services/engine/src/portal): the approved mockup's tiles, in the kit's Frame, on the kit's tokens.
   Tiles of equal height, each with its test site in a strip along the bottom (Jamie, 2 and 3 Dec 2026). */
.portal-home h1 { margin: 0 0 4px; }
.portal-lead { color: var(--ink-2); margin: 0 0 28px; font-size: 17px; }
.portal-section { margin: 0 0 36px; }
.portal-section h2 { margin: 0 0 2px; font-size: 20px; }
.portal-section > .note { margin: 0 0 16px; }
/* As many tiles across as fit, every row the same height, so a section of any size stays even (3 December 2026). */
.portal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 1fr; gap: 16px; align-items: stretch; }
.portal-grid.manage { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.portal-tile-wrap { display: flex; flex-direction: column; min-width: 0; }
.portal-tile { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.portal-tile.soon { background: var(--surface-2); }
.portal-tile h3 { margin: 4px 0 0; font-size: 18px; color: var(--heading); }
.portal-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portal-blurb { margin: 0; color: var(--ink-2); flex: 1 1 auto; }
.portal-open { margin: 8px 0 0; }
.portal-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--navy-wash); color: var(--heading); flex: none; }
.portal-manage { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 44px; height: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.portal-manage div { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.portal-manage b { color: var(--heading); }
.portal-manage span { color: var(--ink-2); font-size: 14px; }
.portal-manage.soon { background: var(--surface-2); }
a.portal-manage:hover { border-color: var(--line-hover); }
.portal-foot { text-align: center; margin-top: 8px; }
@media (max-width: 640px) { .portal-grid, .portal-grid.manage { grid-template-columns: 1fr; } }
/* The test site strip along the bottom of every tile, always the same height so tiles line up (Jamie, 3 December 2026):
   the test colour (amber, as the test band) when it can be opened, a padlock when only Boundless can. */
.portal-tile:has(.portal-test) { padding-bottom: 0; }
.portal-test { display: flex; align-items: center; gap: 8px; min-height: 48px; height: 48px; box-sizing: border-box; margin: 8px -20px 0; padding: 0 20px;
  border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; font-size: 14px; text-decoration: none; color: var(--ink-2); }
.portal-test b { color: inherit; font-weight: 700; white-space: nowrap; }
.portal-test > svg:last-of-type:not(:first-child), a.portal-test > svg:last-of-type { margin-left: auto; }
.portal-test.none span { white-space: nowrap; }
.portal-test svg { width: 16px; height: 16px; flex: none; }
a.portal-test { background: var(--amber-wash); color: var(--amber-dark); border-top-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
a.portal-test:hover { background: #fbe6b3; background: color-mix(in srgb, var(--amber) 22%, var(--card)); }
.portal-test.none, .portal-test.off { background: transparent; color: var(--muted); }
a.portal-test:focus-visible { outline-offset: -3px; }
:root[data-theme="dark"] a.portal-test { color: var(--amber); }

/* Each product's own colour on its tile (kit.js PRODUCTS): a line along the top and the icon in the product's colour. */
.portal-tile.has-product { border-top: 3px solid var(--product-fill); }
.portal-tile.has-product .portal-icon { background: var(--product-wash); color: var(--product-ink); }
[data-theme="dark"] .portal-tile.has-product .portal-icon { background: var(--product-wash-dark); color: var(--product-ink-dark); }
