/*
Theme Name: Lurby Name Workshop
Description: A light-green naming workbench for founders, creators and fiction writers. Built for the shared local name generators and readable field notes.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Author: Lurby
Text Domain: lurby
License: GPL-2.0-or-later
*/

:root {
  --bg: #f2f5ef;
  --paper: #fff;
  --ink: #202c25;
  --leaf: #275b3a;
  --muted: #57655b;
  --line: #c4cfc3;
  --width: 1360px;
  --radius: 8px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.65 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
[hidden] { display: none !important; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
a:active { color: var(--ink); }
:where(a, button, input, select, textarea, summary, pre, [tabindex]):focus-visible { outline: 3px solid var(--leaf); outline-offset: 4px; }
:where(input, select, textarea):focus-visible { outline-offset: 2px; }
::selection { background: #dceacb; color: var(--ink); }
:where(h1, h2, h3, h4, p, ul, ol, pre) { margin-block: 0 1rem; }
:where(h1, h2, h3, h4) { line-height: 1.22; font-weight: 650; overflow-wrap: anywhere; text-wrap: pretty; }
h1 { font-size: clamp(1.85rem, 3.3vw, 2.85rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -.025em; }
h3 { font-size: 1.1rem; letter-spacing: -.015em; }
p, li, dd { overflow-wrap: anywhere; }
code { font: .9em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg); padding: .12em .35em; border-radius: 3px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
section, article, aside, nav, form { min-width: 0; scroll-margin-top: 24px; }
.page-shell, .header-inner, .footer-inner, .footer-baseline { width: min(calc(100% - clamp(24px, 5vw, 80px)), var(--width)); margin-inline: auto; }
.page-shell { padding-block: clamp(24px, 3.5vw, 48px) 64px; }
.skip-link { position: absolute; top: -120px; left: 12px; padding: 12px 20px; background: var(--paper); border: 2px solid var(--leaf); z-index: 100; }
.skip-link:focus { top: 12px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; min-height: 48px; color: var(--ink); }
.wordmark:hover strong { color: var(--leaf); }
.brand-mark { display: grid; place-items: center; position: relative; width: 44px; height: 46px; background: var(--leaf); border-radius: 8px 8px 2px 8px; color: var(--paper); font-size: 38px; font-weight: 700; line-height: 1; padding-bottom: 7px; letter-spacing: -.1em; }
.brand-mark span { position: absolute; bottom: 8px; right: 10px; font-size: 30px; }
.wordmark strong { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 750; letter-spacing: -.055em; }
.wordmark small { display: block; margin-top: 4px; font-size: .62rem; letter-spacing: .16em; font-weight: 650; }
.global-nav { display: flex; flex-wrap: wrap; gap: 4px clamp(12px, 2vw, 28px); }
.global-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--muted); font-size: .875rem; font-weight: 600; border-bottom: 2px solid transparent; }
.global-nav a:hover { color: var(--leaf); border-bottom-color: var(--leaf); }
.global-nav a:active { background: var(--bg); }
.eyebrow { font-size: .68rem; font-weight: 750; letter-spacing: .12em; line-height: 1.6; color: var(--muted); }
.workshop-intro { margin-bottom: 30px; }
.workshop-intro .eyebrow { margin-bottom: 12px; }
.workshop-intro h1 { margin-bottom: 12px; }
.intro-copy { max-width: 75ch; font-size: clamp(.95rem, 1.2vw, 1.05rem); color: var(--muted); margin-bottom: 0; }
.file-workshop > .tool-workspace { margin-block: 0; }
.tool-workspace { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 14px clamp(16px, 2.4vw, 32px); background: var(--bg); border-bottom: 1px solid var(--line); }
.local-indicator { font-size: .75rem; color: var(--leaf); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.task-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); padding: 0 clamp(8px, 1.2vw, 16px); }
.task-tabs a { min-height: 58px; display: flex; flex: 1 1 140px; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 650; border-bottom: 3px solid transparent; }
.task-tabs a > span { font-size: 1rem; font-weight: 500; }
.task-tabs a:hover { color: var(--leaf); background: var(--bg); }
.task-tabs a[aria-current] { color: var(--leaf); background: var(--bg); border-bottom-color: var(--leaf); }
.task-tabs a:active { background: #dce7d8; }
.generator-panel { padding: clamp(18px, 2.4vw, 32px); border-bottom: 1px solid var(--line); margin-block: 0 !important; }
.generator-panel .panel-kicker { margin: 0 0 6px; color: var(--leaf); font-size: .66rem; font-weight: 750; letter-spacing: .11em; }
.generator-panel h2 { margin: 0 0 10px; }
.panel-description { margin: 0 0 20px; max-width: 85ch; font-size: .925rem; color: var(--muted); }

/* The trusted runtime owns the form and its behavior. These rules only present it. */
.lurby-site .autosite-tool { --ast-accent: var(--leaf); --ast-border: var(--line); margin: 0; padding: 0; border: 0; border-radius: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; background: var(--paper); }
.lurby-site .autosite-tool > h2 { display: none; }
.lurby-site .autosite-tool .ast-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--leaf); background: var(--bg); font-size: .78rem; color: var(--muted); }
.lurby-site .autosite-tool .ast-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 0 0; margin: 0; align-content: start; }
.lurby-site .autosite-tool .ast-form > div { min-width: 0; }
.lurby-site .autosite-tool label { display: block; margin: 0 0 6px; font-size: .8rem; font-weight: 650; line-height: 1.5; }
.lurby-site .autosite-tool :is(input:not([type=checkbox]), select, textarea) { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #849486; border-radius: 6px; background: var(--paper); color: var(--ink); font-size: .925rem; }
.lurby-site .autosite-tool :is(input, select, textarea):hover:not(:disabled) { border-color: var(--leaf); }
.lurby-site .autosite-tool :is(input, select, textarea):disabled { cursor: not-allowed; background: var(--bg); color: var(--muted); }
.lurby-site .autosite-tool :is(input, select, textarea)[aria-invalid=true], .lurby-site .autosite-tool :is(input, select, textarea):user-invalid { border-color: #a12820; outline: 2px solid #a12820; outline-offset: 1px; }
.lurby-site .autosite-tool input[type=checkbox] { width: 44px; height: 44px; min-height: 44px; accent-color: var(--leaf); cursor: pointer; margin: 0; }
.lurby-site .autosite-tool button, .button-link { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 46px; margin: 0; padding: 10px 14px; border: 1px solid var(--leaf); border-radius: var(--radius); color: var(--leaf); background: var(--paper); font: 650 .85rem/1.5 ui-sans-serif, system-ui, sans-serif; cursor: pointer; text-decoration: none; overflow-wrap: anywhere; }
.lurby-site .autosite-tool button[type=submit], .button-link { grid-column: 1 / -1; background: var(--leaf); color: var(--paper); margin-top: 4px; }
.lurby-site .autosite-tool button:hover:not(:disabled), .button-link:hover { background: var(--bg); box-shadow: inset 0 0 0 1px var(--leaf); }
.lurby-site .autosite-tool button[type=submit]:hover:not(:disabled), .button-link:hover { background: #1b452b; color: var(--paper); }
.lurby-site .autosite-tool button:active:not(:disabled), .button-link:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px currentColor; }
.lurby-site .autosite-tool button:disabled { opacity: 1; color: #657064; background: var(--bg); border-color: var(--line); cursor: not-allowed; box-shadow: none; }
.lurby-site .autosite-tool .ast-limits { margin: 0; font-size: .75rem; color: var(--muted); line-height: 1.6; }
.lurby-site .autosite-tool .ast-status { margin: 10px 0 0; min-height: 72px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; font-size: .85rem; color: var(--ink); }
.lurby-site .autosite-tool .ast-status::before { content: "CANDIDATE LIST"; display: block; margin-bottom: 4px; font-weight: 750; font-size: .65rem; letter-spacing: .12em; color: var(--leaf); }
.lurby-site .autosite-tool .ast-result { margin: -12px 0 0; padding: clamp(16px, 2vw, 24px); min-height: 250px; max-height: 550px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--bg); font-family: inherit; font-size: clamp(1.05rem, 1.65vw, 1.4rem); line-height: 2.05; overflow: auto; overscroll-behavior: contain; tab-size: 2; }
.lurby-site .autosite-tool .ast-result:empty::before { content: "Your candidates will appear here.\a Run a small batch to begin."; white-space: pre-wrap; display: block; color: var(--muted); font-size: .925rem; line-height: 1.8; }
.lurby-site .autosite-tool .ast-downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.lurby-site .autosite-tool .ast-downloads:empty { display: none; }
.tool-help { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: .825rem; color: var(--muted); }
.tool-help > p { margin-bottom: 12px; }
details { min-width: 0; }
summary { min-height: 44px; padding: 11px 4px; cursor: pointer; color: var(--ink); font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
summary:hover { color: var(--leaf); background: var(--bg); }
summary:active { background: #dce7d8; }
details[open] > summary { color: var(--leaf); }
.tool-help details { border-top: 1px solid var(--line); }
.tool-help details p { max-width: 85ch; margin: 0; padding: 0 4px 16px; }
.workbench-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 16px clamp(16px, 2.4vw, 32px); color: var(--muted); font-size: .75rem; }
.workbench-foot p { margin: 0; max-width: 75ch; }
.runtime-notice { margin: 20px; padding: 16px; border: 2px solid #a12820; border-radius: var(--radius); font-size: .9rem; }
.runtime-notice p { margin: 8px 0 0; }

.file-workshop > .workshop-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: clamp(36px, 5vw, 64px); }
.workshop-bottom > * { min-width: 0; margin-block: 0; }
.latest-guides > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; max-width: 65ch; }
.guide-row { padding-block: 22px; border-top: 1px solid var(--line); }
.guide-row h3, .guide-row h2 { max-width: 55ch; margin: 8px 0; }
.guide-row h3 a, .guide-row h2 a { color: var(--ink); text-decoration: none; }
.guide-row h3 a:hover, .guide-row h2 a:hover { color: var(--leaf); text-decoration: underline; }
.guide-row p { margin: 0 0 6px; color: var(--muted); font-size: .9rem; max-width: 65ch; }
.guide-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; color: var(--muted); font-size: .7rem; }
.guide-meta > span { color: var(--leaf); font-weight: 650; }
.text-link { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; font-size: .8rem; font-weight: 650; }
.guide-empty { padding: 24px 0 16px; border-block: 1px solid var(--line); }
.guide-empty p { color: var(--muted); font-size: .9rem; }
.guide-filter { margin-top: 16px; border-top: 1px solid var(--line); }
.guide-filter summary { font-size: .825rem; }
.guide-filter nav { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-block: 8px; }
.guide-filter a { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; }
.guide-filter a[aria-current] { font-weight: 750; text-decoration-thickness: 3px; }
.tool-directory { padding: 24px; background: #e7eee2; border-radius: var(--radius); }
.directory-list { list-style: none; padding: 0; margin: 20px 0 0; }
.directory-list li { padding: 20px 0; border-top: 1px solid #afc2a7; }
.directory-list li:last-child { padding-bottom: 0; }
.directory-list h3 { font-size: .95rem; margin: 0 0 8px; }
.directory-list p { font-size: .825rem; margin-bottom: 6px; color: var(--muted); }
.directory-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 0; font-size: .85rem; font-weight: 650; text-decoration: none; }
.directory-list a:hover { text-decoration: underline; }
.directory-list a:active { background: var(--bg); }
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; padding-block: 32px; }
.footer-brand > p { margin: 14px 0 0; font-size: .825rem; color: var(--muted); }
.footer-detail { max-width: 65ch; }
.footer-detail p { margin: 0; font-size: .825rem; color: var(--muted); }
.footer-links { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; color: var(--ink); }
.footer-detail .footer-note { font-size: .75rem; }
.footer-baseline { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 18px; border-top: 1px solid var(--line); font-size: .7rem; color: var(--muted); }

/* Readable pages and articles keep the tools in the workshop. */
.static-page, .article-layout, .guide-archive { max-width: min(calc(100% - clamp(24px, 5vw, 80px)), 880px); padding-block: clamp(32px, 5vw, 64px); }
.static-page { min-height: 60vh; }
.static-page > h1, .article-layout > h1, .guide-archive h1 { max-width: 26ch; margin-block: 12px 24px; }
.static-page .reading-content, .article-layout .reading-content { max-width: 70ch; font-size: clamp(1rem, 1.4vw, 1.1rem); }
.reading-content :is(h2, h3) { margin-top: 2em; margin-bottom: .8em; }
.reading-content p { margin-bottom: 1.3em; }
.reading-content li { margin-block: .6em; }
.reading-content a { text-decoration-thickness: 1px; }
.reading-content :is(ul, ol) { padding-left: 1.4em; }
.reading-content blockquote { margin: 24px 0; padding: 12px 24px; border-left: 3px solid var(--leaf); background: var(--paper); }
.reading-content pre { padding: 20px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); }
.reading-content .wp-block-table { width: 100%; overflow-x: auto; }
.reading-content table { border-collapse: collapse; font-size: .875rem; }
.reading-content :is(th, td) { padding: 12px; border: 1px solid var(--line); }
.reading-content figure { max-width: 100%; margin-inline: 0; }
.reading-content :is(input, textarea, select) { max-width: 100%; min-height: 44px; }
.article-meta { display: flex; gap: 8px; color: var(--muted); font-size: .8rem; margin-bottom: 24px; }
.article-meta p { margin: 0; }
.wp-block-post-terms { display: flex; flex-wrap: wrap; gap: 4px; font-size: .8rem; }
.wp-block-post-terms a { display: inline-flex; align-items: center; min-height: 44px; }
.article-toc { padding: 20px clamp(16px, 3vw, 28px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-block: 24px 32px; max-width: 70ch; }
.article-toc h2 { font-size: .85rem; margin-bottom: 8px; }
.article-toc ol { padding: 0; list-style: none; margin: 0; }
.article-toc a { display: flex; align-items: center; min-height: 44px; font-size: .9rem; padding-block: 8px; }
.article-toc .toc-level-3 { padding-left: 20px; }
.article-tool-link { padding: 24px; border-left: 3px solid var(--leaf); background: var(--paper); margin-block: 40px; }
.article-tool-link p { color: var(--muted); }
.related-guides { padding-top: 24px; border-top: 1px solid var(--line); }
.guide-archive .archive-query { margin-top: 32px; }
.guide-archive .wp-block-post-template { list-style: none; padding: 0; }
.archive-query .wp-block-post-title { font-size: 1.35rem; }
.archive-query .wp-block-post-date { color: var(--muted); font-size: .8rem; }
.wp-block-query-pagination { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-query-pagination :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px; }

@media (min-width: 480px) {
  .lurby-site .autosite-tool .ast-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .file-workshop > .workshop-bottom { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
  .task-tabs a { flex-basis: 100px; }
  .tool-directory { align-self: start; }
}
@media (min-width: 1024px) {
  .lurby-site .autosite-tool { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, .6fr)); column-gap: 12px; row-gap: 12px; align-items: start; }
  .lurby-site .autosite-tool .ast-note { grid-column: 1 / -1; grid-row: 1; }
  .lurby-site .autosite-tool .ast-form { grid-column: 1; grid-row: 2 / 7; margin-right: clamp(12px, 2.2vw, 32px); padding-top: 0; }
  .lurby-site .autosite-tool .ast-limits { grid-column: 1; grid-row: 7; margin-right: 24px; }
  .lurby-site .autosite-tool .ast-status { grid-column: 2 / -1; grid-row: 2; margin-top: 0; }
  .lurby-site .autosite-tool .ast-result { grid-column: 2 / -1; grid-row: 3; min-height: 330px; }
  .lurby-site .autosite-tool .ast-downloads { grid-column: 2 / -1; grid-row: 4; }
  .lurby-site .autosite-tool .ast-action { grid-row: 5; width: 100%; }
  .lurby-site .autosite-tool .ast-action:nth-last-child(3) { grid-column: 2; }
  .lurby-site .autosite-tool .ast-action:nth-last-child(2) { grid-column: 3; }
  .lurby-site .autosite-tool .ast-action:last-child { grid-column: 4; }
}
@media (max-width: 479px) {
  .header-inner { gap: 12px; }
  .global-nav { width: 100%; justify-content: space-between; gap: 4px 12px; }
  .global-nav a { font-size: .75rem; }
  .task-tabs a { flex-basis: 30%; min-width: 0; padding-inline: 4px; gap: 5px; font-size: .75rem; }
  .task-tabs { padding: 0; }
  .task-tabs a > span { font-size: .85rem; }
  .tool-directory { padding: 20px; }
  .workspace-bar .eyebrow { font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .task-tabs, .article-toc, .article-tool-link, .related-guides, .tool-help, .autosite-tool .ast-form, .autosite-tool button { display: none !important; }
  body { background: #fff; color: #000; }
  .page-shell { width: 100%; max-width: 100%; padding: 0; }
  .lurby-site .autosite-tool { display: block; }
  .lurby-site .autosite-tool .ast-result { max-height: none; overflow: visible; border: 1px solid #666; }
  a { color: #000; }
}
