:root {
  --kent-bg: #fbf8f3;
  --kent-card: #ffffff;
  --kent-text: #121212;
  --kent-muted: #6b655f;
  --kent-line: #e8e0d7;
  --kent-orange: #f4512a;
  --kent-orange-soft: #fff0ea;
  --kent-green: #18794e;
  --kent-green-soft: #eaf7f0;
  --kent-red: #b42318;
  --kent-red-soft: #fff0ee;
  --kent-blue: #2f5f9f;
  --kent-blue-soft: #eef4fc;
  --shadow: 0 16px 45px rgba(32, 24, 16, .07);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--kent-bg); color: var(--kent-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.progress-page { min-height: 72vh; padding: 48px 20px 72px; }
.section-wrap { width: min(1120px, 100%); margin: 0 auto 24px; }
.progress-loading, .progress-auth { width: min(760px, 100%); margin: 80px auto; text-align: center; background: var(--kent-card); border: 1px solid var(--kent-line); border-radius: 26px; padding: 48px 30px; box-shadow: var(--shadow); }
.loading-dot { width: 14px; height: 14px; margin: 0 auto 16px; border-radius: 50%; background: var(--kent-orange); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); opacity: .45; } }
.eyebrow { display: inline-block; color: var(--kent-orange); text-transform: uppercase; font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .11em; }
.progress-auth h1 { font-size: clamp(30px, 5vw, 48px); margin: 12px 0; }
.progress-auth p { color: var(--kent-muted); font-size: 17px; }
.primary-button { display: inline-flex; margin-top: 16px; padding: 13px 22px; border-radius: 999px; background: var(--kent-orange); color: #fff; text-decoration: none; font-weight: 800; }

.progress-hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 32px 34px; border: 1px solid var(--kent-line); border-radius: 30px; background: linear-gradient(135deg, #fff 0%, #fff8f4 100%); box-shadow: var(--shadow); }
.progress-hero h1 { margin: 8px 0 4px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.04em; }
.hero-course { margin: 0; color: var(--kent-muted); font-size: 17px; }
.student-code { flex: 0 0 auto; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--kent-line); background: #fff; font-size: 13px; font-weight: 800; letter-spacing: .06em; }

.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.overview-card { min-height: 150px; background: var(--kent-card); border: 1px solid var(--kent-line); border-radius: 24px; padding: 22px; box-shadow: 0 8px 25px rgba(32,24,16,.04); }
.overview-card .label { color: var(--kent-muted); font-size: 13px; font-weight: 700; }
.overview-card .value { margin-top: 10px; font-size: 34px; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.overview-card .detail { margin-top: 10px; color: var(--kent-muted); font-size: 13px; line-height: 1.45; }

.panel, .insight-card { background: var(--kent-card); border: 1px solid var(--kent-line); border-radius: 26px; padding: 28px; box-shadow: 0 9px 26px rgba(32,24,16,.04); }
.insight-card { border-left: 5px solid var(--kent-orange); }
.insight-card p { margin: 14px 0 0; color: #312d29; font-size: 16px; line-height: 1.75; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 0; }
.section-heading h2 { margin: 5px 0 0; font-size: 27px; letter-spacing: -.025em; }
.section-badge { border-radius: 999px; padding: 8px 11px; background: var(--kent-orange-soft); color: #a43a1f; font-size: 12px; font-weight: 800; white-space: nowrap; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric { padding: 16px; border-radius: 18px; background: #faf8f5; border: 1px solid #eee7df; }
.metric .metric-value { display: block; font-size: 24px; font-weight: 900; letter-spacing: -.025em; }
.metric .metric-label { display: block; margin-top: 5px; color: var(--kent-muted); font-size: 12px; font-weight: 700; }
.data-note, .empty-note { color: var(--kent-muted); font-size: 13px; line-height: 1.5; }
.empty-note { padding: 18px; border: 1px dashed var(--kent-line); border-radius: 16px; background: #fcfbf9; }

.history-list, .assessment-list { display: grid; gap: 10px; }
.history-item, .assessment-item { display: grid; grid-template-columns: minmax(120px, .32fr) 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--kent-line); }
.history-item:first-child, .assessment-item:first-child { border-top: 0; }
.history-meta { color: var(--kent-muted); font-size: 12px; font-weight: 700; }
.history-item h3, .assessment-item h3 { margin: 0 0 5px; font-size: 15px; }
.history-item p, .assessment-item p { margin: 0; color: var(--kent-muted); font-size: 13px; line-height: 1.55; }

.attendance-list { display: grid; gap: 10px; }
.attendance-item { display: grid; grid-template-columns: 86px 155px 1fr auto; align-items: center; gap: 15px; padding: 15px 16px; border: 1px solid var(--kent-line); border-radius: 18px; background: #fff; }
.session-no { font-weight: 900; font-size: 14px; }
.session-date { color: var(--kent-muted); font-size: 13px; }
.session-content strong { display: block; font-size: 14px; }
.session-content small { display: block; margin-top: 4px; color: var(--kent-muted); line-height: 1.45; }
.status-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.status-present { color: var(--kent-green); background: var(--kent-green-soft); }
.status-makeup { color: var(--kent-blue); background: var(--kent-blue-soft); }
.status-absent { color: var(--kent-red); background: var(--kent-red-soft); }
.status-excused { color: #805500; background: #fff4d6; }
.status-unknown { color: var(--kent-muted); background: #f2efeb; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 2px; background: var(--kent-line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 20px 145px 1fr; gap: 14px; padding: 12px 0; }
.timeline-dot { z-index: 1; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--kent-line); background: var(--kent-orange); }
.timeline-item.learning .timeline-dot { background: var(--kent-blue); }
.timeline-date { color: var(--kent-muted); font-size: 12px; font-weight: 700; }
.timeline-body strong { display: block; font-size: 14px; }
.timeline-body span { display: block; margin-top: 4px; color: var(--kent-muted); font-size: 12px; line-height: 1.45; }

.progress-footer { display: flex; justify-content: center; gap: 10px; padding: 30px 20px 50px; color: var(--kent-muted); font-size: 13px; }
.progress-footer strong { color: var(--kent-text); }

@media (max-width: 820px) {
  .progress-page { padding: 26px 14px 58px; }
  .progress-hero { align-items: flex-start; flex-direction: column; padding: 26px 22px; }
  .overview-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .attendance-item { grid-template-columns: 72px 1fr auto; }
  .session-date { grid-column: 2 / 3; grid-row: 2; }
  .session-content { grid-column: 2 / 3; grid-row: 1; }
  .status-chip { grid-column: 3; grid-row: 1 / 3; }
  .timeline-item { grid-template-columns: 20px 1fr; }
  .timeline-date { grid-column: 2; }
  .timeline-body { grid-column: 2; }
}

@media (max-width: 520px) {
  .panel, .insight-card { padding: 21px 17px; border-radius: 21px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .history-item, .assessment-item { grid-template-columns: 1fr; gap: 5px; }
  .attendance-item { grid-template-columns: 64px 1fr; }
  .status-chip { grid-column: 2; grid-row: 3; justify-self: start; }
  .progress-footer { flex-direction: column; align-items: center; }
}

/* v1.2.2 Learning Footprint / evidence-based Insights */
.kent-history-title{font-size:18px;letter-spacing:-.02em;margin:20px 0 13px}
.kent-history-session{padding:18px 20px!important;border:1px solid #eee5dc!important;border-radius:18px!important;background:#fffefa!important}
.kent-history-session .history-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}
.kent-history-source{font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;color:#9c4129;background:#fff0ea}
.kent-history-entry{padding:11px 0;border-top:1px solid #f0e8e0}
.kent-history-entry:first-child{border-top:0}
.kent-history-entry small{display:block;font-weight:750;color:#836d5e}
.kent-history-entry h3{margin:4px 0 4px;font-size:15px}
.kent-history-entry p{margin:4px 0;color:#645d56;font-size:13px;line-height:1.55;white-space:pre-line}
.kent-history-more{display:block;margin:14px auto 0;padding:12px 20px;background:#fff0ea;border:1px solid #f8cbbd;border-radius:999px;font-weight:800;color:#bd4124;cursor:pointer}
.kent-history-more[hidden]{display:none}
.kent-insights{margin-top:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.kent-insight-col{background:#fffaf5;border:1px solid #f0e5da;border-radius:16px;padding:16px;min-width:0}
.kent-insight-col h3{font-size:14px;margin:0 0 10px}
.kent-insight-item{padding-top:10px;margin-top:10px;border-top:1px solid #f0e5da}
.kent-insight-item:first-of-type{border-top:0;margin-top:0;padding-top:0}
.kent-insight-item p{margin:0!important;font-size:13px;line-height:1.55}
.kent-insight-item small{display:block;color:#945338;margin-top:5px;font-size:11px}
.kent-insight-empty{font-size:13px!important;color:#706860!important}
.kent-insight-gaps{grid-column:1/-1;border-top:1px solid #eaded1;padding:12px 2px 0;color:#6e6259;font-size:12px;line-height:1.65}
.kent-more-detail{border:1px solid #ece3da;border-radius:14px;padding:12px;background:#fffefa}
.kent-more-detail summary{font-size:14px;font-weight:750;color:#a3452c;cursor:pointer}
.kent-more-detail[open] summary{margin-bottom:14px}
@media(max-width:760px){.kent-insights{grid-template-columns:1fr}.kent-history-session{padding:14px!important}}

/* KENT_SWISS_PORTALS_V1_BEGIN */
:root{
 --kent-bg:#FFFFFF;--kent-card:#FFFFFF;--kent-text:#171717;--kent-muted:#5F6872;
 --kent-line:#DFE2E6;--kent-orange:#343B46;--kent-orange-soft:#F3F4F5;
 --shadow:0 12px 32px rgba(33,40,48,.07)
 /* Keep --kent-green, --kent-red, --kent-blue status tokens unchanged. */
}
body{background:#fff;color:#171717;font-family:'Be Vietnam Pro','Segoe UI',Arial,sans-serif}
.progress-page{background:#fff}
.progress-loading,.progress-auth{border-color:#DFE2E6;border-radius:16px;box-shadow:var(--shadow)}
.loading-dot{background:#343B46}
.eyebrow{color:#343B46}
.primary-button{background:#343B46;border-radius:9px}
.primary-button:hover{background:#272D35}
.primary-button:focus-visible,a:focus-visible,button:focus-visible{outline:2px solid #343B46;outline-offset:3px}
.progress-hero{background:#F3F4F5;border:1px solid #DFE2E6;border-radius:16px;box-shadow:none}
.progress-hero h1{color:#171717}
.student-code{background:#fff;border-color:#DFE2E6;border-radius:8px}
.overview-card{border-color:#DFE2E6;border-radius:13px;box-shadow:none}
.panel,.insight-card{border-color:#DFE2E6;border-radius:15px;box-shadow:none}
.insight-card{border-left:4px solid #343B46}
.insight-card p{color:#343B46}
.section-badge{background:#E9EDF1;color:#343B46;border-radius:8px}
.metric{background:#F3F4F5;border-color:#DFE2E6;border-radius:10px}
.empty-note{border-color:#DFE2E6;background:#F3F4F5;border-radius:10px}
.attendance-item{border-color:#DFE2E6;border-radius:10px}
.timeline::before{background:#DFE2E6}
.timeline-dot{background:#343B46;box-shadow:0 0 0 1px #DFE2E6}
.timeline-item.learning .timeline-dot{background:#294E6B}
.kent-history-session{background:#fff!important;border-color:#DFE2E6!important;border-radius:12px!important}
.kent-history-entry{border-color:#DFE2E6}
.kent-history-source{background:#E9EDF1;color:#343B46;border-radius:7px}
.kent-history-more{background:#F3F4F5;border-color:#DFE2E6;border-radius:9px;color:#343B46}
.kent-insight-col{background:#F3F4F5;border-color:#DFE2E6;border-radius:12px}
.kent-insight-item,.kent-insight-gaps{border-color:#DFE2E6}
.kent-insight-item small{color:#5F6872}
.kent-more-detail{border-color:#DFE2E6;background:#fff;border-radius:10px}
.kent-more-detail summary{color:#343B46}
/* Deliberately preserve attendance semantic colors and any existing metric values. */
/* KENT_SWISS_PORTALS_V1_END */
