/* Sundial: theme layer on top of the Sundial foundation. CSS only. */
:root{ --sundial-ui: var(--wp--custom--font-ui, system-ui, sans-serif); --sundial-hw: var(--wp--custom--heading-weight, 600); --sundial-card: var(--sdl-surface-2); }
@supports (color: color-mix(in oklch, red, blue)) { :root{ --sundial-card: color-mix(in oklch, var(--sdl-ink) 3%, var(--sdl-surface)); } }

/* Small labels */
.sundial-kicker, .sundial-kicker a, .is-style-kicker{ font-family:var(--sundial-ui); font-size:.76rem; font-weight:600; letter-spacing:.09em; text-transform:uppercase; color:var(--sdl-accent-ink); text-decoration:none; margin:0; }
.sundial-deck, .is-style-deck, .sundial-lede{ font-size:var(--wp--preset--font-size--medium); color:var(--sdl-ink-soft); line-height:1.5; }
.sundial-soft{ color:var(--sdl-ink-soft); }
.wp-block-post-terms, .wp-block-post-date, .wp-block-post-author-name, .wp-block-query-pagination, .wp-block-categories, .wp-block-navigation{ font-family:var(--sundial-ui); }

/* Header */
.sundial-header{ border-bottom:1px solid var(--sdl-line); }
.sundial-header-row{ gap:var(--wp--preset--spacing--30); }
.sundial-header .wp-block-site-title{ font-family:var(--wp--custom--font-display); font-weight:var(--sundial-hw); font-size:var(--wp--preset--font-size--medium); letter-spacing:-.01em; margin:0; }
.sundial-header .wp-block-site-title a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-header-actions{ gap:var(--wp--preset--spacing--40); }
.sundial-header .wp-block-navigation{ font-size:var(--wp--preset--font-size--small); }
.sundial-header .wp-block-navigation a{ color:var(--sdl-ink-soft); text-decoration:none; }
.sundial-header .wp-block-navigation a:hover{ color:var(--sdl-ink); }
.wp-block-navigation__responsive-container.is-menu-open{ padding:var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); background:var(--sdl-surface); color:var(--sdl-ink); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content{ font-size:var(--wp--preset--font-size--large); padding-block:.35em; color:var(--sdl-ink); }
@media (max-width:600px){ .sundial-header .sundial-header-cta{ display:none; } }

/* Home */
.sundial-intro .sundial-intro-title{ font-size:var(--wp--preset--font-size--display); max-width:16ch; margin-block:.3em .4em; }
.sundial-lede{ max-width:36rem; }
.sundial-section{ margin-top:var(--wp--preset--spacing--70); }
.sundial-sec-head{ margin-bottom:var(--wp--preset--spacing--40); gap:var(--wp--preset--spacing--30); }
.sundial-sec-head h2{ margin:0; }
.sundial-sec-link{ margin:0; font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); }
.sundial-sec-link a, .sundial-archive-link a, .sundial-book-link a{ color:var(--sdl-accent-ink); }

/* Grids with few items share the full width instead of leaving an empty column */
.sundial-topics .wp-block-post-template.is-layout-grid{ grid-template-columns:repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.sundial-steps.is-layout-grid{ grid-template-columns:repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.sundial-siblings.is-layout-grid{ grid-template-columns:repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }

/* Topic cards */
.sundial-topics .wp-block-post-template{ gap:var(--wp--preset--spacing--30); }
.sundial-topic{ height:100%; padding:var(--wp--preset--spacing--40); background:var(--sundial-card); border:1px solid var(--sdl-line); border-radius:var(--wp--custom--radius--base); transition:border-color .15s, transform .15s; }
.sundial-topic:hover{ border-color:var(--sdl-accent); transform:translateY(-2px); }
.sundial-topic .wp-block-post-title{ font-size:var(--wp--preset--font-size--large); margin:0 0 .3em; }
.sundial-topic .wp-block-post-title a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-topic .wp-block-post-excerpt{ color:var(--sdl-ink-soft); font-size:var(--wp--preset--font-size--small); margin:0; }
.sundial-topic .wp-block-post-excerpt__excerpt{ margin:0; }
.sundial-count{ font-family:var(--sundial-ui); font-size:.8rem; font-weight:600; color:var(--sdl-accent-ink); margin:.8em 0 0; }

/* Most read */
.sundial-most{ counter-reset:sundial-m; display:grid; grid-template-columns:repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); column-gap:var(--wp--preset--spacing--60); }
.sundial-most > li{ margin:0; counter-increment:sundial-m; border-top:1px solid var(--sdl-line); padding-block:var(--wp--preset--spacing--30); display:grid; grid-template-columns:2.4rem 1fr; gap:var(--wp--preset--spacing--20); }
.sundial-most > li::before{ content:counter(sundial-m); font-family:var(--wp--custom--font-display); font-weight:var(--sundial-hw); font-size:var(--wp--preset--font-size--large); color:var(--sdl-accent-ink); line-height:1; }
.sundial-most-item .wp-block-post-title{ font-size:var(--wp--preset--font-size--medium); margin:0; line-height:1.25; }
.sundial-most-item .wp-block-post-title a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-most-item .wp-block-post-title a:hover{ color:var(--sdl-accent-ink); }
.sundial-most-topic{ font-size:var(--wp--preset--font-size--small); color:var(--sdl-ink-soft); margin-top:.25em; }
.sundial-most-topic a{ color:inherit; text-decoration:none; }

/* Newsletter */
.sundial-newsletter{ margin-top:var(--wp--preset--spacing--70); background:var(--sdl-accent-soft); border-radius:calc(var(--wp--custom--radius--base) * 1.5); padding:var(--wp--preset--spacing--60) var(--wp--preset--spacing--50); }
.sundial-newsletter-inner{ align-items:center; gap:var(--wp--preset--spacing--50); }
.sundial-newsletter h2{ margin:.2em 0 .3em; }
.sundial-newsletter .sundial-soft{ margin:0; }
.sundial-newsletter .sundial-core-subscribe, .sundial-newsletter form{ display:flex; flex-wrap:wrap; gap:.5rem; }
.sundial-newsletter input[type="email"]{ flex:1 1 13rem; padding:.5rem .8rem; font:inherit; }
.sundial-newsletter .sundial-kicker, .sundial-archive-link a, .sdl-takeaways > :first-child{ color:var(--sdl-ink); }
.sundial-archive-link{ font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); margin:.8em 0 0; }

/* Books */
.sundial-books{ gap:var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
.sundial-book{ max-width:14rem; }
.sundial-cover{ color:var(--sdl-on-accent); aspect-ratio:2 / 3; display:flex; flex-direction:column; justify-content:flex-end; padding:var(--wp--preset--spacing--30); border-radius:3px; box-shadow:0 10px 24px -14px rgb(0 0 0 / 50%); background:var(--sdl-accent); }
.sundial-cover-b{ background:var(--sdl-ink); }
.sundial-cover-c{ background:var(--sdl-surface-2); box-shadow:inset 0 0 0 1px var(--sdl-line), 0 10px 24px -14px rgb(0 0 0 / 50%); }
.sundial-cover .sundial-cover-title{ color:var(--sdl-on-accent); font-size:var(--wp--preset--font-size--medium); line-height:1.15; margin:0; }
.sundial-cover-b .sundial-cover-title{ color:var(--sdl-surface); }
.sundial-cover-c .sundial-cover-title{ color:var(--sdl-ink); }
.sundial-book-desc{ color:var(--sdl-ink-soft); font-size:var(--wp--preset--font-size--small); margin:.8em 0 .3em; }
.sundial-book-link{ font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); margin:0; }

/* Start here */
.sundial-steps{ counter-reset:sundial-s; gap:var(--wp--preset--spacing--30); }
.sundial-step{ counter-increment:sundial-s; padding:var(--wp--preset--spacing--40); border:1px solid var(--sdl-line); border-radius:var(--wp--custom--radius--base); }
.sundial-step::before{ content:"Step " counter(sundial-s); display:block; font-family:var(--sundial-ui); font-size:.75rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--sdl-accent-ink); margin-bottom:.5rem; }
.sundial-step h3{ font-size:var(--wp--preset--font-size--medium); margin:0 0 .3em; }
.sundial-step h3 a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-step p{ margin:0; font-size:var(--wp--preset--font-size--small); }

/* Article cards (blog, topics, search) */
.sundial-chips ul, ul.sundial-chips{ list-style:none; padding:0; margin:var(--wp--preset--spacing--30) 0 0; display:flex; flex-wrap:wrap; gap:.5rem; }
.sundial-chips li a{ display:inline-flex; align-items:center; min-height:44px; padding:0 .9rem; border:1px solid var(--sdl-line); border-radius:999px; color:var(--sdl-ink); text-decoration:none; font-size:var(--wp--preset--font-size--small); }
.sundial-chips li a:hover{ border-color:var(--sdl-accent); color:var(--sdl-accent-ink); }
.sundial-cards{ gap:var(--wp--preset--spacing--40); }
.sundial-card{ height:100%; padding-top:var(--wp--preset--spacing--30); border-top:2px solid var(--sdl-ink); }
.sundial-card .sundial-card-title{ font-size:var(--wp--preset--font-size--medium); margin:.35em 0; line-height:1.25; }
.sundial-card .sundial-card-title a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-card .sundial-card-title a:hover{ color:var(--sdl-accent-ink); }
.sundial-card .wp-block-post-excerpt{ color:var(--sdl-ink-soft); font-size:var(--wp--preset--font-size--small); }
.sundial-card .wp-block-post-excerpt__excerpt{ margin:0; }

/* Article */
.sundial-article-head .wp-block-post-title{ margin:.25em 0 .3em; }
.sundial-byline{ gap:.35rem .5rem; font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); color:var(--sdl-ink-soft); padding-block:var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); border-bottom:1px solid var(--sdl-line); }
.sundial-byline > *{ margin:0; }
.sundial-byline a{ color:var(--sdl-ink); }
.sundial-updated-label{ margin:0; }
.sundial-byline .wp-block-post-author-name::after{ content:"·"; margin-left:.5rem; color:var(--sdl-line); }
.sundial-body{ font-size:calc(var(--wp--preset--font-size--base) * 1.05); line-height:1.75; }
.sundial-body h2{ margin-top:1.8em; }
.sundial-takeaways{ border-left:3px solid var(--sdl-accent); background:var(--sundial-card); border-radius:0 var(--wp--custom--radius--base) var(--wp--custom--radius--base) 0; }
.wp-block-quote.is-style-pull{ border:0; padding:0; margin-block:var(--wp--preset--spacing--50); font-family:var(--wp--custom--font-display); font-weight:var(--sundial-hw); font-size:var(--wp--preset--font-size--x-large); line-height:1.3; color:var(--sdl-accent-ink); }
.wp-block-quote.is-style-pull p{ max-width:none; }
.wp-block-quote cite{ display:block; font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); font-style:normal; color:var(--sdl-ink-soft); }
.sundial-part-of{ gap:.6rem; padding-block:var(--wp--preset--spacing--30); border-block:1px solid var(--sdl-line); }
.sundial-part-of .wp-block-post-terms a{ color:var(--sdl-ink); font-weight:600; }
.sundial-siblings{ gap:var(--wp--preset--spacing--30); margin-top:var(--wp--preset--spacing--20); }
.sundial-sibling{ font-size:var(--wp--preset--font-size--base); margin:0; height:100%; }
.sundial-sibling a{ display:block; height:100%; padding:var(--wp--preset--spacing--30); border:1px solid var(--sdl-line); border-radius:var(--wp--custom--radius--base); color:var(--sdl-ink); text-decoration:none; line-height:1.3; }
.sundial-sibling a:hover{ border-color:var(--sdl-accent); }
.sundial-author-card{ padding:var(--wp--preset--spacing--40); background:var(--sundial-card); border-radius:var(--wp--custom--radius--base); border-top:0; }
.sundial-author-card .wp-block-avatar img{ border-radius:50%; }
.sundial-author-intro{ gap:var(--wp--preset--spacing--40); }
.sundial-author-intro .wp-block-avatar img{ border-radius:50%; }

/* Pillar */
.sundial-pillar-meta{ gap:.3rem .9rem; font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); color:var(--sdl-ink-soft); }
.sundial-pillar-meta > *{ margin:0; }
.sundial-pillar-meta .sundial-count{ font-size:inherit; margin:0; }
.sundial-pillar-list{ counter-reset:sundial-p; }
.sundial-pillar-list > li{ margin:0; counter-increment:sundial-p; display:grid; grid-template-columns:2.6rem 1fr; padding-block:var(--wp--preset--spacing--30); border-top:1px solid var(--sdl-line); }
.sundial-pillar-list > li::before{ content:counter(sundial-p, decimal-leading-zero); font-family:var(--wp--custom--font-display); font-weight:var(--sundial-hw); color:var(--sdl-accent-ink); }
.sundial-pillar-item .wp-block-post-title{ font-size:var(--wp--preset--font-size--medium); margin:0 0 .2em; }
.sundial-pillar-item .wp-block-post-title a{ color:var(--sdl-ink); text-decoration:none; }
.sundial-pillar-item .wp-block-post-excerpt{ margin-top:.2em;  color:var(--sdl-ink-soft); font-size:var(--wp--preset--font-size--small); }
.sundial-pillar-item .wp-block-post-excerpt__excerpt{ margin:0; }

/* Group styles */
.wp-block-group.is-style-panel{ padding:var(--wp--preset--spacing--40); border:1px solid var(--sdl-line); border-radius:var(--wp--custom--radius--base); }
.wp-block-group.is-style-band{ padding:var(--wp--preset--spacing--50); background:var(--sdl-accent-soft); border-radius:var(--wp--custom--radius--base); }

/* Footer */
.sundial-footer{ border-top:1px solid var(--sdl-line); color:var(--sdl-ink-soft); font-family:var(--sundial-ui); font-size:var(--wp--preset--font-size--small); }
.sundial-footer .wp-block-site-title{ font-family:var(--wp--custom--font-display); font-weight:var(--sundial-hw); font-size:var(--wp--preset--font-size--medium); color:var(--sdl-ink); margin:0; }
.sundial-footer-tagline{ margin:.3em 0 0; max-width:28rem; }
.sundial-footer-nav a{ color:var(--sdl-ink-soft); text-decoration:none; }
.sundial-footer-nav a:hover{ color:var(--sdl-ink); }
.sundial-footer-nav .wp-block-navigation-item__content{ min-height:44px; display:inline-flex; align-items:center; }
.sundial-credit{ margin:var(--wp--preset--spacing--40) 0 0; }
.sundial-credit a{ color:inherit; }
.wp-block-search__input{ min-height:44px; }
