/* HedefAkademi · Ünite sonu Kelime Listesi (v1) — mobil öncelikli */
:root {
  --haw-ink: #0b2233;
  --haw-muted: #5d7280;
  --haw-bg: #f4f8f7;
  --haw-card: #ffffff;
  --haw-line: #dce7e5;
  --haw-teal: #0f9d8a;
  --haw-teal-dark: #0a6f62;
  --haw-teal-pale: #e3f6f2;
  --haw-navy: #071a2d;
  --haw-amber: #f2a93b;
  --haw-red: #d9534f;
  --haw-red-pale: #fdecec;
  --haw-green: #1f9d55;
  --haw-green-pale: #e6f6ec;
  --haw-radius: 18px;
}

html.haw-open,
html.haw-open body {
  overflow: hidden;
}

.haw-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(7, 26, 45, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: inherit;
  color: var(--haw-ink);
  animation: haw-fade 0.18s ease-out;
}

.haw-panel {
  width: 100%;
  max-width: 760px;
  height: 100vh;
  height: 100dvh;
  background: var(--haw-bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(7, 26, 45, 0.3);
}

@media (min-width: 820px) {
  .haw-overlay {
    align-items: center;
    padding: 24px;
  }
  .haw-panel {
    height: min(900px, calc(100dvh - 48px));
    border-radius: 26px;
    overflow: hidden;
  }
}

.haw-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.haw-loading {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--haw-muted);
  font-weight: 700;
}

/* başlık */
.haw-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: var(--haw-navy);
  color: #fff;
}
.haw-head-logo {
  font-size: 22px;
  width: 44px;
  text-align: center;
}
.haw-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.haw-head-text strong {
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.haw-head-text small {
  color: #a9c3cf;
  font-size: 12px;
}
.haw-icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}
.haw-icon-btn:focus-visible {
  outline: 3px solid #7fe0d0;
  outline-offset: 2px;
}

.haw-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.haw-center {
  text-align: center;
  align-items: stretch;
}
.haw-lead {
  margin: 0;
  color: var(--haw-muted);
  font-size: 14px;
  line-height: 1.5;
}
.haw-lead.center {
  text-align: center;
}
.haw-sub {
  margin: 6px 0 0;
  font-size: 15px;
}

.haw-banner {
  background: var(--haw-teal-pale);
  border: 1px solid #b4e6dc;
  color: var(--haw-teal-dark);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.45;
}

/* ilerleme */
.haw-progress {
  background: var(--haw-card);
  border: 1px solid var(--haw-line);
  border-radius: var(--haw-radius);
  padding: 14px;
}
.haw-progress-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 8px;
}
.haw-progress-top b {
  color: var(--haw-teal-dark);
}
.haw-bar {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #e4ecea;
  overflow: hidden;
}
.haw-bar.small {
  height: 8px;
}
.haw-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--haw-teal), #3cc4a8);
  transition: width 0.35s ease;
}
.haw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.haw-stats div {
  background: var(--haw-bg);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}
.haw-stats b {
  display: block;
  font-size: 20px;
}
.haw-stats small {
  color: var(--haw-muted);
  font-size: 11px;
  font-weight: 700;
}
.haw-stats .ok b {
  color: var(--haw-green);
}
.haw-stats .todo b {
  color: var(--haw-amber);
}

/* ünite kartları */
.haw-unit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .haw-unit-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.haw-unit-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  border: 1px solid var(--haw-line);
  background: var(--haw-card);
  border-radius: var(--haw-radius);
  padding: 14px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.haw-unit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(7, 26, 45, 0.08);
}
.haw-unit-no {
  color: var(--haw-teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.haw-unit-card strong {
  font-size: 17px;
}
.haw-unit-meta {
  color: var(--haw-muted);
  font-size: 13px;
}

/* düğmeler */
.haw-actions {
  display: grid;
  gap: 10px;
}
.haw-actions.two {
  grid-template-columns: 1fr 1fr;
}
.haw-actions.two .haw-btn:first-child {
  grid-column: 1 / -1;
}
.haw-btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--haw-line);
  background: var(--haw-card);
  color: var(--haw-ink);
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  touch-action: manipulation;
  transition: transform 0.12s, background 0.15s;
}
.haw-btn small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}
.haw-btn:active {
  transform: scale(0.98);
}
.haw-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.haw-btn:focus-visible,
.haw-chip:focus-visible,
.haw-option:focus-visible,
.haw-unit-card:focus-visible,
.haw-match:focus-visible {
  outline: 3px solid var(--haw-teal);
  outline-offset: 2px;
}
.haw-btn.big {
  min-height: 60px;
  font-size: 16px;
}
.haw-btn.wide {
  width: 100%;
}
.haw-btn.primary {
  background: var(--haw-teal);
  border-color: var(--haw-teal);
  color: #fff;
}
.haw-btn.accent {
  background: var(--haw-navy);
  border-color: var(--haw-navy);
  color: #fff;
}
.haw-btn.warn {
  background: #fff6e6;
  border-color: #f6d39a;
  color: #8a5a07;
}
.haw-btn.again {
  background: #fff6e6;
  border-color: #f6d39a;
  color: #8a5a07;
}
.haw-btn.ghost {
  background: transparent;
  color: var(--haw-muted);
}
.haw-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--haw-muted);
  min-height: 44px;
}
.haw-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--haw-teal);
}

.haw-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.haw-chips::-webkit-scrollbar {
  display: none;
}
.haw-chip {
  flex: none;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--haw-line);
  background: var(--haw-card);
  padding: 6px 14px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--haw-ink);
  cursor: pointer;
}
.haw-chip small {
  color: var(--haw-muted);
  margin-left: 4px;
}
.haw-chip.on {
  background: var(--haw-teal);
  border-color: var(--haw-teal);
  color: #fff;
}
.haw-chip.on small {
  color: #d9fff7;
}

/* liste */
.haw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.haw-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--haw-card);
  border: 1px solid var(--haw-line);
  border-radius: 14px;
  padding: 8px 10px;
}
.haw-list li.learned {
  border-color: #bfe6cf;
  background: #f6fcf8;
}
.haw-list li div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.haw-list strong {
  font-size: 16px;
}
.haw-list span {
  color: var(--haw-muted);
  font-size: 13px;
}
.haw-mark {
  flex: none;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--haw-line);
  background: var(--haw-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  cursor: pointer;
  color: var(--haw-muted);
}
.haw-list li.learned .haw-mark {
  background: var(--haw-green-pale);
  border-color: #bfe6cf;
  color: var(--haw-green);
}
.haw-say {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--haw-line);
  background: var(--haw-card);
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
}
.haw-say.big {
  width: 56px;
  height: 56px;
  font-size: 22px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  box-shadow: 0 6px 16px rgba(7, 26, 45, 0.12);
}
.haw-say.inline {
  align-self: center;
}

/* kartlar */
.haw-cards {
  min-height: calc(100dvh - 80px);
}
.haw-card-wrap {
  position: relative;
  perspective: 1400px;
}
.haw-card {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(280px, 52dvh, 440px);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.haw-card.flipped {
  transform: rotateY(180deg);
}
.haw-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  border-radius: 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 40px rgba(7, 26, 45, 0.14);
  text-align: center;
}
.haw-face.front {
  background: linear-gradient(160deg, #ffffff, #eef8f6);
  border: 1px solid var(--haw-line);
}
.haw-face.back {
  background: linear-gradient(160deg, var(--haw-navy), #0f3550);
  color: #fff;
  transform: rotateY(180deg);
}
.haw-face small {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--haw-teal-dark);
}
.haw-face.back small {
  color: #7fe0d0;
}
.haw-face strong {
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.haw-face.back strong {
  font-size: clamp(24px, 7vw, 38px);
}
.haw-face em {
  font-style: normal;
  font-size: 13px;
  color: var(--haw-muted);
}
.haw-back-tr {
  font-size: 15px;
  color: #a9c3cf;
  font-weight: 700;
}
.haw-example {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  max-width: 100%;
}
.haw-example p {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.haw-example small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: #c4d7df;
}
.haw-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.haw-card-actions .haw-btn {
  min-height: 58px;
  font-size: 16px;
}
.haw-hint {
  margin: 0;
  text-align: center;
  color: var(--haw-muted);
  font-size: 12px;
}
.haw-big-icon {
  font-size: 54px;
}
.haw-center h2 {
  margin: 0;
}
.haw-center p {
  margin: 0;
  color: var(--haw-muted);
}

/* test */
.haw-q-type {
  margin: 0;
  color: var(--haw-teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.haw-q {
  margin: 0;
  font-size: clamp(24px, 6.5vw, 32px);
  text-align: center;
  overflow-wrap: anywhere;
}
.haw-sentence {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}
.haw-sentence-tr {
  display: block;
  text-align: center;
  color: var(--haw-muted);
}
.haw-blank {
  display: inline-block;
  min-width: 70px;
  border-bottom: 3px solid var(--haw-teal);
  color: transparent;
  margin: 0 2px;
}
.haw-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .haw-options {
    grid-template-columns: 1fr 1fr;
  }
}
.haw-option,
.haw-match {
  min-height: 54px;
  border-radius: 14px;
  border: 2px solid var(--haw-line);
  background: var(--haw-card);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--haw-ink);
  text-align: center;
  touch-action: manipulation;
  overflow-wrap: anywhere;
}
.haw-option.picked,
.haw-match.picked {
  border-color: var(--haw-teal);
  background: var(--haw-teal-pale);
}
.haw-option.right {
  border-color: var(--haw-green);
  background: var(--haw-green-pale);
  color: var(--haw-green);
}
.haw-option.wrong {
  border-color: var(--haw-red);
  background: var(--haw-red-pale);
  color: var(--haw-red);
}
.haw-option.dim {
  opacity: 0.55;
}
.haw-feedback {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.haw-feedback span {
  font-weight: 600;
  font-size: 13px;
}
.haw-feedback.ok {
  background: var(--haw-green-pale);
  color: var(--haw-green);
}
.haw-feedback.no {
  background: var(--haw-red-pale);
  color: var(--haw-red);
}
.haw-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.haw-match-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.haw-match.paired {
  border-color: var(--haw-green);
  background: var(--haw-green-pale);
  color: var(--haw-green);
  opacity: 0.8;
}
.haw-match.shake {
  border-color: var(--haw-red);
  animation: haw-shake 0.35s;
}

/* sonuç */
.haw-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--haw-card);
  border: 1px solid var(--haw-line);
  border-radius: var(--haw-radius);
  padding: 16px;
}
.haw-score .haw-stats {
  width: 100%;
}
.haw-ring {
  --c: var(--haw-teal);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #e4ecea 0);
}
.haw-score.low .haw-ring {
  --c: var(--haw-amber);
}
.haw-ring b {
  font-size: 30px;
}
.haw-ring small {
  color: var(--haw-muted);
  font-weight: 700;
}
.haw-list.compact li {
  padding: 6px 10px;
}

/* menü girişleri */
.hj-nav [data-ha-wordlist] {
  cursor: pointer;
}
.hj-unit-head {
  flex-wrap: wrap;
  gap: 8px;
}
.hj-wl-btn {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid #b4e6dc;
  background: #e3f6f2;
  color: #0a6f62;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  cursor: pointer;
  touch-action: manipulation;
}
.hj-wl-btn:hover {
  background: #cfeee7;
}

@keyframes haw-fade {
  from {
    opacity: 0;
  }
}
@keyframes haw-shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .haw-overlay,
  .haw-card,
  .haw-bar i,
  .haw-match.shake {
    animation: none;
    transition: none;
  }
}
