/*
 * uimproved — presentation-only visual system.
 * No text, game state, scoring, translations or navigation semantics change.
 * Motion stays on opacity, colour, shadows and decorative layers; cards never
 * translate on hover or entrance. Load last on both perspectives.
 */
:root{
 --ui-polish-ink:#142b3d;
 --ui-polish-border:#cbdce2;
 --ui-polish-shadow:0 16px 42px rgba(18,49,68,.10),0 3px 10px rgba(18,49,68,.04);
 --ui-polish-soft-shadow:0 8px 28px rgba(18,49,68,.07),0 1px 4px rgba(18,49,68,.04);
 --ui-polish-ease:cubic-bezier(.22,.61,.36,1);
 --ui-control-time:420ms;
 --ui-ease:cubic-bezier(.22,.61,.36,1);
 --ui-reveal-ease:cubic-bezier(.22,1,.36,1);
 --ui-scroll-progress:0%;
}
html{background:var(--page)}
body{
 background:
  radial-gradient(ellipse 48rem 35rem at 0% 2%,rgba(57,172,164,.14),transparent 70%),
  radial-gradient(ellipse 46rem 32rem at 100% 14%,rgba(83,126,203,.12),transparent 72%),
  linear-gradient(180deg,#fbfdfe 0%,var(--page) 46%,#f7fafc 100%);
 background-attachment:fixed;
 color:var(--ink);
}
/* A small, passive reading-position cue. The script only updates its width. */
body::after{
 content:"";
 position:fixed;
 inset-block-start:0;
 inset-inline-start:0;
 inline-size:var(--ui-scroll-progress);
 block-size:3px;
 z-index:100;
 pointer-events:none;
 background:linear-gradient(90deg,#138783,#40b5b0 52%,#4779c5);
 box-shadow:0 1px 8px rgba(25,115,139,.2);
}
.header{
 position:relative;
 isolation:isolate;
 border-block-start:0;
 border-block-end:1px solid rgba(154,186,197,.55);
 background:rgba(255,255,255,.94);
 box-shadow:0 10px 36px rgba(24,58,77,.075);
}
.header::before{
 content:"";
 position:absolute;
 inset-block:0 auto;
 inset-inline:0;
 inline-size:100%;
 block-size:4px;
 pointer-events:none;
 background:linear-gradient(90deg,#157b78 0%,#37a7a2 45%,#4c79b8 100%);
}
.header .header-inner{padding-block:1rem}
.header .wordmark{font-weight:800;letter-spacing:.035em;color:var(--ui-polish-ink)}
.header .nav-profiles{filter:drop-shadow(0 5px 9px rgba(18,67,79,.13))}
.header nav>a{
 position:relative;
 border-radius:999px;
 border-color:transparent;
 text-decoration:none;
}
.header nav>a::after{
 content:"";
 position:absolute;
 inset-inline:24%;
 inset-block-end:.35rem;
 block-size:2px;
 border-radius:999px;
 background:linear-gradient(90deg,var(--deep),var(--teal));
 transform:scaleX(0);
 transform-origin:center;
 transition:transform .45s var(--ui-polish-ease);
 pointer-events:none;
}
.header nav>a[aria-current="page"]{
 border-color:var(--line);
 border-radius:999px;
 background:linear-gradient(135deg,var(--pale),#fff);
 box-shadow:0 5px 16px rgba(23,81,91,.07);
}
.header nav>a[aria-current="page"]::after,
.header nav>a:hover::after{transform:scaleX(1)}
.header nav>.utility-settings{
 border-radius:999px;
 border:1px solid var(--line);
 background:linear-gradient(140deg,#fff,var(--pale));
 box-shadow:0 3px 12px rgba(18,55,71,.04);
 text-decoration:none;
}
.header.navigation-ready .nav-toggle{
 border-radius:999px;
 border:1px solid var(--line);
 background:linear-gradient(135deg,#fff,var(--pale));
 box-shadow:0 5px 15px rgba(19,62,82,.08);
}
.header.navigation-ready nav{
 border-radius:1.35rem;
 border-color:var(--line);
 box-shadow:0 24px 60px rgba(16,48,67,.18),0 4px 12px rgba(16,48,67,.08);
}

/* A clearly designed landing-stage instead of a collection of white boxes. */
main{padding-block-start:clamp(1.5rem,3.5vw,3rem)}
.reference-landing{
 position:relative;
 isolation:isolate;
 max-inline-size:68rem;
 padding:clamp(1.1rem,2.8vw,2.35rem);
 overflow:hidden;
 border:1px solid rgba(163,194,204,.75);
 border-radius:2rem;
 background:linear-gradient(142deg,rgba(255,255,255,.98),rgba(241,249,249,.97) 54%,rgba(242,246,254,.98))!important;
 box-shadow:0 24px 66px rgba(19,58,75,.105),0 3px 12px rgba(19,58,75,.035);
}
.reference-landing::after{
 content:"";
 position:absolute;
 z-index:0;
 inline-size:min(60vw,34rem);
 aspect-ratio:1;
 inset-block-start:-18rem;
 inset-inline-end:-15rem;
 border-radius:50%;
 background:radial-gradient(circle,rgba(59,168,168,.17),rgba(70,132,203,.08) 48%,transparent 70%);
 pointer-events:none;
 animation:ui-ambient-drift 18s ease-in-out infinite alternate;
}
.reference-landing>*{position:relative;z-index:1}
@keyframes ui-ambient-drift{
 from{transform:translate3d(0,0,0);opacity:.7}
 to{transform:translate3d(-1rem,1.25rem,0);opacity:1}
}
.reference-landing .landing-instructions{position:relative;margin-block-end:1.5rem}
.reference-landing .landing-instructions::before{
 inline-size:6.5rem;
 block-size:.36rem;
 margin-block-end:1.35rem;
 border-radius:999px;
 background:linear-gradient(90deg,#168d87,#43b6ae 48%,#507cc1);
 box-shadow:0 4px 12px rgba(41,136,153,.16);
}
.reference-landing .landing-instructions :is(h1,h2){
 max-inline-size:25ch;
 font-size:clamp(1.95rem,4.1vw,3.25rem);
 line-height:1.1;
 letter-spacing:-.045em;
 color:var(--ui-polish-ink);
 margin-block-end:.8rem;
}
.reference-landing .landing-purpose{
 font-size:clamp(1.06rem,1.8vw,1.24rem);
 font-weight:700;
 color:var(--deep);
}
.reference-landing .landing-instructions .small-note{
 max-inline-size:66ch;
 color:var(--slate);
 line-height:1.75;
}
.reference-landing .overlapping-heroes{
 gap:clamp(.75rem,2vw,1.4rem);
 margin-block:1.6rem 1rem;
}
.reference-landing .overlapping-heroes .perspective-hero{
 position:relative;
 overflow:hidden;
 padding:clamp(.85rem,2vw,1.5rem);
 border:1px solid var(--tone-line,var(--line));
 border-block-start:1px solid var(--tone-line,var(--line));
 border-radius:1.6rem!important;
 background:linear-gradient(145deg,var(--tone-pale,var(--pale)),#fff 75%)!important;
 box-shadow:var(--ui-polish-soft-shadow);
 transition:border-color .45s var(--ui-polish-ease),box-shadow .55s var(--ui-polish-ease),background-color .45s var(--ui-polish-ease);
}
.reference-landing .perspective-hero::before{
 content:"";
 position:absolute;
 inset-block-start:0;
 inset-inline:0;
 block-size:5px;
 background:linear-gradient(90deg,var(--tone-deep,var(--deep)),rgba(118,174,202,.55));
 pointer-events:none;
}
.reference-landing .perspective-hero::after{
 content:"";
 position:absolute;
 inset-block-end:-6rem;
 inset-inline-end:-6rem;
 inline-size:17rem;
 aspect-ratio:1;
 border-radius:50%;
 background:radial-gradient(circle,rgba(69,156,180,.11),transparent 70%);
 opacity:.55;
 pointer-events:none;
 transition:opacity .6s var(--ui-polish-ease);
}
.reference-landing .perspective-hero>img{
 border-radius:1rem;
 filter:saturate(1.07) contrast(1.015);
 transition:filter .65s var(--ui-polish-ease);
}
.reference-landing .overlapping-heroes .perspective-hero-button{
 position:relative;
 z-index:1;
 border-radius:1rem;
 transition:background-color .42s var(--ui-polish-ease),border-color .42s var(--ui-polish-ease),box-shadow .42s var(--ui-polish-ease);
}
.reference-landing .perspective-hero :is(.perspective-button-label,.perspective-button-short){
 color:var(--tone-deep,var(--deep));
 font-weight:800;
 letter-spacing:-.025em;
}
.reference-landing .perspective-hero-button>:is(.perspective-button-action,.perspective-button-action-short){
 border-radius:999px;
 padding:.55rem 1rem;
 background:linear-gradient(135deg,var(--tone-deep,var(--deep)),var(--tone-deep,var(--deep)));
 box-shadow:0 6px 16px rgba(24,65,89,.14);
}
.reference-landing .perspective-hero>.perspective-caption{
 position:relative;
 z-index:1;
 color:var(--slate);
 line-height:1.72;
}
@media(hover:hover) and (pointer:fine){
 .reference-landing .perspective-hero:hover{
  border-color:var(--tone-deep,var(--deep));
  box-shadow:0 18px 40px rgba(22,60,82,.13),0 2px 8px rgba(22,60,82,.06);
 }
 .reference-landing .perspective-hero:hover::after{opacity:1}
 .reference-landing .perspective-hero:hover>img{filter:saturate(1.17) contrast(1.035)}
 .reference-landing .perspective-hero-button:hover{box-shadow:0 5px 18px rgba(22,60,82,.08)}
}
.reference-landing .perspective-hero:focus-within{
 border-color:var(--tone-deep,var(--deep));
 box-shadow:0 0 0 2px var(--tone-pale,var(--pale)),var(--ui-polish-shadow);
}
.reference-landing+.brand-intro{
 border-block-start:0;
 padding-block-start:1.5rem;
}
.brand-intro.home-intro{margin-block-end:1.6rem}
.brand-intro #game-title{letter-spacing:-.045em;color:var(--ui-polish-ink)}
.landing-overview{
 max-inline-size:68rem;
 border:1px solid var(--ui-polish-border);
 border-inline-start:5px solid var(--deep);
 border-radius:1.45rem;
 background:linear-gradient(125deg,#fff,rgba(239,248,249,.9));
 box-shadow:var(--ui-polish-soft-shadow);
 padding:clamp(1.15rem,2.6vw,1.9rem);
}

/* Consistent editorial cards across the learning journey. */
.topic-explorer{max-inline-size:68rem}
.topic-grid{gap:clamp(.8rem,1.6vw,1.25rem)}
.topic-card{
 position:relative;
 overflow:hidden;
 border:1px solid var(--ui-polish-border);
 border-radius:1.35rem;
 background:linear-gradient(145deg,#fff 48%,#f1f8fa);
 box-shadow:var(--ui-polish-soft-shadow);
 transition:background-color .45s var(--ui-polish-ease),border-color .45s var(--ui-polish-ease),box-shadow .5s var(--ui-polish-ease);
}
.topic-card::before{
 content:"";
 position:absolute;
 inset-block-start:0;
 inset-inline:0;
 block-size:3px;
 background:linear-gradient(90deg,var(--deep),#66a9cc);
 opacity:.75;
}
.topic-card .learning-icon{
 border-radius:.85rem;
 background:linear-gradient(145deg,var(--pale),#fff);
 box-shadow:inset 0 0 0 1px var(--line);
}
.topic-card strong{color:var(--ink);font-size:1.075rem;letter-spacing:-.015em}
@media(hover:hover) and (pointer:fine){
 .topic-card:hover,.source-card:hover,.support-card:hover{
  border-color:var(--deep);
  box-shadow:0 17px 38px rgba(19,59,77,.12),0 2px 8px rgba(19,59,77,.04);
 }
}
.how-to-play li.how-step{
 border:1px solid var(--ui-polish-border);
 border-radius:1.3rem;
 background:linear-gradient(145deg,#fff,var(--pale));
 box-shadow:var(--ui-polish-soft-shadow);
}
.how-to-play .how-step-number{
 border-radius:1rem;
 border-color:var(--line);
 box-shadow:0 4px 12px rgba(23,81,91,.08);
}
.simple-setup .start-panel,.character-picker,.scenario-library,
.play-help,.decision-context,.recap-takeaways,.recap-scores,.score-mechanics,
.facilitator-note,.progress-situations .info-block,.content-page .info-block{
 border:1px solid var(--ui-polish-border);
 border-radius:1.35rem;
 background:linear-gradient(150deg,#fff 70%,rgba(238,247,249,.8));
 box-shadow:var(--ui-polish-soft-shadow);
}
.scenario,.summary-item,.evidence-record,.source-card{
 border-radius:1.2rem;
 border-color:var(--ui-polish-border);
 background:linear-gradient(145deg,#fff,#f8fbfd);
 box-shadow:var(--ui-polish-soft-shadow);
 transition:border-color .4s var(--ui-polish-ease),box-shadow .5s var(--ui-polish-ease),background-color .4s var(--ui-polish-ease);
}
.scenario:focus-within,.source-card:focus-visible,.evidence-record:focus-within{
 border-color:var(--deep);
 box-shadow:var(--ui-polish-shadow);
}
.paired-game .choice,.paired-game .choice.selected,.choice{
 border-radius:1.05rem;
 transition:border-color .36s var(--ui-polish-ease),background-color .36s var(--ui-polish-ease),box-shadow .42s var(--ui-polish-ease),color .36s var(--ui-polish-ease);
}
.paired-game .choice:not(:disabled),.choice:not(:disabled){
 background:linear-gradient(125deg,#fff,#f9fcfd);
 box-shadow:0 3px 12px rgba(19,59,77,.045);
}
.paired-game .choice.selected,.choice.selected{
 background:linear-gradient(120deg,var(--pale),#fff);
 border-color:var(--deep);
 box-shadow:inset 4px 0 0 var(--deep),0 5px 16px rgba(22,76,93,.08);
}
@media(hover:hover) and (pointer:fine){
 .paired-game .choice:not(:disabled):hover,.choice:not(:disabled):hover{
  background:var(--pale);
  border-color:var(--deep);
  box-shadow:0 8px 22px rgba(21,71,91,.1);
 }
}
.paired-game .feedback,.feedback{
 border-radius:1.25rem;
 background:linear-gradient(145deg,var(--pale),#fff 84%);
 box-shadow:var(--ui-polish-shadow);
}
.paired-game .feedback.revisit,.feedback.revisit{
 background:linear-gradient(145deg,#fff5f5,#fff 80%);
}
.progress,.progress-page progress{
 border-radius:999px;
 overflow:hidden;
 box-shadow:inset 0 1px 3px rgba(15,49,65,.08);
}
.progress>span,.progress-page progress::-webkit-progress-value{
 background:linear-gradient(90deg,#158580,#40b3ad 55%,#547ec2);
}
.progress-page progress::-moz-progress-bar{background:linear-gradient(90deg,#158580,#40b3ad 55%,#547ec2)}
html[data-perspective="garda"] .progress>span,
html[data-perspective="garda"] .progress-page progress::-webkit-progress-value,
html[data-perspective="garda"] .progress-page progress::-moz-progress-bar{
 background:linear-gradient(90deg,#284f7e,#4a78b7 55%,#7398d5);
}
[dir="rtl"] .paired-game .choice.selected,[dir="rtl"] .choice.selected{
 box-shadow:inset -4px 0 0 var(--deep),0 5px 16px rgba(22,76,93,.08);
}
.source-card{border-inline-start:4px solid var(--deep)}
.support-section .support-heading::after{
 content:"";
 display:block;
 inline-size:5.5rem;
 block-size:4px;
 margin-block-start:1rem;
 border-radius:999px;
 background:linear-gradient(90deg,var(--deep),#4a8ac0);
}
.support-card{
 border:1px solid var(--ui-polish-border);
 border-block-start:4px solid var(--deep);
 border-radius:1.3rem;
 background:linear-gradient(155deg,#fff,var(--pale));
 box-shadow:var(--ui-polish-soft-shadow);
 transition:border-color .4s var(--ui-polish-ease),box-shadow .5s var(--ui-polish-ease);
}
.support-link{border-radius:.8rem}
.settings-dialog{
 border-radius:1.5rem;
 border-color:var(--line);
 box-shadow:0 26px 80px rgba(15,43,66,.24);
}

/* Deliberately understated action polish, without moving hit targets. */
.primary:not(:disabled){
 position:relative;
 isolation:isolate;
 overflow:hidden;
 box-shadow:0 5px 15px rgba(20,73,91,.12);
 transition:background-color .38s var(--ui-polish-ease),border-color .38s var(--ui-polish-ease),color .38s var(--ui-polish-ease),box-shadow .45s var(--ui-polish-ease);
}
.primary:not(:disabled)::after{
 content:"";
 position:absolute;
 /* Keep decoration within the control: the old oversized shine inflated Firefox scrollHeight. */
 inset:0;
 inline-size:auto;
 transform:none;
 opacity:0;
 background:linear-gradient(120deg,rgba(255,255,255,.18),transparent 65%);
 pointer-events:none;
 transition:opacity .45s var(--ui-polish-ease);
}
@media(hover:hover) and (pointer:fine){
 .primary:not(:disabled):hover{box-shadow:0 9px 24px rgba(20,73,91,.2)}
 .primary:not(:disabled):hover::after{opacity:1}
}
.primary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}

/* The two role palettes retain their own visual identity. */
html[data-perspective="garda"] .reference-landing{
 background:linear-gradient(142deg,#fff,rgba(241,245,253,.98) 58%,rgba(236,243,252,.97))!important;
}
html[data-perspective="garda"] .reference-landing::after{
 background:radial-gradient(circle,rgba(75,121,197,.17),rgba(75,121,197,.06) 48%,transparent 70%);
}

/* Compact layouts and larger reading text keep their natural wrapping. */
@media(max-width:41.25rem){
 .header .header-inner{padding-block:.8rem}
 .reference-landing{padding:.625rem;border-radius:1.3rem}
 .reference-landing .landing-instructions{padding:.6rem .4rem 0}
 .reference-landing .landing-instructions::before{margin-block-end:.9rem}
 .reference-landing .landing-instructions :is(h1,h2){font-size:clamp(1.85rem,6vw,2.45rem)}
 .reference-landing .overlapping-heroes{gap:.75rem;margin-block:1.1rem .75rem}
 .reference-landing .overlapping-heroes .perspective-hero{padding:.75rem;border-radius:1.05rem!important}
 .reference-landing .perspective-hero>img{border-radius:.75rem}
 .reference-landing .perspective-hero::after{inline-size:10rem;inset-inline-end:-4rem;inset-block-end:-4rem}
 .topic-card{border-radius:1.05rem}
}
@media(max-width:24rem){
 .reference-landing .landing-instructions :is(h1,h2){font-size:1.8rem}
 .reference-landing .overlapping-heroes{gap:.6rem}
}
@media(hover:none),(pointer:coarse){
 body{background-attachment:scroll}
 .primary:not(:disabled)::after{display:none}
 .reference-landing .perspective-hero>img{filter:none}
}

/* High contrast, forced colours, reduced motion and print take precedence. */
.contrast-high body{background:var(--page)}
.contrast-high .header,.contrast-high .reference-landing,
.contrast-high .reference-landing .perspective-hero,
.contrast-high .landing-overview,.contrast-high .topic-card,
.contrast-high .support-card,.contrast-high .source-card,
.contrast-high .simple-setup .start-panel,.contrast-high .content-page .info-block{
 background:var(--paper,#fff)!important;
 color:var(--ink);
 border-color:var(--control);
 box-shadow:none;
}
.contrast-high .reference-landing::after,.contrast-high .perspective-hero::after,
.contrast-high .topic-card::before,.contrast-high .header::before{display:none}
.motion-reduce *, .motion-reduce *::before,.motion-reduce *::after{
 animation:none!important;
 transition:none!important;
 scroll-behavior:auto!important;
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media(forced-colors:active){
 *,*::before,*::after{animation:none!important;transition:none!important}
 body,.header,.reference-landing,.reference-landing .perspective-hero,
 .topic-card,.how-to-play li.how-step,.scenario,.info-block,.start-panel,
 .support-card,.source-card,.settings-dialog{
  background:Canvas!important;color:CanvasText!important;border-color:CanvasText!important;box-shadow:none!important;
 }
 body::after,.header::before,.reference-landing::after,.reference-landing .perspective-hero::before,
 .reference-landing .perspective-hero::after,.topic-card::before,.primary::after{display:none!important}
 .header nav>a[aria-current="page"]{outline:2px solid Highlight;outline-offset:-3px}
}
@media print{
 body{background:#fff!important}
 body::after,.header::before,.reference-landing::after,.reference-landing .perspective-hero::after,
 .primary::after{display:none!important}
 .reference-landing,.reference-landing .perspective-hero,.topic-card,.support-card{
  background:#fff!important;color:#000!important;box-shadow:none!important
 }
}


/* Layer a light wash over the Dublin scenery in the earlier landing layout. */
.reference-landing.paired-entry::after{
 inset:0;
 inline-size:auto;
 block-size:auto;
 aspect-ratio:auto;
 border-radius:inherit;
 opacity:1;
 animation:none;
 background:
  linear-gradient(180deg,rgba(249,253,255,.76) 0%,rgba(249,253,255,.80) 35%,rgba(249,253,255,.94) 100%),
  url('../dublin-approved/liffey-bridge-960.webp?v=dublin-accuracy-1') center 35% / cover no-repeat;
}
html[data-perspective="garda"] .reference-landing.paired-entry::after{
 background:
  linear-gradient(180deg,rgba(249,252,255,.74) 0%,rgba(249,252,255,.82) 42%,rgba(249,252,255,.95) 100%),
  url('../dublin-approved/gpo-city-960.webp?v=dublin-accuracy-1') center 35% / cover no-repeat;
}
/* The original LEGO character artwork stays over the new outdoor backdrops. */
.scene-location>.scene-backdrop{object-fit:cover}
@media(max-width:41.25rem){
 .reference-landing.paired-entry::after{
  background-position:center,center top;
 }
}
@media(prefers-reduced-motion:reduce){
 .reference-landing.paired-entry::after{animation:none!important}
}
@media(forced-colors:active),print{
 .reference-landing.paired-entry::after{display:none!important}
}
