/* Banco de apuntes · mismo lenguaje que la portada (negro, granate, amarillo) */
.ap-body { background: #0E0E0E; color: #fff; font-family: 'Montserrat', Arial, sans-serif; margin: 0; }
.ap-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.y { color: #FFD43B; }
.ap-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #E6B7BF; margin: 0 0 .6rem; }
.ap-h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; text-transform: uppercase; line-height: 1; margin: 0 0 1rem; letter-spacing: -.01em; }
.ap-h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 900; text-transform: uppercase; line-height: 1.05; margin: 0; }
.ap-lead { color: #DCD5D6; font-size: 1.05rem; line-height: 1.6; max-width: 44rem; margin: 0 0 1.6rem; }
.ap-lead a { color: #FFD43B; font-weight: 700; }

.ap-hero { position: relative; overflow: hidden; padding: 4rem 0 3rem; background: radial-gradient(1200px 400px at 20% -10%, #6D0D1D99, transparent 60%), radial-gradient(700px 300px at 90% 10%, #8A132855, transparent 60%), #0E0E0E; border-bottom: 1px solid #ffffff12; }
.ap-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.ap-search { flex: 1 1 22rem; display: flex; align-items: center; gap: .6rem; background: #161616; border: 2px solid #ffffff22; border-radius: 999px; padding: 0 1.1rem; min-height: 54px; color: #E6B7BF; }
.ap-search:focus-within { border-color: #FFD43B; }
.ap-search input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; font-size: 1rem; outline: none; min-height: 50px; }
.ap-stats { margin: 1rem 0 0; color: #E6B7BF; font-weight: 700; font-size: .9rem; min-height: 1.4em; }

.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; padding: .9rem 1.5rem; font: inherit; font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.ap-btn-y { background: #FFD43B; color: #0E0E0E; }
.ap-btn-y:hover { background: #ffe066; transform: translateY(-1px); }
.ap-btn-ghost { background: transparent; color: #fff; border-color: #ffffff44; }
.ap-btn-ghost:hover { border-color: #FFD43B; color: #FFD43B; }
.ap-btn-red { background: #6D0D1D; color: #fff; }
.ap-btn-red:hover { background: #8A1328; }
.ap-btn[disabled] { opacity: .6; cursor: wait; }
.ap-btn-sm { padding: .55rem 1rem; font-size: .75rem; }

.ap-main { padding: 2.4rem 0 3.5rem; }
.ap-crumbs { scroll-margin-top: 90px; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; font-weight: 700; color: #bdb5b6; margin-bottom: 1.2rem; min-height: 1.2em; }
.ap-crumbs a { color: #E6B7BF; text-decoration: none; }
.ap-crumbs a:hover { color: #FFD43B; }
.ap-crumbs span[aria-hidden] { opacity: .5; }
.ap-cargando, .ap-vacio { color: #E6B7BF; padding: 2rem 0; }

.ap-sec-t { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.ap-sec-t h2 { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; margin: 0; }
.ap-sec-t p { margin: 0; color: #bdb5b6; }
.ap-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ap-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .5rem; background: #1b1b1b; border: 2px solid #6D0D1D; border-radius: 18px; padding: 1.2rem 1.2rem 1.1rem; transition: transform .15s, border-color .15s, background .15s; min-height: 132px; }
.ap-card:hover { transform: translateY(-3px); border-color: #FFD43B; background: #202020; }
.ap-card:focus-visible { outline: 3px solid #FFD43B; outline-offset: 3px; }
.ap-card .ic { font-size: 1.8rem; line-height: 1; }
.ap-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0; line-height: 1.25; color: #fff; }
.ap-card p { margin: 0; color: #bdb5b6; font-size: .85rem; font-weight: 600; }
.ap-card .n { margin-top: auto; color: #FFD43B; font-weight: 800; font-size: .8rem; letter-spacing: .04em; }
.ap-card.vacia .n { color: #8f8789; }
.ap-card-au { border-style: dashed; border-color: #E6B7BF66; }
.ap-card-au .n { color: #E6B7BF; }

.ap-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.2rem; scrollbar-width: thin; }
.ap-tab { flex: none; border: 2px solid #ffffff22; background: #1b1b1b; color: #fff; border-radius: 999px; padding: .55rem 1.1rem; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.ap-tab:hover { border-color: #ffffff66; }
.ap-tab[aria-selected="true"] { background: #6D0D1D; border-color: #6D0D1D; }
.ap-tab small { color: #FFD43B; margin-left: .3rem; }

.ap-list { display: grid; gap: 10px; }
.ap-asig { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem; background: #1b1b1b; border: 2px solid #ffffff14; border-radius: 14px; padding: .9rem 1.1rem; transition: border-color .15s, background .15s; }
.ap-asig:hover { border-color: #6D0D1D; background: #202020; }
.ap-asig:focus-visible { outline: 3px solid #FFD43B; outline-offset: 2px; }
.ap-asig b { font-weight: 800; }
.ap-asig small { display: block; color: #8f8789; font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .2rem; }
.ap-pill { border-radius: 999px; padding: .3rem .75rem; font-weight: 800; font-size: .75rem; background: #2a2a2a; color: #8f8789; white-space: nowrap; }
.ap-pill.si { background: #FFD43B; color: #0E0E0E; }

.ap-doc { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; background: #1b1b1b; border: 2px solid #6D0D1D; border-radius: 16px; padding: 1rem 1.1rem; }
.ap-doc .pdf { width: 46px; height: 56px; border-radius: 8px; background: #6D0D1D; display: grid; place-items: center; font-weight: 900; font-size: .7rem; letter-spacing: .05em; }
.ap-doc h3 { margin: 0 0 .2rem; font-size: 1rem; font-weight: 800; }
.ap-doc p { margin: 0; color: #bdb5b6; font-size: .85rem; }
.ap-doc .meta { color: #E6B7BF; font-size: .75rem; font-weight: 700; margin-top: .35rem; }
.ap-head-asig { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.ap-head-asig h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; margin: 0; text-transform: none; line-height: 1.15; }
.ap-head-asig p { color: #bdb5b6; margin: .4rem 0 0; font-weight: 600; }
.ap-plan { color: #E6B7BF; font-size: .85rem; font-weight: 700; }
.ap-plan:hover { color: #FFD43B; }
.ap-empty { border: 2px dashed #ffffff22; border-radius: 18px; padding: 2rem 1.4rem; text-align: center; color: #DCD5D6; }
.ap-empty p { margin: 0 0 1rem; }

.ap-how { background: #161616; border-top: 1px solid #ffffff12; padding: 3.5rem 0; }
.ap-how-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: center; }
.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ap-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: center; background: #1b1b1b; border-radius: 14px; padding: .9rem 1rem; color: #DCD5D6; }
.ap-steps b { width: 44px; height: 44px; border-radius: 50%; background: #6D0D1D; display: grid; place-items: center; font-weight: 900; color: #fff; }
.ap-steps strong { color: #fff; }
.ap-foot { border-top: 1px solid #ffffff12; padding: 1.6rem 0 2.2rem; color: #8f8789; font-size: .8rem; }
.ap-foot a { color: #E6B7BF; }

#subir { border: 0; padding: 0; border-radius: 22px; background: #161616; color: #fff; width: min(680px, calc(100% - 20px)); max-height: calc(100vh - 24px); }
#subir::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
#subir form { position: relative; padding: 1.6rem 1.5rem 1.4rem; }
#subir h2 { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; margin: 0 0 .3rem; }
.ap-dlg-lead { color: #bdb5b6; margin: 0 0 1.1rem; }
.ap-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #0E0E0E; color: #fff; font-size: 1.4rem; cursor: pointer; }
.ap-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.ap-fields label { display: grid; gap: .35rem; font-weight: 700; font-size: .82rem; color: #E6B7BF; }
.ap-fields label.full { grid-column: 1 / -1; }
.ap-fields small { color: #8f8789; font-weight: 600; }
.ap-fields select, .ap-fields input[type=text], .ap-fields textarea, .ap-fields input[type=file] { font: inherit; font-size: .95rem; color: #fff; background: #0E0E0E; border: 2px solid #ffffff22; border-radius: 12px; padding: .7rem .8rem; width: 100%; box-sizing: border-box; }
.ap-fields select:focus, .ap-fields input:focus, .ap-fields textarea:focus { outline: none; border-color: #FFD43B; }
.ap-check { display: flex !important; grid-template-columns: none; gap: .6rem !important; align-items: start; color: #DCD5D6 !important; font-weight: 600 !important; line-height: 1.45; }
.ap-check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: #FFD43B; flex: none; }
.ap-check a { color: #FFD43B; }
.ap-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ap-msg { min-height: 1.3em; margin: 1rem 0 0; font-weight: 700; }
.ap-msg.err { color: #ff8a9a; }
.ap-msg.ok { color: #7ee2a8; }
.ap-progress { height: 8px; border-radius: 8px; background: #2a2a2a; overflow: hidden; margin-top: .6rem; }
.ap-progress i { display: block; height: 100%; width: 0; background: #FFD43B; transition: width .2s; }
.ap-dlg-actions .ap-btn { flex: 1 1 10rem; }
.ap-dlg-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }

@media (max-width: 900px) { .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-how-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .ap-grid { grid-template-columns: 1fr; }
  .ap-fields { grid-template-columns: 1fr; }
  .ap-doc { grid-template-columns: auto 1fr; }
  .ap-doc .ap-btn { grid-column: 1 / -1; }
  .ap-hero { padding-top: 2.6rem; }
  .ap-hero-actions .ap-btn { width: 100%; }
}
