:root {
  --paper-0: #fbf7ef;
  --ink: #20221f;
  --muted: #64665e;
  --soft: #e5e0d5;
  --accent: #ff5a2d;
  --container: 1120px;
  --font-body: "Avenir Next", Avenir, "Helvetica Neue", "PingFang SC", "Hiragino Sans", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Hiragino Mincho ProN", serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--paper-0); font-family: var(--font-body); line-height: 1.6; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #a43818; outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--soft); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 82px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--soft); background: white; }
.brand-copy { min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.2; }
.brand-tag { color: var(--muted); font-size: 12px; margin-top: 3px; }
.header-language { flex: 0 0 160px; min-width: 0; }
.header-language .language-select { width: 100%; }
.language-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hero { padding: 72px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: center; }
.eyebrow { color: #9b431f; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 4.7vw, 64px); line-height: 1.13; letter-spacing: -1.8px; margin: 18px 0 0; max-width: 11ch; font-weight: 700; }
html:lang(zh) .hero h1, html:lang(ja) .hero h1, html:lang(ko) .hero h1 { letter-spacing: 0; max-width: 8.5em; }
html:lang(ko) { --font-body: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --font-display: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; word-break: keep-all; }
html:lang(ar) { --font-body: "Geeza Pro", Tahoma, "Noto Sans Arabic", sans-serif; --font-display: "Geeza Pro", "Noto Naskh Arabic", serif; }
html:lang(hi) { --font-body: "Kohinoor Devanagari", "Noto Sans Devanagari", sans-serif; --font-display: "Kohinoor Devanagari", "Noto Sans Devanagari", sans-serif; }
html:lang(ar) .hero h1, html:lang(hi) .hero h1 { letter-spacing: 0; line-height: 1.35; max-width: 10em; }
html:lang(ar) .eyebrow { letter-spacing: 0; }
html:lang(ar) .hero-text > .eyebrow { letter-spacing: 1.8px; }
html:lang(hi) .eyebrow { letter-spacing: 0; }
.hero-text > .eyebrow { display: inline-block; unicode-bidi: isolate; }
.hero-text, .resource-info, .practice-inner article { text-align: start; }
.hero p { font-size: 16px; color: var(--muted); max-width: 35ch; margin: 22px 0 0; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid #f5a581; transition: transform 150ms ease; }
.btn.primary { color: #24170e; background: radial-gradient(260px 90px at 20% 30%, rgba(255,255,255,.66), transparent 60%), linear-gradient(90deg,#ff6637,#ff985b); box-shadow: 0 8px 18px #b9471210; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.store-button { width: 256px; min-height: 49px; }
.hero-note { font-size: 12px; color: var(--muted); margin-top: 15px; }
[dir="rtl"] .hero-note { text-align: right; }
.practice-strip { border-block: 1px solid var(--soft); }
.practice-inner { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px; padding-block: 26px; }
.practice-inner article { display: flex; gap: 14px; align-items: flex-start; }
.practice-inner article > span { font-family: var(--font-display); color: #af502b; font-size: 14px; padding-top: 1px; }
.practice-inner h2 { font-size: 14px; margin: 0; font-weight: 600; }
.practice-inner p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.section { padding: 56px 0 64px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section h2 { font-family: var(--font-display); font-size: clamp(25px,3vw,34px); line-height: 1.25; letter-spacing: -.5px; margin: 10px 0 0; }
.lead { font-size: 14px; color: var(--muted); margin: 12px 0 26px; }
.library-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; margin: 22px -4px 12px; scrollbar-width: thin; }
.library-tabs button { white-space: nowrap; border-radius: 999px; border: 1px solid var(--soft); background: transparent; padding: 9px 18px; color: var(--muted); font-size: 13px; }
.library-tabs button:hover { border-color: #bcb5a7; color: var(--ink); }
.library-tabs button[aria-selected="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.course-filter { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 13px; }
.course-filter label { color: var(--muted); }
.course-filter select { background: transparent; color: var(--ink); padding-block: 9px; padding-inline: 12px 32px; border: 1px solid var(--soft); border-radius: 8px; max-width: calc(100% - 60px); }
.resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.resource-card { border: 1px solid var(--soft); border-radius: 16px; background: #ffffff80; padding: 14px; min-width: 0; }
.resource-previews { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.image-button { position: relative; display: block; padding: 0; border: 1px solid #eeebe5; border-radius: 9px; background: white; overflow: hidden; aspect-ratio: 3/4; transition: border-color 150ms ease; }
.image-button:hover { border-color: #cb876a; }
.image-button img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.resource-info { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 13px 2px 0; }
.resource-info h3 { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; }
.resource-info span { font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.resource-channel { color: var(--muted); font-size: 11px; margin: 4px 2px 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 28px; font-size: 12px; color: var(--muted); }
#page-status { direction: ltr; unicode-bidi: isolate; }
.page-button { border: 1px solid #d4cdbc; border-radius: 999px; background: transparent; padding: 9px 17px; color: var(--ink); min-width: 90px; }
.page-button:hover:enabled { background: #eee7da; }
.page-button:disabled { opacity: .4; }
.site-footer { border-top: 1px solid var(--soft); padding: 22px 0 26px; font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-label { color: var(--muted); }
.footer-copyright { color: var(--muted); unicode-bidi: isolate; }
.footer-right span { color: var(--muted); margin-right: 6px; }
.preview-dialog { border: 1px solid var(--soft); border-radius: 16px; padding: 36px 20px 14px; background: var(--paper-0); max-width: min(850px,calc(100vw - 28px)); max-height: calc(100dvh - 32px); }
.preview-dialog::backdrop { background: #15191299; }
.preview-dialog img { display: block; object-fit: contain; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 145px); margin: 0 auto; background: white; }
.preview-dialog p { text-align: center; font-size: 12px; margin: 12px 0 0; }
.dialog-close { position: absolute; top: 4px; inset-inline-end: 8px; border: 0; background: transparent; color: var(--ink); font-size: 25px; width: 32px; height: 32px; line-height: 1; }
body:has(dialog[open]) { overflow: hidden; }
.privacy-page { padding: 40px 0 56px; }
.policy { max-width: 780px; margin: 0 auto; padding: 28px; border: 1px solid var(--soft); border-radius: 16px; background: #ffffff80; }
.policy h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.2; margin: 0; }
.policy .subhead { margin-top: 12px; }
.policy .meta { font-size: 12px; color: var(--muted); margin-top: 10px; }
.policy h2 { font-size: 18px; line-height: 1.3; margin: 28px 0 0; }
.policy p { color: var(--muted); margin: 12px 0 0; }
.policy dl { display: grid; gap: 16px; margin-top: 24px; }
.policy dt { font-weight: 600; }
.policy dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 900px) {
  .hero { padding: 44px 0; }
  .hero-inner { gap: 32px; }
  .hero h1 { font-size: 45px; }
  .practice-inner { gap: 18px; }
  .section-heading { display: block; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 74px; }
  .header-language { flex-basis: 118px; }
  .brand-copy { min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 18px; }
  .brand-tag { font-size: 11px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 32px 0 36px; }
  .hero h1 { margin-top: 12px; max-width: 13ch; font-size: 42px; }
  .hero p { margin-top: 16px; max-width: 36ch; font-size: 15px; }
  .hero-actions { margin-top: 22px; }
  .practice-inner { grid-template-columns: 1fr; gap: 14px; padding-block: 22px; }
  .practice-inner h2 { font-size: 13px; }
  .practice-inner article { gap: 14px; }
  .practice-inner p { margin-top: 1px; }
  .section { padding: 36px 0 40px; }
  .section h2 { font-size: 26px; }
  .library-tabs button { padding: 8px 14px; font-size: 12px; }
  .resource-grid { grid-template-columns: 1fr; gap: 16px; }
  .resource-card { padding: 11px; }
  .resource-previews { gap: 6px; }
  .resource-info { margin-top: 11px; }
  .resource-info h3 { font-size: 13px; }
  .pagination { gap: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .policy { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .image-button { transition: none; }
  .btn:hover { transform: none; }
}

/* A separate preview layer: the downloaded resource pixels stay untouched. */
.preview-watermark { position: absolute; right: 6px; bottom: 6px; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 46px; padding: 2px 2px 3px; border: 1px solid #e2dfd7; border-radius: 4px; background: #fff; color: #30352d; opacity: .9; pointer-events: none; user-select: none; }
.preview-watermark img { display: block; width: 100%; height: auto; min-height: 0; padding: 0; object-fit: contain; flex: none; }
.preview-watermark > span { display: block; font: 5.4px/1.25 Arial, sans-serif; white-space: nowrap; }
.dialog-art { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.dialog-art > img { max-width: 100%; }
.dialog-art .preview-watermark { width: 105px; right: 10px; bottom: 10px; padding: 2px 2px 5px; opacity: .96; }
.dialog-art .preview-watermark img { width: 99px; height: 99px; }
.dialog-art .preview-watermark > span { font-size: 10px; }
@media (max-width: 640px) {
  .dialog-art .preview-watermark { width: 84px; right: 6px; bottom: 6px; }
  .dialog-art .preview-watermark img { width: 78px; height: 78px; }
  .dialog-art .preview-watermark > span { font-size: 8px; }
}


.language-select { appearance: auto; border: 1px solid var(--soft); border-radius: 8px; background: #fff8; padding-block: 7px; padding-inline: 10px 28px; color: var(--ink); font-size: 12px; width: 190px; max-width: 100%; }
.footer-right a, .preview-watermark > span { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.brand-name { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .brand-name { text-align: right; }
[dir="rtl"] .brand-tag { letter-spacing: 0; }
.policy { direction: ltr; text-align: left; }

.hero-product { position: relative; width: 100%; aspect-ratio: 1.28; }
.product-shot { position: absolute; margin: 0; overflow: hidden; background: #fff; border: 5px solid #30322f; box-shadow: 0 16px 30px #252a2522; bottom: 24px; }
.product-shot img { width: 100%; height: 100%; display: block; object-fit: cover; -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.product-shot-ipad { width: 88%; left: 0; aspect-ratio: 4/3; border-radius: 19px; }
.product-shot-iphone { width: 27%; right: 0; aspect-ratio: 600/1304; border-radius: 21px; border-width: 4px; z-index: 2; }
@media (max-width: 640px) { .hero-product { max-width: 440px; margin: 0 auto; } .product-shot { bottom: 8px; } .product-shot-ipad { border-radius: 13px; border-width: 4px; } .product-shot-iphone { border-radius: 16px; border-width: 3px; } }
