:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --ink: #21172a;
  --muted: #645b69;
  --line: #dcd5dc;
  --white: #fffcf8;
  --lilac: #e9e1fc;
  --purple: #5124a1;
  --warning: #8a3618;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans) }
h1, h2, p { margin: 0 }
a { color: inherit; text-underline-offset: .22em }
button, textarea, select, input { font: inherit; color: inherit }
button, select { cursor: pointer }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px }
.wrap { width: min(1100px, calc(100% - 72px)); margin-inline: auto }
.site-header { border-bottom: 1px solid var(--line) }
.site-header .wrap, footer .wrap {
  flex-wrap: wrap;
  padding-block: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 67px;
}
.brand { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; font-weight: 820; letter-spacing: -.045em }
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 19px/1 var(--serif);
}
nav { display: flex; flex-wrap: wrap; gap: 26px; color: var(--muted); font-size: 13px; font-weight: 650 }
nav a { text-decoration: none }
nav a[aria-current="page"] { color: var(--purple); text-decoration: underline }
nav a:hover, .guide a:hover, footer a:hover { color: var(--purple) }

.hero { padding: 44px 0 31px }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; align-items: center }
h1 {
  font: 400 clamp(55px, 8vw, 105px)/.88 var(--serif);
  letter-spacing: -.075em;
}
h1 span { display: block; color: var(--purple); font-style: italic }
.hero p { max-width: 30rem; color: var(--muted); margin-top: 21px }
.hero-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: clamp(150px, 20vw, 227px);
  overflow: hidden;
  border: 1px solid #d6caea;
  border-radius: 50%;
  background: repeating-linear-gradient(0deg, transparent 0 17px, #6536b015 17px 18px), #ece3f8;
  color: var(--purple);
  user-select: none;
}
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 13% 7%;
  border: 1px solid #7141bb45;
  border-radius: 50%;
  transform: rotate(-13deg);
}
.hero-art span { font: italic 400 clamp(94px, 15vw, 185px)/.85 var(--serif); letter-spacing: -.1em; transform: translate(-5%, -4%) rotate(-8deg) }
.hero-art span::after {
  content: "Aa";
  position: absolute;
  inset: 0;
  color: #9d68d4;
  transform: translate(8px, 3px);
  z-index: -1;
}
.hero-art i { position: absolute; right: 17%; top: 19%; font: 30px/1 var(--serif) }
.hero-art i:last-child { left: 17%; top: auto; bottom: 23%; right: auto; font-size: 17px }

.generator {
  background: var(--white);
  border: 1px solid #d3c9d4;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 13px 36px #2e163a0b;
}
.controls {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.control-label { display: block; margin-bottom: 8px; color: var(--muted); font: 700 11px/1.3 var(--mono); letter-spacing: .065em; text-transform: uppercase }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0 }
legend { padding: 0 }
.styles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 4px; background: #f2edf2; border-radius: 9px }
.styles label { position: relative; min-width: 0 }
.styles input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer }
.styles span, select { min-height: 35px; border-radius: 6px; font: 700 13px var(--sans) }
.styles span { display: grid; place-items: center; color: var(--muted) }
.styles label:hover span { background: #eae0f1; color: var(--ink) }
.styles input:checked + span { background: var(--ink); color: #fff }
.styles input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px }
.level-line { display: flex; gap: 10px; align-items: center; min-height: 43px }
.level-line input { width: 100%; min-width: 0; min-height: 28px; margin: 0; accent-color: var(--purple); cursor: pointer }
.level-line output { text-align: center; flex: 0 0 3ch; color: var(--purple); font: 700 13px/2.1 var(--mono); border-radius: 5px; background: var(--lilac) }
select { width: 100%; min-height: 43px; padding: 0 10px; background: var(--white); border: 1px solid var(--line) }
.editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
.editor { padding: 17px 22px 13px; min-width: 0 }
.editor + .editor { border-left: 1px solid var(--line); background: #f4effc }
.editor-head, .editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.editor-head { margin-bottom: 6px; min-height: 31px }
.editor-head label { margin: 0; color: var(--ink); font-size: 12px }
.editor-head button { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px 0 }
.editor-head button:hover { color: var(--purple) }
textarea {
  display: block;
  width: 100%;
  height: 158px;
  padding: 11px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  resize: vertical;
  font-size: 19px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
#result { color: #381765; font-family: Arial, sans-serif; line-height: 2.2; padding-block: 16px }
textarea::placeholder { color: #6f6572 }
.editor-foot { min-height: 47px; padding-top: 7px; flex-wrap: wrap }
.counter { color: var(--muted); font: 12px/1.4 var(--mono) }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--purple);
  color: #fff;
  border: 0;
  border-radius: 7px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 760;
}
.copy:hover { background: #401683 }
button:disabled { opacity: .5; cursor: default }
.copy-symbol { display: inline-block; position: relative; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px }
.copy-symbol::before { content: ""; position: absolute; width: 100%; height: 100%; border: 1.5px solid currentColor; border-radius: 2px; top: -4px; left: -4px; background: var(--purple) }
.tool-note { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 11px 22px; color: var(--muted); font: 12px/1.5 var(--mono) }
.tool-note p:last-child { text-align: right }
#warning { color: var(--warning); margin-top: 8px }
[hidden] { display: none !important }

.guide { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 3.4fr); gap: clamp(26px, 5vw, 70px); margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line) }
.guide-nav { display: flex; flex-direction: column; gap: 8px; align-self: start; position: sticky; top: 24px }
.guide-nav a { padding: 4px 0; text-decoration: none }
.guide section + section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px }
.guide h2 { font: 400 clamp(29px, 4.6vw, 43px)/1.03 var(--serif); letter-spacing: -.045em; margin-bottom: 14px; scroll-margin-top: 22px }
.guide p, .guide li { max-width: 75ch; color: var(--muted) }
.guide p + p { margin-top: 12px }
.guide ol { padding-left: 1.4rem }
.guide ol li + li { margin-top: 9px }
.guide strong { color: var(--ink) }
details { border-bottom: 1px solid var(--line); padding: 12px 0 }
summary { cursor: pointer; font-weight: 700 }
details p { margin: 9px 0 4px }
footer { margin-top: 49px; border-top: 1px solid var(--line) }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }

@media (max-width: 820px) {
  .wrap { width: calc(100% - 40px) }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
  .style-control { grid-column: 1 / -1 }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 28px) }
  .site-header .wrap { min-height: 55px }
  nav { gap: 14px; font-size: 12px }
  .hero { padding: 27px 0 20px }
  .hero .wrap, .editors, .guide { grid-template-columns: minmax(0, 1fr) }
  h1 { font-size: clamp(47px, 12vw, 65px) }
  .hero p { margin-top: 13px; font-size: 15px }
  .hero-art, .guide-nav { display: none }
  .controls, .editor { padding: 12px }
  .editor + .editor { border-left: 0; border-top: 1px solid var(--line) }
  textarea { height: 95px }
  #result { padding-block: 12px }
  .tool-note { padding: 9px 12px; flex-wrap: wrap; gap: 4px }
  .tool-note p:last-child { text-align: left }
  .guide { margin-top: 36px }
}
@media (max-width: 340px) {
  .tool-note { flex-direction: column }
  .styles { gap: 3px }
  .styles span { font-size: 12px }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }

.guide .guide-table { width: 100%; table-layout: fixed; border: 1px solid var(--line); background: var(--white); border-collapse: collapse; font-size: .9rem }
.guide-table caption { text-align: left; color: var(--muted); padding-bottom: .65em }
.guide-table :is(th, td) { text-align: left; padding: .7em .65em; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere }
.guide-table thead { background: #eee8f5 }
.guide-table tbody th { font-weight: 700 }
.guide-table .sample-label { width: 26% }
.guide-table .sample-action { width: 70px }
.guide-table .platform-col { width: 22% }
.sample-text { display: inline-block; padding-block: .25em; color: var(--purple); font: 1.14rem/1.6 Arial, sans-serif }
.sample-copy { border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--purple); min-height: 36px; padding: 0 .55em; font-weight: 700 }
.sample-copy:hover { background: var(--lilac) }
.sample-feedback { min-height: 1.5em; padding-top: .4em; font-size: .9rem }
.subpage-hero { padding: 39px 0 24px }
.subpage-hero h1 { font-size: clamp(40px, 6.5vw, 76px); line-height: .99; letter-spacing: -.05em }
.subpage-hero p { margin-top: 13px; max-width: 60ch; color: var(--muted) }
.subpage-guide { display: block; max-width: 760px; margin-top: 35px }
.subpage-tool .controls { grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (max-width: 580px) {
  .guide-table :is(td, th) { padding: .55em .4em }
  .guide-table .sample-action { width: 57px }
  .subpage-hero { padding-top: 25px }
}
