* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 30;

  height: 74px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;

  align-items: center;

  gap: 22px;

  padding: 0 28px;

  border-bottom: 1px solid var(--line);

  background: rgba(247, 247, 245, 0.88);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;

  gap: 10px;

  width: max-content;

  font-family: var(--serif);

  font-size: 18px;
  font-weight: 700;

  letter-spacing: -0.02em;
}

.brand-logo {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border: 1.5px solid var(--text);

  border-radius: 9px;

  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;

  gap: 26px;
}

.nav-link {
  color: var(--muted);

  font-size: 13px;

  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.bean-button {
  justify-self: end;

  display: flex;
  align-items: center;

  gap: 9px;

  padding: 10px 14px;

  border: 1px solid var(--line-strong);

  border-radius: 999px;

  background: var(--surface);

  color: var(--text);

  font-size: 12px;
  font-weight: 600;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.bean-button:hover {
  transform: translateY(-1px);

  border-color: var(--line-strong);

  box-shadow: var(--shadow);
}

.bean-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--text);
}


/* =========================================================
   MAIN
   ========================================================= */

main {
  width: 100%;
  max-width: var(--max);

  margin: 0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 100px 24px 70px;

  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;

  color: var(--muted);

  font:
    500 10px/1 var(--mono);

  letter-spacing: 0.13em;
}

.hero h1,
.section h2,
.modal h2 {
  margin: 0;

  font-family: var(--serif);

  letter-spacing: -0.045em;

  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 74px);
}

.hero h1 span {
  color: #7b7c77;
}

.hero-text {
  max-width: 650px;

  margin: 22px auto 30px;

  color: var(--muted);

  font-size: 15px;

  line-height: 1.7;
}


/* =========================================================
   HERO SEARCH — PILL
   ========================================================= */

.hero-search {
  width: min(680px, 100%);
  height: 62px;

  margin: 0 auto;

  display: flex;
  align-items: center;

  gap: 11px;

  padding: 0 17px;

  background: var(--surface);

  border: 1px solid var(--line-strong);

  border-radius: 999px;

  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.035);

  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.hero-search:focus-within {
  border-color: #bdbdb5;

  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.06);

  transform: translateY(-1px);
}

.search-symbol {
  flex: 0 0 auto;

  width: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #898a84;

  font-size: 21px;

  line-height: 1;
}

.hero-search input {
  width: 100%;

  min-width: 0;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 14px;
}

.hero-search input::placeholder {
  color: #9b9c96;
}

.hero-search kbd {
  flex: 0 0 auto;

  min-width: 28px;
  height: 28px;

  display: grid;
  place-items: center;

  padding: 0 7px;

  border: 1px solid var(--line);

  border-radius: 8px;

  background: var(--surface-soft);

  color: var(--muted);

  font:
    10px var(--mono);
}

.specs {
  margin-top: 14px;

  display: flex;
  justify-content: center;

  gap: 9px;

  color: #8d8e88;

  font:
    10px var(--mono);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  padding: 48px 24px 85px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;

  gap: 20px;

  margin-bottom: 22px;
}

.section-head.simple {
  margin-bottom: 18px;
}

.section h2 {
  font-size: 32px;
}


/* =========================================================
   LIBRARY SEARCH — PILL
   ========================================================= */

.mini-search {
  width: 230px;
  height: 42px;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 0 13px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 999px;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.mini-search:focus-within {
  border-color: var(--line-strong);

  box-shadow:
    0 5px 20px rgba(0, 0, 0, 0.035);
}

.mini-search .search-symbol {
  width: 18px;

  font-size: 18px;
}

.mini-search input {
  width: 100%;

  min-width: 0;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 12px;
}

.mini-search input::placeholder {
  color: #9b9c96;
}


/* =========================================================
   FILTERS
   ========================================================= */

.filters {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  margin-bottom: 22px;
}

.filter {
  padding: 8px 12px;

  border: 1px solid var(--line);

  border-radius: 999px;

  background: transparent;

  color: var(--muted);

  font-size: 11px;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.filter:hover {
  background: var(--surface);

  color: var(--text);

  border-color: var(--line-strong);

  transform: translateY(-1px);
}

.filter.active {
  background: var(--text);

  color: #fff;

  border-color: var(--text);
}


/* =========================================================
   ICON GRID
   ========================================================= */

.icon-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 12px;
}

.icon-card {
  min-height: 158px;

  padding: 18px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  text-align: left;

  color: var(--text);

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 15px;

  appearance: none;

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.icon-card:hover {
  transform: translateY(-3px);

  border-color: var(--line-strong);

  box-shadow: var(--shadow);
}

.icon-card:focus-visible {
  outline: 2px solid var(--text);

  outline-offset: 2px;
}

.icon-draw {
  height: 95px;

  display: grid;
  place-items: center;
}

.icon-draw svg {
  width: 48px;
  height: 48px;

  transition:
    transform 0.16s ease;
}

.icon-card:hover .icon-draw svg {
  transform: scale(1.06);
}

.icon-title {
  font-size: 12px;

  font-weight: 600;
}

.icon-category {
  margin-top: 4px;

  font-size: 10px;

  color: var(--muted);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty {
  min-height: 170px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 5px;

  border: 1px dashed var(--line-strong);

  border-radius: 15px;

  color: var(--muted);

  font-size: 12px;
}


/* =========================================================
   COLLECTIONS
   ========================================================= */

.collection-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 12px;
}

.collection-card {
  display: grid;

  grid-template-columns:
    46px 1fr auto;

  align-items: center;

  gap: 13px;

  padding: 18px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 15px;
}

.collection-mark {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);

  border-radius: 11px;

  font-size: 20px;
}

.collection-card h3 {
  margin: 0;

  font-size: 13px;
}

.collection-card p {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 11px;

  line-height: 1.5;
}

.collection-card small {
  font: 9px var(--mono);

  color: var(--muted);
}


/* =========================================================
   PRICING
   ========================================================= */

.pricing {
  display: grid;

  grid-template-columns: 1fr 300px;

  align-items: center;

  gap: 30px;

  border-top: 1px solid var(--line);

  border-bottom: 1px solid var(--line);
}

.price-box {
  padding: 21px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 15px;
}

.price {
  margin: 9px 0 17px;

  font:
    700 34px var(--serif);

  letter-spacing: -0.04em;
}

.price small {
  font:
    11px var(--sans);

  color: var(--muted);

  font-weight: 400;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.dark-button,
.light-button {
  padding: 11px 14px;

  border-radius: 11px;

  font-size: 12px;

  font-weight: 600;

  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.dark-button {
  background: #111;

  color: #fff;

  border: 1px solid #111;
}

.light-button {
  background: var(--surface);

  color: var(--text);

  border: 1px solid var(--line-strong);
}

.dark-button:hover {
  opacity: .9;

  transform: translateY(-1px);
}

.light-button:hover {
  background: var(--surface-soft);

  transform: translateY(-1px);
}

.full {
  width: 100%;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  max-width: var(--max);

  margin: auto;

  padding: 25px 24px;

  display: flex;

  justify-content: space-between;

  gap: 20px;

  border-top: 1px solid var(--line);

  font-size: 10px;

  color: var(--muted);
}


/* =========================================================
   OVERLAY
   ========================================================= */

.overlay {
  position: fixed;

  inset: 0;

  z-index: 60;

  display: grid;

  place-items: center;

  padding: 18px;

  background: rgba(12, 12, 12, .35);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}


/* =========================================================
   ICON DETAIL MODAL
   ========================================================= */

.modal {
  position: relative;

  width: min(900px, 100%);

  background: var(--surface);

  border: 1px solid rgba(255,255,255,.8);

  border-radius: 22px;

  box-shadow:
    0 30px 100px rgba(0,0,0,.18);
}

.icon-modal {
  max-height:
    min(
      900px,
      calc(100vh - 36px)
    );

  overflow-y: auto;

  padding: 26px;
}

.close {
  position: absolute;

  z-index: 2;

  right: 12px;
  top: 10px;

  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: var(--muted);

  font-size: 26px;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.close:hover {
  background: var(--surface-soft);

  color: var(--text);
}

.detail-layout {
  display: grid;

  grid-template-columns:
    1.05fr .95fr;

  gap: 24px;

  align-items: stretch;
}


/* =========================================================
   DETAIL PREVIEW
   ========================================================= */

.detail-preview {
  display: flex;

  flex-direction: column;

  gap: 10px;
}

.preview {
  min-height: 360px;

  display: grid;

  place-items: center;

  background: var(--bg);

  border: 1px solid var(--line);

  border-radius: 18px;
}

.preview svg {
  width: 132px;
  height: 132px;

  color: var(--text);
}

.preview-meta {
  display: flex;

  justify-content: center;

  gap: 8px;

  color: var(--muted);

  font:
    10px var(--mono);
}


/* =========================================================
   DETAIL CONTENT
   ========================================================= */

.detail-content {
  display: flex;

  flex-direction: column;

  padding: 8px 2px;
}

.detail-content h2 {
  margin: 0;

  font-size: 42px;

  line-height: 1;

  letter-spacing: -.05em;
}

.detail-description {
  margin: 15px 0 20px;

  max-width: 420px;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.7;
}


/* =========================================================
   DETAIL TAGS
   ========================================================= */

.tags {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin-bottom: 24px;
}

.tag {
  padding: 7px 9px;

  border: 1px solid var(--line);

  border-radius: 999px;

  background: var(--surface);

  color: var(--muted);

  font-size: 9px;
}


/* =========================================================
   DETAIL SPECS
   ========================================================= */

.detail-specs {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  margin-bottom: 18px;

  border-top: 1px solid var(--line);

  border-bottom: 1px solid var(--line);
}

.spec-item {
  display: flex;

  flex-direction: column;

  gap: 5px;

  padding: 12px 0;

  border-bottom: 1px solid var(--line);
}

.spec-item:nth-child(odd) {
  padding-right: 14px;

  border-right: 1px solid var(--line);
}

.spec-item:nth-child(even) {
  padding-left: 14px;
}

.spec-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.spec-item span {
  color: var(--muted);

  font:
    9px var(--mono);

  text-transform: uppercase;

  letter-spacing: .08em;
}

.spec-item strong {
  font-size: 11px;

  font-weight: 600;
}


/* =========================================================
   DETAIL ACTIONS
   ========================================================= */

.actions {
  display: flex;

  gap: 9px;
}


/* =========================================================
   CODE SECTION
   ========================================================= */

.code-section {
  margin-top: 24px;

  padding-top: 20px;

  border-top: 1px solid var(--line);
}

.code-tabs {
  display: flex;

  gap: 4px;

  margin-bottom: 8px;
}

.code-tab {
  padding: 7px 11px;

  border: 0;

  border-radius: 8px;

  background: transparent;

  color: var(--muted);

  font:
    10px var(--mono);
}

.code-tab:hover {
  background: var(--surface-soft);

  color: var(--text);
}

.code-tab.active {
  background: var(--surface-soft);

  color: var(--text);
}

.code {
  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: 13px;
}

.code-head {
  display: flex;

  justify-content: space-between;

  padding: 10px 12px;

  background: var(--surface-soft);

  color: var(--muted);

  font:
    9px var(--mono);
}

.code pre {
  margin: 0;

  min-height: 145px;

  max-height: 250px;

  padding: 15px;

  overflow: auto;

  background: #111;

  color: #eee;

  font:
    10px/1.6 var(--mono);

  white-space: pre-wrap;

  word-break: break-word;
}


/* =========================================================
   BEAN MODAL
   ========================================================= */

.bean-modal {
  width: min(410px, 100%);

  padding: 32px;
}

.bean-mark {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  margin-bottom: 18px;

  border: 1.5px solid #111;

  border-radius: 12px;

  font:
    700 15px var(--serif);
}

.bean-modal h2 {
  margin: 0 0 9px;

  font-size: 29px;
}

.bean-modal > .muted {
  margin: 0;

  font-size: 12px;
}

#beanForm {
  display: grid;

  gap: 12px;

  margin-top: 19px;
}

#beanForm label {
  display: grid;

  gap: 6px;

  color: var(--muted);

  font-size: 10px;

  font-weight: 600;
}

#beanForm input {
  height: 43px;

  padding: 0 11px;

  border: 1px solid var(--line-strong);

  border-radius: 10px;

  outline: 0;

  background: var(--bg);

  color: var(--text);

  font-size: 12px;
}

#beanForm input:focus {
  border-color: #111;
}

.notice {
  margin-top: 12px;

  color: #969791;

  font:
    9px var(--mono);
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;

  left: 50%;
  bottom: 22px;

  z-index: 90;

  transform: translateX(-50%);

  padding: 9px 13px;

  background: #111;

  color: #fff;

  border-radius: 9px;

  font-size: 11px;

  box-shadow:
    0 10px 25px rgba(0,0,0,.2);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 920px) {

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

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

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

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

  .preview {
    min-height: 300px;
  }
}


@media (max-width: 700px) {

  .header {
    grid-template-columns: 1fr auto;

    height: 67px;

    padding: 0 14px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-search {
    height: 58px;
  }

  .section-head {
    align-items: flex-start;

    flex-direction: column;
  }

  .mini-search {
    width: 100%;
  }

  .icon-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

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

  .preview {
    min-height: 250px;
  }

  .preview svg {
    width: 95px;
    height: 95px;
  }

  .detail-content h2 {
    font-size: 34px;
  }

  .detail-description {
    font-size: 12px;
  }

  .actions {
    width: 100%;
  }

  .actions button {
    flex: 1;
  }

  .code pre {
    max-height: 190px;
  }

  .footer {
    flex-direction: column;

    gap: 7px;
  }
}
