/* Archive note page (journal-detail.html). Scoped under .note so the rest of the site is untouched. */
.note{--note-space:clamp(80px,8vw,130px);--note-ease:cubic-bezier(.23,1,.32,1);--note-surface:#ece5da;--note-muted:#6b5c51;--note-header:96px;background:var(--ivory);color:var(--espresso);overflow-x:clip}
.note-wrap{width:88%;max-width:1320px;margin-inline:auto}
.note h1,.note h2,.note h3{margin:0;font-family:var(--font-heading);font-weight:600;letter-spacing:-.01em}
.note p{margin:0}
:where(.note) figure,:where(.note) blockquote{margin:0}
.note img{display:block}
.note :focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.note-page ::selection{background:var(--gold);color:var(--espresso)}
.note-text-link{position:relative;padding-bottom:4px;color:inherit;font-size:15px;font-weight:600;text-decoration:none}
.note-text-link:after{content:'';position:absolute;right:0;bottom:0;width:100%;height:1px;background:currentColor;transform-origin:right;transition:transform .25s var(--note-ease)}

/* Reading progress: a gold line along the top of the window that fills as the note is read. */
.note-progress{position:fixed;z-index:2000;top:0;right:0;left:0;height:3px;pointer-events:none}
.note-progress span{display:block;height:100%;background:var(--gold);transform:scaleX(var(--progress,0));transform-origin:right}

html.menu-locked .note-progress{visibility:hidden}

/* Head: crumbs, the title, then the details under it on the right; same edge as the photograph. */
.note-head{padding:calc(var(--note-header) + clamp(36px,5vw,72px)) 0 clamp(36px,4vw,56px)}
.note-head-inner{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.note-head h1{order:1;max-width:860px}
.note-crumbs{display:flex;flex-wrap:wrap;gap:10px;font-size:14px;color:var(--note-muted)}
.note-crumbs a{color:inherit;text-decoration:none;transition:color .2s ease}
.note-crumbs [aria-current]{color:var(--espresso)}
.note-meta{display:flex;flex-wrap:wrap;align-items:center;order:2;margin-top:8px!important;font-size:14px;color:var(--note-muted)}
.note-meta>span+span:before{content:'';display:inline-block;width:4px;height:4px;margin:0 12px;border-radius:50%;background:var(--gold);vertical-align:middle}
.note-topic{font-weight:600;color:var(--walnut)}
.note-head h1{margin-top:22px;font-size:clamp(34px,4.2vw,64px);line-height:1.3}

/* Cover photograph. */
.note-cover-image{display:block;overflow:hidden;aspect-ratio:16/8;border-radius:24px;background:var(--note-surface)}
.note-cover-image img{width:100%;height:100%;object-fit:cover}
.note-cover-image.is-cutout,.note-card-image.is-cutout{display:grid;place-items:center;background:radial-gradient(90% 90% at 50% 100%,#e4dacb 0,var(--note-surface) 70%)}
.note-cover-image.is-cutout img,.note-card-image.is-cutout img{width:auto;height:80%;object-fit:contain}

/* Body, with the contents and product column on the right. */
.note-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:clamp(40px,6vw,96px);align-items:start;padding-block:clamp(48px,6vw,88px) var(--note-space)}
.note-body{max-width:720px}
.note-body h2{margin:56px 0 16px;font-size:clamp(24px,2.2vw,32px);line-height:1.5;scroll-margin-top:calc(var(--note-header) + 24px)}
.note-body h2:first-child{margin-top:0}
.note-body p{font-size:17px;line-height:2.15;color:#40322a}
.note-body p+p{margin-top:18px}
.note-quote{position:relative;margin:36px 0!important;padding:8px 28px 8px 0;border-right:2px solid var(--gold)}
.note-quote p{font-family:var(--font-heading);font-size:clamp(22px,2vw,28px)!important;line-height:1.7!important;color:var(--espresso)!important}
.note-figures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:32px}
.note-figures img{width:100%;aspect-ratio:1;border-radius:20px;object-fit:cover}
.note-figures figure:first-child img{border-radius:120px 120px 20px 20px}
.note-figures figcaption{margin-top:10px;font-size:13px;color:var(--note-muted)}
.note-tips{margin-top:28px;padding:28px 30px;border-radius:24px;background:var(--note-surface)}
.note-tips h3{font-size:19px}
.note-tips ol{margin:16px 0 0;padding:0;list-style:none;counter-reset:tip}
.note-tips li{position:relative;padding:12px 44px 12px 0;border-top:1px solid rgba(48,36,31,.1);font-size:16px;line-height:1.9;counter-increment:tip}
.note-tips li:before{content:counter(tip,persian);position:absolute;top:12px;right:0;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--espresso);color:var(--ivory);font-size:13px;line-height:1}
.note-share{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:56px;padding-top:28px;border-top:1px solid var(--line);font-size:14px;color:var(--note-muted)}
.note-share>span{margin-inline-end:auto}
.note-share-btn{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 18px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--espresso);font:inherit;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;transition:border-color .2s ease,background-color .2s ease,transform .16s var(--note-ease)}
.note-share-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.note-share-btn:active{transform:scale(.97)}
.note-side{order:-1;position:sticky;top:calc(var(--note-header) + 28px);display:grid;gap:24px}
.note-toc h2{font-size:15px;color:var(--note-muted);font-family:inherit}
.note-toc ol{margin:12px 0 0;padding:0;list-style:none;border-right:1px solid var(--line)}
.note-toc a{position:relative;display:block;padding:8px 18px 8px 0;color:var(--note-muted);font-size:15px;line-height:1.7;text-decoration:none;transition:color .2s ease}
.note-toc a:before{content:'';position:absolute;top:8px;right:-1px;bottom:8px;width:2px;background:var(--gold);transform:scaleY(0);transition:transform .3s var(--note-ease)}
.note-toc a.is-current{color:var(--espresso);font-weight:600}
.note-toc a.is-current:before{transform:scaleY(1)}
.note-product{display:grid;gap:6px;padding:18px;border-radius:24px;background:#f8f4ee;border:1px solid rgba(48,36,31,.08);color:var(--espresso);text-decoration:none;transition:border-color .2s ease,transform .16s var(--note-ease)}
.note-product small{font-size:13px;color:var(--note-muted)}
.note-product-image{display:block;overflow:hidden;aspect-ratio:4/3;margin:6px 0;border-radius:90px 90px 14px 14px;background:var(--note-surface)}
.note-product-image img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--note-ease)}
.note-product strong{font-family:var(--font-heading);font-size:19px;font-weight:600}
.note-product-price:empty{display:none}
.note-product-link{display:inline-flex;align-items:center;gap:10px;margin-top:6px;font-size:14px;font-weight:600;color:var(--walnut)}
.note-product-link svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s var(--note-ease)}
.note-product:active{transform:scale(.98)}

/* More notes. */
.note-more{padding-block:var(--note-space);background:#f8f4ee}
.note-more-head{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:16px}
.note-more-head h2{font-size:clamp(28px,2.8vw,42px)}
.note-more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(16px,2vw,28px);margin-top:36px}
.note-card{display:grid;gap:6px;color:var(--espresso);text-decoration:none}
.note-card-image{display:block;overflow:hidden;aspect-ratio:4/3;margin-bottom:10px;border-radius:20px;background:var(--note-surface)}
.note-card:nth-child(2) .note-card-image{border-radius:120px 120px 20px 20px}
.note-card-image img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--note-ease)}
.note-card small{font-size:13px;color:var(--note-muted)}
.note-card strong{font-family:var(--font-heading);font-size:20px;font-weight:600;line-height:1.6;transition:color .2s ease}
.note-card-more{display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;border:1px solid var(--gold);border-radius:999px;font-size:14px;font-weight:600;transition:background-color .25s ease,border-color .25s ease,color .25s ease}

@media(hover:hover) and (pointer:fine){
 .note-crumbs a:hover{color:var(--espresso)}
 .note-text-link:hover:after{transform:scaleX(.4)}
 .note-share-btn:hover{border-color:var(--walnut);background:#fff}
 .note-toc a:hover{color:var(--espresso)}
 .note-product:hover{border-color:rgba(48,36,31,.2)}
 .note-product:hover img,.note-card:hover img{transform:scale(1.05)}
 .note-product:hover .note-product-link svg{transform:translateX(-4px)}
 .note-card:hover strong{color:var(--walnut)}
 .note-card:hover .note-card-more{background:var(--espresso);border-color:var(--espresso);color:var(--ivory)}
}
@media(max-width:991px){
 .note-layout{grid-template-columns:1fr}
 .note-side{order:0;position:static;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media(max-width:767px){
 .note-wrap{width:auto;margin-inline:16px}
 .note-cover-image{aspect-ratio:4/3;border-radius:18px}
 .note-side{grid-template-columns:1fr}
 .note-toc{display:none}
 /* Other notes: a one-line heading over the slider; the date line sits under each title. */
 .note-more-head{flex-wrap:nowrap;align-items:center;gap:12px}
 .note-more-head h2{font-size:clamp(17px,5vw,20px);white-space:nowrap}
 .note-more-head .note-text-link{flex:none;font-size:13px}
 .note-more-grid{margin-top:24px}
 .note-card strong{order:1;font-size:17px}
 .note-card small{order:2;font-size:12px}
 .note-card-more{order:3}
 .note-tips{padding:22px 20px}
 .note-share>span{flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){.note img{transition:none!important}}
