/* Base: colour tokens, fonts, reset, typography, layout, buttons, forms,
   dialogs, toast and footer, shared by every screen. Linked first. */

/* Fonts are served from the app, not Google Fonts, so a visit never sends the
   visitor's IP address to Google. Built from google/fonts (OFL, licences beside
   the files in app/assets/fonts): latin and latin-ext subsets, as Google served
   them; DM Sans keeps its weight axis, with optical size fixed at 14. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/dm-sans-latin-ext-159124e6.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/dm-sans-latin-6597c708.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/libre-caslon-display-latin-ext-b28c5b9c.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/libre-caslon-display-latin-236e8d67.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Avenstad — Midnight & Cognac: the palette, named by role, and the type. */
:root {
  --paper: #f0ebe3;
  --ink: #252830;
  --muted: #65616a;
  --line: #d7d0c5;
  --line-dark: #343b48;
  --navy: #192336;
  --midnight: #101724;
  --gold: #a96b43;
  --gold-soft: #d2ad80;
  --sand: #cdbb98;
  --serif: "Libre Caslon Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --label-size: clamp(10px, 9.6px + 0.1vw, 10.5px);
  --small-size: clamp(12px, 11.4px + 0.15vw, 13px);
  --action-size: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #a28b62;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.app {
  display: flex;
  min-height: 100vh;
}
.household {
  border-top: 1px solid #465044;
  border-bottom: 1px solid #465044;
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 37px;
  padding: 23px 0;
  font-size: 12px;
  border-color: #364050;
}
.household small,
.profile small {
  display: block;
  font-size: 10px;
  color: #a5ad9e;
  margin-top: 5px;
}
main {
  padding: 39px 44px 20px;
  max-width: 1700px;
  margin: auto;
}
.eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8c917f;
  margin-bottom: 11px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 29px;
}
h1 {
  font-family: var(--serif);
  font-size: 47px;
  font-weight: 400;
  letter-spacing: -1.3px;
  line-height: 1.08;
  margin: 0 0 10px;
}
h2 {
  font: 31px var(--serif);
  margin: 0;
  font-weight: 400;
}
h3 {
  font: 25px var(--serif);
  margin: 0;
  font-weight: 400;
}
/* A section heading one level down that keeps the h3's size. */
.subheading {
  font-size: 25px;
}
/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.subtitle {
  font-size: 12px;
  color: #66705f;
  line-height: 1.8;
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 13px 19px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
  min-height: 42px;
  background: #fff9;
}
.button.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.button:hover {
  filter: brightness(0.95);
}
.button.light {
  background: #f4f1e7;
  color: #26362e;
  border: 0;
}
.button.ghost {
  background: none;
}
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tag {
  font-size: 8px;
  letter-spacing: 0.7px;
  background: #e2e3df;
  color: #46505b;
  padding: 6px 8px;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
}
.tag.amber {
  background: #f0e6d2;
  color: #897041;
}
.tag.neutral {
  background: #eae9e3;
  color: #75786e;
}
.text-link {
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #435740;
  text-align: left;
}
.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  margin: 28px 0 32px;
  padding-bottom: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
}
.section-heading h2 {
  font-size: 29px;
}
.section-heading .subtitle {
  margin-top: 5px;
  font-size: 10px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 21px;
}
.chip {
  padding: 8px 13px;
  border: 1px solid #dddcd2;
  border-radius: 3px;
  font-size: 10px;
  color: #626e5a;
}
.chip.active {
  background: #304132;
  color: white;
  border-color: #304132;
}
.search {
  margin-left: auto;
  border-bottom: 1px solid #cfd1c6;
  display: flex;
  gap: 8px;
  align-items: center;
}
.search input {
  border: 0;
  background: none;
  padding: 8px 0;
  width: 155px;
  font-size: 10px;
  outline: none;
}
.asset {
  cursor: pointer;
  text-align: left;
  display: block;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid #dfdfd5;
  transition: transform 0.2s;
  border-color: #d5ccbd;
}
.asset:hover {
  transform: translateY(-4px);
}
.asset:hover img {
  transform: scale(1.04);
}
.notice {
  padding: 14px 17px;
  background: #efeee6;
  border: 1px solid #dfdfd4;
  font-size: 11px;
  line-height: 1.8;
  color: #727c6a;
  margin: 20px 0;
  border-radius: 3px;
}
.notice strong {
  color: #4f4545;
}
footer {
  padding: 32px 44px;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  font: 12px var(--serif);
  letter-spacing: 2px;
  color: #66594e;
}
/* "Considered in every detail." one step darker than the prototype's
   #72696a, for 4.5:1 on cream; the navy pages keep their own colour. The
   quiet "by Norvarden" credit is an a, not a span, so it stays visible on
   phones, where footer spans are hidden. */
footer span {
  font: 10px var(--sans);
  letter-spacing: 0;
  color: #6e6566;
}
footer button {
  margin-left: auto;
  font: 10px var(--sans);
  letter-spacing: 0;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: #fff;
  padding: 14px 23px;
  border-radius: 4px;
  z-index: 1000;
  box-shadow: 0 8px 30px #0002;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  font-size: 12px;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  padding: 0;
  border: 0;
  border-radius: 5px;
  width: min(760px, 94vw);
  max-height: 90dvh;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 100px #0004;
}
dialog::backdrop {
  background: #142019a6;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 29px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 29px;
}
.close {
  font-size: 25px;
  color: #838a7b;
  padding: 0 5px;
}
.modal-body {
  padding: 27px 29px;
}
.field small,
.detail-grid small {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8d9484;
  margin-bottom: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: block;
  margin-bottom: 17px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d5d8cb;
  background: #faf7f1;
  color: #2d2b32;
  border-radius: 3px;
  border-color: #cfc3b3;
}
.field textarea {
  height: 80px;
  resize: vertical;
}
.field.full {
  grid-column: 1/-1;
}
.field input[type="checkbox"] {
  width: auto;
}
.panel {
  border: 1px solid var(--line);
  background: #fff6;
  border-radius: 4px;
  padding: 25px;
  margin-bottom: 22px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.progress {
  height: 4px;
  background: #ded5c7;
  margin: 20px 0 10px;
  overflow: hidden;
  border-radius: 2px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s;
}
.task {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.task:last-child {
  border: 0;
}
.task input {
  accent-color: #425c38;
  width: 17px;
  height: 17px;
  cursor: pointer;
}
.task .tag {
  margin-left: auto;
}
.empty {
  padding: 55px;
  text-align: center;
  grid-column: 1/-1;
  border: 1px dashed #c9cebb;
  color: #7c8773;
  line-height: 1.8;
}
.person {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff6;
}
.person h3 {
  font-size: 24px;
}
.person .role {
  font-size: 10px;
  color: #8a9380;
  margin: 7px 0 20px;
}
.person .scope {
  font-size: 11px;
  line-height: 1.8;
  color: #75806b;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  min-height: 57px;
  border-color: var(--line);
}
.person .text-link {
  margin-top: 20px;
}
.step {
  display: flex;
  gap: 15px;
  font-size: 12px;
  line-height: 1.7;
}
.step:before {
  counter-increment: steps;
  content: "0" counter(steps);
  font: 23px var(--serif);
  color: #956b4c;
}
.step small {
  display: block;
  color: #86917d;
  font-size: 11px;
  margin-top: 4px;
}
.status-list {
  display: grid;
  gap: 20px;
  margin-top: 25px;
}
.status-list div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.toggle {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
}
.toggle input {
  accent-color: #405b38;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.timeline {
  padding-left: 18px;
  border-left: 1px solid #cfd7c1;
  display: grid;
  gap: 25px;
  margin: 25px 0;
  border-color: #cbb79d;
}
.timeline div {
  position: relative;
  font-size: 12px;
  line-height: 1.8;
}
.timeline div:before {
  content: "";
  position: absolute;
  left: -22px;
  top: 7px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
}
.timeline small {
  display: block;
  color: #85917b;
  font-size: 11px;
}
@media (max-width: 1200px) {
  main {
    padding: 30px;
  }
}
@media (max-width: 900px) {
  main {
    padding: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 40px;
  }
  .summary {
    gap: 15px;
  }
  footer {
    padding: 25px;
  }
  .search {
    margin-left: 0;
  }
  .search input {
    width: 125px;
  }
}
@media (max-width: 640px) {
  main {
    padding: 27px 20px 15px;
  }
  .page-heading {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 23px;
  }
  .page-heading > .button-row {
    width: 100%;
    margin-top: 5px;
  }
  h1 {
    font-size: 43px;
  }
  .summary {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
    margin: 25px 0;
    padding-bottom: 25px;
  }
  .filters {
    gap: 6px;
  }
  .chip {
    font-size: 9px;
    padding: 8px 10px;
  }
  .search {
    width: 100%;
    margin-top: 7px;
  }
  .search input {
    width: 100%;
    font-size: 12px;
    padding: 11px 0;
  }
  .section-heading h2 {
    font-size: 28px;
  }
  .section-heading .text-link {
    font-size: 9px;
  }
  .two-col {
    gap: 0;
  }
  .panel {
    padding: 22px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-head {
    padding: 22px;
  }
  .modal-body {
    padding: 22px;
  }
  footer {
    gap: 13px;
    padding: 24px 20px;
  }
  footer span {
    display: none;
  }
  footer button {
    font-size: 9px;
  }
  .task .tag {
    font-size: 7px;
  }
  .task {
    gap: 10px;
  }
  .button {
    padding: 12px 14px;
  }
}
.chip.active {
  color: #fff;
}
.search input::placeholder {
  color: #68745e;
}
.household small,
.profile small {
  color: #b8b1a8;
}
.button.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.button.light {
  background: #e1c9a7;
  color: #211d21;
}
.tag.amber {
  background: #eaddc8;
  color: #735128;
}
.tag.neutral {
  background: #e3ddd4;
  color: #625d65;
}
.panel,
.person {
  background: #f9f6f0;
  border-color: #d9d0c3;
}
.task input,
.toggle input {
  accent-color: #8b5134;
}
.step small {
  color: #69626a;
}
@keyframes content-reveal {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes photo-reveal {
  from {
    transform: scale(1.045);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* The prototype's search field turns its outline off; give it the app's
   focus ring like every other control. */
.search input:focus-visible {
  outline: 2px solid #a28b62;
  outline-offset: 4px;
}
/* On a phone, "Private gallery ↗" and "Your timeline →" each stay on one
   line beside the section heading. */

/* Possession page: the prototype's detail dialog, laid out as a page. */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 10px;
  color: #655044;
}
.possession-record {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.possession-record .modal-head h1 {
  font-size: 29px;
  margin: 0;
  letter-spacing: 0;
}
@media (max-width: 640px) {
  .possession-record .modal-body,
  .possession-record .modal-head {
    padding: 22px 20px;
  }
}

/* Possession actions: button_to wraps each button in a form. */
.inline-form {
  display: contents;
}

/* Add and edit forms, and Make it personal: the prototype's dialog forms. */
.possession-form .field_with_errors,
.gallery-form .field_with_errors {
  display: contents;
}
.possession-form .field_with_errors :is(input, select, textarea),
.gallery-form .field_with_errors :is(input, select, textarea) {
  border-color: #b0796a;
}
.possession-form input[type="file"] {
  padding: 10px;
  font-size: 11px;
}
.field-hint {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.field-error {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: #9a4536;
}
.form-error {
  margin: 0 0 17px;
  font-size: 11px;
  color: #9a4536;
}

/* Forms in the prototype's dialogs (people, arrival plans), and the same
   forms as a page when JavaScript is off. */
.record-form .field_with_errors {
  display: contents;
}
.record-form .notice {
  margin-bottom: 20px;
}
.form-page {
  max-width: 760px;
  margin: 45px auto 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.form-page .modal-head h1 {
  font-size: 29px;
  margin: 0;
  letter-spacing: 0;
}
.panel > a.text-link {
  padding: 1px 6px;
}

footer .footer-credit {
  font-family: var(--sans);
  letter-spacing: 0;
  color: #979b8d;
  text-decoration: none;
}
.landing footer .footer-credit {
  color: #bdbec9;
}
footer .footer-credit:hover {
  color: inherit;
}
.record-form .toggle small {
  font-size: var(--small-size);
}

/* Avatars: initials in a circle. The signed-in user's, in the top bar, is
   .owner and .small. */
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #3a3e49;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 20px;
}
.owner {
  background: #d7c5ad;
  color: #332d2b;
  font: 11px var(--sans);
}
.small {
  width: 30px;
  height: 30px;
}
