/* Architecture pattern library (architectures.html and architecture/*.html). Builds on the .sp page shell (cb-support.css) and the suggester styles (cb-suggest.css). */
.ar { --a-box: #f6f0ff; --a-stroke: #b9a4e6; --a-text: #1e1b3a; --a-muted: #5b5778; --a-role: #43138a; --a-arrow: #541ba3; --a-lane: #3b1478; --a-label: #5b5778; }
.ar .ar-p { margin: 0 0 .8rem; max-width: 62rem; line-height: 1.65; }
.ar .ar-list { margin: .4rem 0 1rem; padding-left: 1.2rem; max-width: 62rem; line-height: 1.6; }
.ar .ar-list li { margin: .5rem 0; }
/* diagram */
.ar .ar-switch { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .9rem; }
.ar .ar-switch[hidden] { display: none; }
.ar .ar-sw { padding: .38rem .95rem; border: 1px solid #bda8e6; border-radius: 999px; background: #fff; color: #1e1b3a; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.ar .ar-sw:hover { border-color: #541ba3; }
.ar .ar-sw[aria-pressed="true"] { background: #541ba3; border-color: #541ba3; color: #fff; }
.ar .ar-fig { margin: 0; padding: 1rem; border: 1px solid var(--line, #e3dcf3); border-radius: 16px; background: #fff; }
.ar .ar-fig figcaption { margin: .7rem 0 0; font-size: .85rem; line-height: 1.5; color: #5b5778; }
.ar .a-svg { display: block; width: 100%; height: auto; }
.ar .a-tall { display: none; max-width: 440px; margin: 0 auto; }
@media (max-width: 991.98px) { .ar .a-wide { display: none; } .ar .a-tall { display: block; } }
@media (max-width: 575.98px) { .ar .ar-fig { padding: .6rem; } }
.ar .a-box { fill: var(--a-box); stroke: var(--a-stroke); stroke-width: 1.5; }
.ar .a-role { fill: var(--a-role); font: 800 11px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.ar .a-main { fill: var(--a-text); font: 500 12px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.ar .a-svc { display: none; font-weight: 800; font-size: 13px; }
.ar .a-tall .a-svc { font-size: 15px; }
.ar .a-tall .a-generic { font-size: 14px; }
.ar .a-tall .a-role { font-size: 12px; }
.ar .a-tall .a-label { font-size: 13px; }
.ar .a-lane { fill: var(--a-lane); font: 800 13px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.ar .a-label { fill: var(--a-label); font: 600 11.5px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.ar .a-arrow { fill: none; stroke: var(--a-arrow); stroke-width: 2; }
.ar .a-dash { stroke-dasharray: 6 5; }
.ar .a-arrowhead { fill: var(--a-arrow); }
.ar .ar-fig[data-cloud="aws"] .a-node.has-svc .a-generic,
.ar .ar-fig[data-cloud="azure"] .a-node.has-svc .a-generic, .ar .ar-fig[data-cloud="gcp"] .a-node.has-svc .a-generic { display: none; }
.ar .ar-fig[data-cloud="aws"] .a-svc[data-c="aws"], .ar .ar-fig[data-cloud="azure"] .a-svc[data-c="azure"], .ar .ar-fig[data-cloud="gcp"] .a-svc[data-c="gcp"] { display: block; }
.ar .ar-fig[data-cloud="aws"] .a-box { stroke: #c77700; }
.ar .ar-fig[data-cloud="azure"] .a-box { stroke: #0a64b4; }
.ar .ar-fig[data-cloud="gcp"] .a-box { stroke: #1a7f4b; }
/* tables, cards */
.ar .ar-table td ul { list-style: none; margin: 0; padding: 0; }
.ar .ar-table td li { margin: 0 0 .35rem; }
.ar .ar-table td li span { display: block; font-size: .8rem; line-height: 1.4; color: #5b5778; margin-top: .1rem; }
.ar .ar-table tbody th { white-space: normal; min-width: 9rem; }
.ar .ar-table thead th:not(:first-child) { min-width: 12rem; }
.ar .ar-opt { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid #c4cdd8; background: #eef2f6; color: #3b4658; font-size: .7rem; font-weight: 800; vertical-align: middle; }
.ar .ar-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin: 1rem 0; }
.ar .ar-card { padding: 1rem 1.1rem; border: 1px solid var(--line, #e3dcf3); border-radius: 16px; background: #fff; }
.ar .ar-card h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.ar .ar-card ul { margin: .2rem 0 .5rem; padding-left: 1.1rem; font-size: .93rem; line-height: 1.55; }
.ar .ar-k { margin: .3rem 0 0; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1f6b3d; }
.ar .ar-k2 { color: #8a5a00; }
.ar .ar-try { margin: 1rem 0 0; }
.ar .ar-gl { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ar .ar-gl a { display: inline-block; padding: .25rem .7rem; border: 1px solid #cdb8f0; border-radius: 999px; background: #f6f0ff; font-size: .86rem; font-weight: 700; text-decoration: none; }
.ar .ar-notes { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .6rem; }
.ar .ar-notes li { padding: .7rem .9rem; border: 1px solid var(--line, #e3dcf3); border-left: 4px solid #f5b73a; border-radius: 12px; background: #fff; font-size: .93rem; line-height: 1.55; }
.ar .ar-pill { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; border: 1px solid; }
.ar .ar-pill[data-s="closed"] { background: #fff1d6; color: #7a4a00; border-color: #e8b04a; }
.ar .ar-pill[data-s="retiring"] { background: #ffe4e0; color: #8a1d12; border-color: #e58a80; }
.ar .ar-pill[data-s="retired"] { background: #f1e1e1; color: #6e1414; border-color: #c98a8a; }
.ar .ar-pill[data-s="renamed"] { background: #e3f0ff; color: #0f4a8a; border-color: #8ab6e8; }
.ar .ar-pill[data-s="maintenance"] { background: #fdf3d0; color: #6b5200; border-color: #d9bf5b; }
.ar .ar-pill[data-s="changed"] { background: #eee8fb; color: #43138a; border-color: #b9a4e6; }
.ar .ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.ar .ar-count { margin: 0 0 1.2rem; font-weight: 700; color: #3b1478; }
.ar .ar-group { margin: 0 0 1.8rem; }
.ar .ar-group .sg-h3 { margin: 0 0 .7rem; }
.ar .ar-idx { display: flex; flex-direction: column; }
.ar .ar-idx h4 { margin: .6rem 0 .35rem; font-size: 1.05rem; font-weight: 800; color: #1e1b3a; }
.ar .ar-idx h4 a { text-decoration: none; }
.ar .ar-idx p { margin: 0 0 .6rem; font-size: .93rem; line-height: 1.55; }
.ar .ar-idx .ar-btn { margin: auto 0 0; padding-top: .4rem; }
.ar .ar-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ar .ar-tr { display: inline-flex; align-items: center; gap: .45rem; }
.ar .ar-yt { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #ffd3d0; background: #fff4f3; color: #e62117; display: grid; place-items: center; cursor: pointer; padding: 0; transition: .15s; }
.ar .ar-yt[hidden] { display: none; }
.ar .ar-yt i { font-size: 1.1rem; line-height: 1; }
.ar .ar-yt:hover { background: #ffe5e3; border-color: #ffb9b4; }
.ar .ar-yt:focus-visible { outline: 3px solid #7b3fd0; outline-offset: 2px; }
@media print { .ar .ar-yt { display: none !important; } }
.ar .ar-ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: #eee8fb; color: #43138a; font-size: 1.15rem; }
.ar .ar-status { padding: .1rem .6rem; border-radius: 999px; border: 1px solid #c4cdd8; background: #eef2f6; color: #3b4658; font-size: .72rem; font-weight: 800; }
.ar .ar-status[data-on] { border-color: #8cc9a3; background: #e3f5ea; color: #14602f; }
.ar .sg-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ar .sg-btn[disabled]:hover { background: #fff; border-color: inherit; color: inherit; }
@media print { .ar .ar-switch, .ar .sg-expert, .ar .ar-try { display: none; } .ar .a-wide { display: block; } .ar .a-tall { display: none; } .ar .ar-card, .ar .ar-notes li, .ar .ar-fig { break-inside: avoid; } }
.ar .sg-tablewrap + .ar-p { margin-top: .9rem; }
/* quick answer and at-a-glance table */
.ar .ar-quick-text { margin: 0 0 1rem; max-width: 62rem; font-size: 1.05rem; line-height: 1.65; }
.ar .ar-quick { padding: 1rem 1.2rem 1.2rem; border: 1px solid #cdb8f0; border-left: 5px solid #541ba3; border-radius: 16px; background: linear-gradient(135deg, #f6f0ff, #fff 75%); }
.ar .ar-quick .sp-h { margin-top: 0; }
.ar .ar-glance th { width: 13rem; white-space: normal; }
.ar .sp-hero .ar-quick-text { margin-top: .6rem; }
@media (max-width: 575.98px) { .ar .ar-glance th { width: auto; } }
/* regulated industries: rules, shared duties, evidence checklist */
.ar .ar-rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.ar .ar-rule { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid var(--line, #e3dcf3); border-top: 4px solid #541ba3; border-radius: 16px; background: #fff; }
.ar .ar-rule[hidden] { display: none; }
.ar .ar-rule[data-scope="Global"] { border-top-color: #0a64b4; }
.ar .ar-rtop { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.ar .ar-rtop h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.ar .ar-scope { padding: .08rem .6rem; border-radius: 999px; background: #eee8fb; border: 1px solid #b9a4e6; color: #43138a; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ar .ar-rule[data-scope="Global"] .ar-scope { background: #e3f0ff; border-color: #8ab6e8; color: #0f4a8a; }
.ar .ar-rule p { margin: 0; font-size: .93rem; line-height: 1.55; }
.ar .ar-rule p b { display: block; margin-bottom: .1rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5b5778; }
.ar .ar-how { padding: .55rem .7rem; border-radius: 10px; background: #e9f7ef; }
.ar .ar-how b { color: #1f6b3d; }
.ar .ar-shared .ar-card h3 { display: flex; align-items: center; gap: .45rem; }
.ar .ar-shared .ar-card h3 i { color: #541ba3; }
.ar .ar-check { list-style: none; margin: .4rem 0 .4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: .5rem; }
.ar .ar-check label { display: flex; align-items: flex-start; gap: .6rem; height: 100%; padding: .65rem .85rem; border: 1px solid var(--line, #e3dcf3); border-radius: 12px; background: #fff; font-size: .93rem; line-height: 1.5; cursor: pointer; }
.ar .ar-check input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: #541ba3; }
.ar .ar-check label:has(input:checked) { border-color: #8cc9a3; background: #e9f7ef; }
.ar .ar-prog { margin: .3rem 0 1rem; font-weight: 800; color: #3b1478; }
@media print { .ar .ar-rule, .ar .ar-check label { break-inside: avoid; } .ar .ar-filter { display: none; } }

/* a11y: links inside running text must not rely on colour alone */
.ar .ar-notes li a, .ar p a:not([class]), .ar li a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

/* Pattern page: lesson video in the hero. Hidden until assets/js/cb-config.js (CB_ARCH_VIDEOS) holds a YouTube link for the pattern; cb-video.js shows it and opens the pop-up on click.
   No request goes to YouTube until the click. On wide screens the card sits in the free space at the right of the hero (out of the text flow, so nothing moves); below that it follows the intro text. */
.ar .ar-herovideo { display: block; width: 100%; max-width: 340px; margin: .2rem 0 1rem; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ar .ar-herovideo[hidden] { display: none; }
.ar .ar-hv-frame { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #2a1558 0%, #5b2fb0 55%, #e5384f 130%); box-shadow: 0 10px 28px rgba(60, 24, 120, .28); transition: transform .15s, box-shadow .15s; }
.ar .ar-hv-frame::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(255, 255, 255, .22), transparent 55%); }
.ar .ar-hv-play { position: absolute; inset: 0; display: grid; place-items: center; }
.ar .ar-hv-play i { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #e62117; font-size: 2.3rem; line-height: 1; padding-left: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.ar .ar-herovideo:hover .ar-hv-frame { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(60, 24, 120, .36); }
.ar .ar-herovideo:focus-visible { outline: 3px solid #7b3fd0; outline-offset: 4px; border-radius: 18px; }
@media (min-width: 1300px) {
  .ar .sp-hero > .ar-herovideo { position: absolute; z-index: 1; right: 2rem; top: 50%; transform: translateY(-50%); width: 300px; margin: 0; }
  .ar .sp-hero:has(> .ar-herovideo:not([hidden])) > :not(.ar-herovideo):not(.sg-deco) { max-width: calc(100% - 350px); }
  .ar .sp-hero:has(> .ar-herovideo:not([hidden])) > .sg-deco { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ar .ar-hv-frame { transition: none; } .ar .ar-herovideo:hover .ar-hv-frame { transform: none; } }
@media print { .ar .ar-herovideo { display: none !important; } }
