@font-face {
  font-family: "GT Eesti";
  src: url("../fonts/GT Eesti Pro Display Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "GT Eesti";
  src: url("../fonts/GT Eesti Display Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #f2f2ee;
  --ink: #1a1a1a;
  --black: #000000;
  --bone: #f8f8f5;
  --thumb: #e1e1e1;
  --line: rgba(0, 0, 0, 0.15);
  --muted: rgba(0, 0, 0, 0.5);
  --tag-bg: rgba(0, 0, 0, 0.06);
  --tag-bg-active: rgba(0, 0, 0, 0.14);

  --font: "GT Eesti", "Helvetica Neue", Arial, sans-serif;

  --col-side: 320px;
  --gap: 40px;
  --pad: 40px;
}

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

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0.3s; }
  .app--enter { animation: pageFadeIn 0.55s ease both; }
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 1.25px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-decoration-skip-ink: none;
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img, svg { display: block; }
p { margin: 0; }

.menu { font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: 1.25px; }
.menu-secondary { font-weight: 300; font-size: 12px; line-height: 18px; letter-spacing: 1.25px; }

.app {
  display: grid;
  grid-template-columns: var(--col-side) minmax(0, 1fr) var(--col-side);
  column-gap: var(--gap);
  padding: 0 var(--pad);
  align-items: start;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.rail--left { padding: var(--pad) 0; gap: var(--gap); }
.rail--left-detail { display: grid; grid-template-rows: repeat(3, 1fr); gap: 0; }
.rail--left-detail > :nth-child(1) { align-self: start; }
.rail--left-detail > :nth-child(2) { align-self: center; }
.rail--left-detail > :nth-child(3) { align-self: end; }
.rail--right {
  padding-top: var(--pad);
  padding-bottom: var(--pad);
  gap: var(--gap);
  overflow-y: auto;
  scrollbar-width: none;
}
.rail--right::-webkit-scrollbar { display: none; }

.brand__logo { display: block; width: 102.4px; }
.brand__logo img { width: 102.4px; height: auto; }
.brand__tagline {
  margin-top: 8px;
  font-weight: 300;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 2px;
  color: var(--black);
  white-space: nowrap;
}

.welcome { font-weight: 400; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; }

.left__spacer { flex: 1 1 auto; }
.sdot { width: 50px; height: 55px; flex: 0 0 auto; }

.mailing { display: flex; flex-direction: column; gap: 20px; }
.mailing__copy { font-weight: 300; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; }
.mailing__copy b { font-weight: 400; }
.signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 45px;
  background: #fff;
  border-radius: 45px;
  padding: 0 20px 0 25px;
}
.signup__label { font-weight: 300; font-size: 14px; line-height: 12px; letter-spacing: 1.25px; color: var(--black); }
.signup__arrow { width: 9px; }
.signup__arrow svg { width: 9px; height: 9px; }

/* Capped at 640px so 3-across cards are ~212px — our 450px-wide thumbnails
   are ≥2× that, keeping the grid retina-sharp. */
.center { padding-top: 20px; min-width: 0; width: 100%; max-width: 640px; margin: 0 auto; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 40px;
  margin-bottom: 12px;
}
.toolbar__chips {
  --mask-l: #000;
  --mask-r: #000;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, var(--mask-l), #000 28px, #000 calc(100% - 28px), var(--mask-r));
  mask-image: linear-gradient(to right, var(--mask-l), #000 28px, #000 calc(100% - 28px), var(--mask-r));
}
.toolbar__chips::-webkit-scrollbar { display: none; }
.toolbar__chips .tag { flex: 0 0 auto; }
.toolbar__chips.fade-l { --mask-l: transparent; }
.toolbar__chips.fade-r { --mask-r: transparent; }
.toolbar__left-mobile { display: none; }

.toolbar__status {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 300;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 1.25px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}
.toolbar__status.is-visible { display: block; }

.viewtoggle { position: relative; display: flex; align-items: flex-end; }
.viewtoggle__btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.viewtoggle__btn svg { color: var(--black); width: 18px; }
.viewtoggle__btn svg > * { opacity: 0.25; transition: opacity 0.18s ease; }
.viewtoggle__btn:not(.is-active):hover svg > * { opacity: 0.5; }
.viewtoggle__btn.is-active svg > * { opacity: 1; }
.viewtoggle__btn.is-active svg > *:nth-child(1) { transition-delay: 0s; }
.viewtoggle__btn.is-active svg > *:nth-child(2) { transition-delay: 0.045s; }
.viewtoggle__btn.is-active svg > *:nth-child(3) { transition-delay: 0.09s; }
.viewtoggle__btn.is-active svg > *:nth-child(4) { transition-delay: 0.135s; }
.viewtoggle__btn.is-active svg > *:nth-child(5) { transition-delay: 0.18s; }
.viewtoggle__btn.is-active svg > *:nth-child(6) { transition-delay: 0.225s; }
.viewtoggle__line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 1px;
  background: var(--black);
  transform: translateX(0);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.viewtoggle--list .viewtoggle__line { transform: translateX(40px); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.card { display: block; width: 100%; }
.card__thumb {
  width: 100%;
  aspect-ratio: 212 / 336.46;
  background: var(--thumb);
  overflow: hidden;
  transition: filter 0.15s ease;
}
.card:hover .card__thumb { filter: brightness(0.97); }
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.list { display: flex; flex-direction: column; gap: 1px; }
.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  min-width: 0;
}
.toc-item__thumb { flex: 0 0 auto; width: 20px; height: 30px; background: var(--thumb); overflow: hidden; }
.toc-item__text {
  flex: 1 1 0;
  min-width: 0;
  font-weight: 300;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 1.25px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s ease;
}
.toc-item:hover .toc-item__text { opacity: 0.65; }
.toc-item__preview { color: var(--muted); }

.scroll-status { padding: 24px 0 8px; }
.empty { padding: 40px 0; color: var(--muted); }

.rail__rule { height: 1px; background: var(--line); width: 100%; }
.rail__controls { display: flex; flex-direction: column; gap: 20px; }

.search { display: flex; flex-direction: column; gap: 20px; }
.search__title { font-weight: 300; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; color: var(--black); }

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 45px;
  background: #fff;
  border-radius: 45px;
  padding: 0 22px 0 25px;
}
.searchbar__input {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-family: inherit;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 1.25px;
  line-height: 12px;
  color: var(--black);
}
.searchbar__input::placeholder { color: rgba(0, 0, 0, 0.4); opacity: 1; }
.searchbar__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--black);
}
.searchbar__icon svg { width: 16px; height: 16px; }
.searchbar__icon > svg:nth-child(2) { width: 12px; height: 12px; display: none; }
.searchbar.is-filled .searchbar__icon > svg:nth-child(1) { display: none; }
.searchbar.is-filled .searchbar__icon > svg:nth-child(2) { display: block; }
.searchbar--overlay .searchbar__icon > svg:nth-child(1) { display: none; }
.searchbar--overlay .searchbar__icon > svg:nth-child(2) { display: block; }

.filters { display: flex; flex-direction: column; gap: 20px; }
.filters__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.filters__title-wrap { display: inline-flex; align-items: baseline; gap: 8px; }
.filters__title { font-weight: 300; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; color: var(--black); }
.filters__clear { font-size: 11px; line-height: 1; color: var(--black); opacity: 0.55; }
.filters__clear:hover { opacity: 1; }
.filters__count { font-weight: 300; font-size: 12px; line-height: 22px; letter-spacing: 1.25px; color: var(--black); white-space: nowrap; }

.accordion { display: flex; flex-direction: column; gap: 20px; }
.accordion__item { display: flex; flex-direction: column; }
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.25px;
  color: var(--black);
}
.accordion__icon { width: 10px; height: 10px; position: relative; flex: 0 0 auto; }
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: var(--black);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.accordion__icon::before { width: 10px; height: 1px; }
.accordion__icon::after { width: 1px; height: 10px; transition: opacity 0.15s ease; }
.accordion__item.is-open .accordion__icon::after { opacity: 0; }

.accordion__panel {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel-inner { min-height: 0; }

.opt-list { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; }
.opt {
  font-weight: 300;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 1.25px;
  color: var(--black);
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}
.opt:hover { opacity: 0.65; }
.opt.is-selected .opt__label { text-decoration: underline; text-underline-offset: 3px; }
.opt__x { font-size: 11px; opacity: 0.6; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tag-bg);
  border-radius: 2px;
  padding: 6px 6px 5px;
  font-weight: 400;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 1.5px;
  color: var(--black);
  white-space: nowrap;
}
button.tag:hover { background: var(--tag-bg-active); }
.tag--link { transition: background 0.15s ease; }
.tag.is-selected { background: var(--tag-bg-active); }
.tag__x { font-size: 10px; opacity: 0.6; }

.app--detail { grid-template-columns: var(--col-side) minmax(0, 1fr); }

.detail-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 40px;
  min-width: 0;
}
.detail__back {
  display: inline-block;
  font-weight: 300;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.25px;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: 0 0 20px;
}
.email-shell {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 900px; /* hold space with the skeleton until the email loads + sizes */
}
.email-shell.is-loaded { min-height: 0; }
.detail__email {
  width: 100%;
  border: 0;
  background: #fff;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.email-shell.is-loaded .detail__email { opacity: 1; }

.email-skeleton {
  position: absolute;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  padding-bottom: 24px;
  transition: opacity 0.3s ease;
}
.email-shell.is-loaded .email-skeleton { opacity: 0; pointer-events: none; }
.email-skeleton__hero { flex: 0 0 60%; }
.email-skeleton__lines { display: flex; flex-direction: column; gap: 14px; padding: 4px 28px 0; }
.email-skeleton__line { height: 13px; border-radius: 3px; }
.email-skeleton__line--short { width: 55%; }
.email-skeleton__hero,
.email-skeleton__line {
  background: linear-gradient(100deg, #ececea 30%, #f7f7f5 50%, #ececea 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .email-skeleton__hero, .email-skeleton__line { animation: none; }
}
.detail__rule {
  width: 100%;
  max-width: 600px;
  height: 1px;
  background: var(--line);
  margin: 60px 0 40px;
}
.detail-modules {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.detail-meta { display: flex; flex-direction: column; gap: 20px; }
.detail-meta__eyebrow {
  font-weight: 300;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 1.25px;
  color: var(--black);
}
.detail-meta__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.shop { display: flex; flex-direction: column; gap: 40px; }
.shop__head { display: flex; align-items: center; justify-content: space-between; }
.shop__title { font-weight: 300; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; color: var(--ink); }
.shop__meta { font-weight: 300; font-size: 12px; line-height: 22px; letter-spacing: 1.25px; color: var(--black); }

.products { display: flex; flex-direction: column; gap: 18px; }
.product {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border-radius: 12px;
  height: 80px;
  padding: 5px;
}
.product__img { flex: 0 0 auto; width: 70px; height: 70px; background: var(--thumb); }
img.product__img { object-fit: contain; background: #fff; }
.product__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.product__name { font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: 1.25px; color: var(--black); }
.product__desc { font-weight: 300; font-size: 12px; line-height: 18px; letter-spacing: 1.25px; color: var(--black); }

.related { display: flex; flex-direction: column; gap: 20px; }
.related__title { font-weight: 400; font-size: 12px; line-height: 12px; letter-spacing: 1.25px; color: var(--black); }
.related__list { display: flex; flex-direction: column; gap: 1px; }

.detail-footer { display: flex; flex-direction: column; gap: 20px; }
.detail-footer__logo { width: 32px; height: 52px; margin-bottom: 20px; }
.detail-footer__head { font-weight: 400; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; color: var(--black); }
.detail-footer__copy { font-weight: 300; font-size: 14px; line-height: 24px; letter-spacing: 1.25px; color: var(--ink); }

.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .overlay { transition: none; }
}
.overlay__head { display: flex; align-items: flex-start; justify-content: space-between; }
.overlay__close {
  align-self: flex-end;
  display: flex;
  width: 40px;
  height: 40px;
  margin: -12px -12px 0 0;
}
.overlay__close img { width: 40px; height: 40px; }
.overlay .toolbar__chips {
  flex: 0 1 auto;
  flex-wrap: wrap;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.search-overlay__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 22px;
  display: flex;
  flex-direction: column;
  /* Approximates the Figma "Glass" effect: low Frost (9) → light blur;
     Light 80°/80% → diagonal specular sheen; Refraction/Dispersion → saturate + brightness. */
  background: linear-gradient(
    108deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.06) 56%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-backdrop-filter: blur(3px) saturate(1.7) brightness(0.9);
  backdrop-filter: blur(3px) saturate(1.7) brightness(0.9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .search-overlay__panel { background: rgba(242, 242, 238, 0.92); }
}
.search-overlay.is-open .search-overlay__panel { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .search-overlay__panel { transition: none; }
}
.search-overlay__spacer { flex: 1 1 0; }
.search-overlay__results-wrap { flex: 1 1 0; display: flex; align-items: center; justify-content: center; }
.search-overlay__results {
  text-align: center;
  font-weight: 300;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 1.25px;
  color: var(--black);
}

@media (max-width: 920px) {
  :root { --col-side: 260px; --gap: 28px; }
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
    padding: 0 22px;
  }
  .rail { position: static; height: auto; }
  .rail--left { padding: 30px 0 0; gap: 24px; }
  .rail--right { display: none; }
  .left__spacer { display: none; }
  .sdot { display: none; }

  .center { padding-top: 0; max-width: none; }
  .toolbar {
    padding-top: 20px;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 16px;
  }
  .toolbar__left-mobile { order: 1; display: inline-flex; align-items: center; gap: 2px; height: 40px; }
  .viewtoggle { order: 2; }
  .toolbar .toolbar__status, .toolbar__status.is-visible { display: none; }
  .toolbar .toolbar__chips {
    order: 3;
    flex: 0 0 calc(100% + 24px);
    margin: 0 -12px;
  }
  .toolbar__chips:empty { display: none; }

  .searchbar__input { font-size: 16px; }

  .iconbtn {
    width: 40px;
    height: 40px;
    background: #ebe9e2;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .iconbtn svg { width: 18px; color: var(--black); }
  .filterbtn { position: relative; }
  .filterbtn svg { width: 15px; }
  .filterbtn__count {
    position: absolute;
    top: 4px;
    right: 6px;
    font-weight: 400;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0;
  }

  .grid { grid-template-columns: repeat(3, 1fr); margin: 0 -22px; }
  .list { margin: 0 -12px; }

  .app--detail { display: flex; flex-direction: column; gap: 20px; padding: 30px 22px 60px; }
  .app--detail > .rail,
  .app--detail > .detail-main { display: contents; }
  .app--detail .brand,
  .app--detail .mailing,
  .app--detail .detail__rule { display: none; }

  .app--detail .detail__back { order: 1; display: block; width: 100%; text-align: center; margin: 0; }
  .app--detail .detail-meta { order: 2; align-items: center; text-align: center; }
  .app--detail .detail-meta__tags { justify-content: center; }
  .app--detail .email-shell {
    order: 3;
    width: 100%;
    max-width: none;
  }
  .app--detail .detail-modules { order: 4; max-width: none; }
  .app--detail .related__title { text-align: center; }
  .app--detail .detail-meta,
  .app--detail .detail-modules,
  .app--detail .shop,
  .app--detail .related { width: 100%; min-width: 0; }
}
