:root {
  --ink: #222;
  --muted: #666;
  --paper: #fff;
  --cream: #fff;
  --coral: #b54321;
  /* Fehér szöveghez (gomb-háttér) és papír háttéren álló feliratokhoz a sima
     --coral csak ~3.2:1 / ~2.9:1 kontrasztot ad – ez a két árnyalat mindkét
     esetben eléri a WCAG AA 4.5:1-et. */
  --coral-text: #b54321;
  --coral-text-dark: #8d341a;
  --mint: #f6e6e0;
  --line: #ddd;
  --shadow: 0 3px 12px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .45;
  background: radial-gradient(circle at 8% 14%, rgba(200, 230, 219, .7), transparent 25%), radial-gradient(circle at 92% 80%, rgba(229, 107, 85, .13), transparent 28%);
}
.skip-link { position: absolute; top: 0; left: 0; transform: translateY(-100%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 6px 0; font-size: 13px; font-weight: 700; text-decoration: none; z-index: 10; transition: transform .15s; }
.skip-link:focus { transform: translateY(0); }
.app-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(16, 42, 67, .12); }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .02em; background: var(--coral-text); border: 1px solid var(--coral-text); border-radius: 100px; padding: 8px 16px; box-shadow: 0 6px 14px rgba(184, 73, 47, .3); transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.back-link:hover, .back-link:focus-visible { background: var(--coral-text-dark); border-color: var(--coral-text-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(184, 73, 47, .4); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 15px; letter-spacing: .01em; }
.brand strong { font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--ink); color: var(--mint); font-family: Fraunces, serif; font-size: 19px; }
.topbar-note { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.live-dot, .status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); margin-right: 8px; vertical-align: 1px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; padding: 82px 0 74px; }
.eyebrow { margin: 0 0 17px; color: var(--coral-text); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-family: Fraunces, serif; font-size: clamp(48px, 7.5vw, 88px); line-height: .96; letter-spacing: -.04em; font-weight: 600; }
h1 em { color: var(--coral-text); font-style: normal; }
.intro { max-width: 465px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-stamp { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 150px; margin-right: 50px; border: 1px solid var(--coral); border-radius: 50%; transform: rotate(8deg); color: var(--coral-text); }
.stamp-number { font-family: Fraunces, serif; font-size: 37px; line-height: 1; }
.stamp-label { margin-top: 8px; font-size: 11px; line-height: 1.25; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.practice-area { padding: 46px 0 72px; border-top: 1px solid rgba(16, 42, 67, .12); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
h2 { margin-bottom: 0; font-family: Fraunces, serif; font-size: clamp(30px, 4vw, 43px); line-height: 1; letter-spacing: -.03em; }
.status-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: 12px; font-weight: 600; background: rgba(255, 253, 248, .65); }
.status-pill.is-speaking .status-dot { animation: pulse 1.2s infinite; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 13px; margin-bottom: 22px; }
.filter-field { flex: 1 1 135px; min-width: 135px; display: flex; flex-direction: column; gap: 7px; }
.filter-field-level, .filter-field-topic { flex-basis: 190px; min-width: 190px; }
.filter-field span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
select { width: 100%; padding: 12px 37px 12px 13px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: rgba(255, 253, 248, .8); font: inherit; font-size: 16px; cursor: pointer; }
select:focus-visible { outline: 3px solid rgba(229, 107, 85, .35); outline-offset: 2px; }
.selection-count { flex: 1 1 100%; padding: 6px 0 0; color: var(--coral-text); font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.sentence-card { position: relative; padding: 39px 48px 33px; border: 1px solid rgba(16, 42, 67, .08); border-radius: 8px; background: var(--cream); box-shadow: var(--shadow); }
.sentence-meta { display: flex; justify-content: space-between; margin-bottom: 36px; color: var(--coral-text); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.english-sentence { max-width: 810px; margin-bottom: 29px; font-family: Fraunces, serif; font-size: clamp(31px, 5vw, 59px); line-height: 1.08; letter-spacing: -.035em; }
.divider { width: 100%; height: 1px; background: var(--line); }
.hungarian-sentence { margin: 22px 0 33px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.repeat-indicator { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; }
.repeat-label { font-weight: 600; }
.repeat-bars { display: flex; gap: 5px; }
.repeat-bars i { display: block; width: 23px; height: 5px; border-radius: 10px; background: var(--line); }
.repeat-bars i.active { background: var(--coral); }
.repeat-count { font-variant-numeric: tabular-nums; }
.controls { display: flex; justify-content: center; gap: 12px; margin: 31px 0 15px; }
button { font: inherit; cursor: pointer; }
.control-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 124px; padding: 14px 22px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s, box-shadow .2s; }
.control-button:hover { transform: translateY(-2px); }
.control-button:focus-visible { outline: 3px solid rgba(229, 107, 85, .35); outline-offset: 3px; }
.control-button.primary { min-width: 155px; background: var(--coral-text); color: white; box-shadow: 0 9px 20px rgba(184, 73, 47, .25); }
.control-button.primary:hover { background: var(--coral-text-dark); }
.control-button.secondary { border-color: var(--line); background: rgba(255, 253, 248, .7); color: var(--ink); }
.control-button.secondary.is-paused { border-color: var(--coral); background: var(--mint); color: var(--ink); box-shadow: 0 8px 18px rgba(200, 230, 219, .55); }
.control-button.secondary:hover { background: white; }
.control-button:disabled { opacity: .4; cursor: default; box-shadow: none; transform: none; }
.control-button:disabled:hover { transform: none; background: inherit; }
.button-icon { font-size: 14px; line-height: 1; }
.volume-control { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.volume-icon { font-size: 16px; line-height: 1; }
.volume-control input[type="range"] { width: 110px; accent-color: var(--coral); cursor: pointer; }
.volume-value { min-width: 34px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.hint { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.key-hint { display: inline-block; margin-right: 5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.45); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.footer { display: flex; justify-content: space-between; padding: 22px 0 28px; border-top: 1px solid rgba(16, 42, 67, .12); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.72); } }
@media (max-width: 680px) {
  .app-shell { width: min(100% - 30px, 1120px); }
  .topbar { height: 70px; }
  .topbar-left { gap: 10px; }
  .back-link { padding: 5px 9px; font-size: 11px; }
  .topbar-note { font-size: 10px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 37px; padding: 60px 0 55px; }
  .hero-stamp { align-self: flex-end; width: 116px; height: 116px; margin-right: 18px; }
  .stamp-number { font-size: 29px; }
  .stamp-label { font-size: 9px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .filters { gap: 11px; }
  .filter-field { flex-basis: 100%; }
  .selection-count { flex-basis: 100%; padding: 4px 0 2px; }
  .sentence-card { padding: 27px 23px 25px; }
  .sentence-meta { margin-bottom: 29px; font-size: 9px; }
  .english-sentence { font-size: 35px; }
  .controls { flex-wrap: wrap; gap: 7px; }
  .control-button { min-width: 0; flex: 1; padding: 13px 8px; font-size: 12px; }
  .control-button.primary { min-width: 0; }
  .volume-control { flex: 1 1 100%; justify-content: center; margin: 4px 0 0; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .footer { gap: 14px; flex-direction: column; }
}

body {
  color: #555;
  background: #fff;
  font-family: "Open Sans", Arial, sans-serif;
}
body::before { display: none; }
.topbar {
  height: auto;
  display: block;
  border-bottom: 1px solid #f3f3f3;
}
.dictionary-page { padding: 36px 15px 70px; }
.dictionary-heading {
  max-width: 850px;
  margin: 0 auto 38px;
  padding-bottom: 26px;
  border-bottom: 1px solid #eee;
}
.dictionary-heading h1 {
  margin: 0 0 12px;
  color: #121214;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 34px;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0;
}
.dictionary-heading p {
  max-width: 700px;
  margin: 0;
  color: #777;
  line-height: 1.7;
}
.practice-area {
  max-width: 850px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}
.section-heading {
  align-items: center;
  margin-bottom: 22px;
}
.section-heading h2 {
  color: #121214;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}
.status-pill {
  border-color: #e5e5e5;
  border-radius: 3px;
  background: #fafafa;
}
.live-dot, .status-dot { background: #b54321; }
.filter-field span { color: #555; letter-spacing: .06em; }
select {
  border-color: #ccc;
  border-radius: 3px;
  background-color: #fff;
}
select:focus-visible,
.control-button:focus-visible { outline-color: rgba(181, 67, 33, .35); }
.selection-count,
.sentence-meta { color: #b54321; }
.sentence-card {
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
}
.english-sentence {
  color: #222;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}
.hungarian-sentence,
.repeat-indicator,
.hint { color: #666; }
.control-button { border-radius: 3px; }
.control-button.primary {
  background: #b54321;
  box-shadow: none;
}
.control-button.primary:hover { background: #444; }
.control-button.secondary { border-radius: 3px; }
.control-button.secondary.is-paused {
  border-color: #b54321;
  background: #f6e6e0;
}
.key-hint { border-radius: 2px; }
.footer-wrapper .general-title,
.footer-wrapper .general-title span {
  font-family: "Open Sans", Arial, sans-serif;
  letter-spacing: 0;
}
.connection-test { max-width: 850px; margin: 46px auto 0; padding-top: 38px; border-top: 1px solid #eee; }
.connection-card { display: flex; align-items: stretch; gap: 30px; padding: 26px 30px; border: 1px solid #e5e5e5; border-left: 4px solid transparent; border-radius: 3px; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .06); transition: border-color .3s ease, background .3s ease; }
.connection-card.has-error { border-color: #f3c4bd; border-left-color: #c62828; background: #fffaf9; }
.connection-main { flex: 1 1 auto; min-width: 0; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.connection-actions .control-button { min-width: 0; }
.connection-result { min-height: 18px; margin: 0 0 10px; color: #b54321; font-size: 13px; font-weight: 600; }
.connection-log { max-height: 130px; overflow-y: auto; margin: 0; padding: 12px 0 0; border-top: 1px solid #eee; list-style: none; color: #777; font-size: 12px; line-height: 1.7; }
.connection-log li { padding: 2px 0; }
.connection-log li.online { color: #2f7a4f; }
.connection-log li.offline { color: #c62828; }
#netDot.online { background: #2f7a4f; }
#netDot.offline { background: #c62828; animation: dot-alert 1s ease-in-out 2; }
@keyframes dot-alert { 50% { transform: scale(1.35); } }

.net-alert { display: none; align-items: center; gap: 9px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid #f1b0a6; border-radius: 3px; background: #fdeeec; color: #c62828; font-size: 13px; font-weight: 600; line-height: 1.4; }
.net-alert.is-visible { display: flex; }
.net-alert-icon { flex: 0 0 auto; font-size: 15px; }

.signal-meter { display: flex; align-items: flex-end; justify-content: center; gap: 6px; flex: 0 0 auto; width: 84px; padding: 4px 0 2px; border-left: 1px solid #eee; }
.signal-bar { display: block; width: 10px; height: calc(16px + var(--i) * 10px); border-radius: 3px; background: #e5e5e5; transition: background .35s ease; }
.signal-meter.is-testing .signal-bar { background: #f0c9bb; animation: signal-wave 1s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
.signal-meter[data-level="1"] .signal-bar:nth-child(-n+1),
.signal-meter[data-level="2"] .signal-bar:nth-child(-n+2),
.signal-meter[data-level="3"] .signal-bar:nth-child(-n+3),
.signal-meter[data-level="4"] .signal-bar:nth-child(-n+4),
.signal-meter[data-level="5"] .signal-bar:nth-child(-n+5) { background: #b54321; }
.signal-meter[data-level="0"] .signal-bar { background: #e5e5e5; }
.signal-meter[data-level="offline"] .signal-bar { background: #f1b0a6; }
@keyframes signal-wave {
  0%, 100% { opacity: .4; transform: scaleY(.55); transform-origin: bottom; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: bottom; }
}
@media (prefers-reduced-motion: reduce) {
  .signal-meter.is-testing .signal-bar { animation: none; opacity: .8; }
  #netDot.offline { animation: none; }
}

@media (max-width: 680px) {
  .dictionary-page { padding: 28px 15px 48px; }
  .dictionary-heading { margin-bottom: 28px; }
  .dictionary-heading h1 { font-size: 30px; }
  .section-heading h2 { font-size: 21px; }
  .connection-test { margin-top: 32px; padding-top: 26px; }
  .connection-card { flex-direction: column; padding: 20px 18px; }
  .signal-meter { width: 100%; padding: 10px 0 0; border-left: 0; border-top: 1px solid #eee; }
}
/* Hero: ugyanaz a megjelenés, mint a Távsegítség oldalon (style.css alapértékei) */
.single-title h1 {
  margin: 0 0 44px 0;
  color: #121214;
  font-family: inherit;
  font-size: 3.2em;
  font-weight: 200;
  line-height: 44px;
  letter-spacing: -1px;
}
.single-title h2.subtitle {
  margin: 6px 0 0;
  color: #121214;
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -1px;
}
