/* The look pass (D-103, D-184), loaded after every other sheet. Titles take the title face, Rubik Mono One (fonts.css):
   covers, page titles, section titles, and the names of chapters, places and cards. It has one weight and draws
   capitals only, so titles stay short and take the title sizes (--t-title-*). Everything else is Manrope. */

/* Covers: the Hub's and Home's big names. */
body.wb-shell :is(.wh-hero-text h1, .wp-hero h1, .wp-hero-title, .wp-outline-title) {
  font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0;
}

/* Page and section titles: one per page, then the sections under it. */
body.wb-shell :is(.wl-sys-head h1, .wp-create h1, .wc-head h1, .wb-overview-heading h1, .wh-section-title h2,
  .wt-content-header .wt-header-title h2, .wt-collection-head > h2, .wt-settings-library > h2, .wt-ws-start h2, .wt-document-title,
  :is(.wb-settings-content, .wl-settings-section, .wt-bs) > h2) {
  font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0;
}
/* A note's own headings are the writer's, so they stay in the interface face (prose.css, notes.css). */

/* A folder page's title is the page's title, a step up from a section's. */
body.wb-shell .wt-collection-head > h2 { font-size: var(--t-title-page, 24px); line-height: 1.2; letter-spacing: 0; }
/* Its toolbar is one row of page controls at the shared height; a card is flat, drawn by its line. */
body.wb-shell .wt-collection-toolbar .wt-search { height: var(--wl-control, 36px); }
body.wb-shell .wt-collection-toolbar button.mod-cta { height: var(--wl-control, 36px); padding: 0 16px; }
body.wb-shell .wt-segment.wt-view-toggle { border-radius: var(--r-md, 10px); }
body.wb-shell .wt-segment.wt-view-toggle button.wt-icon-button { width: 30px; height: 30px; border-radius: var(--r-sm, 6px); }
body.wb-shell button.wt-entry-card { box-shadow: none; }
body.wb-shell .wt-entry-card .wt-portrait .wt-eyebrow { font-size: 10px; letter-spacing: .14em; }
/* Every card's picture is the same square, whether its name takes one line or two. */
body.wb-shell .wt-entry-grid:not(.is-list) .wt-entry-card .wt-portrait { flex-shrink: 0; }

/* Names that read as titles: Home's chapters, places and big cards, and anything marked as display. */
body.wb-shell :is(.wh-chapter-name h3, .wh-place-name, .wh-tile.is-large .wh-tile-caption strong, .wh-preview-title strong, .wl-display) {
  font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0; text-transform: none;
}
body.wb-shell .wh-type-number { font-family: var(--wl-font-title); font-weight: 400; }
/* Home's premise: one line in the title face; until it is written, its prompt is faint. */
body.wb-shell .wh-headline { font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0; }
body.wb-shell :is(.wh-headline.is-prompt, .wh-headline.wh-editable:empty::before) { color: var(--wl-text-3); font-weight: 400; }

/* System: each card's headline, each section's title and the numbers a roll needs. */
body.wb-shell :is(.wl-sys-card-value, .wl-sys-section-head h2, .wl-sys-odd strong, .wl-sys-scenario-name) { font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0; }
body.wb-shell .wl-sys-card-value { font-size: var(--t-title-section, 16px); line-height: 1.3; }
body.wb-shell .wl-sys-section-head h2 { font-size: var(--t-title-section, 16px); }
body.wb-shell .wl-sys-odd strong { font-size: 26px; font-weight: 400; line-height: 1.1; }

/* The Hub: its page titles, the name on each project and game card, and its empty pages' titles. */
/* Settings: a section's title is its page title, at the page-title size. */
body.wb-shell :is(.wl-settings-section, .wt-bs) > h2 { font-size: var(--t-title-page, 24px); font-weight: 400; letter-spacing: 0; }
body.wb-shell h2.wh-section-title { font-size: var(--t-title-section, 16px); }
body.wb-shell :is(h1, h2).wh-section-title, body.wb-shell .wp-soon-panel h1 {
  font-family: var(--wl-font-title); font-weight: 400; letter-spacing: 0;
}
body.wb-shell :is(.wp-card .wp-card-name, .wp-new-copy strong) { font-family: var(--wl-font-title); font-weight: 400; font-size: var(--t-title-section, 16px); letter-spacing: 0; }

/* Empty pages: our own drawing (shared/drawings.mjs) above the words, in the app's steel light, on a soft glow. */
body.wb-shell .wp-soon-panel { background: radial-gradient(60% 70% at 50% 30%, color-mix(in srgb, var(--wl-accent) 6%, transparent), transparent 70%), var(--background-secondary); }
body.wb-shell .wp-soon-art { display: block; width: 230px; max-width: 72%; margin: 0 auto 14px; color: color-mix(in srgb, var(--wl-accent) 82%, transparent); }
body.wb-shell .wl-drawing { display: block; width: 100%; height: auto; overflow: visible; }
body.wb-shell .wp-soon-panel h1 { font-size: var(--t-title-page, 24px); }

/* A file with no picture shows its drawn emblem (shared/emblem.mjs), which fills the frame like a picture;
   the old rings and initials are not drawn under it. */
body.wb-shell :is(.wh-picture, .wt-portrait).is-emblem::before, body.wb-shell :is(.wh-picture, .wt-portrait).is-emblem::after { content: none; display: none; }
body.wb-shell .wl-emblem-art { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
body.wb-shell .wt-portrait.is-emblem .wl-emblem-art { position: absolute; inset: 0; }
/* Where a card is a small square (a folder page's list, a pick list), it shows the small emblem. */
body.wb-shell .wt-portrait .wl-emblem-art.is-small, body.wb-shell :is(.wt-entry-grid.is-list, .wt-link-option) .wt-portrait .wl-emblem-art:not(.is-small) { display: none; }
body.wb-shell :is(.wt-entry-grid.is-list, .wt-link-option) .wt-portrait .wl-emblem-art.is-small { display: block; }
body.wb-shell .wt-entry-grid.is-list .wt-entry-card .wt-portrait-small { min-height: 44px; }
/* Home's "+12 more" tile: a frosted cover over whatever picture is under it, with the count as a title. */
body.wb-shell .wh-tile-more { background: color-mix(in srgb, var(--wl-bg) 62%, transparent); -webkit-backdrop-filter: blur(10px) saturate(.8); backdrop-filter: blur(10px) saturate(.8); font-family: var(--wl-font-title); font-size: var(--t-title-cover, 34px); font-weight: 400; letter-spacing: 0; }
body.wb-shell .wh-tile:has(.wh-tile-more) .wh-tile-caption { visibility: hidden; }

/* A file's edit form: its small actions are pills inside the page, like a card's. */
body.wb-shell .wt-picture-tools button { height: 32px; padding: 0 13px; border-radius: var(--r-pill, 999px); border: 1px solid var(--wl-line, var(--background-modifier-border)); background: transparent; box-shadow: none; font-size: 13px; }
body.wb-shell .wt-picture-tools button:hover { background: var(--wl-raised, var(--background-modifier-hover)); }
body.wb-shell .wt-surface .wt-ws-option-add { height: 32px; padding: 0 12px; border-radius: var(--r-pill, 999px); box-shadow: none; }
@media (pointer: coarse) { body.wb-shell .wt-picture-tools button { height: 40px; } }

/* ---- The one scale (polish pass, 2026-11-03) -------------------------------------------------
   Every page title is the title face at the page-title size (--t-title-page), whichever part draws it. */
body.wb-shell :is(.wb-ps > h2, .wb-vs-head h2, .wc-head h1) {
  font-family: var(--wl-font-title); font-weight: 400; font-size: var(--t-title-page, 24px); letter-spacing: 0; line-height: 1.2;
}
body.wb-shell .wb-vs-safety > h3 { font-family: var(--wl-font-title); font-weight: 400; font-size: var(--t-title-section, 16px); letter-spacing: 0; }

/* A field shows where typing goes: its line takes the selection colour (only where a page has not
   drawn its own focus). */
input:is(:not([type]), [type="text"], [type="search"], [type="number"], [type="email"], [type="url"], [type="password"]):focus, textarea:focus, select.dropdown:focus {
  border-color: color-mix(in srgb, var(--wl-selection) 70%, transparent);
}

/* A card's picture starts at its top edge, however tall the row it sits in (a button centres
   what it holds unless told not to). */
body.wb-shell button.wt-entry-card { justify-content: flex-start; align-items: stretch; }

/* The Hub's Import page: its fold-out opens with Lucide's chevron (ISC), turning as it opens, not
   the browser's triangle. */
body.wb-shell .wc-guide > summary { display: flex; align-items: center; gap: 8px; list-style: none; }
body.wb-shell .wc-guide > summary::-webkit-details-marker { display: none; }
body.wb-shell .wc-guide > summary::before {
  content: ''; flex: none; width: 14px; height: 14px; background-color: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--wl-quick) var(--wl-ease-out);
}
body.wb-shell .wc-guide[open] > summary::before { transform: rotate(90deg); }
