/* ── Static pages ────────────────────────────────────────
   Editorial layout for the pages that are not the calendar: the app
   landing page and the two App Store URLs (privacy, support).

   Loaded after cal.css, so every custom property (palette, fonts,
   easing) and the shared chrome (.page, .brand-bar, .footer, .lang-switch)
   already apply. Nothing here restyles the chrome — it only adds the
   long-form typography the calendar never needed. */

/* ── Type scale ───────────────────────────────────────────
   Six steps, each with one job. Everything on these pages picks one of
   them; a size that is not in this list is a bug, not a nuance. Before
   this existed the pages carried four body sizes within a point and a
   half of each other (15.5 / 15 / 14.5 / 14), which reads as sloppiness
   rather than hierarchy.

   The phone mock-up on /app is deliberately outside the scale: it is a
   1:1 picture of another product, and its type belongs to that product,
   not to this page. */
:root {
	--type-label:   11px ;                     /* eyebrows, update line, badge kicker */
	--type-small:   13px ;                     /* captions, inline actions */
	--type-body:    15.5px ;                   /* running text, lists */
	--type-lead:    17.5px ;                   /* lead paragraph, h3, FAQ questions */
	--type-heading: 23px ;                     /* section titles */
	--type-display: clamp(30px, 5vw, 46px) ;   /* page title */
}

/* The calendar makes <main> a flex column that fills the viewport; a
   document just flows. */
.doc-body .page main { display: block ; flex: 1 ; min-height: 0 ; }

/* The brand bar stays fully transparent here, as it is on the calendar —
   the paper gradient has to read through it. Content is kept from showing
   underneath the same way the calendar does it: by clipping the scrolling
   content itself, not by putting a surface in front of it.

   --clip-top is measured live by pages.js on every scroll frame: the gap
   between the bottom of the sticky bar and the top of the content, both read
   from the current layout, so no constant has to be kept in sync with the
   padding, the wordmark size or the font metrics.

   Without JS it falls back to 0px and the inset collapses to nothing, so the
   page simply scrolls the ordinary way. */
.doc-body .doc {
	clip-path: inset(var(--clip-top, 0px) 0 0 0) ;
}

.doc {
	padding: 40px 0 8px ;
}
.doc-article,
.doc > section,
.doc > aside,
.doc > p {
	max-width: 720px ;
	margin-left: auto ;
	margin-right: auto ;
}

/* ── Headings and body copy ───────────────────────────── */

.doc-eyebrow {
	font-size: var(--type-label) ;
	letter-spacing: 0.26em ;
	text-transform: uppercase ;
	color: var(--accent-deep) ;
	margin: 0 0 14px ;
}
.doc-title {
	font-family: var(--font-serif) ;
	font-weight: 400 ;
	font-size: var(--type-display) ;
	line-height: 1.12 ;
	letter-spacing: -0.02em ;
	color: var(--ink) ;
	margin: 0 0 18px ;
	max-width: 15ch ;
	/* Even line lengths rather than a long first line and an orphan.
	   Browsers that do not support it simply wrap the ordinary way; the
	   max-width above still sets the measure either way. */
	text-wrap: balance ;
}
.doc-lead {
	font-size: var(--type-lead) ;
	line-height: 1.65 ;
	color: var(--ink-soft) ;
	margin: 0 0 10px ;
}
.doc-updated {
	font-size: var(--type-label) ;
	letter-spacing: 0.08em ;
	text-transform: uppercase ;
	color: var(--ink-mute) ;
	/* The line sits alone between the lead and the first section rule.
	   Below, its 8px collapse with the section’s 34px margin. Above, 30px
	   rather than 34: the lead’s taller line box (28.9px for 17.5px type)
	   already contributes ~4px of half-leading that the eye reads as space.
	   Measured result: 37px of visible gap on each side. */
	margin: 30px 0 8px ;
}

.doc-section {
	margin-top: 34px ;
	padding-top: 22px ;
	border-top: 1px solid var(--rule-soft) ;
}
.doc-section h2 {
	font-family: var(--font-serif) ;
	font-weight: 400 ;
	font-size: var(--type-heading) ;
	line-height: 1.25 ;
	color: var(--ink) ;
	margin: 0 0 12px ;
}
.doc-section h3 {
	font-family: var(--font-serif) ;
	font-weight: 400 ;
	font-size: var(--type-lead) ;
	color: var(--ink) ;
	margin: 0 0 6px ;
}
/* Baseline for document paragraphs. :where() holds the wrapper at zero
   specificity, so a paragraph carrying its own class — the lead, the update
   line, the CTA note — still wins without an arms race. Without it, .doc p
   (0,1,1) quietly beat .doc-lead and .doc-updated (0,1,0) and their type
   size and margins never applied. */
:where(.doc) p {
	font-size: var(--type-body) ;
	line-height: 1.75 ;
	color: var(--ink-soft) ;
	margin: 0 0 14px ;
}
.doc-list {
	margin: 4px 0 16px ;
	display: flex ;
	flex-direction: column ;
	gap: 9px ;
}
.doc-list li {
	position: relative ;
	padding-left: 18px ;
	font-size: var(--type-body) ;
	line-height: 1.7 ;
	color: var(--ink-soft) ;
}
.doc-list li::before {
	content: '' ;
	position: absolute ;
	left: 0 ;
	top: 0.72em ;
	width: 5px ; height: 5px ;
	border-radius: 50% ;
	background: var(--accent) ;
}

.doc-link {
	color: var(--accent-deep) ;
	position: relative ;
	transition: color 200ms var(--ease) ;
}
.doc-link::after {
	content: '' ;
	position: absolute ;
	left: 0 ; right: 0 ; bottom: -2px ;
	height: 1px ;
	background: var(--accent) ;
	transform: scaleX(0) ;
	transform-origin: left ;
	transition: transform 280ms var(--ease) ;
}
.doc-link:hover { color: var(--ink) ; }
.doc-link:hover::after { transform: scaleX(1) ; }

.doc-actions {
	display: flex ;
	align-items: center ;
	flex-wrap: wrap ;
	gap: 14px ;
	margin-top: 18px ;
	font-size: var(--type-small) ;
}
.doc-actions .sep { color: var(--rule) ; }

/* ── FAQ ──────────────────────────────────────────────── */

.faq { display: flex ; flex-direction: column ; }
.faq-item {
	border-bottom: 1px solid var(--rule-soft) ;
	padding: 4px 0 ;
}
.faq-item summary {
	list-style: none ;
	cursor: pointer ;
	padding: 12px 26px 12px 0 ;
	font-family: var(--font-serif) ;
	font-size: var(--type-lead) ;
	color: var(--ink) ;
	position: relative ;
	transition: color 200ms var(--ease) ;
}
.faq-item summary::-webkit-details-marker { display: none ; }
.faq-item summary::after {
	content: '' ;
	position: absolute ;
	right: 4px ;
	top: 50% ;
	width: 8px ; height: 8px ;
	margin-top: -6px ;
	border-right: 1.5px solid var(--ink-mute) ;
	border-bottom: 1.5px solid var(--ink-mute) ;
	transform: rotate(45deg) ;
	transition: transform 260ms var(--ease) ;
}
.faq-item[open] summary::after { transform: rotate(-135deg) ; margin-top: -2px ; }
.faq-item summary:hover { color: var(--accent-deep) ; }
.faq-item p { padding: 0 0 14px ; margin: 0 ; }

/* ── App Store badge ──────────────────────────────────── */

.app-badge {
	display: inline-flex ;
	align-items: center ;
	gap: 10px ;
	padding: 8px 16px 8px 13px ;
	border: 1px solid var(--rule) ;
	border-radius: 999px ;
	background: var(--card) ;
	color: var(--ink) ;
	box-shadow: var(--shadow-sm) ;
	transition: border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease) ;
}
.app-badge:hover {
	border-color: var(--accent) ;
	transform: translateY(-1px) ;
	box-shadow: 0 8px 20px rgba(26, 24, 20, 0.08) ;
}
.app-badge .ab-glyph { width: 17px ; height: 17px ; color: var(--accent-deep) ; flex: none ; }
.app-badge .ab-text { display: flex ; flex-direction: column ; line-height: 1.12 ; }
.app-badge .ab-kicker {
	font-size: var(--type-label) ;
	letter-spacing: 0.16em ;
	text-transform: uppercase ;
	color: var(--ink-mute) ;
}
.app-badge .ab-name {
	font-family: var(--font-serif) ;
	font-size: var(--type-lead) ;
	color: var(--ink) ;
}
.app-badge.is-large { padding: 11px 22px 11px 18px ; }
.app-badge.is-large .ab-glyph { width: 20px ; height: 20px ; }
/* Apple's official artwork, when it is dropped in assets/img/. */
.app-badge.is-artwork {
	padding: 0 ;
	border: 0 ;
	background: none ;
	box-shadow: none ;
}
.app-badge.is-artwork img { height: 42px ; width: auto ; }
.app-badge.is-artwork:hover { transform: translateY(-1px) ; box-shadow: none ; }
/* Google Play before PLAY_STORE_LIVE: the same pill, quieter, not a link. */
.app-badge.is-soon { box-shadow: none ; background: transparent ; cursor: default ; }
.app-badge.is-soon:hover { border-color: var(--rule) ; transform: none ; box-shadow: none ; }
.app-badge.is-soon .ab-glyph { color: var(--ink-mute) ; }
.app-badge.is-soon .ab-name { color: var(--ink-mute) ; }
.app-badges { display: flex ; flex-wrap: wrap ; gap: 10px ; }

/* ── App landing page ─────────────────────────────────── */

.app-hero {
	display: grid ;
	grid-template-columns: 1.05fr 0.95fr ;
	gap: 56px ;
	align-items: center ;
	max-width: 1040px ;
	margin: 0 auto ;
	padding: 26px 0 10px ;
}
.app-hero .doc-title { max-width: 13ch ; }
.app-cta {
	display: flex ;
	flex-direction: column ;
	align-items: flex-start ;
	gap: 10px ;
	margin-top: 26px ;
}
.app-cta-note {
	font-size: var(--type-small) ;
	color: var(--ink-mute) ;
	margin: 0 ;
}

.app-shot { margin: 0 ; display: flex ; flex-direction: column ; align-items: center ; gap: 14px ; }

/* The phone: no screenshot, just the real layout rebuilt in HTML so it
   can never drift from the palette. */
.phone {
	width: 292px ;
	height: 592px ;
	border-radius: 44px ;
	background: var(--ink) ;
	padding: 9px ;
	box-shadow: 0 26px 60px rgba(26, 24, 20, 0.22) ;
}
.phone-screen {
	height: 100% ;
	border-radius: 36px ;
	background: var(--paper) ;
	padding: 20px 0 0 ;
	display: flex ;
	flex-direction: column ;
	overflow: hidden ;
}

/* Navigation bar: today on the left, the month inline, two glyphs right —
   the system chrome the app leaves to iOS. */
.ms-nav {
	display: flex ;
	align-items: center ;
	justify-content: space-between ;
	padding: 2px 12px 8px ;
	font-size: 9.5px ;
}
.ms-today { color: var(--accent-deep) ; }
.ms-nav-title { color: var(--ink) ; font-size: 10.5px ; }
.ms-nav-icons { display: inline-flex ; gap: 5px ; }
.ms-nav-icons i {
	width: 11px ; height: 11px ;
	border-radius: 50% ;
	border: 1.2px solid var(--ink-mute) ;
	display: block ;
	opacity: 0.65 ;
}

.ms-weekdays {
	display: grid ;
	grid-template-columns: repeat(7, 1fr) ;
	font-size: 8px ;
	letter-spacing: 0.06em ;
	color: var(--ink-mute) ;
	text-align: center ;
	padding-bottom: 5px ;
	border-bottom: 1px solid var(--rule-soft) ;
}

.ms-grid { display: flex ; flex-direction: column ; flex: 1 ; padding: 0 4px ; }

/* Month heading — Playfair, as in the app, with the year set beside it. */
.ms-month-head {
	display: flex ;
	align-items: baseline ;
	gap: 4px ;
	padding: 9px 5px 2px ;
}
.ms-month { font-family: var(--font-serif) ; font-size: 15px ; color: var(--ink) ; }
.ms-year { font-size: 9px ; color: var(--ink-mute) ; }

.ms-week {
	flex: 1 ;
	padding: 2px 0 ;
	border-top: 1px solid var(--rule-soft) ;
	display: flex ;
	flex-direction: column ;
}
.ms-days {
	display: grid ;
	grid-template-columns: repeat(7, 1fr) ;
	font-size: 9.5px ;
	color: var(--ink) ;
	text-align: center ;
}
.ms-days .is-out { color: transparent ; }
.ms-days .is-today {
	color: #fff ;
	background: var(--accent) ;
	border-radius: 50% ;
	width: 15px ; height: 15px ;
	line-height: 15px ;
	margin: 0 auto ;
}
.ms-chips {
	display: grid ;
	grid-template-columns: repeat(7, 1fr) ;
	grid-auto-rows: 11px ;
	gap: 2px ;
	min-height: 11px ;
	margin-top: 2px ;
}
/* Pale wash behind strong text, not a saturated block: the weight the app
   settled on, because a month holds dozens of these. */
.ms-chip {
	font-size: 7px ;
	font-weight: 600 ;
	line-height: 11px ;
	height: 11px ;
	padding: 0 3px ;
	border-radius: 3px ;
	white-space: nowrap ;
	overflow: hidden ;
	text-overflow: ellipsis ;
}
.ms-chip.is-mint { background: #e3f3e9 ; color: #3f7a56 ; }
.ms-chip.is-gold { background: #f6eccb ; color: #8c6e12 ; }
.ms-chip.is-fav  { background: #f7e4e7 ; color: #a04a5a ; }
.ms-more {
	font-size: 7px ;
	line-height: 11px ;
	color: var(--ink-mute) ;
	text-align: right ;
	padding-right: 3px ;
}

/* The four view glyphs, grouped as iOS groups a bottom toolbar. */
.ms-toolbar {
	display: flex ;
	align-items: center ;
	justify-content: center ;
	gap: 16px ;
	padding: 7px 0 9px ;
	border-top: 1px solid var(--rule-soft) ;
}
.ms-toolbar i {
	width: 13px ; height: 13px ;
	border-radius: 3px ;
	border: 1.2px solid var(--ink-mute) ;
	display: block ;
	opacity: 0.55 ;
}
.ms-toolbar i.on { border-color: var(--accent-deep) ; background: var(--accent-soft) ; opacity: 1 ; }

/* Feature grid */
.feature-grid {
	display: grid ;
	grid-template-columns: repeat(2, 1fr) ;
	gap: 26px 34px ;
	margin-top: 6px ;
}
.feature p { font-size: var(--type-body) ; margin: 0 ; }

.req-list li::before { background: var(--accent-deep) ; }

@media (max-width: 900px) {
	.app-hero {
		grid-template-columns: 1fr ;
		gap: 34px ;
		padding-top: 14px ;
	}
	.app-hero .doc-title { max-width: none ; }
	.feature-grid { grid-template-columns: 1fr ; gap: 22px ; }
}
@media (max-width: 720px) {
	.doc { padding-top: 26px ; }
	:root { --type-lead: 16px ; }
}

/* RTL: list bullets and FAQ chevrons flip sides. */
html[dir="rtl"] .doc-list li { padding-left: 0 ; padding-right: 18px ; }
html[dir="rtl"] .doc-list li::before { left: auto ; right: 0 ; }
html[dir="rtl"] .faq-item summary { padding: 12px 0 12px 26px ; }
html[dir="rtl"] .faq-item summary::after { right: auto ; left: 4px ; }
