:root {
  --navy: #09243f;
  --deep: #073c4c;
  --teal: #087b79;
  --teal-light: #4ac3b5;
  --green: #718f28;
  --red: #d7353d;
  --ink: #123f46;
  --mint: #edf7f4;
  --line: #dcece7;
}
* { box-sizing: border-box; }
html { background: #eaf4f1; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, system-ui, sans-serif;
  background:
    radial-gradient(circle at 92% 0%, rgba(118,155,49,.18), transparent 25rem),
    linear-gradient(145deg, #edf6f3 0%, #d9efea 48%, #f7fbf9 100%);
}
.page-shell { width: min(100%, 900px); margin: 0 auto; padding: 20px 16px 34px; }
.poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: 0 18px 54px rgba(5,57,67,.16);
  padding: 0 28px 22px;
  position: relative;
}
.hero {
  margin: 0 -28px;
  padding: 26px 28px 21px;
  text-align: center;
  background: linear-gradient(120deg, #073748 0%, #075968 48%, #0b887d 100%);
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 115%; height: 95px;
  bottom: -33px; left: -8%;
  background: linear-gradient(100deg, rgba(52,188,172,.88), rgba(115,153,51,.55));
  border-radius: 0 0 55% 55%;
  transform: rotate(-1.3deg);
  opacity: .88;
}
.logo-card {
  width: min(100%, 690px);
  margin: 0 auto 26px;
  padding: 11px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f5f8f6);
  box-shadow: 0 9px 26px rgba(0,0,0,.12);
  display: flex; justify-content: center; align-items: center;
}
.school-logo { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; }
h1 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 7.6vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 800;
}
h1 em { color: #e6c343; font-style: italic; }
.tagline {
  margin: 13px auto 5px;
  color: #ffffff;
  font: 800 clamp(.64rem, 1.8vw, .9rem)/1.4 system-ui, sans-serif;
  letter-spacing: .25em;
  display: flex; justify-content: center; align-items: center; gap: 11px;
}
.tagline b { color: #e6c343; }
.tagline span { width: 29px; height: 1px; background: #b5cc75; }
.top-accent { margin: 15px auto 0; width: 120px; height: 3px; border-radius: 10px; background: linear-gradient(90deg, transparent, #e6c343, transparent); }
.meta-strip {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px; margin: 26px auto 22px; position: relative; z-index: 1;
}
.meta-pill {
  min-height: 49px; padding: 9px 17px; display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; border-radius: 999px; background: #ffffff; border: 1px solid #dcece7;
  color: var(--deep); box-shadow: 0 4px 15px rgba(7,60,76,.08);
  font: 800 clamp(.9rem, 2.1vw, 1.1rem)/1.2 system-ui, sans-serif;
}
.meta-pill strong { color: var(--navy); letter-spacing: .04em; }
.calendar-icon, .id-icon { width: 22px; height: 22px; fill: none; stroke: var(--teal); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.submission-pill .id-icon { stroke: var(--red); }
.activity-list {
  display: grid; gap: 9px; padding: 17px 16px;
  border: 1px solid #d8eae5; border-radius: 23px;
  background: linear-gradient(180deg, rgba(245,250,248,.95), rgba(255,255,255,.96));
}
.activity-row {
  display: grid;
  grid-template-columns: 42px 54px 2px minmax(0,1fr) 77px;
  align-items: center; gap: 12px; min-height: 69px;
  padding: 7px 12px 7px 10px; border: 1px solid #e0eeea; border-radius: 18px;
  background: linear-gradient(90deg, #f1f8f5 0%, #ffffff 55%, #f9fcfb 100%);
  transition: border-color .14s ease, background .14s ease;
}
.number {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #ffffff; background: linear-gradient(145deg, #0b6471, #092f4b);
  font: 800 1.05rem/1 system-ui, sans-serif; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.activity-icon { width: 52px; height: 52px; object-fit: contain; display: block; border-radius: 13px; }
.divider { width: 2px; height: 40px; background: linear-gradient(var(--green), var(--red)); opacity: .82; }
.activity-text { min-width: 0; color: #123f46; font-size: clamp(.94rem, 2.35vw, 1.26rem); font-weight: 800; line-height: 1.35; overflow-wrap: break-word; word-break: normal; }
.status-controls { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.status-btn {
  appearance: none; border: 2px solid; background: #ffffff; border-radius: 9px;
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  font: 900 1.28rem/1 system-ui, sans-serif; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.status-btn:active { transform: scale(.94); }
.status-btn.yes { color: #087f71; border-color: #087f71; }
.status-btn.no { color: var(--red); border-color: var(--red); }
.status-btn.yes[aria-pressed="true"] { color: #ffffff; background: #087f71; box-shadow: 0 0 0 3px rgba(8,127,113,.12); }
.status-btn.no[aria-pressed="true"] { color: #ffffff; background: var(--red); box-shadow: 0 0 0 3px rgba(215,53,61,.12); }
.status-btn:focus-visible, .action-button:focus-visible { outline: 3px solid #e6c343; outline-offset: 3px; }
.activity-row:has(.yes[aria-pressed="true"]) { border-color: #9acfc4; background: linear-gradient(90deg, #e3f5f0, #ffffff); }
.activity-row:has(.no[aria-pressed="true"]) { border-color: #f0b6b8; background: linear-gradient(90deg, #fff0f0, #ffffff); }
.progress-card { margin-top: 17px; padding: 14px 17px 12px; border: 1px solid #d5e9e3; border-radius: 19px; background: linear-gradient(105deg, #edf7f3, #ffffff); }
.progress-head { display: flex; align-items: center; gap: 10px; color: var(--deep); font: 800 1rem/1.3 system-ui, sans-serif; }
.progress-mark { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #0b867f, #093d55); font-weight: 900; }
.progress-head b { margin-left: auto; font-size: 1.12rem; color: var(--navy); }
.progress-track { height: 9px; margin: 10px 4px 8px 39px; overflow: hidden; border-radius: 99px; background: #dcebe6; }
.progress-fill { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b6471, #0ca48d, #8ca83c); transition: width .2s ease; }
.status-summary { display: flex; justify-content: flex-end; gap: 16px; color: #536e6c; font: 700 .73rem/1.2 system-ui, sans-serif; }
.status-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.done-dot { background: #087f71; }
.no-dot { background: var(--red); }
.action-area { display: grid; gap: 10px; margin-top: 17px; }
.actions { display: grid; grid-template-columns: .85fr 1.2fr 1.1fr; gap: 11px; margin-top: 0; }
.share-button {
  width: 100%; min-height: 54px; color: #ffffff;
  background: linear-gradient(110deg, #087f78 0%, #0b9c83 52%, #6e9634 100%);
  border-color: #087f78;
}
.share-button .action-symbol { color: #ffffff; font-size: 1.55rem; }
.share-button strong { display: block; font: inherit; }
.share-button small { color: rgba(255,255,255,.9); }
.share-button:disabled { opacity: .45; cursor: not-allowed; }
/* Filled gradient treatment for the primary Share Image action. */
.action-button.share-button {
  color: #ffffff;
  background: linear-gradient(110deg, #075B52 0%, #13A58B 100%);
  border: 1.5px solid #075B52;
  box-shadow: 0 5px 14px rgba(7, 91, 82, .16);
}
.action-button.share-button .action-symbol { color: #ffffff; }
.action-button.share-button small { color: rgba(255,255,255,.92); }
.action-button.share-button:active { transform: translateY(1px); }
.action-button.share-button:disabled { opacity: .58; }

.action-button {
  min-height: 59px; padding: 10px 12px; border-radius: 15px; border: 1.5px solid var(--deep);
  display: flex; justify-content: center; align-items: center; gap: 8px;
  font: 800 .96rem/1.15 system-ui, sans-serif; cursor: pointer; color: var(--deep); background: #ffffff;
}
.action-symbol { font-size: 1.7rem; line-height: .9; color: var(--red); }
/* Final primary Share Image button: filled teal-to-green gradient. */
.action-button.share-button {
  width: 100%;
  min-height: 54px;
  color: #ffffff;
  background: linear-gradient(110deg, #075B52 0%, #13A58B 100%);
  border: 1.5px solid #075B52;
  box-shadow: 0 5px 14px rgba(7, 91, 82, .18);
}
.action-button.share-button .action-symbol { color: #ffffff; }
.action-button.share-button strong { display: block; font: inherit; }
.action-button.share-button small { color: rgba(255,255,255,.94); }
.action-button.share-button:active { transform: translateY(1px); filter: brightness(.97); }
.action-button.share-button:disabled { opacity: .58; }
.action-button small { display: block; font-size: .68rem; margin-top: 3px; letter-spacing: .04em; }
.action-button:disabled { opacity: .45; cursor: not-allowed; }
.png-button { color: #ffffff; background: linear-gradient(115deg, #07556a, #087f78); border-color: #07556a; }
.png-button .action-symbol { color: #ffffff; }
.pdf-button { color: #ffffff; background: linear-gradient(115deg, #bd2935, #e14b45); border-color: #bd2935; }
.pdf-button .action-symbol { color: #ffffff; }
.reset-button { border-color: #a8c7bf; }
.footer-note { text-align: center; padding-top: 16px; color: #677b78; font: 800 .68rem/1.4 system-ui,sans-serif; letter-spacing: .16em; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 18px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; max-width: calc(100vw - 28px); padding: 11px 15px; color: white; background: #123f46; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,.18); font-size: .88rem; text-align: center; transition: all .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.poster.exporting .action-area { display: none !important; }
@media (max-width: 680px) {
  .page-shell { padding: 0 0 24px; }
  .poster { border-radius: 0; padding: 0 11px 17px; }
  .hero { margin: 0 -11px; padding: 18px 13px 18px; }
  .logo-card { width: min(100%, 610px); padding: 9px 10px; border-radius: 13px; margin-bottom: 18px; }
  .school-logo { max-height: 135px; }
  .tagline { letter-spacing: .13em; gap: 6px; }
  .tagline span { width: 13px; }
  .meta-strip { gap: 7px; margin: 24px auto 15px; }
  .meta-pill { min-height: 42px; gap: 6px; padding: 7px 10px; font-size: .83rem; }
  .calendar-icon, .id-icon { width: 19px; height: 19px; }
  .activity-list { padding: 10px 8px; border-radius: 18px; gap: 7px; }
  .activity-row { grid-template-columns: 31px 42px 2px minmax(0,1fr) 65px; gap: 7px; min-height: 68px; padding: 8px 7px 8px 6px; border-radius: 13px; }
  .number { width: 29px; height: 29px; font-size: .88rem; }
  .activity-icon { width: 40px; height: 40px; border-radius: 10px; }
  .divider { height: 31px; }
  .activity-text { font-size: clamp(.82rem, 3.45vw, 1rem); line-height: 1.28; }
  .status-controls { gap: 4px; }
  .status-btn { flex: 0 0 29px; width: 29px; height: 29px; border-radius: 7px; font-size: 1.12rem; }
  .progress-card { margin-top: 13px; padding: 11px 12px 10px; }
  .progress-head { font-size: .9rem; }
  .progress-head b { font-size: 1rem; }
  .progress-track { margin-left: 38px; }
  .status-summary { gap: 11px; font-size: .66rem; }
  .action-area { gap: 8px; margin-top: 13px; }
  .actions { gap: 6px; grid-template-columns: .8fr 1.2fr 1.05fr; margin-top: 0; }
  .share-button { min-height: 51px; font-size: .9rem; }
  .action-button { min-height: 54px; font-size: .75rem; gap: 4px; padding: 7px 5px; border-radius: 11px; }
  .action-symbol { font-size: 1.35rem; }
  .action-button small { font-size: .59rem; }
  .footer-note { font-size: .59rem; letter-spacing: .1em; }
}
@media (max-width: 380px) {
  .poster { padding-left: 8px; padding-right: 8px; }
  .hero { margin-left: -8px; margin-right: -8px; }
  .activity-list { padding: 9px 6px; }
  .activity-row { grid-template-columns: 28px 36px 2px minmax(0,1fr) 61px; gap: 5px; padding: 7px 5px; }
  .number { width: 27px; height: 27px; font-size: .82rem; }
  .activity-icon { width: 35px; height: 35px; border-radius: 9px; }
  .status-controls { gap: 3px; }
  .status-btn { flex-basis: 27px; width: 27px; height: 27px; font-size: 1rem; }
  .activity-text { font-size: .8rem; }
}
@media print {
  body { background: #ffffff; }
  .page-shell { width: 100%; padding: 0; }
  .poster { box-shadow: none; border-radius: 0; }
  .actions, .toast { display: none !important; }
}


/* Share button clarity update: larger label and a visible native-style share icon. */
.action-button.share-button {
  min-height: 62px;
  padding: 12px 16px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: .01em;
  gap: 0;
}
.share-button-inner {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.share-icon {
  display: block;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.share-button-text {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}
.action-button.share-button strong {
  display: inline;
  font: inherit;
  line-height: 1.2;
  white-space: nowrap;
}
.action-button.share-button small {
  display: none;
}
@media (max-width: 680px) {
  .action-button.share-button { min-height: 58px; font-size: 1.08rem; padding: 11px 12px; }
  .share-button-inner { gap: 10px; }
  .share-icon { width: 25px; height: 25px; flex-basis: 25px; }
}
@media (max-width: 360px) {
  .action-button.share-button { font-size: 1rem; }
  .share-button-inner { gap: 8px; }
  .share-icon { width: 23px; height: 23px; flex-basis: 23px; }
}

/* Madrasa brand lockup replaces ALIF's logo card; all remaining ALIF layout rules stay intact. */
.brand-lockup {
  width: min(100%, 690px);
  margin: 0 auto 26px;
  display: grid;
  grid-template-columns: 112px 2px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  text-align: left;
}
.brand-logo {
  display: block;
  width: 108px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.10));
}
.brand-divider {
  display: block;
  width: 2px;
  height: 112px;
  background: rgba(255,255,255,.95);
}
.brand-name {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-family: Inter, "Segoe UI", Arial, system-ui, sans-serif;
  font-size: clamp(15px, 2.75vw, 23px);
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: .025em;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.brand-name small {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.94);
  font-size: .65em;
  font-weight: 700;
  letter-spacing: .25em;
}
.activity-text[lang="ml"] {
  font-family: "Noto Sans Malayalam", "Nirmala UI", system-ui, sans-serif;
  font-weight: 800;
}
.footer-note { letter-spacing: .10em; }
@media (max-width: 680px) {
  .brand-lockup {
    width: min(100%, 610px);
    grid-template-columns: 75px 2px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }
  .brand-logo { width: 72px; height: 98px; }
  .brand-divider { height: 86px; }
  .brand-name {
    font-size: clamp(12px, 3.35vw, 17px);
    line-height: 1.32;
    letter-spacing: .015em;
  }
  .brand-name small { margin-top: 5px; letter-spacing: .16em; }
  .activity-text[lang="ml"] { font-size: clamp(.82rem, 3.45vw, 1rem); line-height: 1.35; }
}
@media (max-width: 380px) {
  .brand-lockup { grid-template-columns: 66px 2px minmax(0,1fr); gap: 8px; }
  .brand-logo { width: 64px; height: 88px; }
  .brand-divider { height: 78px; }
  .brand-name { font-size: clamp(11px, 3.25vw, 14px); }
  .activity-text[lang="ml"] { font-size: .79rem; }
}
