/* Guide-first application shell, using the existing coral brand and illustration system. */
.settlement-app {word-break:keep-all;overflow-wrap:break-word;}
html:has(body.settlement-app) {scroll-padding-top:96px;}
.settlement-app .header {position:sticky;top:0;z-index:35;background:var(--paper);}
.settlement-app>.skip {z-index:36;}
.settlement-app .header>.wrap {max-width:none;min-height:80px;padding:16px 28px;gap:20px;}
.settlement-context {margin-left:auto;min-width:0;display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:9px;background:var(--card);font-size:14px;font-weight:600;text-decoration:none;}
.settlement-more {position:relative;font-size:14px;}
.settlement-more summary {cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 4px;gap:7px;}
.settlement-more summary::after {content:'+';font-size:19px;color:var(--brand-strong);}
.settlement-more[open] summary::after {content:'−';}
.settlement-more summary::-webkit-details-marker {display:none;}
.settlement-more nav {position:absolute;right:0;top:calc(100% + 8px);width:240px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:0 8px 24px #76233a15;}
.settlement-more nav a {display:block;padding:11px 12px;text-decoration:none;border-radius:6px;}
.settlement-more nav a:hover {background:var(--brand-tint);}
.settlement-nav {position:fixed;inset:104px auto auto 16px;width:152px;display:grid;gap:8px;z-index:20;}
.settlement-nav a {display:flex;align-items:center;gap:12px;min-height:48px;padding:12px 16px;border-radius:10px;text-decoration:none;color:var(--muted);font-size:15px;font-weight:600;}
.settlement-nav svg {flex:none;}
.settlement-nav a[aria-current] {background:var(--brand-tint);color:var(--brand-ink);}
.settlement-nav a:hover {background:var(--brand-tint);}
.settlement-app>main.wrap {margin-left:184px;max-width:1450px;padding-inline:48px;width:calc(100% - 184px);}
.settlement-app>.footer {margin-left:184px;}
.settlement-app .lede {max-width:none;}
.settlement-app .guide-layout {grid-template-columns:minmax(0,1fr) 250px;gap:36px;}
.settlement-app :is(.guide-aside,.article-sidebar,.contact-panel) {top:104px;}
.settlement-home,.settlement-mine {padding-bottom:48px;}
.settlement-welcome {padding:48px 0 36px;scroll-margin-top:16px;}
.settlement-welcome-hero {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center;gap:40px;}
.settlement-welcome-hero>img {width:100%;height:auto;border-radius:16px;}
.settlement-welcome-actions {display:flex;align-items:center;gap:12px 24px;flex-wrap:wrap;margin-top:26px;}
.settlement-welcome-actions .settlement-text-link {margin-top:0;}
.settlement-welcome .settlement-note {margin-top:16px;}
.settlement-how {margin-top:44px;padding-top:26px;border-top:1px solid var(--line);}
.settlement-how h2 {font-size:20px;margin-bottom:22px;}
.settlement-how ol {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;list-style:none;padding:0;}
.settlement-how li {display:flex;gap:12px;align-items:flex-start;}
.settlement-how-number {display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--brand-tint);color:var(--brand-strong);font-size:13px;font-weight:650;}
.settlement-how h3 {font-size:17px;line-height:1.6;margin-bottom:6px;}
.settlement-how p {font-size:14px;line-height:1.75;color:var(--muted);}
.settlement-welcome h1,.settlement-home-head h1 {font-size:clamp(30px,3.2vw,46px);line-height:1.3;margin:12px 0 16px;letter-spacing:-.045em;}
.settlement-welcome .lede,.settlement-home-head .lede {font-size:18px;line-height:1.8;color:var(--muted);}
.settlement-setup {padding:26px 0 34px;scroll-margin-top:24px;}
.settlement-setup :is(h1,h2) {font-size:clamp(26px,2.7vw,36px);line-height:1.4;margin-bottom:12px;letter-spacing:-.035em;}
.settlement-setup>p {color:var(--muted);}
.settlement-setup-progress {display:flex;gap:24px;margin:20px 0 30px;list-style:none;padding:0;}
.settlement-setup-progress li {display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px;}
.settlement-setup-progress li span {display:grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid var(--line-strong);font-size:13px;}
.settlement-setup-progress [aria-current] {color:var(--brand-strong);font-weight:650;}
.settlement-setup-progress [aria-current] span {background:var(--brand-strong);border-color:var(--brand-strong);color:#fff;}
.settlement-setup fieldset {border:0;padding:0;margin:26px 0;min-width:0;}
.settlement-setup legend {font-weight:600;font-size:15px;margin-bottom:12px;padding:0;}
.settlement-choices {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.settlement-choices label {position:relative;background:var(--card);border:1px solid var(--line);border-radius:12px;cursor:pointer;}
.settlement-choices label:has(input:checked) {border-color:var(--brand-strong);box-shadow:0 0 0 1px var(--brand-strong);background:var(--brand-tint);}
.settlement-choices input {position:absolute;top:12px;left:12px;width:18px;height:18px;margin:0;accent-color:var(--brand-strong);}
.settlement-choices img {width:100%;aspect-ratio:1.8;object-fit:cover;border-radius:11px 11px 0 0;}
.settlement-choices span {display:block;text-align:center;padding:12px 8px;font-weight:650;}
.settlement-stage-context {font-size:14px;color:var(--brand-strong);margin-bottom:16px;}
.settlement-stage-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.settlement-stage-choices label {display:flex;align-items:flex-start;gap:14px;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--card);cursor:pointer;}
.settlement-stage-choices label:has(input:checked) {border-color:var(--brand-strong);box-shadow:0 0 0 1px var(--brand-strong);background:var(--brand-tint);}
.settlement-stage-choices input {width:18px;height:18px;margin:5px 0 0;accent-color:var(--brand-strong);flex:none;}
.settlement-stage-choices strong {display:block;font-size:18px;margin-bottom:6px;}
.settlement-stage-choices label>span>span {display:block;font-size:14px;color:var(--muted);}
.settlement-setup-actions {display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:16px 24px;}
.settlement-setup-actions [data-setup-back] {margin-right:auto;}
.settlement-setup .settlement-primary:disabled {background:var(--line);border-color:var(--line);color:var(--muted);cursor:default;}
.guide-search-controls :is(input,select) {width:100%;min-height:48px;border:1px solid var(--line-strong);border-radius:8px;background-color:var(--card);padding:10px 14px;font-size:16px;}
.settlement-primary,.settlement-secondary {display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border:1px solid var(--brand-strong);border-radius:8px;padding:11px 20px;font:inherit;font-size:15px;font-weight:600;text-decoration:none;}
.settlement-primary {background:var(--brand-strong);color:#fff;}
.settlement-primary:hover {background:var(--brand-ink);color:#fff;}
.settlement-secondary {background:var(--card);color:var(--brand-ink);}
.settlement-note {font-size:13px;color:var(--muted);line-height:1.7;margin-top:14px;}
.settlement-setup-links {display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:18px;font-size:14px;align-items:center;}
.settlement-setup-links a,.settlement-text-link {min-height:44px;display:inline-flex;align-items:center;}
.settlement-text-button {border:0;background:none;font:inherit;color:var(--muted);padding:8px 0;min-height:44px;text-decoration:underline;text-underline-offset:5px;}
.settlement-error {margin:14px 0;padding:12px 16px;background:var(--brand-tint);border-left:3px solid var(--brand-strong);font-size:14px;}
.settlement-home-head {display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,.4fr);gap:30px;align-items:center;padding:48px 0 36px;}
.settlement-home-head img {width:100%;border-radius:14px;}
.settlement-home-head .text-link {margin-top:16px;}
.settlement-home-columns {display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:44px;align-items:start;padding:26px 0;border-top:1px solid var(--line-strong);}
.settlement-home-columns h2 {font-size:24px;}
.settlement-home-columns .settlement-note {margin-top:8px;}
.settlement-next>li {padding:18px 0;}
.settlement-next>li:not(:last-child) {border-bottom:1px solid var(--line);}
.settlement-next label {display:flex;gap:12px;align-items:flex-start;min-height:44px;font-weight:600;cursor:pointer;}
.settlement-next input {width:21px;height:21px;margin:3px 0 0;accent-color:var(--brand-strong);flex:none;}
.settlement-next input:checked+span {color:var(--muted);text-decoration:line-through;}
.settlement-task-links {display:flex;flex-wrap:wrap;gap:8px 20px;margin:0 0 0 33px;font-size:14px;color:var(--brand-strong);}
.settlement-task-links a {padding:4px 0;}
.settlement-text-link {font-size:14px;color:var(--brand-strong);margin-top:12px;}
.settlement-progress {background:var(--brand-tint);padding:26px;border-radius:14px;}
.settlement-progress>strong {display:block;font-size:27px;margin:12px 0 18px;font-weight:650;font-variant-numeric:tabular-nums;}
.settlement-progress progress {display:block;width:100%;height:8px;appearance:none;border:0;border-radius:8px;accent-color:var(--brand-strong);background:var(--line);}
.settlement-progress progress::-webkit-progress-bar {background:var(--line);border-radius:8px;}
.settlement-progress progress::-webkit-progress-value {background:var(--brand-strong);border-radius:8px;}
.settlement-progress progress::-moz-progress-bar {background:var(--brand-strong);border-radius:8px;}
.settlement-progress .settlement-primary {margin-top:20px;width:100%;}
.settlement-local {display:flex;flex-wrap:wrap;gap:12px 28px;padding:16px 0 28px;font-size:15px;}
.settlement-section {padding:36px 0;border-top:1px solid var(--line-strong);scroll-margin-top:24px;}
.settlement-section h2 {font-size:24px;}
.settlement-section .section-head {margin-bottom:24px;}
.settlement-book-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px;row-gap:12px;}
.settlement-book-links a {display:flex;align-items:center;gap:20px;min-height:86px;text-decoration:none;padding:8px 0;}
.settlement-book-links img {width:100px;height:68px;object-fit:cover;border-radius:8px;}
.settlement-book-links a>span {display:grid;gap:4px;}
.settlement-book-links strong {font-size:19px;}
.settlement-book-links a>span>span {font-size:13px;color:var(--muted);}
.settlement-topic-links {display:flex;gap:16px 32px;flex-wrap:wrap;}
.settlement-topic-links a {padding:10px 0;}
.settlement-stories {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;}
.settlement-stories>a {display:grid;grid-template-columns:120px minmax(0,1fr);gap:20px;align-items:start;text-decoration:none;}
.settlement-stories img {width:120px;aspect-ratio:1;object-fit:cover;border-radius:10px;}
.settlement-stories h3 {font-size:19px;line-height:1.5;margin:7px 0;}
.settlement-stories p:not(.eyebrow) {font-size:14px;color:var(--muted);}
.settlement-owner-link {display:inline-block;margin-top:28px;font-size:14px;}
.settlement-regions>p {margin:14px 0 20px;color:var(--muted);}
.settlement-mine-context {display:flex;gap:20px;justify-content:space-between;align-items:center;padding:20px 0;border-top:1px solid var(--line-strong);}
.settlement-mine-context h2 {font-size:24px;}
.settlement-mine-context a {font-size:14px;}
.settlement-app[data-page="home"] .checklist-launcher,.settlement-app[data-page="mine"] .checklist-launcher {display:none;}
.settlement-app[data-page="home"],.settlement-app[data-page="mine"] {padding-bottom:0;}
.checklist-panel-save {display:block;margin-top:10px;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--brand-strong);font:inherit;font-size:12px;}
.checklist-panel-save:disabled {color:var(--muted);cursor:default;}
.checklist-panel-preference-status {font-size:12px;color:var(--muted);margin-top:8px;}
.guide-stage li:not(:has(~ li:not([hidden]))) {border-bottom:0;}
.guide-search {padding:28px 0;scroll-margin-top:20px;}
.guide-search-controls {display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr));gap:16px;}
.guide-search-controls label {display:grid;gap:8px;font-size:14px;}
.guide-search-count {margin:16px 0 0;color:var(--muted);font-size:14px;}
.guide-search-results .guide-docs {margin:0;}
.guide-search-results li {border-bottom:0;}
.guide-search-results li:not([hidden]):has(~ li:not([hidden])) {border-bottom:1px solid var(--line);}
.guide-hub-shortcuts {display:flex;flex-wrap:wrap;gap:12px 28px;padding:0 0 30px;font-size:15px;}
.guide-task-section {margin:32px 0;padding:26px;background:var(--brand-tint);border-radius:12px;}
.guide-task-section h2 {font-size:22px;margin-bottom:12px;}
.guide-task-section>p {font-size:14px;color:var(--muted);}
.settlement-app .guide-welcome-layout {grid-template-columns:minmax(0,1fr) 240px;gap:28px;}
.settlement-app .guide-welcome-art figcaption {display:none;}
@media(max-width:1100px) {
  .settlement-app>main.wrap {padding-inline:32px;}
  .settlement-home-columns {gap:28px;grid-template-columns:minmax(0,1fr) 220px;}
  .settlement-stories>a {grid-template-columns:1fr;}
  .settlement-stories img {width:100%;aspect-ratio:1.8;}
  .settlement-app .guide-layout {display:block;}
  .settlement-app .guide-aside {position:static;margin-top:32px;}
  .settlement-welcome-hero {gap:24px;}
  .settlement-how ol {gap:18px;}
}
@media(max-width:900px) {
  html:has(body.settlement-app) {scroll-padding-top:92px;}
  .settlement-app>main.wrap {width:100%;margin-left:auto;padding-inline:28px;}
  .settlement-app>.footer {margin-left:0;}
  .settlement-app,.has-checklist-launcher .settlement-app,.settlement-app[data-page="home"],.settlement-app[data-page="mine"] {padding-bottom:calc(76px + env(safe-area-inset-bottom));}
  .settlement-nav {position:fixed;inset:auto 0 0;width:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:6px 12px calc(6px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper);z-index:32;}
  .settlement-nav a {display:flex;flex-direction:column;gap:4px;padding:7px 4px;font-size:12px;min-height:56px;border-radius:8px;}
  .settlement-app .checklist-launcher {display:none;}
  .settlement-app .checklist-panel {bottom:92px;}
  .settlement-app .header .lang {display:none;}
  .settlement-app .header>.wrap {min-height:76px;padding:14px 20px;gap:14px;}
  .settlement-app .wordmark {font-size:24px;gap:9px;}
  .settlement-app .wordmark img {width:30px;height:34px;}
  .settlement-context {font-size:13px;padding:8px 12px;}
  .settlement-welcome {padding-top:36px;}
  .settlement-home-head {padding-top:36px;}
  .settlement-app .guide-welcome-layout {grid-template-columns:minmax(0,1fr) 180px;}
}
@media(max-width:640px) {
  .settlement-app>main.wrap {padding-inline:16px;}
  .settlement-app .header>.wrap {padding:12px 16px;gap:12px;}
  .settlement-app .wordmark {font-size:22px;gap:7px;flex-shrink:0;}
  .settlement-context {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .settlement-more {flex-shrink:0;}
  .settlement-welcome h1,.settlement-home-head h1 {font-size:32px;}
  .settlement-welcome .lede,.settlement-home-head .lede {font-size:16px;}
  .settlement-choices {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .settlement-choices img {aspect-ratio:2;}
  .settlement-choices span {padding:10px 6px;font-size:15px;}
  .settlement-welcome-hero {grid-template-columns:1fr;gap:24px;}
  .settlement-welcome-hero>img {height:200px;object-fit:contain;}
  .settlement-welcome-actions {display:grid;gap:12px;margin-top:22px;}
  .settlement-welcome-actions .settlement-text-link {justify-content:center;}
  .settlement-how {margin-top:28px;}
  .settlement-how ol {grid-template-columns:1fr;gap:22px;}
  .settlement-stage-choices {grid-template-columns:1fr;gap:12px;}
  .settlement-stage-choices label {padding:16px;}
  .settlement-stage-choices strong {font-size:17px;margin-bottom:4px;}
  .settlement-setup-actions {display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
  .settlement-setup-actions button {width:100%;}
  .settlement-setup-progress {gap:18px;margin:18px 0 26px;}
  .settlement-home-head {grid-template-columns:minmax(0,1fr);gap:16px;}
  .settlement-home-head img {display:none;}
  .settlement-home-columns {grid-template-columns:1fr;gap:24px;}
  .settlement-progress {padding:22px;}
  .settlement-progress>strong {font-size:25px;}
  .settlement-section {padding:28px 0;}
  .settlement-section h2,.settlement-home-columns h2 {font-size:22px;}
  .settlement-section .section-head {gap:12px;align-items:start;}
  .settlement-section .section-head a {font-size:13px;}
  .settlement-book-links {grid-template-columns:1fr;gap:0;}
  .settlement-book-links li:not(:last-child) {border-bottom:1px solid var(--line);}
  .settlement-stories {grid-template-columns:1fr;gap:24px;}
  .settlement-stories>a {grid-template-columns:100px minmax(0,1fr);gap:16px;}
  .settlement-stories img {aspect-ratio:1;}
  .settlement-stories h3 {font-size:18px;}
  .settlement-mine-context {align-items:start;}
  .guide-search-controls {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .guide-search-controls>label:first-child {grid-column:1/-1;}
  .guide-task-section {padding:20px 16px;}
  .settlement-app .guide-welcome-layout {display:block;}
  .settlement-app .guide-welcome-art {display:none;}
  .settlement-app .checklist-panel {inset:12px 12px auto;height:calc(100dvh - 24px);}
}
@media(max-width:380px) {
  html:has(body.settlement-app) {scroll-padding-top:128px;}
  .settlement-app .header>.wrap {flex-wrap:wrap;}
  .settlement-app .header .wordmark {margin-right:auto;}
  .settlement-context {order:3;width:100%;margin:0;border:0;background:transparent;padding:0;min-height:30px;}
  .settlement-more nav {width:min(240px,calc(100vw - 32px));}
  .settlement-stories>a {grid-template-columns:80px minmax(0,1fr);}
  .guide-search-controls {grid-template-columns:1fr;}
  .settlement-progress {padding:20px 16px;}
}
@media(prefers-reduced-motion:no-preference) {
  .settlement-primary,.settlement-choices label,.settlement-nav a {transition:background-color 160ms ease,border-color 160ms ease;}
}
