:root {
  color-scheme: light;
  --ink: #16243d;
  --muted: #5c6b80;
  --blue: #244fcc;
  --blue-dark: #183da8;
  --line: #dce3ee;
  --surface: #fff;
  --canvas: #f4f6fb;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; }
a { color: var(--blue); }
button, select { cursor: pointer; }
svg { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #4772e8; outline-offset: 4px; }
.wrap { width: min(1184px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; background: white; padding: 12px 20px; z-index: 5; }
.skip-link:focus { top: 12px; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; height: 42px; width: 42px; background: var(--ink); color: white; border-radius: 12px; }
.brand-text { display: grid; line-height: 1.35; }
.brand-text strong { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.brand-text span, .header-note { font-size: 14px; color: var(--muted); }
.header-note { display: flex; align-items: center; gap: 8px; }
.header-note svg { width: 18px; height: 18px; }
.intro { padding: 42px 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 14px; font-weight: 650; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 38px); letter-spacing: -1.15px; line-height: 1.15; margin-bottom: 12px; }
.intro p:last-child { margin-bottom: 0; color: var(--muted); }
.course-stats { display: flex; gap: 30px; padding-left: 30px; border-left: 1px solid var(--line); flex: none; }
.course-stats div { display: grid; }
.course-stats strong { font-size: 28px; font-weight: 650; line-height: 1.3; letter-spacing: -.5px; }
.course-stats span { font-size: 14px; color: var(--muted); }
.toolbar { padding: 22px 24px; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(245px, .85fr) minmax(175px, .55fr); gap: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 3px 8px #172b4d04; }
.field { min-width: 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input, .field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bac6d9; border-radius: 8px; background: white; color: var(--ink); }
.field input::placeholder { color: #728097; }
.field input:focus, .field select:focus { border-color: var(--blue); }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 42px; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 28px 0 16px; }
.results-heading h2 { font-size: 19px; font-weight: 650; margin: 0; letter-spacing: -.25px; }
.results-count { margin: 0; color: var(--muted); font-size: 14px; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.task-card { position: relative; display: flex; flex-direction: column; padding: 24px; min-width: 0; background: white; border: 1px solid var(--line); border-radius: 14px; transition: border-color .16s, box-shadow .16s, transform .16s; }
.task-card:hover, .task-card:focus-within { border-color: #9cafe3; box-shadow: 0 8px 24px #203e7810; transform: translateY(-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.task-icon { width: 40px; height: 40px; border-radius: 10px; background: #edf2ff; color: var(--blue); display: grid; place-items: center; }
.resource-label { color: var(--muted); font-size: 14px; text-align: right; }
.task-card h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.45; font-weight: 650; letter-spacing: -.2px; overflow-wrap: anywhere; }
.task-link { color: var(--ink); text-decoration: none; }
.task-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.task-link:focus { outline: none; }
.task-card:has(.task-link:focus-visible) { outline: 3px solid #4772e8; outline-offset: 4px; }
.card-excerpt { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-dates { margin: auto 0 0; padding-top: 17px; border-top: 1px solid #e8ecf4; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card-dates div { min-width: 0; }
.card-dates dt { color: var(--muted); font-size: 14px; margin-bottom: 3px; }
.card-dates dd { margin: 0; font-size: 14px; font-weight: 600; }
.card-action { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 14px; font-weight: 650; color: var(--blue); }
.card-action svg { width: 18px; height: 18px; }
.task-card[data-state="BORRADOR"] { border-style: dashed; }
.draft-label { color: #85620c; background: #fff4d7; padding: 3px 9px; border-radius: 5px; font-size: 13px; }
.draft-note { padding: 12px 16px; background: #fff7e3; color: #715719; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 55px 20px; background: white; border: 1px dashed #bac6d9; border-radius: 14px; }
.empty-state > svg { width: 32px; height: 32px; color: #7b8caa; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 10px 17px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: white; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--blue-dark); }
.help { margin: 26px 0 0; padding: 17px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.help summary { width: fit-content; cursor: pointer; color: #354860; font-weight: 600; }
.help p { margin: 12px 0 0; max-width: 78ch; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 22px 0 30px; font-size: 13px; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-decoration: none; font-weight: 600; margin: 28px 0; }
.back-link svg { width: 17px; height: 17px; }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.task-main { min-width: 0; background: white; padding: 34px; border: 1px solid var(--line); border-radius: 16px; }
.task-main h1 { font-size: clamp(25px, 3vw, 32px); letter-spacing: -.65px; line-height: 1.3; overflow-wrap: anywhere; margin-bottom: 26px; }
.task-main h2, .task-aside h2 { font-size: 18px; font-weight: 650; margin-bottom: 18px; }
.task-main h2 { padding-top: 24px; border-top: 1px solid var(--line); }
.instructions { overflow-wrap: anywhere; line-height: 1.7; }
.instructions img { display: block; max-width: 100%; height: auto; margin: 16px 0; border-radius: 5px; }
.instructions ul, .instructions ol { padding-left: 24px; }
.instructions li { margin-bottom: 8px; }
.instructions pre { white-space: pre-wrap; }
.instructions table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.instructions td, .instructions th { border: 1px solid var(--line); padding: 8px; }
.instructions code, .instructions pre { font-family: Consolas, ui-monospace, monospace; }
.task-aside { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.task-aside dl { margin: 0; }
.task-aside dl > div { margin-bottom: 20px; }
.task-aside dt { font-size: 14px; color: var(--muted); margin-bottom: 5px; }
.task-aside dd { margin: 0; font-weight: 600; }
.task-aside .timezone { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.attachments { list-style: none; padding: 0; margin: 0; }
.attachments li + li { margin-top: 10px; }
.attachment-link { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: #f8faff; }
.attachment-link:hover { border-color: #9cafe3; }
.attachment-link span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.attachment-link strong { display: block; font-size: 15px; }
.attachment-link small { color: var(--muted); font-size: 13px; }
.subtle { color: var(--muted); }
@media (min-width: 1500px) { .intro { padding-top: 48px; } }
@media (max-width: 1000px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .field-search { grid-column: 1 / -1; }
  .task-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 20px; }
  .task-main { padding: 26px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 72px; }
  .header-note { display: none; }
  .intro { padding: 30px 0 24px; align-items: flex-start; flex-direction: column; gap: 20px; }
  .course-stats { padding: 0; border: 0; gap: 28px; }
  .course-stats div { display: flex; align-items: baseline; gap: 6px; }
  .course-stats strong { font-size: 20px; }
  .toolbar { padding: 18px; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .field-search { grid-column: auto; }
  .task-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .task-card { padding: 22px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 4px; padding-top: 24px; }
  .footer { flex-direction: column; gap: 5px; }
  .task-layout { display: flex; flex-direction: column; }
  .task-main, .task-aside { width: 100%; padding: 22px; }
  .task-aside dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .task-card:hover { transform: none; } }
@media print { .site-header, .toolbar, .back-link, .help, .footer { display: none; } :root { background: white; } .wrap { width: 100%; } .task-layout { display: block; } .task-main, .task-aside { border: 0; } .task-card { break-inside: avoid; } }
