/* Shared geometry. Every colour is a semantic token from the theme registry. */
.map-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:24px 0}.map-heading h1{font-size:30px;margin:0 0 8px}.map-heading p:not(.eyebrow){color:var(--muted);font-size:14px;margin:0}.map-heading>a{flex-shrink:0}
.map-unit-nav{display:flex;gap:10px;max-width:760px;margin:0 auto 22px;scroll-margin-top:20px}.map-unit-nav select{width:100%;min-width:0;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:12px;font:inherit;font-size:14px}.map-unit-nav button{flex:0 0 46px;min-height:46px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;font-size:22px}.map-unit-nav button:disabled{background:var(--disabled);color:var(--disabled-text)}.map-unit-nav select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.journey-map{max-width:760px;margin:auto;background:var(--surface);border:1px solid var(--border);border-radius:24px;overflow:hidden}.map-unit-heading{padding:28px 32px 18px}.map-unit-heading h2{font-size:28px;line-height:1.2;margin:0 0 10px;text-align:left}.map-unit-heading>p:not(.eyebrow){font-size:14px;color:var(--muted);margin:10px 0}.map-unit-heading .map-count{font-weight:600}.map-guide{font-size:13px;margin-top:18px;border-top:1px solid var(--border);padding-top:12px;color:var(--muted)}.map-guide summary{cursor:pointer;display:flex;gap:8px;align-items:center;color:var(--text);min-height:36px}.map-guide summary svg,.map-legend svg{width:18px;height:18px}.map-guide p{line-height:1.65}.map-guide summary::after{content:'⌄';margin-left:auto}.map-guide[open] summary::after{content:'⌃'}
.map-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;padding:8px 16px 20px;color:var(--muted);font-size:11px}.map-legend span{display:flex;align-items:center;gap:5px}
.map-trail{list-style:none;position:relative;margin:0;padding:16px 24px 32px}.map-trail::before{content:'';position:absolute;width:3px;left:calc(50% - 1.5px);top:44px;bottom:78px;background:var(--track)}.map-row{display:grid;position:relative;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr);min-height:136px;align-items:start;column-gap:16px;padding-bottom:24px}.map-node{grid-column:2;display:grid;place-items:center;width:64px;height:64px;position:relative;z-index:1;border-radius:50%}.map-circle{width:56px;height:56px;display:grid;place-items:center;border-radius:50%;border:2px solid var(--selection);background:var(--surface);color:var(--selection);box-shadow:0 4px 0 var(--track)}.map-circle svg{width:26px;height:26px}.map-copy{grid-column:3;min-width:0;padding-top:4px}.map-type{font-size:10px;letter-spacing:.5px;color:var(--muted);text-transform:uppercase}.map-copy h3{font:700 16px/1.35 Inter,Arial,sans-serif;margin:5px 0;color:var(--text);overflow-wrap:anywhere}.map-status{font-size:12px;color:var(--muted);margin:4px 0 8px}.map-open{font-size:12px;display:inline-block;padding:7px 0;min-height:32px}.map-start{font-size:12px;min-height:40px;padding:9px 15px;margin-top:4px;box-shadow:0 4px 12px var(--shadow)}
.map-row[data-state=complete] .map-circle{background:var(--success-bg);color:var(--success);border-color:var(--success)}.map-row[data-state=complete] .map-status{color:var(--success)}.map-row[data-state=current] .map-circle{width:64px;height:64px;background:var(--button);color:var(--button-text);border:3px solid var(--button-border);outline:5px solid var(--selected);box-shadow:0 5px 0 var(--track)}.map-row[data-state=locked] .map-circle{background:var(--soft);color:var(--muted);border-color:var(--border)}
.map-branch{min-height:168px;padding-top:10px}.map-branch .map-node{width:48px;height:48px;grid-column:1;grid-row:1;justify-self:end}.map-branch .map-circle{width:44px;height:44px}.map-branch .map-circle svg{width:22px;height:22px}.map-branch .map-copy{grid-column:1;grid-row:2;text-align:right;padding-top:10px}.map-branch .map-copy h3{font-size:14px}.map-branch-note{font-size:12px;line-height:1.55;color:var(--muted);margin:8px 0}.map-branch::before{content:'';position:absolute;left:calc(50% - 72px);top:32px;width:72px;height:22px;border-top:2px dotted var(--muted);border-left:2px dotted var(--muted);border-radius:15px 0 0 0}.map-branch.side-right .map-node{grid-column:3;justify-self:start}.map-branch.side-right .map-copy{grid-column:3;text-align:left}.map-branch.side-right::before{left:50%;border-left:0;border-right:2px dotted var(--muted);border-radius:0 15px 0 0}.map-branch[data-state=complete]::before{border-color:var(--success)}
.map-node[href]:hover .map-circle{transform:translateY(-3px)}.map-node[href]:active .map-circle{transform:translateY(1px)}.map-circle{transition:transform .15s ease}.map-unit-footer{padding:8px 24px 28px;text-align:center}.map-unit-footer p{font-size:12px;color:var(--muted)}.map-daily{max-width:760px;margin:24px auto;color:var(--muted);font-size:14px}.map-daily>summary{cursor:pointer;padding:12px 0;color:var(--text)}
@media(max-width:600px){.map-heading{display:block;padding:18px 0}.map-heading h1{font-size:25px}.map-heading>a{display:inline-block;margin-top:12px}.map-unit-nav{gap:7px;margin-bottom:14px}.map-unit-nav button{flex-basis:42px}.journey-map{border-radius:18px}.map-unit-heading{padding:22px 18px 12px}.map-unit-heading h2{font-size:24px}.map-unit-heading>p:not(.eyebrow){font-size:13px}.map-trail{padding:16px 12px 24px}.map-row{grid-template-columns:minmax(0,1fr) 54px minmax(0,1.4fr);column-gap:10px;min-height:150px}.map-trail::before{left:calc(12px + (100% - 98px)/2.4 + 37px);bottom:85px}.map-node{width:54px;height:58px}.map-circle{width:48px;height:48px}.map-row[data-state=current] .map-circle{width:54px;height:54px}.map-copy h3{font-size:14px}.map-type{font-size:9px;letter-spacing:0}.map-start{padding:9px 10px;font-size:11px}.map-status{font-size:11px}.map-branch .map-copy{grid-column:1 / span 2;max-width:calc(100% - 34px);padding-right:16px}.map-branch.side-right .map-copy{grid-column:3;max-width:none;padding-right:0}.map-branch::before{left:calc((100% - 74px)/2.4 - 12px);width:49px}.map-branch.side-right::before{left:calc((100% - 74px)/2.4 + 37px);width:44px}.map-branch{min-height:178px}.map-branch-note{font-size:11px}.map-legend{gap:10px;font-size:10px}.map-unit-footer{padding-inline:18px}}
@media(prefers-reduced-motion:reduce){.map-circle{transition:none}.map-node[href]:hover .map-circle{transform:none}}
.map-row{min-height:96px;padding-bottom:18px}.map-branch{min-height:158px}.map-relation{font-size:11px;color:var(--muted);margin:3px 0}.map-branch .map-status{margin-bottom:2px}.map-branch .map-copy{padding-top:6px}.map-needed{color:var(--muted);font-size:11px}.map-needed summary{cursor:pointer;padding:5px 0}.map-needed a{font-size:11px;display:inline-block;padding-block:5px}
@media(max-width:600px){.map-row{min-height:100px}.map-branch{min-height:170px}.map-branch .map-copy{grid-column:1;max-width:none;padding-right:0}.map-branch.side-right .map-copy{grid-column:3}.map-relation{font-size:10px}}

/* Each segment joins two nodes; a terminal node never owns an outgoing line. */
.map-trail::before{content:none}
.map-row:not(:last-child)::after{content:'';position:absolute;z-index:0;left:calc(50% - 1.5px);top:32px;width:3px;height:100%;background:var(--track)}
@media(max-width:600px){.map-row:not(:last-child)::after{left:calc((100% - 74px)/2.4 + 35.5px)}}
/* Keep the native select and keyboard behaviour, with an inset themed chevron. */
.map-unit-nav select{appearance:none;-webkit-appearance:none;padding-right:40px;background-image:linear-gradient(45deg,transparent 50%,var(--text) 50%),linear-gradient(135deg,var(--text) 50%,transparent 50%);background-position:calc(100% - 21px) 50%,calc(100% - 16px) 50%;background-size:5px 5px;background-repeat:no-repeat}
@media(forced-colors:active){.map-unit-nav select{appearance:auto;background-image:none}}

/* Guided Journey controls follow the same compact selector language as the public site. */
.map-heading h1,.map-unit-heading h2{font-family:'LP Live Playfair','Playfair Display',Georgia,serif;font-weight:700;letter-spacing:-.035em}
.map-heading p:not(.eyebrow),.map-unit-heading>p:not(.eyebrow),.map-copy,.map-copy h3,.map-unit-footer,.map-legend,.map-guide{font-family:'LP Live Inter',Inter,system-ui,sans-serif}
.map-heading h1:focus,.map-unit-heading h2:focus{outline:none}
.map-unit-nav{display:block;width:100%;max-width:760px;margin:0 auto 22px}
.map-select-control{position:relative;width:100%;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 3px 0 color-mix(in srgb,var(--shadow) 65%,transparent);transition:border-color .15s,box-shadow .15s}
.map-select-control:focus-within{border-color:var(--button-border);box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 18%,transparent)}
.map-select-control.is-open{border-color:var(--focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 24%,transparent)}
.map-select-control select{display:block;width:100%;min-height:48px;appearance:none;-webkit-appearance:none;border:0;border-radius:14px;background:var(--surface);color:var(--text);padding:12px 58px 12px 18px;font:700 15px/1.35 'LP Live Inter',Inter,system-ui,sans-serif;cursor:pointer}
.map-select-control select option{background:var(--surface);color:var(--text);font-family:'LP Live Inter',Inter,system-ui,sans-serif}
.map-select-control select:focus{outline:none}
.map-select-chevron{position:absolute;right:10px;top:50%;display:grid;place-items:center;width:32px;height:32px;transform:translateY(-50%);border-radius:50%;background:var(--button);color:var(--button-text);pointer-events:none}
.map-select-chevron::before{content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.map-select-control.is-open .map-select-chevron{transform:translateY(-50%) rotate(180deg);background:var(--focus)}
.map-unit-nav button{display:none}
.map-unit-footer p{font-size:13px}
@media(max-width:600px){.map-select-control select{min-height:48px;padding-left:15px;font-size:14px}.map-select-chevron{right:8px;width:30px;height:30px}.map-heading h1{font-size:28px}.map-unit-nav{width:100%;margin-bottom:16px}}

/* Portugal Guided Journey: a warmer editorial map with a quiet Portuguese sense of place. */
:root[data-theme="portugal"] body.path-map-view #app{position:relative;width:min(1180px,calc(100% - 48px));max-width:none;padding:36px 0 54px}
:root[data-theme="portugal"] body.path-map-view{overflow-x:hidden}
:root[data-theme="portugal"] body.path-map-view #app::before,
:root[data-theme="portugal"] body.path-map-view #app::after{content:"";position:absolute;z-index:-1;width:104px;height:104px;border:1px solid color-mix(in srgb,var(--button) 28%,transparent);opacity:.55;pointer-events:none;background:radial-gradient(circle at center,transparent 0 19px,color-mix(in srgb,var(--button) 20%,transparent) 20px 22px,transparent 23px 34px,color-mix(in srgb,var(--selection) 20%,transparent) 35px 37px,transparent 38px),linear-gradient(45deg,transparent 48%,color-mix(in srgb,var(--button) 18%,transparent) 49% 51%,transparent 52%),linear-gradient(-45deg,transparent 48%,color-mix(in srgb,var(--button) 18%,transparent) 49% 51%,transparent 52%);border-radius:6px;transform:rotate(45deg)}
:root[data-theme="portugal"] body.path-map-view #app::before{left:-76px;top:218px}
:root[data-theme="portugal"] body.path-map-view #app::after{right:-76px;bottom:260px;transform:rotate(45deg) scale(.82)}
:root[data-theme="portugal"] body.path-map-view .map-heading{width:min(760px,100%);margin:0 auto 16px;padding:12px 0 0}
:root[data-theme="portugal"] body.path-map-view .map-heading h1{font-size:clamp(32px,4vw,46px);color:var(--text)}
:root[data-theme="portugal"] body.path-map-view .map-heading p:not(.eyebrow){font-size:15px;line-height:1.65}
:root[data-theme="portugal"] body.path-map-view .map-unit-nav{margin-bottom:14px}
:root[data-theme="portugal"] body.path-map-view .map-select-control{background:var(--surface);border-color:color-mix(in srgb,var(--border) 85%,var(--button));box-shadow:0 4px 0 color-mix(in srgb,var(--shadow) 75%,transparent)}
:root[data-theme="portugal"] body.path-map-view .journey-map{border-radius:18px;background:var(--surface);box-shadow:0 16px 38px var(--shadow)}
:root[data-theme="portugal"] body.path-map-view .map-unit-heading{position:relative;min-height:218px;padding:30px 310px 18px 32px;overflow:hidden;background:linear-gradient(90deg,var(--surface) 0%,var(--surface) 49%,color-mix(in srgb,var(--surface) 84%,transparent) 69%,transparent 100%),url('public/family-420.webp') right center/42% 100% no-repeat}
:root[data-theme="portugal"] body.path-map-view .map-unit-heading h2{font-size:clamp(30px,3.3vw,43px);line-height:1.1;margin-top:2px}
:root[data-theme="portugal"] body.path-map-view .map-unit-heading>p:not(.eyebrow){font-size:15px}
:root[data-theme="portugal"] body.path-map-view .map-unit-heading .map-count{font-size:14px;color:var(--button);font-weight:800}
:root[data-theme="portugal"] body.path-map-view .map-guide{margin-top:18px}
:root[data-theme="portugal"] body.path-map-view .map-trail{padding:20px 32px 32px;background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 75%,var(--soft)) 0%,var(--surface) 30%)}
:root[data-theme="portugal"] body.path-map-view .map-main .map-copy{padding:12px 16px 10px;background:color-mix(in srgb,var(--surface) 92%,var(--soft));border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 12px var(--shadow)}
:root[data-theme="portugal"] body.path-map-view .map-main[data-state="current"] .map-copy{background:color-mix(in srgb,var(--selected) 72%,var(--surface));border-color:var(--selection);box-shadow:0 5px 16px var(--shadow)}
:root[data-theme="portugal"] body.path-map-view .map-main[data-state="current"] .map-circle{background:var(--selection);border-color:var(--selection);outline-color:var(--selected);color:var(--button-text)}
:root[data-theme="portugal"] body.path-map-view .map-main[data-state="locked"] .map-copy{background:color-mix(in srgb,var(--soft) 45%,var(--surface))}
:root[data-theme="portugal"] body.path-map-view .map-branch .map-copy{padding:10px 13px;background:color-mix(in srgb,var(--soft) 70%,var(--surface));border:1px solid var(--border);border-radius:10px}
:root[data-theme="portugal"] body.path-map-view .map-branch .map-copy h3{font-size:15px}
:root[data-theme="portugal"] body.path-map-view .map-unit-footer{padding-bottom:32px}
@media(max-width:600px){
 :root[data-theme="portugal"] body.path-map-view #app{width:calc(100% - 32px);padding-top:20px}
 :root[data-theme="portugal"] body.path-map-view #app::before,:root[data-theme="portugal"] body.path-map-view #app::after{display:none}
 :root[data-theme="portugal"] body.path-map-view .map-heading{padding-top:4px}
 :root[data-theme="portugal"] body.path-map-view .map-unit-heading{min-height:0;padding:22px 18px 14px;background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 82%,transparent),var(--surface) 54%),url('public/family-420.webp') center top/100% 150px no-repeat;padding-top:168px}
 :root[data-theme="portugal"] body.path-map-view .map-unit-heading h2{font-size:29px}
 :root[data-theme="portugal"] body.path-map-view .map-unit-heading>p:not(.eyebrow){font-size:13px}
 :root[data-theme="portugal"] body.path-map-view .map-trail{padding-inline:12px}
 :root[data-theme="portugal"] body.path-map-view .map-main .map-copy{padding:10px 12px}
}

/* Keep the Portugal version focused on the learning path itself: no hero artwork or page annotations. */
:root[data-theme="portugal"] body.path-map-view #app::before,
:root[data-theme="portugal"] body.path-map-view #app::after{display:none}
:root[data-theme="portugal"] body.path-map-view .map-unit-heading{min-height:0;padding:30px 32px 18px;background:var(--surface)}

/* The lesson cards now alternate around a centre line and connect from each node. */
:root[data-theme="portugal"] body.path-map-view .map-trail{background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 74%,var(--soft)) 0%,var(--surface) 34%)}
:root[data-theme="portugal"] body.path-map-view .map-main{min-height:126px;align-items:center;padding-bottom:18px}
:root[data-theme="portugal"] body.path-map-view .map-main .map-node,:root[data-theme="portugal"] body.path-map-view .map-main .map-copy{grid-row:1}
:root[data-theme="portugal"] body.path-map-view .map-main .map-copy{position:relative;z-index:1;align-self:center;min-height:70px;padding:12px 16px}
:root[data-theme="portugal"] body.path-map-view .map-main-odd .map-copy{grid-column:3;text-align:left}
:root[data-theme="portugal"] body.path-map-view .map-main-even .map-copy{grid-column:1;text-align:right}
:root[data-theme="portugal"] body.path-map-view .map-main::before{display:none}
:root[data-theme="portugal"] body.path-map-view .map-main .map-copy::before{content:"";position:absolute;z-index:-1;top:50%;width:17px;border-top:2px dashed color-mix(in srgb,var(--muted) 54%,transparent);transform:translateY(-50%);pointer-events:none}
:root[data-theme="portugal"] body.path-map-view .map-main-odd .map-copy::before{left:-18px}
:root[data-theme="portugal"] body.path-map-view .map-main-even .map-copy::before{right:-18px}
:root[data-theme="portugal"] body.path-map-view .map-row:not(:last-child)::after{top:76px;left:calc(50% - 1.5px);width:28px;height:calc(100% - 52px);background:none;border-left:3px dashed var(--track);border-radius:0 0 0 26px;transform:none}
:root[data-theme="portugal"] body.path-map-view .map-main-even:not(:last-child)::after{left:calc(50% - 28px);border-left:0;border-right:3px dashed var(--track);border-radius:0 0 26px 0}
:root[data-theme="portugal"] body.path-map-view .map-main .map-node{align-self:center}
:root[data-theme="portugal"] body.path-map-view .map-main-odd .map-copy h3{margin-right:0}
:root[data-theme="portugal"] body.path-map-view .map-main-even .map-copy h3{margin-left:0}
@media(max-width:600px){
 :root[data-theme="portugal"] body.path-map-view .map-unit-heading{padding:22px 18px 14px;background:var(--surface)}
 :root[data-theme="portugal"] body.path-map-view .map-main-even .map-copy{grid-column:3;text-align:left}
 :root[data-theme="portugal"] body.path-map-view .map-main-even::before{display:none}
 :root[data-theme="portugal"] body.path-map-view .map-main .map-copy::before{width:11px}
 :root[data-theme="portugal"] body.path-map-view .map-main-odd .map-copy::before,:root[data-theme="portugal"] body.path-map-view .map-main-even .map-copy::before{left:-12px;right:auto}
 :root[data-theme="portugal"] body.path-map-view .map-main-even:not(:last-child)::after{left:calc(50% - 1.5px);border-right:0;border-left:3px dashed var(--track);border-radius:0 0 0 26px}
 :root[data-theme="portugal"] body.path-map-view .map-main{min-height:118px}
}

/* Shared curved map treatment for every visual theme. */
body.path-map-view #app{width:min(1100px,calc(100% - 64px));max-width:none;padding:36px 0 54px}
body.path-map-view #app>.home-footer{width:100%;max-width:none;margin-inline:0;margin-top:48px}
body.path-map-view .map-main{min-height:126px;align-items:center;padding-bottom:18px}
body.path-map-view .map-main .map-node,body.path-map-view .map-main .map-copy{grid-row:1}
body.path-map-view .map-main .map-copy{position:relative;z-index:1;align-self:center;min-height:70px;padding:12px 16px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--surface) 92%,var(--soft));box-shadow:0 4px 12px var(--shadow)}
body.path-map-view .map-main-odd .map-copy{grid-column:3;text-align:left}
body.path-map-view .map-main-even .map-copy{grid-column:1;text-align:right}
body.path-map-view .map-main::before{display:none}
body.path-map-view .map-main .map-copy::before{content:"";position:absolute;z-index:-1;top:50%;width:17px;border-top:2px dashed color-mix(in srgb,var(--muted) 54%,transparent);transform:translateY(-50%);pointer-events:none}
body.path-map-view .map-main-odd .map-copy::before{left:-18px}
body.path-map-view .map-main-even .map-copy::before{right:-18px}
body.path-map-view .map-row:not(:last-child)::after{top:76px;left:calc(50% - 1.5px);width:28px;height:calc(100% - 52px);background:none;border-left:3px dashed var(--track);border-radius:0 0 0 26px;transform:none}
body.path-map-view .map-main-even:not(:last-child)::after{left:calc(50% - 28px);border-left:0;border-right:3px dashed var(--track);border-radius:0 0 26px 0}
body.path-map-view .map-main .map-node{align-self:center}
body.path-map-view .map-main[data-state="current"] .map-copy{background:color-mix(in srgb,var(--selected) 72%,var(--surface));border-color:var(--selection);box-shadow:0 5px 16px var(--shadow)}
body.path-map-view .map-main[data-state="locked"] .map-copy{background:color-mix(in srgb,var(--soft) 45%,var(--surface))}
@media(max-width:600px){
 body.path-map-view #app{width:calc(100% - 32px);padding:20px 0 36px}
 body.path-map-view .map-main-even .map-copy{grid-column:3;text-align:left}
 body.path-map-view .map-main-even::before{display:none}
 body.path-map-view .map-main .map-copy::before{width:11px}
 body.path-map-view .map-main-odd .map-copy::before,body.path-map-view .map-main-even .map-copy::before{left:-12px;right:auto}
 body.path-map-view .map-main{min-height:118px}
}

/* Keep the page frame stable while the journey catalogue loads. */
body.path-map-view #app{min-height:calc(100svh - 136px)}
