/* Content templates: judge profiles, news (listing + article), finalist teams, FAQ and legal pages.
   Editorial and flat: reading pages sit directly on the page background (no cards in cards), with
   hairline rules, a 68ch measure, and brand accents (lime / magenta) used sparingly.
   Uses the site tokens from styles.css and the fluid type scale from typography.css. */

.content-page{--hdr:6.875rem;background:var(--purple)}
@media(max-width:1000px){.content-page{--hdr:90px}}
@media(max-width:600px){.content-page{--hdr:80px}}

.doc-wrap{width:min(68rem,calc(100% - 3rem));margin-inline:auto;position:relative}
.doc-wrap--wide{width:min(80rem,calc(100% - 3rem))}

/* ---- Page head ---- */
.doc-head{position:relative;overflow:hidden;isolation:isolate;
  padding:calc(var(--hdr) + clamp(2.25rem,4.5vw,4rem)) 0 clamp(2rem,4vw,3.5rem);
  background:radial-gradient(70% 140% at 88% -10%,rgb(169 39 120 / .32),transparent 62%),linear-gradient(180deg,#1b0b56,#20155f)}
.doc-chevron{position:absolute;right:max(1.5rem,6vw);top:50%;width:min(22rem,34vw);height:auto;opacity:.2;z-index:-1;transform:translateY(-42%);pointer-events:none}
.crumbs{display:flex;flex-wrap:wrap;gap:.5rem .65rem;font-size:var(--type-body-s-size);color:#ffffff99;margin-bottom:clamp(1.25rem,2.5vw,2rem)}
.crumbs a{color:#ffffffb3;transition:color .25s ease}
.crumbs a:hover{color:var(--lime)}
.crumbs li{list-style:none;display:flex;gap:.65rem}
.crumbs li+li:before{content:'/';color:#ffffff4d}
.crumbs [aria-current]{color:#fff}
.crumbs{padding:0;margin-top:0}
.doc-eyebrow{display:block;color:var(--lime);font-size:var(--type-overline-size);font-weight:700;letter-spacing:var(--type-overline-tracking);text-transform:uppercase;margin-bottom:1rem}
.doc-title{font-size:var(--type-h2-size);line-height:1.06;font-weight:900;text-transform:uppercase;max-width:22ch;text-wrap:balance}
.doc-title--long{font-size:clamp(28px,1.4vw + 19px,46px);line-height:1.12;text-transform:none;max-width:26ch}
.doc-title .u{text-decoration:underline;text-decoration-color:var(--magenta);text-decoration-thickness:.115em;text-underline-offset:.08em;text-decoration-skip-ink:none}
.doc-lead{font-size:var(--type-intro-size);line-height:1.4;font-weight:500;color:#fff;max-width:46rem;margin-top:1.25rem}
.doc-meta{margin-top:1rem;font-size:var(--type-body-m-size);color:#ffffffb3}

.doc-body{padding:clamp(2.5rem,5vw,4.5rem) 0 clamp(4rem,8vw,7rem)}

/* ---- Prose ---- */
.prose{max-width:68ch;font-size:var(--type-body-l-size);line-height:1.7;color:#ffffffd9}
.prose>*+*{margin-top:1.15em}
.prose a{color:var(--lime);text-decoration:underline;text-underline-offset:.2em;text-decoration-thickness:1px;transition:text-decoration-thickness .2s ease}
.prose a:hover{text-decoration-thickness:2px}
.prose strong{color:#fff;font-weight:700}
.prose ul,.prose ol{padding-left:1.35rem}
.prose ul{list-style:disc}
.prose li+li{margin-top:.5em}
.prose li::marker{color:var(--lime)}
.prose blockquote{border-left:3px solid var(--magenta);padding-left:1.25rem;color:#fff}
.prose h2,.prose h3{color:#fff;font-weight:900;text-transform:none;letter-spacing:0;line-height:1.25;margin-top:2.2em}
.prose h2{font-size:var(--type-h5-size)}
.prose h3{font-size:calc(var(--type-h5-size)*.9)}
.prose h2:after{content:'';display:block;width:2.5rem;height:3px;background:var(--magenta);margin-top:.6rem}
.prose>p:first-child{font-size:var(--type-intro-size);line-height:1.5;color:#fff;font-weight:500}
.prose--plain>p:first-child{font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit}

/* ---- Judge profile ---- */
.person{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(2rem,5vw,5rem);align-items:start}
.person-photo{position:sticky;top:calc(var(--hdr) + 1.5rem);margin:0 .9rem .9rem 0;box-shadow:.9rem .9rem 0 var(--lime)}
.person-photo img{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;object-position:50% 20%;background:#20155f}
@media(max-width:800px){
  .person{grid-template-columns:1fr}
  .person-photo{position:static;max-width:20rem}
}

/* ---- Prev / next ---- */
.pager{display:grid;grid-template-columns:1fr 1fr;margin-top:clamp(3rem,6vw,5rem);border-top:1px solid #ffffff26}
.pager a{display:grid;gap:.35rem;padding:1.5rem 0;transition:color .3s ease}
.pager a+a{text-align:right;border-left:1px solid #ffffff26;padding-left:1.5rem}
.pager small{font-size:var(--type-body-s-size);letter-spacing:.14em;text-transform:uppercase;color:#ffffff8c;font-weight:700}
.pager strong{font-size:var(--type-h5-size);font-weight:900;line-height:1.25;transition:color .3s ease,transform .5s var(--motion-ease)}
.pager a:hover strong{color:var(--lime)}
.pager a:first-child:hover strong{transform:translateX(-4px)}
.pager a+a:hover strong{transform:translateX(4px)}
.pager .is-empty{pointer-events:none}
.pager-back{display:inline-flex;align-items:center;gap:.65rem;margin-top:2rem;font-weight:700;color:#fff;font-size:var(--type-cta-size)}
.pager-back img{width:.75rem;height:1rem;transform:rotate(180deg);transition:transform .5s var(--motion-ease)}
.pager-back:hover{color:var(--lime)}
.pager-back:hover img{transform:rotate(180deg) translateX(4px)}
@media(max-width:600px){
  .pager{grid-template-columns:1fr}
  .pager a+a{text-align:left;border-left:0;padding-left:0;border-top:1px solid #ffffff26}
}

/* ---- News ---- */
.news-feature{display:grid;gap:1rem;padding:0 0 clamp(2rem,4vw,3rem);margin-bottom:0;border-bottom:1px solid #ffffff26;color:#fff}
.news-feature .doc-eyebrow{margin:0}
.news-feature h2{font-size:var(--type-h3-size);line-height:1.12;text-transform:none;max-width:24ch;transition:color .3s ease}
.news-feature p{font-size:var(--type-intro-size);color:#ffffffcc;max-width:44rem;line-height:1.45}
.news-feature:hover h2{color:var(--lime)}
.news-list{list-style:none;padding:0}
.news-row{display:grid;grid-template-columns:11rem minmax(0,1fr) 1.5rem;gap:1.5rem;align-items:baseline;padding:1.75rem 0;border-bottom:1px solid #ffffff26;color:#fff;transition:padding .5s var(--motion-ease)}
.news-row time{font-size:var(--type-body-s-size);letter-spacing:.12em;text-transform:uppercase;color:var(--lime);font-weight:700}
.news-row h3{font-size:var(--type-h5-size);line-height:1.3;text-transform:none;transition:color .3s ease}
.news-row p{margin-top:.4rem;font-size:var(--type-body-m-size);color:#ffffffa6;max-width:60ch}
.news-row img{width:.9rem;height:1.2rem;align-self:center;opacity:.5;transition:transform .5s var(--motion-ease),opacity .3s ease}
.news-row:hover{padding-left:.5rem}
.news-row:hover h3{color:var(--lime)}
.news-row:hover img{transform:translateX(5px);opacity:1}
@media(max-width:700px){
  .news-row{grid-template-columns:minmax(0,1fr) 1.25rem;gap:.35rem 1rem}
  .news-row time{grid-column:1/-1}
}
.more-news{margin-top:clamp(3rem,6vw,5rem)}
.more-news>h2{font-size:var(--type-h5-size);margin-bottom:.5rem;text-transform:none}
.more-news>h2:after{content:'';display:block;width:2.5rem;height:3px;background:var(--magenta);margin-top:.6rem}

/* ---- Finalist team ---- */
.team-head{display:flex;gap:clamp(1.25rem,3vw,2.5rem);align-items:center}
.team-logo{flex:none;width:clamp(6.5rem,12vw,9rem);aspect-ratio:1;display:grid;place-items:center;background:#fff;padding:1rem;box-shadow:.55rem .55rem 0 var(--lime)}
.team-logo img{max-width:100%;max-height:100%;object-fit:contain}
.team-photo{margin:clamp(2rem,4vw,3rem) 0 0;max-width:68rem}
.team-photo img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
@media(max-width:600px){.team-head{align-items:flex-start;flex-direction:column}}

/* ---- FAQ ---- */
.faq{border-top:1px solid #ffffff26;max-width:52rem}
.faq details{border-bottom:1px solid #ffffff26}
.faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:1.5rem;
  padding:1.25rem 0;min-height:44px;font-size:var(--type-h5-size);font-weight:700;line-height:1.35;color:#fff;transition:color .25s ease}
.faq summary::-webkit-details-marker{display:none}
.faq summary:hover{color:var(--lime)}
.faq summary i{position:relative;flex:none;width:14px;height:14px}
.faq summary i:before,.faq summary i:after{content:'';position:absolute;left:0;top:6px;width:14px;height:2px;background:var(--lime);transition:transform .4s var(--motion-ease)}
.faq summary i:after{transform:rotate(90deg)}
.faq details[open] summary i:after{transform:rotate(0)}
.faq details[open] summary{color:var(--lime)}
.faq .prose{padding:0 0 1.5rem;font-size:var(--type-body-m-size)}
.faq .prose>p:first-child{font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit}

/* ---- Entrance: head content settles in once on load ---- */
@media(prefers-reduced-motion:no-preference){
  .doc-head .doc-wrap>*{animation:doc-rise 1s var(--motion-ease) backwards}
  .doc-head .doc-wrap>:nth-child(2){animation-delay:.08s}
  .doc-head .doc-wrap>:nth-child(3){animation-delay:.16s}
  .doc-head .doc-wrap>:nth-child(4){animation-delay:.24s}
  .doc-chevron{animation:doc-sweep 1.6s var(--motion-ease) .3s backwards}
  @keyframes doc-rise{from{opacity:0;transform:translateY(14px)}}
  @keyframes doc-sweep{from{opacity:0;transform:translate(-2rem,-42%)}}
}

.team-story{margin-top:2.5rem}
.content-page .doc-title{overflow-wrap:anywhere}
.content-page a:focus-visible,.faq summary:focus-visible{outline:2px solid var(--lime);outline-offset:6px}

.photo-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}.photo-gallery img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}.photo-gallery a:focus-visible{outline:2px solid var(--lime);outline-offset:4px}@media(max-width:600px){.photo-gallery{grid-template-columns:1fr}}
/* White team logos (ROC, UNIZG-FER, Warsaw MIMotaurs) on a dark tile */
.team-logo--dark{background:#20155f;border:1px solid #ffffff26}
/* Logos fill the tile (small source files included) with an even inner margin; tile size unchanged. */
.team-logo{position:relative}
.team-logo img{position:absolute;inset:14%;width:72%;height:72%;max-width:none;max-height:none;object-fit:contain}

/* ---- News index: image grid, year filters, search, pagination ---- */
.news-tools{display:flex;justify-content:flex-end;margin-bottom:1rem}
.chips{display:flex;flex-wrap:wrap;gap:.5rem}
.chip{min-height:44px;padding:0 1.25rem;border:1px solid #ffffff40;background:none;color:#fff;font-weight:700;font-size:var(--type-cta-size);cursor:pointer;transition:background .3s ease,color .3s ease,border-color .3s ease}
.chip:hover{border-color:var(--lime);color:var(--lime)}
.chip.is-active{background:var(--lime);border-color:var(--lime);color:var(--purple)}
.chip:focus-visible,.page-btn:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.news-status{min-height:1.5em;margin:0 0 1.5rem;text-align:right;font-size:var(--type-body-s-size);color:#ffffffa6}
.story-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(1.25rem,2.5vw,2rem)}
.story[hidden]{display:none}
.story-card{display:flex;flex-direction:column;height:100%;background:#20155f;color:#fff;transition:transform .5s var(--motion-ease),box-shadow .5s var(--motion-ease)}
.story-card:hover{transform:translate(-4px,-4px);box-shadow:.6rem .6rem 0 var(--lime)}
.story-img{display:block;overflow:hidden;aspect-ratio:5/4;background:#1b0b56}
.story-img img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .8s var(--motion-ease)}
.story-card:hover .story-img img{transform:scale(1.04)}
.story-body{display:flex;flex-direction:column;flex:1;padding:clamp(1.25rem,2vw,1.75rem)}
.story-body time{font-size:var(--type-body-s-size);letter-spacing:.12em;text-transform:uppercase;color:var(--lime);font-weight:700}
.story-body h3{margin-top:.75rem;font-size:var(--type-h5-size);line-height:1.3;text-transform:none}
.story-body p{margin-top:.6rem;font-size:var(--type-body-m-size);color:#ffffffb3;line-height:1.5}
.story-cta{align-self:flex-start;margin-top:auto;font-size:var(--type-cta-size)}
.story-body>:nth-last-child(2){margin-bottom:1.5rem}
@media(prefers-reduced-motion:no-preference){.story:not([hidden]){animation:doc-rise .7s var(--motion-ease) backwards}.story:nth-child(2){animation-delay:.07s}.story:nth-child(3){animation-delay:.14s}}
.pagination{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;align-items:center;margin-top:clamp(2rem,4vw,3.5rem)}
.pagination[hidden]{display:none}
.page-btn{min-width:44px;min-height:44px;padding:0 .9rem;border:1px solid #ffffff40;background:none;color:#fff;font-weight:700;font-size:var(--type-cta-size);cursor:pointer;display:inline-grid;place-items:center;transition:background .3s ease,color .3s ease,border-color .3s ease}
.page-btn:hover:not(:disabled){border-color:var(--lime);color:var(--lime)}
.page-btn[aria-current=page]{background:var(--lime);border-color:var(--lime);color:var(--purple)}
.page-btn:disabled{opacity:.35;cursor:not-allowed}
.page-btn img{width:.75rem;height:1rem}
.page-btn.prev img{transform:rotate(180deg)}
@media(max-width:1000px){.story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.story-grid{grid-template-columns:1fr}.news-tools{justify-content:flex-start}.news-status{text-align:left}}

/* ---- News article: lead image (page keeps the standard flat purple look) ---- */
.news-hero{margin:0 0 clamp(2rem,4vw,3.5rem);max-width:68rem}
.news-hero img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}

/* In-page links (terms contents list): land below the fixed header. */
.prose h2[id]{scroll-margin-top:7rem}
