/*
 * Resources pages on sunrise.layout (track 015, docs/redesign/015-resources-pages/PLAN.md decision 1):
 * /tools, /glossary, /compare, /help and its category, role and search pages, /contact and its two
 * follow-up pages, then the tool, article and blog pages of sessions 3 to 5. Loaded only by the views
 * under resources/views/sunrise/resources/ (through partials/stylesheet), with a ?v={filemtime} query.
 * Sessions 3 to 5 add their blocks here; public/css/sunrise.css is not touched for this track.
 *
 * Colours are var(--sr-*) tokens only (resources/css/sunrise.css defines them and redefines them for
 * dark), so every rule holds in both themes. No hex / rgb() / hsl() literals, no !important, no :is()
 * (ResourcesStylesheetTest checks all three and that every token used is defined). Every selector
 * starts with an .rp- class (the approved mockup's prefix). sunrise.css's element rules
 * (`.sunrise h2`, `.sunrise p`, `.sunrise ul` set margin 0 at 0,1,1) outrank a lone .rp- class, so a
 * margin on one of those elements is set through two classes (`.rp-card-link .rp-card-title`) or a
 * utility in the markup. The markup uses only utilities already in the built sunrise.css.
 */

/* ------------------------------------------------------------------ breadcrumb, card label */

.rp-crumb{display:flex;flex-wrap:wrap;align-items:center;gap:0 8px;margin:0 0 4px;font-size:13px;line-height:1.5;color:var(--sr-muted)}
.rp-crumb a{display:inline-flex;align-items:center;min-height:44px;color:var(--sr-muted);text-decoration:underline;text-underline-offset:3px}
.rp-crumb a:hover{color:var(--sr-ink)}
.rp-crumb [aria-current]{color:var(--sr-ink);font-weight:600}
.rp-tag{display:inline-block;align-self:flex-start;margin:0 0 12px;color:var(--sr-accent);font-size:12px;font-weight:700;letter-spacing:.06em;line-height:1.4;text-transform:uppercase}

/* ------------------------------------------------------------------ card lists */

.rp-cards{list-style:none;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
.rp-cards > li{min-width:0}
@media (min-width:760px){
    .rp-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
}
@media (min-width:1024px){
    .rp-cards.rp-cards-3{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.rp-card-link{display:flex;flex-direction:column;height:100%;color:var(--sr-ink);text-decoration:none;transition:border-color .15s}
.rp-card-link:hover{border-color:var(--sr-ink);color:var(--sr-ink);text-decoration:none}
.rp-card-link:focus-visible{outline:2px solid var(--sr-link);outline-offset:2px;border-color:var(--sr-ink)}
.rp-card-link .rp-card-title{margin:0 0 8px;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:-.02em;color:var(--sr-ink);overflow-wrap:anywhere}
.rp-card-link .rp-card-text{flex:1;margin:0 0 16px;font-size:15px;line-height:1.6;color:var(--sr-body)}
.rp-card-go{color:var(--sr-accent);font-size:15px;font-weight:700;line-height:1.4}
.rp-card-link:hover .rp-card-go{text-decoration:underline;text-underline-offset:4px}

/* ------------------------------------------------------------------ search field and suggestions (help, glossary) */

.rp-search{position:relative;max-width:720px}
.rp-search-row{display:flex;align-items:center;gap:10px}
.rp-search-input{flex:1;min-width:0;width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--sr-muted);border-radius:var(--sr-radius-field);background:var(--sr-soft);color:var(--sr-ink);font-size:16px;line-height:1.4}
.rp-search-input::placeholder{color:var(--sr-muted);opacity:1}
.rp-search-row .sunrise-action{flex:none}
@media (max-width:700px){
    .rp-search-row{align-items:stretch}
}
.rp-suggestions,.rp-search-empty{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:50;margin:0;border:1px solid var(--sr-muted);border-radius:var(--sr-radius);background:var(--sr-surface);color:var(--sr-body)}
.rp-suggestions{list-style:none;padding:6px;max-height:420px;overflow-y:auto}
.rp-suggestions li{margin:0;padding:0}
.rp-suggestions a{display:block;min-height:44px;padding:12px;border-radius:var(--sr-radius-small);color:var(--sr-ink);text-decoration:none}
.rp-suggestions [aria-selected="true"],.rp-suggestions a:hover{background:var(--sr-accent-wash);color:var(--sr-ink)}
/* The keyboard user's only cue (the wash alone is about 1.1:1 on the list surface); hover keeps the wash only. */
.rp-suggestions [aria-selected="true"]{outline:2px solid var(--sr-accent);outline-offset:-2px}
.rp-suggestions .rp-match-title{display:block;color:var(--sr-accent);font-size:15px;font-weight:700;line-height:1.4}
.rp-suggestions .rp-match-category{display:block;margin:2px 0;color:var(--sr-muted);font-size:12px;line-height:1.4}
.rp-suggestions .rp-snippet{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--sr-body);font-size:13px;line-height:1.6}
.rp-suggestions .rp-match-all{font-size:14px;font-weight:700;color:var(--sr-accent)}
.rp-search-empty{padding:18px;font-size:14px;line-height:1.6}
/* The status line is rendered empty and never hidden (a live region hidden at load is not reliably announced). */
.rp-search-empty:empty{display:none}
.rp-search-empty a{color:var(--sr-accent);text-decoration:underline;text-underline-offset:3px}
.rp-search mark,.rp-suggestions mark,.rp-results mark{padding:0;border-radius:2px;background:var(--sr-action);color:var(--sr-on-action)}

/* ------------------------------------------------------------------ notices */

.rp-notice{padding:16px 18px;border-radius:var(--sr-radius-small);background:var(--sr-accent-wash);color:var(--sr-ink);font-size:15px;line-height:1.6}
.rp-empty{padding:24px;border:1px dashed var(--sr-line-strong);border-radius:var(--sr-radius-panel);color:var(--sr-body);font-size:15px;line-height:1.6}
.rp-empty a,.rp-notice a{color:var(--sr-accent);text-decoration:underline;text-underline-offset:3px}

/* ------------------------------------------------------------------ glossary letter nav and sections */

.rp-alpha{list-style:none;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
@media (min-width:768px){
    .rp-alpha{grid-template-columns:repeat(13,minmax(0,1fr))}
}
.rp-alpha > li{min-width:0}
.rp-alpha a,.rp-alpha span{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;border-radius:var(--sr-radius-small);font-size:15px;font-weight:700;line-height:1}
.rp-alpha a{border:1px solid var(--sr-line);background:var(--sr-surface);color:var(--sr-accent);text-decoration:none}
.rp-alpha a:hover{border-color:var(--sr-ink)}
.rp-alpha span{border:1px solid transparent;background:var(--sr-soft);color:var(--sr-muted);font-weight:600}
.rp-letter{margin:40px 0 0;scroll-margin-top:90px}
.rp-search + .rp-notice{margin:24px 0 0}
.rp-notice + .rp-empty{margin:24px 0 0}
.rp-letter .rp-letter-title{margin:0 0 16px;padding:0 0 8px;border-bottom:1px solid var(--sr-line);color:var(--sr-ink);font-size:24px;font-weight:600;line-height:1.3}

/* ------------------------------------------------------------------ help hub and category page */

/* The help search under the page header (the form is the partial's; this wrapper spaces it). */
.rp-search-slot{margin:24px 0 0}
/* The two track cards (hub only): a two-up .rp-cards list under the search. */
.rp-cards.rp-tracks{margin:32px 0 0}
/* One muted line under the search or the track cards (the glossary pointer). */
.rp-aside{font-size:14px;line-height:1.6;color:var(--sr-muted)}
.rp-search-slot + .rp-aside,.rp-tracks + .rp-aside{margin:24px 0 0}
.rp-aside a{color:var(--sr-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.rp-aside + .rp-empty{margin:32px 0 0}
/* A group of article cards per category, its h2 a link to the category page. */
.rp-group{margin:40px 0 0}
.rp-group .rp-group-title{margin:0 0 16px;padding:0 0 8px;border-bottom:1px solid var(--sr-line);color:var(--sr-ink);font-size:24px;font-weight:600;line-height:1.3}
.rp-group-title a{color:var(--sr-ink);text-decoration:none}
.rp-group-title a:hover{color:var(--sr-accent);text-decoration:underline;text-underline-offset:4px}
.rp-group-title a:focus-visible{outline:2px solid var(--sr-link);outline-offset:2px;border-radius:var(--sr-radius-small)}

/* ------------------------------------------------------------------ help search results */

/* /help?q=: under the search, a readable column (today's 860 px) holding the muted count line and the
   result rows, or the empty box. One bordered row per result, the whole row one link: the category
   tag, the title, the snippet; the match is marked (the <mark> rule above). */
.rp-hits{max-width:860px;margin:32px 0 0}
.rp-hits .rp-hits-count{margin:0 0 16px;color:var(--sr-muted);font-size:15px;line-height:1.6}
.rp-hits .rp-results{margin:0}
.rp-results{list-style:none;padding:0;display:grid;gap:12px}
.rp-results > li{min-width:0}
.rp-results-link{display:block;min-height:44px;padding:18px 20px;border:1px solid var(--sr-line);border-radius:var(--sr-radius-panel);background:var(--sr-surface);color:var(--sr-ink);text-decoration:none;transition:border-color .15s}
.rp-results-link:hover{border-color:var(--sr-ink);color:var(--sr-ink);text-decoration:none}
.rp-results-link:focus-visible{outline:2px solid var(--sr-link);outline-offset:2px;border-color:var(--sr-ink)}
.rp-results-link .rp-tag{display:block;margin:0 0 6px}
.rp-result-title{display:block;color:var(--sr-ink);font-size:18px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.rp-results-link:hover .rp-result-title{color:var(--sr-accent);text-decoration:underline;text-underline-offset:4px}
/* No side padding here: the match is often a word's prefix ("refund" in "refunds"), and padding read as a space. */
.rp-result-snippet{display:block;max-width:72ch;margin:6px 0 0;color:var(--sr-body);font-size:14px;line-height:1.6;overflow-wrap:anywhere}
/* The no-match box: its bold line and the three example words in ink, the links (rule above) in the accent. */
.rp-empty strong,.rp-empty em{color:var(--sr-ink)}
.rp-empty em{font-style:italic}
.rp-hits .rp-empty a{font-weight:600}

/* ------------------------------------------------------------------ numbered steps: a whole-row link */

/* A titled section of the help role page ("Start here", "Everything else for ..."): h2, one muted line, the list. */
.rp-section{margin:40px 0 0}
.rp-section .rp-section-title{margin:0;color:var(--sr-ink);font-size:24px;font-weight:600;line-height:1.3;letter-spacing:-.02em}
.rp-section .rp-section-sub{margin:6px 0 20px;color:var(--sr-muted);font-size:15px;line-height:1.6}
.rp-section + .rp-aside{margin:40px 0 0}
/* An ordered track: one bordered row per step, the whole row one link. The number is the homepage's
   pill (aria-hidden; the <ol> gives the position), its digit in the accent colour. */
.rp-steps{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.rp-steps > li{min-width:0}
.rp-steps-link{display:grid;grid-template-columns:32px minmax(0,1fr);gap:16px;align-items:start;min-height:44px;padding:18px 20px;border:1px solid var(--sr-line);border-radius:var(--sr-radius-panel);background:var(--sr-surface);color:var(--sr-ink);text-decoration:none;transition:border-color .15s}
.rp-steps-link:hover{border-color:var(--sr-ink);color:var(--sr-ink);text-decoration:none}
.rp-steps-link:focus-visible{outline:2px solid var(--sr-link);outline-offset:2px;border-color:var(--sr-ink)}
.rp-step-num{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--sr-line-strong);border-radius:var(--sr-radius-pill);background:var(--sr-surface);color:var(--sr-accent);font-size:14px;font-weight:700;line-height:1}
.rp-step-body{display:block;min-width:0;padding:4px 0 0}
.rp-step-title{display:block;color:var(--sr-ink);font-size:17px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.rp-steps-link:hover .rp-step-title{color:var(--sr-accent);text-decoration:underline;text-underline-offset:4px}
.rp-step-text{display:block;max-width:72ch;margin:4px 0 0;color:var(--sr-body);font-size:14px;line-height:1.6}

/* ------------------------------------------------------------------ contact form */

/* /contact: today's two lines under the page header as plain body text (normal weight, no colour of
   their own), each a paragraph; the links in the accent, underlined. Two classes beat `.sunrise p`. */
.rp-leads{margin:16px 0 0;max-width:760px}
.rp-leads .rp-lead{margin:8px 0 0;color:var(--sr-body);font-size:15px;line-height:1.6}
.rp-leads .rp-lead:first-child{margin:0}
.rp-lead a{color:var(--sr-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.rp-lead a:hover{color:var(--sr-ink)}
/* The form column: a readable 760 px, left-aligned with the header; the notice and the error box sit
   above the block. */
.rp-form{max-width:760px;margin:32px 0 0}
.rp-form .rp-notice{margin:0 0 20px}
/* The block has no title or intro here (the page's h1 names it), so its fields drop the 24 px top
   margin that would otherwise follow the card's own padding. The only rule here that reaches into the
   block, through the .rp-form ancestor. */
.rp-form .sunrise-enquiry-fields{margin-top:0}
/* Errors under a key no control carries. The checkout's one error colour (--sr-danger, the pink pill
   text) on the pink pill: 6.49:1 in light (#8a2f5a on #f6e3ea), 8.86:1 in dark (#e9b8cc on #2e2228). */
.rp-alert{margin:0 0 20px;padding:14px 18px;border:1px solid var(--sr-danger);border-radius:var(--sr-radius-small);background:var(--sr-pill-pink);color:var(--sr-danger);font-size:15px;font-weight:500;line-height:1.6}
.rp-alert .rp-alert-list{margin:0;padding:0;list-style:none}
.rp-alert-list li + li{margin:4px 0 0}
/* The captcha in the block's `after` slot: the label (the block's field label look), then the image
   on a light plate (the server draws dark marks on light; --sr-mark-ground is white in both themes,
   so the plate reads on the dark card) and the number field, side by side; at phone width the field wraps under the image so its
   placeholder ("What is the result ?") is not clipped. */
.rp-captcha{display:flex;flex-direction:column;gap:7px;margin:18px 0 0}
.rp-captcha .rp-captcha-label{margin:0;color:var(--sr-ink);font-size:14px;font-weight:600;line-height:1.55}
.rp-captcha-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.rp-captcha-plate{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:48px;padding:5px 10px;border:1px solid var(--sr-line-strong);border-radius:var(--sr-radius-field);background:var(--sr-mark-ground)}
.rp-captcha-plate img{display:block;width:120px;height:36px}
.rp-captcha .rp-captcha-input{flex:1 1 200px;width:auto;max-width:240px;min-width:0}
/* The confirm-by-email note under the captcha: one muted line. */
.rp-form .rp-form-note{margin:14px 0 0;color:var(--sr-muted);font-size:13px;line-height:1.6}

/* ------------------------------------------------------------------ contact follow-up cards (sent, confirm) */

/* /contact/sent and the confirm page: one card each (<x-gpn.card>), a readable 640 px column centred
   in the content width, as today's centred panel; no page header above it, so the card's h1 is the
   page's h1, at a card's size (today's 24 px on phones, 28 px from 760 px) in the page header's
   display face and ink. Two classes beat `.sunrise h1` / `.sunrise p` (margin 0). */
.rp-card-page{max-width:640px;margin:16px auto 0}
.rp-card-page .rp-card-h1{margin:0 0 14px;color:var(--sr-ink);font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-.02em;overflow-wrap:anywhere}
@media (min-width:760px){
    .rp-card-page{margin-top:32px}
    .rp-card-page .rp-card-h1{font-size:28px}
}
.rp-card-page .rp-card-p{margin:12px 0 0;color:var(--sr-body);font-size:15px;line-height:1.6}
.rp-card-page .rp-card-h1 + .rp-card-p{margin:0}
/* The confirm page's subject line: the subject in ink and bold, the ticket number muted beside it. */
.rp-card-page .rp-card-subject{margin:16px 0 0;color:var(--sr-ink);font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.rp-card-subject strong{font-weight:700}
.rp-card-subject .rp-card-number{color:var(--sr-muted);font-weight:500;white-space:nowrap}
/* The confirm button (sunrise-action) under the subject. */
.rp-card-form{margin:24px 0 0}
/* The last line of each card: muted and small, as today's; the link in the accent, underlined. */
.rp-card-page .rp-card-muted{margin:24px 0 0;color:var(--sr-muted);font-size:13px;line-height:1.6}
.rp-card-muted a{color:var(--sr-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.rp-card-muted a:hover{color:var(--sr-ink)}
.rp-card-muted a:focus-visible{outline:2px solid var(--sr-link);outline-offset:2px;border-radius:var(--sr-radius-small)}
