/* A quiet reading room, with two mathematical illustrations at its entrance. */
.ui-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; flex-shrink: 0; }
.resources-landing { background: var(--site-paper); }
.resources-landing .container { max-width: 67rem; }
.resources-landing .nav-main { margin-bottom: 3.3rem; }
.resources-heading { margin-bottom: 2.5rem; }
.resources-heading h1 { margin: 0; color: var(--site-blue); font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -.035em; }
.resource-eyebrow { margin: 0 0 .65rem; color: var(--site-muted); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; }
.resource-portals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.resource-portal { display: block; padding: 1.4rem 0 0; border-top: 1px solid var(--site-rule); color: var(--site-ink); }
.resource-portal:hover, .resource-portal:focus { text-decoration: none; }
.portal-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portal-heading h2 { margin: 0; color: var(--site-blue); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.025em; }
.portal-arrow { font-size: 1.6rem; color: var(--site-link); transition: transform .2s ease; }
.resource-portal:hover .portal-arrow { transform: translateX(5px); }
.portal-topics { margin: .5rem 0 1.2rem; color: var(--site-muted); font-size: .85rem; }
.portal-figure { margin: 0; }
/* Illustration grounds and canvas ink both follow the selected theme. */
.portal-art { position: relative; overflow: hidden; aspect-ratio: 1.3; background: #f0f4f7; border: 1px solid #e3e9ee; border-radius: 3px; }
.portal-gl .portal-art { background: #f6f3ee; border-color: #ede6dc; }
:root[data-theme="dark"] .portal-art { background: #202732; border-color: var(--site-rule); }
:root[data-theme="dark"] .portal-gl .portal-art { background: #28262a; }
:root[data-theme="dark"] .portal-art img { filter: brightness(2); }
.portal-art img, .portal-art canvas { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; }
.portal-art canvas { position: absolute; inset: 0; }
.portal-art img[hidden], .resources-motion[hidden] { display: none; }
.portal-figure figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .9rem 0; color: var(--site-muted); font-size: .78rem; }
.portal-figure figcaption span:last-child { font-family: Georgia, serif; font-style: italic; white-space: nowrap; color: var(--site-muted); }
.resources-motion { display: flex; justify-content: flex-end; margin: 1.5rem 0 3rem; }
.resources-motion button { padding: .4rem 0; background: none; border: 0; border-bottom: 1px solid var(--site-rule); color: var(--site-muted); font-size: .78rem; cursor: pointer; }
.resources-landing a:focus-visible, .resources-landing button:not(.theme-toggle):focus-visible, .resource-guide a:focus-visible { outline: 2px solid var(--site-link); outline-offset: 5px; border-radius: 2px; }

.resource-guide .container { max-width: 62rem; }
.resource-guide .nav-main { margin-bottom: 2.5rem; }
.resource-breadcrumb { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.7rem; font-size: .85rem; color: var(--site-muted); }
.guide-header { max-width: 43rem; margin-bottom: 2.4rem; }
.guide-header h1 { margin: 0 0 .8rem; color: var(--site-blue); font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -.035em; }
.guide-header p { max-width: 39rem; color: var(--site-muted); line-height: 1.7; }
.guide-layout { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); align-items: start; gap: 3rem; }
.guide-toc { position: sticky; top: 1.5rem; padding-top: .2rem; font-size: .86rem; }
.guide-toc h2 { margin: 0 0 .8rem; color: var(--site-muted); font-size: .7rem; font-weight: 400; letter-spacing: .13em; text-transform: uppercase; }
.guide-toc ol { padding: 0; margin: 0; list-style: none; }
.guide-toc li { margin: 0 0 .3rem; }
.guide-toc a { display: block; padding: .35rem 0; color: var(--site-muted); }
.guide-toc a:hover { color: var(--site-blue); }
.guide-toc .other-guide { display: block; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--site-rule); }
.guide-body { min-width: 0; }
.guide-body a { color: var(--site-link); }
.reading-start { padding: 1.3rem 1.5rem; border-left: 2px solid var(--site-rule); background: var(--site-panel); margin-bottom: 2.7rem; }
.reading-start h2 { margin: 0 0 .6rem; font-size: 1.15rem; color: var(--site-blue); }
.reading-start p { margin-bottom: .75rem; font-size: .95rem; }
.reading-start p:last-child { margin-bottom: 0; }
.reading-start .prerequisites { color: var(--site-muted); font-size: .85rem; }
.guide-section { margin-bottom: 2.8rem; scroll-margin-top: 1.5rem; }
.guide-section > h2 { display: flex; gap: .75rem; margin: 0 0 .85rem; padding-top: 1.2rem; border-top: 1px solid var(--site-rule); color: var(--site-blue); font-size: 1.4rem; font-weight: 600; }
.section-number { padding-top: .25rem; color: var(--site-muted); font-size: .75rem; letter-spacing: .05em; }
.section-intro { color: var(--site-muted); font-size: .94rem; line-height: 1.7; }
.reading-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.reading-entry { margin: 0 0 1.65rem; }
.reading-entry h3 { margin: 0 0 .25rem; font-size: 1.08rem; line-height: 1.4; font-weight: 700; }
.reading-entry h3 a { color: var(--site-blue); }
.reading-meta { margin: 0 0 .55rem; color: var(--site-muted); font-size: .85rem; line-height: 1.5; }
.reading-description { margin-bottom: .55rem; font-size: .96rem; line-height: 1.7; }
.reading-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; }
.reading-links a { color: var(--site-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--site-rule); }
.notes-downloads { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; list-style: none; padding: 0; margin: .9rem 0; }
.notes-downloads a { display: flex; justify-content: space-between; gap: .5rem; height: 100%; padding: .6rem .75rem; border: 1px solid var(--site-rule); font-size: .85rem; }
.notes-downloads span { color: var(--site-muted); font-size: .7rem; padding-top: .15rem; }
.research-connection { padding: 1rem 1.2rem; margin-top: 1.5rem; border-left: 2px solid var(--site-rule); background: var(--site-panel); }
.research-connection h3 { margin: 0 0 .5rem; font-size: 1rem; color: var(--site-blue); }
.research-connection p { margin-bottom: .7rem; font-size: .9rem; line-height: 1.7; }
.research-connection p:last-child { margin: 0; }
.guide-footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--site-rule); padding: 1.5rem 0 3rem; font-size: .85rem; }
.resource-guide .minimal-surface-background { opacity: .4; }
@media (max-width: 48rem) {
  .guide-layout { grid-template-columns: 1fr; gap: 1.7rem; }
  .guide-toc { position: static; padding-bottom: 1.2rem; border-bottom: 1px solid var(--site-rule); }
  .guide-toc ol { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
  .guide-toc a { padding: .35rem 0; }
  .guide-toc .other-guide { margin-top: .7rem; border: 0; padding-top: .3rem; }
  .resource-portals { gap: 1.7rem; }
}
@media (max-width: 38rem) {
  .resources-landing .nav-main { margin-bottom: 2.5rem; }
  .resources-heading { margin-bottom: 1.8rem; }
  .resource-portals { grid-template-columns: 1fr; gap: 2rem; }
  .resource-portal { padding-top: 1.1rem; }
  .portal-heading h2 { font-size: 1.55rem; }
  .portal-art { aspect-ratio: 1.3; }
  .portal-topics { margin-bottom: .85rem; }
  .guide-header { margin-bottom: 1.6rem; }
  .reading-start { padding: 1rem; }
  .notes-downloads { grid-template-columns: 1fr; }
  .guide-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .portal-arrow { transition: none; } }
@media print {
  :root[data-theme] .portal-art { background: #f0f4f7; border-color: #e3e9ee; }
  :root[data-theme] .portal-gl .portal-art { background: #f6f3ee; }
  .portal-art canvas { display: none; }
  .portal-art img[hidden] { display: block; }
  :root[data-theme] .portal-art img { filter: none; }
  .nav-main, .guide-toc, .resources-motion { display: none; }
  .guide-layout { display: block; }
  .resource-guide .container { max-width: none; }
  .reading-entry { break-inside: avoid; }
}
