@charset "UTF-8";
body.theme-classic {
  --tp-bg: #fdf6e8;
  --tp-surface: #fffdf7;
  --tp-tone-shade: #000000;
  --tp-surface-alt: #f7eed8;
  --tp-header-bg: rgba(253, 246, 232, 0.94);
  --tp-input-bg: #fffdf7;
  --tp-backdrop: rgba(58, 47, 29, 0.38);
  --tp-toast-bg: #3a2f1d;
  --tp-text: #3a2f1d;
  --tp-muted: #6f5f45;
  --tp-border: #e2d3b0;
  --tp-border-control: #8f7a4d;
  --tp-accent: #b45309;
  --tp-accent-strong: #92400e;
  --tp-on-accent: #fffdf7;
  --tp-success: #3f6a0a;
  --tp-danger: #b91c1c;
  --tp-danger-bg: #fef2f2;
  --tp-warning: #ca8a04;
  --tp-warning-ink: #8a5a00;
  --tp-warning-bg: #fefce8;
  --tp-warning-text: #854d0e;
  --tp-completed-text: #5a4106;
  --tp-completed-bg: #f7eab4;
  --tp-completed-border: #d9c26a;
  --tp-font-body: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --tp-font-display: Georgia, "Times New Roman", serif;
  --tp-font-mono: "Courier New", Courier, monospace;
  --tp-radius: 6px;
  --tp-radius-sm: 4px;
  --tp-radius-card: 12px;
  --tp-radius-card-sm: 8px;
  --tp-shadow: 0 2px 6px rgba(120, 95, 50, 0.12);
  --tp-stamp-ink-1: #9a1f1f;
  --tp-stamp-ink-2: #1f4f9a;
  --tp-stamp-ink-3: #1f6b3a;
  --tp-stamp-ink-4: #7a3a8a;
  --tp-stamp-ink-5: #8a5a00;
  --stamp-ink-count: 5;
}

*, *::before, *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: var(--tp-font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

:target {
  scroll-margin-top: 80px;
}

body[data-dialog-open] {
  overflow: hidden;
}

[role=dialog][tabindex="-1"]:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
h1, h2, h3, h4 {
  margin: 0 0 12px;
  font-family: var(--tp-font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.1rem;
}

h4 {
  font-size: 0.95rem;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--tp-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: underline;
}

code, kbd, .mono {
  font-family: var(--tp-font-mono);
  font-size: 0.9em;
}

.muted {
  color: var(--tp-muted);
}

.small {
  font-size: 0.875rem;
}

.tiny {
  font-size: 0.8rem;
}

.strong {
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

.strike {
  text-decoration: line-through;
}

.stack > * + * {
  margin-top: 12px;
}

.stack-sm > * + * {
  margin-top: 8px;
}

.stack-lg > * + * {
  margin-top: 24px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row-between {
  justify-content: space-between;
}

.row-end {
  justify-content: flex-end;
}

.row-wrap {
  flex-wrap: wrap;
}

.row-top {
  align-items: flex-start;
}

.grow {
  flex: 1;
  min-width: 0;
}

.flex-none {
  flex: none;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.spacer-1 {
  height: 4px;
}

.spacer-3 {
  height: 12px;
}

.spacer-5 {
  height: 24px;
}

.divider {
  height: 1px;
  background: var(--tp-border);
  border: 0;
  margin: 16px 0;
}

html.baked-wait main {
  display: none;
}

body:has(main.faq-page)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background: url("../img/llama-still.png") right -4vw bottom -2vh/min(90vw, 420px) no-repeat;
}

body.theme-dark:has(main.faq-page)::before {
  opacity: 0.04;
}

@media (min-width: 641px) {
  body:has(main.faq-page)::before {
    background-size: min(60vw, 640px);
    background-position: right -3vw bottom -3vh;
  }
}
.llama-walk {
  display: inline-block;
  line-height: 0;
}

.llama-walk img {
  width: 11rem;
  height: auto;
}

.llama-walk--md img {
  width: 9rem;
}

.llama-walk--sm img {
  width: 6rem;
}

.no-match {
  text-align: center;
  margin: 12px 0;
}

.no-match p {
  margin: 0;
}

.llama-mark {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: -0.12em;
}

.field {
  margin-bottom: 16px;
}

.field > label,
.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tp-text);
}

.field-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.field-error {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--tp-danger);
}

input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=time],
input[type=datetime-local],
input[type=search],
input[type=url],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--tp-text);
  background: var(--tp-input-bg);
  border: 1px solid var(--tp-border-control, var(--tp-border));
  border-radius: var(--tp-radius-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  border-color: var(--tp-accent);
}

input[aria-invalid=true], select[aria-invalid=true] {
  border-color: var(--tp-danger);
}

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.field-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-inline > .field {
  flex: 1 1 160px;
  margin-bottom: 0;
}

.field-narrow {
  width: 200px;
  max-width: 100%;
}

.field-inline > .field.field-narrow {
  flex: 0 0 200px;
}

.control-narrow {
  width: 200px;
  max-width: 100%;
}

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox input {
  width: auto;
}

.checkbox {
  min-height: 28px;
}

@media (max-width: 767px) {
  .checkbox {
    min-height: 44px;
  }
  input:not([type]), input[type=text], input[type=email], input[type=password],
  input[type=number], input[type=date], input[type=time],
  input[type=datetime-local], input[type=search], input[type=url], select {
    min-height: 44px;
  }
}
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 8px 16px;
  color: var(--tp-on-accent, #fff);
  background: var(--tp-accent);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--tp-header-bg);
  border-bottom: 1px solid var(--tp-border);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  max-width: 1180px;
  min-height: 60px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-family: var(--tp-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tp-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-brand:hover {
  text-decoration: none;
  color: var(--tp-accent);
}

.site-brand .llama-mark {
  height: 1.9em;
  vertical-align: middle;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}

.site-links {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}

.site-links + .site-nav {
  margin-left: 0;
}

.nav-link {
  padding: 8px 12px;
  font-size: 1rem;
  color: var(--tp-text);
  text-decoration: none;
  border-radius: var(--tp-radius-sm);
}

.nav-link:hover {
  background: var(--tp-surface-alt);
  text-decoration: none;
}

.nav-link.active {
  color: var(--tp-accent);
  font-weight: 600;
}

.nav-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .site-header-inner {
    gap: 8px;
    padding: 0 12px;
  }
  .site-nav {
    gap: 8px;
  }
  .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
    padding: 6px 8px;
    font-size: 0.95rem;
  }
  .site-brand {
    min-height: 44px;
    min-width: 44px;
  }
}
@media (max-width: 599px) {
  .site-header-inner {
    gap: 0 4px;
    padding: 0 8px;
  }
  .site-brand {
    gap: 6px;
    font-size: 0.95rem;
  }
  .site-nav {
    gap: 2px;
  }
}
@media (max-width: 379px) {
  .site-brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 599px) {
  body.has-header-cta .site-brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 360px) {
  .site-header-inner {
    gap: 4px;
    padding: 0 8px;
  }
  .site-nav {
    gap: 4px;
  }
}
@media (max-height: 500px) {
  .site-header {
    position: static;
  }
}
.skyline {
  content: "";
  display: block;
  height: 72px;
  margin-top: 32px;
  background: var(--tp-accent);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.page-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--tp-muted);
  font-size: 0.9rem;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  color: var(--tp-muted);
  font-size: 0.8rem;
  text-align: center;
}
.site-footer p {
  margin: 0;
}
.site-footer p + p {
  margin-top: 4px;
}
.site-footer a {
  padding: 0.8rem 0.25rem;
  margin: -0.8rem -0.25rem;
}

.site-footer::before {
  content: "";
  display: block;
  height: 72px;
  margin-top: 32px;
  background: var(--tp-accent);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
  margin-bottom: 12px;
}

body:has(.auth-wrap, .skyline) .site-footer::before {
  display: none;
}

@media (max-width: 767px) {
  .page, .page-narrow {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-header {
    flex-direction: column;
  }
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--tp-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: none;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--tp-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--tp-text);
}

.tab:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.tab[aria-selected=true] {
  color: var(--tp-accent);
  font-weight: 600;
  border-bottom-color: var(--tp-accent);
}

.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  background: var(--tp-surface-alt);
  border-radius: 999px;
}

@media (max-width: 767px) {
  .tabs {
    padding-right: 32px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab {
    min-height: 44px;
  }
  .tabs {
    position: sticky;
    top: 60px;
    z-index: calc(500 - 1);
    background: var(--tp-bg);
  }
}
.grid {
  display: grid;
  gap: 12px;
}

.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-stats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--tp-accent);
  color: var(--tp-accent);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--tp-on-primary, var(--tp-on-accent));
  background: var(--tp-primary-bg, var(--tp-accent));
  border-color: var(--tp-primary-bg, var(--tp-accent));
}

.btn-primary:hover:not(:disabled) {
  color: var(--tp-on-primary, var(--tp-on-accent));
  background: var(--tp-primary-bg-strong, var(--tp-accent-strong));
  border-color: var(--tp-primary-bg-strong, var(--tp-accent-strong));
}

.btn-danger {
  color: var(--tp-danger);
  border-color: var(--tp-border);
}

.btn-danger:disabled {
  opacity: 0.75;
}

.btn-danger:hover:not(:disabled) {
  color: var(--tp-on-accent);
  background: var(--tp-danger);
  border-color: var(--tp-danger);
}

.btn-ghost {
  background: none;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--tp-surface-alt);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
}

.btn-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-link {
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--tp-accent);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .btn {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }
  .btn-sm {
    position: relative;
    min-height: 32px;
  }
  .btn-sm::after {
    content: "";
    position: absolute;
    inset: -7px 0;
  }
}
@media (max-width: 767px) {
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }
  .field-inline > .field.flex-none {
    margin-left: auto;
  }
}
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  color: var(--tp-muted);
}

@media (max-width: 767px) {
  .password-field input {
    padding-right: 46px;
  }
  .password-toggle {
    width: 44px;
  }
}
.password-toggle:hover {
  color: var(--tp-text);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.password-strength {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.password-strength span {
  flex: 1;
  height: 3px;
  background: var(--tp-border);
  border-radius: 999px;
  transition: background 160ms ease;
}

.password-strength[data-score="1"] span:nth-child(-n+1),
.password-strength[data-score="2"] span:nth-child(-n+2) {
  background: var(--tp-danger);
}

.password-strength[data-score="3"] span:nth-child(-n+3) {
  background: var(--tp-warning);
}

.password-strength[data-score="4"] span {
  background: var(--tp-success);
}

.card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 16px;
}

.card-tight {
  padding: 12px;
}

.card-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.card-link:hover {
  text-decoration: none;
  border-color: var(--tp-accent);
  transform: translateY(-1px);
}

.card-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.stat {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 12px;
  container-type: inline-size;
}

.stat-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.stat-clickable:hover {
  border-color: var(--tp-accent);
  transform: translateY(-1px);
}

.stat-clickable:focus-within {
  border-color: var(--tp-accent);
}

.stat-clickable:has(.stat-link:focus-visible) {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.stat-clickable .stat-link:focus-visible {
  outline: none;
}

.stat-clickable .stat-label::after {
  content: " ›"/"";
  color: var(--tp-accent);
  font-weight: 700;
}

.stat-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.stat-link:hover {
  text-decoration: underline;
}

.stat-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.stat-value {
  font-family: var(--tp-font-display);
  font-size: clamp(1.1rem, 15cqi, 1.5rem);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-foot .stat-mask {
  margin: -4px -4px -4px 0;
}

.stat-mask {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--tp-muted);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.stat-mask::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.stat-mask:hover {
  color: var(--tp-text);
  background: var(--tp-surface-alt);
}
.stat-mask[aria-pressed=true] {
  color: var(--tp-accent);
}

.stat-mask:focus-visible {
  outline: 2px solid var(--tp-accent, currentColor);
  outline-offset: 2px;
}

.stat-label {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.progress {
  height: 6px;
  background: var(--tp-surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--tp-success);
  border-radius: 999px;
  transition: width 160ms ease;
}

.bar-track {
  height: 8px;
  background: var(--tp-surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  color: var(--tp-muted);
  white-space: nowrap;
  vertical-align: middle;
}

.badge-owner {
  color: var(--tp-accent-strong, var(--tp-accent));
  border-color: var(--tp-accent);
}

.badge-draft {
  color: var(--tp-muted);
}

.badge-published {
  color: var(--tp-success);
  border-color: var(--tp-success);
}

.badge-completed {
  color: var(--tp-completed-text, var(--tp-warning-text));
  border-color: var(--tp-completed-border, var(--tp-warning));
  background: var(--tp-completed-bg, var(--tp-warning-bg));
  font-weight: 600;
}

.badge-todo {
  color: var(--tp-muted);
}

.badge-done {
  color: var(--tp-success);
  border-color: var(--tp-success);
}

.badge-pending {
  color: var(--tp-warning-ink, var(--tp-warning));
  border-color: var(--tp-warning);
}

.chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 1px 8px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  white-space: nowrap;
}

.chip-charged {
  color: var(--tp-muted);
}

.chip-pending {
  color: var(--tp-warning-ink, var(--tp-warning));
  border-color: var(--tp-warning);
}

button.chip {
  cursor: pointer;
  font-family: inherit;
  min-height: 28px;
}

@media (max-width: 767px) {
  button.chip {
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }
  .chip, .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .chip > span {
    min-width: 0;
  }
}
button.chip:hover:not(:disabled) {
  border-color: var(--tp-selected, var(--tp-accent));
}

button.chip[aria-pressed=true] {
  color: var(--tp-on-selected, var(--tp-on-accent));
  background: var(--tp-selected, var(--tp-accent));
  border-color: var(--tp-selected, var(--tp-accent));
}

button.chip:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.chip-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.chip-remove {
  padding: 0;
  margin-left: 2px;
  font-size: 1em;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
}

.chip-remove:hover {
  color: var(--tp-danger);
}

@media (max-width: 767px) {
  .chip-remove {
    min-width: 44px;
    min-height: 44px;
    margin: -14px -12px -14px -10px;
  }
}
.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

@media (max-width: 767px) {
  .chip-group {
    gap: 16px 8px;
  }
  button.chip {
    position: relative;
    min-height: 28px;
    padding: 3px 11px;
    font-size: 0.8125rem;
    line-height: 1.3;
  }
  button.chip::after {
    content: "";
    position: absolute;
    inset: -9px -2px;
  }
}
.filter-set {
  gap: 4px 8px;
  align-items: center;
}

.chip-divider {
  align-self: stretch;
  width: 1px;
  margin: 0 4px;
  background: var(--tp-border);
}

@media (max-width: 767px) {
  .filter-set {
    align-items: flex-start;
    row-gap: 16px;
  }
  .filter-set > .chip-group {
    flex: 1 1 100%;
  }
  .chip-divider {
    display: none;
  }
}
.table-wrap {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--tp-border);
  white-space: nowrap;
}

.table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-table-header-text, var(--tp-muted));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--tp-table-header, var(--tp-surface-alt));
  position: sticky;
  top: 0;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--tp-surface-alt);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .wrap {
  white-space: normal;
  min-width: 220px;
}

.table .actions {
  text-align: right;
}

.table .select-cell {
  width: 1%;
  padding-right: 0;
  text-align: center;
}

.table .select-cell input {
  cursor: pointer;
}

.table td a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.select-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  cursor: pointer;
}

.select-all-text {
  display: none;
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .table-wrap:has(> .table-cards) {
    overflow-x: visible;
  }
  .table.table-cards,
  .table.table-cards tbody {
    display: block;
  }
  .table.table-cards thead {
    display: block;
  }
  .table.table-cards thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .table.table-cards thead th:not(.select-cell):not(.keep-on-phone) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .table.table-cards thead th.select-cell {
    display: block;
    flex: 1 1 auto;
    position: static;
    width: auto;
    padding: 0 12px 0 0;
    text-align: left;
  }
  .table.table-cards thead th.keep-on-phone {
    display: block;
    flex: 0 0 auto;
    position: static;
    width: auto;
    margin-left: auto;
    padding: 0 12px 0 0;
    text-align: left;
  }
  .table.table-cards thead .select-hit {
    justify-content: flex-start;
    gap: 8px;
    padding-left: 12px;
  }
  .table.table-cards thead .select-all-text {
    display: inline;
  }
  .table.table-cards tbody tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 2px;
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--tp-border);
  }
  .table.table-cards tbody tr:last-child {
    border-bottom: 0;
  }
  .table.table-cards td {
    display: block;
    grid-column: 2;
    min-width: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    border: 0;
  }
  .table.table-cards .select-cell {
    grid-column: 1;
    grid-row: 1/span 7;
    width: auto;
    padding-top: 2px;
    text-align: center;
  }
  .table.table-cards .select-cell input {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  .table.table-cards .select-hit {
    min-width: 44px;
    min-height: 44px;
  }
  .table.table-cards td a {
    position: relative;
    display: inline-block;
  }
  .table.table-cards td a::after {
    content: "";
    position: absolute;
    inset: -12px 0;
  }
  .table.table-cards .cell-title {
    grid-row: 1;
    font-weight: 600;
  }
  .table.table-cards .cell-chips {
    margin: 4px 0;
  }
  .table.table-cards .actions {
    grid-column: 3;
    grid-row: 1/span 2;
    text-align: right;
  }
  .table.table-cards td[data-label] {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
  }
  .table.table-cards td[data-label]::before {
    content: attr(data-label);
    color: var(--tp-muted);
    flex: none;
  }
  .table.table-cards .cell-stack {
    display: block;
    min-width: 0;
    text-align: right;
  }
  .table.table-cards td.cell-quiet {
    display: none;
  }
  .table.table-cards .cell-emphasis {
    font-weight: 600;
    color: var(--tp-text);
  }
  .table.table-cards.table-cards-plain tbody tr {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 12px;
  }
  .table.table-cards.table-cards-plain td {
    grid-column: 1;
  }
  .table.table-cards.table-cards-plain .actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
    text-align: left;
  }
  .settle .table.table-cards.table-cards-plain .actions {
    text-align: right;
  }
  .settle .table.table-cards.table-cards-plain tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .settle .table.table-cards.table-cards-plain td {
    grid-column: 1/-1;
  }
  .settle .table.table-cards.table-cards-plain .cell-title {
    grid-column: 1;
    grid-row: 1;
  }
  .settle .table.table-cards.table-cards-plain .actions {
    grid-column: 2;
    grid-row: 1/span 2;
    margin-top: 0;
    align-self: start;
  }
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.pager-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  justify-content: center;
}

.pager-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pager-item {
  display: inline-flex;
}

.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.pager-num[aria-current=page], .pager-num[aria-current=page]:hover {
  color: var(--tp-text);
  font-weight: 700;
  text-decoration: none;
  cursor: default;
}

@media (max-width: 767px) {
  .pager-status {
    flex: 1 0 100%;
  }
  .pager-controls {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: space-between;
  }
  .pager-controls > .btn {
    flex: none;
    padding-inline: 8px;
  }
  .pager-numbers {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0;
    justify-content: space-around;
  }
  .pager-item {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }
  .pager-num {
    min-width: 32px;
    min-height: 44px;
  }
}
.pager-gap {
  align-items: center;
  min-width: 20px;
  justify-content: center;
  color: var(--tp-muted);
}

.pager-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table td.cell-people {
  white-space: normal;
  max-width: 32rem;
}

.table-files .cell-title {
  max-width: 22rem;
  line-height: 1.3;
}

.table-files .cell-title a,
.table-files .cell-title > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-files .cell-title > span {
  font-weight: 400;
}

.table-files .cell-title a {
  display: block;
  min-height: 28px;
  line-height: 28px;
}

.table-files td.cell-attached {
  white-space: normal;
  max-width: 28rem;
}

.table-files .cell-attached-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.table-files .cell-shared {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 28rem;
}

.table-files .cell-shared .badge-traveller,
.table-files .cell-shared .traveller-slot {
  margin: 0;
}

.table-files .cell-shared .traveller-slot,
.table-files .cell-shared .traveller-more {
  display: inline-flex;
  min-width: 0;
}

.cell-chips .cell-shared {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.cell-chips .cell-shared .badge-traveller,
.cell-chips .cell-shared .traveller-slot {
  margin: 0;
}

.cell-chips .cell-shared .traveller-slot,
.cell-chips .cell-shared .traveller-more {
  display: inline-flex;
  min-width: 0;
}

@media (max-width: 767px) {
  .table.table-cards.table-files td[data-label]:empty {
    display: none;
  }
  .table.table-cards.table-files td.cell-wide,
  .table.table-cards.table-files td.cell-attached {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .table.table-cards.table-files .cell-shared {
    min-width: 0;
    max-width: none;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--tp-backdrop);
  overflow-y: auto;
}

.modal {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.modal-wide {
  max-width: 680px;
}

.modal-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--tp-muted);
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--tp-text);
  background: var(--tp-surface-alt);
}

.modal-close:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modal-footer-split {
  justify-content: space-between;
}

.modal {
  --sheet-pad: 24px;
}

@media (max-width: 767px) {
  .modal {
    --sheet-pad: 16px;
  }
  .modal .modal-footer {
    position: sticky;
    bottom: calc(-1 * var(--sheet-pad));
    z-index: 1;
    margin: 16px calc(-1 * var(--sheet-pad)) calc(-1 * var(--sheet-pad));
    padding: 12px var(--sheet-pad) calc(var(--sheet-pad) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--tp-border);
    background-color: var(--tp-bg);
    background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
    padding: 16px;
  }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
}
.modal-footer-split > .btn-row {
  margin-left: auto;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  background: var(--tp-backdrop);
}

.drawer {
  width: 100%;
  max-width: 520px;
  height: 100%;
  padding: 24px;
  overflow-y: auto;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border-left: 1px solid var(--tp-border);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
}

.drawer-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tp-border);
}

.drawer-title {
  margin: 0;
  font-size: 1.1rem;
}

.drawer-eyebrow {
  font-size: 0.8rem;
  color: var(--tp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--tp-border);
}

@media (max-width: 767px) {
  .drawer-backdrop {
    align-items: flex-end;
  }
  .drawer {
    max-width: none;
    height: 94vh;
    height: 94dvh;
    padding: 16px;
    border-left: 0;
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
  }
}
@media (min-width: 768px) {
  body.panels-popup .drawer-backdrop.panel-switchable {
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
  }
  body.panels-popup .drawer-backdrop.panel-switchable > .drawer {
    height: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  }
  body.panels-side .modal-backdrop.panel-switchable {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
  }
  body.panels-side .modal-backdrop.panel-switchable > .modal {
    max-width: 520px;
    max-height: none;
    height: 100%;
    border: 0;
    border-left: 1px solid var(--tp-border);
    border-radius: 0;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
  }
}
.toast-stack {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--tp-on-toast, var(--tp-on-accent));
  background: var(--tp-toast-bg);
  border-radius: var(--tp-radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: toast-in 180ms ease;
}

.toast-error {
  color: var(--tp-on-accent);
  background: var(--tp-danger);
}

.toast-warning {
  color: var(--tp-warning-ink);
  background: var(--tp-warning-bg);
  border: 1px solid var(--tp-warning);
}

.toast-success {
  color: var(--tp-on-accent);
  background: var(--tp-success);
}

.toast-region {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-error,
.toast-warning {
  display: flex;
  gap: 12px;
  align-items: center;
  pointer-events: auto;
}

.toast-close {
  flex: none;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font: inherit;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.toast-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
@media (max-width: 767px) {
  .toast-close {
    min-width: 44px;
    min-height: 44px;
  }
}
.alert {
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  background: var(--tp-surface-alt);
}

.alert-error {
  color: var(--tp-danger);
  border-color: var(--tp-danger);
  background: var(--tp-danger-bg);
}

.alert-warning {
  color: var(--tp-warning-text);
  border-color: var(--tp-warning);
  background: var(--tp-warning-bg);
}

.alert-info {
  color: var(--tp-muted);
}

.tab-bar {
  display: none;
}

@media (max-width: 767px) {
  .tab-bar {
    display: flex;
    position: fixed;
    inset: auto 0 0;
    z-index: 500;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--tp-header-bg, var(--tp-surface));
    border-top: 1px solid var(--tp-border);
    backdrop-filter: blur(6px);
  }
  .tab-bar-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 64px;
    font-size: 0.8rem;
    color: var(--tp-muted);
    text-decoration: none;
  }
  .tab-bar-link:hover {
    text-decoration: none;
  }
  .tab-bar-link:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
    outline-offset: -3px;
  }
  .tab-bar-link[aria-current=page] {
    color: var(--tp-accent-strong);
    font-weight: 600;
    box-shadow: inset 0 3px 0 var(--tp-accent);
  }
  .tab-bar-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body:has(.tab-bar) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  body:has(.tab-bar) .toast-stack {
    bottom: calc(64px + 16px + env(safe-area-inset-bottom));
  }
  body:has(.tab-bar) .site-links {
    display: none;
  }
  body:has(.tab-bar) .account-item-settings {
    display: none;
  }
  body:has(.tab-bar) .site-links + .site-nav {
    margin-left: auto;
  }
}
.empty-state {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 32px 16px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.empty-body {
  margin: 0 auto 16px;
  max-width: 380px;
  color: var(--tp-muted);
  font-size: 0.88rem;
}

.loading {
  padding: 32px;
  color: var(--tp-muted);
  font-size: 0.9rem;
  text-align: center;
}

.theme-selector,
.language-selector {
  position: relative;
  flex: none;
}

.theme-toggle,
.language-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover,
.language-toggle:hover {
  border-color: var(--tp-accent);
}

.theme-toggle:focus-visible,
.language-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.theme-dropdown,
.language-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: none;
  min-width: 176px;
  padding: 4px;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.theme-dropdown.show,
.language-dropdown.show {
  display: block;
}

.theme-option,
.language-option {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.87rem;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.theme-option:hover,
.language-option:hover {
  background: var(--tp-surface-alt);
}

.theme-option:focus-visible,
.language-option:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.theme-option.active,
.language-option.active {
  color: var(--tp-accent);
  font-weight: 600;
}

.theme-option.active::after,
.language-option.active::after {
  content: "✓";
  margin-left: auto;
}

.theme-swatch {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--tp-border);
}

.label-short {
  display: none;
}

@media (max-width: 767px) {
  .label-full {
    display: none;
  }
  .label-short {
    display: inline;
  }
  .theme-toggle,
  .language-toggle {
    min-height: 44px;
  }
}
@media (max-width: 400px) {
  .nav-link {
    padding-left: 6px;
    padding-right: 6px;
  }
  .theme-toggle,
  .language-toggle {
    min-width: 44px;
    justify-content: center;
  }
  .theme-toggle #current-theme,
  .language-toggle #current-language {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .language-toggle .label-short {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
.account-menu {
  position: relative;
  flex: none;
}

.account-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 4px 10px 4px 5px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--tp-text);
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.account-toggle:hover {
  background: var(--tp-surface-alt);
}

.account-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.account-toggle[aria-expanded=true] {
  border-color: var(--tp-border);
  background: var(--tp-surface-alt);
}

.account-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tp-on-accent, #fff);
  background: var(--tp-accent);
  border-radius: 50%;
}
.account-initial::before {
  content: attr(data-initial);
}

.account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chevron {
  font-size: 0.75rem;
  color: var(--tp-muted);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: none;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  padding: 4px;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.account-dropdown.show {
  display: block;
}

.account-signed-in {
  margin: 0;
  padding: 8px 10px;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--tp-muted);
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--tp-border);
  margin-bottom: 4px;
}

.account-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-size: 1rem;
  color: var(--tp-text);
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.account-item:hover {
  background: var(--tp-surface-alt);
  text-decoration: none;
}

.account-item:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.account-item.active {
  color: var(--tp-accent);
  font-weight: 600;
}

@media (max-width: 767px) {
  .account-toggle {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0 6px;
  }
  .account-name,
  .account-chevron {
    display: none;
  }
}
.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  margin: 0;
  list-style: none;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.autocomplete-option {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 7px 9px;
  font: inherit;
  font-size: 0.87rem;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option[aria-selected=true] {
  background: var(--tp-surface-alt);
}

.autocomplete-name {
  font-weight: 500;
}

.autocomplete-meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--tp-muted);
  white-space: nowrap;
}

.autocomplete-status {
  padding: 9px;
  font-size: 0.82rem;
  color: var(--tp-muted);
}

.autocomplete-freetext {
  display: block;
  width: 100%;
  padding: 9px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--tp-muted);
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.autocomplete-freetext:hover {
  background: var(--tp-surface-alt);
  color: var(--tp-text);
}

.checklist {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.checklist-group-title {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-table-header-text, var(--tp-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--tp-table-header, var(--tp-surface-alt));
  border-bottom: 1px solid var(--tp-border);
}

.checklist-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-group-title .select-hit {
  justify-content: flex-start;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--tp-text);
}

.check-row-wrap {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--tp-border);
}

.check-row-wrap:last-child {
  border-bottom: 0;
}

.check-row-wrap:hover {
  background: var(--tp-surface-alt);
}

.select-box {
  display: flex;
  align-items: flex-start;
  padding: 12px 8px 12px 16px;
  cursor: pointer;
}

.select-box input {
  cursor: pointer;
}

.select-box {
  flex: none;
  min-width: 28px;
  min-height: 28px;
}

.check-status {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 32px;
  min-height: 44px;
  margin: 0;
  padding: 12px 0 0;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.check-status:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.check-circle {
  position: relative;
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  box-sizing: border-box;
  border: 2px solid var(--tp-accent);
  border-radius: 50%;
  transition: background 160ms ease;
}

.check-status:hover .check-circle {
  background: var(--tp-surface-alt);
}

.check-status[aria-pressed=true] .check-circle {
  background: var(--tp-accent);
}

.check-status[aria-pressed=true] .check-circle::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--tp-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-status + .check-row {
  padding-left: 4px;
}

.check-main {
  flex: 1;
  min-width: 0;
}

.check-text {
  display: block;
  font-size: 0.94rem;
  font-weight: 500;
}

.check-row.is-done .check-text {
  color: var(--tp-muted);
  text-decoration: line-through;
}

.check-note {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.check-side {
  flex: none;
}

.plan-card {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
}

.plan-when {
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.plan-desc {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 2px 0;
}

.plan-note {
  font-size: 0.8rem;
  color: var(--tp-muted);
  margin-bottom: 4px;
}

.plan-cost {
  font-size: 0.82rem;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .select-box {
    min-width: 44px;
    min-height: 44px;
    padding-right: 8px;
  }
  .checklist-group-title .select-hit {
    min-width: 44px;
    min-height: 44px;
  }
  .check-status {
    width: 44px;
  }
  .check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
  }
  .check-main {
    display: contents;
  }
  .check-row {
    row-gap: 4px;
  }
  .check-tags {
    margin-top: 0;
  }
  .check-text, .check-note {
    grid-column: 1;
  }
  .check-travellers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    grid-column: 1/-1;
  }
  .check-travellers .badge-traveller, .check-travellers .traveller-slot {
    margin: 0;
  }
  .check-tags {
    grid-column: 1/-1;
  }
  .check-side {
    grid-column: 2;
    grid-row: 1;
  }
}
.timeline-day {
  margin-bottom: 24px;
}

.timeline-date {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 8px;
  padding-bottom: 8px;
  font-size: 1rem;
  border-bottom: 2px solid var(--tp-border);
}

.timeline-date-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--tp-muted);
}

.timeline-entries {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.timeline-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tp-border);
}

.timeline-entry:last-child {
  border-bottom: 0;
}

.timeline-checks {
  display: flex;
  align-items: flex-start;
  flex: none;
}

@media (min-width: 768px) {
  .timeline-checks {
    min-width: 52px;
  }
}
.select-box-tight {
  padding: 0;
  min-width: 0;
  min-height: 0;
  flex: none;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}

.check-status-tight {
  padding: 0;
  min-height: 0;
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.timeline-entry:hover {
  background: var(--tp-surface-alt);
}

.timeline-time {
  flex: none;
  width: 92px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-desc {
  font-size: 0.94rem;
  font-weight: 500;
}

.timeline-note {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.timeline-meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.timeline-cost {
  flex: none;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.timeline-actions {
  flex: none;
}

.timeline-actions.timeline-actions-pending {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 767px) {
  .timeline-entry {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .timeline-time {
    width: auto;
  }
  .timeline-checks {
    order: 0;
  }
  .timeline-time {
    order: 1;
  }
  .timeline-actions {
    order: 2;
    margin-left: auto;
  }
  .timeline-body {
    order: 3;
    flex: 1 1 100%;
  }
  .timeline-cost {
    order: 4;
    margin-left: auto;
  }
  .select-box-tight {
    padding: 12px;
    margin: -12px;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
  }
  .check-status-tight {
    width: 44px;
    padding: 12px 0;
    margin: -12px 0;
  }
  .timeline-actions.timeline-actions-pending {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }
}
.weather-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.weather-card-wide {
  grid-column: 1/-1;
}

.weather-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 8px 12px;
  background: var(--tp-weather-bg, var(--tp-surface-alt));
  min-width: 0;
}

.weather-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.weather-place {
  font-size: 0.9rem;
  font-weight: 500;
}

.weather-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--tp-muted);
}

.weather-line-muted {
  font-size: 0.8rem;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 11rem));
  gap: 2px 12px;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--tp-text);
  font-variant-numeric: tabular-nums;
}

.weather-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.weather-detail-icon {
  font-size: 0.95rem;
  line-height: 1;
  width: 1.2em;
  text-align: center;
}

.weather-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.weather-temps {
  font-size: 0.9rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--tp-text);
}

.weather-condition {
  color: var(--tp-muted);
}

.weather-note {
  margin-top: 2px;
}

.weather-advice {
  margin-top: 4px;
  font-style: italic;
}

.weather-badge {
  padding: 1px 4px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-badge-typical {
  border-color: var(--tp-weather-typical-border, var(--tp-border));
  color: var(--tp-weather-typical-fg, var(--tp-muted));
}

@media (max-width: 767px) {
  .weather-locations {
    grid-template-columns: minmax(0, 1fr);
  }
}
.timeline-note a.plain-text {
  color: inherit;
  text-decoration: none;
  cursor: auto;
}

.budget-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(160px, 200px) 1fr;
  align-items: start;
}

.budget-total-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.budget-rates-note {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--tp-muted);
  text-align: right;
}

.budget-total-value {
  font-family: var(--tp-font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.budget-native-totals {
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.budget-pie {
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
}

.budget-pie canvas {
  display: block;
}

.budget-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.budget-legend-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.budget-legend-swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.budget-legend-label {
  flex: 1;
  min-width: 0;
}

.budget-legend-percent {
  flex: none;
  min-width: 3.2em;
  text-align: right;
  color: var(--tp-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.budget-legend-amount {
  flex: none;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1179px) {
  .budget-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .budget-pie {
    max-width: 120px;
  }
}
.budget-breakdown-card {
  padding: 0;
}

.budget-breakdown-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius);
  cursor: pointer;
}
.budget-breakdown-toggle:hover {
  color: var(--tp-accent);
}
.budget-breakdown-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.budget-breakdown-sign {
  flex: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--tp-accent);
}

#budget-breakdown-body {
  padding: 0 16px 16px;
}

.budget-show-seg {
  display: none;
}

@media (max-width: 767px) {
  .budget-show-chips {
    display: none;
  }
  .budget-show-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .budget-show-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .budget-show-seg .seg button {
    padding-inline: 8px;
    font-size: 0.78rem;
  }
}
/**
 * Settle Expenses — who owes whom, under the budget table.
 *
 * Colour is never the only signal here. The sign travels in the text (the
 * figure itself, and "+"/"−" on a detail line) and the heading of the popup
 * says it in words, so the table reads correctly in monochrome and to anyone
 * who does not distinguish the two hues.
 */
.settle {
  margin-top: 24px;
}

.settle-note {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.settle-net-positive {
  color: var(--tp-success, var(--tp-text));
  font-weight: 600;
}

.settle-net-negative {
  color: var(--tp-danger, var(--tp-text));
  font-weight: 600;
}

.settle-net-level {
  color: var(--tp-muted);
}

.settle-net {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.settle-pill {
  padding: 2px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  white-space: nowrap;
}

.settle-pill.settle-net-positive {
  border-color: var(--tp-success, var(--tp-border));
}

.settle-pill.settle-net-negative {
  border-color: var(--tp-danger, var(--tp-border));
}

.settle-net-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.settle-lines {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.settle-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.settle-line:last-child {
  border-bottom: 0;
}

.settle-line-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settle-line-desc {
  overflow-wrap: anywhere;
}

.settle-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.settle-line-amount {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settle-totals {
  margin: 0;
  padding-top: 12px;
  border-top: 2px solid var(--tp-border);
}

.settle-totals > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 2px 0;
}

.settle-totals dt {
  color: var(--tp-muted);
  font-size: 0.9rem;
}

.settle-totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settle-totals-net {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--tp-border);
}

.settle-totals-net dt {
  color: var(--tp-text);
  font-weight: 600;
}

.settle-balance {
  margin-bottom: 24px;
}

.settle-balance .settle-note {
  margin: 8px 0 0;
}

.settle-totals > .settle-totals-net:only-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.settle-modal {
  --settle-pad: 24px;
}

@media (max-width: 767px) {
  .settle-modal {
    --settle-pad: 16px;
  }
}
.settle-modal .modal-header {
  position: sticky;
  top: calc(-1 * var(--settle-pad));
  z-index: 1;
  margin: calc(-1 * var(--settle-pad)) calc(-1 * var(--settle-pad)) 16px;
  padding: var(--settle-pad) var(--settle-pad) 12px;
  border-bottom: 1px solid var(--tp-border);
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
}

.settle-modal .modal-actions {
  position: sticky;
  bottom: calc(-1 * var(--settle-pad));
  z-index: 1;
  margin: 16px calc(-1 * var(--settle-pad)) calc(-1 * var(--settle-pad));
  padding: 12px var(--settle-pad) var(--settle-pad);
  border-top: 1px solid var(--tp-border);
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
}

.settle-payments {
  margin-top: 24px;
}

.settle-payments-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.settle-payments .settle-line {
  align-items: center;
}

.settle-payments .settle-line-main {
  flex: 1;
}

.settle-pay-summary {
  margin: 0 0 12px;
  font-weight: 600;
}

.settle-pay-outcome {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.settle-pay-outcome-settled {
  color: var(--tp-success, var(--tp-text));
  font-weight: 600;
}

.settle-pay-outcome-over {
  color: var(--tp-danger, var(--tp-text));
  font-weight: 600;
}

@media (max-width: 767px) {
  .settle-payments .settle-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
  }
  .settle-payments .settle-line-main {
    grid-column: 1;
    grid-row: 1;
  }
  .settle-payments .settle-line > .btn {
    grid-column: 2;
    grid-row: 1/span 2;
    align-self: start;
  }
  .settle-payments .settle-line-amount {
    grid-column: 1;
    grid-row: 2;
  }
}
.date-range {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.date-field {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 9.5rem;
}

.date-field > .date-text {
  padding: 5px 34px 5px 10px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.date-pick {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 100%;
  padding: 0;
  font-size: 15px;
  background: none;
  border: 0;
  cursor: pointer;
}

.date-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .toolbar-pair--date {
    align-items: center;
  }
  .toolbar-pair--date .date-range {
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: wrap;
  }
  .toolbar-pair--date .date-range .date-range {
    display: contents;
  }
  .toolbar-pair--date .date-range-dash {
    display: none;
  }
  .date-field {
    flex: 1 1 8.1rem;
    min-width: 8.1rem;
    width: auto;
  }
  .date-field > .date-text {
    min-height: 44px;
    padding: 8px 34px 8px 8px;
    font-size: 16px;
  }
  .toolbar-pair--date .date-range .btn {
    min-width: 36px;
    min-height: 44px;
    padding-inline: 0;
  }
  .date-pick {
    width: 34px;
  }
}
.onboarding {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.onboarding-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.onboarding-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.onboarding-progress {
  margin-left: auto;
  font-size: 0.875rem;
}

.onboarding-intro {
  margin: 8px 0 12px;
}

.onboarding-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.onboarding-step {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.onboarding-step.is-done {
  opacity: 0.7;
}

.onboarding-mark {
  flex: none;
  width: 1.25em;
  text-align: center;
}

.onboarding-alldone {
  margin: 12px 0 0;
  font-weight: 600;
}

.settings-banner {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 16px;
}

.settings-banner-text {
  flex: 1 1 18rem;
}

.settings-banner-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.settings-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
}

.settings-banner-actions .btn-link {
  text-decoration: underline;
}

.settings-banner-actions .btn-link, .settings-banner-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.flight-row {
  align-items: end;
}

.flight-find .btn {
  width: auto;
  padding-inline: 10px;
}

.flight-pills, .timeline-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.flight-pills .chip, .flight-pills .badge, .timeline-tags .chip, .timeline-tags .badge {
  margin-left: 0;
}

.flight-block {
  position: relative;
}

.flight-choices {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.flight-choices .btn {
  text-align: left;
}

.news-carousel {
  margin-top: 20px;
}

.news-row-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.news-arrow {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--tp-border);
  border-radius: 50%;
  background: var(--tp-surface);
  cursor: pointer;
  line-height: 1;
}

.news-card {
  flex: 0 0 220px;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--tp-surface);
  color: inherit;
  text-decoration: none;
  display: block;
}

.news-card-image {
  position: relative;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in srgb, var(--tp-border) 40%, transparent);
  overflow: hidden;
}
.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-fallback {
  font-size: 24px;
}

.news-card-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.news-card-body {
  padding: 8px;
}

.news-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  font-size: 11px;
  opacity: 0.65;
  margin-top: 6px;
}

.notification-bell {
  position: relative;
  display: inline-flex;
}

.notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 1.05rem;
  color: var(--tp-text);
  background: transparent;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}

.notification-button:hover {
  background: var(--tp-surface-alt);
}

.notification-button:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  padding: 0 5px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: var(--tp-on-accent);
  background: var(--tp-danger);
  border-radius: 9px;
}

.notification-badge[hidden] {
  display: none;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  width: min(24rem, 100vw - 2rem);
  max-height: min(70vh, 32rem);
  max-height: min(70dvh, 32rem);
  overflow-y: auto;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.notification-panel[hidden], .notification-empty[hidden], .notification-head .btn[hidden] {
  display: none;
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--tp-border);
}

.notification-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--tp-border);
}

.notification-link:hover {
  background: var(--tp-surface-alt);
  text-decoration: none;
}

.notification-link:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.notification-item:last-child .notification-link {
  border-bottom: 0;
}

.notification-item.unread .notification-text {
  font-weight: 600;
}

.notification-icon {
  flex: none;
  width: 1.5rem;
  text-align: center;
}

.notification-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notification-text {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.notification-time {
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.notification-dot {
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  background: var(--tp-accent);
  border-radius: 50%;
}

.notification-empty {
  margin: 0;
  padding: 16px 12px;
  font-size: 0.9rem;
  color: var(--tp-muted);
  text-align: center;
}

@media (max-width: 767px) {
  .notification-bell {
    position: static;
  }
  .notification-panel {
    position: fixed;
    top: 56px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}
.broadcast-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.broadcast-by {
  font-weight: 700;
}

.broadcast-text {
  margin: 4px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.broadcast-over, .broadcast-error {
  color: var(--tp-danger);
}

.broadcast-error {
  margin: 0 0 8px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 4px 0 0;
  font: inherit;
  color: var(--tp-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}
.switch:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}
.switch:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.switch[aria-busy=true] {
  cursor: progress;
  opacity: 0.7;
}

.switch-track {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  background: var(--tp-surface-alt);
  border: 2px solid var(--tp-border-control, var(--tp-border));
  border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--tp-border-control, var(--tp-border));
  border-radius: 50%;
  transition: transform 160ms ease, background-color 160ms ease;
}

.switch[aria-checked=true] .switch-track {
  background: var(--tp-accent);
  border-color: var(--tp-accent);
}
.switch[aria-checked=true] .switch-thumb {
  background: var(--tp-on-accent);
  transform: translateX(16px);
}

.switch-label {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb {
    transition: none;
  }
}
@media (max-width: 767px) {
  .switch {
    min-height: 44px;
  }
}
.packing-visibility-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.packing-visibility-head .switch {
  font-size: 0.88rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 767px) {
  .packing-visibility-head > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .table.table-cards.table-packing tbody tr {
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
  }
  .table.table-cards.table-packing .select-cell {
    grid-row: 1;
    padding-top: 0;
  }
  .table.table-cards.table-packing .cell-title {
    grid-column: 2;
    grid-row: 1;
  }
  .table.table-cards.table-packing .cell-visibility {
    display: block;
    grid-column: 3;
    grid-row: 1;
  }
  .table.table-cards.table-packing .cell-visibility::before {
    content: none;
  }
  .table.table-cards.table-packing .actions {
    grid-column: 4;
    grid-row: 1;
    margin: 0;
  }
}
.packing-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.packing-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.packing-bookmark {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  color: var(--tp-accent);
  background: none;
  border: 0;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}
.packing-bookmark:hover {
  background: var(--tp-surface-alt);
}
.packing-bookmark:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}
.packing-bookmark:focus-visible .packing-tip {
  display: block;
}

.packing-tip {
  position: absolute;
  top: 50%;
  left: calc(100% + 4px);
  z-index: 100;
  display: none;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: var(--tp-text);
  white-space: nowrap;
  pointer-events: none;
  background-color: var(--tp-bg);
  background-image: linear-gradient(var(--tp-surface), var(--tp-surface));
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  transform: translateY(-50%);
}

@media (max-width: 767px) {
  .packing-bookmark {
    min-width: 44px;
    min-height: 44px;
  }
}
.packing-help {
  margin: 4px 0 0;
}

.packing-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.packing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.packing-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.packing-icon-btn {
  min-width: 32px;
  padding-inline: 4px;
  line-height: 1;
}

@media (max-width: 767px) {
  .packing-icon-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .packing-icon-btn::after {
    content: none;
  }
}
.packing-add {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.packing-add input[type=text] {
  flex: 1 1 auto;
  min-width: 0;
}

.packing-rename {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.packing-rename input[type=text] {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 767px) {
  .packing-row {
    flex-wrap: wrap;
  }
  .packing-row .select-hit {
    min-width: 44px;
    min-height: 44px;
  }
  .packing-row .packing-name, .packing-row .packing-rename {
    flex: 1 1 0;
  }
  .packing-row .packing-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}
@media (max-width: 767px) {
  #packing-template-editor .packing-row {
    flex-wrap: nowrap;
  }
  #packing-template-editor .packing-row .packing-actions {
    flex: 0 0 auto;
  }
}
.packing-reset-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.packing-others-heading {
  margin: 16px 0 8px;
}

.packing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.packing-card-slot {
  display: flex;
  min-width: 0;
}

.packing-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 44px;
  padding: 12px;
  font: inherit;
  color: var(--tp-text);
  text-align: left;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card-sm, var(--tp-radius-sm));
}

button.packing-card {
  cursor: pointer;
}
button.packing-card:hover {
  background: var(--tp-surface-alt);
  border-color: var(--tp-border-control, var(--tp-border));
}
button.packing-card:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.packing-card-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.packing-card-line {
  font-size: 0.88rem;
  color: var(--tp-muted);
  overflow-wrap: anywhere;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
}

.seg button {
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--tp-text);
  cursor: pointer;
  white-space: nowrap;
}

.seg button:hover {
  border-color: var(--tp-border-control);
}

.seg button:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.seg button[aria-pressed=true] {
  background: var(--tp-surface);
  color: var(--tp-accent-strong);
  font-weight: 700;
  border-color: var(--tp-accent);
  box-shadow: var(--tp-shadow);
}

.seg .narrow {
  display: none;
}

@media (max-width: 767px) {
  .seg button {
    position: relative;
    font-size: 0.8rem;
    padding: 5px 10px;
    min-height: 32px;
  }
  .seg button::after {
    content: "";
    position: absolute;
    inset: -7px 0;
  }
  .seg .wide {
    display: none;
  }
  .seg .narrow {
    display: inline;
  }
}
.seg--touch button {
  min-height: 44px;
}

.seg--touch button::after {
  content: none;
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  overflow: hidden;
}
.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  background: var(--tp-surface);
  color: var(--tp-text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.view-switch button + button {
  border-left: 1px solid var(--tp-border);
}
.view-switch button[aria-pressed=true] {
  background: var(--tp-accent);
  color: var(--tp-on-accent, #fff);
}
.view-switch button:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}
.view-switch svg {
  width: 16px;
  height: 16px;
}

.file-grid-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.file-grid-head p {
  margin: 0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.file-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 8px 12px;
  text-align: center;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  user-select: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.file-tile:hover {
  border-color: var(--tp-accent);
  transform: translateY(-1px);
}
.file-tile:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}
.file-tile.is-selected {
  border-color: var(--tp-accent);
  background: color-mix(in srgb, var(--tp-accent) 10%, var(--tp-surface));
}

@media (prefers-reduced-motion: reduce) {
  .file-tile {
    transition: none;
  }
  .file-tile:hover {
    transform: none;
  }
}
.tile-check {
  position: absolute;
  top: 6px;
  left: 6px;
}
.tile-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.tile-edit {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--tp-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
}
.tile-edit svg {
  width: 17px;
  height: 17px;
}
.tile-edit:hover, .tile-edit:focus-visible {
  color: var(--tp-accent-strong);
  background: var(--tp-surface);
  border-color: var(--tp-border);
}
.tile-edit:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .tile-check {
    top: 0;
    left: 0;
    min-width: 44px;
    min-height: 44px;
  }
  .tile-edit {
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
  }
  .view-switch button {
    min-height: 44px;
  }
}
.tile-icon {
  width: 64px;
  height: 76px;
  color: var(--ft, #868e96);
}
.tile-icon .tile-icon-body {
  fill: currentColor;
  fill-opacity: 0.16;
  stroke: currentColor;
  stroke-width: 2;
}
.tile-icon .tile-icon-fold {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.tile-icon text {
  fill: color-mix(in srgb, currentColor 70%, var(--tp-tone-shade, #000));
  font: 700 13px system-ui, sans-serif;
}
.tile-icon.tone-pdf {
  --ft: #d64545;
}
.tile-icon.tone-image {
  --ft: #2e9d6a;
}
.tile-icon.tone-doc {
  --ft: #3a64c9;
}
.tile-icon.tone-sheet {
  --ft: #1f8a4c;
}
.tile-icon.tone-link {
  --ft: #2f7fd1;
}

.tile-title {
  max-width: 100%;
  overflow: hidden;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.file-tile .badge-traveller-more {
  position: relative;
  cursor: pointer;
}

.tile-menu {
  position: fixed;
  z-index: calc(100 + 1);
  min-width: 160px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  box-shadow: var(--tp-shadow);
}
.tile-menu button {
  display: block;
  width: 100%;
  padding: 6px 12px;
  color: var(--tp-text);
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.tile-menu button:hover, .tile-menu button:focus-visible {
  background: var(--tp-surface-alt);
}
.tile-menu button:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.passport {
  --stamp-shape-count: 3;
  --stamp-tilt-count: 4;
  --tp-stamp-tilt-1: -4deg;
  --tp-stamp-tilt-2: -1.5deg;
  --tp-stamp-tilt-3: 2.5deg;
  --tp-stamp-tilt-4: 5deg;
}

.passport-years {
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

.passport-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.passport-bar {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--tp-surface-alt);
  overflow: hidden;
}

.passport-bar > span {
  display: block;
  height: 100%;
  background: var(--tp-accent);
  border-radius: 999px;
}

.passport-year {
  margin: 16px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tp-muted);
}

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 16px;
  padding: 8px 8px 0;
  list-style: none;
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 8.5rem;
  padding: 12px 16px;
  border: 3px double var(--stamp-ink, currentColor);
  border-radius: 6px;
  color: var(--stamp-ink, var(--tp-text));
  font-family: var(--tp-font-mono);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(var(--stamp-tilt, 0deg));
}

.stamp-shape-2 {
  border-radius: 50%;
  aspect-ratio: 1;
  min-width: 9.5rem;
}

.stamp-shape-3 {
  border-radius: 999px;
  padding-inline: 24px;
}

.stamp-top {
  font-size: 0.7rem;
}

.stamp-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.stamp-meta {
  font-size: 0.72rem;
}

.passport-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.passport-cards > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .passport-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.passport-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.passport-list > li {
  padding: 8px 0;
  border-top: 1px solid var(--tp-border);
}

.passport-list > li:first-child {
  border-top: 0;
}

.passport-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.passport-sub {
  margin: 2px 0 0;
  color: var(--tp-muted);
  font-size: 0.8rem;
}

.passport-spend-total {
  font-family: var(--tp-font-display);
  font-size: 1.75rem;
  font-weight: 700;
}

@media (max-width: 767px) {
  .passport-stats {
    grid-template-columns: 1fr 1fr;
  }
  .passport-stats > :last-child:nth-child(odd) {
    grid-column: 1/-1;
  }
  .stamps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .stamp {
    min-width: 0;
  }
  .stamp-shape-2 {
    aspect-ratio: auto;
    border-radius: 40%;
  }
}
.passport-map, .passport-wide {
  grid-column: 1/-1;
}

.world-map {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  #passport-map {
    overflow-x: auto;
  }
  #passport-map .world-map {
    min-width: 640px;
  }
}
.world-map [id] {
  fill: var(--tp-surface-alt);
  stroke: var(--tp-border);
  stroke-width: 0.5;
}

.world-map [data-state=in-view] {
  fill: var(--tp-stamp-ink-1);
  stroke: var(--tp-stamp-ink-1);
}

.world-map [data-state=earlier] {
  fill: color-mix(in srgb, var(--tp-stamp-ink-1) 45%, transparent);
  stroke: var(--tp-stamp-ink-1);
}

.world-map circle[data-state=in-view], .world-map circle[data-state=earlier] {
  r: 4;
  stroke-width: 1.5;
}

.world-map [tabindex] {
  cursor: pointer;
  outline: none;
}

.world-map [tabindex]:hover, .world-map [tabindex]:focus-visible {
  stroke: var(--tp-text);
  stroke-width: 1.5;
}

.passport-map-note {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.passport-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.passport-legend li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--tp-border);
  background: var(--tp-surface-alt);
}

.legend-swatch[data-state=in-view] {
  background: var(--tp-stamp-ink-1);
  border-color: var(--tp-stamp-ink-1);
}

.legend-swatch[data-state=earlier] {
  background: color-mix(in srgb, var(--tp-stamp-ink-1) 45%, transparent);
  border-color: var(--tp-stamp-ink-1);
}

.passport-fold {
  scroll-margin-top: calc(60px + 12px);
}

.passport-fold > summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.passport-fold > summary::-webkit-details-marker {
  display: none;
}

.passport-fold > summary::after {
  content: "▾";
  color: var(--tp-muted);
}

.passport-fold:not([open]) > summary::after {
  content: "▸";
}

.passport-fold > summary {
  align-items: center;
}

@media (max-width: 767px) {
  .passport-fold > summary {
    min-height: 44px;
  }
}
.passport-fold > summary:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.passport-fold[open] > summary {
  margin-bottom: 12px;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 7rem;
  text-align: center;
}

.badge-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin-bottom: 8px;
  border: 3px double var(--stamp-ink);
  border-radius: 50%;
  color: var(--stamp-ink);
  font-family: var(--tp-font-mono);
  text-transform: uppercase;
  transform: rotate(var(--stamp-tilt, 0deg));
}

.badge-medal strong {
  font-size: 1.3rem;
  line-height: 1;
}

.badge-medal small {
  max-width: 100%;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.badge-label {
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 767px) {
  .badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .badge-tile {
    width: auto;
  }
  .badge-medal {
    width: 4.5rem;
    height: 4.5rem;
  }
}
.badge-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.badge-label-sub {
  font-size: 0.8rem;
  font-weight: 400;
}

.passport-review-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
}

.passport-review-list dt {
  color: var(--tp-muted);
}

.passport-review-list dd {
  margin: 0;
  font-weight: 600;
}

.stamp-years {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 24px;
}

.stamp-year {
  flex: 0 1 auto;
}

.stamp-year .passport-year {
  margin: 0 0 4px;
}

.stamp-year .stamps {
  margin: 0;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .stamp-years {
    gap: 8px 12px;
  }
  .stamp-year {
    flex: 0 0 calc(50% - 12px / 2);
  }
  .stamp-year:has(.stamps > li:nth-child(2)) {
    flex-basis: 100%;
  }
  .stamp-year .stamps {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .stamp-year:not(:has(.stamps > li:nth-child(2))) .stamps {
    grid-template-columns: 1fr;
  }
}
.passport-list-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

.passport-list-columns > li:nth-child(2) {
  border-top: 0;
}

@media (max-width: 767px) {
  .passport-list-columns {
    grid-template-columns: 1fr;
  }
  .passport-list-columns > li:nth-child(2) {
    border-top: 1px solid var(--tp-border);
  }
}
.passport-sample-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-wrap {
  padding-top: 32px;
}

.auth-logo {
  font-size: 6.5rem;
  line-height: 1;
  text-align: center;
  margin-bottom: 8px;
}

@keyframes llama-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .auth-logo {
    animation: llama-bob 3.2s ease-in-out infinite;
  }
}
.auth-wrap::after {
  content: "";
  display: block;
  height: 72px;
  margin-top: 32px;
  background: var(--tp-accent);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
}

.alert-llama::before {
  content: "🦙 ✓  ";
}

.auth-brand {
  margin: 0 0 12px;
  font-family: var(--tp-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--tp-accent);
  text-align: center;
}

.auth-title {
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--tp-muted);
  font-size: 0.88rem;
  text-align: center;
}

.auth-footnote {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  text-align: center;
}

.auth-footnote a {
  padding: 0.5rem 0.25rem;
  margin: -0.5rem -0.25rem;
}

.auth-wrap .checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--tp-accent);
}

.connect-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connect-presets legend {
  margin-bottom: 8px;
}

.connect-presets .checkbox {
  align-items: flex-start;
}

.connect-presets .checkbox input {
  margin-top: 4px;
}

#form .field-hint {
  margin-bottom: 12px;
}

.landing {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.landing-hero {
  text-align: center;
  padding: 32px 0 16px;
}

.landing-llama {
  line-height: 1;
  margin-bottom: 8px;
}

.landing-llama .llama-walk img {
  width: min(15rem, 62vw);
}

.landing-brand {
  margin: 0 0 12px;
  font-family: var(--tp-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--tp-accent);
}

.landing-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 12px;
}

.landing-hero h1 em {
  color: var(--tp-accent);
  font-style: normal;
}

.landing-lead {
  max-width: 38rem;
  margin: 0 auto 24px;
  color: var(--tp-muted);
  font-size: 1.1rem;
}

.landing-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-cta .btn {
  min-width: 11rem;
}

.landing .btn {
  border-radius: var(--tp-radius-card-sm, var(--tp-radius-sm));
}

.landing-account {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--tp-muted);
}

.landing-note {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.landing-hero::after {
  content: "";
  display: block;
  height: 72px;
  margin-top: 32px;
  background: var(--tp-accent);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 L0 46 L38 18 L62 38 L104 6 L150 44 L182 26 L226 58 L262 22 L300 40 L338 12 L372 36 L400 24 L400 72 Z'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat;
}

.landing-section {
  padding: 32px 0 24px;
}

.landing-section::before {
  content: "";
  display: block;
  width: 4rem;
  height: 3px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: var(--tp-accent);
}

.landing-section-tint {
  margin-top: 24px;
  padding-inline: 16px;
  background: var(--tp-surface-alt);
  border-radius: var(--tp-radius-card, var(--tp-radius));
}

.landing-section > h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 4px;
  text-align: center;
}

.landing-sub {
  max-width: 38rem;
  margin: 0 auto 24px;
  color: var(--tp-muted);
  text-align: center;
}

.landing-fine {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--tp-muted);
  text-align: center;
}

.landing-fine a {
  color: var(--tp-accent-strong);
}

.landing-fine-list {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
  list-style: none;
  text-align: start;
}

.landing-fine-list li:not(:last-child) {
  padding-inline-start: 1.75em;
  text-indent: -1.75em;
}

.landing-fine-list li:not(:last-child)::before {
  content: "✔️";
  display: inline-block;
  width: 1.75em;
  text-indent: 0;
}

.landing-small {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.landing-example {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tp-muted);
}

.landing-steps, .landing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.landing-steps {
  counter-reset: step;
}

.landing-step, .landing-card, .landing-demo, .landing-day, .landing-budget, .landing-settle {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card, var(--tp-radius));
  box-shadow: var(--tp-shadow);
}

.landing-step {
  padding: 16px;
}

.landing-step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tp-accent);
  color: var(--tp-on-accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.landing-step h3, .landing-card h3 {
  margin: 0 0 4px;
}

.landing-step p, .landing-card p {
  margin: 0;
  color: var(--tp-muted);
  font-size: 0.95rem;
}

.landing-card {
  padding: 16px;
}

.landing-card .ico {
  font-size: 1.7rem;
}

.landing-chat {
  max-width: 34rem;
  margin: 16px auto 0;
  display: grid;
  gap: 8px;
}

.landing-msg {
  padding: 8px 12px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card-sm, var(--tp-radius));
  max-width: 88%;
}

.landing-msg b {
  display: block;
  font-size: 0.75rem;
  color: var(--tp-muted);
}

.landing-msg p {
  margin: 2px 0 0;
  font-size: 0.95rem;
}

.landing-msg-you {
  justify-self: end;
  background: var(--tp-surface-alt);
}

.landing-msg-ai {
  justify-self: start;
  background: var(--tp-surface);
  box-shadow: var(--tp-shadow);
}

.landing-demo {
  max-width: 34rem;
  margin: 16px auto 0;
  padding: 12px 16px;
}

.landing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-demo small {
  color: var(--tp-muted);
}

.landing-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--tp-border-control);
  color: var(--tp-muted);
}

.landing-pill-warn {
  border-color: var(--tp-warning-ink);
  color: var(--tp-warning-ink);
  background: var(--tp-warning-bg);
}

.landing-day {
  max-width: 46rem;
  margin: 16px auto 0;
  padding: 12px 16px;
}

.landing-day h3 {
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.landing-weather {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.landing-wcard {
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card-sm, var(--tp-radius));
  padding: 8px 12px;
  min-width: 0;
}

.landing-whead {
  font-size: 0.9rem;
}

.landing-place {
  font-size: 0.9rem;
  font-weight: 600;
}

.landing-country {
  font-weight: 400;
}

.landing-wline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--tp-muted);
}

.landing-wline b {
  font-size: 0.9rem;
  color: var(--tp-text);
  font-variant-numeric: tabular-nums;
}

.landing-badge {
  padding: 1px 5px;
  border: 1px solid var(--tp-border);
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-whint {
  margin-top: 4px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--tp-muted);
}

.landing-wdetails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 8.5rem));
  gap: 2px 12px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--tp-text);
  font-variant-numeric: tabular-nums;
}

.landing-flight {
  padding: 12px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card-sm, var(--tp-radius-sm));
  font-size: 0.92rem;
}

.landing-flight-title {
  font-weight: 700;
  font-family: var(--tp-font-display);
}

.landing-fline {
  color: var(--tp-muted);
  margin: 3px 0;
}

.landing-ok {
  color: var(--tp-success);
}

.landing-fake-link {
  color: var(--tp-accent);
  text-decoration: underline;
}

.landing-pair {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  align-items: start;
}

.landing-budget, .landing-settle {
  padding: 16px;
}

.landing-budget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.landing-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-summary {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  gap: 16px;
  align-items: start;
}

.landing-pie {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto;
  transition: background 0.3s;
}

.landing-total {
  font-family: var(--tp-font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.landing-cap {
  font-size: 0.8rem;
  color: var(--tp-muted);
  margin: 2px 0 12px;
}

.landing-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-legend .head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.landing-legend .sw {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.landing-legend .lab {
  flex: 1;
  min-width: 0;
}

.landing-legend .pct {
  flex: none;
  min-width: 3.2em;
  text-align: right;
  color: var(--tp-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.landing-legend .amt {
  flex: none;
  color: var(--tp-muted);
  font-variant-numeric: tabular-nums;
}

.landing-legend .track {
  height: 6px;
  border-radius: 999px;
  background: var(--tp-surface-alt);
  overflow: hidden;
}

.landing-legend .fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.landing-rows {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--tp-border);
}

.landing-rows li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--tp-border);
  font-size: 0.9rem;
}

.landing-rows li > span:first-child {
  flex: 1;
  min-width: 0;
}

.landing-rows .amt {
  font-variant-numeric: tabular-nums;
}

.landing-tag {
  font-size: 0.8rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--tp-border-control);
  color: var(--tp-muted);
}

.landing-tag-pending {
  border-color: var(--tp-warning-ink);
  color: var(--tp-warning-ink);
  background: var(--tp-warning-bg);
}

.landing-rows li.not-counted {
  color: var(--tp-muted);
}

.landing-rows li.not-counted .amt {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.landing-settle h3 {
  margin: 0 0 4px;
}

.landing-settle table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 12px 0 8px;
}

.landing-settle th {
  text-align: left;
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tp-muted);
  padding: 4px 0;
}

.landing-settle td {
  padding: 8px 0;
  border-top: 1px solid var(--tp-border);
}

.landing-settle .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.landing-settle th.num {
  text-align: right;
}

.landing-settle .plus {
  color: var(--tp-success);
  font-weight: 700;
}

.landing-settle .minus {
  color: var(--tp-danger);
  font-weight: 700;
}

.landing-settle .square {
  color: var(--tp-muted);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.landing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.landing-features b {
  font-family: var(--tp-font-display);
}

.landing-band {
  margin: 32px 0 0;
  padding: 24px 16px;
  text-align: center;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-card, var(--tp-radius));
}

.landing-band h2 {
  margin: 0 0 4px;
}

.landing-band p {
  margin: 0 0 12px;
}

.landing-band .landing-fine {
  margin: 16px 0 0;
}

.site-nav .landing-sticky-cta {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .landing-steps, .landing-cards, .landing-pair, .landing-features {
    grid-template-columns: 1fr;
  }
  .landing-weather {
    grid-template-columns: minmax(0, 1fr);
  }
  .landing-summary {
    grid-template-columns: 1fr;
  }
  .landing-pie {
    max-width: 130px;
  }
  .landing-hero {
    padding-top: 24px;
  }
  .landing-budget-head {
    display: block;
  }
  .landing-budget-head .landing-example {
    display: block;
    margin-bottom: 8px;
  }
}
@media (max-width: 767px) {
  .landing-fine a, .landing-account a, .landing-small a {
    padding: 0.75rem 0.25rem;
    margin: -0.75rem -0.25rem;
  }
}
.admin-page {
  max-width: 56rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.admin-section {
  margin: 24px 0 4px;
  font-size: 1.1rem;
}

.admin-bookmarks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.admin-section + .field-hint {
  margin: 4px 0 12px;
}

.legal-page {
  max-width: 46rem;
}

.legal-page h2 {
  margin-top: 24px;
  font-size: 1.1rem;
}

.legal-page p, .legal-page li {
  line-height: 1.6;
}

#legal > p, #legal > ul, #legal > ol {
  max-width: 32rem;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.faq-item {
  border-bottom: 1px solid var(--tp-border);
  padding: 8px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
  padding: 4px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.faq-item p {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  margin: 4px 0 8px;
  padding: 12px 16px;
  line-height: 1.6;
}

.page-back {
  margin: 16px 0 0;
  font-size: 1.05rem;
  text-align: left;
}

.page-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal-page .auth-subtitle {
  text-align: left;
}

.settings {
  max-width: 52rem;
}

.settings > .page-title {
  margin-bottom: 16px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.settings-nav {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav a {
  display: block;
  padding: 6px 10px;
  color: var(--tp-text);
  font-size: 0.9rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0;
}

.settings-nav .settings-nav-group {
  margin-top: 12px;
  padding-left: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--tp-muted);
}

.settings-nav .settings-nav-group:first-child {
  margin-top: 0;
}

.settings-nav a:hover {
  background: var(--tp-surface-alt);
}

.settings-nav a:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
  outline-offset: -2px;
}

.settings-nav a[aria-current=true] {
  color: var(--tp-accent);
  font-weight: 600;
  border-left-color: var(--tp-accent);
}

.settings-content section {
  scroll-margin-top: 76px;
}

@media (max-width: 767px) {
  .settings-layout {
    display: block;
  }
  .settings-nav {
    display: none;
  }
  .settings-content section {
    scroll-margin-top: 12px;
  }
}
.field-caption {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.settings-group + .settings-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--tp-border);
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-list .checkbox {
  display: flex;
  width: 100%;
}

.settings .checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--tp-accent);
}

.field-beside {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-beside > label {
  margin: 0;
}

.field-beside > select {
  width: auto;
}

.field-beside-group {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 8px 12px;
}

.field-beside-group > .field-beside {
  display: contents;
}

.field-beside-group > .field-beside > select {
  width: 5.5rem;
}

.control-wide {
  width: min(100%, 20rem);
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-tile {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--tp-input-bg);
  border: 1px solid var(--tp-border-control, var(--tp-border));
  border-radius: var(--tp-radius-sm);
}

.theme-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-tile .theme-swatch {
  width: 20px;
  height: 20px;
}

.theme-tile:hover {
  border-color: var(--tp-accent);
}

.theme-tile:has(input:checked) {
  font-weight: 600;
  border-color: var(--tp-accent);
  box-shadow: 0 0 0 1px var(--tp-accent);
}

.theme-tile:has(input:checked)::after {
  content: "✓";
  margin-left: auto;
  color: var(--tp-accent);
}

.theme-tile:has(input:focus-visible) {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .theme-options {
    grid-template-columns: 1fr;
  }
}
.strength-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.strength-hint [data-score-text] {
  font-weight: 600;
  color: var(--tp-text);
}

.settings .chip-group {
  margin-bottom: 12px;
}

.currency-add {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.currency-add .field {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.currency-add .btn {
  flex: none;
}

.currency-add-spacer {
  visibility: hidden;
}

.credits-list {
  margin: 0;
  padding-left: 1.2em;
}

@media (max-width: 767px) {
  .settings .form-actions .btn {
    flex: 1 1 100%;
  }
}
.token-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.token-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.token-value {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
}

.settings-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.notification-table-wrap {
  overflow-x: auto;
}

.notification-table {
  width: 100%;
  border-collapse: collapse;
}

.notification-table th,
.notification-table td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: middle;
}

.notification-table thead th {
  font-size: 0.8rem;
  color: var(--tp-muted);
  font-weight: 600;
}

.notification-table thead th:not(:first-child),
.notification-table tbody td {
  text-align: center;
  width: 7rem;
}

.notification-table tbody tr {
  border-top: 1px solid var(--tp-border);
}

.notification-table tbody th {
  font-weight: 400;
}

.notification-table .field-caption {
  display: block;
  margin: 0;
}

.notification-table input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--tp-accent);
}

@media (max-width: 599px) {
  .notification-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .notification-table,
  .notification-table tbody {
    display: block;
  }
  .notification-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 16px;
    padding: 8px 0;
  }
  .notification-table tbody th {
    flex: 1 0 100%;
    padding: 4px 0;
  }
  .notification-table tbody td {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 4px 0;
    text-align: left;
  }
  .notification-table tbody td::before {
    content: attr(data-channel);
    font-size: 0.8rem;
    color: var(--tp-muted);
  }
}
.trip-card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.trip-card-dates {
  font-size: 0.85rem;
  color: var(--tp-muted);
}

.trip-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.trip-card-progress {
  margin-top: 12px;
}

.trip-card-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.trip-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tp-border);
}

.trips-group + .trips-group {
  margin-top: 16px;
}

.trips-group-heading {
  position: sticky;
  top: 60px;
  z-index: 2;
  margin: 0 0 8px;
  padding: 4px 0;
  background: var(--tp-bg);
  font-size: 1.1rem;
}

.trips-group-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.trips-group-toggle:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.trips-group-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}
.trips-group-chevron.open {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .trips-group-chevron {
    transition: none;
  }
}
.trips-group-count {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--tp-muted);
}

@media (max-width: 767px) {
  .trips-group-toggle {
    min-height: 44px;
  }
}
.card[data-now] {
  scroll-margin-top: calc(60px + 3.5rem);
}

.trips-today {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
@media (max-width: 767px) {
  .trips-today {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

.trip-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.trip-head-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.trip-head-meta {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--tp-muted);
}

.trip-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-head-actions .btn-danger {
  margin-left: 12px;
}

.btn-row-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-row-split .btn-danger {
  margin-left: 16px;
}

.publish-unpublish {
  margin-left: auto;
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 1.1rem;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}

.section-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.filters-toggle {
  display: none;
  gap: 8px;
  align-items: center;
}

.filters-caret {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.filters-toggle[aria-expanded=true] {
  border-color: var(--tp-accent);
}

.filters-toggle[aria-expanded=true] .filters-caret {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-toolbar-label, var(--tp-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toolbar-pair {
  display: flex;
  gap: 12px;
  align-items: center;
}

.weather-credit {
  display: none;
  margin: 0;
}

.weather-credit-inline {
  margin: 0 0 0 auto;
}

@media (max-width: 767px) {
  .filters-toggle {
    display: inline-flex;
    margin-bottom: 12px;
  }
  .filters:not(.is-open) {
    display: none;
  }
  .toolbar-pair {
    align-items: flex-start;
    gap: 8px;
  }
  .toolbar-pair > .toolbar-label {
    line-height: 28px;
  }
  .toolbar {
    row-gap: 16px;
    margin-bottom: 16px;
  }
  .toolbar-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.875rem;
  }
  .filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .filters-head > .filters-toggle {
    margin-bottom: 0;
  }
  .weather-credit {
    display: block;
    text-align: right;
  }
  .weather-credit-inline {
    display: none;
  }
}
.toolbar select {
  width: auto;
  padding: 5px 9px;
  font-size: 0.85rem;
}

.needs-planning-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--tp-border);
}

.needs-planning-row:last-child {
  border-bottom: 0;
}

.member-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.member-email-only {
  font-style: italic;
  color: var(--tp-muted);
}

.coord-inputs {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.coord-hint {
  grid-column: 1/-1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--tp-muted);
}

.publish-url {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin: 12px 0;
  font-family: var(--tp-font-mono);
  font-size: 0.82rem;
  background: var(--tp-surface-alt);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  overflow-wrap: anywhere;
}

.publish-url .btn {
  font-family: var(--tp-font-body);
}

.publish-url-text span {
  display: inline;
}

.publish-warning-icon {
  margin-right: 8px;
}

.publish-request-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--tp-border);
}

.publish-request-row:last-child {
  border-bottom: 0;
}

@media (max-width: 767px) {
  .publish-url {
    flex-wrap: wrap;
  }
  .publish-url .grow {
    flex: 1 1 100%;
    min-width: 0;
  }
  .trip-head {
    flex-direction: column;
  }
  .trip-head-actions {
    flex-wrap: nowrap;
    width: 100%;
  }
  .trip-head-actions .btn-danger {
    margin-left: auto;
  }
  .btn-row-split {
    width: 100%;
    justify-content: flex-start;
    row-gap: 16px;
  }
  .section-head {
    margin-bottom: 16px;
  }
  .btn-row-split .btn-danger {
    margin-left: auto;
  }
  td[data-label="Lat / Lon"] {
    font-family: inherit;
    font-size: 0.85rem;
  }
  .invite-form .field {
    flex-basis: 100%;
  }
  .invite-form .field.invite-submit {
    padding-top: 0;
  }
  .invite-form .field.invite-submit {
    display: flex;
    justify-content: flex-end;
  }
  .coord-inputs {
    grid-template-columns: 1fr;
  }
}
.publish-own-page {
  margin: 12px 0;
}

.publish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.solo-hint {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--tp-surface-alt);
  border: 1px dashed var(--tp-border);
  border-radius: var(--tp-radius-sm);
  color: var(--tp-muted);
  font-size: 0.9rem;
}

.solo-hint > [aria-hidden] {
  margin-right: 0.3em;
}

.scope-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.scope-hint {
  margin: 0 0 12px;
  color: var(--tp-muted);
  font-size: 0.88rem;
}

.badge-traveller {
  margin: 0 4px 4px 0;
}

.invite-form .invite-submit {
  align-self: flex-start;
  padding-top: 22px;
}

.traveller-slot, .traveller-more {
  display: inline;
}

button.badge-traveller-more {
  position: relative;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}
button.badge-traveller-more:hover, button.badge-traveller-more[aria-expanded=true] {
  border-color: var(--tp-accent);
}
button.badge-traveller-more:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.traveller-popup {
  position: fixed;
  z-index: 100;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: normal;
  color: var(--tp-text);
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  box-shadow: var(--tp-shadow);
}

.traveller-popup li {
  padding: 4px 0;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  button.badge-traveller-more::after {
    content: "";
    position: absolute;
    inset: -11px -4px;
  }
}
.overview-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.overview-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.overview-grid {
  align-items: start;
}
