/* Kalimera Linens. A laundered blue-white, and one idea: every item is a stack of cloth with a stitch at its minimum.
   Sea is what's out on the floors, indigo is what's locked away, rust hatching is what can't be used.
   A dashed gap before the stitch is what's missing. */
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ground: #e9f0f6;       /* linen washed with laundry bluing */
  --cloth: #fbfdfe;
  --thread: #cfdce6;
  --thread-strong: #8fa6b6;
  --ink: #0e2a36;
  --soft: #4a6372;
  --teal: #093135;         /* Kalimera's dark teal */
  --bright: #4fe6d5;       /* Kalimera's bright teal: the one action colour */
  --sea: #0f8f86;
  --indigo: #2f3e8f;
  --rust: #b4552d;
  --short: #b3261e;
  --short-wash: #fbeae8;
  --nav-h: 60px;
  --type: Archivo, "Helvetica Neue", Arial, sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body { font-family: var(--type); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--ground); font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- navigation: a rail on desktop, tabs at the thumb on a phone ---- */
.brand b { display: block; font-size: 23px; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.1; }
.brand span { font-size: 15px; color: var(--bright); font-stretch: 112%; line-height: 1.1; }
.nav { position: fixed; z-index: 5; background: var(--teal); color: #fff; display: flex; }
.nav a { color: rgba(255, 255, 255, 0.78); text-decoration: none; border-radius: 4px; }
.nav a.here { color: var(--teal); background: var(--bright); font-weight: 650; }
.nav :focus-visible { outline-color: #fff; }
.badge { display: inline-block; min-width: 1.5em; padding: 0 0.4em; border-radius: 1em; background: var(--short); color: #fff; font-size: 13px; font-weight: 650; text-align: center; line-height: 1.5; }
.who { font-size: 14px; color: rgba(255, 255, 255, 0.72); }

.main { padding: 22px 16px calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); outline: none; max-width: 1240px; }

@media (max-width: 859px) {
  .nav { left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); gap: 4px; }
  .nav .brand, .nav .who { display: none; }
  .nav a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 15px; }
}
@media (min-width: 860px) {
  .nav { left: 0; top: 0; bottom: 0; width: 200px; flex-direction: column; padding: 22px 14px 16px; gap: 3px; }
  .nav .brand { padding: 0 8px 22px; }
  .nav a { display: flex; justify-content: space-between; align-items: center; padding: 10px; }
  .nav a:hover:not(.here) { color: #fff; background: rgba(255, 255, 255, 0.08); }
  .who { margin-top: auto; padding: 0 8px; }
  .main { margin-left: 200px; padding: 34px 38px 60px; }
}

/* ---- headline: the answer, in a sentence ---- */
.say { font-size: clamp(27px, 4.4vw, 44px); line-height: 1.08; font-weight: 800; font-stretch: 116%; letter-spacing: -0.022em; max-width: 24ch; }
.say.ok { font-weight: 300; font-stretch: 105%; }
.sub { margin-top: 8px; color: var(--soft); max-width: 62ch; }
.sub a { font-weight: 600; }

.tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; align-items: center; }
.tools .search { flex: 1 1 200px; max-width: 340px; }
.tools .grow { flex: 1; }
input, select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--thread-strong); border-radius: 5px; background: #fff; }
input::placeholder { color: var(--soft); }
button { cursor: pointer; }
.primary, .plain, .danger { min-height: 46px; padding: 0 18px; border-radius: 5px; font-weight: 650; border: 1px solid transparent; }
.primary { background: var(--bright); color: var(--teal); border-color: #2bc4b3; }
.primary:hover:not(:disabled) { background: #6ff0e1; }
.primary:disabled { background: var(--thread); border-color: var(--thread); color: var(--soft); cursor: default; }
.plain { background: #fff; border-color: var(--thread-strong); }
.plain:hover { border-color: var(--ink); }
.danger { background: #fff; color: var(--short); border-color: var(--short); }
.danger:hover { background: var(--short-wash); }
.link { background: none; border: 0; text-decoration: underline; font-weight: 600; min-height: 32px; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.chips button { flex: none; min-height: 38px; padding: 0 13px; border-radius: 19px; background: none; border: 1px solid var(--thread-strong); white-space: nowrap; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- the key to the stacks ---- */
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--soft); margin-top: 10px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { display: inline-block; width: 16px; height: 11px; border-radius: 2px; }
.key i.stitch { width: 0; height: 15px; border-left: 2px dashed var(--ink); border-radius: 0; margin: 0 2px; }

/* ---- the stack ---- */
.stack { position: relative; display: flex; width: 100%; height: 16px; border-radius: 3px; background: var(--ground); }
.stack i { display: block; min-width: 3px; }
.stack i:first-child { border-radius: 3px 0 0 3px; }
.stack i:last-of-type { border-radius: 0 3px 3px 0; }
.seg-in_rooms { background: var(--sea); }
.seg-in_laundry { background: #6cc4bb; }
.seg-in_sets { background: repeating-linear-gradient(90deg, var(--indigo) 0 4px, #aab3e0 4px 7px); }
.seg-in_storage { background: var(--indigo); }
.seg-unusable { background: repeating-linear-gradient(135deg, var(--rust) 0 3px, #e3b7a2 3px 6px); }
.seg-short { background: var(--short-wash); box-shadow: inset 0 0 0 1px var(--short); }
/* the stitch: the one thing on this page that's allowed to break out of its row */
.stitch-mark { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 2px dashed var(--ink); margin-left: -1px; }

/* ---- the list ---- */
.group { margin-top: 28px; }
.group h2 { font-size: 21px; font-weight: 750; font-stretch: 110%; letter-spacing: -0.01em; }
.rows { list-style: none; margin-top: 8px; border-top: 2px solid var(--ink); }
.row { display: grid; width: 100%; text-align: left; background: var(--cloth); border: 0; border-bottom: 1px solid var(--thread); padding: 13px 12px 12px; gap: 11px 12px; grid-template-columns: repeat(4, 1fr);
       grid-template-areas: "name name name name" "stack stack stack stack" "a b c d"; }
.row:hover { background: #fff; box-shadow: inset 3px 0 0 var(--ink); }
.row-name { grid-area: name; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-weight: 620; font-size: 17px; overflow-wrap: anywhere; }
.row .stack { grid-area: stack; }
.need { flex: none; color: var(--short); font-weight: 750; font-stretch: 105%; }
.met { flex: none; font-weight: 400; font-size: 14px; color: var(--soft); }
.fig { display: block; }
.fig b { display: block; font-size: 21px; line-height: 1.1; font-weight: 650; font-stretch: 90%; }
.fig small { font-size: 13px; color: var(--soft); }
.fig-in_rooms b { color: #0a6d66; }
.fig-in_laundry b { color: #0a6d66; }
.fig-in_storage b { color: var(--indigo); }
.fig-unusable b { color: #954321; }
.fig b.zero { color: var(--thread-strong); font-weight: 400; }
.fig-a { grid-area: a; } .fig-b { grid-area: b; } .fig-c { grid-area: c; } .fig-d { grid-area: d; }
.row-head { display: none; }

@media (min-width: 860px) {
  .row, .row-head { grid-template-columns: minmax(170px, 1.25fr) minmax(150px, 1.6fr) 62px 62px 62px 62px 92px; grid-template-areas: none; align-items: center; gap: 18px; }
  .row { padding: 12px 14px; }
  .row-name { grid-area: auto; display: block; font-size: 16px; }
  .row .stack { grid-area: auto; }
  .row .fig-a, .row .fig-b, .row .fig-c, .row .fig-d { grid-area: auto; text-align: right; }
  .row .fig small { display: none; }
  .row .need, .row .met { display: none; }
  .row-end { display: block; text-align: right; line-height: 1.2; }
  .row-end .need, .row-end .met { display: block; }
  .row-head { display: grid; padding: 0 14px 6px; font-size: 14px; color: var(--soft); font-stretch: 88%; margin-top: 8px; }
  .row-head span:nth-child(n+3) { text-align: right; }
  .group .rows { margin-top: 0; }
}
@media (max-width: 859px) { .row-end { display: none; } }

/* ---- to buy ---- */
.buy-row { display: grid; width: 100%; grid-template-columns: 1fr auto; gap: 2px 16px; text-align: left; background: var(--cloth); border: 0; border-bottom: 1px solid var(--thread); padding: 14px 12px; align-items: center; }
.buy-row:hover { background: #fff; box-shadow: inset 3px 0 0 var(--ink); }
.buy-row .name { font-weight: 620; font-size: 17px; overflow-wrap: anywhere; }
.buy-row .count { grid-row: 1 / span 2; grid-column: 2; font-size: 34px; font-weight: 800; font-stretch: 92%; color: var(--short); line-height: 1; text-align: right; }
.buy-row .detail { font-size: 14px; color: var(--soft); }
.buy-row .stack { grid-column: 1 / -1; margin-top: 10px; height: 10px; }

/* ---- history ---- */
.day { margin-top: 26px; font-size: 17px; font-weight: 750; font-stretch: 108%; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.entries { list-style: none; }
.entries li { padding: 11px 12px; background: var(--cloth); border-bottom: 1px solid var(--thread); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 14px; }
.entries p { flex: 1 1 240px; overflow-wrap: anywhere; }
.entries time { color: var(--soft); font-size: 14px; white-space: nowrap; }
.entries .note { flex-basis: 100%; font-size: 14px; color: var(--soft); }
.filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---- manage ---- */
.panels { display: grid; gap: 32px; margin-top: 22px; align-items: start; }
@media (min-width: 1000px) { .panels { grid-template-columns: 1fr 1fr; gap: 40px; } }
.panel h2 { font-size: 21px; font-weight: 750; font-stretch: 110%; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.panel > p { color: var(--soft); margin: 8px 0; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--cloth); border-bottom: 1px solid var(--thread); }
.line > span:first-child { flex: 1 1 130px; overflow-wrap: anywhere; font-weight: 560; }
.line small { display: block; font-weight: 400; color: var(--soft); font-size: 14px; }
.line .plain, .line .danger { min-height: 40px; padding: 0 12px; font-weight: 560; font-size: 15px; }
.line.editing input { flex: 1 1 150px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inline-form input { flex: 1 1 170px; width: auto; }

/* ---- forms ---- */
label { display: block; font-weight: 560; font-size: 15px; }
label input, label select { margin-top: 4px; font-weight: 400; font-size: 16px; }
.error { color: var(--short); background: var(--short-wash); border-left: 3px solid var(--short); padding: 9px 12px; font-size: 15px; }

/* ---- the sheet: rises from the bottom on a phone, sits at the side on a desk ---- */
.sheet { border: 0; color: var(--ink); background: var(--cloth); padding: 0; margin: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 12px 12px 0 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: rgba(9, 49, 53, 0.5); }
.sheet[open] { animation: rise 0.2s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0.4; } }
@media (min-width: 860px) {
  .sheet { margin: 0 0 0 auto; width: 480px; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .sheet[open] { animation-name: slide; }
  @keyframes slide { from { transform: translateX(40px); opacity: 0.4; } }
}
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }

.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--cloth); display: flex; justify-content: space-between; gap: 10px; padding: 16px 16px 8px 18px; align-items: flex-start; }
.sheet-head h2 { font-size: 24px; line-height: 1.12; font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.sheet-head small { display: block; font-size: 15px; font-weight: 400; font-stretch: 100%; letter-spacing: 0; color: var(--soft); margin-top: 3px; }
.close { flex: none; width: 44px; height: 44px; font-size: 24px; line-height: 1; border: 1px solid var(--thread-strong); border-radius: 50%; background: #fff; }
.sheet-body { padding: 4px 18px calc(22px + env(safe-area-inset-bottom)); }
.summary .stack { height: 24px; margin-top: 8px; }
.summary .figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.summary .fig b { font-size: 28px; }
.standing { margin-top: 10px; font-size: 15px; color: var(--soft); }
.standing strong { color: var(--short); }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 20px -4px 16px; border-bottom: 2px solid var(--ink); }
.tabs button { min-height: 44px; background: none; border: 0; font-size: 14px; font-stretch: 86%; padding: 0 1px; line-height: 1.1; border-radius: 4px 4px 0 0; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; font-weight: 650; }
.stock-form { display: grid; gap: 14px; }
.hint { font-size: 15px; color: var(--soft); }
fieldset { border: 0; min-width: 0; }
legend { font-weight: 560; font-size: 15px; margin-bottom: 4px; }
.places { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.places label { position: relative; font-weight: 400; cursor: pointer; }
.places input { position: absolute; inset: 0; opacity: 0; height: 100%; cursor: pointer; margin: 0; }
.places span { display: block; text-align: center; padding: 8px 2px 7px; border: 1px solid var(--thread-strong); border-radius: 5px; background: #fff; font-size: 14px; font-stretch: 90%; }
.places span b { display: block; font-size: 19px; font-weight: 650; line-height: 1.15; }
.places input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.places input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 2px; }
.qty { display: grid; grid-template-columns: 56px 1fr 56px; gap: 6px; margin-top: 4px; }
.qty button { height: 56px; font-size: 26px; border: 1px solid var(--thread-strong); border-radius: 5px; background: #fff; }
.qty input { height: 56px; text-align: center; font-size: 26px; font-weight: 650; margin: 0; }
.counts3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.counts3 input { height: 52px; text-align: center; font-size: 21px; font-weight: 650; }
.counts3 label { font-size: 14px; font-stretch: 90%; }
.full { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.parts { margin: 8px 0; display: grid; gap: 8px; }
.parts h3 { font-size: 16px; font-weight: 700; padding-bottom: 5px; border-bottom: 2px solid var(--ink); }
.part { display: grid; grid-template-columns: 1fr 64px 46px; gap: 6px; }
.part input { text-align: center; }
.part .plain { padding: 0; font-size: 20px; }
.gets { margin: 4px 0 0 18px; }
.recent { margin-top: 28px; }
.recent h3 { font-size: 16px; font-weight: 700; padding-bottom: 5px; border-bottom: 2px solid var(--ink); }
.recent .entries li { padding: 9px 0; background: none; font-size: 15px; }
.recent .link { margin-top: 6px; }

.toast { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 6px; font-weight: 500; max-width: 480px; margin: 0 auto; box-shadow: 0 6px 22px rgba(9, 49, 53, 0.35); }
@media (min-width: 860px) { .toast { left: 238px; right: auto; bottom: 26px; margin: 0; } }
/* over a sheet it goes to the top, clear of the buttons */
.sheet .toast { top: 12px; bottom: auto; left: 12px; right: 12px; }
@media (min-width: 860px) { .sheet .toast { left: auto; right: 12px; width: 456px; } }

.empty { margin-top: 28px; padding: 26px 18px; background: var(--cloth); border: 2px dashed var(--thread-strong); max-width: 560px; }
.empty h2 { font-size: 21px; font-weight: 750; font-stretch: 108%; }
.empty p { color: var(--soft); margin: 6px 0 14px; }
.banner { margin-bottom: 14px; }

/* ---- the sign-in pages ---- */
.door { min-height: 100dvh; display: grid; place-items: center; padding: 22px; background: var(--teal); }
.door-form { width: 100%; max-width: 390px; display: grid; gap: 16px; }
.door-form, .door-form label { color: #fff; }
.door-form .brand { margin-bottom: 10px; }
.door-form .brand b { font-size: 42px; font-weight: 800; }
.door-form .brand span { font-size: 24px; }
.door-form input { color: var(--ink); }
.door-form .primary { width: 100%; }
.door-form :focus-visible { outline-color: #fff; }
.door-form .error { color: var(--short); }

/* ---- the language switch: top right on a phone, in the rail on a desk ---- */
.language-switch { position: absolute; z-index: 6; top: 12px; right: 12px; min-height: 36px; padding: 0 11px; border-radius: 18px; border: 1px solid var(--thread-strong); background: var(--cloth); font-size: 14px; font-weight: 560; color: var(--ink); }
.language-switch:hover { border-color: var(--ink); }
.door .language-switch { background: none; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.door .language-switch:focus-visible { outline-color: #fff; }
@media (max-width: 859px) { .say { padding-right: 76px; } }
@media (min-width: 860px) {
  body:not(.door) .language-switch { position: fixed; top: auto; right: auto; left: 22px; bottom: 50px; background: none; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
  body:not(.door) .language-switch:focus-visible { outline-color: #fff; }
  .who { margin-bottom: 0; }
}
