/* ---------------------------------------------
   Cabin Crew — a tiny planning table
   --------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #223328;
  --ink-soft: #4c5b50;
  --muted: #6d786f;
  --forest: #1f3a2e;
  --forest-deep: #162b22;
  --forest-light: #355845;
  --moss: #55735d;
  --sage: #b7c8b5;
  --cream: #f5efe3;
  --cream-deep: #ebe1d1;
  --paper: #fffdf8;
  --paper-soft: #faf5eb;
  --line: #e5dccd;
  --line-strong: #d4c6b1;
  --accent: #cd7245;
  --accent-deep: #ad582f;
  --accent-soft: #f1d8c5;
  --sun: #e7b865;
  --danger: #a64035;
  --danger-soft: #f7e4df;
  --success: #326b4f;
  --shadow-sm: 0 1px 2px rgba(35, 45, 37, 0.04), 0 8px 20px rgba(35, 45, 37, 0.04);
  --shadow-md: 0 18px 50px rgba(35, 45, 37, 0.08);
  --shadow-lg: 0 30px 80px rgba(23, 41, 31, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --header-height: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.75), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(226, 204, 174, 0.26), transparent 30rem),
    var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

p,
h1,
h2,
h3,
h4,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 550;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 0.99;
  margin-bottom: 0;
}

h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  margin-bottom: 0;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.15;
  margin-bottom: 0;
}

::selection {
  background: var(--sun);
  color: var(--forest-deep);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.main {
  min-height: calc(100vh - var(--header-height) - 90px);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--forest);
  color: white;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* ---------------------------------------------
   Common bits
   --------------------------------------------- */

.eyebrow {
  margin-bottom: 9px;
  color: var(--accent-deep);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--light {
  color: var(--sun);
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--xs {
  width: 13px;
  height: 13px;
}

.icon--muted {
  color: var(--line-strong);
  width: 26px;
  height: 26px;
}

.btn {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--forest);
  border-color: var(--forest);
  color: #fffdf8;
  box-shadow: 0 8px 20px rgba(31, 58, 46, 0.16);
}

.btn--primary:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: white;
}

.btn--secondary {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--paper-soft);
  border-color: var(--ink-soft);
}

.btn--ghost {
  color: var(--ink-soft);
}

.btn--ghost:hover {
  background: rgba(34, 51, 40, 0.06);
}

.btn--warm {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--forest-deep);
}

.btn--warm:hover {
  background: #f0c779;
  border-color: #f0c779;
}

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

.btn--danger:hover {
  background: #8c3028;
  border-color: #8c3028;
}

.btn--danger-ghost {
  color: var(--danger);
  border-color: #e7c5bd;
  background: #fffaf7;
}

.btn--danger-ghost:hover {
  background: var(--danger-soft);
  border-color: #d7a79c;
}

.btn--ghost-danger {
  color: var(--danger);
  background: transparent;
  border-color: transparent;
}

.btn--ghost-danger:hover {
  background: var(--danger-soft);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
}

.btn.is-copied {
  background: var(--forest-light);
  border-color: var(--forest-light);
  color: white;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link .icon {
  transition: transform 160ms ease;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.text-button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button--danger {
  color: var(--danger);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pill--ghost {
  border: 1px solid rgba(255, 253, 248, 0.2);
  background: rgba(255, 253, 248, 0.07);
  color: rgba(255, 253, 248, 0.72);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-heading h2 {
  font-size: 1.55rem;
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
}

.count-pill {
  display: inline-flex;
  min-width: 34px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.panel-lede {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.panel-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.panel-note .icon {
  margin-top: 1px;
}

.you-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* avatars */

.avatar {
  display: inline-flex;
  overflow: hidden;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cream-deep);
  color: white;
  object-fit: cover;
}

.avatar--initials {
  background:
    linear-gradient(145deg, hsl(var(--avatar-hue) 30% 52%), hsl(calc(var(--avatar-hue) + 24) 32% 33%));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 32px;
  height: 32px;
}

.avatar--md {
  width: 43px;
  height: 43px;
}

.avatar--lg {
  width: 76px;
  height: 76px;
  font-size: 1.1rem;
}

.avatar--xl {
  width: 106px;
  height: 106px;
  font-size: 1.45rem;
}

.avatar--count {
  margin-left: -10px;
  border: 2px solid var(--paper);
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 700;
}

.avatar-stack {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.avatar-stack .avatar {
  border: 2px solid var(--paper);
}

.avatar-stack .avatar + .avatar {
  margin-left: -9px;
}

/* forms */

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field__label-row > label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 650;
}

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

.field__optional {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.field input,
.field select,
.field textarea,
.invite-form input,
.invite-form select {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  background: #fffefb;
  color: var(--ink);
  font-size: 0.92rem;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder,
.invite-form input::placeholder {
  color: #9e9d92;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.invite-form input:focus,
.invite-form select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 58, 46, 0.1);
  background: white;
}

.field input:disabled,
.field select:disabled {
  background: var(--paper-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.field select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556b5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
}

.field__hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 14px;
}

.field-row--three {
  grid-template-columns: 1fr 1fr 0.8fr;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* flash + alerts + toast */

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.site-header + .flash-stack {
  position: fixed;
  z-index: 80;
  top: calc(var(--header-height) + 14px);
  right: max(20px, calc((100vw - 1240px) / 2 + 32px));
  width: min(390px, calc(100vw - 40px));
  margin: 0;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: 0.82rem;
  animation: slide-in 240ms ease both;
}

.flash--success {
  border-color: #bfd3c2;
  background: #f4faf4;
}

.flash--error {
  border-color: #e7c1b8;
  background: #fff7f4;
}

.flash__icon {
  display: flex;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--forest);
  color: white;
}

.flash--error .flash__icon {
  background: var(--danger);
}

.flash__icon .icon {
  width: 13px;
  height: 13px;
}

.flash__message {
  flex: 1;
  padding-top: 1px;
}

.flash__close {
  display: flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.flash__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.flash__close .icon {
  width: 13px;
  height: 13px;
}

.flash.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border-radius: 13px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.alert p {
  margin: 0;
}

.alert--error {
  border: 1px solid #eac6bd;
  background: #fff6f2;
  color: #82392f;
}

.alert--info {
  border: 1px solid #cbd8c9;
  background: #f5f8f2;
  color: var(--forest);
}

.alert__icon {
  display: flex;
  margin-top: 1px;
  color: var(--danger);
}

.alert__icon .icon {
  width: 18px;
  height: 18px;
}

.alert__title {
  margin-bottom: 4px !important;
  font-weight: 700;
}

.alert__list {
  margin: 0;
  padding-left: 17px;
}

.alert__list li + li {
  margin-top: 2px;
}

.toast-region {
  position: fixed;
  z-index: 150;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(370px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 13px 13px 16px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  border-radius: 13px;
  background: var(--forest-deep);
  box-shadow: var(--shadow-lg);
  color: #f9f5ec;
  font-size: 0.82rem;
  pointer-events: auto;
  animation: toast-in 220ms ease both;
}

.toast--error {
  background: #672d26;
}

.toast span {
  flex: 1;
}

.toast__close {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 3px;
}

.toast__close:hover {
  color: white;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 200ms ease, transform 200ms ease;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------------------------------------
   Header and footer
   --------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 70;
  top: 0;
  border-bottom: 1px solid rgba(212, 198, 177, 0.55);
  background: rgba(245, 239, 227, 0.88);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: flex;
  width: 41px;
  height: 41px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--forest);
  color: #f8f1e4;
  box-shadow: 0 5px 12px rgba(31, 58, 46, 0.14);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__tagline {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand--light {
  color: #f8f1e4;
}

.brand--light .brand-mark {
  background: rgba(255, 253, 248, 0.1);
  color: #f8f1e4;
  box-shadow: none;
  border: 1px solid rgba(255, 253, 248, 0.14);
}

.brand--light .brand__tagline {
  color: rgba(248, 241, 228, 0.5);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.primary-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.primary-nav a:hover {
  background: rgba(34, 51, 40, 0.06);
  color: var(--ink);
}

.primary-nav a[aria-current="page"] {
  background: rgba(34, 51, 40, 0.09);
  color: var(--ink);
}

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

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 9px 4px 4px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.user-chip:hover {
  background: rgba(34, 51, 40, 0.06);
}

.logout-form {
  margin: 0;
}

.icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease;
}

.icon-button:hover {
  background: rgba(34, 51, 40, 0.07);
  color: var(--ink);
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(212, 198, 177, 0.55);
}

.site-footer__inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.site-footer__inner span:first-child {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------
   Auth
   --------------------------------------------- */

.auth-body {
  background: var(--cream);
}

.auth-body .site-footer {
  display: none;
}

.auth-main {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.82fr);
  gap: 0;
  padding: 18px;
}

.auth-story {
  position: relative;
  display: flex;
  min-height: calc(100vh - 36px);
  overflow: hidden;
  flex-direction: column;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 4%, rgba(231, 184, 101, 0.13), transparent 25rem),
    radial-gradient(circle at 10% 60%, rgba(91, 127, 98, 0.22), transparent 30rem),
    var(--forest);
  color: #f8f1e4;
}

.auth-story::before {
  position: absolute;
  inset: 0;
  background-image:
    repeating-radial-gradient(ellipse at 45% 115%, transparent 0 43px, rgba(248, 241, 228, 0.045) 44px 45px);
  content: "";
  opacity: 0.8;
  pointer-events: none;
}

.auth-story__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-story__copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-top: clamp(60px, 10vh, 116px);
}

.auth-story h1 {
  max-width: 640px;
  color: #fbf5e9;
  font-size: clamp(3rem, 4.5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.auth-story__lede {
  max-width: 490px;
  margin: 25px 0 0;
  color: rgba(248, 241, 228, 0.68);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.65;
}

.auth-feature-list {
  display: grid;
  gap: 13px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(248, 241, 228, 0.82);
  font-size: 0.82rem;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.feature-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 241, 228, 0.14);
  border-radius: 9px;
  background: rgba(248, 241, 228, 0.06);
  color: var(--sun);
}

.feature-icon .icon {
  width: 15px;
  height: 15px;
}

.auth-scene {
  position: absolute;
  z-index: 1;
  right: -2%;
  bottom: -2%;
  width: min(94%, 780px);
  height: auto;
  opacity: 0.95;
  pointer-events: none;
}

.auth-story__foot {
  position: relative;
  z-index: 2;
  margin: auto 0 0;
  padding-top: 36px;
  color: rgba(248, 241, 228, 0.42);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 70px);
}

.auth-panel__inner {
  width: min(100%, 435px);
}

.auth-mobile-brand {
  display: none;
}

.auth-card {
  padding: clamp(26px, 3.6vw, 42px);
  border: 1px solid rgba(212, 198, 177, 0.72);
  border-radius: 26px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 24px 65px rgba(58, 55, 40, 0.08);
}

.auth-card .flash-stack {
  margin-bottom: 18px;
}

.auth-card__top {
  margin-bottom: 26px;
}

.auth-card__top .eyebrow {
  margin-bottom: 10px;
}

.auth-card h2 {
  margin-bottom: 8px;
  font-size: clamp(2.25rem, 3.5vw, 2.9rem);
  line-height: 1;
}

.auth-card__lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-form .field + .field,
.auth-form .field-grid + .field {
  margin-top: 0;
}

.auth-form .field-grid {
  margin-bottom: 18px;
}

.auth-submit {
  margin-top: 7px;
  min-height: 49px;
}

.auth-card__aside {
  margin: 21px 0 0;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.auth-panel__note {
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.55;
}

.auth-panel__note a {
  color: var(--forest);
  font-weight: 650;
}

.auth-admin-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px;
  padding: 12px;
  border-radius: 11px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.auth-admin-note .icon {
  margin-top: 1px;
  color: var(--moss);
}

.auth-admin-note p {
  margin: 0;
}

.empty-invite {
  display: grid;
  gap: 18px;
}

.empty-invite__mark {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--cream);
  color: var(--moss);
}

.empty-invite__mark .icon {
  width: 26px;
  height: 26px;
}

.empty-invite p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------------------------------------------
   Page scaffolding
   --------------------------------------------- */

.page-shell {
  padding-top: 42px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 32px;
}

.page-heading h1 {
  font-size: clamp(2.8rem, 4.8vw, 4rem);
}

.page-heading__lede {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  transition: transform 150ms ease;
}

.back-link:hover .icon {
  transform: translateX(-2px);
}

/* ---------------------------------------------
   Dashboard
   --------------------------------------------- */

.dashboard-heading {
  margin-bottom: 36px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.dashboard-main {
  display: grid;
  gap: 18px;
}

.trip-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 26px 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.trip-card::before {
  position: absolute;
  top: -90px;
  right: -40px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(183, 200, 181, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(183, 200, 181, 0.07),
    0 0 0 65px rgba(183, 200, 181, 0.045);
  content: "";
  pointer-events: none;
}

.trip-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.trip-card--featured {
  background:
    linear-gradient(115deg, rgba(250, 245, 235, 0.8), transparent 60%),
    var(--paper);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #cddccd;
  border-radius: 999px;
  background: #f6faf3;
  color: #386347;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-pill--muted {
  border-color: var(--line);
  background: var(--paper-soft);
  color: var(--muted);
}

.status-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c8663;
  box-shadow: 0 0 0 3px rgba(76, 134, 99, 0.12);
}

.status-pill--muted .status-pill__dot {
  background: var(--line-strong);
  box-shadow: none;
}

.date-stamp {
  display: flex;
  width: 53px;
  height: 56px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  line-height: 1;
  transform: rotate(2deg);
}

.date-stamp span {
  color: var(--accent-deep);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.date-stamp strong {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.trip-card__body h2 {
  max-width: 85%;
  margin-bottom: 13px;
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
}

.trip-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-bottom: 22px;
}

.trip-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 500;
}

.trip-fact .icon {
  color: var(--moss);
}

.trip-best {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #eadbc8;
  border-radius: 14px;
  background: #fbf5e9;
}

.trip-best__spark {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sun);
  color: var(--forest-deep);
}

.trip-best__spark .icon {
  width: 16px;
  height: 16px;
}

.trip-best > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.trip-best__label {
  color: var(--accent-deep);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.trip-best strong {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.trip-best--empty {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
}

.trip-best--empty .trip-best__spark {
  background: var(--cream);
  color: var(--moss);
}

.trip-best--empty .trip-best__label {
  color: var(--muted);
}

.score-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #dfd1bd;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 700;
}

.score-badge--full {
  border-color: #c2d7c2;
  background: #edf6ed;
  color: var(--success);
}

.trip-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.response-summary__text {
  display: flex;
  flex-direction: column;
}

.response-summary strong {
  font-size: 0.75rem;
  font-weight: 650;
}

.response-summary span {
  color: var(--muted);
  font-size: 0.68rem;
}

.trip-card__open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 700;
}

.trip-card__open .icon {
  transition: transform 160ms ease;
}

.trip-card:hover .trip-card__open .icon {
  transform: translateX(3px);
}

.dashboard-side {
  display: grid;
  gap: 18px;
}

.crew-panel,
.how-panel {
  padding: 23px;
}

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

.crew-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(229, 220, 205, 0.65);
}

.crew-list li:last-child {
  border-bottom: 0;
}

.crew-list__person {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.25;
}

.crew-list__person strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-list__person span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--moss);
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crew-panel .text-link {
  margin-top: 17px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.privacy-note .icon {
  margin-top: 1px;
  color: var(--moss);
}

.how-panel h2 {
  margin-bottom: 18px;
  font-size: 1.55rem;
}

.how-list {
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.how-list__num {
  display: flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--accent-deep);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
}

.how-list div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.how-list strong {
  font-size: 0.78rem;
  font-weight: 650;
}

.how-list div span {
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.5;
}

/* empty dashboard */

.empty-state {
  position: relative;
  overflow: hidden;
  padding: 52px 40px;
  text-align: center;
}

.empty-state__art {
  position: relative;
  width: 220px;
  height: 120px;
  margin: 0 auto 28px;
}

.empty-sun {
  position: absolute;
  top: 2px;
  right: 44px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.85;
}

.empty-hill {
  position: absolute;
  bottom: 17px;
  border-radius: 50%;
  background: var(--cream-deep);
}

.empty-hill--one {
  left: 10px;
  width: 170px;
  height: 58px;
  transform: rotate(-4deg);
}

.empty-hill--two {
  right: 0;
  width: 150px;
  height: 53px;
  background: #e1d6c4;
  transform: rotate(5deg);
}

.empty-cabin {
  position: absolute;
  bottom: 28px;
  left: 86px;
  width: 48px;
  height: 36px;
  border: 2px solid var(--forest);
  border-top: 0;
  background: var(--paper);
}

.empty-cabin::before {
  position: absolute;
  top: -18px;
  left: -7px;
  width: 56px;
  height: 20px;
  border-top: 2px solid var(--forest);
  transform: rotate(-38deg) skewX(-12deg);
  transform-origin: left top;
  content: "";
}

.empty-cabin::after {
  position: absolute;
  right: 9px;
  bottom: 0;
  width: 12px;
  height: 17px;
  background: var(--sun);
  content: "";
}

.empty-state h2 {
  margin-bottom: 10px;
  font-size: 2.2rem;
}

.empty-state > p:not(.eyebrow) {
  max-width: 420px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ---------------------------------------------
   Trip detail
   --------------------------------------------- */

.trip-page {
  padding-top: 32px;
}

.trip-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.trip-header__main {
  min-width: 0;
}

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

.trip-header__by {
  color: var(--muted);
  font-size: 0.69rem;
}

.trip-header h1 {
  overflow-wrap: anywhere;
  font-size: clamp(3rem, 5.8vw, 5rem);
}

.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

.trip-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.trip-meta .icon {
  color: var(--moss);
}

.trip-header__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  padding-bottom: 5px;
}

.trip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  align-items: start;
}

.trip-main {
  display: grid;
  min-width: 0;
  gap: 28px;
}

.trip-side {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  font-size: 1.8rem;
}

.section-heading__meta {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.section-heading__lede {
  max-width: 600px;
  margin: 8px 0 19px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.section-heading__lede em {
  color: var(--ink-soft);
  font-style: normal;
  font-weight: 650;
}

.best-section .section-heading__lede {
  margin-bottom: 17px;
}

.best-windows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  transition: opacity 160ms ease;
}

.window-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.window-card::after {
  position: absolute;
  right: -18px;
  bottom: -30px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(31, 58, 46, 0.07);
  border-radius: 50%;
  content: "";
}

.window-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.window-card__rank {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.window-card h3 {
  position: relative;
  z-index: 1;
  min-height: 2.3em;
  margin-bottom: 13px;
  font-size: 1.17rem;
  line-height: 1.1;
}

.window-card__score {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.window-card__score strong {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.window-card__score strong span {
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 400;
}

.window-card__score p {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.window-card__score p span {
  display: block;
  margin-top: 2px;
  color: var(--line-strong);
  font-size: 0.6rem;
}

.window-dots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin-top: 16px;
}

.window-dots span {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 10px;
  background: var(--cream-deep);
}

.window-dots span.is-filled {
  background: var(--accent);
}

.window-card--top {
  border-color: var(--forest);
  background:
    radial-gradient(circle at 100% 0, rgba(231, 184, 101, 0.15), transparent 10rem),
    var(--forest);
  color: #f9f3e7;
  box-shadow: 0 16px 35px rgba(31, 58, 46, 0.16);
}

.window-card--top::after {
  border-color: rgba(248, 241, 228, 0.1);
}

.window-card--top .window-card__rank {
  color: var(--sun);
}

.window-card--top h3 {
  color: #fbf5e9;
}

.window-card--top .window-card__score strong {
  color: white;
}

.window-card--top .window-card__score strong span,
.window-card--top .window-card__score p {
  color: rgba(248, 241, 228, 0.6);
}

.window-card--top .window-card__score p span {
  color: rgba(248, 241, 228, 0.35);
}

.window-card--top .window-dots span {
  background: rgba(255, 253, 248, 0.14);
}

.window-card--top .window-dots span.is-filled {
  background: var(--sun);
}

.all-in-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border: 1px solid rgba(231, 184, 101, 0.28);
  border-radius: 999px;
  background: rgba(231, 184, 101, 0.12);
  color: var(--sun);
  font-size: 0.57rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.best-empty {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  padding: 23px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.45);
}

.best-empty__icon {
  display: flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--paper);
  color: var(--accent);
}

.best-empty strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 550;
}

.best-empty p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* heatmap */

.heatmap-panel {
  padding: clamp(20px, 3vw, 30px);
  transition: opacity 160ms ease;
}

.heatmap-panel.is-saving .calendar-wrap {
  opacity: 0.82;
}

.heatmap-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}

.heatmap-panel__head h2 {
  font-size: 1.9rem;
}

.heatmap-panel__head .section-heading__lede {
  margin-bottom: 0;
}

.heat-legend {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding-top: 5px;
  color: var(--muted);
  font-size: 0.6rem;
  white-space: nowrap;
}

.heat-legend__swatches {
  display: flex;
  gap: 3px;
}

.heat-legend__swatches i {
  display: block;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1px solid transparent;
}

.my-mark {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 13px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-soft);
}

.my-mark__copy {
  min-width: 0;
}

.my-mark__label {
  display: block;
  margin-bottom: 1px;
  color: var(--accent-deep);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-mark strong {
  display: block;
  font-size: 0.81rem;
  font-weight: 650;
}

.my-mark__ranges {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-mark__ranges.is-empty {
  color: #97988d;
}

.my-mark__progress {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--cream-deep);
}

.my-mark__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--sun));
  transition: width 240ms ease;
}

.calendar-wrap {
  display: grid;
  gap: 26px;
  margin-top: 24px;
  transition: opacity 160ms ease;
}

.calendar-month__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}

.calendar-month__heading h3 {
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0;
}

.calendar-month__heading span {
  color: var(--muted);
  font-size: 0.62rem;
}

.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 5px;
}

.calendar-weekdays span {
  padding-left: 4px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.calendar-weeks {
  display: grid;
  gap: 5px;
}

.day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(49px, 5.4vw, 65px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--paper-soft);
  color: var(--ink);
  transition:
    transform 130ms ease,
    box-shadow 130ms ease,
    opacity 130ms ease,
    background-color 130ms ease;
}

button.day:hover {
  z-index: 1;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(34, 51, 40, 0.12);
}

button.day:focus-visible {
  z-index: 2;
}

button.day:active {
  transform: translateY(0);
}

.day--blank {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.day__number {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  opacity: 0.88;
}

.day__count {
  align-self: flex-end;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
  line-height: 1;
  opacity: 0.75;
}

.day--level-0 {
  border-color: var(--line);
  background: var(--paper-soft);
  color: #9c9a8f;
}

.day--level-0 .day__count {
  opacity: 0.45;
}

.day--level-1 {
  background: #e6eee0;
  color: #3e5c46;
}

.day--level-2 {
  background: #cadcc0;
  color: #2f513b;
}

.day--level-3 {
  background: #9fbd92;
  color: #1f3e2d;
}

.day--level-4 {
  background: #618d6d;
  color: #fffdf8;
}

.day--level-5 {
  background: var(--forest);
  color: #fffdf8;
}

.day.is-today .day__number {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.day.is-free {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.day.is-free.day--level-4,
.day.is-free.day--level-5 {
  box-shadow: inset 0 0 0 2px var(--sun);
}

.day__you {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}

.day.is-free .day__you {
  background: var(--accent);
}

.day.is-free.day--level-4 .day__you,
.day.is-free.day--level-5 .day__you {
  background: var(--sun);
}

.day.is-saving {
  opacity: 0.55;
  cursor: progress;
}

.is-saving .day {
  cursor: progress;
}

.heatmap-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.heatmap-panel__foot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.65rem;
  text-align: right;
}

.heatmap-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 0.64rem;
}

.heatmap-key__you,
.heatmap-key__today {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.day__you-sample {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.heatmap-key__today i {
  display: inline-block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-soft);
}

/* responses */

.responses-panel {
  padding: 23px;
}

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

.response-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(229, 220, 205, 0.7);
}

.response-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.response-item--me {
  margin: 0 -8px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 10px;
  background: #fbf6eb;
}

.response-item__body {
  min-width: 0;
  flex: 1;
}

.response-item__name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.response-item__name strong {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.response-item__dates {
  display: -webkit-box;
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.response-item__count {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.response-item__count small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.58rem;
}

.response-item__count.is-full {
  color: var(--success);
}

.responses-panel .panel-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* notes, crew, admin */

.notes-panel,
.crew-mini-panel,
.admin-controls {
  padding: 23px;
}

.trip-notes {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-line;
}

.crew-avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}

.crew-avatar {
  display: inline-flex;
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.crew-avatar .avatar {
  border: 0;
}

.admin-controls {
  display: grid;
  gap: 9px;
}

.admin-controls .panel-heading {
  margin-bottom: 8px;
}

.admin-controls form {
  margin: 0;
}

/* ---------------------------------------------
   Forms / create + edit
   --------------------------------------------- */

.form-page {
  max-width: 1160px;
}

.form-page__header {
  margin-bottom: 29px;
}

.form-page__header h1 {
  font-size: clamp(2.7rem, 4.2vw, 3.7rem);
}

.form-page__header p:not(.eyebrow) {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.form-panel {
  padding: clamp(23px, 3.2vw, 34px);
}

.form-panel > .alert {
  margin-bottom: 23px;
}

.form-panel .field-row .field {
  margin-bottom: 18px;
}

.form-side {
  display: grid;
  gap: 16px;
}

.tip-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border-color: var(--forest);
  background:
    radial-gradient(circle at 100% 0, rgba(231, 184, 101, 0.14), transparent 11rem),
    var(--forest);
  color: rgba(248, 241, 228, 0.7);
}

.tip-card::after {
  position: absolute;
  right: -35px;
  bottom: -60px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(248, 241, 228, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(248, 241, 228, 0.03);
  content: "";
}

.tip-card__icon {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(248, 241, 228, 0.15);
  border-radius: 12px;
  color: var(--sun);
}

.tip-card h2 {
  max-width: 220px;
  margin-bottom: 11px;
  color: #fbf5e9;
  font-size: 1.55rem;
}

.tip-card p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.65;
}

.mini-fact-card {
  display: grid;
  gap: 17px;
  padding: 23px;
}

.mini-fact {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.mini-fact > .icon {
  margin-top: 2px;
  color: var(--moss);
}

.mini-fact div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-fact strong {
  font-size: 0.78rem;
  font-weight: 650;
}

.mini-fact span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

/* ---------------------------------------------
   Account
   --------------------------------------------- */

.account-heading {
  margin-bottom: 32px;
}

.account-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.account-identity {
  position: sticky;
  top: calc(var(--header-height) + 22px);
}

.identity-card {
  padding: 28px;
  text-align: center;
}

.identity-card__avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.identity-card h2 {
  font-size: 1.7rem;
}

.identity-handle {
  margin: 4px 0 13px;
  color: var(--muted);
  font-size: 0.76rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
}

.role-badge--admin {
  border-color: #e3d1ad;
  background: #fbf3e2;
  color: #8d6325;
}

.identity-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.69rem;
}

.identity-meta strong {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.identity-card .text-link {
  margin-top: 20px;
}

.account-forms {
  display: grid;
  gap: 18px;
}

.settings-panel {
  padding: clamp(22px, 3vw, 29px);
}

.avatar-settings {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.avatar-settings__copy {
  flex: 1;
}

.avatar-settings__copy > p {
  margin: 3px 0 15px;
  color: var(--muted);
  font-size: 0.78rem;
}

.avatar-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.file-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-field input[type="file"]:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.file-field__name {
  overflow: hidden;
  max-width: 250px;
  color: var(--muted);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-settings__copy .text-button {
  margin-top: 12px;
}

.account-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.6;
}

.account-footnote .icon {
  margin-top: 1px;
  color: var(--moss);
}

.account-footnote p {
  margin: 0;
}

.danger-panel {
  border-color: #e8cfc8;
}

.danger-panel .eyebrow {
  color: var(--danger);
}

/* ---------------------------------------------
   Admin
   --------------------------------------------- */

.admin-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 650;
}

.admin-mark .icon {
  width: 14px;
  height: 14px;
  color: var(--accent-deep);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 23px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.7);
}

.stat-card__icon {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--paper);
  color: var(--moss);
  box-shadow: var(--shadow-sm);
}

.stat-card__icon .icon {
  width: 18px;
  height: 18px;
}

.stat-card div {
  display: flex;
  flex-direction: column;
}

.stat-card strong {
  font-family: var(--font-serif);
  font-size: 1.27rem;
  font-weight: 550;
  line-height: 1.1;
}

.stat-card span:not(.stat-card__icon) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.invite-reveal {
  display: flex;
  gap: 20px;
  margin-bottom: 23px;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 98% 0, rgba(231, 184, 101, 0.15), transparent 18rem),
    var(--forest);
  color: rgba(248, 241, 228, 0.72);
  box-shadow: var(--shadow-md);
  animation: slide-in 250ms ease both;
}

.invite-reveal__icon {
  display: flex;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 241, 228, 0.16);
  border-radius: 13px;
  background: rgba(248, 241, 228, 0.06);
  color: var(--sun);
}

.invite-reveal__icon .icon {
  width: 22px;
  height: 22px;
}

.invite-reveal__body {
  min-width: 0;
  flex: 1;
}

.invite-reveal h2 {
  margin-bottom: 7px;
  color: #fbf5e9;
  font-size: 1.75rem;
}

.invite-reveal p {
  max-width: 590px;
  margin-bottom: 16px;
  font-size: 0.79rem;
  line-height: 1.55;
}

.copy-field {
  display: flex;
  gap: 8px;
  max-width: 650px;
}

.copy-field input {
  min-width: 0;
  flex: 1;
  padding: 11px 13px;
  border: 1px solid rgba(248, 241, 228, 0.17);
  border-radius: 10px;
  outline: 0;
  background: rgba(0, 0, 0, 0.15);
  color: #fbf5e9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.copy-field input:focus {
  border-color: var(--sun);
}

.invite-reveal__warning {
  display: flex !important;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0 !important;
  color: rgba(248, 241, 228, 0.46) !important;
  font-size: 0.65rem !important;
}

.admin-section {
  padding: 26px;
  margin-bottom: 23px;
}

.member-list {
  display: grid;
}

.member-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.member-row:last-child {
  padding-bottom: 0;
}

.member-row__identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.member-row__identity strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-row__identity > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.member-row__joined {
  color: var(--muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 23px;
  align-items: start;
}

.invite-create-panel,
.invite-history-panel {
  padding: 26px;
}

.panel-icon {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--moss);
}

.panel-icon .icon {
  width: 17px;
  height: 17px;
}

.invite-form .field {
  margin-bottom: 14px;
}

.invite-form .btn {
  margin-top: 4px;
}

.invite-create-panel .privacy-note {
  margin-top: 16px;
}

.invite-list {
  display: grid;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.invite-row:last-child {
  padding-bottom: 0;
}

.invite-row__main {
  min-width: 0;
}

.invite-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.invite-row__title strong {
  font-size: 0.78rem;
  font-weight: 650;
}

.invite-row__meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.status-chip {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-chip--open {
  background: #e9f3e6;
  color: var(--success);
}

.status-chip--used {
  background: var(--cream);
  color: var(--ink-soft);
}

.status-chip--expired {
  background: #f4ead9;
  color: #8a642d;
}

.status-chip--revoked {
  background: var(--danger-soft);
  color: var(--danger);
}

.small-empty {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
}

.small-empty span {
  color: var(--line-strong);
}

.small-empty p {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.5;
}

/* ---------------------------------------------
   Errors
   --------------------------------------------- */

.error-body .site-footer {
  display: none;
}

.error-page {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  align-items: center;
  justify-content: center;
  padding-top: 44px;
  padding-bottom: 44px;
}

.error-card {
  width: min(100%, 560px);
  padding: clamp(28px, 5vw, 45px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-illustration {
  position: relative;
  width: 250px;
  height: 150px;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 75% 20%, rgba(231, 184, 101, 0.16), transparent 7rem),
    var(--forest);
}

.error-moon {
  position: absolute;
  top: 19px;
  right: 31px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.8;
}

.error-tree {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-right: 21px solid transparent;
  border-bottom: 67px solid rgba(15, 37, 27, 0.75);
  border-left: 21px solid transparent;
}

.error-tree--one {
  left: 23px;
}

.error-tree--two {
  right: 26px;
  border-right-width: 15px;
  border-bottom-width: 50px;
  border-left-width: 15px;
}

.error-cabin {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 78px;
  height: 54px;
  border: 2px solid rgba(248, 241, 228, 0.7);
  border-bottom: 0;
  transform: translateX(-50%);
}

.error-cabin::before {
  position: absolute;
  top: -24px;
  left: -8px;
  width: 90px;
  height: 30px;
  border-top: 2px solid rgba(248, 241, 228, 0.7);
  transform: rotate(-35deg) skewX(-12deg);
  transform-origin: left top;
  content: "";
}

.error-cabin i {
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 19px;
  background: var(--sun);
}

.error-cabin i:first-child {
  left: 13px;
}

.error-cabin i:last-child {
  right: 13px;
}

.error-code {
  position: absolute;
  top: 13px;
  left: 17px;
  color: rgba(248, 241, 228, 0.3);
  font-family: var(--font-serif);
  font-size: 0.85rem;
}

.error-card .eyebrow {
  margin-bottom: 8px;
}

.error-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.error-card > p:not(.eyebrow) {
  max-width: 390px;
  margin: 0 auto 23px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.error-actions {
  display: flex;
  justify-content: center;
}

/* ---------------------------------------------
   Responsive
   --------------------------------------------- */

@media (max-width: 1120px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .trip-layout {
    grid-template-columns: minmax(0, 1fr) 325px;
  }

  .heatmap-panel__head {
    display: block;
  }

  .heat-legend {
    padding-top: 13px;
  }

  .account-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .best-windows {
    gap: 9px;
  }

  .window-card {
    padding: 16px;
  }

  .window-card h3 {
    font-size: 1.05rem;
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  }

  .auth-story h1 {
    font-size: clamp(2.75rem, 5vw, 4rem);
  }

  .auth-feature-list {
    display: none;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: 1fr 1fr;
  }

  .trip-layout {
    grid-template-columns: 1fr;
  }

  .trip-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .trip-side .responses-panel {
    grid-row: span 2;
  }

  .best-windows {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .day {
    min-height: 60px;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-identity {
    position: static;
  }

  .identity-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 3px 18px;
    align-items: center;
    text-align: left;
  }

  .identity-card__avatar {
    grid-row: span 4;
    margin-bottom: 0;
  }

  .identity-card h2 {
    margin: 0;
  }

  .identity-handle {
    margin: 2px 0 0;
  }

  .identity-card .role-badge {
    justify-self: start;
    margin-top: 7px;
  }

  .identity-meta {
    display: none;
  }

  .identity-card .text-link {
    grid-column: 2 / -1;
    margin-top: 5px;
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .form-side {
    grid-template-columns: 1fr 1fr;
  }

  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell {
    padding: 0 23px;
  }

  .auth-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .auth-story {
    min-height: 0;
    padding: 23px 24px 37px;
    border-radius: 0 0 29px 29px;
  }

  .auth-story__copy {
    margin-top: 44px;
  }

  .auth-story h1 {
    max-width: 620px;
    font-size: clamp(2.5rem, 8vw, 3.6rem);
  }

  .auth-story__lede {
    max-width: 540px;
    margin-top: 16px;
    font-size: 0.9rem;
  }

  .auth-feature-list,
  .auth-scene,
  .auth-story__foot {
    display: none;
  }

  .auth-panel {
    padding: 27px 22px 45px;
  }

  .auth-card {
    padding: 25px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .auth-card h2 {
    font-size: 2.3rem;
  }

  .auth-panel__inner {
    width: min(100%, 500px);
  }

  .auth-panel__note {
    margin-top: 3px;
  }

  .page-shell {
    padding-top: 33px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .trip-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .trip-header__actions {
    padding-bottom: 0;
  }

  .trip-header h1 {
    font-size: clamp(2.8rem, 8vw, 4rem);
  }

  .day {
    padding: 6px;
    font-size: 0.9rem;
  }

  .day__count {
    font-size: 1rem;
  }

  .member-row {
    grid-template-columns: auto minmax(120px, 1fr) auto auto;
  }

  .member-row__joined {
    display: none;
  }

  .admin-stats {
    gap: 9px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card__icon {
    width: 34px;
    height: 34px;
  }

  .stat-card strong {
    font-size: 1.1rem;
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 69px;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    padding-top: 10px;
    padding-bottom: 7px;
  }

  .brand__tagline {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand-mark svg {
    width: 26px;
    height: 26px;
  }

  .brand__name {
    font-size: 1.15rem;
  }

  .primary-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 2px;
    overflow-x: auto;
    margin: 0 -4px;
    padding-top: 6px;
    border-top: 1px solid rgba(212, 198, 177, 0.45);
  }

  .primary-nav a {
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .user-nav {
    grid-row: 1;
    grid-column: 2;
  }

  .user-chip__name {
    display: none;
  }

  .user-chip {
    padding: 2px;
  }

  .site-header + .flash-stack {
    top: calc(var(--header-height) + 52px);
  }

  .site-footer {
    margin-top: 40px;
  }

  .site-footer__inner {
    min-height: 70px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: center;
  }

  .page-heading {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 25px;
  }

  .page-heading h1 {
    font-size: 2.85rem;
  }

  .dashboard-heading .btn {
    width: 100%;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .trip-card {
    padding: 21px 19px 18px;
  }

  .trip-card__head {
    margin-bottom: 20px;
  }

  .trip-card__body h2 {
    max-width: 100%;
    font-size: 1.95rem;
  }

  .trip-card__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .trip-best {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .trip-best .score-badge {
    margin-left: 46px;
  }

  .trip-best__spark {
    margin-top: 1px;
  }

  .empty-state {
    padding: 37px 22px;
  }

  .trip-header {
    margin-bottom: 27px;
  }

  .trip-header h1 {
    font-size: 3rem;
  }

  .best-windows {
    grid-template-columns: 1fr;
  }

  .window-card h3 {
    min-height: 0;
    font-size: 1.25rem;
  }

  .window-card__score strong {
    font-size: 2.7rem;
  }

  .window-dots {
    margin-top: 12px;
  }

  .heatmap-panel {
    padding: 18px;
  }

  .heatmap-panel__head h2 {
    font-size: 1.7rem;
  }

  .heat-legend {
    flex-wrap: wrap;
    padding-top: 12px;
  }

  .my-mark {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }

  .my-mark__ranges {
    white-space: normal;
  }

  .my-mark__progress {
    margin-top: 9px;
  }

  .calendar-wrap {
    gap: 21px;
    margin-top: 19px;
  }

  .calendar-weekdays,
  .calendar-week {
    gap: 3px;
  }

  .calendar-month__heading {
    margin-bottom: 8px;
  }

  .day {
    min-height: 51px;
    padding: 5px;
    border-radius: 7px;
  }

  .day__number {
    font-size: 0.63rem;
  }

  .day__count {
    font-size: 0.92rem;
  }

  .day__you {
    right: 6px;
    bottom: 5px;
  }

  .heatmap-panel__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .heatmap-panel__foot p {
    text-align: left;
  }

  .heatmap-key {
    gap: 12px;
  }

  .trip-side {
    grid-template-columns: 1fr;
  }

  .trip-side .responses-panel {
    grid-row: auto;
  }

  .form-page__header h1 {
    font-size: 2.7rem;
  }

  .form-side {
    grid-template-columns: 1fr;
  }

  .field-row--three {
    grid-template-columns: 1fr 1fr;
  }

  .field-row--three .field:last-child {
    grid-column: 1 / -1;
  }

  .form-panel {
    padding: 21px;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .form-actions .btn {
    flex: 1;
  }

  .account-layout {
    gap: 17px;
  }

  .identity-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 20px;
  }

  .identity-card__avatar {
    grid-row: span 3;
  }

  .identity-card__avatar .avatar--xl {
    width: 74px;
    height: 74px;
    font-size: 1.1rem;
  }

  .identity-card .text-link {
    grid-column: 1 / -1;
  }

  .avatar-settings {
    align-items: flex-start;
    flex-direction: column;
  }

  .avatar--lg {
    width: 64px;
    height: 64px;
  }

  .settings-panel {
    padding: 20px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-grid .field {
    margin-bottom: 16px;
  }

  .admin-heading .admin-mark {
    align-self: flex-start;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 12px 15px;
  }

  .invite-reveal {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }

  .copy-field {
    flex-direction: column;
  }

  .copy-field .btn {
    align-self: flex-start;
  }

  .admin-section {
    padding: 19px;
  }

  .member-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 11px 0;
  }

  .member-row .role-badge {
    display: none;
  }

  .member-row .btn {
    grid-column: 3;
    grid-row: 1;
  }

  .invite-create-panel,
  .invite-history-panel {
    padding: 20px;
  }

  .invite-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .invite-row form {
    align-self: flex-start;
  }

  .error-page {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .error-card {
    padding: 24px 19px;
  }

  .error-illustration {
    width: 100%;
    max-width: 270px;
  }

  .auth-story {
    padding: 20px 21px 33px;
  }

  .auth-story__copy {
    margin-top: 37px;
  }

  .auth-panel {
    padding: 23px 17px 38px;
  }

  .auth-card {
    padding: 4px;
  }

  .auth-card__top {
    margin-bottom: 23px;
  }

  .flash-stack {
    width: 100%;
  }

  .site-header + .flash-stack {
    right: 16px;
    width: calc(100vw - 32px);
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 0 17px;
  }

  .brand__name {
    font-size: 1.05rem;
  }

  .page-heading h1 {
    font-size: 2.55rem;
  }

  .trip-header h1 {
    font-size: 2.65rem;
  }

  .auth-story__top .pill {
    display: none;
  }

  .auth-story h1 {
    font-size: 2.3rem;
  }

  .auth-story__lede {
    font-size: 0.84rem;
  }

  .auth-card h2 {
    font-size: 2.05rem;
  }

  .auth-card {
    padding: 2px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .trip-card__body h2 {
    font-size: 1.72rem;
  }

  .trip-facts {
    flex-direction: column;
    gap: 6px;
  }

  .trip-best {
    gap: 9px;
  }

  .trip-best strong {
    font-size: 0.98rem;
  }

  .score-badge {
    font-size: 0.6rem;
  }

  .day {
    min-height: 46px;
    padding: 4px;
  }

  .day__number {
    font-size: 0.58rem;
  }

  .day__count {
    font-size: 0.83rem;
  }

  .calendar-weekdays span {
    font-size: 0.49rem;
    padding-left: 2px;
  }

  .calendar-weekdays,
  .calendar-week {
    gap: 2px;
  }

  .heatmap-panel {
    padding: 15px;
  }

  .my-mark {
    grid-template-columns: 1fr;
  }

  .my-mark > .avatar {
    display: none;
  }

  .heatmap-panel__head h2 {
    font-size: 1.55rem;
  }

  .section-heading h2 {
    font-size: 1.6rem;
  }

  .avatar-settings__copy > p {
    font-size: 0.74rem;
  }

  .file-field__name {
    max-width: 180px;
  }

  .field-row--three {
    grid-template-columns: 1fr;
  }

  .field-row--three .field:last-child {
    grid-column: auto;
  }

  .form-page__header h1 {
    font-size: 2.35rem;
  }

  .copy-field input {
    font-size: 0.65rem;
  }

  .identity-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .identity-card__avatar {
    grid-row: auto;
    justify-content: center;
  }

  .identity-card .role-badge {
    justify-self: center;
  }

  .identity-card .text-link {
    grid-column: auto;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
