/* =========================================================
   SeeEnglish — static official site
   Layers on top of the app design system in base.css.
   UI colours stay solid; the ambient background is the only
   place gradients are allowed.
   ========================================================= */

@font-face {
  font-family: 'Manrope Variable';
  src: url('./assets/fonts/manrope-latin.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader Variable';
  src: url('./assets/fonts/newsreader-latin.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader Variable';
  src: url('./assets/fonts/newsreader-latin-italic.woff2') format('woff2-variations');
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

body {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: middle;
}

.icon--small {
  width: 15px;
  height: 15px;
}

.icon--tiny {
  width: 12px;
  height: 12px;
}

.site {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 48;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.55);
  background: rgba(245, 250, 255, 0.7);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

.site-header .brand {
  text-decoration: none;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.site-edition {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 580;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.site-header__divider {
  width: 1px;
  height: 17px;
  background: var(--line);
}

.site-source-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.site-source-mini:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 100, 221, 0.18);
  background: rgba(255, 255, 255, 0.68);
}

.site-source-mini .icon--small {
  opacity: 0.6;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* Page structure */
.site-main {
  position: relative;
  z-index: 5;
}

.site-section {
  position: relative;
  min-height: 100svh;
  padding: clamp(104px, 13vh, 144px) clamp(20px, 4vw, 56px) clamp(112px, 14vh, 150px);
  scroll-margin-top: 0;
}

.site-home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 102px;
  padding-bottom: 108px;
}

.home-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1030px;
  text-align: center;
}

.site-eyebrow {
  margin-bottom: 24px;
}

.home-title {
  color: var(--ink);
  font-size: clamp(50px, 6.7vw, 88px);
  font-weight: 720;
  letter-spacing: -0.068em;
  line-height: 1.02;
}

.home-title .accent,
.source-title .accent {
  color: var(--accent);
}

.home-copy {
  max-width: 690px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 440;
  line-height: 1.9;
}

.home-search {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 800px;
  margin-top: 34px;
}

.home-search .search-field {
  height: 68px;
}

.home-search .search-field input {
  font-size: 19px;
}

.home-search .capture-button {
  width: 152px;
  flex-basis: 152px;
  height: 68px;
  gap: 9px;
}

.try-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
  color: var(--faint);
  font-size: 9.5px;
}

.try-row__label {
  margin-right: 2px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.try-chip {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.3;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.try-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 100, 221, 0.2);
  background: rgba(255, 255, 255, 0.68);
}

.try-row__hint {
  margin-left: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.home-facets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(640px, 100%);
  margin-top: 39px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.home-facet {
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-template-rows: auto auto;
  column-gap: 5px;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}

.home-facet:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-facet > span {
  grid-row: 1 / 3;
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.home-facet p {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 680;
}

.home-facet small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 36px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--accent);
}

.scroll-cue__line {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
}

/* Section heading */
.section-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 34px;
}

.section-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 560;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 38px;
  margin-top: 20px;
}

.section-title {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(37px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.12;
}

.section-title em {
  color: var(--accent);
  font-style: normal;
  font-weight: 560;
}

.section-copy {
  max-width: 390px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

/* Demo */
.site-experience {
  padding-top: clamp(110px, 14vh, 150px);
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}

.demo-shell {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background: rgba(250, 253, 255, 0.5);
  box-shadow:
    0 34px 80px rgba(31, 70, 124, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

.demo-chrome {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  border-radius: 27px 27px 0 0;
  background: rgba(255, 255, 255, 0.3);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.demo-dots {
  display: inline-flex;
  gap: 4px;
  margin-right: 14px;
}

.demo-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(41, 85, 139, 0.16);
}

.demo-dots i:first-child {
  background: rgba(189, 75, 75, 0.34);
}

.demo-dots i:nth-child(2) {
  background: rgba(207, 139, 53, 0.38);
}

.demo-dots i:nth-child(3) {
  background: rgba(61, 155, 119, 0.36);
}

.demo-chrome__title {
  flex: 1;
}

.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 7px;
}

.demo-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 155, 119, 0.1);
}

.demo-body {
  padding: clamp(16px, 2.6vw, 28px);
}

.demo-page.add-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
}

.demo-page .search-zone {
  max-width: none;
}

.demo-page .search-field {
  height: 61px;
  background: rgba(255, 255, 255, 0.7);
}

.demo-page .search-field input {
  font-size: 18px;
}

.demo-page .capture-button {
  width: 112px;
  flex-basis: 112px;
  height: 61px;
  border-radius: 18px;
}

.demo-page .search-caption {
  margin-top: 11px;
  padding-left: 4px;
  text-align: left;
  font-size: 8px;
}

.demo-page .match-panel {
  top: calc(100% + 8px);
}

.demo-page .composer-wrap {
  max-width: none;
  margin-top: 17px;
}

.demo-page .composer-intro {
  margin-bottom: 10px;
}

.demo-page .composer-card {
  padding: 20px;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 16px 34px rgba(31, 70, 124, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.demo-page .composer-word {
  font-size: 30px;
}

.demo-page .composer-head {
  margin-bottom: 17px;
  padding-bottom: 15px;
}

.demo-page .composer-grid {
  gap: 16px;
  margin-top: 16px;
}

.demo-page .composer-actions {
  margin-top: 18px;
  padding-top: 15px;
}

.demo-page .save-success {
  max-width: none;
  margin-top: 17px;
  padding: 30px 20px;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow:
    0 16px 34px rgba(31, 70, 124, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.demo-page .save-success__mark {
  width: 52px;
  height: 52px;
}

.demo-page .save-success__word {
  font-size: 42px;
}

.demo-page .save-success__actions {
  margin-top: 20px;
}

.demo-page .search-field__kbd {
  display: inline-flex;
}

.demo-page .search-field input:read-only {
  opacity: 0.78;
}

.demo-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 6px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

#demo-composer {
  width: 100%;
}

.relation-placeholder {
  padding: 2px 0;
  color: var(--faint);
  font-size: 9.5px;
}

.demo-page .save-success__mark .icon {
  width: 25px;
  height: 25px;
}

.demo-quick > span {
  margin-right: 4px;
  color: var(--faint);
}

.demo-quick button {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 11px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.demo-quick button:hover {
  border-color: rgba(31, 100, 221, 0.2);
  background: rgba(255, 255, 255, 0.75);
}

.demo-quick.is-hidden {
  display: none;
}

.demo-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-note {
  display: flex;
  gap: 11px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.33);
  box-shadow: 0 10px 26px rgba(31, 70, 124, 0.05);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.demo-note__index {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.demo-note h3 {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.45;
}

.demo-note p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.demo-note code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(31, 100, 221, 0.06);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.demo-keyboard {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--faint);
  font-size: 8.5px;
}

/* Interactive index */
.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.index-panel {
  padding: 17px;
  border-radius: var(--radius-xl);
}

.index-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.index-panel__top .library-search {
  width: 240px;
  height: 38px;
}

.index-content {
  max-height: 548px;
  overflow-y: auto;
  padding: 2px 2px 4px;
  overscroll-behavior: contain;
}

.index-content .word-card {
  background: rgba(255, 255, 255, 0.46);
}

.index-content .word-card:hover {
  background: rgba(255, 255, 255, 0.68);
}

.index-content .word-card.is-open {
  background: rgba(255, 255, 255, 0.74);
}

.index-content .word-card__main {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 15px;
}

.index-content .word-card__word {
  font-size: 22px;
}

.index-content .word-card__detail {
  padding: 16px;
}

.index-content .word-detail-grid {
  grid-template-columns: 1fr;
  gap: 15px;
}

.index-content .sentence-list {
  grid-template-columns: 1fr;
}

.index-content .sentence-card {
  min-height: 140px;
  padding: 18px;
}

.index-content .sentence-card__body p {
  font-size: 16px;
}

.index-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 12px 4px 2px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.index-panel__foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.index-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-card {
  position: relative;
  padding: 19px;
  border-radius: 19px;
}

.feature-card__num {
  position: absolute;
  top: 16px;
  right: 17px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.feature-card__icon {
  width: 28px;
  height: 28px;
  margin-bottom: 13px;
  color: var(--accent);
  opacity: 0.7;
}

.feature-card h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.72;
}

.feature-example {
  margin-top: 11px;
  padding-left: 10px;
  border-left: 1px solid rgba(31, 100, 221, 0.28);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.feature-chips span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--muted);
  font-size: 8px;
}

.review-teaser {
  padding: 19px;
  border-radius: 19px;
}

.review-teaser h3 {
  margin-top: 9px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 470;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.review-teaser p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.review-teaser__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.word-detail-block p,
.sentence-card__body p,
.word-card__note {
  overflow-wrap: anywhere;
}

/* Source */
.site-source {
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: clamp(110px, 14vh, 150px);
}

.source-shell {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.source-title {
  max-width: 900px;
  margin-top: 21px;
  color: var(--ink);
  font-size: clamp(46px, 6.6vw, 78px);
  font-weight: 710;
  letter-spacing: -0.068em;
  line-height: 1.02;
}

.source-copy {
  max-width: 590px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}

.source-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.6fr);
  margin-top: 30px;
  padding: clamp(22px, 3.5vw, 32px);
  border-radius: var(--radius-xl);
}

.source-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.source-card__badge .icon {
  width: 15px;
  height: 15px;
}

.source-card h3 {
  margin-top: 16px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 470;
  letter-spacing: -0.025em;
}

.source-card p {
  max-width: 540px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.source-link {
  text-decoration: none;
}

.source-card__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-left: 28px;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.source-card__label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.source-card__side code {
  margin: 12px 0;
  color: var(--accent-ink);
  font-family: var(--font-serif);
  font-size: 23px;
  font-style: italic;
  line-height: 1.25;
}

.source-card__note {
  color: var(--faint);
  font-size: 8.5px;
}

.source-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.source-stack > div {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
}

.source-stack > div:first-child {
  border-left: 0;
}

.source-stack span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.source-stack p {
  color: var(--muted);
  font-size: 9px;
}

.source-return {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
  color: var(--accent);
  border-bottom-color: rgba(31, 100, 221, 0.3);
}

.text-link--up .icon {
  transform: rotate(180deg);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
}

.brand__mark--small {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  border-radius: 8px;
}

.brand__mark--small .brand__letter {
  font-size: 17px;
}

.brand__mark--small .brand__dot {
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-width: 1px;
}

.site-footer p:last-child {
  color: var(--accent-ink);
  opacity: 0.55;
}

/* Dock anchors */
.dock__item {
  text-decoration: none;
}

/* Toast / no-script */
.site-toast {
  position: fixed;
  bottom: 108px;
  left: 50%;
  z-index: 90;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: var(--ink-deep);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(8, 24, 44, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.24s ease, transform 0.24s var(--ease);
}

.site-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-note {
  position: fixed;
  right: 20px;
  bottom: 112px;
  left: 20px;
  z-index: 95;
  padding: 10px 14px;
  border: 1px solid rgba(189, 75, 75, 0.2);
  border-radius: 10px;
  background: #fff6f6;
  color: var(--danger);
  font-size: 11px;
  text-align: center;
}

/* Reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(17px);
  transition:
    opacity 0.68s var(--ease),
    transform 0.68s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1180px) {
  .demo-layout {
    grid-template-columns: minmax(0, 1fr) 244px;
  }

  .index-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  }
}

@media (max-width: 1020px) {
  .demo-layout,
  .index-layout {
    grid-template-columns: 1fr;
  }

  .demo-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-keyboard {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .review-teaser {
    grid-column: 1 / -1;
  }

  .section-head__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .section-copy {
    max-width: 620px;
  }

  .index-content {
    max-height: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    height: 70px;
    padding: 0 18px;
  }

  .site-edition,
  .site-header__divider {
    display: none;
  }

  .home-title {
    font-size: clamp(44px, 10.5vw, 68px);
  }

  .home-copy {
    max-width: 520px;
    margin-top: 19px;
    font-size: 12.5px;
  }

  .home-copy .desktop-only {
    display: none;
  }

  .site-home {
    padding-top: 92px;
    padding-bottom: 104px;
  }

  .home-search {
    margin-top: 27px;
  }

  .home-search .search-field,
  .home-search .capture-button {
    height: 60px;
  }

  .home-search .capture-button {
    width: 130px;
    flex-basis: 130px;
    font-size: 12.5px;
  }

  .home-facets {
    margin-top: 30px;
  }

  .home-facet {
    padding: 0 12px;
  }

  .scroll-cue {
    margin-top: 27px;
  }

  .site-section {
    padding: 92px 18px 112px;
  }

  .section-title {
    font-size: clamp(34px, 7.7vw, 46px);
  }

  .demo-body {
    padding: 15px;
  }

  .demo-chrome {
    height: 38px;
    padding: 0 13px;
  }

  .demo-chrome__title {
    font-size: 6.8px;
  }

  .demo-page .composer-grid {
    grid-template-columns: 1fr;
  }

  .source-card {
    grid-template-columns: 1fr;
  }

  .source-card__side {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin: 23px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .source-card__side code {
    margin: 0;
    font-size: 19px;
  }

  .source-card__label {
    display: none;
  }

  .source-stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-stack > div:nth-child(3) {
    border-left: 0;
  }

  .source-stack > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .site-footer p:last-child {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .site-source-mini span {
    display: none;
  }

  .site-source-mini {
    width: 31px;
    padding: 0;
    justify-content: center;
  }

  .site-source-mini .icon--small {
    display: none;
  }

  .home-title {
    font-size: clamp(39px, 11vw, 54px);
    letter-spacing: -0.06em;
  }

  .home-copy {
    font-size: 11.5px;
    line-height: 1.85;
  }

  .home-search {
    gap: 7px;
  }

  .home-search .search-field {
    padding: 0 12px;
  }

  .home-search .search-field input {
    font-size: 16px;
  }

  .home-search .capture-button {
    width: 106px;
    flex-basis: 106px;
    padding: 0 8px;
    gap: 5px;
    font-size: 11.5px;
  }

  .home-search .capture-button .icon {
    width: 14px;
    height: 14px;
  }

  .try-row {
    gap: 5px;
    margin-top: 13px;
  }

  .try-chip {
    padding: 3px 7px;
    font-size: 11px;
  }

  .try-row__hint {
    display: none;
  }

  .home-facets {
    width: 100%;
    margin-top: 25px;
  }

  .home-facet {
    display: block;
    padding: 0 9px;
  }

  .home-facet > span {
    display: block;
    margin-bottom: 3px;
    padding-top: 0;
  }

  .home-facet p {
    font-size: 9.5px;
  }

  .home-facet small {
    font-size: 8px;
    line-height: 1.45;
  }

  .scroll-cue {
    margin-top: 24px;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-head__row {
    margin-top: 15px;
  }

  .section-title {
    font-size: clamp(31px, 9.2vw, 40px);
  }

  .section-copy {
    font-size: 11.5px;
  }

  .demo-side {
    grid-template-columns: 1fr;
  }

  .demo-keyboard {
    grid-column: auto;
  }

  .demo-chrome__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .demo-live {
    margin-left: 8px;
  }

  .demo-page .search-field {
    height: 56px;
  }

  .demo-page .capture-button {
    width: 92px;
    flex-basis: 92px;
    height: 56px;
    font-size: 11.5px;
  }

  .demo-page .search-field input {
    font-size: 16px;
  }

  .demo-page .search-field__kbd {
    display: none;
  }

  .demo-page .composer-card {
    padding: 16px;
  }

  .demo-page .composer-head {
    flex-direction: column;
    gap: 8px;
  }

  .demo-page .composer-word {
    font-size: 26px;
  }

  .demo-page .composer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-page .composer-actions__buttons {
    justify-content: flex-end;
  }

  .demo-quick {
    gap: 5px;
  }

  .index-panel {
    padding: 12px;
  }

  .index-panel__top {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .index-panel__top .library-search {
    width: 100%;
  }

  .index-content .word-card__main {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .index-content .word-card__word {
    font-size: 21px;
  }

  .index-content .word-card__meta > span:nth-child(2),
  .index-content .word-card__meta > span:nth-child(3) {
    display: none;
  }

  .index-content .word-card__detail {
    padding: 13px;
  }

  .index-content .word-card__number {
    font-size: 7px;
  }

  .index-side {
    grid-template-columns: 1fr;
  }

  .review-teaser {
    grid-column: auto;
  }

  .index-panel__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .source-title {
    font-size: clamp(40px, 11vw, 55px);
  }

  .source-copy {
    font-size: 11.5px;
  }

  .source-card {
    padding: 18px;
  }

  .source-card h3 {
    font-size: 27px;
  }

  .source-card__side {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .source-card__side code {
    font-size: 17px;
  }

  .source-card__note {
    width: 100%;
  }

  .source-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .source-actions .button {
    width: 100%;
  }

  .source-stack {
    grid-template-columns: 1fr;
  }

  .source-stack > div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .source-stack > div:first-child {
    border-top: 0;
  }

  .source-return {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer p:last-child {
    width: auto;
  }

  .site-toast {
    bottom: 92px;
    max-width: calc(100% - 32px);
    text-align: center;
  }
}

@media (max-width: 390px) {
  .home-title {
    font-size: 36px;
  }

  .home-facet small {
    display: none;
  }

  .home-search .capture-button {
    width: 94px;
    flex-basis: 94px;
  }

  .home-search .capture-button .icon {
    display: none;
  }

  .site-header {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .floater {
    animation: none;
  }
}
