:root {
  --ink: #061a45;
  --muted: #647089;
  --line: #dce3ec;
  --line-strong: #c7d1df;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --brand: #f79009;
  --brand-dark: #c85f00;
  --brand-soft: #fff4e5;
  --accent: #84c400;
  --link: #1f78ed;
  --link-dark: #175dc0;
  --danger: #b4233c;
  --danger-soft: #fff0f2;
  --success: #14795b;
  --success-soft: #ebf8f3;
  --shadow: 0 24px 70px rgba(31, 45, 68, .12);
  --radius: 8px;
  --syllagen-navy: #061a45;
  --syllagen-blue: #1f78ed;
  --syllagen-orange: #f79009;
  --syllagen-orange-dark: #c85f00;
  --syllagen-green: #84c400;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: linear-gradient(135deg, #fff9f1 0%, var(--canvas) 42%, #f4f8ed 100%); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.app-nav { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 17px; font-weight: 760; text-decoration: none; }
.brand-dots {
  width: 16px;
  height: 16px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}
.brand-dots::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 7px 7px 0 var(--accent);
}
.nav-note { color: var(--muted); font-size: 12px; }
.nav-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
.nav-actions a { text-decoration: none; }
.nav-actions a:hover { color: var(--link-dark); }
.nav-actions .nav-primary { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: white; }
.app-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 64px; display: grid; place-items: center; }
.workspace-card { width: min(100%, 720px); border: 1px solid rgba(199, 209, 223, .82); border-radius: var(--radius); background: rgba(255,255,255,.96); box-shadow: var(--shadow); overflow: hidden; }
.workspace-card.compact { width: min(100%, 480px); }
.workspace-head { padding: 30px 34px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #fff 0%, #fff8ee 62%, #f7faee 100%); }
.eyebrow { margin: 0 0 7px; color: var(--brand-dark); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workspace-title { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; letter-spacing: 0; }
.workspace-subtitle { max-width: 560px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.workspace-body { padding: 28px 34px 34px; }
.flash { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 11px 13px; border: 1px solid #f3b9c3; border-radius: 7px; background: var(--danger-soft); color: #8c1d32; font-size: 13px; }
.flash.info, .flash.success { border-color: #b9dfd1; background: var(--success-soft); color: #0e6147; }
.flash button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.upload-zone { min-height: 178px; padding: 30px 20px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1.5px dashed #aebccc; border-radius: 8px; background: var(--surface-soft); text-align: center; cursor: pointer; transition: .16s ease; }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--link); background: #f2f7ff; transform: translateY(-1px); }
.upload-zone.has-file { border-style: solid; border-color: #57a98d; background: var(--success-soft); }
.upload-icon { width: 38px; height: 38px; color: var(--brand-dark); }
.upload-text { font-size: 15px; font-weight: 720; }
.upload-hint, .file-name, .field-help { color: var(--muted); font-size: 12px; line-height: 1.45; }
.file-name { color: var(--success); font-weight: 650; }
input[type="file"] { display: none; }
.divider { margin: 20px 0; display: flex; align-items: center; gap: 12px; color: #8793a6; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field-group { margin-bottom: 22px; }
.field-label { display: block; margin-bottom: 7px; color: #2f3b50; font-size: 12px; font-weight: 720; }
.input-shell input, .input-shell select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; background: white; color: var(--ink); }
.input-shell input:focus, .input-shell select:focus { border-color: var(--link); box-shadow: 0 0 0 3px rgba(31,120,237,.12); }
.field-help { margin-top: 6px; }
.primary-btn, .secondary-btn, .google-btn { min-height: 44px; padding: 10px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 7px; font-weight: 720; font-size: 13px; text-decoration: none; cursor: pointer; transition: .16s ease; }
.primary-btn { width: 100%; color: #2b1900; background: var(--brand); box-shadow: 0 8px 18px rgba(200,95,0,.18); }
.primary-btn:hover { color: white; background: var(--brand-dark); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-btn { width: 100%; color: var(--ink); border-color: var(--line-strong); background: white; }
.secondary-btn:hover { background: var(--surface-soft); }
.google-btn { width: 100%; color: var(--ink); border-color: var(--line-strong); background: white; }
.google-btn:hover { border-color: #9cabbf; background: #fafcfe; }
.google-btn svg { width: 20px; height: 20px; }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message { display: none; margin-top: 12px; padding: 10px 12px; border: 1px solid #f1b8c2; border-radius: 7px; color: var(--danger); background: var(--danger-soft); font-size: 12px; }
.error-message.visible { display: block; }
.feature-list { margin: 25px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.feature-list li { margin: 0 0 11px; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.feature-list i { color: var(--success); margin-top: 2px; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-option input { position: absolute; opacity: 0; }
.day-option span { min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.day-option input:checked + span { border-color: var(--link); color: var(--link-dark); background: #eef5ff; box-shadow: inset 0 0 0 1px var(--link); }
.time-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.time-selects { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.time-separator { color: var(--muted); font-size: 12px; }
.form-actions { margin-top: 28px; }
.status-icon { width: 54px; height: 54px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 24px; }
.centered { text-align: center; }
.inline-links { margin-top: 18px; color: var(--muted); font-size: 12px; }
.inline-links a { color: var(--link-dark); font-weight: 700; text-decoration: none; }
.site-footer { width: min(1120px, calc(100% - 40px)); margin: auto auto 0; padding: 20px 0 28px; display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 11px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--link-dark); }
.legal-main { place-items: start center; }
.legal-card { width: min(100%, 760px); }
.legal-copy { color: #334158; font-size: 14px; line-height: 1.65; }
.legal-copy h2 { margin: 28px 0 7px; color: var(--ink); font-size: 17px; }
.legal-copy p { margin: 0 0 14px; }

.dashboard-main { place-items: start center; }
.dashboard-shell { width: min(100%, 980px); }
.dashboard-head { padding: 28px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 18px 50px rgba(31,45,68,.09); }
.dashboard-head h1 { margin: 0; font-size: 32px; }
.dashboard-head p:not(.eyebrow) { margin: 8px 0 0; max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.connection-panel { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.connection-panel > div { display: flex; align-items: center; gap: 8px; }
.connection-panel form { margin: 0; }
.connection-status, .compact-action { min-height: 38px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 750; text-decoration: none; }
.connection-status.connected { border-color: #b9dfd1; color: var(--success); background: var(--success-soft); }
.compact-action { border-color: #a9c8f8; color: var(--link-dark); background: #eef5ff; }
.text-button { padding: 5px; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.semester-section { margin-top: 30px; }
.semester-heading { margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; }
.semester-heading h2 { margin: 0; font-size: 18px; }
.semester-heading span { color: var(--muted); font-size: 11px; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.course-card { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 8px 28px rgba(31,45,68,.06); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-code { color: var(--brand-dark); font-size: 11px; font-weight: 850; letter-spacing: .05em; }
.sync-state { color: var(--success); font-size: 10px; font-weight: 750; }
.sync-state.pending { color: #8a5a08; }
.course-card h3 { margin: 8px 0 16px; font-size: 16px; line-height: 1.35; }
.course-meta { min-height: 44px; display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.review-count { color: #9b4b12; }
.course-actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.course-open { flex: 1; display: flex; align-items: center; justify-content: space-between; color: var(--link-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.course-delete { padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.course-delete:hover { color: var(--danger); }
.delete-dialog {
  width: min(92vw, 470px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 24px 70px rgba(31,45,68,.24);
}
.delete-dialog::backdrop { background: rgba(6,26,69,.36); backdrop-filter: blur(3px); }
.delete-dialog-head { padding: 20px 22px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.delete-dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-close { width: 30px; height: 30px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 20px; cursor: pointer; }
.dialog-close:hover { background: var(--surface-soft); }
.delete-dialog-body { padding: 20px 22px; }
.delete-dialog-body > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.delete-calendar-option { padding: 13px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); cursor: pointer; }
.delete-calendar-option input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--danger); }
.delete-calendar-option span { display: grid; gap: 3px; }
.delete-calendar-option strong { font-size: 12px; }
.delete-calendar-option small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.delete-dialog-body .delete-warning { margin: 14px 0 0; color: #9b2c3f; font-size: 11px; }
.delete-dialog-actions { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.dialog-cancel, .dialog-delete { min-height: 38px; padding: 8px 13px; border-radius: 7px; font-size: 12px; font-weight: 750; cursor: pointer; }
.dialog-cancel { border: 1px solid var(--line-strong); color: var(--ink); background: white; }
.dialog-delete { border: 1px solid #a71932; color: white; background: #b4233c; }
.dialog-delete:hover { background: #941d33; }
.empty-workspace { margin-top: 28px; padding: 64px 28px; border: 1px dashed var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.7); text-align: center; }
.empty-workspace > i { color: var(--brand-dark); font-size: 30px; }
.empty-workspace h2 { margin: 14px 0 6px; }
.empty-workspace p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }

.landing-page {
  color: var(--syllagen-navy);
  background:
    radial-gradient(circle at 8% 12%, rgba(247, 144, 9, .10), transparent 28%),
    radial-gradient(circle at 90% 36%, rgba(31, 120, 237, .09), transparent 30%),
    #fbfcfe;
}
.landing-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.landing-nav {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--syllagen-navy);
  font-size: 17px;
  font-weight: 760;
  text-decoration: none;
}
.landing-nav-actions { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 720; }
.landing-nav-actions a { text-decoration: none; }
.landing-nav-actions > a:first-child:hover { color: var(--syllagen-blue); }
.landing-nav-primary {
  min-height: 40px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--syllagen-navy);
  border-radius: 7px;
  color: white;
  background: var(--syllagen-navy);
}
.landing-nav-primary:hover { background: #102b62; }
.landing-flashes { width: min(720px, calc(100% - 48px)); margin: 10px auto 0; }
.landing-hero {
  width: min(940px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 46px;
  display: grid;
  justify-items: center;
  text-align: center;
}
.landing-brand-art {
  width: min(480px, 82vw);
  aspect-ratio: 1;
  margin: -58px 0 -18px;
  overflow: hidden;
  pointer-events: none;
}
.landing-brand-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.landing-intro { position: relative; z-index: 1; width: min(100%, 690px); min-width: 0; }
.landing-intro h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.landing-lead {
  max-width: 640px;
  margin: 0 auto;
  color: #384560;
  font-size: 18px;
  line-height: 1.55;
}
.landing-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
.landing-cta, .landing-secondary {
  min-height: 46px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.landing-cta {
  color: #2b1900;
  background: var(--syllagen-orange);
  box-shadow: 0 12px 28px rgba(200, 95, 0, .20);
}
.landing-cta:hover { background: #ffa520; transform: translateY(-1px); }
.landing-secondary { border-color: #b9c5d7; color: var(--syllagen-navy); background: white; }
.landing-secondary:hover { border-color: var(--syllagen-blue); transform: translateY(-1px); }
.landing-proof {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dce3ec;
  border-bottom: 1px solid #dce3ec;
}
.landing-proof article { padding: 24px 28px; }
.landing-proof article + article { border-left: 1px solid #dce3ec; }
.landing-proof span { color: var(--syllagen-orange-dark); font-size: 10px; font-weight: 850; }
.landing-proof h2 { margin: 5px 0 6px; font-size: 15px; }
.landing-proof p { margin: 0; color: #647089; font-size: 12px; line-height: 1.5; }

@media (max-width: 640px) {
  .app-nav, .app-main { width: min(100% - 24px, 1120px); }
  .app-nav { padding-top: 14px; }
  .nav-note { display: none; }
  .nav-actions { gap: 10px; }
  .app-main { padding-top: 18px; }
  .workspace-head, .workspace-body { padding-left: 20px; padding-right: 20px; }
  .days-grid { grid-template-columns: repeat(4, 1fr); }
  .time-grid { grid-template-columns: 1fr; }
  .time-separator { display: none; }
  .dashboard-head { align-items: flex-start; flex-direction: column; padding: 22px; }
  .course-grid { grid-template-columns: 1fr; }
  .landing-nav, .landing-hero, .landing-proof { width: min(calc(100% - 28px), 1160px); }
  .landing-nav { padding-top: 15px; }
  .landing-nav-actions { gap: 12px; }
  .landing-brand-art { width: min(390px, 100%); margin-top: -35px; margin-bottom: -12px; }
  .landing-hero { padding-bottom: 34px; }
  .landing-lead { font-size: 16px; }
  .landing-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .landing-cta, .landing-secondary { width: 100%; }
  .landing-proof { grid-template-columns: 1fr; }
  .landing-proof article { padding: 18px 4px; }
  .landing-proof article + article { border-top: 1px solid #dce3ec; border-left: 0; }
}
