/* Atlas shared layer: page shell with side column, suggestion panels, phone bar. Logical properties keep RTL and LTR right. */
.atlas-shell, .atlas-rail, .atlas-bar, .atlas-mod {
	--atlas-bg: var(--atlas-t-bg, #F7F4EE);
	--atlas-surface: var(--atlas-t-surface, #FFFFFF);
	--atlas-ink: var(--atlas-t-ink, #1C2426);
	--atlas-muted: var(--atlas-t-muted, #5B6466);
	--atlas-line: var(--atlas-t-line, #E4DED3);
	--atlas-line-strong: var(--atlas-t-line-strong, #D9D2C5);
	--atlas-accent: var(--atlas-t-accent, #0B6B67);
	--atlas-accent-soft: var(--atlas-t-accent-soft, #E3EFEC);
	--atlas-accent-ink: var(--atlas-t-accent-ink, #0B4F4C);
	--atlas-radius: var(--atlas-t-radius, 16px);
}
.atlas-shell { container: atlas-shell / inline-size; --atlas-w: min(1180px, calc(100vw - 32px)); inline-size: var(--atlas-w); max-inline-size: none !important; margin-inline: calc(50% - var(--atlas-w) / 2) !important; }
.atlas-shell__main { min-inline-size: 0; }
.atlas-shell__main > .alignwide, .atlas-shell__main > .alignfull { max-inline-size: 100%; margin-inline: 0; }
.atlas-rail { display: flex; flex-direction: column; gap: 16px; margin-block-start: 24px; min-inline-size: 0; }
.atlas-rail--inline { margin-block-start: 0; }

/* Wide: main column and a 320px side column that stays in view while scrolling. (A container's own box cannot be queried, hence the inner grid.) */
@container atlas-shell (min-width: 900px) {
	.atlas-shell__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
	.atlas-shell__grid > .atlas-rail { margin-block-start: 0; position: sticky; inset-block-start: 88px; }
}

.atlas-mod { background: var(--atlas-surface); color: var(--atlas-ink); border: 1px solid var(--atlas-line); border-radius: var(--atlas-radius); padding: 16px; line-height: 1.7; }
.atlas-mod *, .atlas-mod *::before, .atlas-mod *::after { box-sizing: border-box; }
.atlas-mod__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-block-end: 8px; }
.atlas-mod__title { margin: 0; font-size: 1rem; line-height: 1.4; color: var(--atlas-ink); }
.atlas-mod__more { font-size: .8125rem; color: var(--atlas-accent-ink); text-decoration: none; white-space: nowrap; }
.atlas-mod__more:hover { text-decoration: underline; }
.atlas-mod__hint { margin: 0 0 10px; font-size: .875rem; color: var(--atlas-muted); }
.atlas-mod__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.atlas-mod__list li { margin: 0; padding: 0; }

.atlas-mi { display: flex; align-items: center; gap: 12px; padding: 8px; margin-inline: -8px; border-radius: calc(var(--atlas-radius) * .65); color: var(--atlas-ink); text-decoration: none; min-block-size: 56px; }
.atlas-mi:hover, .atlas-mi:focus-visible { background: var(--atlas-accent-soft); }
.atlas-mi:focus-visible { outline: 3px solid var(--atlas-accent); outline-offset: 0; }
.atlas-mi__img { flex: none; inline-size: 48px; block-size: 48px; border-radius: calc(var(--atlas-radius) * .6); overflow: hidden; background: var(--atlas-accent-soft); display: grid; place-items: center; }
.atlas-mi__img img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.atlas-mi__ph { font-weight: 700; color: var(--atlas-accent-ink); font-size: 1.1rem; }
.atlas-mi__txt { display: flex; flex-direction: column; min-inline-size: 0; flex: 1; }
.atlas-mi__txt strong { font-size: .9375rem; line-height: 1.4; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-mi__txt small { font-size: .8125rem; color: var(--atlas-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-mi__badge { flex: none; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--atlas-accent-soft); color: var(--atlas-accent-ink); }

.atlas-mbtn { font: inherit; font-size: .875rem; min-block-size: 44px; padding: 8px 16px; border-radius: calc(var(--atlas-radius) * .75); border: 1px solid var(--atlas-accent); background: var(--atlas-accent); color: #fff; cursor: pointer; font-weight: 600; }
.atlas-mbtn:hover { filter: brightness(.94); }
.atlas-mbtn:focus-visible { outline: 3px solid var(--atlas-accent); outline-offset: 2px; }
.atlas-mbtn[disabled] { opacity: .6; cursor: wait; }
[data-atlas-nearby-out] { margin-block-start: 10px; font-size: .875rem; color: var(--atlas-muted); }
[data-atlas-nearby-out] .atlas-mod__list { color: var(--atlas-ink); }

.atlas-prog { block-size: 8px; border-radius: 999px; background: var(--atlas-accent-soft); overflow: hidden; margin-block-end: 12px; }
.atlas-prog i { display: block; block-size: 100%; background: var(--atlas-accent); border-radius: 999px; }
.atlas-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9375rem; }
.atlas-check li { margin: 0; padding: 0; display: flex; gap: 8px; align-items: baseline; }
.atlas-check .is-done { color: var(--atlas-muted); text-decoration: line-through; }
.atlas-check a { color: var(--atlas-accent-ink); font-weight: 600; }

/* Small screens: panels become a swipeable row of cards. */
@container atlas-shell (max-width: 899px) {
	.atlas-shell__grid > .atlas-rail { flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity; padding-block-end: 8px; gap: 12px; }
	.atlas-shell__grid > .atlas-rail .atlas-mod { flex: 0 0 min(86%, 340px); scroll-snap-align: start; }
}

/* Phone bar */
.atlas-bar { display: none; }
@media (max-width: 767px) {
	body.atlas-has-bar { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }
	.atlas-bar { display: block; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 9990; background: var(--atlas-surface); border-block-start: 1px solid var(--atlas-line); padding-block-end: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgb(0 0 0 / .06); }
	.atlas-bar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
	.atlas-bar li { margin: 0; padding: 0; }
	.atlas-bar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-block-size: 60px; padding: 6px 2px; color: var(--atlas-muted); text-decoration: none; font-size: .6875rem; line-height: 1.3; }
	.atlas-bar a.is-current { color: var(--atlas-accent-ink); font-weight: 700; }
	.atlas-bar a:focus-visible { outline: 3px solid var(--atlas-accent); outline-offset: -3px; }
	.atlas-bar a.is-primary svg { color: #fff; background: var(--atlas-accent); border-radius: 50%; padding: 8px; inline-size: 40px; block-size: 40px; margin-block-start: -14px; box-shadow: 0 4px 12px rgb(0 0 0 / .18); }
	.atlas-bar__badge { position: absolute; inset-block-start: 4px; inset-inline-start: calc(50% + 4px); min-inline-size: 18px; block-size: 18px; padding: 0 5px; border-radius: 9px; background: #B4233C; color: #fff; font-size: .6875rem; line-height: 18px; text-align: center; font-weight: 600; }
}
@media (prefers-reduced-motion: no-preference) { .atlas-mi, .atlas-mbtn { transition: background-color .15s, filter .15s; } }
