/* The Requester portal's Home, its header and tabs, and its search (GitHub issue 203, part 1c; docs/adr/0073; the
   owner's AG2, AG3 and AG7). public/js/app/portal-shell.js arranges the header and the tabs, portal-home.js draws Home
   and a new person's first visit, portal-search.js the search's results. Sizes are tokens (tokens.css: the portal
   reads at 16 px); colors are the palette's (styles.css). Loaded after styles.css, so its rules win over the older
   portal rules there. */

/* ---------- The header: one row ---------- */
/* The organization's mark and name, the search (on every tab but Home), the theme button and the avatar, which is the
   menu's button. On a phone it stays one row: the name gives way to the search. */
#requesterPortalView .requester-portal-header { position:relative; flex-direction:row; align-items:center; gap:var(--space-200); min-height:4rem; padding-top:var(--space-100); padding-bottom:var(--space-100); border-bottom:0; }
.requester-portal-brand { flex:0 1 auto; min-width:0; }
.requester-portal-brand > span:last-child { min-width:0; }
.requester-portal-brand b, .requester-portal-brand small { overflow:hidden; overflow-wrap:break-word; white-space:normal; }
.requester-portal-brand small { font-size:var(--text-xs); }
#requesterPortalView .requester-portal-user { flex:0 0 auto; width:auto; margin-left:auto; gap:var(--space-100); }
.requester-theme-button, .requester-profile-button { width:2.5rem; height:2.5rem; }
#requesterPortalView .requester-profile-button { display:grid; place-items:center; gap:0; padding:0; border-radius:var(--radius-round); }
.requester-profile-button .avatar { width:2rem; height:2rem; font-size:var(--text-xs); }
.requester-theme-button { border-radius:var(--radius-round); }

/* The slim search in the header, on every tab but Home (Home has the big one, in the welcome). */
#requesterPortalView .requester-header-search { flex:1 1 auto; max-width:32rem; min-width:0; margin:0 auto 0 var(--space-300); padding:0 var(--space-150); min-height:2.5rem; gap:var(--space-100); border-radius:var(--radius-pill); box-shadow:none; }
#requesterPortalView .requester-header-search > span { font-size:var(--text-lg); }
#requesterPortalView .requester-header-search input { min-height:2.5rem; padding:0; font-size:var(--text-sm); }
.requester-portal-shell.is-home .requester-header-search { display:none; }

/* The menu: the person at the top, then their account, help and policies, and signing out, divided; every item in one
   style, links and buttons alike. */
#requesterPortalView .requester-profile-dropdown { width:16rem; padding:var(--space-75); }
.requester-profile-head { display:grid; gap:var(--space-25); padding:var(--space-100) var(--space-150) var(--space-150); }
.requester-profile-head b { font-size:var(--text-sm); overflow-wrap:anywhere; }
.requester-profile-head small { color:var(--muted); font-size:var(--text-xs); overflow-wrap:anywhere; }
.requester-profile-divider { width:100%; margin:var(--space-75) 0; border:0; border-top:1px solid var(--line); }
.requester-profile-head + .requester-profile-divider { margin-top:0; }
#requesterPortalView .requester-profile-dropdown > button, #requesterPortalView .requester-profile-dropdown > a { display:flex; align-items:center; width:100%; min-height:2.5rem; padding:var(--space-75) var(--space-150); border-radius:var(--radius-md); background:none; color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-medium); text-align:left; text-decoration:none; }
#requesterPortalView .requester-profile-dropdown > button:hover, #requesterPortalView .requester-profile-dropdown > a:hover { background:var(--hover-bg); color:var(--ink); }

/* ---------- The tabs: one line, with "More" ---------- */
/* The row is as wide as the page, whatever its tabs would need (contain): the ones that don't fit go into "More". */
#requesterPortalView .requester-portal-nav { flex-wrap:nowrap; align-items:stretch; overflow:visible; white-space:nowrap; contain:inline-size; }
.requester-portal-nav > [data-portal-tab] { flex:0 0 auto; white-space:nowrap; }
.requester-portal-nav > [data-portal-tab].is-overflow { display:none; }
/* The tab someone is on: a bar along its foot. (It was the tab's ::after, which the Service status tab's alert dot,
   status.css, also uses: with both, the bar shrank to a dash.) */
#requesterPortalView .requester-portal-nav button.active::after { content:none; }
#requesterPortalView .requester-portal-nav button.active::before { content:""; position:absolute; right:0; bottom:0; left:0; height:0.1875rem; border-radius:var(--radius-sm) var(--radius-sm) 0 0; background:var(--spruce); }
#requesterPortalView .requester-portal-nav button.sp-tab-alert::after { content:""; position:static; display:inline-block; width:0.5rem; height:0.5rem; margin-left:var(--space-75); border-radius:var(--radius-round); background:var(--terra); vertical-align:middle; }
.requester-portal-more { position:relative; display:flex; flex:0 0 auto; margin-left:auto; }
#requesterPortalView .requester-portal-more-button { padding:0 var(--space-50); }
.requester-portal-more-button[aria-expanded="true"] { color:var(--ink); }
/* "More: Payroll" while a tab in its menu is open (GitHub issue 203, Phase 1f): it reads as the open tab, its words
   wrapping in the room the row leaves it. */
#requesterPortalView .requester-portal-more-button { display:inline-flex; align-items:center; min-width:0; }
.requester-portal-more-label { min-width:0; overflow:hidden; overflow-wrap:break-word; white-space:normal; }
#requesterPortalView .requester-portal-nav .requester-portal-more-button.is-current { color:var(--spruce-dark); }
#requesterPortalView .requester-portal-nav .requester-portal-more-button.is-current::before { content:""; position:absolute; right:0; bottom:0; left:0; height:0.1875rem; border-radius:var(--radius-sm) var(--radius-sm) 0 0; background:var(--spruce); }
#requesterPortalView .requester-portal-more-menu { position:absolute; top:100%; right:0; z-index:var(--z-menu); display:grid; min-width:13rem; max-width:calc(100vw - 2 * var(--viewport-gap)); padding:var(--space-75); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow); white-space:normal; }
#requesterPortalView .requester-portal-more-menu button { min-height:2.75rem; padding:var(--space-75) var(--space-150); border-radius:var(--radius-md); color:var(--ink); font-weight:var(--weight-semibold); text-align:left; }
#requesterPortalView .requester-portal-more-menu button:hover, #requesterPortalView .requester-portal-more-menu button:focus-visible { background:var(--hover-bg); }

/* ---------- The welcome and the big search: Home only, under the tabs ---------- */
.requester-portal-shell:not(.is-home) .requester-portal-hero { display:none; }
#requesterPortalView .requester-portal-hero { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); padding-top:var(--space-500); padding-bottom:var(--space-500); }

/* ---------- The search's results (both boxes) ---------- */
/* The box is the field: it takes the focus ring, not the words inside it. */
#requesterPortalView .requester-portal-search:focus-within { border-color:var(--spruce); box-shadow:0 0 0 var(--focus-ring-width) var(--control-focus); }
#requesterPortalView .requester-portal-search input, #requesterPortalView .requester-portal-search input:focus-visible { border:0; background:none; box-shadow:none; outline:0; }
#requesterPortalView .requester-portal-search > div { max-height:min(70vh, 34rem); overflow-y:auto; padding:var(--space-75) 0; }
.portal-search-group + .portal-search-group { border-top:1px solid var(--line); }
#requesterPortalView .requester-portal-search .portal-search-group h3 { margin:0; padding:var(--space-100) var(--space-200) var(--space-50); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.04em; text-transform:uppercase; }
#requesterPortalView .requester-portal-search > div .portal-search-row { display:grid; grid-template-columns:1.75rem minmax(0, 1fr); align-items:start; column-gap:var(--space-100); width:100%; padding:var(--space-100) var(--space-200); background:none; color:var(--ink); text-align:left; }
#requesterPortalView .requester-portal-search > div .portal-search-row:hover, #requesterPortalView .requester-portal-search > div .portal-search-row:focus-visible { background:var(--hover-bg); }
.portal-search-icon { display:grid; place-items:center; width:1.75rem; height:1.75rem; border-radius:var(--radius-md); background:var(--spruce-pale); color:var(--spruce-dark); font-size:var(--text-sm); font-weight:var(--weight-bold); }
#requesterPortalView .requester-portal-search .portal-search-words b { display:block; overflow:hidden; font-size:var(--text-sm); font-weight:var(--weight-semibold); overflow-wrap:break-word; white-space:normal; }
#requesterPortalView .requester-portal-search .portal-search-words small { display:block; overflow:hidden; margin-top:var(--space-25); color:var(--muted); font-size:var(--text-xs); overflow-wrap:break-word; white-space:normal; }
.portal-search-words mark { background:var(--saffron-pale); color:inherit; border-radius:var(--radius-xs); }
.portal-search-foot { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); margin-top:var(--space-75); padding:var(--space-150) var(--space-200) var(--space-100); border-top:1px solid var(--line); }
.portal-search-foot > span { margin-right:auto; color:var(--muted); font-size:var(--text-xs); }
.portal-search-foot > .text-button { flex-basis:100%; justify-content:flex-start; padding:0; text-align:left; }
#requesterPortalView .requester-portal-search > div .portal-search-actions button, #requesterPortalView .requester-portal-search > div .portal-search-foot button:not(.text-button) { display:inline-flex; align-items:center; gap:var(--space-75); width:auto; min-height:2.5rem; padding:0 var(--space-150); border:1px solid var(--line-strong, var(--line)); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
#requesterPortalView .requester-portal-search > div button.portal-search-raise:not(.text-button) { border-color:var(--spruce); background:var(--spruce); color:var(--brand-ink); }
#requesterPortalView .requester-portal-search > div button.portal-search-raise:not(.text-button):hover { filter:brightness(1.08); }
.portal-search-empty { padding:var(--space-150) var(--space-200); }
#requesterPortalView .requester-portal-search .portal-search-empty p { margin:0 0 var(--space-150); padding:0; color:var(--ink-2); font-size:var(--text-sm); line-height:var(--leading-normal); }
#requesterPortalView .requester-portal-search .portal-search-empty p b { display:inline; color:var(--ink); font-size:inherit; }
.portal-search-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); }

/* ---------- Home ---------- */
/* A new person's first visit: the welcome and the first steps in place of the counts, which would all be 0. Until it
   is known whether the person has requests in a department, neither. */
.portal-first-steps { display:none; }
[data-home-visit="first"] .portal-first-steps { display:block; }
[data-home-visit="first"][data-home-steps-closed] .portal-first-steps, [data-home-hide~="firstSteps"] [data-home-section="firstSteps"] { display:none; }
[data-home-visit="first"] [data-home-section="counts"], [data-home-visit="unknown"] [data-home-section="counts"] { display:none; }
.requester-portal-section.portal-first-steps { margin-top:0; margin-bottom:var(--space-400); padding:var(--space-300); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
.portal-first-steps .requester-section-heading { align-items:flex-start; }
.portal-first-steps .requester-section-heading h2 { font-size:var(--text-3xl); }
.portal-first-steps-hide { flex:0 0 auto; }
.portal-first-steps-list { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap:var(--space-150); margin:0; padding:0; list-style:none; }
.portal-first-steps-list li { display:flex; }
.portal-first-step { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:start; gap:var(--space-150); width:100%; padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--paper); color:var(--ink); text-align:left; text-decoration:none; }
.portal-first-step:hover { border-color:var(--accent-border); background:var(--accent-hover); }
.portal-first-step-number { display:grid; place-items:center; width:2rem; height:2rem; border-radius:var(--radius-round); background:var(--spruce-pale); color:var(--spruce-dark); font-size:var(--text-sm); font-weight:var(--weight-bold); }
.portal-first-step-words b { display:block; font-size:var(--text-md); font-weight:var(--weight-bold); }
.portal-first-step-words small { display:block; margin-top:var(--space-50); color:var(--muted); font-size:var(--text-sm); line-height:var(--leading-normal); }
.portal-first-step i { color:var(--muted); font-size:var(--text-xl); font-style:normal; line-height:1; }

/* A lone card spans its row: "Needs your attention" with one thing in it, the first steps, the services. */
#requesterPortalView .portal-attention-grid { grid-template-columns:repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
/* "How did we do?" under the cards is a row across every column (styles.css), so the columns a lone card
   leaves empty don't fold away: with it there, one card has the row, and two share it (side by side where each has
   21rem, so on a phone they stack). */
#requesterPortalView .portal-attention-grid:has(> :first-child + .portal-rate-row) { grid-template-columns:minmax(0, 1fr); }
#requesterPortalView .portal-attention-grid:has(> :nth-child(2) + .portal-rate-row) { grid-template-columns:repeat(auto-fit, minmax(max(min(100%, 21rem), calc((100% - var(--space-200)) / 2)), 1fr)); }
/* "Request something": the featured services, then the other teams' cards, in one grid. */
.requester-quick-services > .portal-home-cards { display:contents; }
#requesterPortalView .requester-quick-services, .portal-home-preview .requester-quick-services { grid-template-columns:repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
/* Five to a row has narrow cards: the icon and the arrow over the words, so a service's name has the card's width.
   (One to a row, on a phone, they keep the catalog's card.) */
@media (min-width:701px) {
  .requester-quick-services .requester-service-card { grid-template-columns:minmax(0, 1fr) auto; grid-template-rows:auto 1fr; min-height:0; }
  .requester-quick-services .requester-service-card > .requester-service-icon { grid-row:1; grid-column:1; }
  .requester-quick-services .requester-service-card > span:nth-child(2) { grid-row:2; grid-column:1 / -1; }
  .requester-quick-services .requester-service-card > i { grid-row:1; grid-column:2; }
}
/* A long title in the latest requests wraps, never pushed past the screen's edge. */
#requesterPortalHome .requester-request-list { grid-template-columns:minmax(0, 1fr); }
#requesterPortalHome .requester-request-row .requester-request-copy { max-width:100%; }
.requester-service-card.is-team .requester-service-team { display:inline-block; margin-top:var(--space-100); padding:var(--space-25) var(--space-100); border-radius:var(--radius-pill); background:var(--surface-2, var(--hover-bg)); color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-semibold); }

/* ---------- Phones ---------- */
@media (max-width:700px) {
  #requesterPortalView .requester-portal-header { flex-direction:row; align-items:center; gap:var(--space-100); min-height:3.5rem; padding:var(--space-100) var(--space-200); }
  .requester-portal-shell:not(.is-home) .requester-portal-brand > span:last-child { display:none; }
  #requesterPortalView .requester-header-search { position:static; margin:0; max-width:none; }
  #requesterPortalView .requester-header-search > div { top:100%; right:var(--space-200); left:var(--space-200); }
  #requesterPortalView .requester-portal-nav { gap:var(--space-150); overflow:visible; padding-left:var(--space-200); padding-right:var(--space-200); }
  #requesterPortalView .requester-portal-hero { grid-template-columns:minmax(0, 1fr); padding-top:var(--space-300); padding-bottom:var(--space-300); }
  #requesterPortalView .requester-portal-hero h1 { font-size:var(--text-3xl); }
  /* The box keeps its width for what is typed: "Ask the assistant" goes under it. */
  #requesterPortalView .requester-portal-hero .requester-portal-search { flex-wrap:wrap; row-gap:var(--space-100); }
  #requesterPortalView .requester-portal-hero .requester-portal-search input { flex:1 1 8rem; }
  #requesterPortalView .requester-portal-hero .requester-ai-button { order:3; flex:1 1 100%; justify-content:center; }
  .requester-section-heading .portal-first-steps-hide { align-self:flex-start; padding-left:0; padding-right:0; }
  .requester-portal-section.portal-first-steps { padding:var(--space-200); }
  .portal-first-steps .requester-section-heading h2 { font-size:var(--text-2xl); }
}

/* ---------- Admin settings › Requester portal & catalog › Requester portal › Home page: the first steps ---------- */
.portal-home-steps { display:grid; gap:var(--space-150); }
.portal-home-step { display:grid; gap:var(--space-100); min-width:0; margin:0; padding:var(--space-150) var(--space-200) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); }
.portal-home-step legend { padding:0 var(--space-75); font-weight:var(--weight-bold); }
.portal-home-step [hidden] { display:none; }

/* ---------- One heading scale on every tab (GitHub issue 203, part 1e) ---------- */
/* A tab's title, the first heading of its page, is the page's title; its sections' headings are a size under it:
   28 px over 20 px, the same on My requests, the Service catalog, Knowledge, Service status, a department's tab and
   Joiners & leavers. Home's own title is the welcome above the tabs; its sections are headings like any tab's. A new
   person's welcome ("Welcome, Noor") stays the size of a page title. */
#requesterPortalView .requester-portal-panel > .requester-section-heading:first-child h2 { font-size:var(--text-3xl); line-height:var(--leading-tight); }
#requesterPortalView .requester-portal-section:not(.portal-first-steps) .requester-section-heading h2,
#requesterPortalView .requester-portal-section > h2,
#requesterPortalView .requester-notice-section .requester-section-heading h2 { font-size:var(--text-xl); line-height:var(--leading-tight); }
#requesterPortalView .requester-portal-panel > .requester-section-heading:first-child { margin-bottom:var(--space-300); }
/* Two sections side by side start at the same height, each its own height (a department's form and its requests;
   Home's latest requests and Service notices). */
#requesterPortalView .requester-portal-two-column { align-items:start; }
#requesterPortalView .requester-portal-two-column > .requester-portal-section { margin-top:var(--space-400); }

/* ---------- My devices: a section of Home like the others ---------- */
/* Under My recent requests and Service notices, the width of the page (cmdb.js renderPortalDevices). */
#requesterPortalView .requester-devices { margin-top:var(--space-400); padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
#requesterPortalView .requester-devices-head p { margin:0; }
#requesterPortalView .requester-devices-head .attest-portal { margin-top:var(--space-100); }
#requesterPortalView .requester-device-grid { grid-template-columns:repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
#requesterPortalView .requester-device { align-content:start; gap:var(--space-100); padding:var(--space-200); border-radius:var(--radius-lg); }
#requesterPortalView .requester-device b { font-size:var(--text-md); }
#requesterPortalView .requester-device small { font-size:var(--text-xs); line-height:var(--leading-normal); }

/* ---------- Knowledge: topics in one quiet color, and one row of them on a phone ---------- */
/* A guide's topic is a label, not a warning: every topic tag in the brand's own pale tint (red is for problems). */
#requesterPortalView .requester-knowledge-card .article-tag { background:var(--spruce-pale); color:var(--spruce-dark); }
@media (max-width:700px) {
  /* One row that scrolls sideways, so the first guide is near the top of the screen. */
  #requesterPortalView .portal-topic-chips { flex-wrap:nowrap; overflow-x:auto; margin-right:calc(-1 * var(--space-200)); padding:0 var(--space-200) var(--space-50) 0; scrollbar-width:thin; }
  #requesterPortalView .portal-topic-chips button { flex:0 0 auto; min-height:var(--control-height-lg); white-space:nowrap; }
}

/* ---------- The search's results: whole titles, and the way on in view ---------- */
/* A title wraps onto a second line rather than being cut short. */
#requesterPortalView .requester-portal-search .portal-search-words b { display:block; overflow:hidden; white-space:normal; overflow-wrap:break-word; }
/* "Raise a request" and "Ask the assistant" stay at the foot of the results while they scroll. */
#requesterPortalView .requester-portal-search .portal-search-foot { position:sticky; bottom:calc(-1 * var(--space-75)); background:var(--surface); }
/* "Nothing found" uses the panel's width. */
#requesterPortalView .requester-portal-search .portal-search-empty p { max-width:none; }

/* ---------- The assistant, for employees ---------- */
/* Its box shows two lines, so what it suggests typing is read whole; "New chat" stays on one line. */
body.requester-portal-mode .ai-chat-panel .ai-chat-composer textarea { min-height:calc(2lh + 2 * var(--space-150) + 2px); }
body.requester-portal-mode #aiNewChatButton { white-space:nowrap; }
body.requester-portal-mode .ai-chat-bubble.ai-error [data-ai-raise], body.requester-portal-mode .ai-welcome [data-ai-raise] { display:inline-flex; margin-top:var(--space-150); }

/* ---------- The third review's Home (GitHub issue 203, Phase 1f; docs/adr/0086) ---------- */
/* A new starter keeps the first steps after their first request, until they hide them or every step is done
   (portal-home.js): the steps, without the counts. A step done is ticked and quiet. */
[data-home-visit="starter"] .portal-first-steps { display:block; }
[data-home-visit="starter"][data-home-steps-closed] .portal-first-steps { display:none; }
[data-home-visit="starter"] [data-home-section="counts"] { display:none; }
.portal-first-steps-list li.is-done .portal-first-step-number { background:var(--spruce); color:var(--brand-ink, #fff); }
.portal-first-steps-list li.is-done .portal-first-step-words b { color:var(--ink-2); }
/* "Needs your attention": each card as tall as what it holds, from the top, so an approval's buttons sit under its
   comment box, not 60 px below it beside a taller card. */
#requesterPortalView .portal-attention-grid { align-items:start; }
/* My devices: the cards of a row are as tall as each other, and "Get help with this" sits at the foot of each, so two
   side by side line up whatever their serial numbers wrap to. */
#requesterPortalView .requester-device { display:flex; flex-direction:column; align-items:flex-start; }
#requesterPortalView .requester-device > button[data-portal-device] { margin-top:auto; }
/* "Ask the assistant" once while search's results are open: their foot has it, so the box's own one steps aside. */
.requester-portal-search:has(#requesterPortalSearchResults:not([hidden])) #requesterAiButton { visibility:hidden; }

/* ---- Phase 2e (GitHub issue 204, the owner's AQ1 and AQ2; docs/adr/0099) ---- */
/* Each banner on Admin settings › Requester portal & catalog › Requester portal, in a box of its own like a first step. */
.portal-banner-list { display:grid; gap:var(--space-150); }
.portal-banner-edit { display:grid; gap:var(--space-100); min-width:0; margin:0; padding:var(--space-150) var(--space-200) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); }
.portal-banner-edit legend { padding:0 var(--space-75); font-weight:var(--weight-bold); }
.portal-banner-edit [hidden] { display:none; }
/* The order of Home's sections, each with its heading in English and Spanish. */
.portal-home-order .portal-home-order-name { display:grid; gap:var(--space-75); min-width:0; }
/* Every block's row keeps the same room at its right for the ↑ ↓ pair, beside its title, so the rows that can be moved
   and the ones that can't have the same width of words and fields. */
.portal-home-order .portal-home-order-row { grid-template-columns:minmax(0, 1fr) 5.5rem; align-items:start; }
.portal-home-order .portal-home-order-row > .resolution-code-actions { justify-content:flex-end; }
/* A quick link's and a contact's Spanish, under its English, with Remove on the first line. */
.portal-link-row .pl-label-es { grid-column:1; }
.portal-link-row .pl-description-es { grid-column:2 / span 2; }
.portal-link-row .pl-remove { grid-column:4; grid-row:1; }
/* The tick that also puts a quick link on the sign-in page (GitHub issue 548), under Remove. */
.portal-link-row .pl-sign-in-box { grid-column:4; grid-row:2; white-space:nowrap; }
.portal-link-row .pl-sign-in { height:auto; padding:0; }
.portal-link-row.portal-contact-row .pc-team-es { grid-column:1 / span 2; }
.portal-link-row.portal-contact-row .pc-note-es { grid-column:3 / span 3; }
.portal-link-row.portal-contact-row .pl-remove { grid-column:6; grid-row:1; }
@media (max-width:760px) {
  .portal-link-row .pl-label-es, .portal-link-row .pl-description-es, .portal-link-row .pl-remove, .portal-link-row .pl-sign-in-box,
  .portal-link-row.portal-contact-row .pc-team-es, .portal-link-row.portal-contact-row .pc-note-es, .portal-link-row.portal-contact-row .pl-remove { grid-column:auto; grid-row:auto; }
}
/* Home's parts in the order an Administrator chose: apart, My recent requests and Service notices each take the page's width. */
#requesterPortalHome > [data-home-block="requests"], #requesterPortalHome > [data-home-block="notices"], .portal-home-preview-home > [data-home-block="requests"], .portal-home-preview-home > [data-home-block="notices"] { margin-top:var(--space-400); }
/* A department's dated notices at the top of its tab (AQ2), drawn as Home's banners are. */
.ws-notices { margin-top:var(--space-300); }

/* ---------- The portal's own page in a frame (public/js/app/portal-preview-frame.js; GitHub issue 570) ---------- */
/* "View requester portal" (.is-page), the Home editor's preview (.is-still, .is-fit) and a department's Portal tab
   preview (.is-fit). The frame is as wide as its place. On "View requester portal" it fills the window below the
   page's heading. A fit frame is given the height of what the portal drew (portal-app.js fitFrame), and the preview
   card around it is what scrolls (styles.css .portal-tab-preview-card): one scrollbar, never two. Until the portal
   loads, a frame is never the browser's own 300 by 150. */
.portal-preview-frame-holder { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--paper); }
.portal-preview-frame { display:block; width:100%; height:24rem; border:0; background:var(--paper); }
.portal-preview-frame-holder.is-page .portal-preview-frame { height:max(32rem, calc(100vh - var(--topbar-height) - 12rem)); height:max(32rem, calc(100dvh - var(--topbar-height) - 12rem)); }