:root {
  --petrol: #0f4d52;
  --apricot: #f7a45b;
  --cream: #f8f5ee;
  --sand: #d9c7b4;
  --ink: #2e2e2e;
  --muted: #59524a;
  --paper: #fffdf8;
  --line: #b4a394;
  --danger: #7b3125;
  color-scheme: light;
  color: var(--ink);
  background: var(--cream);
  font: 1rem/1.55 Inter, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--petrol); }
h1, h2, h3, .brand { font-family: Montserrat, sans-serif; line-height: 1.16; }
h1 { margin: 0 0 .65rem; font-size: clamp(1.85rem, 4.6vw, 3.6rem); letter-spacing: -.045em; font-weight: 600; }
h2 { margin: 0 0 .8rem; font-size: clamp(1.3rem, 2.3vw, 1.75rem); font-weight: 600; }
h3 { margin: 0 0 .45rem; font-size: 1.09rem; font-weight: 600; }
p { margin: 0 0 .9rem; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button[disabled] { opacity: .66; cursor: wait; }
:focus-visible { outline: 3px solid #9e4a16; outline-offset: 3px; }
.skip { position: absolute; left: .8rem; top: -7rem; padding: .7rem 1rem; background: var(--paper); z-index: 2; }
.skip:focus { top: .65rem; }

.frame { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--sand); }
.topbar-inner { min-height: 76px; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.brand { display: flex; gap: .8rem; align-items: center; color: var(--petrol); font-weight: 600; letter-spacing: .09em; text-decoration: none; }
.locale { display: flex; gap: .55rem; align-items: center; font-size: .85rem; }
.layout { padding-block: clamp(1.4rem, 4vw, 3.5rem) 4rem; min-height: 70vh; }
.layout.member { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1.6rem, 5vw, 4rem); }
#navigation { display: grid; align-content: start; gap: .35rem; }
.nav-button { justify-content: flex-start; border-color: transparent; }
.nav-button[aria-current="page"] { background: var(--petrol); color: var(--cream); }
.nav-button.sign-out { margin-top: .6rem; }
main { min-width: 0; }
.notice { margin-bottom: 1rem; padding: .85rem 1.05rem; border-left: 4px solid var(--petrol); background: #e7efec; overflow-wrap: anywhere; }
.notice[data-error] { background: #faebe3; border-color: var(--danger); }

.welcome { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr); gap: clamp(1.4rem, 5vw, 4rem); align-items: start; }
.welcome-hero { border-radius: 9px; overflow: hidden; background: var(--petrol); color: var(--cream); }
.welcome-hero img { display: block; width: 100%; aspect-ratio: 1.95; object-fit: cover; object-position: center 42%; }
.hero-copy { padding: clamp(1.3rem, 4vw, 3rem); }
.hero-copy p:last-child { margin: 0; max-width: 38ch; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hero-copy .eyebrow { color: var(--apricot); }
.auth-switch { display: flex; gap: .5rem; margin-bottom: 1.15rem; }
.auth-switch button[aria-pressed="true"] { background: var(--sand); color: var(--ink); border-color: var(--sand); }

.card { background: var(--paper); border: 1px solid var(--sand); border-radius: 9px; padding: clamp(1rem, 3vw, 1.65rem); min-width: 0; }
.card p:last-child { margin-bottom: 0; }
.stack { display: grid; gap: 1rem; }
.preference-fields { margin: 0; padding: 1rem; min-width: 0; border: 1px solid var(--sand); }
.preference-fields legend { padding-inline: .35rem; font-weight: 600; }
.member-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.cards { display: grid; gap: .85rem; margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.page-intro { max-width: 60ch; margin-bottom: 1.45rem; color: var(--muted); }
.profile-card h2, .profile-card p { overflow-wrap: anywhere; }
.profile-card .about { white-space: pre-wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .38rem; margin: .65rem 0; }
.chip { display: inline-block; border: 1px solid var(--sand); padding: .2rem .55rem; border-radius: 4px; font-size: .83rem; overflow-wrap: anywhere; }
.profile-card .meta, .muted { color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.field { display: grid; gap: .32rem; min-width: 0; }
.field label, .field > span:first-child { font-weight: 600; }
.field-note { font-size: .85rem; color: var(--muted); }
.check-field { display: flex; align-items: flex-start; gap: .6rem; font-size: .91rem; }
.check-field input { min-height: unset; margin: .33rem 0 0; accent-color: var(--petrol); }
input:not([type="checkbox"]), select, textarea {
  color: var(--ink);
  background: var(--paper);
  padding: .53rem .7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 44px;
  width: 100%;
}
textarea { resize: vertical; min-height: 5.5rem; }
.locale select { width: auto; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
button, .button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px;
  border: 1px solid var(--petrol); border-radius: 6px; padding: .5rem .85rem;
  color: var(--petrol); background: transparent; font-weight: 600; text-decoration: none;
}
button:hover, .button:hover { background: #e3edea; }
.primary, .primary:hover { color: var(--cream); background: var(--petrol); }
.danger { color: var(--danger); border-color: var(--danger); }
.danger:hover { background: #faebe3; }
.plain { border-color: transparent; }
details { margin-top: .7rem; }
summary { width: max-content; max-width: 100%; min-height: 44px; padding-block: .53rem; color: var(--petrol); }
details form { margin-top: .5rem; max-width: 36rem; }
.message-log { display: grid; list-style: none; padding: 0; margin: 0; gap: .65rem; }
.message { background: var(--cream); padding: .7rem .9rem; border-radius: 7px; overflow-wrap: anywhere; }
.message.mine { background: #e3edea; }
.message p { margin: .2rem 0 0; white-space: pre-wrap; }
.message time { font-size: .77rem; color: var(--muted); }
.footer { border-top: 1px solid var(--sand); padding: 1.35rem 0 2rem; }
.footer strong { color: var(--petrol); }
.store-row { display: flex; flex-wrap: wrap; gap: .65rem 1rem; margin: .55rem 0 0; }
.store-row span { display: block; padding: .45rem .65rem; border: 1px solid var(--sand); border-radius: 5px; font-size: .85rem; }

@media (max-width: 810px) {
  .layout.member { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  #navigation { display: flex; gap: .3rem; flex-wrap: wrap; }
  .nav-button.sign-out { margin-top: 0; }
}
@media (max-width: 650px) {
  .frame { width: calc(100% - 1.8rem); }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome-hero img { aspect-ratio: 2.4; }
  .locale > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 380px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .brand { gap: .45rem; letter-spacing: .03em; }
}
