:root {
  --ink: #20232b;
  --muted: #69717c;
  --line: #e5e7eb;
  --paper: #fff;
  --wash: #f6f7f9;
  --accent: #244ad6;
  --soft: #edf1ff;
  --yellow: #f1c94f;
  --radius: 18px;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  font-synthesis: none;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #6c8cff;
  outline-offset: 4px;
}
.word-comment {
  margin-top: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.word-comment-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.word-comment-heading label {
  font-size: 15px;
  font-weight: 600;
}
.word-comment-heading span {
  color: var(--muted);
  font-size: 13px;
}
.word-comment textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid #dfe2e8;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}
.word-comment textarea::placeholder {
  color: #8b929e;
}
.word-comment textarea:focus {
  border-color: #8096ed;
  outline: 3px solid #edf1ff;
  outline-offset: 1px;
}
[hidden] {
  display: none !important;
}
::selection {
  background: #e5eaff;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  background: #fff;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  height: 96px;
  max-width: 1440px;
  margin: auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-search-slot {
  display: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: 0.03em;
}
.brand-symbol {
  display: block;
  flex: none;
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.quiet-link {
  font-size: 14px;
  color: var(--muted);
}
.quiet-link span {
  margin-left: 12px;
}
.search-stage {
  max-width: 736px;
  margin: auto;
  padding: 24px 24px 32px;
  text-align: center;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 650;
  color: var(--muted);
}
.home-intro h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.065em;
  margin: 24px 0 32px;
}
.home-intro h1 span {
  color: var(--accent);
}
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  border: 1px solid #dfe2e8;
  border-radius: 18px;
  padding: 9px 10px 9px 24px;
  background: #fff;
  box-shadow: 0 5px 24px #182c5a07;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.search-form:focus-within {
  border-color: #8096ed;
  box-shadow: 0 5px 28px #244ad611;
}
.search-icon {
  width: 17px;
  height: 17px;
  border: 1.7px solid #838b99;
  border-radius: 50%;
  position: relative;
  flex: none;
}
.search-icon:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.7px;
  background: #838b99;
  right: -5px;
  bottom: -3px;
  transform: rotate(45deg);
}
.search-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 17px;
  color: var(--ink);
}
.search-form input:focus-visible {
  outline: 0;
}
.search-form input::placeholder {
  color: #8b929e;
}
.search-submit {
  flex: none;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  min-height: 44px;
}
.search-submit span {
  margin-left: 18px;
}
.search-submit:hover {
  background: #1939b1;
}
.home-preview {
  max-width: 736px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
#home-preview-sentence {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.8;
  letter-spacing: -0.02em;
  color: var(--muted);
}
#home-preview-sentence .word-link {
  border: 0;
}
.home-preview-line {
  display: block;
}
.home-preview-stage {
  margin-top: 16px;
  min-height: 290px;
}
#home-preview-mount {
  width: 390px;
  max-width: 100%;
  margin-inline: auto;
}
.home-preview-status {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.home-preview-status button {
  margin-left: 8px;
}
.site-footer {
  max-width: 1320px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer > a {
  font-size: 13px;
}
.reading-shell {
  max-width: 1000px;
  margin: 0 auto 96px;
  padding: 0 32px;
  min-height: 48vh;
}
.is-reading .home-intro,
.is-reading #about {
  display: none;
}
.is-reading .search-stage {
  display: none;
}
.is-reading .site-header {
  height: 80px;
  display: grid;
  grid-template-columns: auto minmax(0, 760px) auto;
  column-gap: clamp(24px, 4vw, 64px);
}
.is-reading .header-search-slot {
  display: block;
  width: 100%;
}
.is-reading .header-search-slot .search-form {
  gap: 12px;
  border-radius: 14px;
  padding: 5px 7px 5px 16px;
  box-shadow: 0 3px 16px #182c5a08;
}
.is-reading .header-search-slot .search-form input {
  min-height: 34px;
  font-size: 15px;
}
.is-reading .header-search-slot .search-submit {
  min-height: 36px;
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 13px;
}
.is-reading .header-search-slot .search-submit span {
  margin-left: 12px;
}
.is-reading .reading-shell {
  padding-top: clamp(40px, 5vw, 64px);
}
.suggestions {
  list-style: none;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  margin: 0;
  z-index: 10;
  box-shadow: 0 14px 40px #1c2e5018;
  max-height: 360px;
  overflow: auto;
}
.suggestions li {
  padding: 10px 14px;
  border-radius: 9px;
  display: flex;
  gap: 18px;
  cursor: pointer;
  align-items: baseline;
}
.suggestions li[aria-selected="true"],
.suggestions li:hover {
  background: var(--soft);
}
.suggestions li strong {
  font-size: 18px;
}
.suggestions li span {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice {
  max-width: 700px;
  margin: 16px auto;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--soft);
  color: #24408c;
}
.word-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 12px;
}
.word-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 66px);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0;
  overflow-wrap: anywhere;
}
.pronunciation {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
}
.pronunciation em {
  font-style: normal;
  font-size: 12px;
  margin-right: 8px;
  letter-spacing: 0.06em;
}
.subtle-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 9px 14px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.word-caption {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0;
}
.sense {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.sense.no-image {
  grid-template-columns: 1fr;
}
.sense-copy {
  min-width: 0;
}
.sense-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.sense-number {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #8a93a2;
}
.sense h2 {
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: -0.025em;
  font-weight: 650;
  margin: 4px 0;
}
.sense-description {
  font-size: 18px;
  line-height: 1.55;
  margin: 6px 0;
  max-width: 650px;
}
.sense-usage {
  font-style: italic;
  color: var(--muted);
}
.word-link {
  border-bottom: 1px dotted #bfc6d5;
  border-radius: 2px;
}
.word-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #f2f5ff;
}
/* Ordinary UI prose keeps its typography; lookup affordance appears on hover. */
.page-word-link {
  color: inherit;
  text-decoration: none;
  border-bottom-color: transparent;
}
.page-word-link:hover,
.page-word-link:focus-visible {
  border-bottom-color: var(--accent);
}
.sense figure {
  margin: 0;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px;
  align-items: start;
}
.sense img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #faf9f5;
}
.sense figcaption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.image-unavailable {
  border: 1px dashed var(--line);
  padding: 24px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}
.word-extras {
  padding: 28px 0;
}
.word-extras h2 {
  font-size: 15px;
  font-weight: 600;
}
.word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.word-chip {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 15px;
  background: #fff;
}
.word-chip small {
  margin-left: 8px;
  color: var(--muted);
}
.results-heading {
  margin: 0 0 24px;
}
.results-heading h1 {
  font-size: 28px;
  font-weight: 550;
}
.results-heading p,
.empty p {
  color: var(--muted);
}
.results-list {
  list-style: none;
  padding: 0;
}
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.result-row > .result-copy {
  flex: 1;
}
.result-row strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}
.result-row p {
  margin: 3px 0;
  color: var(--muted);
}
.result-row button {
  border: 0;
  border-radius: 8px;
  background: var(--wash);
  padding: 9px 14px;
  font-size: 14px;
  min-height: 44px;
}
.empty {
  padding: 40px 0;
}
.empty h1 {
  font-size: 30px;
  font-weight: 500;
}
.loading {
  padding: 40px 0;
  color: var(--muted);
}
@media (max-width: 700px) {
  .site-header {
    height: auto;
    min-height: 80px;
    padding: 20px 24px;
    flex-wrap: wrap;
  }
  .search-stage {
    padding: 54px 24px 48px;
  }
  .home-intro h1 {
    font-size: 38px;
  }
  .eyebrow {
    font-size: 11px;
  }
  .search-form {
    padding-left: 17px;
    gap: 12px;
  }
  .search-submit {
    padding: 10px 14px;
  }
  .search-submit span {
    display: none;
  }
  .search-form input {
    font-size: 16px;
  }
  .home-preview {
    margin-bottom: 60px;
  }
  .site-footer {
    margin: 0 24px;
    padding: 24px 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .site-footer > span:nth-child(2) {
    display: none;
  }
  .site-footer > a {
    margin-left: auto;
  }
  .reading-shell {
    padding: 0 24px;
  }
  .is-reading .search-stage {
    display: none;
  }
  .word-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .sense {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .sense figure {
    max-width: 420px;
  }
  .sense h2 {
    font-size: 28px;
  }
  .sense-description {
    font-size: 17px;
  }
  .result-row {
    gap: 12px;
  }
  .pronunciation {
    gap: 10px;
  }
  .subtle-button {
    padding: 8px 10px;
  }
}
@media (max-width: 900px) {
  .is-reading .site-header {
    height: auto;
    min-height: 0;
    padding-block: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand nav"
      "search search";
    gap: 12px 20px;
  }
  .is-reading .brand {
    grid-area: brand;
  }
  .is-reading .header-search-slot {
    grid-area: search;
  }
  .is-reading .product-nav {
    grid-area: nav;
  }
  .is-reading .reading-shell {
    padding-top: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.product-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
@media (max-width: 500px) {
  .product-nav {
    gap: 14px;
  }
  .is-reading .site-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "nav" "search";
  }
  .is-reading .product-nav {
    justify-self: end;
  }
  .product-nav .quiet-link {
    font-size: 13px;
  }
}

/* Lexical notes follow each definition and illustration as one quiet reading area. */
.sense:has(.sense-relations) {
  padding-block: 28px;
  row-gap: 22px;
}
.sense-relations {
  grid-column: 1 / -1;
  display: block;
  padding: 2px 0 0;
  font-size: 15px;
  line-height: 1.6;
}
.sense-relations + .sense-relations {
  margin-top: 10px;
}
.relation-qualifier {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.sense-relations .relation-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  margin-top: 10px;
}
.relation-heading {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin: 2px 0 0;
}
.synonym-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.synonym-term {
  font-weight: 500;
}
.sense-relations .word-link,
.word-origin .word-link,
.word-related .word-link {
  border-bottom-color: transparent;
}
.sense-relations .word-link:hover,
.word-origin .word-link:hover,
.word-related .word-link:hover {
  border-bottom-color: var(--accent);
}
.antonym-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.antonym-list li + li {
  margin-top: 12px;
}
.antonym-list strong {
  font-weight: 600;
}
.antonym-contrast {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.word-origin {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  margin: 0;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.word-origin h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
  margin: 0;
}
.word-origin p {
  max-width: 68ch;
  color: #46505e;
  font-size: 16px;
  line-height: 1.85;
  margin: 0;
}
.word-related {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.word-related > h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
  margin: 0;
}
.word-related > div {
  display: grid;
  gap: 12px;
}
.word-related .sense-relations + .sense-relations {
  margin-top: 0;
}
.word-related .sense-relations {
  padding-top: 0;
}
@media (max-width: 600px) {
  .sense-relations {
    padding-top: 0;
  }
  .sense-relations .relation-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
  }
  .word-origin,
  .word-related {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 26px;
  }
}

/* Shared public navigation; personal tools stay inside one native disclosure. */
.personal-menu {
  position: relative;
  flex: none;
}
.personal-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted, #6a707b);
}
.personal-menu > summary::-webkit-details-marker {
  display: none;
}
.account-avatar {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.personal-menu[open] > summary,
.personal-menu > summary:hover {
  background: #f1f3f6;
  color: var(--text, #303844);
}
.personal-menu-links {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 1000;
  min-width: 190px;
  padding: 8px;
  border: 1px solid #e0e3e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 35px #17263a14;
}
.personal-menu-links a {
  display: block;
  padding: 11px 14px;
  border-radius: 7px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.personal-menu-links a:hover,
.personal-menu-links a:focus-visible {
  background: #f4f5f7;
}
.personal-menu-links a[hidden] {
  display: none;
}
.product-nav a[aria-current="page"] {
  color: #293e62;
}
.page-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e2e5ea;
  margin: 24px 0;
}
.page-tabs a {
  padding: 12px 0;
  color: #727783;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.page-tabs a[aria-current="page"] {
  border-bottom-color: #344b70;
  color: #344b70;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .site-header .product-nav {
    gap: 14px;
  }
  .site-header .quiet-link {
    font-size: 13px;
  }
  .site-header .brand-symbol {
    width: 32px;
    height: 32px;
  }
  .site-header .brand {
    gap: 8px;
  }
  .personal-menu > summary {
    width: 32px;
    height: 32px;
  }
}
