/* The Learn English hub.
 *
 * Reuses the Academy's tokens and adds only what a reference page needs that a
 * reading page does not: a long table that stays readable at 360px, a headword
 * entry, and a list of quotations. Nothing here overrides a shared class. */

.ve-pillar {
  /* No frame of its own. This sits inside `.ve-container`, which already sets
     the 1,300px width and the 28px gutter the header uses -- adding a second
     max-width and a second padding here inset every panel 28px further than the
     menu above it, which is exactly the mismatch a reader sees at the edges.
     The page edge is the menu edge because there is only one of them. */
  max-width: none;
  margin: 0;
  padding: 0 0 48px;
  color: var(--ve-text, #ded9cf);
  font-family: var(--ve-font-sans, system-ui, sans-serif);
  line-height: 1.7;
}

.ve-pillar h1,
.ve-pillar h2,
.ve-pillar h3 {
  font-family: var(--ve-font-serif, Georgia, serif);
  color: var(--ve-heading, #f5f2eb);
  line-height: 1.25;
}

.ve-pillar h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); margin: 0 0 10px; }
.ve-pillar h3 { font-size: clamp(1.05rem, 2vw, 1.2rem); margin: 22px 0 6px; }
/* The frame matches the menu; the prose inside does not, because a line of text
   1,300 pixels wide loses the reader's eye on the way back to the left. Tables
   and grids still take the whole width. */
.ve-pillar p { margin: 0 0 14px; max-width: 82ch; }
.ve-pillar a { color: var(--ve-gold-soft, #d8be9f); }

.ve-pillar-trail {
  font-size: 0.86rem;
  color: var(--ve-text-muted, #8b99ac);
  margin-bottom: 14px;
}
.ve-pillar-trail a { color: var(--ve-text-muted, #8b99ac); }

.ve-pillar-hero,
.ve-pillar-entry,
.ve-pillar-panel {
  border: 1px solid var(--ve-border-glow, rgba(212, 163, 115, 0.12));
  border-radius: var(--ve-radius, 20px);
  background: var(--ve-surface-card, rgba(13, 20, 32, 0.88));
  padding: clamp(18px, 3vw, 30px);
  margin: 0 0 18px;
}

.ve-pillar .ve-page-title { margin: 6px 0 12px; font-size: clamp(1.8rem, 5vw, 2.7rem); }

.ve-pillar .ve-answer-first {
  font-size: 1.06rem;
  color: var(--ve-text-story, #ece7de);
  border-left: 3px solid var(--ve-gold, #c69563);
  padding-left: 14px;
}

.ve-pillar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* The measured figures. Four cells that collapse to two on a phone. */
.ve-pillar-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.ve-pillar-figures article {
  border: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
  border-radius: 14px;
  background: rgba(9, 15, 24, 0.7);
  padding: 14px 12px;
  text-align: center;
}
.ve-pillar-figures strong {
  display: block;
  font-family: var(--ve-font-serif, Georgia, serif);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--ve-gold-bright, #ebd0ad);
}
.ve-pillar-figures span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ve-text-muted, #8b99ac);
}

/* A long word table has to scroll inside itself, never the page. */
.ve-pillar-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ve-pillar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.ve-pillar-table caption { text-align: left; }
.ve-pillar-table th,
.ve-pillar-table td {
  text-align: left;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
  vertical-align: top;
}
.ve-pillar-table thead th {
  font-family: var(--ve-font-sans, system-ui, sans-serif);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ve-text-muted, #8b99ac);
  font-weight: 600;
}
.ve-pillar-table tbody th { font-weight: 600; color: var(--ve-heading, #f5f2eb); }
.ve-pillar-table-words tbody th a {
  font-family: var(--ve-font-serif, Georgia, serif);
  font-size: 1.08rem;
  text-decoration: none;
}
.ve-pillar-table-words tbody th a:hover { text-decoration: underline; }
.ve-pillar-rank { color: var(--ve-text-muted, #8b99ac); font-variant-numeric: tabular-nums; }
.ve-pillar-count { color: var(--ve-text-muted, #8b99ac); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ve-pillar-pos { color: var(--ve-gold-soft, #d8be9f); font-size: 0.86rem; white-space: nowrap; }
.ve-pillar-gloss { color: var(--ve-text, #ded9cf); }
.ve-pillar-ipa { color: var(--ve-text-muted, #8b99ac); font-size: 0.9rem; white-space: nowrap; }
.ve-pillar-sound { display: flex; align-items: center; gap: 8px; }

/* The share bar sits behind its own number rather than in a column of its own. */
.ve-pillar-bar {
  display: inline-block;
  width: 74px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  margin-right: 8px;
  vertical-align: middle;
}
.ve-pillar-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--share, 0%);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ve-gold, #c69563), var(--ve-gold-bright, #ebd0ad));
}

.ve-pillar-speak {
  appearance: none;
  border: 1px solid var(--ve-border-glow, rgba(212, 163, 115, 0.12));
  background: rgba(255, 255, 255, 0.03);
  color: var(--ve-gold-soft, #d8be9f);
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 0 10px;
}
.ve-pillar-speak:hover { border-color: var(--ve-gold, #c69563); color: var(--ve-gold-bright, #ebd0ad); }
.ve-pillar-speak.is-speaking { background: rgba(198, 149, 99, 0.18); }
.ve-pillar-speak svg { width: 16px; height: 16px; }
.ve-pillar-speak-large { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }

/* A thousand rows once meant a thousand <svg><use> elements pointing at the
 * sprite. The same mark drawn once in the stylesheet costs the page nothing per
 * row and removes a thousand nodes from the document. */
.ve-pillar-speak-mark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8be9f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6'/%3E%3Cpath d='M19 6.5a8 8 0 0 1 0 11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 17px 17px;
  padding: 0;
  width: 34px;
}
.ve-pillar-speak-mark:hover,
.ve-pillar-speak-mark.is-speaking { background-color: rgba(198, 149, 99, 0.18); }

/* Bands */
.ve-pillar-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.ve-pillar-band {
  display: block;
  text-decoration: none;
  border: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
  border-radius: 16px;
  background: rgba(9, 15, 24, 0.7);
  padding: 16px;
}
.ve-pillar-band:hover { border-color: var(--ve-gold, #c69563); }
.ve-pillar-band-current { border-color: var(--ve-gold, #c69563); background: rgba(198, 149, 99, 0.1); }
.ve-pillar-band-size {
  display: block;
  font-family: var(--ve-font-serif, Georgia, serif);
  font-size: 1.6rem;
  color: var(--ve-gold-bright, #ebd0ad);
}
.ve-pillar-band-name { display: block; color: var(--ve-heading, #f5f2eb); }
.ve-pillar-band-share { display: block; font-size: 0.84rem; color: var(--ve-text-muted, #8b99ac); }

/* The twelve-word sample on the hub */
.ve-pillar-wordlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ve-pillar-wordcard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
}
.ve-pillar-word {
  font-family: var(--ve-font-serif, Georgia, serif);
  font-size: 1.2rem;
  min-width: 92px;
  text-decoration: none;
}
.ve-pillar-wordcard .ve-pillar-gloss { flex: 1 1 260px; color: var(--ve-text-muted, #8b99ac); font-size: 0.92rem; }

.ve-pillar-steps { margin: 0; padding-left: 22px; }
.ve-pillar-steps li { margin-bottom: 8px; }
.ve-pillar-note { color: var(--ve-text-muted, #8b99ac); font-size: 0.92rem; }

.ve-pillar-booklist { list-style: none; margin: 0 0 16px; padding: 0; }
.ve-pillar-booklist li { padding: 8px 0; border-bottom: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06)); }
.ve-pillar-booklist span { color: var(--ve-text-muted, #8b99ac); font-size: 0.88rem; }

/* The headword entry */
.ve-pillar-headword {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.ve-pillar-entry-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.ve-pillar-ipa-large { font-size: 1.05rem; color: var(--ve-gold-soft, #d8be9f); }

.ve-pillar-sense-group { margin-bottom: 16px; }
.ve-pillar-sense-pos {
  font-family: var(--ve-font-sans, system-ui, sans-serif);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ve-gold, #c69563);
  margin: 0 0 4px;
}
.ve-pillar-senses { margin: 0; padding-left: 22px; }
.ve-pillar-senses li { margin-bottom: 8px; }
.ve-pillar-sense-def { display: block; color: var(--ve-text-story, #ece7de); }
.ve-pillar-synonyms,
.ve-pillar-sense-example {
  display: block;
  font-size: 0.88rem;
  color: var(--ve-text-muted, #8b99ac);
}
.ve-pillar-sense-example { font-style: italic; }

.ve-pillar-examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ve-pillar-examples blockquote {
  margin: 0 0 4px;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--ve-gold, #c69563);
  font-family: var(--ve-font-story, Georgia, serif);
  font-size: 1.06rem;
  color: var(--ve-text-story, #ece7de);
}
.ve-pillar-example-source { margin: 0 0 0 16px; font-size: 0.86rem; color: var(--ve-text-muted, #8b99ac); }
.ve-pillar-example-source span { margin-left: 4px; }

.ve-pillar-neighbours { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ve-pillar-neighbours a,
.ve-pillar-neighbour-self {
  border: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  font-family: var(--ve-font-serif, Georgia, serif);
}
.ve-pillar-neighbour-self { border-color: var(--ve-gold, #c69563); color: var(--ve-gold-bright, #ebd0ad); }
.ve-pillar-neighbours .ve-pillar-rank { font-size: 0.74rem; margin-right: 6px; font-family: var(--ve-font-sans, system-ui, sans-serif); }

.ve-pillar-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.ve-pillar-pager span { color: var(--ve-text-muted, #8b99ac); font-size: 0.9rem; }

.ve-pillar-form { display: grid; gap: 10px; max-width: 460px; }
.ve-pillar-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ve-border-glow, rgba(212, 163, 115, 0.12));
  background: rgba(7, 11, 18, 0.9);
  color: var(--ve-text-story, #ece7de);
  font-size: 1rem;
}
.ve-pillar-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 0.92rem; color: var(--ve-text-muted, #8b99ac); }
.ve-pillar-form-status { min-height: 1.2em; font-size: 0.9rem; color: var(--ve-gold-soft, #d8be9f); }

.ve-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .ve-pillar-table { font-size: 0.9rem; }
  .ve-pillar-table th,
  .ve-pillar-table td { padding-right: 8px; }
  .ve-pillar-word { min-width: 0; }
}

/* The page is long by design -- twenty-odd questions -- so it opens with its own
   contents. Two columns on a wide screen, one on a phone. */
.ve-pillar-contents {
  border: 1px solid var(--ve-border, rgba(255, 255, 255, 0.06));
  border-radius: var(--ve-radius, 20px);
  background: rgba(9, 15, 24, 0.6);
  padding: clamp(16px, 2.4vw, 24px);
  margin: 0 0 18px;
}
.ve-pillar-contents h2 { font-size: 1.05rem; margin: 0 0 10px; }
.ve-pillar-contents ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 36px;
  font-size: 0.94rem;
}
.ve-pillar-contents li { margin-bottom: 6px; break-inside: avoid; }
.ve-pillar-contents a { text-decoration: none; }
.ve-pillar-contents a:hover { text-decoration: underline; }

/* A question block. The heading carries the question exactly as a learner types
   it, so it gets the room a heading of that length needs. */
.ve-pillar-q { scroll-margin-top: 90px; }
.ve-pillar-q h2 { font-size: clamp(1.25rem, 2.3vw, 1.6rem); }

.ve-pillar-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.92rem;
  max-width: none;
}

@media (max-width: 720px) {
  .ve-pillar-contents ol { columns: 1; }
}
