/* ANLAMIN YAPI TAŞLARI / DİNLEME — belgeye özgü stil.
   Ortak header, footer, düğme, kart, dialog, gezinme ve form temeli
   yeniden tanımlanmaz; yalnız içerik alanı yerleşimi düzenlenir. */

#main .visually-hidden,
#modal-body .visually-hidden {
  position: absolute;
  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;
}

#main {
  --doc-across: #00abda;
  --doc-across-ink: #13313c;
  --doc-shade: #f4f2ef;
  --doc-line: #cbc6c0;
  --doc-fish: #f2f7f9;
}

#main .storage-warning,
#modal-body .storage-warning {
  background: #fff2e8;
  border-left: 4px solid #9f3424;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 15px;
}

#main .purpose,
#modal-body .purpose {
  margin-bottom: 20px;
}

#main .purpose p,
#modal-body .purpose p {
  margin: 0 0 8px;
}

#main .intro-content {
  font-size: 18px;
  line-height: 1.75;
}

#main .intro-content p {
  margin-bottom: 18px;
}

#main .start-action {
  margin: 30px 0 8px;
}

#main .table-note {
  font-size: 16px;
  margin-bottom: 14px;
}

#main .table-scroll,
#modal-body .table-scroll {
  overflow-x: auto;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
}

#main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

#main .criteria-table {
  min-width: 520px;
}

#main .criteria-table th,
#main .criteria-table td {
  border: 1px solid var(--doc-line);
  padding: 10px 12px;
  vertical-align: middle;
  text-align: left;
}

#main .criteria-table thead th {
  background: var(--rust, #9f3424);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

#main .criteria-table thead th:first-child {
  text-align: left;
}

#main .criteria-table tbody tr:nth-child(even) {
  background: var(--doc-shade);
}

#main .criteria-table tbody th {
  font-weight: 400;
  line-height: 1.45;
}

#main .criteria-table .choice-cell {
  width: 92px;
  text-align: center;
}

#main .tf-table th,
#main .tf-table td {
  border: 1px solid var(--doc-line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: middle;
}

#main .tf-table thead th {
  background: var(--doc-shade);
  font-weight: 700;
  text-align: center;
}

#main .tf-table thead th:first-child {
  text-align: left;
}

#main .tf-table tbody th {
  font-weight: 400;
  line-height: 1.45;
}

#main .tf-table .choice-cell {
  width: 104px;
  text-align: center;
}

#main .choice-cell .tf-options {
  justify-content: center;
  flex-direction: row;
  gap: 0;
}

#main .choice-cell .tf-options label {
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 6px 10px;
  border-color: #b9b3ad;
  white-space: nowrap;
}

#main .choice-cell .tf-options label:has(input:checked) {
  background: #fbe2d4;
  border-color: var(--rust, #9f3424);
  box-shadow: inset 0 0 0 1px var(--rust, #9f3424);
  font-weight: 600;
}

#main .choice-cell .tf-options label:has(input:focus-visible) {
  outline: 3px solid #006e91;
  outline-offset: 2px;
}

#main .choice-cell .tf-options input {
  width: 17px;
  height: 17px;
  margin: 0;
}

#main .choice-cell .tf-options label:has(input:disabled) {
  cursor: not-allowed;
  opacity: .82;
}

#main .feedback-slot {
  margin: 0 0 8px;
}

#main .feedback-toggle-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
}

#main .feedback-toggle {
  min-height: 44px;
  border: 1px solid #bd9a85;
  border-radius: 4px;
  background: #fff;
  color: var(--rust, #9f3424);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
}

#main .feedback-toggle[aria-expanded="true"] {
  background: var(--peach, #fce0d3);
  border-color: var(--rust, #9f3424);
}

#main .feedback {
  margin-top: 10px;
  max-width: 100%;
}

#main .feedback:focus {
  outline: 3px solid #006e91;
  outline-offset: 2px;
}

#main .feedback-heading {
  margin-bottom: 8px;
}

#main .feedback-list {
  margin: 0;
  padding-left: 22px;
}

#main .feedback-list li {
  margin-bottom: 8px;
}

#main .fb-choice {
  display: block;
  font-size: 13px;
  color: #6e625a;
  font-style: normal;
  margin-top: 2px;
}

#main .fb-pair {
  margin-bottom: 9px;
}

#main .feedback-sub {
  font-weight: 700;
  margin-bottom: 8px;
}

#main .answer-block textarea {
  min-height: 130px;
}

#main .activity {
  margin-bottom: 10px;
}

#main .activity-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  padding-top: 0;
}

#main .activity-title + p {
  margin-bottom: 16px;
}

#main .reading {
  margin-bottom: 24px;
}

#main .reading p {
  font-size: 17px;
  line-height: 1.65;
}

#main .activity-actions {
  margin: 4px 0 14px;
}

#main .primary-action {
  background: var(--rust, #9f3424);
  border: 1px solid #ad472a;
  border-radius: 5px;
  color: #fff;
  font-weight: 600;
  padding: 10px 24px;
  min-height: 46px;
}

/* Balık kılçığı: özgün görsel + erişilebilir metin satırları */
#main .fishbone {
  background: var(--doc-fish);
  padding: 14px 10px;
  margin: 0 0 16px;
}

#main .fishbone img {
  display: block;
  width: 100%;
  height: auto;
}

#main .fish-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-bottom: 14px;
}

#main .fish-group {
  border: 1px solid var(--doc-line);
  border-radius: 5px;
  padding: 10px 14px 14px;
  margin: 0;
  min-width: 0;
}

#main .fish-group legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}

#main .fish-line {
  display: block;
  margin-bottom: 6px;
}

#main .fish-line input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px dotted #6d8b98;
  border-radius: 0;
  background: transparent;
  padding: 6px 2px;
  font-size: 15px;
  color: #22333b;
}

#main .fish-line input:focus-visible {
  outline: 3px solid #006e91;
  outline-offset: 1px;
}

/* 4. Etkinlik: işaretleme kartları */
#main .checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  background: transparent;
  margin-bottom: 22px;
}

#main .check-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 11px 16px;
  background: var(--doc-shade);
  border: 1px solid var(--doc-line);
  border-radius: 5px;
  cursor: pointer;
  line-height: 1.45;
}

#main .check-card:has(input:checked) {
  background: #fbe6da;
  border-color: var(--rust, #9f3424);
}

#main .check-card input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--rust, #9f3424);
  flex-shrink: 0;
}

#main .check-card:has(input:focus-visible) {
  outline: 3px solid #006e91;
  outline-offset: 2px;
}

/* 5. Etkinlik: yasaklı sözcük kartı */
#main .forbidden-layout {
  display: grid;
  grid-template-columns: minmax(190px, 26%) 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 16px;
}

#main .forbidden-card {
  margin: 0;
}

#main .forbidden-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

#main .forbidden-words {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 10px;
  align-content: start;
  padding-top: 6px;
}

#main .word-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
}

#main .word-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#main .word-chip {
  display: grid;
  width: 100%;
  padding: 9px 4px;
  background: var(--doc-across);
  color: var(--doc-across-ink);
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: .03em;
  line-height: 1.2;
  min-height: 44px;
  place-items: center;
  position: relative;
}

#main .word-choice input:checked + .word-chip {
  border-color: var(--rust, #9f3424);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--rust, #9f3424);
  font-weight: 700;
}

#main .word-choice input:checked + .word-chip::before {
  content: "";
  position: absolute;
  top: -9px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rust, #9f3424) url("../assets/isaret-tik.svg") center/14px 14px no-repeat;
  box-shadow: 0 1px 3px #0003;
  pointer-events: none;
}

#main .word-choice input:focus-visible + .word-chip {
  outline: 3px solid #006e91;
  outline-offset: 3px;
}

#main .word-choice input:disabled + .word-chip {
  cursor: not-allowed;
}

#main .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* 7. Etkinlik: bulmaca */
#main .crossword-layout {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 16px;
}

#main .crossword-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

#main .crossword {
  border-collapse: collapse;
  width: auto;
  table-layout: fixed;
}

#main .crossword td {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
}

#main .crossword td.cw-cell {
  border: 1px solid #9a9a9a;
  position: relative;
  background: var(--doc-shade);
}

#main .cw-label {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

#main .cw-number {
  position: absolute;
  left: 2px;
  top: 0;
  font-size: 10px;
  line-height: 1.2;
  color: #3b3b3b;
  pointer-events: none;
}

#main .crossword input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  color: #1d1d1d;
  padding: 10px 2px 2px;
  border-radius: 0;
}

#main .crossword input:focus-visible {
  outline: 3px solid #006e91;
  outline-offset: -3px;
}

#main .crossword-clues {
  min-width: 0;
}

#main .crossword-clues h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

#main .crossword-clues p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 8px;
}

#main .crossword-clues h3 + p {
  margin-top: 0;
}

#main .crossword-clues p + h3 {
  margin-top: 16px;
}

/* Değerlendirme */
#main .checklist-table {
  min-width: 580px;
}

#main .checklist-table .choice-cell {
  width: 88px;
}

#main .form-intro {
  font-weight: 600;
  margin-top: 10px;
}

/* Öğrendiklerim */
#main .definition-box {
  border: 2px solid var(--rust, #9f3424);
  border-radius: 12px;
  padding: 16px 22px;
  margin: 0 0 22px;
  background: #fff;
}

#main .definition-box.quote::before {
  margin-left: 22px;
}

#main .definition-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

#main .library-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 260px));
  gap: 18px;
  margin-bottom: 18px;
}

#main .completion-panel {
  border: 1px solid #e5d9cd;
  background: var(--cream, #faf7eb);
  padding: 18px 20px;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

#main .completion-panel p {
  margin: 0;
  font-weight: 500;
}

#modal-body .pdf-library-page {
  font-size: 16px;
}

#modal-body .definition-box {
  border: 2px solid var(--rust, #9f3424);
  border-radius: 12px;
  padding: 14px 18px;
  background: #fff;
  margin-bottom: 18px;
}

#modal-body .definition-box.quote::before {
  margin-left: 18px;
}

#modal-body .definition-box p {
  margin: 0;
}

#modal-body .diagram-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 46vh;
  object-fit: contain;
}

#modal-body .diagram-figure {
  margin: 0 0 16px;
  background: #f4f2ef;
  display: flex;
  justify-content: center;
}

#modal-body .diagram-legend {
  margin: 0;
  padding-left: 22px;
}

#modal-body .diagram-legend li {
  margin-bottom: 7px;
  line-height: 1.5;
}

@media (max-width: 850px) {
  #main .forbidden-layout {
    grid-template-columns: 1fr;
  }
  #main .forbidden-card {
    max-width: 320px;
  }
  #main .forbidden-words {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #main .crossword-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  #main .two-col {
    grid-template-columns: 1fr;
  }
  #main .library-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #main .fish-inputs {
    grid-template-columns: 1fr;
  }
  #main .forbidden-words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #main .crossword td {
    width: 32px;
    height: 32px;
  }
  #main .crossword input {
    font-size: 14px;
    padding-top: 9px;
  }
  #main .criteria-table,
  #main .checklist-table,
  #main .tf-table {
    font-size: 14px;
  }
  #main .choice-cell .tf-options label {
    padding: 6px 7px;
    font-size: 13px;
  }
  #main .activity-title {
    font-size: 16px;
  }
  #main .intro-content {
    font-size: 16px;
  }
}

/* Erisilebilirlik duzeltmesi (Lighthouse: color-contrast).
   Kart on yuzundeki "Incele" etiketi --accent (#c14f28) ile kart zemini
   #fff1e9 uzerinde 4.30:1 kaliyordu; WCAG AA esigi 4.5:1. Ortak kit
   dosyasi degistirilmeden yalniz bu etiket koyulastirildi: 5.12:1.
   Secici, kitin .card .open-label kuralina esit ozgulluktedir ve
   #main altinda kapsamlandigi icin kita gore daha belirgindir. */
#main .library-cards .card .open-label {
  color: #ad472a;
}

/* Karekod blogu. Kaynakta belgesel baglantisi karekodla veriliyor; kullanici
   talimatiyla (2026-10-27) karekod ogrenci arayuzunde kalir ve tiklaninca
   hedef acilir. Gorsel yereldir; yalniz dis baglanti tiklamayla calisir. */
#main .qr-block, #modal-body .qr-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: var(--tint, #fff1e9);
  border: 1px solid var(--line, #ddd6d0);
  border-radius: 10px;
}
#main .qr-link, #modal-body .qr-link {
  display: block;
  flex: 0 0 auto;
  border-radius: 6px;
  line-height: 0;
}
#main .qr-img, #modal-body .qr-img {
  display: block;
  width: 96px;
  height: 96px;
  border: 0;
  background: #fff;
}
#main .qr-link:focus-visible, #modal-body .qr-link:focus-visible,
#main .qr-url:focus-visible, #modal-body .qr-url:focus-visible {
  outline: 3px solid var(--accent, #c14f28);
  outline-offset: 2px;
}
#main .qr-text, #modal-body .qr-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#main .qr-label, #modal-body .qr-label {
  font-weight: 600;
  line-height: 1.4;
}
#main .qr-url, #modal-body .qr-url {
  color: #ad472a;
  font-size: 0.95em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 560px) {
  #main .qr-block, #modal-body .qr-block { flex-direction: column; align-items: flex-start; }
}
