/* Emoji Shelf: components. Built only from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--es-wash);
  color: var(--es-ink);
  font-family: var(--es-font-body);
  font-size: var(--es-text-body);
  line-height: 1.65;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--es-sky-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--es-font-head); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }

/* Layout */
.es-container { max-width: var(--es-container); margin: 0 auto; padding: 0 var(--es-space-5); }
.es-narrow { max-width: var(--es-narrow); margin: 0 auto; padding: 0 var(--es-space-5); }
.es-section { padding: var(--es-space-8) 0; }
.es-section--white { background: var(--es-white); }
.es-section--tight { padding: var(--es-space-7) 0; }
.es-center { text-align: center; }
.es-stack > * + * { margin-top: var(--es-space-4); }

/* Type */
.es-hero-title { font-size: var(--es-text-hero); font-weight: 900; line-height: 1.18; }
.es-h2 { font-size: var(--es-text-h2); font-weight: 900; }
.es-h3 { font-size: var(--es-text-h3); font-weight: 700; }
.es-lead { font-size: var(--es-text-lead); color: var(--es-soft); max-width: 600px; }
.es-center .es-lead { margin-left: auto; margin-right: auto; }
.es-small { font-size: var(--es-text-small); color: var(--es-soft); }
.es-mono { font-family: var(--es-font-mono); font-size: var(--es-text-small); }
.es-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--es-space-4); flex-wrap: wrap; margin-bottom: var(--es-space-6); }
.es-section-head h2 { display: flex; align-items: center; gap: var(--es-space-2); }
.es-help-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--es-faint); color: var(--es-white); font: 700 12px/18px var(--es-font-body); text-align: center; display: inline-block; }

/* Buttons */
.es-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--es-space-2);
  font: 700 15px/1 var(--es-font-body);
  padding: 12px 22px; border-radius: var(--es-radius-pill); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s;
}
.es-btn:hover { text-decoration: none; }
.es-btn:focus-visible { outline: none; box-shadow: var(--es-focus); }
.es-btn--primary { background: var(--es-sky); color: var(--es-white); }
.es-btn--primary:hover { background: var(--es-sky-deep); }
.es-btn--secondary { background: var(--es-white); color: var(--es-ink); border-color: var(--es-line-strong); }
.es-btn--secondary:hover { background: var(--es-wash); }
.es-btn--ghost { background: transparent; color: var(--es-sky-deep); padding-left: 0; padding-right: 0; }
.es-btn--sm { padding: 8px 16px; font-size: 14px; }
.es-btn--lg { padding: 16px 30px; font-size: 17px; }
.es-btn--block { width: 100%; }
.es-btn--social { background: var(--es-white); color: var(--es-ink); border-color: var(--es-line-strong); flex: 1; }
.es-letter { width: 22px; height: 22px; border-radius: 6px; background: var(--es-wash-2); font: 700 12px/22px var(--es-font-body); text-align: center; color: var(--es-ink); }
.es-arrow-link { font-weight: 600; font-size: var(--es-text-small); color: var(--es-sky-deep); white-space: nowrap; }

/* Nav */
.es-nav { background: var(--es-white); }
.es-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--es-space-4); height: 64px; }
.es-logo { display: inline-flex; align-items: center; gap: var(--es-space-2); font: 900 22px/1 var(--es-font-head); color: var(--es-ink); }
.es-logo:hover { text-decoration: none; }
.es-logo-mark { width: 26px; height: 26px; }
.es-nav-right { display: flex; align-items: center; gap: var(--es-space-3); }
.es-search {
  display: flex; align-items: center; gap: var(--es-space-2);
  border: var(--es-border); border-radius: var(--es-radius-sm); padding: 7px 12px; width: 260px;
  color: var(--es-faint); font-size: var(--es-text-small); background: var(--es-white);
}
.es-icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--es-soft); background: transparent; border: 0; }
.es-tabs { display: flex; gap: var(--es-space-6); border-bottom: var(--es-border); overflow-x: auto; scrollbar-width: none; }
.es-tab { padding: 10px 0 12px; font-weight: 700; font-size: 15px; color: var(--es-faint); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.es-tab:hover { text-decoration: none; color: var(--es-ink); }
.es-tab--active { color: var(--es-ink); border-bottom-color: var(--es-ink); }
.es-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--es-space-4); }

/* Emoji tile: the signature */
.es-tile {
  width: var(--es-tile); height: var(--es-tile); flex: none;
  background: var(--es-white); border-radius: var(--es-radius-tile);
  display: grid; place-items: center; font-size: 36px; line-height: 1;
}
.es-tile--lg { width: var(--es-tile-lg); height: var(--es-tile-lg); font-size: 58px; border-radius: 24px; }
.es-tile--sm { width: 48px; height: 48px; font-size: 24px; border-radius: 12px; }
.es-tile--wash { background: var(--es-wash); }
.es-tile--outline { border: var(--es-border); }

/* Feed items */
.es-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--es-space-6) var(--es-space-7); }
.es-item { display: flex; gap: var(--es-space-5); align-items: flex-start; color: inherit; }
.es-item:hover { text-decoration: none; }
.es-item:hover .es-item-title { color: var(--es-sky-deep); }
.es-item-title { font: 700 17px/1.5 var(--es-font-body); color: var(--es-ink); }
.es-meta { display: flex; align-items: center; gap: var(--es-space-2); flex-wrap: wrap; margin-top: var(--es-space-2); font-size: 13px; color: var(--es-soft); }
.es-meta b { color: var(--es-ink); font-weight: 600; }
.es-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--es-sun-soft); display: grid; place-items: center; font-size: 12px; flex: none; }
.es-avatar--lg { width: 44px; height: 44px; font-size: 22px; }
.es-like { display: inline-flex; align-items: center; gap: 3px; color: var(--es-faint); }
.es-like svg { width: 14px; height: 14px; }
.es-verified { width: 14px; height: 14px; color: var(--es-sky); }

/* Event strip */
.es-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--es-space-5); }
.es-event { display: flex; gap: var(--es-space-4); align-items: flex-start; color: inherit; }
.es-event:hover { text-decoration: none; }
.es-event-title { font-weight: 700; line-height: 1.45; margin-top: 6px; }
.es-event-date { font-family: var(--es-font-mono); font-size: var(--es-text-tiny); color: var(--es-soft); margin-top: 4px; }

/* Chips and badges */
.es-chip {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 7px; border: 1px solid var(--es-sky); color: var(--es-sky-deep);
  border-radius: var(--es-radius-chip); background: var(--es-white); white-space: nowrap;
}
.es-chip--fill { background: var(--es-sky-soft); border-color: var(--es-sky-soft); }
.es-chip--sun { background: var(--es-sun-soft); border-color: var(--es-sun); color: var(--es-ink); }
.es-pill-bar {
  display: inline-flex; align-items: center; gap: var(--es-space-3); background: var(--es-white);
  border-radius: var(--es-radius-pill); padding: 6px 8px 6px 6px; border: var(--es-border);
}
.es-pill-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--es-sun-soft); border-radius: var(--es-radius-pill); padding: 5px 12px 5px 8px; font-weight: 700; font-size: 13px; }
.es-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--es-sun); display: inline-block; }

/* Cards */
.es-card { background: var(--es-white); border-radius: var(--es-radius-card); padding: var(--es-space-6); }
.es-card--outline { border: var(--es-border); }
.es-card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--es-space-5); }
.es-card .es-tile { margin-bottom: var(--es-space-4); }
.es-card p { color: var(--es-soft); margin-top: var(--es-space-2); }

/* Hero */
.es-hero { background: var(--es-white); padding: var(--es-space-8) 0 var(--es-space-7); }
.es-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--es-space-7); align-items: center; }
.es-hero-actions { display: flex; gap: var(--es-space-3); flex-wrap: wrap; margin-top: var(--es-space-6); }
.es-shelf { display: grid; grid-template-columns: repeat(3, var(--es-tile-lg)); gap: var(--es-space-4); justify-content: center; padding: var(--es-space-6); background: var(--es-wash); border-radius: 28px; }
.es-shelf .es-tile:nth-child(2n) { transform: translateY(18px); }

/* Stats */
.es-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--es-space-5); }
.es-stat b { display: block; font: 900 36px/1.1 var(--es-font-head); }
.es-stat span { color: var(--es-soft); font-size: var(--es-text-small); }

/* Quote */
.es-quote { display: flex; gap: var(--es-space-5); align-items: flex-start; }
.es-quote blockquote { margin: 0; font: 700 22px/1.6 var(--es-font-head); }
.es-quote cite { display: block; margin-top: var(--es-space-3); font: 500 14px var(--es-font-body); color: var(--es-soft); font-style: normal; }

/* Pricing */
.es-toggle { display: inline-flex; background: var(--es-white); border: var(--es-border); border-radius: var(--es-radius-pill); padding: 4px; }
.es-toggle button { border: 0; background: transparent; padding: 8px 18px; border-radius: var(--es-radius-pill); font: 700 14px var(--es-font-body); color: var(--es-soft); cursor: pointer; white-space: nowrap; }
.es-toggle button[aria-pressed="true"] { background: var(--es-ink); color: var(--es-white); }
.es-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--es-space-5); align-items: start; }
.es-plan { background: var(--es-white); border-radius: var(--es-radius-card); padding: var(--es-space-6); border: 1px solid transparent; position: relative; }
.es-plan--featured { border: 2px solid var(--es-sky); }
.es-plan-head { display: flex; align-items: center; gap: var(--es-space-3); }
.es-price { font: 900 44px/1 var(--es-font-head); margin: var(--es-space-5) 0 var(--es-space-1); }
.es-price small { font: 500 15px var(--es-font-body); color: var(--es-soft); }
.es-plan .es-btn { margin: var(--es-space-5) 0; }
.es-list { list-style: none; padding: 0; margin: 0; }
.es-list li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; border-top: 1px dashed var(--es-line); }
.es-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 7px; border-left: 2px solid var(--es-sky); border-bottom: 2px solid var(--es-sky); transform: rotate(-45deg); }
.es-table-wrap { overflow-x: auto; background: var(--es-white); border-radius: var(--es-radius-card); }
.es-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15px; }
.es-table th, .es-table td { text-align: left; padding: 14px 18px; border-bottom: var(--es-border); }
.es-table th { font-weight: 700; background: var(--es-white); }
.es-table td:not(:first-child), .es-table th:not(:first-child) { text-align: center; }
.es-table tr:last-child td { border-bottom: 0; }
.es-yes { color: var(--es-sky); font-weight: 700; }
.es-no { color: var(--es-faint); }

/* FAQ */
.es-faq details { background: var(--es-white); border-radius: var(--es-radius-card); padding: 18px 22px; }
.es-section--white .es-faq details { background: var(--es-wash); }
.es-faq details + details { margin-top: var(--es-space-3); }
.es-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--es-space-4); }
.es-faq summary::-webkit-details-marker { display: none; }
.es-faq summary::after { content: "+"; color: var(--es-sky); font-size: 20px; line-height: 1; }
.es-faq details[open] summary::after { content: "−"; }
.es-faq details p { margin-top: var(--es-space-3); color: var(--es-soft); }

/* Article */
.es-article-head { background: var(--es-white); padding: var(--es-space-8) 0 var(--es-space-7); text-align: center; }
.es-article-head .es-tile--lg { margin: 0 auto var(--es-space-5); background: var(--es-wash); }
.es-article-title { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; line-height: 1.35; }
.es-article-meta { display: flex; justify-content: center; gap: var(--es-space-2); flex-wrap: wrap; margin-top: var(--es-space-5); }
.es-article-body { background: var(--es-white); border-radius: var(--es-radius-card); padding: var(--es-space-7); margin-top: var(--es-space-7); }
.es-prose { font-size: 17px; line-height: 1.9; }
.es-prose > * + * { margin-top: var(--es-space-5); }
.es-prose h2 { font-size: 24px; padding-bottom: var(--es-space-2); border-bottom: var(--es-border); margin-top: var(--es-space-7); }
.es-prose h3 { font-size: 19px; margin-top: var(--es-space-6); }
.es-prose ul { padding-left: 1.3em; }
.es-prose code { font-family: var(--es-font-mono); font-size: 0.88em; background: var(--es-wash); padding: 2px 6px; border-radius: 4px; }
.es-prose pre { background: var(--es-ink); color: var(--es-wash); padding: var(--es-space-5); border-radius: var(--es-radius-sm); overflow-x: auto; font: 14px/1.7 var(--es-font-mono); }
.es-prose pre code { background: none; padding: 0; color: inherit; }
.es-prose blockquote { margin: var(--es-space-6) 0; padding-left: var(--es-space-5); border-left: 4px solid var(--es-line-strong); color: var(--es-soft); }
.es-prose figure { margin: var(--es-space-6) 0; }
.es-prose figcaption { font-size: var(--es-text-small); color: var(--es-faint); text-align: center; margin-top: var(--es-space-2); }
.es-callout { display: flex; gap: var(--es-space-3); background: var(--es-sun-soft); border-radius: var(--es-radius-sm); padding: var(--es-space-4) var(--es-space-5); font-size: 15px; line-height: 1.7; }
.es-callout-icon { font-size: 20px; line-height: 1.4; }
.es-toc { position: sticky; top: var(--es-space-5); background: var(--es-white); border-radius: var(--es-radius-card); padding: var(--es-space-5); font-size: var(--es-text-small); }
.es-toc ol { margin: var(--es-space-3) 0 0; padding-left: 1.2em; color: var(--es-soft); }
.es-toc li + li { margin-top: 6px; }
.es-author-card { display: flex; gap: var(--es-space-4); align-items: center; border-top: var(--es-border); padding-top: var(--es-space-6); margin-top: var(--es-space-7); }
.es-reactions { display: flex; gap: var(--es-space-3); margin-top: var(--es-space-6); }
.es-reaction { display: inline-flex; align-items: center; gap: 6px; border: var(--es-border); border-radius: var(--es-radius-pill); padding: 6px 14px; font-weight: 700; font-size: 14px; background: var(--es-white); color: var(--es-soft); }

/* Forms */
.es-form > * + * { margin-top: var(--es-space-5); }
.es-field label { display: block; font-weight: 700; font-size: var(--es-text-small); margin-bottom: 6px; }
.es-input, .es-select {
  width: 100%; font: 400 16px var(--es-font-body); color: var(--es-ink);
  padding: 11px 14px; border: 1px solid var(--es-line-strong); border-radius: var(--es-radius-sm); background: var(--es-white);
}
.es-input:focus, .es-select:focus { outline: none; border-color: var(--es-sky); box-shadow: var(--es-focus); }
.es-input-wrap { position: relative; }
.es-input-wrap .es-input { padding-right: 64px; }
.es-input-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--es-sky-deep); font: 700 13px var(--es-font-body); cursor: pointer; }
.es-help { font-size: 13px; color: var(--es-soft); margin-top: 6px; }
.es-field--error .es-input { border-color: var(--es-danger); }
.es-error { font-size: 13px; color: var(--es-danger); margin-top: 6px; font-weight: 600; }
.es-check { display: flex; gap: var(--es-space-3); align-items: flex-start; font-size: var(--es-text-small); color: var(--es-soft); }
.es-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--es-sky); flex: none; }
.es-divider-text { display: flex; align-items: center; gap: var(--es-space-3); color: var(--es-faint); font-size: 13px; }
.es-divider-text::before, .es-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--es-line); }
.es-social-row { display: flex; gap: var(--es-space-3); }
.es-picker { display: flex; flex-wrap: wrap; gap: var(--es-space-2); }
.es-picker label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--es-line-strong); border-radius: var(--es-radius-pill); padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--es-white); margin: 0; }
.es-picker input { position: absolute; opacity: 0; pointer-events: none; }
.es-picker input:checked + label { border-color: var(--es-sky); background: var(--es-sky-soft); color: var(--es-sky-deep); }

/* Footer */
.es-footer { background: var(--es-white); border-top: var(--es-border); padding: var(--es-space-7) 0 var(--es-space-6); font-size: var(--es-text-small); }
.es-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--es-space-6); }
.es-footer h4 { font: 700 14px var(--es-font-body); margin-bottom: var(--es-space-3); }
.es-footer ul { list-style: none; margin: 0; padding: 0; }
.es-footer li + li { margin-top: 8px; }
.es-footer a { color: var(--es-soft); }
.es-footer-bottom { margin-top: var(--es-space-6); padding-top: var(--es-space-5); border-top: var(--es-border); color: var(--es-faint); display: flex; justify-content: space-between; gap: var(--es-space-4); flex-wrap: wrap; }

/* Responsive */
@media (max-width: 900px) {
  .es-hero-grid { grid-template-columns: 1fr; }
  .es-events, .es-card-row, .es-plans { grid-template-columns: 1fr; }
  .es-footer-grid { grid-template-columns: 1fr 1fr; }
  .es-search { display: none; }
}
@media (max-width: 680px) {
  .es-feed { grid-template-columns: 1fr; }
  .es-stats { grid-template-columns: 1fr; }
  .es-article-body { padding: var(--es-space-5); }
  .es-shelf { grid-template-columns: repeat(3, 76px); padding: var(--es-space-4); gap: var(--es-space-3); }
  .es-shelf .es-tile--lg { width: 76px; height: 76px; font-size: 38px; border-radius: 18px; }
  .es-item { gap: var(--es-space-4); }
  .es-tile:not(.es-tile--lg):not(.es-tile--sm) { --es-tile: 60px; font-size: 30px; }
  .es-social-row { flex-direction: column; }
  .es-section { padding: var(--es-space-7) 0; }
}
