/* Section page: shared shell */
.section-page-shell { width: min(1120px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; }
.section-page-header { display: flex; align-items: center; justify-content: space-between; min-height: 88px; border-bottom: 1px solid var(--line); }
.section-page-back { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; font-weight: 700; }
.section-page-back:first-letter { color: var(--accent); }
.section-page-index, .section-page-eyebrow, .section-page-footer { color: var(--muted); font: 14px var(--mono); }
.section-page-theme { display: grid; place-items: center; width: 38px; height: 38px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 18px; }
.section-page-theme:hover { color: var(--surface); background: var(--dark); }
.section-page-main { min-width: 0; min-height: calc(100vh - 160px); padding: 64px 0 60px; }
.section-page-eyebrow { margin: 0 0 18px; color: var(--accent); }
.section-page-home { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; color: var(--text); font-size: 16px; font-weight: 700; }
.section-page-home:hover { color: var(--accent); }
.section-page-footer { display: flex; justify-content: space-between; gap: 18px; padding: 18px 0 24px; border-top: 1px solid var(--line); }
.note-dialog { width: min(760px, calc(100% - 30px)); max-height: 82vh; padding: 38px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 100px rgba(0,0,0,.24); }
.note-dialog::backdrop { background: rgba(18,30,40,.48); backdrop-filter: blur(3px); }.note-dialog h2 { margin: 8px 42px 12px 0; font-size: 34px; }.note-dialog-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; }.note-dialog-summary { color: var(--muted); font-size: 16px; line-height: 1.6; }.note-dialog-content { padding-top: 22px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.9; }

/* Hero zone: each section gets its own ornament + composition */
.section-page-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: end; gap: 40px; padding: 24px 0 42px; }
.section-page-hero-copy { max-width: 720px; }
.section-page-hero-label { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font: 14px var(--mono); letter-spacing: .1em; }
.section-page-hero-label::before { width: 26px; height: 1px; background: currentColor; content: ''; }
.section-page-hero h1 { max-width: 760px; margin: 12px 0 14px; font-size: clamp(44px, 6vw, 76px); line-height: 1.08; letter-spacing: 0; }
.section-page-hero p { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.page-ornament { position: relative; display: grid; min-height: 150px; place-items: center; overflow: hidden; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 62%, transparent); }

/* Software: tool tile */
.software-ornament { font: 700 46px var(--display); }
.software-ornament span { position: relative; z-index: 1; }
.software-ornament i { position: absolute; width: 64px; height: 64px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 12px 3px 12px 3px; transform: rotate(12deg); }
.software-ornament i:nth-child(2) { top: 20px; left: 18%; }
.software-ornament i:nth-child(3) { right: 16%; bottom: 12px; width: 86px; height: 86px; transform: rotate(-8deg); }
.software-ornament i:nth-child(4) { inset: auto auto -34px -26px; width: 130px; height: 130px; opacity: .35; }
.software-ornament span { text-shadow: 6px 6px 0 color-mix(in srgb, var(--accent-2) 65%, transparent); }

/* Games: deck stack */
.games-ornament { display: flex; align-items: center; justify-content: center; }
.deck-card { display: grid; width: 74px; height: 104px; place-items: center; background: var(--surface); border: 2px solid var(--text); border-radius: 7px; box-shadow: 6px 6px 0 color-mix(in srgb, var(--accent-2) 70%, transparent); }
.deck-card.back { background: repeating-linear-gradient(45deg, var(--text) 0 7px, transparent 7px 14px); opacity: .18; }
.deck-card.back.mid { position: relative; margin-left: -30px; transform: rotate(7deg); opacity: .34; }
.deck-card.front { margin-left: -30px; color: var(--accent); font: 700 44px Georgia, serif; }

/* Notes: paper stack */
.notes-ornament { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; padding: 34px; }
.paper-line { height: 9px; background: color-mix(in srgb, var(--accent-2) 62%, transparent); border-radius: 9px; }
.paper-line.short { width: 58%; }

/* Links: browser chrome */
.links-ornament { display: flex; align-items: center; justify-content: center; gap: 13px; }
.links-ornament i { width: 58px; height: 74px; border: 2px solid var(--line); border-radius: 8px 8px 3px 3px; background: var(--surface); transform: rotate(-8deg); }
.links-ornament i:nth-child(2) { transform: rotate(3deg) translateY(-8px); }
.links-ornament i:nth-child(3) { transform: rotate(12deg) translateY(-14px); }
.links-ornament b { position: absolute; right: 18%; top: 16px; color: var(--accent); font: 700 30px var(--mono); }
.more-ornament { color: var(--surface); background: var(--dark); font: 700 84px var(--display); }

/* Section-specific grid composition */
.section-page-grid { display: grid; min-width: 0; gap: 14px; }
.section-page-main-software .section-page-grid { grid-template-columns: 1fr 1fr; }
.section-page-main-games .section-page-grid { grid-template-columns: 1fr 1fr; }
.section-page-main-notes .section-page-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.section-page-main-links .section-page-grid { grid-template-columns: 1fr 1fr; }
.section-page-main-links .section-page-grid { grid-template-columns: 1fr; }
.section-page-main-links .section-page-hero { grid-template-columns: 1fr; padding-bottom: 26px; }
.section-page-main-links .links-ornament { display: none; }
.links-board { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 32px; min-width: 0; }
.links-category-panel { align-self: start; padding-top: 4px; }
.links-category-kicker { margin: 0 0 14px; color: var(--accent); font: 12px var(--mono); letter-spacing: .12em; }
.links-category-list { display: grid; gap: 8px; }
.links-category-list button { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; color: var(--muted); background: color-mix(in srgb, var(--surface) 58%, transparent); border: 1px solid var(--line); border-radius: 4px; font: 14px var(--home-body-font, var(--sans)); text-align: left; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.links-category-list button span { color: var(--muted); font: 12px var(--mono); }
.links-category-list button:hover, .links-category-list button.is-active { color: var(--surface); background: var(--dark); border-color: var(--dark); transform: translateX(4px); }
.links-category-list button.is-active span, .links-category-list button:hover span { color: var(--accent-2); }
.links-results { min-width: 0; }
.links-results-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.links-results-head p { margin: 0 0 6px; color: var(--accent); font: 12px var(--mono); letter-spacing: .1em; }
.links-results-head h2 { margin: 0; color: var(--text); font: 600 30px/1.2 var(--display); }
.links-results-head > span { color: var(--muted); font: 12px var(--mono); }
.links-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.link-module { position: relative; display: flex; min-width: 0; min-height: 122px; align-items: center; gap: 15px; padding: 16px 42px 16px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 13px 5px 13px 5px; box-shadow: 0 12px 28px rgba(0,0,0,.08); transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.link-module:hover { background: color-mix(in srgb, var(--surface) 78%, var(--accent-2)); border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.link-module-thumb { display: grid; width: 68px; height: 68px; flex: 0 0 68px; place-items: center; overflow: hidden; color: var(--surface); background: var(--accent); border: 1px solid color-mix(in srgb, var(--dark) 28%, transparent); border-radius: 9px 3px 9px 3px; font: 600 25px var(--display); }
.link-module-thumb img { width: 100%; height: 100%; object-fit: cover; }
.link-module-body { min-width: 0; }
.link-module-body small { display: block; overflow: hidden; color: var(--accent); font: 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.link-module-body strong { display: block; margin: 5px 0 5px; overflow: hidden; font: 600 20px/1.2 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.link-module-body p { display: -webkit-box; max-width: 100%; margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.link-module-index { position: absolute; top: 12px; right: 14px; color: var(--muted); font: 12px var(--mono); }
.link-module-arrow { position: absolute; right: 14px; bottom: 12px; color: var(--accent); font-size: 18px; }
.links-empty { grid-column: 1 / -1; min-height: 150px; display: grid; place-content: center; padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; }
.links-empty strong { font-size: 18px; }.links-empty p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.section-page-main-more .section-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-page-card { position: relative; display: block; min-width: 0; min-height: 170px; padding: 22px 22px 58px; overflow: hidden; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.section-page-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-4px); }
.section-page-card.is-featured { min-height: 220px; color: var(--surface); background: var(--dark); border-color: var(--dark); }
.section-page-card.is-featured p, .section-page-card.is-featured .section-page-card-meta { color: color-mix(in srgb, var(--surface) 72%, transparent); }
.section-page-card.is-featured .section-page-card-number, .section-page-card.is-featured .section-page-card-action { color: var(--accent-2); }
.section-page-card-number { color: var(--accent); font: 14px var(--mono); }
.section-page-card-badge { position: absolute; top: 18px; left: 22px; padding: 4px 8px; color: var(--surface); background: var(--accent); border-radius: 3px; font: 14px var(--mono); letter-spacing: .08em; }
.section-page-card strong { display: block; min-width: 0; margin: 18px 0 8px; font: 600 22px/1.3 var(--display); }
.section-page-card p { max-width: 90%; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.section-page-card-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; color: var(--muted); font: 14px var(--mono); }
.section-page-card-action { position: absolute; right: 20px; bottom: 19px; color: var(--accent); font-size: 14px; font-weight: 700; }
.section-page-card-action b { margin-left: 5px; font-size: 17px; font-weight: 400; }
.card-mark { display: grid; width: 42px; height: 42px; place-items: center; color: var(--surface); background: var(--accent); border-radius: 9px 3px 9px 3px; font: 700 18px var(--display); }
.card-mark.game-mark { color: var(--dark); background: var(--accent-2); border-radius: 50%; font-size: 21px; }
.is-featured .card-mark { color: var(--dark); background: var(--accent-2); }
.section-page-card.is-disabled { cursor: not-allowed; opacity: .62; }
.section-page-card.is-disabled:hover { border-color: var(--line); box-shadow: none; transform: none; }
.section-empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-content: center; padding: 30px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.section-empty strong { font-size: 20px; }.section-empty p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Links board header */
.browser-bar { display: flex; grid-column: 1 / -1; min-width: 0; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; font: 14px var(--mono); }
.browser-dots { display: flex; gap: 5px; }.browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }.browser-dots i:nth-child(2) { background: var(--accent-2); }.browser-dots i:nth-child(3) { background: var(--muted); }
.browser-address { flex: 1; min-width: 0; max-width: 100%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.browser-sync { color: var(--accent); }

/* Games status strip */
.games-status { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; padding: 13px 16px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font: 14px var(--mono); }
.games-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); animation: gamesPulse 1.6s ease-in-out infinite; }
@keyframes gamesPulse { 0%, 100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }


/* Per-type card personalities */
.section-page-main-software .section-page-card { border-top: 3px solid var(--accent); }
.section-page-main-software .section-page-card.is-featured { border-top-color: var(--accent-2); }
.section-page-main-software .section-page-card::after { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 50%; content: ''; opacity: .6; }
.section-page-main-games .section-page-card { border: 2px solid var(--line); box-shadow: 6px 6px 0 color-mix(in srgb, var(--accent-2) 46%, transparent); }
.section-page-main-games .section-page-card::after { position: absolute; right: 16px; top: 15px; color: color-mix(in srgb, var(--accent) 55%, transparent); content: '♣ ♠'; font: 700 13px Georgia, serif; letter-spacing: 5px; }
.section-page-main-games .section-page-card.is-featured { box-shadow: 8px 8px 0 color-mix(in srgb, var(--accent-2) 70%, transparent); }
.section-page-main-notes .section-page-card { border-left: 4px solid var(--accent-2); border-radius: var(--radius); }
.section-page-main-notes .section-page-card.is-featured { border-left-color: var(--accent); }
.section-page-main-notes .section-page-card-number::after { content: ' →'; color: var(--muted); }
.section-page-main-links .section-page-card { border-radius: 4px 14px 4px 14px; }
.section-page-main-links .section-page-card::after { position: absolute; right: -1px; top: 14px; width: 12px; height: 24px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--accent-2) 42%, transparent); content: ''; }
.section-page-main-more .section-page-card { min-height: 150px; }

/* Theme touches */
body.theme-terminal .section-page-header { border-bottom-color: var(--accent); }
body.theme-terminal .section-page-card { border-radius: 2px; }
body.theme-terminal .section-page-main-software .section-page-card { background: var(--surface); }
body.theme-swiss .section-page-hero h1 { font-family: 'DM Sans', Arial, sans-serif; font-weight: 700; }
body.theme-swiss .section-page-card { border-radius: 0; box-shadow: none; }
body.theme-night .section-page-card { box-shadow: 0 18px 45px rgba(0, 0, 0, .18); }
body.theme-garden .section-page-card { border-radius: 16px; }
body.theme-glass .section-page-header, body.theme-glass .section-page-card, body.theme-glass .page-ornament, body.theme-glass .browser-bar, body.theme-glass .games-status { background: rgba(255,255,255,.48); border-color: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
body.theme-glass .section-page-card.is-featured { background: rgba(28,49,71,.86); border-color: rgba(255,255,255,.5); }
body.theme-glass .section-page-card.is-featured p, body.theme-glass .section-page-card.is-featured .section-page-card-meta { color: rgba(255,255,255,.72); }
body.theme-candy .section-page-card { border-radius: 22px; box-shadow: 0 10px 0 rgba(230,80,112,.12); }
body.theme-candy .card-mark, body.theme-candy .section-page-card-badge { border-radius: 50%; }
body.theme-oriental .section-page-main { max-width: 880px; margin: 0 auto; }
body.theme-oriental .section-page-hero { grid-template-columns: minmax(0, 1fr) 280px; }
body.theme-oriental .section-page-card { border-radius: 0; }

@media (max-width: 760px) {
  .section-page-main-links { width: min(100%, calc(100vw - 24px)) !important; max-width: calc(100vw - 24px); overflow-x: hidden; }
  .section-page-main-links .links-board, .section-page-main-links .links-results, .section-page-main-links .links-card-grid { width: 100%; max-width: 100%; min-width: 0; }
  .section-page-main-links .link-module { width: 100%; max-width: 100%; min-width: 0; }
  .section-page-shell { width: calc(100% - 24px); }
  .section-page-main { padding-top: 46px; }
  .section-page-hero { grid-template-columns: 1fr; gap: 22px; padding: 10px 0 28px; }
  .page-ornament { min-height: 120px; }
  .section-page-main-software .section-page-grid, .section-page-main-games .section-page-grid, .section-page-main-links .section-page-grid, .section-page-main-more .section-page-grid { grid-template-columns: 1fr; }
  .section-page-main-notes .section-page-grid { grid-template-columns: 1fr; }
  .section-page-card.is-featured { min-height: 200px; }
  .section-page-footer { align-items: flex-start; flex-direction: column; }
  .note-dialog { padding: 26px 22px; }.note-dialog h2 { font-size: 28px; }
  .browser-bar, .games-status { border-radius: 10px; }
  .links-board { grid-template-columns: 1fr; gap: 24px; }
  .links-category-panel { padding-top: 0; }
  .links-category-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
  .links-category-list button { min-width: max-content; min-height: 38px; }
  .links-category-list button:hover, .links-category-list button.is-active { transform: none; }
  .links-results-head h2 { font-size: 27px; }
  .links-card-grid { grid-template-columns: 1fr; }
  .link-module { min-height: 108px; }
}

.article-rich-content p { margin: 0 0 1em; }
.article-rich-content h2, .article-rich-content h3 { margin: 1.3em 0 .55em; line-height: 1.35; }
.article-rich-content blockquote { margin: 1em 0; padding: 10px 16px; color: var(--muted); border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.article-rich-content ul, .article-rich-content ol { padding-left: 1.5em; }
.article-rich-content img { display: block; max-width: 100%; height: auto; margin: 16px 0; border-radius: 7px; }
.article-dialog-download { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.article-dialog-download a { display: inline-flex; min-height: 42px; align-items: center; padding: 0 16px; color: var(--surface); background: var(--accent); border-radius: 5px; font-weight: 700; }
