/*
 * Rajyotsava special: styles for both editions: Prajavani (Kannada, index.html)
 * and Deccan Herald (English, index-en.html, <html data-brand="dh">).
 * Mobile first: base rules target phones; min-width queries add tablet (768px)
 * and desktop (1024px) layouts. All colours, fonts and spacing are tokens below.
 */

/* ---------- Fonts ---------- */

/*
 * Prajavani's own typefaces, from the files prajavani.net itself uses (fea.assettype.com,
 * open to any site). Deccan Herald's are the Google Fonts files deccanherald.com uses.
 */

@font-face {
  font-family: "PvHeadline";
  src: url("https://fea.assettype.com/tpml/assets/PvHeadlineSemibold3.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "PvText";
  src: url("https://fea.assettype.com/tpml/assets/PrajavaniTextRegular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PvText";
  src: url("https://fea.assettype.com/tpml/assets/PrajavaniTextSemibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("https://fonts.gstatic.com/s/playfairdisplay/v30/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtPK-F2qC0s.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("https://fonts.gstatic.com/s/playfairdisplay/v30/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiunDXbtPK-F2qC0s.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("https://fonts.gstatic.com/s/robotoslab/v25/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2RjV9Su1cai.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("https://fonts.gstatic.com/s/robotoslab/v25/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjoa4Omb2RjV9Su1cai.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  --red: #a80f22;
  --red-dark: #79091a;
  --red-deep: #5c0714;
  --yellow: #f6c744;
  --yellow-soft: #fff4d6;
  --gold-light: #ffe9a8;
  --gold-deep: #e0a136;
  --white: #ffffff;
  --cream: #fffaf0;
  --paper: #f7f7f5;
  --ink: #242424;
  --ink-muted: #5a5a5a;
  --line: #e6e2da;
  --line-strong: #cfc8bb;
  --night: #1c1416;

  --font-headline: "PvHeadline", "Noto Sans Kannada", Georgia, serif;
  --font-text: "PvText", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --gutter: 16px;
  --container: 1200px;
  --nav-height: 48px;
  --bottom-nav-height: 60px;
  --radius: 4px;
  --shadow: 0 1px 2px rgb(36 36 36 / 6%), 0 4px 16px rgb(36 36 36 / 6%);
  --shadow-raised: 0 2px 4px rgb(36 36 36 / 8%), 0 16px 40px rgb(36 36 36 / 14%);
  --flag: linear-gradient(var(--yellow) 50%, var(--red) 50%);

  --duration: 200ms;
  --duration-slow: 320ms;
  --duration-carousel: 600ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --focus-ring: var(--red);
  --logo-scale: 1; /* footer logo height, relative to the Prajavani wordmark */
}

/* The English edition swaps in Deccan Herald's typefaces; everything else is shared. */
:root[data-brand="dh"] {
  --font-headline: "Playfair Display", Georgia, serif;
  --font-text: "Roboto Slab", Georgia, serif;
  --logo-scale: 1.5; /* the stacked DH logo needs more height to stay legible */
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
    --nav-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration: 0ms;
    --duration-slow: 0ms;
    --duration-carousel: 0ms;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

body:has(dialog[open]) {
  overflow: hidden;
}

h1,
h2,
h3,
p,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-headline);
  font-weight: 600;
  line-height: 1.3;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- Shared components ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Hidden on screen, still read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.byline {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transition: background-color var(--duration);
}

/* Round white control buttons: carousel arrows and photo viewer controls. */
.round-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--red);
  box-shadow: var(--shadow);
  transition: background-color var(--duration), color var(--duration), border-color var(--duration);
}

.round-button:hover:enabled {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.round-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  background: transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color var(--duration), color var(--duration);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* A label wrapping a hidden file input shows the input's keyboard focus. */
.button:has(input:focus-visible) {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.button--primary {
  background: var(--red);
  color: var(--white);
}

.button--primary:hover:enabled {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

/* Yellow call-to-action, used on dark red backgrounds. */
.button--accent {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.button--accent:hover {
  background: var(--white);
  border-color: var(--white);
}

.button[hidden] {
  display: none;
}

/* A quieter button on dark backgrounds, beside a yellow one. */
.button--ghost {
  border-color: var(--yellow);
  background: transparent;
  color: var(--white);
}

.button--ghost:hover {
  background: var(--yellow);
  color: var(--ink);
}

.button--outline {
  color: var(--red);
}

.button--outline:is(:hover:enabled, label:hover) {
  background: var(--red);
  color: var(--white);
}

/* Category label. */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--red);
}

/* Section heading: Kannada-flag marker, title, then a hairline to the edge. */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-size: 1.5rem;
}

.section-title::before {
  content: "";
  flex: none;
  width: 6px;
  height: 1.3em;
  background: var(--flag);
}

/* Uses the text colour, so the rule also works on dark sections. */
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.15;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: var(--space-6);
  }
}

.flag-bar {
  height: 6px;
  background: var(--flag);
}

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}

/* ---------- Masthead ---------- */

/* Site red, so the gold Karunadotsava mark sits on it directly. */
.masthead {
  --focus-ring: var(--yellow);
  background: var(--red);
  color: var(--white);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-1);
}

/* The Karunadotsava mark (newspaper logo + event title), as the home link. */
.brand {
  min-width: 0;
}

.brand__link {
  display: flex;
}

.brand__mark,
.opening__mark {
  width: auto;
}

.brand__mark {
  height: 52px;
}

/* A quiet link back to the newspaper's home page: its white logo, a thin rule, a home icon. */
.masthead__action {
  display: none;
  flex: none;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--white);
  opacity: 0.85;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: opacity var(--duration), text-decoration-color var(--duration);
}

.masthead__action:hover {
  opacity: 1;
  text-decoration-color: currentColor;
}

.masthead__logo {
  width: auto;
  height: calc(22px * var(--logo-scale));
}

.masthead__home {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding-left: var(--space-3);
  border-left: 1px solid rgb(255 255 255 / 45%);
}

/* Phones open the menu panel from here; wider screens from the nav bar. */
.masthead__menu {
  flex: none;
  color: var(--white);
}

.masthead__menu:hover {
  background: var(--red-dark);
}

@media (min-width: 768px) {
  .masthead__menu {
    display: none;
  }

  .masthead__inner {
    padding-block: var(--space-2);
  }

  .brand__mark {
    height: 60px;
  }
}

@media (min-width: 1024px) {
  .masthead__action {
    display: inline-flex;
  }
}

/* ---------- Search ---------- */

/* Phones: at the top of the menu panel. */
.search {
  padding: var(--space-4) var(--space-5) 0;
}

.search__field {
  position: relative;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: var(--space-3);
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
  translate: 0 -50%;
  pointer-events: none;
}

.search__input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-4) 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  transition: border-color var(--duration), background-color var(--duration);
}

/* The focus outline replaces the border instead of doubling it. */
.search__input:focus {
  background: var(--white);
  outline-offset: -1px;
}

/* Tablet and up: in the masthead. */
@media (min-width: 768px) {
  .search {
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 0;
  }

  .search__form {
    width: min(100%, 380px);
  }
}

/* ---------- Main navigation ---------- */

.site-nav {
  --focus-ring: var(--yellow);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--red-dark);
  color: var(--white);
  box-shadow: 0 2px 8px rgb(36 36 36 / 18%);
}

.site-nav__inner {
  display: flex;
  height: var(--nav-height);
}

/* Phones and tablets: every section in a swipeable strip that fades at the edge. */
.site-nav__list {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.site-nav__list::-webkit-scrollbar {
  display: none;
}

.site-nav__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: var(--space-3);
  border-block: 3px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: background-color var(--duration);
}

.site-nav__link:hover {
  background: var(--red-deep);
}

.site-nav__link:focus-visible {
  outline-offset: -3px;
}

.site-nav__link[aria-current] {
  border-bottom-color: var(--yellow);
}

@media (min-width: 1024px) {
  .site-nav__list {
    overflow: visible;
    mask-image: none;
  }

  .site-nav__link {
    padding-inline: var(--space-4);
  }
}

/* ---------- Menu panel (phones: search and the parts of the page) ---------- */

.menu-panel {
  inset: 0 0 0 auto;
  width: min(100%, 420px);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

.menu-panel[open] {
  animation: panel-in var(--duration-slow) var(--ease);
}

.menu-panel::backdrop {
  background: rgb(20 8 10 / 55%);
}

@keyframes panel-in {
  from {
    transform: translateX(100%);
  }
}

.menu-panel__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* The Karunadotsava mark on site red, as in the page header, with a white close button. */
.menu-panel__header {
  --focus-ring: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-5);
  background: var(--red);
  color: var(--white);
}

.menu-panel__mark {
  width: auto;
  height: 52px;
}

.menu-panel__close:hover {
  background: var(--red-dark);
}

.menu-panel__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-5);
  padding: var(--space-3) var(--space-5) var(--space-6);
}

/* Back to the newspaper's home page: a red bar at the foot of the panel, its white logo, a rule, home. */
.menu-panel__home {
  --focus-ring: var(--yellow);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: auto;
  padding: var(--space-4) var(--space-5);
  background: var(--red);
  color: var(--white);
  font-weight: 600;
}

.menu-panel__logo {
  width: auto;
  height: calc(26px * var(--logo-scale));
}

.menu-panel__home-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-left: var(--space-4);
  border-left: 1px solid rgb(255 255 255 / 45%);
}

.menu-panel__home-text .icon {
  width: 20px;
  height: 20px;
}

.menu-panel__home:hover .menu-panel__home-text span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-panel__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  transition: color var(--duration);
}

.menu-panel__link:hover,
.menu-panel__link[aria-current] {
  color: var(--red);
}

.menu-panel__icon {
  display: flex;
  color: var(--red);
}

.menu-panel__icon .icon {
  width: 20px;
  height: 20px;
}

/* ---------- Bottom bar (phones) ---------- */

/* Fixed to the bottom of the screen; the page leaves room for it. */
body {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

.bottom-nav {
  --focus-ring: var(--yellow);
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--red-dark);
  color: var(--white);
  box-shadow: 0 -2px 8px rgb(36 36 36 / 18%);
}

.bottom-nav__list {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
}

.bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: var(--bottom-nav-height);
  padding: 0;
  border: 0;
  border-top: 3px solid transparent;
  background: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgb(255 255 255 / 75%);
  transition: color var(--duration);
}

.bottom-nav__link:focus-visible {
  outline-offset: -3px;
}

.bottom-nav__link[aria-current] {
  border-top-color: var(--yellow);
  color: var(--white);
}

.bottom-nav__icon .icon {
  width: 22px;
  height: 22px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none;
  }
}

/* ---------- Featured carousel (stacked cards) ---------- */

.featured {
  overflow: clip; /* side cards may run past the screen edge */
  padding-block: var(--space-6) var(--space-7);
  background: linear-gradient(var(--cream), var(--yellow-soft));
}

/*
 * Each card gets --offset (-5…5, 0 = front) and --distance (its absolute value)
 * from main.js. --card-width and --step (how far each card fans out) set the look.
 */
.carousel {
  --card-width: min(62vw, 240px);
  --step: 24%;
  --shrink: 0.12;
}

.carousel__stage {
  position: relative;
}

.carousel__track {
  position: relative;
  height: calc(var(--card-width) * 10 / 7);
  touch-action: pan-y;
  user-select: none;
}

.slide {
  --focus-ring: var(--yellow);
  position: absolute;
  top: 0;
  left: calc(50% - var(--card-width) / 2);
  z-index: calc(10 - var(--distance));
  width: var(--card-width);
  aspect-ratio: 7 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--red-deep);
  box-shadow: 0 10px 30px rgb(36 12 12 / 30%);
  transform: translateX(calc(var(--offset) * var(--step))) scale(calc(1 - var(--distance) * var(--shrink)));
  filter: brightness(calc(1 - var(--distance) * 0.12));
  transition:
    transform var(--duration-carousel) var(--ease),
    filter var(--duration-carousel) var(--ease),
    opacity var(--duration-carousel),
    visibility var(--duration-carousel);
}

.slide[data-far] {
  visibility: hidden;
  opacity: 0;
}

.slide[aria-hidden="true"] {
  cursor: pointer;
}

.slide__link {
  display: flex;
  align-items: flex-end;
  height: 100%;
  color: var(--white);
}

.slide__link:focus-visible {
  outline-offset: -4px;
}

.slide .media__img {
  position: absolute;
  inset: 0;
  -webkit-user-drag: none;
}

/* Dark fade at the bottom so the headline stays readable on any photo. */
.slide__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(24 6 9 / 92%), rgb(24 6 9 / 55%) 38%, transparent 66%);
}

.slide__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-bottom: 4px solid var(--yellow);
  width: 100%;
}

.slide .tag {
  color: var(--yellow);
}

.slide .byline {
  color: rgb(255 255 255 / 80%);
}

.slide__title {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  translate: 0 -50%;
}

.carousel__arrow--prev {
  left: 0;
}

.carousel__arrow--next {
  right: 0;
}

/* Summary of the front story; reserves its lines so the page doesn't jump. */
/* Always three lines high, so the page doesn't move as the stories change. */
.carousel__caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-width: 52ch;
  height: 3lh;
  margin: var(--space-5) auto 0;
  overflow: hidden;
  text-align: center;
  color: var(--ink-muted);
}

@media (min-width: 768px) {
  .carousel {
    --card-width: 260px;
    --step: 52%;
  }

  .slide__body {
    padding: var(--space-5);
  }

  .slide__title {
    font-size: 1.25rem;
  }

  .carousel__caption {
    min-height: 2lh;
  }
}

@media (min-width: 1024px) {
  .featured {
    padding-block: var(--space-7) var(--space-8);
  }

  .carousel {
    --card-width: 300px;
    --step: 70%;
  }

  .slide__title {
    font-size: 1.375rem;
  }

  .carousel__caption {
    font-size: 1.0625rem;
  }
}

/* ---------- Exhibition ---------- */

/*
 * An invitation card: a red date tile beside the heading, then the details and the
 * calendar button. Tablet and up: the date tile runs down the left side.
 */
.event {
  padding-block: var(--space-6);
  background: var(--paper);
}

.event__card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "date head" "body body";
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.event__date {
  grid-area: date;
  display: grid;
  justify-items: center;
  min-width: 76px;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius);
  background: var(--red);
  color: var(--white);
}

.event__day {
  font-family: var(--font-headline);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
}

.event__month {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--yellow);
}

.event__head {
  grid-area: head;
  display: grid;
  gap: var(--space-1);
}

.event__title {
  font-size: 1.5rem;
  color: var(--red-dark);
}

.event__body {
  grid-area: body;
  display: grid;
  justify-items: start;
  gap: var(--space-4);
}

.event__text {
  color: var(--ink-muted);
}

.event__facts {
  display: grid;
  gap: var(--space-3);
}

.event__fact dt {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.event__fact dd {
  margin: 0;
  font-weight: 600;
}

@media (min-width: 768px) {
  .event {
    padding-block: var(--space-7);
  }

  .event__card {
    grid-template-areas: "date head" "date body";
    align-items: start;
    column-gap: var(--space-6);
    padding: var(--space-6);
  }

  .event__date {
    align-self: stretch;
    align-content: center;
    min-width: 140px;
  }

  .event__day {
    font-size: 4rem;
  }

  .event__month {
    font-size: 1rem;
  }

  .event__title {
    font-size: 2rem;
  }

  .event__facts {
    grid-template-columns: auto 1fr;
    column-gap: var(--space-6);
  }
}

/* ---------- Introductory banner ---------- */

/*
 * Two cards of equal weight, built alike: a small label at the top, the content in the
 * middle (portrait left on the quote, QR code right on the contests, mirroring), and
 * the controls along the bottom. The quote is on deep red, polls and contests on white.
 */
.intro {
  padding-block: var(--space-6);
  background: var(--paper);
}

.intro__inner {
  display: grid;
  gap: var(--space-4);
}

.quotes,
.contests {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius);
}

.quotes {
  --focus-ring: var(--yellow);
  background: var(--red-dark);
  color: rgb(255 255 255 / 85%);
}

.contests {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-muted);
}

/* "ಇಂದಿನ ನುಡಿಮುತ್ತು" / the quote's day, and "ಪೋಲ್ ಮತ್ತು ಸ್ಪರ್ಧೆ". */
.intro__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--red);
}

.quotes .intro__eyebrow {
  color: var(--yellow);
}

/* Quotes, one at a time: all share one grid cell, so the tallest sets the height and nothing jumps. */
.quotes__list {
  display: grid;
}

.quote {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: var(--space-4);
  transition: opacity var(--duration-slow) var(--ease), visibility var(--duration-slow);
}

.quote[aria-hidden="true"] {
  visibility: hidden;
  opacity: 0;
}

/* A round cream frame with a yellow ring; the figure stands on its lower edge, cut off by the curve. */
.quote__portrait {
  display: grid;
  align-items: end;
  justify-items: center;
  aspect-ratio: 1;
  padding-top: 12%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 0 3px var(--yellow), 0 6px 18px rgb(0 0 0 / 30%);
}

.quote__silhouette {
  width: 88%;
  height: 100%;
}

.quote__body {
  fill: var(--ink);
}

/* The highlighted feature (turban, beads…) in the flag's yellow, as in the opening. */
.quote__accent {
  fill: var(--yellow);
}

.quote__text {
  font-family: var(--font-headline);
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--yellow);
}

.quote__by {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
}

/* The middle of each card takes the spare height, so the controls line up at the bottom. */
.quotes__list,
.contests__main {
  flex: 1;
  align-content: center;
}

/* Back to earlier days, and forward again. */
.quotes__nav {
  display: flex;
  gap: var(--space-2);
}

/* Polls and contests on the Facebook page. Phones: the link only (a phone can't scan its own screen). */
.contests__main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-5);
}

.contests__title {
  font-size: 1.375rem;
  line-height: 1.35;
  color: var(--ink);
}

.contests__text {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
}

.contests__qr {
  display: none;
  width: 120px;
  height: 120px;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contests__action {
  align-self: flex-start;
}

@media (min-width: 768px) {
  .contests__qr {
    display: block;
  }
}

@media (min-width: 1024px) {
  .intro {
    padding-block: var(--space-7);
  }

  .intro__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }

  .quotes,
  .contests {
    gap: var(--space-5);
    padding: var(--space-6);
  }

  .quote {
    grid-template-columns: 120px 1fr;
    gap: var(--space-5);
  }

  .quote__text {
    font-size: 1.75rem;
  }

  .contests__title {
    font-size: 1.625rem;
  }

  .contests__qr {
    width: 136px;
    height: 136px;
  }
}

/* ---------- Poster maker ---------- */

/*
 * The teaser fits one screen. Phones: intro, example posters, start button.
 * Tablet and up: the examples on the right.
 */
.poster {
  padding-block: var(--space-6);
  background: var(--cream);
}

.poster__inner {
  display: grid;
  grid-template-areas: "intro" "samples" "start";
  gap: var(--space-5);
}

.poster__intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.poster__title {
  font-size: 1.75rem;
  color: var(--red-dark);
}

.poster__lead {
  color: var(--ink-muted);
}

/* Three example posters fanned out on the same deep red "stage" as the maker. */
.poster__samples {
  --sample-width: 112px;
  --sample-spread: 76px;
  grid-area: samples;
  display: grid;
  place-items: center;
  padding-block: var(--space-5);
  border-radius: calc(var(--radius) * 2);
  background: radial-gradient(circle at 50% 40%, var(--red-dark), var(--red-deep));
}

.poster__sample {
  grid-area: 1 / 1;
  width: var(--sample-width);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 40%);
}

.poster__sample:nth-child(1) {
  translate: calc(var(--sample-spread) * -1) 6%;
  rotate: -8deg;
  scale: 0.9;
}

.poster__sample:nth-child(2) {
  z-index: 1;
}

.poster__sample:nth-child(3) {
  translate: var(--sample-spread) 6%;
  rotate: 8deg;
  scale: 0.9;
}

.poster__start {
  grid-area: start;
  display: grid;
  gap: var(--space-3);
}

.poster__privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.poster__privacy .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--red);
}

/*
 * The maker, full screen: a title bar, then the poster on a deep red stage with the
 * choices in a white panel (below it on phones, beside it on desktop), and the
 * save buttons always in reach at the bottom.
 */
.studio {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
}

.studio[open] {
  display: flex;
  flex-direction: column;
}

.studio::backdrop {
  background: var(--red-deep);
}

.studio__bar,
.studio__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-inline: var(--gutter);
  background: var(--white);
}

.studio__bar {
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.studio__title {
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
  color: var(--red-dark);
}

.studio__close:hover {
  background: var(--paper);
}

.studio__main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.studio__stage {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-4) var(--gutter) var(--space-3);
  background: radial-gradient(circle at 50% 35%, var(--red-dark), var(--red-deep));
}

/* Kept short on phones so the first choices show below it. */
.studio__canvas {
  width: auto;
  max-width: 100%;
  height: min(54dvh, 560px);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgb(0 0 0 / 45%);
}

/* Dragging the photo must not scroll the page, but only once there is a photo to drag. */
.studio__canvas.has-photo {
  cursor: grab;
  touch-action: none;
}

.studio__canvas.is-dragging {
  cursor: grabbing;
}

.studio__hint {
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 80%);
}

.studio__panel {
  display: grid;
  align-content: start;
  gap: var(--space-5);
  padding: var(--space-5) var(--gutter) var(--space-6);
}

.studio__foot {
  flex-wrap: wrap;
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

.studio__foot .button {
  flex: 1;
}

.studio__status {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.studio__status:empty {
  display: none;
}

/* Form fields in the panel. */
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Its display would otherwise win over the hidden attribute (the size slider before a photo). */
.field[hidden] {
  display: none;
}

.field__label {
  padding: 0;
  font-weight: 600;
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.field__count {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.field__note {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* The poster maker's disclaimer, set apart at the end of the form. */
.studio__disclaimer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.field__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.field__row .button {
  flex: 1;
}

.field__input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

.field__range {
  width: 100%;
  min-height: 32px;
  accent-color: var(--red);
}

/* Two options in a pill-shaped track; the chosen one fills red. */
/* One equal column per choice. */
.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.segmented__option {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color var(--duration), color var(--duration);
}

.segmented__option:has(input:checked) {
  background: var(--red);
  color: var(--white);
}

.segmented__option:has(input:focus-visible) {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Tap-to-use suggestions. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--white);
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--duration), border-color var(--duration);
}

.chip:hover {
  border-color: var(--red);
  background: var(--yellow-soft);
}

@media (min-width: 768px) {
  .poster__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      ". samples"
      "intro samples"
      "start samples"
      ". samples";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: var(--space-7);
  }

  .poster__samples {
    --sample-width: 150px;
    --sample-spread: 104px;
  }

  .poster__start-button {
    justify-self: start;
  }

  .studio__foot {
    justify-content: flex-end;
  }

  .studio__foot .button {
    flex: none;
  }

  .studio__status {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .poster {
    padding-block: var(--space-7);
  }

  .poster__title {
    font-size: 2.75rem;
  }

  .poster__samples {
    --sample-width: 180px;
    --sample-spread: 132px;
    padding-block: var(--space-6);
  }

  /* Stage on the left filling the height, panel on the right scrolling on its own. */
  .studio__main {
    display: grid;
    grid-template-columns: 1fr minmax(380px, 440px);
    overflow: hidden;
  }

  .studio__stage {
    align-content: center;
    padding-block: var(--space-5);
  }

  .studio__canvas {
    height: calc(100dvh - 56px - 77px - 2 * var(--space-5) - 32px);
  }

  .studio__panel {
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--line);
  }
}

/*
 * Floating shortcut to the poster maker, after the Dasara site's greeting button: a gold
 * pill with a passing shine, a soft pulse and a nudge of the icon. It shrinks to its icon
 * once the reader scrolls (.is-compact) and fades out while the poster section is on
 * screen (.is-hidden) or a "See all" list is open. Phones: just above the bottom bar.
 */
.poster-cta {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--bottom-nav-height) + var(--space-3) + env(safe-area-inset-bottom));
  z-index: 15;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-4);
  border: 2px solid var(--yellow-soft);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--yellow) 45%, var(--gold-deep));
  color: var(--red-deep);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-raised);
  animation: cta-glow 2.4s ease-out infinite;
  transition: opacity var(--duration), transform var(--duration), visibility var(--duration), padding var(--duration-slow), gap var(--duration-slow);
}

.poster-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 251 232 / 80%) 50%, transparent);
  transform: skewX(-20deg);
  animation: cta-shine 3.4s ease-in-out infinite;
}

.poster-cta .icon {
  flex: none;
  animation: cta-nudge 3.4s ease-in-out infinite;
}

.poster-cta span {
  max-width: 280px;
  overflow: hidden;
  transition: max-width var(--duration-slow), opacity var(--duration);
}

.poster-cta:hover {
  transform: translateY(-2px);
}

.poster-cta.is-compact {
  gap: 0;
  padding: var(--space-3);
}

.poster-cta.is-compact span {
  max-width: 0;
  opacity: 0;
}

.poster-cta.is-hidden,
main[data-view="all"] ~ .poster-cta {
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

@keyframes cta-shine {
  0%,
  55% {
    left: -60%;
  }

  100% {
    left: 130%;
  }
}

@keyframes cta-glow {
  0% {
    box-shadow: var(--shadow-raised), 0 0 0 0 rgb(246 199 68 / 70%);
  }

  70%,
  100% {
    box-shadow: var(--shadow-raised), 0 0 0 14px rgb(246 199 68 / 0%);
  }
}

@keyframes cta-nudge {
  0%,
  70%,
  100% {
    transform: rotate(0);
  }

  76% {
    transform: rotate(-14deg);
  }

  82% {
    transform: rotate(12deg);
  }

  88% {
    transform: rotate(-8deg);
  }

  94% {
    transform: rotate(4deg);
  }
}

@media (min-width: 768px) {
  .poster-cta {
    right: var(--space-5);
    bottom: var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster-cta,
  .poster-cta::before,
  .poster-cta .icon {
    animation: none;
  }
}

/* Full-screen camera view (desktop "take photo"). */
.camera {
  --focus-ring: var(--yellow);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--white);
}

.camera::backdrop {
  background: #000;
}

.camera__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.camera__video {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}

.camera__video.is-mirrored {
  transform: scaleX(-1);
}

.camera__controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--space-5);
}

.camera__shutter {
  grid-column: 2;
  width: 72px;
  height: 72px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: inset 0 0 0 4px #000;
  cursor: pointer;
}

/* ---------- Latest highlights ---------- */

.highlights {
  padding-block: var(--space-7);
}

.card-grid {
  display: grid;
  gap: var(--space-4);
}

/* Phones: compact rows (thumbnail + headline); the lead story is full width. */
.card {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: start;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.card__media {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
}

.card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.card__title {
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: color var(--duration);
}

/* Makes the whole card clickable through the headline link. */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Up to three lines: collection summaries can run to a paragraph. */
.card__summary {
  display: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.card:hover .card__title {
  color: var(--red);
}

.card:hover .media__img {
  transform: scale(1.04);
}

.card--lead {
  grid-template-columns: 1fr;
}

.card--lead .card__media {
  aspect-ratio: 16 / 10;
}

.card--lead .card__title {
  font-size: 1.375rem;
}

.card--lead .card__summary {
  display: -webkit-box;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6) var(--space-5);
  }

  .card {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding-bottom: 0;
    border-bottom: 0;
  }

  .card__media {
    aspect-ratio: 3 / 2;
  }

  .card__summary {
    display: -webkit-box;
  }

  .card--lead {
    grid-column: 1 / -1;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-4);
    background: var(--cream);
    border-radius: var(--radius);
  }

  .card--lead .card__title {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card--lead {
    grid-column: span 2;
  }

  .card--lead .card__title {
    font-size: 1.625rem;
  }
}

/* A section with nothing to show yet: its heading stays, with this note. Takes the section's colours. */
.empty-state {
  padding: var(--space-6) var(--space-5);
  border: 1px dashed currentColor;
  border-radius: var(--radius);
  text-align: center;
  opacity: 0.7;
}

/* "See all": under a section's stories, to the full list (with a second button beside it in videos). */
.see-all {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ---------- See all (every story in a collection) ---------- */

/* Shown in place of the home page while the address is #all/… */
.all-stories {
  display: none;
  padding-block: var(--space-6) var(--space-8);
}

main[data-view="all"] > * {
  display: none;
}

main[data-view="all"] > .all-stories {
  display: block;
}

.all-stories__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--red);
}

.all-stories__back::before {
  content: "‹";
  margin-right: var(--space-2);
  font-size: 1.5rem;
  line-height: 1;
}

.all-stories__status {
  margin: calc(-1 * var(--space-3)) 0 var(--space-5);
  color: var(--ink-muted);
}

.all-stories__status a {
  font-weight: 600;
  color: var(--red);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-7);
}

.pager__page,
.pager__step,
.pager__gap {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding-inline: var(--space-2);
  border-radius: var(--radius);
  font-weight: 600;
}

.pager a {
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color var(--duration), color var(--duration);
}

.pager a:hover {
  border-color: var(--red);
  color: var(--red);
}

.pager__step {
  font-size: 1.5rem;
  line-height: 1;
}

span.pager__step {
  color: var(--line-strong);
}

.pager__page[aria-current="page"] {
  background: var(--red);
  color: var(--white);
}

.pager__gap {
  min-width: auto;
  color: var(--ink-muted);
}

.pager__page--near {
  display: none;
}

@media (min-width: 768px) {
  .pager__page--near {
    display: grid;
  }
}

/* ---------- Videos ---------- */

.videos {
  --focus-ring: var(--yellow);
  padding-block: var(--space-7);
  background: var(--night);
  color: var(--white);
}

.video-gallery {
  display: grid;
  gap: var(--space-5);
}

.video-player__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

/* YouTube's or Instagram's player, filling its frame. */
.video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The video's cover with a play button, until the reader taps it. */
.video-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}

.video-cover .media__img {
  position: absolute;
  inset: 0;
}

.video-cover__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgb(0 0 0 / 60%);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 85%);
  translate: -50% -50%;
  transition: background-color var(--duration);
}

/* The play triangle, nudged right so it looks centred. */
.video-cover__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-block: 12px solid transparent;
  border-left: 20px solid var(--white);
  translate: -50% -50%;
}

.video-cover:hover .video-cover__play {
  background: var(--red);
}

.video-player__title {
  padding-top: var(--space-4);
  font-size: 1.375rem;
}

.video-list {
  display: grid;
  gap: var(--space-2);
}

.video-list__item {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2);
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  transition: background-color var(--duration);
}

.video-list__item:hover {
  background: rgb(255 255 255 / 6%);
}

.video-list__item[aria-current="true"] {
  border-left-color: var(--yellow);
  background: rgb(255 255 255 / 10%);
}

.video-list__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

/* Titles come from YouTube and can run long: two lines at most. */
.video-list__title,
.short__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Shorts and Reels: one row that scrolls sideways, each card as wide as Instagram's player needs. */
.shorts__title {
  margin-block: var(--space-7) var(--space-4);
  font-size: 1.25rem;
}

/* A slim gold scrollbar on a faint track, in place of the browser's grey one. */
.shorts {
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgb(246 199 68 / 75%) rgb(255 255 255 / 10%);
}

/* The same look where the standard properties aren't supported (Safari). */
.shorts::-webkit-scrollbar {
  height: 6px;
}

.shorts::-webkit-scrollbar-track {
  border-radius: 3px;
  background: rgb(255 255 255 / 10%);
}

.shorts::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgb(246 199 68 / 75%);
}

.shorts::-webkit-scrollbar-thumb:hover {
  background: var(--yellow);
}

.short {
  flex: none;
  width: 240px;
  scroll-snap-align: start;
}

.short__frame {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

.short__title {
  margin-top: var(--space-2);
}

/*
 * Instagram's player puts a reel in a 4:5 box, under a 54px header, with black bars at the
 * sides (the 9:16 video is centred in it). The card is a 9:16 window onto the video alone:
 * the player is drawn wider by 326/229.5 (box width / video width) and shifted up past
 * its header, so the bars, the header and the strip below fall outside the window.
 */
.short--instagram .short__frame {
  position: relative;
}

.short--instagram .video-frame {
  position: absolute;
  top: -54px;
  left: 50%;
  width: calc(100% * 326 / 229.5);
  height: calc(100% + 54px + 200px);
  translate: -50% 0;
}

/* Takes the colour of its section: white on the dark videos band, ink on a "See all" page. */
.short__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.8;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: opacity var(--duration), text-decoration-color var(--duration);
}

.short__link:hover {
  opacity: 1;
  text-decoration-color: currentColor;
}

.short__icon .icon {
  width: 18px;
  height: 18px;
}

@media (min-width: 1024px) {
  .videos {
    padding-block: var(--space-8);
  }

  .video-gallery {
    grid-template-columns: 2fr 1fr;
    align-items: start;
    gap: var(--space-6);
  }

  .video-player__title {
    font-size: 1.75rem;
  }
}

/* "See all" pages of videos: wide videos two or three to a row; reels as wide as Instagram's player allows (240px or more). */
.video-grid {
  display: grid;
  gap: var(--space-5);
}

.video-card__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

.video-card__title {
  margin-top: var(--space-3);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

.reel-grid .short {
  width: auto;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Photo stories ---------- */

.photo-stories {
  padding-block: var(--space-7);
}

/* Phones: lead story full width, then two columns of squares. */
.photo-stories__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.photo-stories__cell--lead {
  grid-column: 1 / -1;
}

.photo-stories__item {
  position: relative;
  display: block;
  height: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
}

.photo-stories__cell--lead .photo-stories__item {
  aspect-ratio: 4 / 3;
}

.photo-stories__item .media__img {
  position: absolute;
  inset: 0;
}

.photo-stories__item:hover .media__img {
  transform: scale(1.04);
}

.photo-stories__caption {
  position: absolute;
  inset: auto 0 0;
  padding: var(--space-6) var(--space-3) var(--space-2);
  background: linear-gradient(transparent, rgb(20 6 9 / 85%));
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--white);
}

@media (min-width: 768px) {
  .photo-stories__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }

  .photo-stories__cell--lead {
    grid-column: span 2;
    grid-row: span 2;
  }

  .photo-stories__cell--lead .photo-stories__item {
    aspect-ratio: auto;
  }

  .photo-stories__cell--lead .photo-stories__caption {
    padding: var(--space-7) var(--space-5) var(--space-4);
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .photo-stories {
    padding-block: var(--space-8);
  }

  .photo-stories__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Interesting facts (ಕರುನಾಡ ಕುತೂಹಲ) ---------- */

/*
 * Numbered fact cards on cream. Phones: a row each, photo beside the number and headline.
 * Tablet and up: two, then three columns, photo on top. The whole card is a link.
 */
.facts {
  padding-block: var(--space-7);
  background: var(--cream);
}

.facts__lead {
  max-width: 60ch;
  margin: calc(-1 * var(--space-3)) 0 var(--space-5);
  color: var(--ink-muted);
}

.facts__grid {
  display: grid;
  gap: var(--space-3);
}

.fact {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: var(--space-4);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--white);
}

/* Phones: the photo fills its column for the card's full height. */
.fact__media {
  align-self: stretch;
  min-height: 112px;
  overflow: hidden;
  background: var(--paper);
}

.fact__body {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
}

.fact__number {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--red);
}

.fact__title {
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: color var(--duration);
}

.fact:hover .fact__title {
  color: var(--red);
}

.fact:hover .media__img {
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .facts__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }

  .fact {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0;
  }

  .fact__media {
    aspect-ratio: 3 / 2;
  }

  .fact__body {
    padding: var(--space-4) var(--space-5) var(--space-5);
  }

  .fact__number {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .facts {
    padding-block: var(--space-8);
  }

  .facts__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- From the archives (English edition) ---------- */

/*
 * Each story is a newspaper clipping: a double rule across the top, the photo, then the
 * headline and subheadline. The whole card is a link. Phones: one column.
 */
.archive {
  padding-block: var(--space-7);
  background: var(--paper);
}

.archive__lead {
  max-width: 60ch;
  margin-bottom: var(--space-5);
  color: var(--ink-muted);
}

.archive__list {
  display: grid;
  gap: var(--space-4);
}

.archive__item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: var(--space-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px double var(--ink);
  border-radius: var(--radius);
}

.archive__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper);
}

.archive__title {
  padding: var(--space-4) var(--space-5) 0;
  font-size: 1.25rem;
  transition: color var(--duration);
}

.archive__summary {
  padding: var(--space-2) var(--space-5) 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.archive__item:hover .archive__title {
  color: var(--red);
}

.archive__item:hover .media__img {
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .archive__list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .archive {
    padding-block: var(--space-8);
  }

  .archive__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Footer ---------- */

.site-footer {
  --focus-ring: var(--yellow);
  background: var(--red-dark);
  color: rgb(255 255 255 / 85%);
  font-size: 0.9375rem;
}

.site-footer a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color var(--duration), text-decoration-color var(--duration);
}

.site-footer a:hover {
  color: var(--white);
  text-decoration-color: var(--yellow);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-7);
}

.site-footer__logo {
  width: auto;
  height: calc(36px * var(--logo-scale));
}

.site-footer__brand p {
  max-width: 42ch;
  margin-top: var(--space-4);
}

/* The logo leads back to the newspaper's home page. */
.site-footer__home {
  display: inline-block;
}

.site-footer__bottom {
  background: var(--red-deep);
  font-size: 0.8125rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-4);
}

@media (min-width: 1024px) {
  .site-footer__inner {
    padding-block: var(--space-8) var(--space-7);
  }
}

/* ---------- Opening animation ---------- */

/*
 * Shown only when the <head> script adds .has-opening. A 3D scene seen through
 * one perspective: streaks rush outward and the camera flies at a steady speed
 * past the figures, which veer off to the left and right as it reaches them.
 * Last comes the map, filled with the waving flag, at the same speed; it settles
 * in front and the closing message appears.
 * js/opening.js sets the timing variables from OPENING in js/data.js and draws
 * the waving flag.
 */
.opening {
  display: none;
}

.has-opening body {
  overflow: hidden;
}

.has-opening .opening {
  --size: min(84vw, 44vh, 520px);
  --finale-start: calc((var(--figures) + 1) * var(--figure-ms));

  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--cream);
}

.opening__header {
  --focus-ring: var(--yellow);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 64px;
  padding-inline: var(--gutter);
  background: var(--red);
}

.opening__mark {
  height: 48px;
}

.opening__skip {
  position: absolute;
  right: var(--gutter);
  padding-inline: var(--space-4);
  font-size: 0.875rem;
}

.opening__stage {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, var(--white), var(--cream) 75%);
}

/*
 * Every child sits in the centre; their depth comes from translateZ. Nearer
 * things come later in the page (see js/opening.js), so they paint on top.
 */
.opening__scene {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.opening__scene > * {
  grid-area: 1 / 1;
}

/*
 * A thin strip lying along the line of flight, off to one side: turned by --angle
 * around the centre, pushed out by --radius, then laid lengthways into the depth
 * (rotateY). Perspective makes it look like a line streaming out from the centre.
 * Its near end is bright and its far end fades away.
 */
.opening__streak {
  width: 240px;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), transparent);
  opacity: 0;
}

.opening__streak--red {
  background: linear-gradient(90deg, var(--red), transparent);
}

/* A silhouette with its name beneath, like the nameplate under a bust; they fly as one. */
.opening__figure {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  opacity: 0;
}

/* All figures share one height whatever their shape; the width follows each drawing. */
.opening__silhouette {
  width: auto;
  height: calc(var(--size) * 0.8);
}

.opening__body {
  fill: var(--figure-body);
}

/* The highlighted feature (turban, sword, beads…) in the flag's yellow. */
.opening__accent {
  fill: var(--figure-accent);
}

/* Sized from the scene so it shrinks and grows with the silhouette. */
.opening__name {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: calc(var(--size) * 0.075);
  line-height: 1.3;
  text-align: center;
  opacity: 0;
}

.opening__figure--red {
  --figure-body: var(--red);
  --figure-accent: var(--yellow);
  color: var(--red);
}

.opening__figure--ink {
  --figure-body: var(--ink);
  --figure-accent: var(--yellow);
  color: var(--ink);
}

.opening__map {
  display: block;
  width: calc(var(--size) * 0.66);
  overflow: visible;
  opacity: 0;
}

.opening__map-outline {
  fill: none;
  stroke: var(--red-dark);
  stroke-width: 2;
  stroke-linejoin: round;
}

.opening__cloth--yellow {
  fill: var(--yellow);
}

.opening__cloth--red {
  fill: var(--red);
}

.opening__shine--light stop {
  stop-color: var(--white);
}

.opening__shine--dark stop {
  stop-color: var(--ink);
}

/* The closing message, at the bottom of the stage. */
.opening__caption {
  position: relative;
  padding: 0 var(--gutter) var(--space-5);
  text-align: center;
}

/* Hidden (not just transparent) until it appears, so its button can't be reached early. */
.opening__finale {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  visibility: hidden;
  opacity: 0;
}

.opening__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red-dark);
}

.opening__title {
  max-width: 14em;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1.3;
  color: var(--red);
}

.opening__text {
  max-width: 24em;
  color: var(--ink-muted);
}

.opening__enter {
  margin-top: var(--space-2);
}

/* ----- Timeline ----- */

/* Same depth run and pace as the figures, so lines and figures move as one; they die away as the map settles. */
.opening--playing .opening__streak {
  animation:
    opening-streak calc(var(--figure-ms) * 2) linear calc(var(--i) / var(--streaks) * var(--figure-ms) * -2) infinite,
    opening-vanish var(--figure-ms) ease-out var(--finale-start) forwards;
}

/* Two animations: steady forward motion (transform) and the sideways veer (translate), each with its own pace. */
.opening--playing .opening__figure {
  animation:
    opening-fly calc(var(--figure-ms) * 2) linear calc(var(--i) * var(--figure-ms)) both,
    opening-veer calc(var(--figure-ms) * 2) linear calc(var(--i) * var(--figure-ms)) both;
}

.opening--playing .opening__name {
  animation: opening-name calc(var(--figure-ms) * 2) var(--ease) calc(var(--i) * var(--figure-ms)) both;
}

/*
 * The map takes the slot after the last figure and travels the same 1600px in
 * from the distance. Its easing starts at the figures' speed (1100px per
 * figure-ms) and slows to a stop in front: the curve's opening slope of 2 over
 * 2.9 slots matches that speed.
 */
.opening--playing .opening__map {
  animation: opening-arrive calc(var(--figure-ms) * 2.9) cubic-bezier(0.25, 0.5, 0.5, 1) calc(var(--figures) * var(--figure-ms)) both;
}

.opening--playing .opening__finale {
  animation: opening-reveal calc(var(--finale-ms) * 0.25) var(--ease) calc(var(--finale-start) + var(--finale-ms) * 0.6) forwards;
}

.opening--leaving {
  animation: opening-lift var(--exit-ms) cubic-bezier(0.7, 0, 0.2, 1) forwards;
}

/* Stops short of the camera (900px) by more than half its length, so no part passes behind it. */
@keyframes opening-streak {
  from {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--radius)) translateZ(-1600px) rotateY(90deg);
  }

  20%,
  85% {
    opacity: 0.9;
  }

  to {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--radius)) translateZ(700px) rotateY(90deg);
  }
}

@keyframes opening-vanish {
  to {
    opacity: 0;
  }
}

/*
 * The camera's flight past one figure, at one steady speed: a straight run in
 * depth from far away to beside the camera (perspective is 900px, so z 820px is
 * over 11x size). Every figure covers the same distance in the same time, so the whole
 * journey flows without pauses. Near the end it turns slightly, as a figure
 * passing close beside the reader would.
 */
@keyframes opening-fly {
  0% {
    opacity: 0;
    transform: translateZ(-1600px);
  }

  12%,
  96% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateZ(820px) rotateY(calc(var(--side) * -20deg));
  }
}

/* Straight ahead at first, then curving away to its side faster and faster, off the edge of the screen. */
@keyframes opening-veer {
  0%,
  65% {
    translate: 0;
    animation-timing-function: cubic-bezier(0.45, 0, 0.9, 0.55);
  }

  100% {
    translate: calc(var(--side) * 110%) 0;
  }
}

/* Fades in once the figure is near enough to read, then rides along with it. */
@keyframes opening-name {
  0%,
  25% {
    opacity: 0;
    transform: translateY(0.4em);
  }

  38%,
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes opening-arrive {
  0% {
    opacity: 0;
    transform: translateZ(-1600px);
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes opening-reveal {
  from {
    visibility: visible;
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
}

@keyframes opening-lift {
  to {
    transform: translateY(-100%);
  }
}

@media (min-width: 1024px) {
  .opening__header {
    min-height: 76px;
  }

  .opening__mark {
    height: 60px;
  }

  .opening__title {
    font-size: 3.25rem;
  }
}
