@font-face {
  font-family: "Montagu Slab";
  src: url("/fonts/montagu-slab.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5ebdc;
  --sheet: #fbf5eb;
  --ink: #2a2220;
  --wine: #542a32;
  --brick: #a83828;
  --muted: #64564c;
  --rule: #b5a38e;
  --edge: #796959;
  --wash: #ecdfcd;
  --error: #882b26;
  --warning: #705021;
  --success: #365139;
  --display: "Montagu Slab", Georgia, serif;
  --sans: "Instrument Sans", Arial, sans-serif;
  --gutter: clamp(1rem, 3.2vw, 3.5rem);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
a { color: var(--wine); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 1px; }
h1, h2, h3, p { margin: 0; }
h1, .country-name, .brand { font: 600 2rem/1.09 var(--display); letter-spacing: -.045em; }
h1 { font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.15; color: var(--wine); overflow-wrap: anywhere; }
h2, h3 { font-family: var(--sans); line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h3 { font-size: 1.25rem; }
small, .muted { color: var(--muted); }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
.button, .filter {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 48px; max-width: 100%; border: 1px solid var(--wine); border-radius: 0;
  background: var(--wine); color: var(--sheet); padding: .65rem 1rem;
  font: 650 .9375rem/1.25 var(--sans); text-align: center; text-decoration: none;
}
.button:hover { background: #3c1d23; }
.button-outline, .filter { color: var(--ink); background: transparent; border-color: var(--edge); }
.button-outline:hover, .filter:hover { background: var(--wash); }
.button-danger { color: var(--error); background: transparent; border-color: var(--error); }
.button-danger:hover { background: #f2d8cb; }
.button:active, .filter:active { box-shadow: inset 0 0 0 2px currentColor; }
button:disabled { opacity: .6; cursor: not-allowed; }
button[aria-busy="true"] { opacity: .8; cursor: progress; }
button[aria-busy="true"]::after { content: "…"; padding-inline-start: .35em; }
.shell { width: min(82rem, calc(100% - 2 * var(--gutter))); margin-inline: auto; min-width: 0; }
main { min-height: 72vh; padding-top: clamp(1rem, 3vw, 2.9rem); }
.skip { position: fixed; inset: 5px auto auto 5px; background: var(--sheet); padding: .8rem; z-index: 8; transform: translateY(-140%); }
.skip:focus { transform: none; }
.site-header { background: var(--paper); }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.brand { display: inline-flex; align-items: center; gap: .38em; color: var(--wine); font-size: 1.27rem; text-decoration: none; }
.brand img { flex: none; width: 1.42em; height: auto; }
.nav { display: flex; }
.nav a { display: flex; align-items: center; min-width: 0; color: var(--muted); text-decoration: none; font-weight: 550; }
.nav a:hover { background: var(--wash); }
.nav a[aria-current="page"], #account a[aria-current="page"] { font-weight: 700; color: var(--wine); }
.nav svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; }
#account { min-width: 0; }
#account a { overflow-wrap: anywhere; }
.footer { margin-top: 3.5rem; border-top: 1px solid var(--edge); padding-block: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer .brand { font-size: 1rem; }
.footer div { display: flex; gap: 1.15rem; }

.category, .count, .entry-action { font-size: .8125rem; font-weight: 650; }
.country-print { display: block; max-width: 100%; width: 100%; height: auto; mix-blend-mode: multiply; }
.page-head p { margin-top: .4rem; }
.search { width: min(19rem, 100%); position: relative; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.3rem; }
.filter { padding-inline: .8rem; }
.filter[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--sheet); }
.count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-tabs { display: flex; position: relative; align-items: center; gap: .25rem; overflow-x: auto; margin-bottom: .75rem; scrollbar-width: thin; }
.admin-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 .65rem; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.admin-tabs a:hover { color: var(--wine); background: var(--wash); }
.admin-tabs a[aria-current="page"] { color: var(--wine); border-bottom-color: currentColor; }
.admin-tabs a:focus-visible { outline-offset: -3px; }
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); align-items: stretch; gap: 1.8rem 1.45rem; }
.entries > .panel { grid-column: 1 / -1; }
.entry { min-width: 0; border-top: 2px solid var(--wine); }
.entry-link { height: 100%; display: flex; flex-direction: column; align-items: stretch; gap: .55rem; color: var(--ink); text-decoration: none; padding-bottom: .2rem; }
.entry-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .65rem; padding-block: .8rem .35rem; }
.country-name { font-size: clamp(1.45rem, 2.2vw, 2.15rem); color: var(--wine); }
.category { color: var(--brick); }
.entry-print { height: clamp(6.5rem, 9vw, 9rem); object-fit: cover; object-position: center 60%; margin-bottom: .25rem; }
.entry-heading .country-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.5rem; }
.entry-heading .category { flex: none; white-space: nowrap; }
.entry-link > h3, .entry-link > p.muted { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.entry-link > h3 { line-height: 1.2; -webkit-line-clamp: 2; }
.entry-link > p.muted { line-height: 1.5; -webkit-line-clamp: 3; }
@media (min-width: 768px) {
  .entry-link > h3 { min-height: 2.4em; }
  .entry-link > p.muted { min-height: 4.5em; }
}
.country-print.print-fallback { background: var(--wash); object-fit: contain; padding: 1.5rem; }
.editor-print { max-width: 16rem; height: 6rem; object-fit: cover; }
.entry-compact .entry-print { height: 3rem; }
.entry-action { color: var(--wine); margin-top: auto; padding-top: .6rem; text-decoration: underline; text-underline-offset: .2em; }
.entry-link:hover .entry-action { text-decoration-thickness: 2px; }
.page-head, .pathway-heading, .directory-header { margin-bottom: .45rem; }
.pathway-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pathway-heading > div { min-width: 0; }
.pathway-heading .country-name { font-size: 1rem; margin-bottom: .2rem; }
.pathway-heading .category { margin-top: .2rem; }
.overview-print { width: min(22%, 10rem); height: 4.5rem; object-fit: cover; flex: none; }
.back { display: inline-flex; align-items: center; min-height: 48px; gap: .5rem; font-weight: 600; }
.panel { min-width: 0; padding: clamp(1rem, 2vw, 1.65rem); background: var(--sheet); border-block-start: 2px solid var(--wine); }
.layout, .stack, .flow, .fields, .field { display: grid; min-width: 0; }
.layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
.stack { gap: 1.25rem; }
.flow { gap: .85rem; }
.flow > .button { justify-self: start; }
.layout > *, .flow > *, .stack > *, .fields > *, .row > * { min-width: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.between { justify-content: space-between; }
.actions { margin-top: .9rem; }
.checklist, .files { list-style: none; margin: 0; padding: 0; }
.checklist > li, .files > li { padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.checklist > li:last-child, .files > li:last-child { border-bottom: 0; }
.checklist p { margin-top: .25rem; }
.check-title { display: grid; grid-template-columns: 1.25rem 1fr; gap: .7rem; align-items: center; min-height: 48px; font-weight: 650; cursor: pointer; }
.task-content { margin-left: 1.95rem; }
progress { appearance: none; display: block; width: 100%; height: .5rem; border: 0; background: var(--wash); color: var(--wine); }
progress::-webkit-progress-bar { background: var(--wash); }
progress::-webkit-progress-value { background: var(--wine); }
progress::-moz-progress-bar { background: var(--wine); }
input:not([type="checkbox"]):not([type="file"]), select, textarea { width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--edge); border-radius: 0; padding: .65rem .75rem; background: var(--sheet); font-weight: 400; }
textarea { resize: vertical; }
input:read-only:not([type="checkbox"]):not([type="file"]) { background: var(--wash); }
input[type="checkbox"] { appearance: none; width: 1.2rem; height: 1.2rem; flex: none; margin: 0; border: 1.5px solid var(--edge); border-radius: 0; background: var(--sheet); cursor: pointer; }
input[type="checkbox"]:checked { background: var(--wine); border-color: var(--wine); }
label.row:has(input[type="checkbox"]) { flex-wrap: nowrap; min-height: 48px; cursor: pointer; }
.fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.field { align-content: start; gap: .35rem; font-weight: 650; }
.field small { font-weight: 400; }
.field-full { grid-column: 1 / -1; }
.validation-dates { margin: 0; }
.validation-dates div { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.validation-dates dt { color: var(--muted); font-size: .875rem; }
.validation-dates dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; align-self: start; width: fit-content; font-size: .8125rem; border: 1px solid currentColor; padding: .14rem .45rem; color: var(--wine); font-weight: 650; }
.notice, .error, .success { padding: .7rem .85rem; border-left: 3px solid currentColor; }
.notice { background: var(--wash); }
.warning { color: var(--warning); }
.error { color: var(--error); background: #f7e2d8; }
.success { color: var(--success); background: #e4eadc; }
#discovery-hint { margin-bottom: 1rem; }
pre.review { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.sign-in { max-width: 32rem; margin-inline: auto; }
.prose { max-width: 70ch; }
.prose p { margin-bottom: 1rem; }
dialog::backdrop { background: #2a2220af; }
#toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 5; color: var(--sheet); background: var(--wine); padding: .85rem 1rem; max-width: min(28rem, calc(100% - 2rem)); }
#toast[data-state="error"] { background: var(--error); }
#toast[data-state="warning"] { background: var(--warning); }
#toast[data-state="success"] { background: var(--success); }
#page[data-area="admin"] .panel { padding: 1rem; }
[data-requirement] { background: var(--paper); border-top: 1px solid var(--edge); }
@media (min-width: 768px) {
  body { display: grid; grid-template-columns: clamp(13.75rem, 17vw, 15.5rem) minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .site-header { grid-row: 1 / 3; align-self: start; height: 100dvh; position: sticky; top: 0; overflow: auto; border-right: 1px solid var(--rule); }
  .header-content { min-height: 100%; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 2rem clamp(.75rem, 1.45vw, 1.4rem); gap: 2.6rem; }
  .nav { flex-direction: column; gap: .3rem; }
  .nav a { border-left: 3px solid transparent; padding: .75rem .5rem; gap: .65rem; min-height: 48px; }
  .nav a[aria-current="page"] { border-color: var(--wine); background: var(--wash); }
  #account { margin-top: auto; }
  #account a { width: 100%; }
}
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  :root { --nav-height: calc(68px + env(safe-area-inset-bottom)); scroll-padding-bottom: var(--nav-height); }
  body { padding-bottom: var(--nav-height); }
  .site-header { padding: calc(.5rem + env(safe-area-inset-top)) var(--gutter) .5rem; border-bottom: 1px solid var(--rule); }
  .header-content { flex-wrap: wrap; }
  .header-content .brand { font-size: min(1.27rem, 7vw); white-space: nowrap; }
  #account { max-width: 45%; }
  .nav { position: fixed; z-index: 3; inset: auto 0 0; padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); background: var(--paper); border-top: 1px solid var(--rule); justify-content: center; }
  .nav a { flex: 1 1 0; max-width: 8rem; min-height: 64px; padding: .4rem .1rem; flex-direction: column; justify-content: center; gap: .15rem; text-align: center; border-top: 3px solid transparent; font-size: .75rem; line-height: 1.15; }
  .nav a[aria-current="page"] { border-color: var(--wine); }
  .nav a:focus-visible { outline-offset: -3px; }
  #toast { bottom: calc(var(--nav-height) + .7rem); }
}
@media (max-width: 38rem) {
  .search { width: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .pathway-heading { flex-direction: column; align-items: stretch; gap: .85rem; }
  .overview-print { width: 100%; }
  .count { margin-left: 0; }
}
@media (forced-colors: active) {
  input[type="checkbox"] { appearance: auto; }
  .checkbox .icon { display: none; }
  .nav a[aria-current="page"], .filter[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}

.icon { width: 1.125rem; height: 1.125rem; flex: none; vertical-align: middle; pointer-events: none; }
.entry-action .icon, .notice > .icon, .error > .icon, .success > .icon, #toast > .icon { margin-inline-end: .4em; }
.entry-action .icon { margin-inline: .4em 0; }
.search > .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); }
.search input[type="search"] { padding-inline-start: 2.5rem; }
.icon-button { display: inline-grid; place-content: center; min-width: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 0; color: var(--wine); background: transparent; }
.icon-button:hover { background: var(--wash); }
.icon-button:active { background: var(--rule); }
input:focus-visible, textarea:focus-visible, .select-trigger:focus-visible { outline-offset: -1px; }
.field-error { color: var(--error); font-weight: 550; }
[aria-invalid="true"] { border-color: var(--error); }
.checkbox { position: relative; display: inline-flex; flex: none; }
.checkbox .icon { display: none; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; color: var(--sheet); }
.checkbox input:checked + .icon { display: block; }
guide-select, guide-date { display: block; min-width: 0; }
.select-trigger, .date-entry, .file-field { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 48px; border: 1px solid var(--edge); border-radius: 0; background: var(--sheet); color: var(--ink); }
.select-trigger { justify-content: space-between; text-align: start; padding: .65rem .75rem; font-weight: 400; }
.select-trigger:hover, .date-entry:focus-within, .file-field:hover { border-color: var(--wine); }
.select-trigger[aria-expanded="true"] { border-color: var(--wine); }
.select-trigger[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.select-value, .filename { min-width: 0; overflow-wrap: anywhere; }
.picker-popup { position: fixed; inset: auto; margin: 0; padding: .25rem; overflow: auto; overscroll-behavior: contain; box-sizing: border-box; border: 1px solid var(--wine); background: var(--sheet); color: var(--ink); box-shadow: 0 4px 12px #39282424; font: 400 1rem/1.35 var(--sans); }
.option-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; padding: .55rem .65rem; cursor: pointer; overflow-wrap: anywhere; }
.option-list [data-active] { background: var(--wash); color: var(--wine); }
.option-list [aria-selected="true"] { font-weight: 650; color: var(--wine); }
.option-list [aria-selected="false"] .icon { visibility: hidden; }
.file-field { position: relative; padding: .35rem .65rem .35rem .35rem; }
.file-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-trigger { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .65rem; white-space: nowrap; background: var(--wash); font-weight: 600; }
.filename { font-size: .9rem; font-weight: 400; color: var(--muted); }
.file-field:has(:focus-visible) { outline: 2px solid var(--brick); outline-offset: -1px; }
.date-entry { gap: 0; }
.date-entry input { border: 0; background: transparent; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; text-align: center; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 1px; }
.calendar-days small { padding-block: .25rem; }
.calendar-days button { background: transparent; border: 0; border-radius: 0; min-height: 40px; padding: .2rem 0; }
.calendar-days button:hover { background: var(--wash); }
.calendar-days [aria-pressed="true"] { background: var(--wine); color: var(--sheet); }
.calendar-days button:focus-visible { outline-offset: -2px; }
dialog { --modal-pad: clamp(.9rem, 2vw, 1.5rem); padding: 0; background: var(--sheet); color: var(--ink); width: min(var(--user-width, var(--modal-width, 32rem)), calc(100% - 32px)); height: var(--user-height, fit-content); max-height: calc(100dvh - 32px); max-width: calc(100% - 32px); border: 1px solid var(--wine); border-top-width: 3px; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
body:has(dialog[open]) { overflow: hidden; }
.modal-header, .modal-footer { display: flex; align-items: center; gap: .75rem; padding: .55rem var(--modal-pad); flex: none; }
.modal-header { justify-content: space-between; border-bottom: 1px solid var(--rule); }
.modal-header h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.modal-header h2:focus { outline: none; }
.modal-content { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal-body { padding: var(--modal-pad); overflow: auto; min-height: 0; align-content: start; overscroll-behavior: contain; }
.modal-footer { border-top: 1px solid var(--rule); flex-wrap: wrap; justify-content: flex-start; }
.modal-footer [data-resize] { margin-left: auto; cursor: nwse-resize; touch-action: none; }
.modal-footer [data-resize] .icon { width: 1rem; height: 1rem; }
@media (max-width: 767px), (pointer: coarse) {
  dialog { width: min(var(--modal-width,32rem),calc(100% - 32px)); height: fit-content; }
  [data-resize] { display: none; }
}
@media (max-width: 38rem) {
  dialog { width: calc(100% - 32px); }
  .modal-footer .button { width: 100%; }
}
@media (forced-colors: active) {
  .option-list [data-active] { outline: 1px solid Highlight; outline-offset: -1px; }
  .checkbox input:checked + .icon { display: none; }
}

.directory-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.directory-filters { display: grid; grid-template-columns: repeat(2,minmax(0,17rem)); gap: .75rem; }
.directory-filters .field { font-size: .875rem; gap: .25rem; }
.directory-filters .field small:empty { display: none; }
.directory-filters .select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-status { display: flex; min-height: 44px; align-items: center; justify-content: space-between; }
.filter-status .count { margin: 0; }
#clear-filters { color: var(--wine); background: none; border: 0; min-height: 44px; padding: 0 .25rem; text-decoration: underline; font-size: .875rem; }
destination-picker { display: block; min-width: 0; }
.country-menu:popover-open { display: flex; flex-direction: column; gap: .3rem; padding: .5rem; overflow: hidden; }
.country-menu > input, .country-menu > button { flex: none; }
.country-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.country-options [role="status"] { padding: .75rem .5rem; }
.country-option { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .4rem; cursor: pointer; }
.country-option:hover, .country-option:focus-within { background: var(--wash); }
.country-option > [aria-hidden] { font-size: 1.2rem; }
.country-menu [data-done] { align-self: end; min-height: 44px; }
#mobile-back { display: none; }

@media (max-width: 767px) {
  main { padding-top: .75rem; }
  .header-content { flex-wrap: nowrap; gap: .35rem; }
  .header-content .brand { font-size: 1.1rem; }
  #account { margin-left: auto; }
  #account .button { min-height: 44px; padding: .5rem .7rem; }
  #mobile-back:not([hidden]) { display: inline-grid; min-height: 44px; min-width: 44px; margin-left: -.5rem; }
  #page > .back { display: none; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.05rem; }
  .pathway-heading .country-name { font: 600 .875rem/1.25 var(--sans); margin-bottom: .2rem; }
  .pathway-heading .category { margin-top: .2rem; }
  .overview-print { display: none; }
  .directory-header { gap: .6rem; }
  .directory-header .search { width: min(43%, 11rem); flex: none; }
  .directory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .directory-header .search input, .directory-filters .select-trigger { min-height: 44px; }
  .entries { grid-template-columns: 1fr; gap: .25rem; }
  .entry { border-top: 1px solid var(--rule); }
  .entry-link { padding: .6rem 0; gap: .25rem; }
  .entry-heading { padding: 0; }
  .entry .country-name { font: 600 .875rem/1.3 var(--sans); letter-spacing: 0; }
  .entry-print { display: none; }
  .entry-action { padding-top: .1rem; }
}
.directory-header h1:focus, .welcome-quiz h1:focus { outline: none; }
#directory-search { margin-bottom: .7rem; }
#directory-search .search { display: block; width: min(100%, 34.75rem); }
.text-action, .button.text-action:hover {
  background-color: transparent;
  color: var(--wine);
}
.text-action {
  border: 0;
  border-radius: .25rem;
  min-height: 44px;
  padding: .35rem .5rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .18em;
  transition: background-color 140ms ease-out;
}
@media (hover: hover) {
  button.text-action:not(:disabled):hover { background-color: var(--wash); }
}
button.text-action:not(:disabled):focus-visible { background-color: var(--wash); }
button.text-action:not(:disabled):active { background-color: #e4d4c0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .text-action { transition: none; }
}
.welcome-quiz { max-width: 37rem; margin: 0 auto; padding-bottom: 1rem; }
.quiz-meta, .quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.quiz-meta { font-size: .875rem; color: var(--muted); }
.welcome-quiz progress { display: block; width: 100%; height: .25rem; margin: 0 0 1.1rem; }
.welcome-quiz h1 + p { margin-top: .4rem; }
.quiz-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; margin: 1rem 0; }
.quiz-choices label { display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .6rem; border: 1px solid var(--rule); background: var(--sheet); cursor: pointer; font-weight: 550; }
.quiz-choices label:has(:checked) { color: var(--wine); border-color: var(--wine); background: var(--wash); }
.quiz-choices input[type="radio"], .quiz-choices input[type="checkbox"] { appearance: auto; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--wine); }
.quiz-actions .button { margin-left: auto; }
.quiz-note { font-size: .875rem; color: var(--muted); margin-top: .9rem; }
@media (max-width: 375px) { .quiz-choices { grid-template-columns: 1fr; } }
.quiz-suggestions, .quiz-country-search, .quiz-country-empty { grid-column: 1 / -1; }

.sign-in #email-start > .button { justify-self: stretch; }
.sign-in-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .875rem; }
.sign-in-divider::before, .sign-in-divider::after { content: ""; flex: 1; border-top: 1px solid var(--edge); }
.google-sign-in {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 44px; padding: 0 12px; border: 1px solid #747775; border-radius: 4px;
  background: white; color: #1f1f1f; font: 500 14px/1.4 Arial, sans-serif; text-decoration: none;
}
.google-sign-in:hover, .google-sign-in:focus-visible { background: #f2f6fc; }
body:has(.sign-in) #account a[href="#/sign-in"] { display: none; }
.billing-markets { max-height: 12rem; overflow-y: auto; margin-top: .5rem; }
.pathway-editor { width: min(100%, 64rem); margin-inline: auto; }
.pathway-editor .panel h2 { font-size: 1.2rem; margin-bottom: .65rem; }
.pathway-editor .fields { align-items: start; }
.pathway-editor .field { align-content: start; }
.directory-tools { max-width: 42rem; }
@media (min-width: 48rem) {
  .pathway-editor .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pathway-editor .metric-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.pathway-editor summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; }
.pathway-editor details[open] summary { margin-bottom: 1rem; }
button.country-option { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; }
button.country-option:hover, button.country-option:focus-visible, button.country-option[aria-pressed="true"] { background: var(--wash); }

.visa-facts { margin: .5rem 0 0; }
.visa-facts > div { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--edge); }
.visa-facts dd { margin: 0; font-weight: 600; }
.upgrade { max-width: 56rem; margin: 0 auto; display: grid; gap: 1.25rem; }
.upgrade-intro p { margin-top: .5rem; color: var(--muted); }
.upgrade-plans { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.upgrade-plan { background: var(--sheet); border: 1px solid var(--rule); padding: clamp(1rem, 2vw, 1.6rem); }
.upgrade-plan h2 { font-size: 1.4rem; }
.upgrade-plan dl { margin: 1rem 0; }
.upgrade-plan dt { border-top: 1px solid var(--rule); padding-top: .75rem; font-weight: 650; }
.upgrade-plan dd { margin: .15rem 0 .85rem; }
.upgrade-benefits { margin: .6rem 0 .85rem; }
.upgrade-paid { border-color: var(--wine); box-shadow: inset 0 3px var(--wine); }
.upgrade-checkout, .upgrade-reset { border-top: 1px solid var(--rule); padding-top: .85rem; }
.upgrade-checkout { display: grid; gap: .45rem; }
.upgrade-checkout strong { font-size: 1.5rem; }
.upgrade-reset strong { display: block; }
@media (max-width: 600px) {
  .upgrade-plans { grid-template-columns: minmax(0,1fr); }
}
main:focus, #page:focus { outline: none; }
.pathway-editor .panel { border: 0; }
.pathway-editor .files li { border: 0; }
.pathway-editor .files .button-outline { border-color: transparent; text-decoration: underline; }
.research-route > summary { cursor: pointer; font-weight: 650; }
.research-route[open] > summary { margin-bottom: .75rem; }
.research-content { display: grid; gap: 1rem; }
.research-content .pathway-editor { width: 100%; }

.step-note { overflow-wrap: anywhere; }
.note-text { white-space: pre-wrap; }

.statistics { display: grid; gap: .85rem; font-variant-numeric: tabular-nums; }
.stat-cards, .stat-charts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .7rem; margin: 0; }
.stat-cards > div, .stat-chart, .stat-ranking { background: var(--sheet); padding: 1rem; border-radius: .45rem; min-width: 0; }
.stat-cards > div { display: flex; flex-direction: column; justify-content: space-between; }
.stat-cards dt, .statistics small, .stat-chart p span { color: var(--muted); font-size: .85rem; }
.stat-cards dd { margin: .3rem 0 0; color: var(--wine); font-weight: 650; font-size: 1.9rem; }
.statistics > header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .4rem; }
.stat-charts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.stat-chart p { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.stat-chart strong { font-size: 1.45rem; }
.stat-chart ol { display: grid; grid-template-columns: repeat(7,1fr); padding: 0; margin: .8rem 0 0; list-style: none; }
.stat-chart li { display: grid; justify-items: center; font-size: .8rem; }
.stat-chart svg { fill: var(--wine); }
.stat-chart.saves svg { fill: var(--brick); }
.stat-chart small { width: 100%; border-top: 1px solid var(--rule); text-align: center; padding-top: .25rem; }
.stat-ranking table { width: 100%; border-collapse: collapse; margin-top: .65rem; font-size: .9rem; }
.stat-ranking th, .stat-ranking td { text-align: left; padding: .55rem .25rem; overflow-wrap: anywhere; }
.stat-ranking th:last-child, .stat-ranking td:last-child { text-align: right; }
.stat-ranking thead { color: var(--muted); }
.stat-ranking tbody tr { border-top: 1px solid var(--wash); }
@media (max-width: 680px) {
  .stat-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-charts { grid-template-columns: 1fr; }
}

.research-actions { display: flex; align-items: center; gap: .5rem; }
.research-actions .button { min-width: 0; padding-inline: .7rem; }
#research-activity summary { cursor: pointer; padding-block: .3rem; }
#research-status, #research-elapsed { margin-left: .35rem; color: var(--muted); font-size: .875rem; }
#research-events { list-style: none; margin: .5rem 0 0; padding: 0 .5rem; max-height: 15rem; overflow-y: auto; }
#research-events li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; padding: .3rem 0 .3rem .7rem; border-left: 2px solid var(--rule); font-size: .9rem; overflow-wrap: anywhere; }
#research-events time { color: var(--muted); font-variant-numeric: tabular-nums; }

#policy-notice {
  position: fixed;
  z-index: 4;
  right: .75rem;
  bottom: calc(var(--nav-height, 0px) + .75rem);
  width: min(24rem, calc(100% - 1.5rem));
  max-height: 45dvh;
  overflow: auto;
  padding: .85rem 1rem;
  border: 1px solid var(--rule);
  background: var(--sheet);
  box-shadow: 0 .25rem 1rem #38211e20;
}
#policy-notice p { margin: .25rem 0 .65rem; font-size: .9rem; }
#policy-notice .row { gap: 1rem; font-size: .9rem; }
.footer { margin-bottom: var(--notice-space, 0px); }
:root { scroll-padding-bottom: calc(var(--nav-height, 0px) + var(--notice-space, 0px)); }
#policy-notice:not([hidden]) ~ #toast { bottom: calc(var(--nav-height, 0px) + var(--notice-space, 0px) + .75rem); }

.task-heading { display: flex; align-items: center; justify-content: space-between; gap: .25rem 1rem; }
.task-tools { display: flex; align-items: center; flex-wrap: wrap; column-gap: .75rem; flex: none; }
.task-tools .text-action, .application-notes .text-action { padding-inline: .5rem; font-size: .875rem; }
.tasks .task-content { margin: 0 0 .2rem .59rem; border-left: 1px solid var(--rule); padding: .1rem 0 .2rem 1.3rem; }
.tasks .task-content > p:first-child { margin-top: 0; }
.application-notes .text-action { justify-self: start; }
.application-notes .note-text { overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .tasks > li { display: flex; flex-direction: column; }
  .task-heading { display: contents; }
  .task-tools { order: 1; margin-left: 1.95rem; }
}

#language-button { justify-self: start; font-size: .875rem; }
@media (max-width: 767px) {
  #language-button { margin-inline-start: auto; }
  #account { margin-left: 0; }
}

.document-name { max-width: 100%; overflow-wrap: anywhere; text-align: start; }
.document-preview { display: grid; place-items: center; min-width: 0; }
.document-preview img { max-width: 100%; max-height: 65dvh; object-fit: contain; }
.document-preview canvas { width: 100%; height: auto; background: white; }
.document-preview .row { padding-top: .6rem; justify-content: center; }
dialog:has(.document-preview) h2 { overflow-wrap: anywhere; }

vc-side-panel { display: block; min-width: 0; }
vc-side-panel[hidden] { display: none; }
.panel-trigger {
  width: 100%; min-height: 2.75rem; display: flex; gap: 1rem; align-items: center;
  justify-content: space-between; border: 0; padding: .55rem .75rem; cursor: pointer;
  background: transparent; color: var(--wine); font: inherit; font-weight: 650; text-align: start;
}
.panel-trigger > span { min-width: 0; overflow-wrap: anywhere; }
.panel-trigger > .icon { flex: none; }
.panel-trigger:enabled:hover, .panel-trigger:focus-visible { background: var(--wash); color: var(--wine); }
#research-list { background: var(--sheet); }
.research-route + .research-route { border-top: 1px solid var(--wash); }
.research-route > .panel-trigger { padding: .8rem 1rem; }
dialog.side-sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(46rem, 100%);
  height: 100dvh; max-height: 100%; max-width: 100%; border: 0;
  box-shadow: -6px 0 32px #2a222025; box-sizing: border-box;
}
.side-sheet .modal-header { padding: 1rem; }
.side-sheet .modal-header h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.sheet-body { display: block; padding: 1rem; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.sheet-body > * + * { margin-block-start: 1rem; }
#research-events { max-height: none; }
@media (prefers-reduced-motion: no-preference) {
  dialog.side-sheet[open] { animation: sheet-enter 160ms ease-out; }
  @keyframes sheet-enter { from { transform: translateX(2rem); opacity: .7; } }
}
.research-route > .panel-trigger > span { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.research-label { flex: 1 1 17rem; }
.research-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; }
.research-badge.ready { color: var(--success); }
.research-badge.pending { color: var(--warning); }
.research-badge .icon { width: 1rem; height: 1rem; }
