:root {
  --paper: #eeefea;
  --ink: #20201e;
  --muted: #62635c;
  --lime: #d4f86b;
  --white: #fff;
  --line: #d1d2ca;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: Arial, Helvetica, sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-heading: clamp(1.75rem, calc(1.5rem + 1vw), 2rem);
  --text-idea: clamp(2rem, calc(1.5rem + 1.8vw), 2.75rem);
  --text-display: clamp(3rem, calc(2.5rem + 3.25vw), 5.75rem);
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; font-size: var(--text-base); line-height: 1.5; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #628321; outline-offset: 5px; }
p, h1, h2 { margin: 0; }
.site-shell { width: min(77.5rem, calc(100% - clamp(2rem, 6vw, 5rem))); margin-inline: auto; }
.skip-link { position: absolute; left: 1.25rem; top: -20rem; background: var(--ink); color: var(--white); padding: .875rem 1.125rem; z-index: 10; }
.skip-link:focus { top: 1rem; }

.header { min-height: 7.25rem; padding-block: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.brand-mark { font-weight: 800; font-size: 3rem; letter-spacing: -.08em; line-height: 1; flex-shrink: 0; }
.brand-mark > span { color: #6d9524; }
.brand-caption { font-family: var(--mono); font-size: var(--text-xs); line-height: 1.5; letter-spacing: .06em; border-left: 1px solid var(--line); padding-left: 1rem; overflow-wrap: anywhere; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; font-size: var(--text-sm); }
.nav-about span { margin-left: .5em; }
.collection-toggle { background: transparent; border: 1px solid var(--ink); padding: .625rem .8125rem; border-radius: 5px; display: flex; align-items: center; gap: .75rem; transition: background .15s; }
.collection-toggle:hover { background: var(--white); }
.count { font-family: var(--mono); font-size: var(--text-xs); background: var(--ink); color: var(--white); border-radius: 3px; min-width: 1.5em; min-height: 1.5em; display: grid; place-items: center; padding: .125em .25em; }

.generator-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: clamp(2rem, 5vw, 4.75rem); align-items: start; padding-block: 4.75rem; }
.generator-layout > *, .about-section > * { min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .07em; line-height: 1.6; overflow-wrap: anywhere; }
.hero > .eyebrow { display: flex; align-items: center; gap: .5rem; }
.status-dot { width: .5em; height: .5em; background: #6d9524; border-radius: 50%; flex-shrink: 0; }
.hero h1 { font-size: var(--text-display); font-weight: 800; letter-spacing: -.055em; line-height: 1.02; margin-top: 1.5rem; overflow-wrap: anywhere; }
.hero-highlight { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 400; letter-spacing: -.045em; position: relative; isolation: isolate; display: inline-block; max-width: 100%; }
.hero-highlight::before { content: ""; position: absolute; background: var(--lime); left: -.08em; right: -.1em; top: 20%; bottom: 4%; z-index: -1; transform: rotate(-3deg); border-radius: 50% 45% 48% 40% / 16% 24% 22% 20%; }
.hero-description { max-width: 23rem; font-size: var(--text-base); line-height: 1.6; color: var(--muted); margin-block: 1.75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1.25em; min-height: 3rem; max-width: 100%; border-radius: 5px; font-size: var(--text-sm); font-weight: 600; padding: .875em 1.25em; border: 1px solid var(--ink); transition: transform .15s, background .15s; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button span[aria-hidden] { font-size: 1.4em; font-weight: 400; flex-shrink: 0; }
.button-primary { background: var(--lime); min-height: 3.375rem; box-shadow: 3px 3px 0 var(--ink); padding: 1em 1.375em; }
.button-primary:hover { background: #dffb91; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: #373732; }
.button-save { background: transparent; gap: .5em; }
.button-save[aria-pressed=true] { background: var(--lime); }
.hero-note { font-family: var(--mono); font-size: var(--text-xs); line-height: 1.7; color: var(--muted); margin-top: 1rem; }
.hero-doodle { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding-left: .625rem; transform: rotate(-6deg); width: fit-content; max-width: 100%; }
.hero-doodle > span { font-size: 4rem; line-height: 1; }
.hero-doodle p { font-family: Georgia, serif; font-size: var(--text-base); line-height: 1.4; }
.hero-doodle em { color: var(--muted); font-size: var(--text-sm); }

.idea-area { scroll-margin-top: 2rem; }
.idea-card { border: 1.5px solid var(--ink); border-radius: 10px; background: var(--white); box-shadow: 7px 7px 0 #d7d8cd; overflow: hidden; position: relative; }
.card-top { background: var(--ink); color: var(--white); min-height: 3.375rem; display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.75rem; gap: .75rem; }
.card-top > .mono { min-width: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .05em; line-height: 1.5; }
.card-symbol { font-size: 1.625rem; color: var(--lime); line-height: 1; flex-shrink: 0; }
.idea-content { padding: 1.75rem 1.8125rem 1.5rem; min-height: 26rem; }
.idea-meta { display: flex; justify-content: space-between; align-items: center; gap: .625rem; flex-wrap: wrap; }
.idea-label { font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .04em; padding: .375em .5em; border: 1px solid var(--line); border-radius: 3px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.idea-number { color: var(--muted); }
.idea-content h2 { font-size: var(--text-idea); letter-spacing: -.04em; line-height: 1.15; margin-top: 1.25rem; overflow-wrap: anywhere; }
.idea-description { font-size: var(--text-base); line-height: 1.65; margin-top: 1rem; overflow-wrap: anywhere; }
.slogan-box { background: var(--lime); padding: 1.0625rem 1.125rem; border-radius: 4px; margin-top: 1.375rem; }
.small-label { font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .04em; line-height: 1.6; overflow-wrap: anywhere; }
.slogan { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: var(--text-xl); line-height: 1.35; margin-top: .5rem; overflow-wrap: anywhere; }
.business-model { margin-top: 1.5rem; }
.business-model .small-label { color: var(--muted); }
.business-model > p:last-child { font-size: var(--text-sm); line-height: 1.6; margin-top: .5rem; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; border-top: 1px solid var(--line); padding: 1.125rem 1.8125rem; }
.card-actions > .button-dark { flex: 1 1 11rem; }
.card-actions > .button-save { flex: 1 1 6rem; }
.idea-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; flex-wrap: wrap; }
.text-button { background: none; border: 0; padding: .375em 0; font-size: var(--text-sm); display: inline-flex; align-items: center; gap: .375em; min-height: 2.75rem; max-width: 100%; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: .25em; }
.small-note { font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); }

.about-section { padding-block: 3.125rem 3.375rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: clamp(1.5rem, 5vw, 4.75rem); }
.about-heading > .eyebrow { color: var(--muted); }
.about-heading h2 { font-size: var(--text-heading); line-height: 1.15; letter-spacing: -.03em; margin-top: 1rem; overflow-wrap: anywhere; }
.about-copy p { font-size: var(--text-base); line-height: 1.75; max-width: 30rem; color: var(--muted); overflow-wrap: anywhere; }
.about-copy p + p { margin-top: 1rem; }
.about-tag { display: inline-block; font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .04em; border-bottom: 1px solid var(--ink); padding-block: .5em .375em; margin-top: .875rem; }
.footer { border-top: 1px solid var(--line); min-height: 6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; font-size: var(--text-xs); color: var(--muted); }
.footer > span { overflow-wrap: anywhere; }
.footer strong { font-size: var(--text-xl); letter-spacing: -.07em; color: var(--ink); margin-right: .5em; }
.footer > a { color: var(--ink); white-space: nowrap; }
.footer > a:hover { text-decoration: underline; }

dialog { border: 1.5px solid var(--ink); border-radius: 12px; padding: 1.8125rem; background: var(--paper); color: var(--ink); width: min(36.25rem, calc(100% - 2rem)); max-height: 85dvh; box-shadow: 10px 10px 0 #20201e26; }
dialog::backdrop { background: #20201e80; backdrop-filter: blur(3px); }
.dialog-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1.375rem; }
.dialog-header > div, .dialog-header h2 { min-width: 0; }
.dialog-header > .close-button { grid-column: 2; grid-row: 1; }
.dialog-header h2 { font-size: var(--text-heading); letter-spacing: -.035em; line-height: 1.15; margin-top: .75rem; overflow-wrap: anywhere; }
.close-button { border: 1px solid var(--ink); border-radius: 50%; width: 2.75rem; height: 2.75rem; flex-shrink: 0; background: transparent; font-size: 1.625rem; line-height: 1; padding: 0; }
.close-button:hover { background: var(--lime); }
.collection-note { font-size: var(--text-sm); line-height: 1.6; color: var(--muted); margin-block: 1.25rem; display: block; }
.empty-collection { padding-block: 2.25rem; text-align: center; color: var(--muted); font-size: var(--text-base); line-height: 1.7; }
.empty-collection .empty-star { font-size: 3rem; color: var(--ink); display: block; margin-bottom: .8125rem; }
.favorite-row { border-top: 1px solid var(--line); padding-block: 1.125rem; display: flex; flex-wrap: wrap; gap: .875rem; align-items: center; }
.favorite-row > div:first-child { flex: 1 1 14rem; min-width: 0; }
.favorite-row h3 { font-size: var(--text-lg); letter-spacing: -.025em; margin: 0 0 .4375rem; overflow-wrap: anywhere; }
.favorite-row p { font-size: var(--text-sm); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.favorite-row-actions { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; }
.mini-button { border: 1px solid var(--ink); border-radius: 4px; font-size: var(--text-sm); padding: .625em .75em; min-height: 2.75rem; background: var(--white); }
.mini-button:hover { background: var(--lime); }
.mini-button.remove { background: transparent; border-color: var(--line); }
#share-link { width: 100%; background: var(--white); border: 1px solid var(--ink); border-radius: 5px; padding: .875em; font-size: var(--text-base); margin-bottom: 1.125rem; }
.png-preview { display: block; width: 100%; height: auto; max-height: 50dvh; object-fit: contain; margin-block: 1.375rem; }
#image-dialog > .button { width: 100%; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, .9375rem); background: var(--ink); color: var(--white); padding: .8125em 1.125em; border-radius: 5px; font-size: var(--text-sm); line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 2rem); width: max-content; overflow-wrap: anywhere; z-index: 100; text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 1.25rem; text-align: center; background: var(--lime); font-size: var(--text-base); }

@media (max-width: 63em) {
  .generator-layout { padding-block: 3rem; }
  .hero-doodle { display: none; }
  .small-note { display: none; }
  .idea-content { min-height: 0; }
}

@media (max-width: 47.5em) {
  .header { min-height: 5.75rem; gap: 1rem; }
  .brand-mark { font-size: 2.5rem; }
  .nav-about { display: none; }
  nav { gap: 0; }
  .generator-layout { gap: 2.25rem; padding-block: 2.5rem; }
  .hero h1 { margin-top: 1.25rem; }
  .hero h1 br:last-of-type { display: none; }
  .hero h1 > .hero-highlight { margin-right: .1em; }
  .hero-description { margin-block: 1.5rem; }
  .hero-note { margin-top: .875rem; }
  .card-top { padding: .875rem 1.25rem; }
  .idea-content { padding: 1.5rem 1.25rem; }
  .card-actions { padding: 1.125rem 1.25rem; }
  .about-section { padding-block: 2.25rem; }
  .about-heading h2 br { display: none; }
  .about-copy p { max-width: 100%; }
  .footer > span:nth-child(2) { order: 3; flex-basis: 100%; }
}

@media (max-width: 30em) {
  .brand-caption { display: none; }
  .header { column-gap: .75rem; }
  .collection-toggle { gap: .5rem; padding: .625em .75em; }
  dialog { padding: .75rem; }
  .dialog-header { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .dialog-header > div, .dialog-header > h2 { grid-column: 1; grid-row: 2; }
  .dialog-header > .close-button { grid-column: 1; grid-row: 1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover { transform: none; }
}
