/* ═══════════════════════════════════════════════════════════
   TIMETABLE AI — Stylesheet (original aesthetic preserved)
   ═══════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #141418;
  background: #cecbcb;
}

/* ─── Shell / Container ──────────────────────────────────── */
.shell {
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 28px 34px;
  border-radius: 30px;
  background: #d8d4d4;
  border: 1px solid #c9c4c4;
}

/* ─── Topbar / Navbar ────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 22px;
  height: 26px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #16171c 0%, #343740 100%);
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.03rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topnav a {
  color: #3d4047;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.topnav a:hover { color: #141418; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions button {
  width: auto;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.87rem;
}

.ghost {
  border: 1px solid #a7a1a1;
  background: transparent;
  color: #191b22;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ghost:hover {
  background: rgba(0,0,0,0.05);
}

/* Academic mode active state */
.ghost.active-mode {
  background: #181a20;
  color: #f6f5ed;
  border-color: #181a20;
}

.accent {
  border: 1px solid #ece8c6;
  background: #efeac3;
  color: #1a1b20;
  box-shadow: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.accent:hover { opacity: 0.88; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  margin-top: 58px;
  margin-bottom: 84px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 640px;
  font-weight: 600;
}

.hero p {
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* ─── Main Grid ──────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 22px;
}

/* ─── Panels ─────────────────────────────────────────────── */
.panel {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 18px;
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #343842;
  background: #ebe7e7;
  border: 1px solid #c3bdbd;
  border-radius: 999px;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2f333c;
}

h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2e323a;
}

/* ─── Form Elements ──────────────────────────────────────── */
label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 0.81rem;
  color: #3f434d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #bfbaba;
  background: #f3f0f0;
  color: #191b22;
  font-size: 0.93rem;
  font-family: inherit;
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #888383;
  background: #f9f8f8;
}

input::placeholder,
textarea::placeholder {
  color: #6d727f;
}

textarea {
  resize: vertical;
  line-height: 1.45;
  min-height: 88px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%233d4047' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

button:not(.ghost):not(.accent):not(.am-tab):not(.export-btn):not(.btn-recalc) {
  border: 1px solid #181a20;
  background: #181a20;
  color: #f6f5ed;
  cursor: pointer;
  font-weight: 600;
  box-shadow: none;
}

button:not(.ghost):not(.accent):not(.am-tab):not(.export-btn):not(.btn-recalc):hover {
  opacity: 0.88;
}

button.secondary {
  background: transparent !important;
  color: #151821 !important;
  border-color: #848080 !important;
  box-shadow: none !important;
}

button.secondary:hover {
  background: rgba(0,0,0,0.04) !important;
}

.status {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 0.84rem;
  border: 1px solid #c5c0c0;
  border-radius: 12px;
  padding: 9px 10px;
  background: #eeeaea;
  color: #3d4047;
}

/* ─── Output Blocks ──────────────────────────────────────── */
.block {
  margin-bottom: 14px;
  border: 1px solid #cdc8c8;
  border-radius: 14px;
  padding: 13px;
  background: #f8f5f5;
}

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

.block-head-row h3 { margin-bottom: 0; }

/* ─── Tables ─────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.87rem;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid #cfcaca;
}

th, td {
  border-bottom: 1px solid #ddd9d9;
  padding: 10px;
  text-align: left;
}

th {
  background: #e8e3e3;
  color: #2b2f38;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #efebeb; }

.validation {
  margin-top: 11px;
  font-weight: 600;
  font-size: 0.86rem;
  border: 1px solid #cbc5c5;
  border-radius: 11px;
  background: #ebe7e7;
  padding: 8px 10px;
}

.explain-list {
  margin: 0;
  padding-left: 18px;
}

.explain-list li {
  margin-bottom: 6px;
  color: #353943;
  line-height: 1.45;
  font-size: 0.9rem;
}

/* ─── Status / State colors ──────────────────────────────── */
.muted   { color: #626672; }
.success { color: #0f5132; border-color: #9dc7b1 !important; background: #ddeee6 !important; }
.error   { color: #7f1d1d; border-color: #d8b4b4 !important; background: #f2dddd !important; }
.hidden  { display: none !important; }

/* ─── Export buttons ─────────────────────────────────────── */
.export-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.export-btn {
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.export-btn:hover { opacity: 0.8; }

.export-btn-pdf {
  background: #fde8e8;
  color: #7f1d1d;
  border: 1px solid #e8c5c5;
}

.export-btn-png {
  background: #ddeee6;
  color: #0f5132;
  border: 1px solid #9dc7b1;
}

/* ═══════════════════════════════════════════════════════════
   HOW IT WORKS SECTION
   ═══════════════════════════════════════════════════════════ */
.section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid #c9c4c4;
}

.section-header {
  margin-bottom: 36px;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d4047;
  background: #ebe7e7;
  border: 1px solid #c3bdbd;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #141418;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 0.93rem;
  color: #626672;
  max-width: 520px;
}

/* Steps row */
.steps-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}

.step-card {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 22px 20px;
}

.step-num {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #888383;
  margin-bottom: 10px;
}

.step-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: block;
}

.step-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #141418;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.step-card p {
  font-size: 0.83rem;
  color: #626672;
  line-height: 1.6;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 1.2rem;
  color: #a9a4a4;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════ */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.about-desc {
  font-size: 0.92rem;
  color: #3d4047;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-desc strong { color: #141418; }

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.feature-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: #3d4047;
  background: #ebe7e7;
  border: 1px solid #c3bdbd;
  border-radius: 999px;
  padding: 5px 14px;
}

/* Contact block */
.contact-card-block {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 22px;
}

.contact-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888383;
  margin-bottom: 16px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #181a20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #f6f5ed;
  flex-shrink: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #141418;
}

.contact-email {
  font-size: 0.82rem;
  color: #3d4047;
  text-decoration: none;
  transition: color 0.15s;
}

.contact-email:hover { color: #141418; }

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
}

.contact-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ebe7e7;
  border: 1px solid #c3bdbd;
  color: #3d4047;
  text-decoration: none;
  transition: background 0.15s;
  overflow-wrap: anywhere;
}

.contact-badge:hover { background: #d8d4d4; }

.tech-block {
  margin-top: 16px;
  border-top: 1px solid #cdc8c8;
  padding-top: 16px;
}

.tech-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888383;
  display: block;
  margin-bottom: 10px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ebe7e7;
  border: 1px solid #cdc8c8;
  color: #3d4047;
}

/* ═══════════════════════════════════════════════════════════
   ACADEMIC MODE SECTION
   ═══════════════════════════════════════════════════════════ */
.academic-section {}

/* Tabs */
.am-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.am-tab {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid #bfbaba;
  background: transparent;
  color: #3d4047;
  width: auto;
  cursor: pointer;
  transition: all 0.15s;
}

.am-tab.active {
  background: #181a20;
  border-color: #181a20;
  color: #f6f5ed;
}

.am-tab:hover:not(.active) {
  background: rgba(0,0,0,0.05);
}

/* AM form grid */
.am-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 18px;
  padding: 24px;
}

.am-col h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #141418;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.am-hint {
  font-size: 0.82rem;
  color: #626672;
  margin-bottom: 10px;
  line-height: 1.5;
}

.am-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.am-option label { margin-top: 0; }

.am-subject-diff-list {
  background: #f3f0f0;
  border: 1px solid #cdc8c8;
  border-radius: 12px;
  padding: 14px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.am-diff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.am-diff-row label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.86rem;
  color: #141418;
  font-weight: 500;
}

.am-diff-row select {
  width: auto;
  min-width: 90px;
  padding: 6px 28px 6px 10px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* OCR Panel */
.ocr-drop-zone {
  border: 2px dashed #bfbaba;
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #f5f2f2;
}

.ocr-drop-zone.drag-over {
  border-color: #888383;
  background: #ebe7e7;
}

.ocr-icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }

.ocr-label {
  font-size: 0.93rem;
  color: #3d4047;
  margin-bottom: 6px;
}

.ocr-browse-link {
  color: #141418;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.ocr-hint {
  font-size: 0.8rem;
  color: #888383;
}

.ocr-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  background: #ebe7e7;
  border: 1px solid #cdc8c8;
  color: #3d4047;
}

.ocr-preview-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  margin-top: 14px;
  object-fit: contain;
  border: 1px solid #c8c3c3;
}

/* ── Academic Mode Output ────────────────────────────────── */
.am-output {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.am-section-head {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2e323a;
  margin-bottom: 16px;
}

/* Countdown Panel */
.countdown-panel {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 20px;
}

.countdown-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.countdown-card {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #cdc8c8;
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
}

.countdown-subject {
  font-size: 0.88rem;
  font-weight: 700;
  color: #141418;
  margin-bottom: 4px;
}

.countdown-date {
  font-size: 0.76rem;
  color: #888383;
  margin-bottom: 8px;
}

.countdown-days {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
  color: #141418;
}

.countdown-days-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888383;
}

.urgency-high   .countdown-days { color: #7f1d1d; }
.urgency-medium .countdown-days { color: #92400e; }
.urgency-low    .countdown-days { color: #0f5132; }

/* ─── Calendar — Table Style (matches reference image) ──── */
.calendar-block {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 20px;
  overflow-x: auto;
}

/* wrapper div for the table */
.calendar-grid {}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 700px;
}

/* Day header row (MON TUE WED …) */
.cal-th-week {
  width: 52px;
  background: #f0eded;
  border: 1px solid #ddd9d9;
  padding: 8px 6px;
}

.cal-th-day {
  text-align: center;
  padding: 10px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3d4047;
  background: #ebe7e7;
  border: 1px solid #ddd9d9;
}

/* Week label cell */
.cal-td-week {
  text-align: center;
  vertical-align: top;
  padding: 10px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #888383;
  background: #f0eded;
  border: 1px solid #ddd9d9;
  white-space: nowrap;
}

/* Normal day cell */
.cal-cell {
  vertical-align: top;
  padding: 8px 10px;
  border: 1px solid #ddd9d9;
  background: #fff;
  min-height: 72px;
  min-width: 80px;
}

.cal-cell.is-today {
  background: #f5f2f2;
  box-shadow: inset 0 0 0 2px #888383;
}

.cal-cell.is-past {
  opacity: 0.5;
}

/* Date label inside cell (e.g. "26 Apr") */
.cal-cell-date {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #888383;
  margin-bottom: 5px;
}

/* Content chips — full-width, text wraps */
.cal-chip {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  margin-top: 3px;
  line-height: 1.45;
  word-break: break-word;
  white-space: normal;
}

.cal-chip-study {
  background: rgba(180, 160, 255, 0.18);
  color: #4a2fad;
}

.cal-chip-revision {
  background: rgba(245, 158, 11, 0.15);
  color: #7a4400;
}

.cal-chip-exam {
  background: rgba(239, 68, 68, 0.13);
  color: #7f1d1d;
}



/* Editable Schedule */
.schedule-block {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 20px;
}

.schedule-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-recalc {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #bfbaba;
  background: transparent;
  color: #141418;
  width: auto;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-recalc:hover {
  background: #ebe7e7;
}

.editable-schedule {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 380px;
  overflow-y: auto;
}

.sched-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd9d9;
  border-radius: 10px;
  padding: 9px 12px;
}

.sched-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: #3d4047;
}

.sched-subject-input {
  font-size: 0.86rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f3f0f0;
  border: 1px solid #cdc8c8;
  color: #141418;
  font-family: inherit;
  width: 100%;
}

.sched-subject-input:focus {
  outline: none;
  border-color: #888383;
}

.sched-subject-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sched-exam-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fde8e8;
  color: #7f1d1d;
  border: 1px solid #e8c5c5;
  white-space: nowrap;
}

.sched-exam-badge.revision {
  background: #fef9ec;
  color: #92400e;
  border-color: #f5dba0;
}

/* AM export row */
.am-export-row {
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 16px;
  padding: 20px;
}

.am-export-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.am-export-btns .export-btn {
  padding: 10px 22px;
  font-size: 0.86rem;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8c3c3; border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════
   ACADEMIC MODE — FULL-SCREEN PAGE
   ═══════════════════════════════════════════════════════════ */

.academic-page {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  z-index: 999;
  background: #cecbcb;
  padding: 20px;
}

.ap-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 28px 48px;
  border-radius: 30px;
  background: #d8d4d4;
  border: 1px solid #c9c4c4;
  min-height: calc(100vh - 40px);
}

/* Academic page header */
.ap-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid #c9c4c4;
}

.ap-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #141418;
  text-align: center;
  margin: 0;
  /* override h1 margin from base */
  line-height: 1.2;
}

.ap-back-btn {
  width: auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid #a7a1a1;
  background: transparent;
  color: #3d4047;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.ap-back-btn:hover {
  background: #181a20;
  color: #f6f5ed;
  border-color: #181a20;
}

/* OCR parsed results list */
.ocr-parsed-heading {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f5132;
  margin-bottom: 12px;
}

.ocr-parsed-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 280px;
  overflow-y: auto;
  background: #f5f2f2;
  border: 1px solid #c8c3c3;
  border-radius: 12px;
  padding: 12px;
}

.ocr-parsed-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd9d9;
  border-radius: 8px;
  padding: 8px 12px;
}

.ocr-parsed-subject {
  font-size: 0.85rem;
  font-weight: 600;
  color: #141418;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ocr-parsed-date {
  font-size: 0.8rem;
  color: #3d4047;
  font-weight: 500;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1120px) {
  .topbar { grid-template-columns: 1fr; gap: 14px; }
  .topnav { flex-wrap: wrap; gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 20px; margin-top: 34px; margin-bottom: 36px; }
  .hero p { font-size: 1.35rem; line-height: 1.2; }
  .steps-row { grid-template-columns: 1fr; gap: 12px; }
  .step-arrow { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .am-form-grid { grid-template-columns: 1fr; }
  .ap-header { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .ap-back-btn { justify-self: center; }
}

@media (max-width: 940px) {
  .shell { padding: 12px; }
  .container { padding: 18px; border-radius: 20px; }
  .grid { grid-template-columns: 1fr; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .actions { grid-template-columns: 1fr; }
  .am-options-row { grid-template-columns: 1fr 1fr; }
  .cal-table { min-width: 600px; }
  .sched-row { grid-template-columns: 100px 1fr; }
  .sched-exam-badge { display: none; }
  .academic-page { padding: 12px; }
  .ap-container { padding: 18px; border-radius: 20px; }
}

@media (max-width: 600px) {
  .am-options-row { grid-template-columns: 1fr; }
  .countdown-cards { flex-direction: column; }
  .am-export-btns { flex-direction: column; }
  .ocr-parsed-row { grid-template-columns: 1fr; }
  .ocr-parsed-date { text-align: left; }
}
