/* RSA Web Design Help Centre. The house look: navy, RSA blue, Plus Jakarta Sans headings,
   Inter body. No inline styles anywhere (the shared site policy forbids them). */
:root {
    --navy: #011a3e;
    --navy-2: #0a2a52;
    --blue: #0d59f2;
    --blue-on-navy: #7ea4ff;
    --ink: #0f172a;
    --body: #334155;
    --mute: #64748b;
    --line: #e2e8f0;
    --soft: #f4f7fb;
    --tip: #ecfdf5; --tip-line: #10b981;
    --info: #eff4ff; --info-line: #0d59f2;
    --warn: #fff7ed; --warn-line: #f59e0b;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--body); background: #fff; line-height: 1.65; font-size: 17px; }
h1, h2, h3 { font-family: 'Plus Jakarta Sans', Inter, sans-serif; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--blue); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--navy); }
.topbar__inner { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo { height: 32px; width: auto; display: block; }
.brand__label { color: var(--blue-on-navy); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.topbar__links { display: flex; gap: 20px; }
.topbar__links a { color: #dbe5ff; text-decoration: none; font-size: 15px; font-weight: 500; }
.topbar__links a:hover { color: #fff; text-decoration: underline; }

/* Home hero */
.hero { background: radial-gradient(800px 400px at 85% 100%, rgba(13, 89, 242, 0.35), transparent 70%), var(--navy); color: #fff; }
.hero__inner { max-width: 880px; margin: 0 auto; padding: 64px 24px 72px; text-align: center; }
.eyebrow { color: var(--blue-on-navy); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; font-size: 14px; margin: 0 0 12px; }
.hero h1 { color: #fff; font-size: 48px; margin: 0 0 16px; }
.hero__lead { color: #cbd5e1; font-size: 19px; margin: 0 auto 32px; max-width: 640px; }
.search input { width: 100%; max-width: 620px; font: inherit; font-size: 17px; padding: 16px 20px; border-radius: 14px; border: 0; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); }
.search input:focus { outline: 3px solid var(--blue-on-navy); outline-offset: 2px; }

/* Home body */
.home { max-width: 1240px; margin: 0 auto; padding: 48px 24px 64px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: #fff; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.card:hover { border-color: var(--blue); box-shadow: 0 14px 30px rgba(1, 26, 62, 0.08); transform: translateY(-2px); }
.card__num { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: var(--blue); font-size: 14px; }
.card__title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--ink); font-size: 19px; }
.card__text { color: var(--mute); font-size: 15px; line-height: 1.5; }
.cards__none { text-align: center; color: var(--mute); }
.home__intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin: 56px 0 8px; }
.missing { max-width: 640px; margin: 40px auto; text-align: center; }

/* Guide layout */
.layout { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.layout__side { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.topics summary { font-weight: 700; color: var(--ink); cursor: pointer; padding: 8px 0; list-style: none; }
.topics summary::-webkit-details-marker { display: none; }
.topics__list { list-style: none; margin: 4px 0 0; padding: 0; }
.topics__list a { display: block; padding: 7px 12px; border-radius: 10px; text-decoration: none; color: var(--body); font-size: 15px; }
.topics__list a:hover { background: var(--soft); color: var(--ink); }
.topics__list a[aria-current="page"] { background: var(--info); color: var(--blue); font-weight: 600; }

.article { max-width: 780px; }
.crumbs { font-size: 14px; color: var(--mute); margin: 0 0 8px; }
.crumbs a { color: var(--mute); }
.article h1 { font-size: 40px; margin: 0 0 14px; }
.lead { font-size: 19px; color: var(--body); margin: 0 0 28px; }
.prose h2 { font-size: 27px; margin: 44px 0 12px; padding-top: 4px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--body); }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin: 14px 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; font-family: 'Plus Jakarta Sans', sans-serif; }

/* Video */
.video { margin: 0 0 32px; }
.video__caption { font-size: 15px; color: var(--mute); margin: 10px 0 0; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--navy); box-shadow: 0 30px 60px -30px rgba(1, 26, 62, 0.45); }
.video-embed__poster, .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed__poster { object-fit: cover; }
.video-embed__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; padding: 0; border: 0; cursor: pointer; background: rgba(1, 26, 62, 0.12); transition: background 0.2s; }
.video-embed__play:hover { background: rgba(1, 26, 62, 0.02); }
.video-embed__icon { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--blue); box-shadow: 0 12px 34px rgba(13, 89, 242, 0.45); transition: transform 0.2s; }
.video-embed__icon::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 14px 0 14px 23px; border-color: transparent transparent transparent #fff; }
.video-embed__play:hover .video-embed__icon { transform: scale(1.08); }
.video-embed__play:focus-visible { outline: 3px solid var(--blue); outline-offset: -6px; }

/* On this page */
.toc { background: var(--soft); border-radius: 14px; padding: 16px 20px; margin: 0 0 12px; }
.toc__title { font-weight: 700; color: var(--ink); margin: 0 0 6px; font-size: 15px; }
.toc ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 28px; }
.toc li { font-size: 15px; margin: 4px 0; break-inside: avoid; }

/* Notes */
.note { border-left: 4px solid var(--info-line); background: var(--info); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 22px 0; }
.note p { margin: 0; }
.note__title { font-weight: 700; color: var(--ink); margin-bottom: 4px !important; font-size: 15px; }
.note--tip { border-color: var(--tip-line); background: var(--tip); }
.note--important { border-color: var(--warn-line); background: var(--warn); }

.shot { margin: 24px 0; }
.shot img { border-radius: 12px; border: 1px solid var(--line); display: block; }
.shot figcaption { font-size: 14px; color: var(--mute); margin-top: 8px; }

.stuck { margin: 48px 0 0; padding: 24px 26px; border-radius: 16px; background: var(--navy); color: #cbd5e1; }
.stuck__title { color: #fff; font-size: 22px; margin: 0 0 6px; }
.stuck p { margin: 0; }
.stuck a { color: var(--blue-on-navy); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 0; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--blue); }
.pager a span { display: block; font-size: 13px; color: var(--mute); font-weight: 500; }
.pager__next { text-align: right; }

/* Footer */
.footer { background: var(--navy); color: #94a3b8; }
.footer__inner { max-width: 1240px; margin: 0 auto; padding: 40px 24px 20px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__logo { height: 30px; width: auto; margin-bottom: 10px; }
.footer p { margin: 0; max-width: 380px; font-size: 15px; }
.footer__contact { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.footer__contact li { margin: 4px 0; }
.footer a { color: #dbe5ff; }
.footer .footer__legal { max-width: 1240px; margin: 0 auto !important; padding: 14px 24px 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px !important; }

/* Back to top: fixed bottom right, 48px (over the 44px tap target floor), below the sticky
   top bar's z-index so it never covers the header. */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 15; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: var(--blue); box-shadow: 0 10px 24px rgba(13, 89, 242, 0.35); transition: background-color 0.2s, transform 0.2s; }
.to-top:hover { background: #0b4ccc; transform: translateY(-2px); }
.to-top:focus-visible { outline: 3px solid var(--blue-on-navy); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } .to-top:hover { transform: none; } html { scroll-behavior: auto; } }

@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; gap: 12px; padding-top: 16px; }
    .layout__side { position: static; max-height: none; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
    .home__intro { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .topbar__inner { padding: 12px 16px; }
    .brand__logo { height: 26px; }
    .brand__label { font-size: 12px; padding-left: 10px; }
    .topbar__links { display: none; }
    .hero__inner { padding: 44px 16px 52px; }
    .hero h1 { font-size: 34px; }
    .hero__lead { font-size: 17px; }
    .home, .layout { padding-left: 16px; padding-right: 16px; }
    .article h1 { font-size: 30px; }
    .lead { font-size: 17px; }
    .prose h2 { font-size: 23px; }
    .toc ul { columns: 1; }
    .pager { grid-template-columns: 1fr; }
    .pager__next { text-align: left; }
    .video-embed__icon { width: 60px; height: 60px; }
    .to-top { right: 16px; bottom: 16px; }
    /* Room under the copyright line so the fixed button never sits on top of it. */
    .footer .footer__legal { padding-bottom: 76px; }
}
