@font-face {
  font-family: "Virgil";
  src: url("../fonts/Virgil.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Intranet al estilo Excalidraw: lienzo, Virgil, acento violeta y sombras suaves. */
:root {
  --excal-canvas: #ffffff;
  --excal-canvas-alt: #f8f9fa;
  --excal-grid: rgba(0, 0, 0, 0.055);
  --excal-ink: #1e1e1e;
  --excal-muted: #868e96;
  --excal-accent: #6965db;
  --excal-accent-dark: #5b57c7;
  --excal-accent-soft: #ececff;
  --excal-panel: #ffffff;
  --excal-line: rgba(0, 0, 0, 0.08);
  --excal-radius: 8px;
  --excal-radius-lg: 12px;
  --excal-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  --excal-shadow-hover: 0 0 0 1px rgba(105, 101, 219, 0.18), 0 4px 14px rgba(105, 101, 219, 0.12), 0 12px 32px rgba(0, 0, 0, 0.08);
  --sketch-border: 2px solid rgba(30, 30, 30, 0.78);
  --sticky-yellow: #fff4b0;
  --sticky-yellow-bar: #f5d76e;
  --sticky-green: #d8f3c8;
  --sticky-green-bar: #9ed18a;
  --sticky-pink: #ffd5e5;
  --sticky-pink-bar: #f3a0c0;
  --sticky-purple: #e6d9ff;
  --sticky-purple-bar: #c4a8f5;
  --sticky-blue: #d6e8ff;
  --sticky-blue-bar: #9bbef0;
  --sticky-orange: #ffe0c2;
  --sticky-orange-bar: #f0b27a;

  /* Compatibilidad con tokens previos */
  --nota-canvas: var(--excal-canvas);
  --nota-grid: var(--excal-grid);
  --nota-ink: var(--excal-ink);
  --nota-muted: var(--excal-muted);
  --nota-accent: var(--excal-accent);
  --nota-accent-dark: var(--excal-accent-dark);
  --nota-accent-soft: var(--excal-accent-soft);
  --nota-side: #f4f2ee;
  --nota-line: var(--excal-line);
  --nota-radius: var(--excal-radius);
  --nota-shadow: var(--excal-shadow);
}

body.intranet {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--excal-canvas-alt);
  color: var(--excal-ink);
  font-family: Assistant, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

body.intranet a {
  color: inherit;
  text-decoration: none;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  margin: 10px 12px 0;
  padding: 0 14px 0 18px;
  background: var(--excal-panel);
  border: 1px solid var(--excal-line);
  border-radius: var(--excal-radius-lg);
  box-shadow: var(--excal-shadow);
  color: var(--excal-ink);
}

.topnav-brand {
  font-family: Virgil, Caveat, cursive;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--excal-accent-dark);
}

.topnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 4px;
  margin-left: 8px;
}

.topnav-links a,
.topnav-cms {
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--excal-ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.topnav-links a:hover,
.topnav-cms:hover {
  background: var(--excal-accent-soft);
  color: var(--excal-accent-dark);
}

.topnav-search {
  margin-left: auto;
}

.topnav-search input {
  width: 190px;
  border: 1px solid var(--excal-line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--excal-canvas-alt);
  font: inherit;
  font-size: 0.88rem;
  color: var(--excal-ink);
}

.topnav-search input:focus {
  outline: 2px solid rgba(105, 101, 219, 0.35);
  border-color: var(--excal-accent);
}

.topnav-cms {
  white-space: nowrap;
  border: 1px solid var(--excal-line);
  background: var(--excal-canvas-alt);
}

.cartelera-screen {
  min-height: calc(100vh - 76px);
  margin: 12px 12px 0;
  padding: 28px 32px 56px;
  background-color: var(--excal-canvas);
  background-image:
    linear-gradient(to right, var(--excal-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--excal-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--excal-line);
  border-radius: var(--excal-radius-lg);
  box-shadow: var(--excal-shadow);
  font-family: Assistant, "Segoe UI", sans-serif;
}

.landing-home {
  flex: 1;
  width: 100%;
  padding-bottom: 12px;
}

.inner-page {
  flex: 1;
  width: min(960px, calc(100% - 48px));
  margin: 24px auto 48px;
  padding: 2rem 2.2rem 3rem;
  background: var(--excal-panel);
  border: 1px solid var(--excal-line);
  border-radius: var(--excal-radius-lg);
  box-shadow: var(--excal-shadow);
}

.landing-band {
  margin: 12px 12px 0;
  padding: 56px 0;
  background: var(--excal-canvas-alt);
  border: 1px solid var(--excal-line);
  border-radius: var(--excal-radius-lg);
  box-shadow: var(--excal-shadow);
}

.landing-band.band-white {
  background:
    linear-gradient(to right, var(--excal-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--excal-grid) 1px, transparent 1px),
    var(--excal-canvas);
  background-size: 20px 20px, 20px 20px, auto;
}

.landing-band.band-navy {
  background: #ececff;
  color: var(--excal-ink);
  border-color: rgba(105, 101, 219, 0.18);
}

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--excal-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.landing-band h2 {
  margin: 0;
  color: var(--excal-ink);
  font-family: Virgil, Caveat, cursive;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 400;
  line-height: 1.1;
}

.band-navy h2,
.band-navy .section-lead,
.band-navy .section-kicker {
  color: var(--excal-ink);
}

.band-navy .section-kicker {
  color: var(--excal-accent-dark);
}

.section-lead {
  max-width: 40rem;
  margin: 10px 0 0;
  color: var(--excal-muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.landing-card {
  display: block;
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.96);
  border: var(--sketch-border);
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.06);
  color: var(--excal-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.landing-card h3 {
  margin: 0 0 8px;
  font-family: Virgil, Caveat, cursive;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
}

.landing-card p {
  margin: 0 0 6px;
  color: var(--excal-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.card-meta {
  margin: 0 0 6px;
  color: var(--excal-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.card-photo,
.landing-card img.card-photo {
  width: 100%;
  height: 140px;
  margin: 0 0 12px;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(30, 30, 30, 0.12);
}

.person-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(30, 30, 30, 0.2);
}

.more-link {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 14px;
  border: 2px solid var(--excal-accent);
  border-radius: 8px;
  background: var(--excal-accent-soft);
  color: var(--excal-accent-dark);
  font-weight: 700;
  transition: background 0.12s ease, transform 0.12s ease;
}

.more-link:hover {
  background: #ddd9ff;
  transform: translateY(-1px);
}

.band-navy .link-card {
  background: #fff;
  border-color: rgba(30, 30, 30, 0.78);
  color: var(--excal-ink);
}

.band-navy .link-card h3,
.band-navy .link-card p {
  color: var(--excal-ink);
}

.landing-footer {
  margin: 12px;
  padding: 18px 0;
  background: var(--excal-panel);
  border: 1px solid var(--excal-line);
  border-radius: var(--excal-radius-lg);
  box-shadow: var(--excal-shadow);
  color: var(--excal-ink);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.landing-footer strong {
  font-family: Virgil, Caveat, cursive;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--excal-accent-dark);
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.landing-footer a {
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--excal-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.landing-footer a:hover {
  background: var(--excal-accent-soft);
  color: var(--excal-accent-dark);
}

.board-head h1,
.note-card h2,
.note-card h3,
.note-polaroid h2,
.note-photo h2,
.note-cinta strong,
.visor-body h2,
.visor-body h3 {
  font-family: Virgil, Caveat, cursive;
  font-weight: 400;
}

.board-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--excal-ink);
}

.board-head p {
  max-width: 40rem;
  margin: 10px 0 0;
  color: var(--excal-muted);
  font-size: 1.05rem;
}

.board-head .more-link {
  margin-top: 14px;
}

.notes-canvas {
  position: relative;
  margin-top: 28px;
}

.note-abs {
  position: absolute;
  cursor: pointer;
  transform-origin: center center;
}

.note-abs .note-sticky,
.note-abs .note-card,
.note-abs .note-photo,
.note-abs .note-polaroid,
.note-abs .note-cinta,
.note-abs .note-icon {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.abre-detalle {
  cursor: pointer;
}

.landing-card.abre-detalle:hover,
.landing-card.abre-detalle:focus-visible {
  transform: translate(-1px, -2px) rotate(-0.4deg);
  box-shadow: 3px 5px 0 rgba(105, 101, 219, 0.12), var(--excal-shadow-hover);
  border-color: var(--excal-accent);
  outline: none;
}

.note-abs.abre-detalle:hover,
.note-abs.abre-detalle:focus-visible {
  z-index: 4;
  filter: drop-shadow(0 8px 18px rgba(105, 101, 219, 0.18));
  outline: none;
}

.mini-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px 0;
}

.mini-gallery img {
  width: 100%;
  height: 110px;
  margin: 0;
  object-fit: cover;
  border-radius: 4px;
  border: 1.5px solid rgba(30, 30, 30, 0.15);
}

.note-video {
  position: relative;
  margin: 8px 10px 12px;
  padding-top: 56%;
}

.note-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
}

.note-sticky,
.note-card,
.person-card {
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.07), var(--excal-shadow);
}

.note-sticky {
  width: 230px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  border: var(--sketch-border);
  overflow: hidden;
}

.note-sticky header,
.note-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(30, 30, 30, 0.65);
}

.dots {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}

.note-sticky .note-body,
.note-card .note-body {
  padding: 8px 12px 14px;
  font-family: Virgil, Caveat, cursive;
  font-size: 1.12rem;
  line-height: 1.4;
}

.note-sticky .note-body p,
.note-card .note-body p {
  margin: 0 0 0.4rem;
}

.note-card {
  width: min(320px, 100%);
  background: #fff;
  border: var(--sketch-border);
}

.note-card header {
  background: transparent;
  padding-top: 8px;
  color: var(--excal-muted);
}

.note-card h2,
.note-card h3 {
  margin: 0 12px;
  font-size: 1.85rem;
  line-height: 1.05;
}

.note-card img,
.note-sticky img,
.person-card img {
  display: block;
  width: calc(100% - 20px);
  height: 140px;
  margin: 8px 10px 0;
  object-fit: cover;
  border-radius: 4px;
  border: 1.5px solid rgba(30, 30, 30, 0.12);
}

.note-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--excal-accent-dark);
  font-weight: 700;
  font-family: Assistant, sans-serif;
  font-size: 0.9rem;
}

.note-yellow { background: var(--sticky-yellow); }
.note-yellow header { background: var(--sticky-yellow-bar); }
.note-green { background: var(--sticky-green); }
.note-green header { background: var(--sticky-green-bar); }
.note-pink { background: var(--sticky-pink); }
.note-pink header { background: var(--sticky-pink-bar); }
.note-purple { background: var(--sticky-purple); }
.note-purple header { background: var(--sticky-purple-bar); }
.note-blue { background: var(--sticky-blue); }
.note-blue header { background: var(--sticky-blue-bar); }
.note-orange { background: var(--sticky-orange); }
.note-orange header { background: var(--sticky-orange-bar); }

.ink-yellow { color: #8a6a12; }
.ink-green { color: #2f7a45; }
.ink-pink { color: #a14b73; }
.ink-purple { color: #6965db; }
.ink-blue { color: #2d62a8; }
.ink-orange { color: #b86a24; }

.person-card {
  width: 220px;
  background: #fff;
  padding: 14px;
  border: var(--sketch-border);
}

.person-card img {
  width: 72px;
  height: 72px;
  margin: 0 0 10px;
  border-radius: 50%;
}

.person-card h2 {
  margin: 0;
  font-family: Virgil, Caveat, cursive;
  font-size: 1.25rem;
  font-weight: 400;
}

.person-card p {
  margin: 4px 0 0;
  color: var(--excal-muted);
  font-size: 0.88rem;
}

.article-note {
  width: min(680px, 100%);
}

.article-note .note-body {
  font-size: 1.15rem;
  line-height: 1.55;
}

.empty-board {
  margin-top: 24px;
  padding: 18px 20px;
  max-width: 28rem;
  color: var(--excal-muted);
  font-family: Virgil, Caveat, cursive;
  font-size: 1.25rem;
  background: var(--excal-panel);
  border: 2px dashed rgba(105, 101, 219, 0.35);
  border-radius: var(--excal-radius-lg);
}

.inner-page input[type="search"] {
  width: 100%;
  max-width: 28rem;
  border: 1px solid var(--excal-line);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  background: var(--excal-canvas-alt);
}

.note-abs .note-card,
.note-abs .note-sticky,
.note-abs .note-photo,
.note-abs .note-polaroid {
  width: 100%;
}

.note-photo,
.note-polaroid {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: var(--sketch-border);
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.07), var(--excal-shadow);
  overflow: hidden;
}

.note-photo img,
.note-polaroid img {
  width: 100%;
  height: 68%;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
  border: 0;
}

.note-polaroid {
  padding-bottom: 10px;
  background: #fffef8;
}

.note-polaroid h2,
.note-photo h2 {
  margin: 8px 12px 0;
  font-size: 1.55rem;
}

.note-cinta {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 16px;
  border: var(--sketch-border);
  border-radius: 999px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.07);
}

.note-cinta strong {
  font-size: 1.55rem;
}

.note-cinta span {
  font-family: Virgil, Caveat, cursive;
  font-size: 1.05rem;
}

.note-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  text-align: center;
}

.note-glyph {
  display: grid;
  place-items: center;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: #fff;
  border: var(--sketch-border);
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.06);
}

.note-glyph svg {
  width: 54%;
  height: 54%;
}

.note-icon strong {
  font-family: Virgil, Caveat, cursive;
  font-size: 1rem;
  line-height: 1.2;
}

.note-scribble {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tipo-dibujo,
.tipo-imagen {
  background: transparent;
}

.note-abs.tipo-imagen {
  height: auto;
  border: none;
  box-shadow: none;
  filter: none;
}

.note-abs.tipo-imagen .note-loose-img,
.note-abs.tipo-imagen img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  border: none;
  border-radius: 2px;
  box-shadow: none;
}

.note-abs.tipo-imagen:hover,
.note-abs.tipo-imagen:focus-visible {
  filter: drop-shadow(0 6px 16px rgba(30, 30, 30, 0.14));
}

.visor-body .note-loose-img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

.visor {
  width: min(860px, calc(100vw - 32px));
  max-height: min(88vh, 920px);
  margin: auto;
  border: var(--sketch-border);
  border-radius: 14px 16px 12px 15px / 15px 12px 16px 14px;
  padding: 28px 24px 18px;
  overflow: auto;
  background: var(--excal-panel);
  box-shadow: 4px 8px 0 rgba(30, 30, 30, 0.08), 0 24px 80px rgba(8, 18, 36, 0.22);
}

.visor[open] {
  animation: visor-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.visor::backdrop {
  background: rgba(30, 30, 30, 0.42);
  animation: visor-fade 0.28s ease;
}

@keyframes visor-in {
  from { opacity: 0; transform: translateY(18px) scale(0.94) rotate(-0.6deg); }
  to { opacity: 1; transform: none; }
}

@keyframes visor-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.visor-x {
  position: sticky;
  top: 0;
  float: right;
  border: 2px solid var(--excal-accent);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--excal-accent-soft);
  color: var(--excal-accent-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.visor-body .note-abs,
.visor-body .landing-card,
.visor-body .note-card,
.visor-body .note-sticky,
.visor-body .note-photo,
.visor-body .note-polaroid,
.visor-body .note-cinta {
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  transform: none !important;
  cursor: default;
  filter: none;
}

.visor-body img,
.visor-body .note-photo img,
.visor-body .note-polaroid img,
.visor-body .note-card img {
  width: 100%;
  height: auto;
  max-height: 62vh;
  margin: 12px 0 0;
  object-fit: contain;
}

.visor-body .note-glyph {
  width: 140px;
}

.visor-body .note-scribble {
  width: 100%;
  height: auto;
  max-height: 70vh;
}

.visor-body h2,
.visor-body h3 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.visor-body .note-body,
.visor-body p {
  font-family: Virgil, Caveat, cursive;
  font-size: 1.25rem;
  line-height: 1.5;
}

.visor-actions {
  margin: 16px 0 0;
}

.visor-go[hidden] {
  display: none;
}

@media (max-width: 800px) {
  .topnav {
    flex-wrap: wrap;
    margin: 8px;
    padding: 10px 12px;
  }

  .topnav-search,
  .topnav-search input {
    width: 100%;
    margin-left: 0;
  }

  .cartelera-screen,
  .landing-band,
  .landing-footer {
    margin-left: 8px;
    margin-right: 8px;
  }

  .cartelera-screen {
    padding: 20px 14px 40px;
  }

  .inner-page {
    width: calc(100% - 24px);
    padding: 1.4rem 1.2rem 2rem;
  }
}
