@font-face {
  font-family: Paper;
  src: url("/v2/dhurjati.c2e391de6485b973.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: Telugu;
  src: url("/v2/telugu.23c7cef824a7840e.woff2") format("woff2");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  color: #161514;
  background: #faf7f0;
  font-family: Telugu, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

body {
  margin: 0;
  padding-bottom: calc(max(80px, 6rem) + env(safe-area-inset-bottom));
}

a {
  color: #8c1620;
  text-underline-offset: 4px;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  touch-action: manipulation;
}

button,
.button,
summary,
select {
  min-height: 48px;
}

button {
  cursor: pointer;
  border: 1px solid #c9c2b4;
  border-radius: 8px;
  background: #fff;
  color: #161514;
  padding: 10px 14px;
}

li a {
  display: block;
  padding: 8px 0;
  min-height: 48px;
}

dialog input {
  width: 100%;
  padding: 12px;
  min-height: 48px;
  border: 1px solid #c9c2b4;
}

dialog button {
  margin: 10px 8px 0 0;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 700;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #8c1620;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  background: #fff;
  padding: 12px;
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

header {
  padding: 18px 16px 12px;
  text-align: center;
  border-bottom: 2px solid #c41320;
}

p {
  margin: 10px 0 18px;
}

header p {
  margin: 0;
  font-size: 0.875rem;
}

.masthead {
  font-family: Paper, Telugu, sans-serif;
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1.3;
  text-decoration: none;
  color: #161514;
  display: inline-block;
}

.masthead span {
  color: #c41320;
}

main,
footer {
  max-width: 960px;
  margin: auto;
  padding: 24px 18px;
}

h1 {
  font-size: clamp(24px, 5.8vw, 36px);
  line-height: 1.6;
  margin: 8px 0 20px;
}

h2 {
  font-size: 1.4375rem;
  line-height: 1.6;
  margin: 26px 0 12px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.6;
}

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

section {
  margin-bottom: 28px;
}

.edition-date {
  font-size: 0.875rem;
  color: #514b44;
  border-bottom: 1px solid #c9c2b4;
  padding-bottom: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38%;
  gap: 24px;
  align-items: start;
  padding-top: 20px;
}

.cover {
  box-shadow: 0 6px 18px #16151422;
  display: block;
  transform: rotate(1deg);
}

.cover img {
  width: 100%;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  margin: 12px 0;
  font-weight: 700;
  line-height: 1.6;
}

.primary {
  background: #b91120;
  color: #fff;
  border: 1px solid #b91120;
}

.secondary {
  background: #fff;
  color: #8c1620;
  border: 1px solid #c9c2b4;
}

.whatsapp {
  background: #075e36;
  color: #fff;
}

.hint {
  font-size: 0.8125rem;
  color: #514b44;
}

details {
  border-bottom: 1px solid #c9c2b4;
  padding: 10px 0;
}

li {
  margin: 12px 0;
}

.coordinator {
  display: flex;
  gap: 18px;
  align-items: center;
  border-top: 2px solid #c9c2b4;
  margin-top: 30px;
  padding-top: 20px;
}

.coordinator img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
}

.coordinator h2 {
  margin: 0;
  font-size: 1.25rem;
}

.coordinator p {
  margin: 0;
}

.coordinator a {
  display: block;
  min-height: 48px;
  padding: 8px 0;
}

footer {
  font-size: 0.875rem;
  text-align: center;
  border-top: 1px solid #c9c2b4;
}

.bottom {
  min-height: calc(clamp(64px, 4.5rem, 88px) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 6px;
  padding-inline: 4px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #faf7f0;
  border-top: 1px solid #c9c2b4;
  z-index: 5;
}

.bottom a,
.bottom button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.5;
  text-align: center;
  padding: 8px 4px;
  color: #514b44;
}

.bottom [aria-current] {
  color: #b91120;
  font-weight: 700;
  border-top: 3px solid #b91120;
}

.reader-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  position: sticky;
  top: 0;
  background: #faf7f0;
  padding: 8px 0;
  z-index: 3;
}

.reader-controls select {
  min-width: 0;
  flex: 1;
  width: 100%;
  padding: 8px;
  border: 1px solid #c9c2b4;
  background: #fff;
  border-radius: 6px;
}

.reader-controls label {
  font-size: 0.875rem;
}

.reader-controls button {
  font-size: 1.625rem;
  min-width: 48px;
}

.page-image {
  position: relative;
}

.page-image > img {
  width: 100%;
  background: #eee8dc;
  aspect-ratio: 330/520;
  object-fit: contain;
}

.hotspot {
  position: absolute;
  border: 1px solid #8c162099;
  color: transparent;
  overflow: hidden;
  display: block;
}

.hotspot:focus,
.hotspot:hover {
  border: 3px solid #b91120;
  background: #fff3;
}

.hotspot span {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #faf7f0;
  color: #8c1620;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.875rem;
}

.crop-scroll {
  overflow: visible;
  border: 1px solid #c9c2b4;
  background: #eee8dc;
  height: auto;
}

.crop-scroll img {
  width: 100%;
  height: auto;
}

.archive-entry img {
  width: 110px;
}

.crop-scroll.zoomed img {
  width: 1400px;
  max-width: none;
}

.archive-entry {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 22px;
  text-decoration: none;
  border-block: 1px solid #c9c2b4;
  padding: 20px 0;
}

.archive-entry h3 {
  margin: 0;
}

dialog {
  max-width: min(460px, 94vw);
  width: 100%;
  border: 1px solid #c9c2b4;
  border-radius: 14px;
  padding: 22px;
  background: #faf7f0;
  color: #161514;
}

dialog::backdrop {
  background: #16151499;
}

[hidden] {
  display: none !important;
}

.preferences input {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.preferences label {
  display: block;
  padding: 12px 0;
  min-height: 48px;
}

@media (width <= 550px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 38%;
    gap: 12px;
  }

  .hero > div {
    min-width: 0;
  }

  .cover {
    max-width: 100%;
    margin: 4px auto 18px;
    transform: rotate(1deg);
  }

  .hero h1 {
    font-size: 1.625rem;
  }

  .hero > div > p:first-of-type {
    display: none;
  }

  .hero .button {
    margin: 10px 0;
  }

  main {
    padding-top: 16px;
  }

  .reader-controls {
    gap: 6px;
  }

  .reader-controls label {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
}

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

.latest-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f1ece0;
  border-bottom: 1px solid #c9c2b4;
  margin-bottom: 20px;
}

.latest-banner a {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.fs-1 {
  font-size: 16px;
}

.fs-2 {
  font-size: 18px;
}

.fs-3 {
  font-size: 20px;
}

.page-image.page-zoomed {
  overflow: auto;
}

.page-image.page-zoomed > img {
  width: 1400px;
  max-width: none;
}

.page-image.page-zoomed #hotspots {
  display: none;
}

body[data-kind="reader"] main {
  min-height: 100vh;
}

body[data-kind="reader"] .preferences {
  visibility: hidden;
}

body.reader-ready .preferences {
  visibility: visible;
}

#reader-status {
  margin: 0;
}

#reader-status:empty {
  display: none;
}
.crop-scroll.zoomed {
  overflow: auto;
  height: 62vh;
  max-height: 70vh;
}
body[data-kind="reader"] header {
  min-height: 56px;
  height: auto;
  gap: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body[data-kind="reader"] header .masthead {
  font-size: 1.75rem;
}
body[data-kind="reader"] header p {
  display: none;
}
body[data-kind="reader"] main {
  padding-top: 8px;
}
#page-title,
#crop-title {
  font-size: 1.5rem;
  margin: 8px 0 12px;
}
#crop-page {
  font-size: 0.875rem;
  margin: 4px 0;
}
.reader-controls {
  display: none;
  position: static;
}
.reader-ready .reader-controls {
  display: flex;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
footer > a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.hotspot {
  border: 0;
  overflow: visible;
}
.hotspot span {
  min-height: 48px;
  min-width: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  bottom: auto;
  right: 0;
  background: #faf7f0e6;
  border: 1px solid #8c1620;
}
.chip {
  display: inline-block;
  border-radius: 4px;
  background: #8c1620;
  color: white;
  padding: 2px 8px;
}
main {
  font-size: 1.1875rem;
}
h2 {
  font-size: 1.4375rem;
}
h3 {
  font-size: 1.25rem;
}
.button {
  font-size: 1rem;
}

.page-image {
  padding-right: 52px;
}
#hotspots {
  position: absolute;
  inset: 0 52px 0 0;
}
.hotspot-pill {
  position: absolute;
  right: -52px;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8c1620;
  background: #faf7f0;
  text-decoration: none;
  border-radius: 8px;
}
.page-image.page-zoomed {
  padding-right: 0;
}

body[data-kind="reader"] #settings-open {
  display: none;
}
body.reader-ready #settings-open {
  display: block;
}
body[data-kind="reader"] .preferences {
  display: none;
}
body.reader-ready .preferences[open] {
  display: block;
  position: fixed;
  bottom: calc(clamp(64px, 4.5rem, 88px) + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 6;
  background: #faf7f0;
  padding: 16px;
  max-height: 70vh;
  overflow: auto;
  border-top: 2px solid #8c1620;
}

dialog label {
  display: block;
  margin-top: 12px;
}
#native-share {
  display: block;
  width: 100%;
  margin: 12px 0;
}

body[data-root="true"] .latest-banner {
  padding: 4px 8px;
  margin-bottom: 8px;
  font-size: 0.875rem;
}
body[data-root="true"] .latest-banner a {
  white-space: nowrap;
}

.hint {
  font-size: 0.9375rem;
}
h1 {
  font-size: clamp(1.5rem, 5.8vw, 2.25rem);
}
[data-font-size] {
  min-width: 48px;
}
[data-font-size][aria-pressed="true"] {
  background: #8c1620;
  border-color: #8c1620;
  color: #fff;
}
#dismiss-latest {
  min-width: 48px;
  min-height: 48px;
  padding: 4px;
  flex-shrink: 0;
}
@media (width <= 550px) {
  .hero h1 {
    font-size: 1.625rem;
  }
}

.coordinator > div {
  min-width: 0;
}
.coordinator a {
  overflow-wrap: anywhere;
}

/* Stage 4 reader accessibility. Native select still opens the system picker. */
#page-select {
  appearance: none;
  -webkit-appearance: none;
  height: 48px;
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, #161514 50%),
    linear-gradient(135deg, #161514 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 21px,
    calc(100% - 10px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.masthead,
footer a {
  display: inline-block;
  padding-block: 6px;
  min-height: 48px;
  min-width: 48px;
}
.page-image.no-articles {
  padding-right: 0;
}
.page-image.no-articles #hotspots {
  display: none;
}
#page-title,
#crop-title,
.reader-controls label {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.image-failed > img,
.image-failed #hotspots {
  display: none;
}

.masthead {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-kind="reader"] header .masthead {
  flex: 1;
  min-width: 0;
  text-align: left;
}
#settings-open {
  flex-shrink: 0;
}
.bottom a,
.bottom button {
  min-width: 0;
  min-height: 48px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  font-size: min(0.875rem, 18px);
}
