/* My Diary Journal: one stylesheet for every page. Paper journal look shared with the Prayer Journal for Women app. */
@font-face { font-family: "Caveat"; src: url(/assets/caveat.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url(/assets/dancing_script.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Lora"; src: url(/assets/lora.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Lora"; src: url(/assets/lora_italic.ttf) format("truetype"); font-style: italic; font-display: swap; }

:root {
  --bg: #FBF6EF; --sunken: #F4ECE2; --page: #FDF9F1; --edge: #EADFCF;
  --ink: #2B2430; --soft: #6E6470; --line: #E7DCD2;
  --rule: #D9E2EA; --margin: #F0B3B8; --hand: #2E3B66;
  --green: #1E5A3E; --green-fill: #E3EEE6; --on-green: #FFFFFF;
  --rose: #F6E3DF; --ribbon: #E0909E;
  --tape-rose: #F2C4C2; --tape-sage: #CFDDD0; --tape-gold: #EFE0B5;
  --shadow: 0 1px 2px rgba(60,40,30,.08), 0 10px 30px -12px rgba(60,40,30,.25);
  --grain-opacity: .55;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17131A; --sunken: #1C171F; --page: #231E26; --edge: #15111A;
    --ink: #F1E9EE; --soft: #B7ABB5; --line: #372D38;
    --rule: #3A3340; --margin: #6B3A48; --hand: #D7DCF2;
    --green: #9ED4B3; --green-fill: #24332B; --on-green: #0B2418;
    --rose: #3A2630; --ribbon: #B66A7A;
    --tape-rose: #7A4A55; --tape-sage: #46594C; --tape-gold: #6E6040;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
    --grain-opacity: .12;
  }
}
:root[data-theme="dark"] {
  --bg: #17131A; --sunken: #1C171F; --page: #231E26; --edge: #15111A;
  --ink: #F1E9EE; --soft: #B7ABB5; --line: #372D38;
  --rule: #3A3340; --margin: #6B3A48; --hand: #D7DCF2;
  --green: #9ED4B3; --green-fill: #24332B; --on-green: #0B2418;
  --rose: #3A2630; --ribbon: #B66A7A;
  --tape-rose: #7A4A55; --tape-sage: #46594C; --tape-gold: #6E6040;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
  --grain-opacity: .12;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); position: relative; font: 17px/1.65 "Lora", Georgia, serif; }
body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: url(/assets/paper_grain.png) repeat; background-size: 256px; opacity: var(--grain-opacity); mix-blend-mode: multiply;
}
a { color: var(--green); }
img { max-width: 100%; }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.script { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); }
.eyebrow { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.hand { font-family: "Caveat", cursive; color: var(--hand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
header.top { position: relative; z-index: 5; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .script { font-size: 30px; line-height: 1; }
nav.main { display: flex; gap: 28px; font: 500 15px var(--sans); }
nav.main a { color: var(--ink); text-decoration: none; opacity: .8; }
nav.main a:hover, nav.main a[aria-current] { opacity: 1; color: var(--green); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] nav { display: flex; flex-direction: column; gap: 0; position: absolute; right: 0; top: 48px; min-width: 220px; background: var(--page); box-shadow: var(--shadow); border-radius: 14px; padding: 8px 0; }
.menu nav a { padding: 12px 20px; color: var(--ink); text-decoration: none; font: 500 16px var(--sans); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 14px var(--sans); text-decoration: none; background: var(--green-fill); color: var(--green); white-space: nowrap;
}
.btn.primary { background: var(--green); color: var(--on-green); }
.btn:hover { filter: brightness(.97); }
.btn svg { width: 18px; height: 18px; }

/* Paper page */
.paper {
  position: relative; background: var(--page); border-radius: 6px 14px 14px 6px; padding: 34px 34px 26px 74px; isolation: isolate;
  box-shadow: 3px 4px 0 -1px var(--page), 4px 5px 0 -1px var(--edge), 7px 9px 0 -2px var(--page), 8px 10px 0 -2px var(--edge), var(--shadow);
}
.paper::before, .card::before, .app::before, .note::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: url(/assets/paper_grain.png) repeat; background-size: 256px; opacity: var(--grain-opacity); mix-blend-mode: multiply;
}
.paper .margin { position: absolute; top: 0; bottom: 0; left: 52px; width: 4px; border-left: 1.5px solid var(--margin); border-right: 1.5px solid var(--margin); opacity: .85; }
.paper .spine { position: absolute; top: 0; bottom: 0; left: 0; width: 22px; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, rgba(0,0,0,.07), transparent); }
.tape { position: absolute; width: 120px; height: 34px; opacity: .92; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px), var(--c, var(--tape-rose));
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 97% 100%, 2% 96%, 0 52%);
}
.ribbon { position: absolute; top: -6px; right: 44px; width: 22px; height: 92px; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 60px; }
.page-head .date { font-size: 28px; }
.page-title { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: 40px; margin: 4px 0 2px; border: 0; background: none; width: 100%; outline: none; padding: 0; }
.page-title::placeholder { color: var(--green); opacity: 1; }
.lined {
  --lh: 40px;
  width: 100%; border: 0; outline: none; resize: none; background: transparent; color: var(--hand);
  font: 28px/var(--lh) "Caveat", cursive; padding: 0 0 0 2px; min-height: calc(var(--lh) * 3); display: block;
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1.5px), var(--rule) calc(var(--lh) - 1.5px), var(--rule) var(--lh));
  background-size: 100% var(--lh); background-attachment: local;
}
.lined::placeholder { color: var(--soft); opacity: .7; }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.saved { margin-left: auto; font: 13px var(--sans); color: var(--soft); }
.pages { display: none; margin-top: 14px; border-top: 1px solid var(--line); }
.pages.open { display: block; }
.pages a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pages a span:last-child { color: var(--soft); font: 13px var(--sans); white-space: nowrap; }
.pages .hand { font-size: 24px; }
.pages .del { border: 0; background: none; color: var(--soft); font: 12px var(--sans); cursor: pointer; text-decoration: underline; padding: 0 0 0 6px; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; padding: 36px 0 72px; }
.hero h1 { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: clamp(52px, 7vw, 84px); line-height: 1.02; margin: 14px 0 18px; }
.hero p.lead { font-size: 20px; color: var(--soft); margin: 0 0 26px; max-width: 30ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-family: "Caveat", cursive; font-size: 26px; color: var(--hand); }
.ticks svg { flex: none; }

/* Blocks */
section.block { padding: 64px 0; }
.block h2, .h2 { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: clamp(38px, 5vw, 52px); line-height: 1.1; margin: 8px 0 30px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 28px; }
.card { position: relative; display: block; text-decoration: none; color: var(--ink); background: var(--page); border-radius: 10px; padding: 34px 24px 22px; box-shadow: var(--shadow); isolation: isolate; transition: transform .2s; }
.card:hover { transform: translateY(-3px) rotate(-.4deg); }
.card .tape { top: -14px; left: 50%; margin-left: -56px; width: 112px; height: 30px; }
.card h3 { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: 32px; margin: 0 0 4px; line-height: 1.1; }
.card p { margin: 0; font-family: "Caveat", cursive; font-size: 24px; color: var(--hand); line-height: 1.25; }

/* App panel */
.app { background: var(--rose); border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; isolation: isolate; }
.app h2 { margin-bottom: 12px; }
.app p { font-size: 19px; margin: 0 0 22px; max-width: 34ch; }
.app .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.play { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 14px; background: #1A1A1A; color: #fff; text-decoration: none; font: 600 15px var(--sans); }
.play small { display: block; font-size: 11px; font-weight: 500; opacity: .75; line-height: 1; }
.phones { position: relative; height: 470px; }
.phone { position: absolute; width: 230px; border-radius: 30px; padding: 8px; background: #1F1A1D; box-shadow: 0 30px 50px -20px rgba(60,30,30,.45); }
.phone img { display: block; width: 100%; height: auto; border-radius: 23px; }
.phone.a { left: 8%; top: 30px; transform: rotate(-5deg); }
.phone.b { right: 6%; top: 0; transform: rotate(4deg); }
.phone .tape { top: -14px; left: 50%; margin-left: -50px; width: 100px; height: 28px; }

/* Link lists */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.links h3 { font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0 0 10px; }
.links ul { list-style: none; margin: 0; padding: 0; }
.links li { border-bottom: 1px solid var(--line); }
.links a { display: block; padding: 11px 0; color: var(--ink); text-decoration: none; }
.links a:hover { color: var(--green); }

/* Article pages */
.crumbs { font: 14px var(--sans); color: var(--soft); padding: 6px 0 0; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs span { margin: 0 8px; opacity: .6; }
.art-head { padding: 26px 0 30px; }
.art-head h1 { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: clamp(44px, 6vw, 68px); line-height: 1.05; margin: 12px 0 18px; }
.art-head .lead { font-size: 20px; line-height: 1.6; margin: 0; }
.byline { font: 14px var(--sans); color: var(--soft); margin-top: 16px; }
.toc { background: var(--page); border-radius: 14px; padding: 20px 24px; margin: 8px 0 34px; box-shadow: var(--shadow); position: relative; isolation: isolate; }
.toc .eyebrow { color: var(--soft); }
.toc ol { margin: 10px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--green); }
.prose h2 { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: clamp(34px, 4.4vw, 44px); line-height: 1.15; margin: 54px 0 14px; }
.prose h3 { font-size: 21px; margin: 30px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose ul li::marker { color: var(--green); }
.prose ol li::marker { color: var(--green); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose > .paper, .prose > .note, .prose > .verse, .prose > .example, .prose > .sheet { margin: 30px 0 34px; }

.prompts { list-style: none; counter-reset: p; padding: 0 !important; margin: 0 0 24px; }
.prompts li { counter-increment: p; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }
.prompts li::before { content: counter(p); font: 700 15px var(--sans); color: var(--green); background: var(--green-fill); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.prompts li > span { font-size: 18px; }
.prompts .write { height: 34px; padding: 0 12px; font-size: 13px; }

.example { position: relative; background: var(--page); border-radius: 6px 14px 14px 6px; padding: 30px 30px 22px 70px; isolation: isolate; box-shadow: var(--shadow); }
.example::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50px; width: 4px; border-left: 1.5px solid var(--margin); border-right: 1.5px solid var(--margin); opacity: .85; }
.example .ex-label { font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.example .ex-date { float: right; font-family: "Caveat", cursive; font-size: 24px; color: var(--hand); }
.example .ex-title { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: 32px; margin: 4px 0 6px; }
.example .ex-text { font: 25px/38px "Caveat", cursive; color: var(--hand); white-space: pre-line;
  background-image: linear-gradient(to bottom, transparent 36.5px, var(--rule) 36.5px, var(--rule) 38px); background-size: 100% 38px; }

.verse { position: relative; background: var(--page); border-radius: 12px; padding: 34px 32px 26px; box-shadow: var(--shadow); isolation: isolate; text-align: center; }
.verse .tape { top: -14px; left: 50%; margin-left: -56px; width: 112px; height: 30px; }
.verse blockquote { margin: 0; font: italic 22px/1.55 "Lora", Georgia, serif; }
.verse cite { display: block; margin-top: 12px; font: 600 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--green); font-style: normal; }

.note { position: relative; background: var(--rose); border-radius: 14px; padding: 18px 22px 18px 54px; isolation: isolate; }
.note::after { content: ""; position: absolute; left: 20px; top: 21px; width: 20px; height: 20px; border-radius: 50%; background: var(--ribbon); opacity: .8; }
.note p { margin: 0; }

.steps { list-style: none; counter-reset: s; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 18px 56px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: var(--on-green); font: 700 16px var(--sans); display: grid; place-items: center; }
.steps li strong { display: block; font-size: 19px; margin-bottom: 2px; }

.tbl { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 16px; }
.tbl th { text-align: left; font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); border-bottom: 2px solid var(--line); padding: 10px 12px 10px 0; }
.tbl td { border-bottom: 1px solid var(--line); padding: 12px 12px 12px 0; vertical-align: top; }
.tbl-wrap { overflow-x: auto; }

/* Fill-in template sheet */
.sheet { position: relative; background: var(--page); border-radius: 6px 14px 14px 6px; padding: 34px 34px 26px 74px; isolation: isolate;
  box-shadow: 3px 4px 0 -1px var(--page), 4px 5px 0 -1px var(--edge), var(--shadow); }
.sheet::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: url(/assets/paper_grain.png); background-size: 256px; opacity: var(--grain-opacity); mix-blend-mode: multiply; }
.sheet .margin { position: absolute; top: 0; bottom: 0; left: 52px; width: 4px; border-left: 1.5px solid var(--margin); border-right: 1.5px solid var(--margin); opacity: .85; }
.sheet .sheet-name { font-family: "Dancing Script", cursive; font-weight: 700; color: var(--green); font-size: 40px; margin: 0 0 8px; line-height: 1.1; }
.sheet .field { margin-top: 14px; }
.sheet .field label { display: block; font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.sheet .field .lined { min-height: calc(var(--lh) * var(--rows, 3)); }
.sheet-date { font-family: "Caveat", cursive; font-size: 26px; color: var(--hand); border: 0; background: none; outline: none; border-bottom: 1.5px solid var(--rule); width: 220px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 19px; padding: 14px 36px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font: 400 26px var(--sans); color: var(--green); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 16px; }

/* CTA band */
.cta { position: relative; background: var(--green-fill); border-radius: 24px; padding: 36px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 56px 0 0; }
.cta .script { font-size: 36px; line-height: 1.1; }
.cta p { margin: 4px 0 0; color: var(--soft); }

/* Hub */
.hub-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; list-style: none; padding: 0; margin: 0; }
.hub-list li { border-bottom: 1px solid var(--line); }
.hub-list a { display: block; padding: 14px 0; color: var(--ink); text-decoration: none; }
.hub-list a:hover { color: var(--green); }
.hub-list small { display: block; color: var(--soft); font: 14px var(--sans); }

footer { padding: 48px 0 60px; color: var(--soft); font: 14px var(--sans); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 28px; }
footer a { color: var(--soft); margin-left: 20px; text-decoration: none; }
footer .script { font-size: 24px; }

/* Lock */
.lock { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: var(--bg); }
.lock.show { display: grid; }
.lock .paper { width: min(360px, 90vw); text-align: center; padding: 40px 30px; }
.lock input { width: 160px; font: 34px "Caveat", cursive; text-align: center; letter-spacing: .3em; border: 0; border-bottom: 2px solid var(--rule); background: none; color: var(--hand); outline: none; margin: 10px 0 18px; }

@media (max-width: 900px) {
  nav.main { display: none; }
  .menu { display: block; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; }
  .hero p.lead { max-width: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; padding: 36px 22px; }
  .phones { height: 400px; }
  .phone { width: 190px; }
  .links, .hub-list { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .paper, .sheet { padding: 28px 18px 20px 52px; }
  .paper .margin, .sheet .margin { left: 36px; }
  .example { padding: 26px 18px 18px 52px; }
  .example::before { left: 36px; }
  .ribbon { right: 20px; }
  .page-head { padding-right: 34px; }
  .cards { gap: 30px 14px; }
  .card { padding: 30px 14px 16px; }
  .card h3 { font-size: 25px; }
  .card p { font-size: 20px; }
  .phone.a { left: 0; } .phone.b { right: 0; }
  .prompts li { grid-template-columns: 38px 1fr; }
  .prompts .write { grid-column: 2; justify-self: start; }
  .cta { padding: 28px 22px; }
}
@media print {
  body { background: #fff; }
  body::before, header.top, footer, .crumbs, .bar, .pages, .ribbon, .tape, .no-print, .faq, .cta, .toc, .menu { display: none !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .paper, #print-root .sheet { box-shadow: none !important; padding-left: 64px; }
  #print-root .lined, #print-root .print-text { font: 24px/36px "Caveat", cursive; color: #2E3B66; white-space: pre-wrap;
    background-image: linear-gradient(to bottom, transparent 34.5px, #D9E2EA 34.5px, #D9E2EA 36px); background-size: 100% 36px; }
  .paper, .sheet, .example, .verse { box-shadow: none !important; }
}
#print-root { display: none; }
