/* Programlama Temelleri — page-specific styles. Reuses the shared site
   tokens defined in site-shell.css (--bg, --panel, --text, --muted,
   --accent, --accent-2, --border, --shadow, --radius, --container).
   Typography intentionally matches the rest of the site (Inter, the same
   font every other tool page loads) instead of falling back to the
   browser default serif face. */

:root {
  --pt-code-bg: #0b1220;
  --pt-code-text: #e2e8f0;
  --pt-output-bg: #07140f;
  --pt-output-text: #bdf3d2;
  --pt-output-accent: #34d399;
  --pt-correct: #34d399;
  --pt-incorrect: #f87171;
}

body.light-theme {
  --pt-code-bg: #0f172a;
  --pt-code-text: #e8f0ff;
  --pt-output-bg: #f0fdf6;
  --pt-output-text: #065f46;
  --pt-output-accent: #059669;
}

.pt-page {
  background:
    radial-gradient(circle at 8% 0, #18376855, transparent 35%),
    linear-gradient(155deg, #061023, #0b1730);
  color: var(--text);
  min-height: 100vh;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.light-theme.pt-page {
  background: #eaf1f8;
  color: #17243a;
}

.pt-page h1,
.pt-page h2,
.pt-page h3,
.pt-page h4 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pt-page p,
.pt-page li {
  line-height: 1.7;
}

.pt-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding-bottom: 60px;
}

/* ===== Hero ===== */

.pt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 28px;
  align-items: stretch;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  padding: 32px;
}

.pt-hero-text {
  display: grid;
  gap: 12px;
  align-content: start;
}

.pt-hero-text h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.pt-hero-subtitle {
  margin: 0;
  font-weight: 600;
  color: var(--accent-2);
  font-size: 1.05rem;
  line-height: 1.5;
}

.pt-hero-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 700px;
}

.pt-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pt-stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(158, 185, 236, 0.07);
}

.pt-stat strong {
  font-size: 1.4rem;
  color: var(--accent-2);
  font-weight: 700;
}

.pt-stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.pt-hero-card {
  background: rgba(7, 19, 41, 0.5);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}

body.light-theme .pt-hero-card {
  background: #f7faff;
}

.pt-hero-card strong {
  color: var(--accent-2);
  font-weight: 700;
}

.pt-hero-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .pt-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }
}

/* ===== Search bar ===== */

.pt-controls {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: grid;
  gap: 10px;
}

.pt-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pt-search-field {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(7, 19, 41, 0.5);
}

body.light-theme .pt-search-field {
  background: #f7faff;
}

.pt-search-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.pt-search-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 12px 4px;
  font: inherit;
  outline: none;
}

.pt-search-status {
  margin: 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.pt-search-status.is-empty-state {
  color: var(--pt-incorrect);
}

.pt-search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pt-search-result-chip {
  border: 1px solid rgba(126, 240, 204, 0.35);
  background: rgba(126, 240, 204, 0.1);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.pt-search-result-chip:hover {
  background: rgba(126, 240, 204, 0.2);
}

/* ===== Course layout: week selector + selected week ===== */

.pt-course-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .pt-course-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pt-week-selector {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pt-week-selector-head {
  flex-shrink: 0;
}

.pt-week-selector-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pt-week-progress {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.pt-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(158, 185, 236, 0.12);
  overflow: hidden;
  margin-bottom: 14px;
}

.pt-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.pt-week-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
}

.pt-week-list::-webkit-scrollbar {
  width: 6px;
}

.pt-week-list-item {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 10px 9px 12px;
  cursor: pointer;
  font: inherit;
  position: relative;
}

.pt-week-list-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
}

.pt-week-list-item:hover {
  background: rgba(158, 185, 236, 0.08);
  color: var(--text);
}

.pt-week-list-item:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.pt-week-list-item.is-active {
  background: linear-gradient(130deg, rgba(92, 163, 255, 0.18), rgba(126, 240, 204, 0.12));
  color: var(--text);
}

.pt-week-list-item.is-active::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.pt-week-list-item.is-hidden-by-search {
  display: none;
}

.pt-week-list-number {
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(158, 185, 236, 0.14);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
}

.pt-week-list-item.is-active .pt-week-list-number {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #052036;
}

.pt-week-list-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.pt-week-list-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  font-size: 0.84rem;
  font-weight: 700;
}

.pt-week-list-item.is-active .pt-week-list-title {
  font-weight: 800;
}

.pt-week-list-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Mobile: horizontal scrollable chip row instead of a sidebar list */

.pt-week-chip-row {
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}

.pt-week-chip-row::-webkit-scrollbar {
  height: 6px;
}

.pt-week-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(158, 185, 236, 0.07);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.pt-week-chip.is-active {
  color: #052036;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.pt-week-chip.is-hidden-by-search {
  display: none;
}

@media (max-width: 980px) {
  .pt-week-selector {
    display: none;
  }
  .pt-week-chip-row {
    display: flex;
  }
}

/* ===== Selected week panel ===== */

.pt-week-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px 30px;
  scroll-margin-top: 90px;
}

.pt-week-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.pt-week-panel-number {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #052036;
  font-weight: 800;
  font-size: 1.05rem;
}

.pt-week-panel-text {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pt-week-panel-text h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
}

.pt-week-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pt-week-level {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.pt-week-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pt-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(158, 185, 236, 0.1);
}

.pt-badge-temel { color: #93c5fd; background: rgba(147, 197, 253, 0.12); }
.pt-badge-kod { color: #7ef0cc; background: rgba(126, 240, 204, 0.12); }
.pt-badge-sinav { color: #fca5a5; background: rgba(252, 165, 165, 0.12); }
.pt-badge-uygulama { color: #fcd34d; background: rgba(252, 211, 77, 0.12); }

.pt-week-keywords {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ===== Generic section ===== */

.pt-section {
  margin-top: 26px;
}

.pt-section:first-child {
  margin-top: 0;
}

.pt-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1.06rem;
  font-weight: 700;
}

.pt-section p {
  color: var(--text);
}

.pt-section ul,
.pt-section ol {
  padding-left: 22px;
  display: grid;
  gap: 7px;
}

.pt-goals-list li::marker {
  color: var(--accent-2);
}

.pt-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.pt-concept-card {
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(158, 185, 236, 0.05);
}

.pt-concept-card strong {
  display: block;
  color: var(--accent-2);
  margin-bottom: 4px;
  font-weight: 700;
}

.pt-concept-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Flowchart-style pseudo diagram blocks */

.pt-flow {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 14px 0;
}

.pt-flow-step {
  width: min(420px, 100%);
  text-align: center;
  padding: 10px 16px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.pt-flow-start-end {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #052036;
}

.pt-flow-io {
  border-radius: 4px 18px 4px 18px;
  background: rgba(126, 240, 204, 0.12);
}

.pt-flow-process {
  border-radius: 8px;
  background: rgba(158, 185, 236, 0.1);
}

.pt-flow-decision {
  background: rgba(252, 211, 77, 0.14);
  border-radius: 4px;
  position: relative;
}

.pt-flow-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

/* ===== Code + output blocks ===== */

.pt-example {
  margin: 16px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pt-example-title {
  padding: 12px 16px;
  background: rgba(158, 185, 236, 0.08);
  font-weight: 700;
  font-size: 0.94rem;
}

.pt-example-explanation {
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.pt-code-block {
  background: var(--pt-code-bg);
  color: var(--pt-code-text);
  margin-top: 10px;
}

.pt-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pt-code-lang {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7ef0cc;
}

.pt-copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.pt-copy-btn:hover {
  border-color: rgba(126, 240, 204, 0.5);
}

.pt-copy-btn.is-copied {
  color: #052036;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.pt-code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  max-width: 100%;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre;
}

.pt-output-block {
  background: var(--pt-output-bg);
  border-top: 1px dashed rgba(126, 240, 204, 0.3);
}

.pt-output-head {
  padding: 8px 14px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pt-output-accent);
  border-bottom: 1px solid rgba(126, 240, 204, 0.18);
}

.pt-output-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  max-width: 100%;
  color: var(--pt-output-text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.pt-line-notes {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}

.pt-line-notes-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 8px;
}

.pt-line-notes ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pt-line-notes li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.pt-line-notes code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: rgba(158, 185, 236, 0.12);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.86em;
  color: var(--accent-2);
}

.pt-example-notes {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== Callouts (lighter, fewer nested borders) ===== */

.pt-callout {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 12px;
  display: grid;
  gap: 6px;
}

.pt-callout strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.pt-callout-mistake { background: rgba(252, 165, 165, 0.08); }
.pt-callout-mistake strong { color: #fca5a5; }

.pt-callout-exam { background: rgba(147, 197, 253, 0.08); }
.pt-callout-exam strong { color: #93c5fd; }

.pt-callout-practice { background: rgba(126, 240, 204, 0.08); }
.pt-callout-practice strong { color: #7ef0cc; }

.pt-callout ul,
.pt-callout ol,
.pt-callout p {
  margin: 0;
}

.pt-callout-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

/* ===== Exercises (plain list — solved on paper / editor) ===== */

.pt-exercise-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.pt-question-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pt-question;
}

.pt-question-list li {
  counter-increment: pt-question;
  border-radius: 10px;
  padding: 10px 14px 10px 44px;
  position: relative;
  background: rgba(158, 185, 236, 0.04);
}

.pt-question-list li::before {
  content: counter(pt-question);
  position: absolute;
  left: 12px;
  top: 10px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(158, 185, 236, 0.16);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
}

/* ===== Interactive quiz (one question at a time) ===== */

.pt-quiz {
  border-radius: 16px;
  background: rgba(99, 178, 255, 0.05);
  padding: 20px;
}

.pt-quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pt-quiz-progress-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.pt-quiz-progress-bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(158, 185, 236, 0.14);
  overflow: hidden;
  margin: 0 12px;
}

.pt-quiz-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}

.pt-quiz-restart-link {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  flex-shrink: 0;
}

.pt-quiz-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 4px 0 16px;
  line-height: 1.5;
}

.pt-quiz-options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.pt-quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(7, 19, 41, 0.4);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.94rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.light-theme .pt-quiz-option {
  background: #f7faff;
}

.pt-quiz-option:hover:not(:disabled) {
  border-color: rgba(126, 240, 204, 0.5);
}

.pt-quiz-option:disabled {
  cursor: default;
}

.pt-quiz-option-letter {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(158, 185, 236, 0.14);
  font-weight: 800;
  font-size: 0.78rem;
}

.pt-quiz-option.is-selected {
  border-color: var(--accent);
}

.pt-quiz-option.is-correct {
  border-color: var(--pt-correct);
  background: rgba(52, 211, 153, 0.14);
}

.pt-quiz-option.is-correct .pt-quiz-option-letter {
  background: var(--pt-correct);
  color: #052036;
}

.pt-quiz-option.is-incorrect {
  border-color: var(--pt-incorrect);
  background: rgba(248, 113, 113, 0.12);
}

.pt-quiz-option.is-incorrect .pt-quiz-option-letter {
  background: var(--pt-incorrect);
  color: #2a0a0a;
}

.pt-quiz-feedback {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.pt-quiz-feedback.is-correct {
  background: rgba(52, 211, 153, 0.12);
  color: var(--text);
}

.pt-quiz-feedback.is-incorrect {
  background: rgba(248, 113, 113, 0.12);
  color: var(--text);
}

.pt-quiz-feedback-title {
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.pt-quiz-feedback.is-correct .pt-quiz-feedback-title { color: var(--pt-correct); }
.pt-quiz-feedback.is-incorrect .pt-quiz-feedback-title { color: var(--pt-incorrect); }

.pt-quiz-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.pt-quiz-result {
  text-align: center;
  padding: 10px 0;
}

.pt-quiz-result-score {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-2);
  margin: 6px 0;
}

.pt-quiz-result-pct {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.pt-quiz-result-feedback {
  max-width: 480px;
  margin: 0 auto 18px;
  color: var(--text);
  line-height: 1.6;
}

.pt-quiz-empty {
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
}

/* ===== Buttons ===== */

.pt-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.pt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pt-btn-ghost {
  background: rgba(158, 185, 236, 0.08);
  color: var(--text);
}

.pt-btn-ghost:hover:not(:disabled) {
  border-color: rgba(126, 240, 204, 0.4);
}

.pt-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #052036;
  border-color: transparent;
}

/* ===== Week footer navigation ===== */

.pt-week-footer-nav {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pt-week-footer-progress {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  order: 3;
  flex: 1 0 100%;
  text-align: center;
}

@media (min-width: 640px) {
  .pt-week-footer-progress {
    order: 0;
    flex: 0 0 auto;
  }
}

/* ===== Footer note ===== */

.pt-footer-note {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.pt-footer-note h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.pt-footer-note p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.pt-footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pt-footer-links a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(7, 19, 41, 0.5);
}

body.light-theme .pt-footer-links a {
  background: #f7faff;
}

.pt-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #052036;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 50;
}

.pt-back-to-top.hidden {
  display: none;
}

/* Light theme contrast tweaks */

body.light-theme.pt-page .pt-week-panel,
body.light-theme.pt-page .pt-hero,
body.light-theme.pt-page .pt-controls,
body.light-theme.pt-page .pt-week-selector,
body.light-theme.pt-page .pt-footer-note {
  background: #ffffff;
  color: #17243a;
}

body.light-theme.pt-page .pt-concept-card,
body.light-theme.pt-page .pt-stat,
body.light-theme.pt-page .pt-week-chip,
body.light-theme.pt-page .pt-quiz-option {
  background: #f3f7fc;
}

/* Responsive breakpoints */

@media (max-width: 720px) {
  .pt-week-panel {
    padding: 18px 16px 22px;
  }
  .pt-concept-grid {
    grid-template-columns: 1fr;
  }
  .pt-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .pt-quiz-nav-row {
    flex-wrap: wrap;
  }
  .pt-week-footer-nav .pt-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .pt-hero {
    padding: 18px;
  }
  .pt-week-panel-number {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }
  .pt-question-list li {
    padding-left: 38px;
  }
}

/* ===== Function-thinking callout ===== */

.pt-callout-function {
  background: rgba(167, 139, 250, 0.1);
}

.pt-callout-function strong {
  color: #c4b5fd;
}

/* ===== Flowchart "loop" step (used in week 2 + symbol legend) ===== */

.pt-flow-loop {
  border: 1px dashed rgba(167, 139, 250, 0.5);
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.08);
  font-style: italic;
  font-size: 0.84rem;
}

/* ===== Flowchart symbol legend (Week 2) ===== */

.pt-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.pt-symbol-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(158, 185, 236, 0.05);
}

.pt-symbol-preview {
  flex-shrink: 0;
  width: 76px;
}

.pt-symbol-shape {
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
  padding: 8px 6px;
}

.pt-symbol-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pt-symbol-text strong {
  color: var(--accent-2);
  font-size: 0.88rem;
}

.pt-symbol-text span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ===== Comparison table (Week 2) ===== */

.pt-comparison-scroll {
  overflow-x: auto;
  border-radius: 12px;
  max-width: 100%;
}

.pt-comparison-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
}

.pt-comparison-table th,
.pt-comparison-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

.pt-comparison-table thead th {
  background: rgba(158, 185, 236, 0.1);
  color: var(--accent-2);
  font-weight: 700;
  white-space: nowrap;
}

.pt-comparison-row-label {
  background: rgba(126, 240, 204, 0.08);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.pt-comparison-table td pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text);
}

/* ===== Per-example problem statement / algorithm steps / inline flowchart ===== */

.pt-example-problem,
.pt-example-steps {
  padding: 10px 16px 0;
}

.pt-example-problem strong,
.pt-example-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pt-example-problem p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.pt-example-steps ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.9rem;
  display: grid;
  gap: 4px;
}

.pt-example-flowchart {
  padding: 14px 16px 0;
}

.pt-example-flowchart .pt-flow {
  margin: 0;
}

/* ===== Girdi-Cikti Tahmini (output prediction) ===== */

.pt-iop-card {
  border-radius: 14px;
  background: rgba(99, 178, 255, 0.05);
  padding: 16px;
  margin-bottom: 14px;
}

.pt-iop-card:last-child {
  margin-bottom: 0;
}

.pt-iop-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.pt-iop-input {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.pt-iop-input code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: rgba(158, 185, 236, 0.12);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--accent-2);
}

.pt-iop-question {
  margin-top: 8px;
  font-weight: 600;
}

.pt-iop-choose-hint {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}
