.theme-control {
  position: absolute;
  right: clamp(18px, 4vw, 72px);
  top: clamp(18px, 4vh, 46px);
  z-index: 5;
}
.theme-trigger {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  color: #333650; background: #ffffff94;
  border: 1px solid #33365022; border-radius: 50%;
}
.theme-trigger:hover, .theme-trigger[aria-expanded="true"] { background: #fff; }
.theme-picker {
  position: absolute; top: calc(100% + 6px); right: 0;
  display: grid; gap: 3px; min-width: 130px; padding: 5px;
  background: #fffcf9; border: 1px solid #272b481a; border-radius: 14px;
  box-shadow: 0 8px 28px #21243c24;
}
.theme-picker[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .theme-picker:not([hidden]) { animation: theme-open .14s ease-out; }
  @keyframes theme-open { from { opacity: 0; transform: translateY(-3px); } }
}
#consultation:target ~ .theme-control {
  top: 12px;
  right: max(14px, calc((100% - 1540px)/2 + 14px));
}
#consultation .bar { padding-right: 70px; }
.theme-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 9px;
  color: #414454;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.theme-picker button[aria-pressed="true"] { background: #272b48; color: white; }
.theme-picker button span {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #71738866;
  background: linear-gradient(140deg,#fff 30%,#b7bdcf 70%);
}
.theme-picker [data-palette="landscape"] span { background: linear-gradient(145deg,#ffd79c 25%,#fa7153 48%,#5658ae 55%,#202e7a 85%); }
.landscape { display: none; }

@media screen {
  html[data-theme="landscape"] {
    --ink: #21284f;
    --accent: #42389c;
    --paper: #fffaf0;
    --line: #cfc9df;
  }
  [data-theme="landscape"] body { background: #f0edf6; color: var(--ink); }
  [data-theme="landscape"] .welcome {
    background: linear-gradient(115deg,#fff3d9 7%,#ffe4ce 60%,#e4c5e5 100%);
  }
  [data-theme="landscape"] .welcome-copy h1 { color: #24294b; font-weight: 650; }
  [data-theme="landscape"] .welcome-copy h1 span:last-child { color: #873e53; }
  [data-theme="landscape"] .welcome-star { color: #c04d3d; }
  [data-theme="landscape"] .welcome-art, [data-theme="landscape"] #screen.visual::before { display: none; }
  [data-theme="landscape"] .welcome-enter { background: var(--ink); box-shadow: 0 6px 20px #38294d22; }
  [data-theme="landscape"] .welcome-enter:hover { background: var(--accent); }
  [data-theme="landscape"] .welcome > .landscape, [data-theme="landscape"] #screen.visual > .landscape {
    display: block;
    position: absolute;
    z-index: -1;
    inset: 13% 0 0 47%;
    overflow: hidden;
    pointer-events: none;
  }
  .landscape i { position: absolute; display: block; }
  .landscape .sun {
    width: 31%; aspect-ratio: 1; border-radius: 50%;
    right: 17%; top: 12%;
    background: linear-gradient(160deg,#ffb755 0%,#ff8351 62%,#e96150);
  }
  .landscape .ridge { inset: 0; }
  .landscape .far {
    background: linear-gradient(125deg,#e89993 10%,#d899c3 60%,#bc91c7);
    clip-path: polygon(0 100%,9% 89%,22% 78%,34% 64%,42% 59%,50% 48%,56% 51%,72% 34%,80% 39%,86% 35%,100% 43%,100% 100%);
  }
  .landscape .middle {
    background: linear-gradient(130deg,#9180c9 20%,#a29ad6 58%,#7679bb);
    clip-path: polygon(0 100%,14% 94%,30% 75%,37% 78%,53% 59%,59% 63%,67% 54%,76% 61%,89% 45%,95% 48%,100% 43%,100% 100%);
  }
  .landscape .near {
    background: repeating-linear-gradient(153deg,transparent 0 12px,#9398ed38 12px 13px,transparent 13px 24px),linear-gradient(120deg,#6972c6,#4554a4 77%);
    clip-path: polygon(0 100%,17% 95%,32% 85%,45% 84%,63% 71%,71% 73%,83% 64%,89% 66%,100% 58%,100% 100%);
  }
  .landscape .shore {
    background: #283968;
    clip-path: polygon(0 100%,23% 98%,40% 94%,57% 95%,74% 88%,87% 86%,100% 79%,100% 100%);
  }
  [data-theme="landscape"] header { background: #fff8eb; border-color: #ded7df; }
  [data-theme="landscape"] .brand, [data-theme="landscape"] .brand-sub { color: var(--ink); }
  [data-theme="landscape"] .mark { color: #c4503c; }
  [data-theme="landscape"] #screen {
    background: #fffcf6; border: 1px solid #ded8e4; box-shadow: 0 10px 35px #2024460b;
  }
  [data-theme="landscape"] #screen.visual { background: linear-gradient(110deg,#fffdf7 39%,#fff1dc 68%,#edd6e9); }
  [data-theme="landscape"] #screen.visual > .landscape { inset: 5% 0 0 57%; }
  [data-theme="landscape"] #steps .dot { background: #fbf7ff; color: #54526d; border-color: #afabc6; }
  [data-theme="landscape"] #steps li.reached:before { background: #7363ba; }
  [data-theme="landscape"] #steps li.reached .dot { background: #6560a6!important; border-color: #6560a6!important; }
  [data-theme="landscape"] #steps [aria-current="step"] .dot { background: #443987!important; box-shadow: 0 0 0 4px #dcd5f3; }
  [data-theme="landscape"] .eyebrow { color: #944831; }
  [data-theme="landscape"] .intro { color: #56536a; }
  [data-theme="landscape"] .primary, [data-theme="landscape"] #notice:not(:empty) { background: var(--accent); color: white; }
  [data-theme="landscape"] .primary:hover { background: #302878; }
  [data-theme="landscape"] :is(input,select,textarea,.choice,.secondary,.tile,dialog) { border-color: var(--line); }
  [data-theme="landscape"] :is(.choice:has(:checked),.scores button[aria-pressed="true"],.schoolRow button[aria-pressed="true"]) {
    color: #332775; border-color: var(--accent); background: #eee9fc; box-shadow: inset 0 0 0 .5px var(--accent);
  }
  [data-theme="landscape"] input { accent-color: var(--accent); }
  [data-theme="landscape"] .tile { background: #eeeaf9; }
  [data-theme="landscape"] .tile:nth-child(3n+2) { background: #fbe7da; }
  [data-theme="landscape"] .tile:nth-child(3n) { background: #e2ebfa; }
  [data-theme="landscape"] .tile span, [data-theme="landscape"] .text-btn { color: #433587; }
  [data-theme="landscape"] .summaryGrid section { background: #eeebf8; }
  [data-theme="landscape"] .summaryGrid section:nth-child(even) { background: #fbeadd; }
  [data-theme="landscape"] dialog { background: #fffaf0; }
  [data-theme="landscape"] #report h4 { color: #463d83; }
}
@media (max-width: 760px) {
  .theme-control { top: 16px; right: 12px; }
  #consultation:target ~ .theme-control { top: 7px; right: 7px; }
  #consultation .bar { padding-right: 56px; }
  #consultation .top-actions { gap: 7px; }

  .theme-picker button { min-height: 32px; font-size: 12px; padding-inline: 9px; gap: 5px; }
  .welcome-brand { gap: 5px; left: 16px; }
  .welcome-service { padding-left: 8px; margin-left: 2px; font-size: 11px; }
  [data-theme="landscape"] #screen.visual > .landscape { display: none; }
  [data-theme="landscape"] #screen { border-top: 3px solid #8a79bd; }
}
@media (max-width:700px) and (orientation:portrait) {
  [data-theme="landscape"] .welcome > .landscape { inset: auto 0 0; height: 55%; }
  .landscape .sun { width: 24%; right: 13%; top: 3%; }
}
@media (max-width:380px) {
  #consultation .brand-sub { display:none; }
}
@media (max-width:359px) {
  .welcome-service { display: none; }
}
@media print { .theme-control, .landscape { display:none!important; } }

.brand-logo { display: block; width: 140px; height: auto; flex: none; }
.welcome-brand .brand-logo { width: clamp(130px, 12vw, 190px); }
#reportPage > .brand-logo { width: 124px; margin-bottom: 20px; }
@media (max-width: 760px) {
  .bar .brand-logo { width: 108px; }
}
@media (max-width: 600px) {
  #consultation .brand-sub { display: none; }
}
@media (max-width: 350px) {
  .bar .brand-logo { width: 93px; }
}
