.kural-mission{position:relative;margin:12px 0 25px;padding:24px;border-radius:28px;background:linear-gradient(130deg,#e8f7ef,#f6fbf0);border:1px solid #c3dfd1;overflow:hidden}
.kural-mission-copy{padding-right:80px}.kural-mission h2{font-size:32px;line-height:1.12;margin:12px 0;color:#183f39}.kural-mission p{font-size:16px;line-height:1.5;margin:0 0 20px}.kural-coach{position:absolute;right:12px;top:42px;width:95px;height:130px;object-fit:contain}.kural-mission-target{display:flex;flex-direction:column;gap:4px;padding:14px 0;border-top:1px solid #c3dfd1;font-size:16px}.kural-mission-target>span{color:#35735d;font-size:14px;font-weight:800}.kural-mission>.primary{width:100%;min-height:54px;font-size:18px}.kural-personal-progress{display:flex;justify-content:space-between;gap:10px;margin-top:18px;font-size:14px}.kural-personal-progress strong{color:#267459}.kural-self-note{display:block;color:#62756f;font-size:13px;line-height:1.5;margin:10px 0 0}.kural-history{padding:18px 20px;background:#fff9f0;border-radius:22px;margin:20px 0;color:#334e59;font-size:16px;line-height:1.6}.kural-history summary{cursor:pointer;font-weight:800}.kural-history p{margin:12px 0 0}.kural-review-shelf{margin:20px 0}.kural-review-shelf h2{font-size:22px;margin:0}.kural-review-shelf p{font-size:16px}.kural-review-shelf>div{display:flex;flex-wrap:wrap;gap:8px}.kural-review-shelf button{min-height:44px;padding:10px 16px}
.kural-train{width:100%;margin:20px 0}.kural-practice{padding:22px 18px;margin:16px 0 24px;border:1px solid #d2e4db;border-radius:26px;background:#fffefa}.kural-practice h2{font-size:25px;line-height:1.25;margin:22px 0 10px}.kural-practice p{font-size:16px;line-height:1.6}.kural-practice>.primary,.kural-practice>.secondary{width:100%;min-height:52px;margin-top:12px}.kural-practice>.text-button{display:block;margin:12px auto;min-height:44px}.kural-practice-steps{list-style:none;display:flex;justify-content:space-between;gap:4px;margin:0 0 24px;padding:0;font-size:13px;color:#64716d}.kural-practice-steps li{display:flex;flex-direction:column;align-items:center;gap:7px;flex:1;text-align:center}.kural-practice-steps li>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#edf0eb;font-weight:800}.kural-practice-steps .reached{color:#276d53;font-weight:800}.kural-practice-steps .reached>span{background:#d7efe1}.kural-practice-steps [aria-current]>span{background:#31795c;color:white}.kural-word-bank,.kural-answer{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.kural-answer{min-height:92px;background:#f3f7f3;border:2px dashed #b8d6c5;padding:12px;border-radius:18px;align-items:center}.kural-answer>span{color:#62756f;font-size:15px}.kural-word-bank button,.kural-answer button{min-width:48px;min-height:50px;border:1px solid #c9d9d0;border-bottom-width:3px;background:white;border-radius:14px;padding:12px;color:#203f49;font:inherit;max-width:100%;overflow-wrap:anywhere}.kural-word-bank button{display:flex;flex-direction:column;align-items:center;gap:5px}.kural-word-bank button>span,.kural-answer button{font-family:'Noto Sans Tamil',sans-serif;font-size:19px;line-height:1.7}.kural-word-bank button>small{font-size:13px}.kural-word-bank button:disabled{opacity:.3}.kural-hint{padding:16px;background:#fff2db;border-radius:14px;font-size:19px;line-height:2;overflow-wrap:anywhere}.kural-practice-feedback{font-size:16px;line-height:1.5}.kural-practice-feedback.wrong{padding:14px;color:#9c382c;background:#fff0e9;border-radius:14px}.kural-practice-feedback.correct{padding:14px;color:#226047;background:#e8f7ef;border-radius:14px}.kural-recall-cover{min-height:180px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;text-align:center;padding:20px;background:#eaf5ef;border-radius:22px;margin:20px 0}.kural-recall-cover>span{font-size:34px;color:#34785e}.kural-recall-cover strong{font-size:20px}.kural-recall-cover div{width:100%;overflow-wrap:anywhere}.kural-recall-cover div>span{display:block;font-size:22px;line-height:1.9}.kural-recall-cover small{display:block;color:#586e68;font-size:15px;line-height:1.7}.kural-success-mascot{display:block;width:95px;height:120px;object-fit:contain;margin:0 auto}.kural-is-practicing .kural-detail-reader{display:none}.kural-is-practicing .kural-controls,.kural-is-practicing .kural-source{display:none}
.kural-mission>.primary{margin:8px 0 0}.kural-mission .eyebrow{font-size:13px}.page-kural-home .kural-section-title{display:block;margin:24px 0 14px}.page-kural-home .kural-section-title>span{font-size:14px}.page-kural-home .kural-section-title>p{font-size:15px;line-height:1.5;max-width:none;text-align:left;margin:8px 0}.kural-word-bank button:focus-visible,.kural-answer button:focus-visible{outline:3px solid #ed713d;outline-offset:3px}
@media(max-width:380px){.kural-mission{padding:20px}.kural-mission h2{font-size:28px}.kural-mission-copy{padding-right:68px}.kural-coach{width:80px;right:8px}.kural-personal-progress{font-size:13px}.kural-practice{padding:18px 14px}}
.page-kural .text-button{font-size:15px;line-height:1.5;min-height:44px}.kural-chapter-picker .kural-reading-list .kural-reading-copy strong[lang="ta"]{font-family:'Noto Sans Tamil',sans-serif;font-size:18px;line-height:1.8;white-space:normal;overflow-wrap:anywhere}.kural-chapter-picker .kural-reading-list .kural-reading-copy small{font-size:14px;line-height:1.5}
.page-kural-home .kural-mission {
  padding: 18px;
  margin: 10px 0 20px;
  border-radius: 24px;
}
.page-kural-home .kural-mission-copy { padding-right: 65px; }
.page-kural-home .kural-mission h2 { font-size: 27px; margin: 8px 0; }
.page-kural-home .kural-mission p { margin-bottom: 12px; line-height: 1.4; }
.page-kural-home .kural-coach { width: 72px; height: 100px; top: 35px; right: 12px; }
.page-kural-home .kural-mission-target { padding: 10px 0 4px; gap: 2px; }
.page-kural-home .kural-mission>.primary { min-height: 50px; font-size: 17px; }
.page-kural-home .kural-personal-progress { margin-top: 12px; font-size: 14px; flex-wrap: wrap; gap: 4px 12px; color: #52665f; }
.page-kural-home .kural-mission>.kural-self-note { margin-top: 5px; font-size: 12px; }
.page-kural-home .kural-section-title { margin: 20px 0 12px; }
.page-kural-home .kural-parts-clean { gap: 10px; }
.page-kural-home .kural-parts-clean .kural-part {
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  min-height: 96px;
  padding: 14px;
  gap: 12px;
  border-radius: 20px;
  box-shadow: 0 3px 10px #183f3906;
  background: linear-gradient(115deg, var(--book-tint), #fffefa 85%);
  border: 1px solid var(--book-border);
}
.page-kural-home .kural-part.kural-green { --book-tint: #edf8f0; --book-border: #cfe4d7; }
.page-kural-home .kural-part.kural-blue { --book-tint: #eef6fc; --book-border: #d2e3ef; }
.page-kural-home .kural-part.kural-coral { --book-tint: #fff2e9; --book-border: #efdbcc; }
.page-kural-home .kural-part::after { display: none; }
.page-kural-home .kural-part-index { width: 36px; height: 42px; font-size: 18px; border-radius: 10px; }
.page-kural-home .kural-part-copy strong { font-size: 18px; line-height: 1.3; }
.page-kural-home .kural-part-copy small { font-size: 13px; line-height: 1.6; }
.page-kural-home .kural-part-copy>span { font-size: 14px; line-height: 1.4; }

/* Kural identity: the three books as engraved palm-leaf manuscripts (ōlai chuvadi) */
.page-kural-home {
  --leaf-top: #f8ebc8;
  --leaf-bottom: #efd9a4;
  --leaf-edge: #dcc084;
  --leaf-ink: #4b3421;
  --leaf-muted: #7a5c3e;
  --leaf-vein: rgba(150, 110, 52, 0.12);
  --leaf-cord: #a0522d;
}
html[data-theme="dark"] .page-kural-home {
  --leaf-top: #3b3221;
  --leaf-bottom: #30291b;
  --leaf-edge: #5b4b2e;
  --leaf-ink: #f4e8cc;
  --leaf-muted: #cdb98f;
  --leaf-vein: rgba(240, 214, 160, 0.07);
  --leaf-cord: #d98b5f;
}
.page-kural-home .kural-section-title { margin: 18px 0 12px; }
.kural-leaves {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}
.kural-leaf {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px 16px 30px;
  border: 1px solid var(--leaf-edge);
  border-radius: 20px 46px 46px 20px / 20px 34px 34px 20px;
  background:
    repeating-linear-gradient(180deg, transparent 0 13px, var(--leaf-vein) 13px 14px),
    linear-gradient(180deg, var(--leaf-top), var(--leaf-bottom));
  box-shadow: 0 6px 16px rgba(120, 84, 34, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: var(--leaf-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}
.kural-leaf:active { transform: scale(0.98); }
/* binding hole and cord, as on a real palm-leaf bundle */
.kural-leaf::before {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--leaf-ink);
  box-shadow: 0 0 0 2px var(--leaf-edge);
  content: "";
  opacity: 0.55;
  transform: translateY(-50%);
}
.kural-leaf::after {
  position: absolute;
  top: calc(50% + 4px);
  left: 14px;
  width: 3px;
  height: 26px;
  border-radius: 3px;
  background: var(--leaf-cord);
  content: "";
  transform: rotate(14deg);
  transform-origin: top;
}
.kural-leaf-seal {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14), 0 3px 8px rgba(0, 0, 0, 0.12);
  color: #fffaf0;
  font-family: var(--font-tamil);
  font-size: 24px;
  font-weight: 700;
}
.kural-leaf-aram { --seal: #3f8f6b; }
.kural-leaf-porul { --seal: #3b78a8; }
.kural-leaf-inbam { --seal: #d2603c; }
.kural-leaf-copy { display: grid; gap: 1px; min-width: 0; }
.kural-leaf-kicker {
  color: var(--seal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[data-theme="dark"] .kural-leaf-kicker { color: var(--leaf-muted); }
.kural-leaf-copy strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}
.kural-leaf-copy span {
  color: var(--leaf-muted);
  font-family: var(--font-tamil);
  font-size: 14px;
  line-height: 1.6;
}
.kural-leaf-copy em {
  color: var(--leaf-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}
.kural-leaf > b {
  color: var(--leaf-muted);
  font-size: 26px;
  font-weight: 700;
}
.kural-leaf-porul .kural-leaf-seal{font-size:18px}
.kural-resume {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: -8px 0 22px;
  padding: 12px 16px;
  border: 1px dashed var(--leaf-edge);
  border-radius: 16px;
  background: transparent;
  color: var(--leaf-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.kural-resume-label {
  flex: none;
  color: var(--leaf-cord);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kural-resume-target {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kural-resume b { color: var(--leaf-cord); font-size: 18px; }
/* The two lines of a Kural read as one couplet: no divider between them */
.kural-line-pairs { gap: 0; }
.kural-line-pair { border-bottom: 0; padding-block: 4px; }
.kural-line-pair:first-child { padding-top: 16px; }
.kural-line-pair:last-child { padding-bottom: 16px; }
/* Hint: lightbulb button, one-word reveal, sponsored break */
.kural-hint-row { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.kural-bulb {
  display: grid; flex: none; width: 46px; height: 46px; place-items: center;
  border: 1.5px solid #f2c94c; border-radius: 50%;
  background: #fff6d6; color: #b7791f; cursor: pointer;
  box-shadow: 0 4px 12px rgba(242, 180, 40, 0.25);
}
.kural-bulb:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.kural-hint-word { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.kural-hint-word strong { color: var(--ink); font-family: var(--font-tamil); font-size: 17px; }
.kural-word-bank button.is-hinted { border-color: #f2c94c; box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.45); animation: kural-hint-pulse 1.4s ease-in-out infinite; }
@keyframes kural-hint-pulse { 50% { transform: scale(1.05); } }
.kural-ad .kural-ad-bulb { display: grid; width: 64px; height: 64px; margin: 0 auto 10px; place-items: center; border-radius: 22px; background: #fff6d6; color: #b7791f; }
.kural-ad .kural-ad-bulb svg { width: 32px; height: 32px; }
.kural-ad h2 { margin: 0 0 12px; color: var(--ink); font-family: var(--font-display); font-size: 22px; }
.kural-ad > p { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.5; }
.kural-ad-slot {
  position: relative; display: grid; gap: 6px; width: 100%; min-height: 130px; place-content: center;
  overflow: hidden; border: 1px dashed var(--line); border-radius: 18px; background: var(--cream-2); color: var(--muted);
}
.kural-ad-slot small { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.kural-ad-slot span { font-size: 13px; font-weight: 700; }
.kural-ad-progress { position: absolute; bottom: 0; left: 0; height: 4px; width: 100%; background: #f2c94c; transform-origin: left; animation: kural-ad-progress 5s linear both; }
@keyframes kural-ad-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.kural-ad-claim { animation: kural-ad-unlock 5s steps(1, end) both; }
@keyframes kural-ad-unlock { from { opacity: 0.4; pointer-events: none; } to { opacity: 1; pointer-events: auto; } }
html[data-theme="dark"] .kural-bulb, html[data-theme="dark"] .kural-ad .kural-ad-bulb { background: #3a3220; color: #f2c94c; }

/* Chapter page in the palm-leaf identity */
.page-kural { --seal: #3f8f6b; }
.page-kural.kural-blue { --seal: #3b78a8; }
.page-kural.kural-coral { --seal: #d2603c; }
.page-kural-chapter {
  --leaf-top: #f8ebc8; --leaf-bottom: #efd9a4; --leaf-edge: #dcc084;
  --leaf-ink: #4b3421; --leaf-muted: #7a5c3e; --leaf-vein: rgba(150, 110, 52, 0.12);
}
html[data-theme="dark"] .page-kural-chapter {
  --leaf-top: #3b3221; --leaf-bottom: #30291b; --leaf-edge: #5b4b2e;
  --leaf-ink: #f4e8cc; --leaf-muted: #cdb98f; --leaf-vein: rgba(240, 214, 160, 0.07);
}
.kc-summary { display: grid; gap: 12px; margin: 6px 0 18px; }
.kc-kicker { color: var(--seal); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.kc-summary p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.45; }
.kc-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kc-pips { display: flex; gap: 5px; }
.kc-pip { width: 18px; height: 8px; border-radius: 999px; background: var(--line); }
.kc-pip-read { background: color-mix(in srgb, var(--seal) 55%, transparent); }
.kc-pip-recited { background: var(--seal); }
.kc-pip-review { background: #f2b544; }
.kc-progress strong { color: var(--ink); font-size: 13px; font-weight: 800; white-space: nowrap; }
.kc-list { display: grid; gap: 10px; }
.kc-leaf {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "seal verse" "seal status";
  column-gap: 14px; row-gap: 6px; align-items: center; width: 100%;
  padding: 14px 18px 12px 14px; border: 1px solid var(--leaf-edge);
  border-radius: 18px 36px 36px 18px / 18px 28px 28px 18px;
  background: repeating-linear-gradient(180deg, transparent 0 13px, var(--leaf-vein) 13px 14px), linear-gradient(180deg, var(--leaf-top), var(--leaf-bottom));
  box-shadow: 0 4px 12px rgba(120, 84, 34, 0.1);
  color: var(--leaf-ink); font: inherit; text-align: left; cursor: pointer;
}
.kc-leaf:active { transform: scale(0.985); }
.kc-seal {
  grid-area: seal; display: grid; width: 40px; height: 40px; place-items: center; align-self: start;
  border-radius: 50%; background: var(--seal); color: #fffaf0;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15); font-family: var(--font-display); font-size: 16px; font-weight: 800;
}
.kc-verse { grid-area: verse; display: grid; gap: 2px; min-width: 0; }
.kc-verse span { font-family: var(--font-tamil); font-size: 16px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.kc-status {
  grid-area: status; justify-self: start; padding: 2px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55); color: var(--leaf-muted); font-size: 11px; font-weight: 900; letter-spacing: 0.04em;
}
html[data-theme="dark"] .kc-status { background: rgba(0, 0, 0, 0.2); }
.kc-read .kc-status, .kc-recited .kc-status { background: var(--seal); color: #fffaf0; }
.kc-review .kc-status { background: #f2b544; color: #4b3421; }
.kc-new .kc-status { border: 1px dashed var(--leaf-edge); }
.kc-leaf { grid-template-columns: auto minmax(0, 1fr); }
.kc-seal { width: auto; min-width: 40px; padding: 0 9px; border-radius: 999px; font-size: 14px; }
.kc-verse span { font-size: 15px; }

/* ===== Modern refresh (iOS-like): clean cards, gradient icon tiles, grouped list ===== */
.kural-leaf, .kc-leaf { background-image: none; }
.kural-leaf::before, .kural-leaf::after { content: none; }
.kural-leaf {
  grid-template-columns: 58px minmax(0, 1fr) 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(23, 57, 84, 0.04), 0 10px 28px rgba(23, 57, 84, 0.07);
  color: var(--ink);
}
.kural-leaf-aram { --seal: #3f8f6b; --seal-2: #7cc79f; }
.kural-leaf-porul { --seal: #2f6fa3; --seal-2: #7fb6e3; }
.kural-leaf-inbam { --seal: #d2553a; --seal-2: #ff9f7a; }
.kural-leaf-seal {
  width: 58px; height: 58px; border-radius: 18px;
  background: linear-gradient(145deg, var(--seal-2), var(--seal));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--seal) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.kural-leaf-kicker { color: var(--muted); letter-spacing: 0.06em; }
html[data-theme="dark"] .kural-leaf-kicker { color: var(--muted); }
.kural-leaf-copy strong { color: var(--ink); font-size: 18px; }
.kural-leaf-copy span, .kural-leaf-copy em { color: var(--muted); }
.kural-leaf > b { color: var(--muted-2, var(--muted)); font-size: 22px; }
.kural-leaf-progress { display: block; height: 5px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--line) 85%, transparent); }
.kural-leaf-progress i { display: block; height: 100%; min-width: 5px; border-radius: inherit; background: linear-gradient(90deg, var(--seal-2), var(--seal)); }
.kural-leaf-count { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.kural-resume {
  border: 0; border-radius: 18px; background: var(--card); color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 57, 84, 0.04), 0 8px 22px rgba(23, 57, 84, 0.06);
}
.kural-resume-label, .kural-resume b { color: var(--orange); }

/* Chapter page: one grouped list with hairline separators */
.kc-pips { flex: 1; gap: 3px; }
.kc-pip { flex: 1; width: auto; height: 6px; }
.kc-list {
  gap: 0; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 26px;
  background: var(--card); box-shadow: 0 1px 2px rgba(23, 57, 84, 0.04), 0 10px 28px rgba(23, 57, 84, 0.07);
}
.kc-leaf {
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "seal verse status";
  column-gap: 14px; padding: 14px 16px; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--ink); position: relative;
}
.kc-leaf + .kc-leaf::before {
  position: absolute; top: 0; right: 0; left: 62px; height: 1px; background: var(--line); content: "";
}
.kc-leaf:active { transform: none; background: color-mix(in srgb, var(--line) 45%, transparent); }
.kc-seal {
  align-self: center; min-width: 34px; height: 34px; padding: 0 8px;
  background: color-mix(in srgb, var(--seal) 13%, transparent); color: var(--seal); box-shadow: none; font-size: 13px;
}
.kc-recited .kc-seal, .kc-read .kc-seal { background: var(--seal); color: #fff; }
.kc-verse span { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.45; }
.kc-status { align-self: center; padding: 3px 9px; border: 0; background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--muted); font-size: 10.5px; }
.kc-new .kc-status { border: 0; }
.kc-read .kc-status, .kc-recited .kc-status { background: color-mix(in srgb, var(--seal) 14%, transparent); color: var(--seal); }
.kc-review .kc-status { background: #fff1cc; color: #8a5a00; }
html[data-theme="dark"] .kc-review .kc-status { background: #4a3a14; color: #ffd27a; }
/* Status sits under the couplet so the Tamil text keeps the full width */
.kc-leaf { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "seal verse" ". status"; row-gap: 6px; }
.kc-status { justify-self: start; }
