:root {
  color-scheme: light;
  --ink: #18221d;
  --green: #203d32;
  --green-hover: #142c23;
  --muted: #5a665f;
  --line: #d6dfd8;
  --pale: #edf2ed;
  --paper: #fff;
  --background: #f7f8f5;
  --focus: #b65b18;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: var(--green); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, select, input[type="checkbox"], input[type="range"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: inline-block; flex-shrink: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; padding: .6rem 1rem; background: var(--paper); z-index: 10; }
.skip-link:focus { top: 1rem; }
.site-header { border-top: 4px solid var(--green); border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner, .footer-inner { width: min(1160px, calc(100% - 64px)); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.header-inner { min-height: 80px; }
.site-identity { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.site-name { color: var(--green); font-size: .875rem; font-weight: 700; line-height: 1.2; }
.home-link { display: inline-flex; align-items: center; gap: 12px; font-size: .94rem; font-weight: 650; white-space: nowrap; text-decoration: none; }
.home-link svg { width: 26px; height: 26px; }
.site-header nav { display: flex; align-items: center; gap: 26px; }
.site-header nav a { font-size: .875rem; line-height: 1.5; text-decoration: none; max-width: 190px; }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current] { font-weight: 650; text-decoration: underline; }
main { width: min(1080px, calc(100% - 64px)); margin: auto; }
.page-intro { padding: 35px 0 22px; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 16px; }
.intro-copy { max-width: 940px; color: #3e4b43; font-size: 1rem; line-height: 1.65; }
.intro-copy p { margin: 0 0 9px; }
.intro-copy p:last-child { margin-bottom: 0; }
.tool-shell { border: 1px solid #c3cec5; border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: 0 3px 0 #e5eae5; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; }
#wifi-form { padding: 28px 32px 20px; border-right: 1px solid var(--line); min-width: 0; }
.form-field { margin-bottom: 15px; }
.form-field > label, .logo-controls > label, .range-label label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.required-label { margin-left: .55rem; font-size: .75rem; font-weight: 400; color: var(--muted); }
input[type="text"], input[type="password"], select { width: 100%; height: 44px; border: 1px solid #a7b4aa; border-radius: 5px; background: var(--paper); color: var(--ink); padding: 8px 12px; }
input:hover, select:hover { border-color: var(--green); }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23203d32' stroke-width='1.7' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-position: right 13px center; background-repeat: no-repeat; }
.field-help { font-size: .8rem; line-height: 1.5; color: var(--muted); margin: 6px 0 0; }
.checkbox-label { display: flex; width: fit-content; align-items: center; gap: 9px; font-size: .9rem; margin-top: 18px; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.logo-link { display: inline-block; margin-top: 18px; font-size: .9rem; }
.draft-controls { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 21px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.text-button { background: none; border: 0; border-radius: 2px; color: var(--green); padding: 0; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; line-height: 1.6; }
.text-button:disabled { color: #6b756e; text-decoration: none; }
.muted-button { color: var(--muted); }
.draft-controls p { flex-basis: 100%; margin: 0; }
.result-column { background: var(--pale); min-width: 0; }
.result-area { padding: 21px 28px 16px; }
.result-topline { display: flex; justify-content: space-between; gap: 12px; font-size: .79rem; color: #4f6055; margin-bottom: 12px; }
.result-topline > span:first-child { font-weight: 600; }
.format-note { font-size: .73rem; letter-spacing: .03em; }
.sign-preview { width: 270px; max-width: 100%; margin: auto; background: #fff; padding: 12px 17px 14px; border: 1px solid #d0d9d1; border-radius: 2px; text-align: center; box-shadow: 0 2px 4px #203d320a; }
.sign-heading { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--green); font-size: .9rem; font-weight: 650; }
.sign-heading svg { width: 20px; height: 20px; }
.qr-frame { aspect-ratio: 1; width: 220px; max-width: 100%; margin: 2px auto 0; }
#qr-preview { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; }
#preview-empty { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 14px; background: #f7f9f6; border: 1px dashed #c4cfc5; margin: 8px 0; }
#preview-empty svg { width: 42px; height: 42px; color: #718679; }
#preview-empty p { color: #536459; font-size: .85rem; line-height: 1.5; margin: 14px 0 0; }
.preview-network { font-size: .93rem; font-weight: 650; line-height: 1.3; margin: 9px 0 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.scan-instruction { font-size: .72rem; margin: 0; color: #536459; }
.preview-status { text-align: center; color: #506157; font-size: .8125rem; line-height: 1.45; margin: 10px 0; min-height: 1.45em; overflow-wrap: anywhere; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 5px; min-height: 42px; padding: 8px 13px; font-size: .85rem; font-weight: 600; line-height: 1.45; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover:enabled { background: var(--green-hover); }
.button-secondary { color: var(--green); background: #fff; border-color: #aabaae; }
.button-secondary:hover:enabled { background: #f6f9f6; }
.button-print { color: var(--green); background: transparent; border-color: #aabaae; }
.button-print:hover:enabled { background: #fff; }
.button-print svg { width: 17px; height: 17px; }
.result-actions .button { flex: 1 1 auto; }
.button:disabled { opacity: 1; color: #65716a; background: #dce4dd; border-color: #cad4cc; }
.ad-slot { border-top: 1px dashed #c7d2c8; padding: 10px 18px; color: #637167; background: #e6ece5; text-align: center; font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; display: flex; justify-content: center; gap: 12px; }
.ad-slot span + span { border-left: 1px solid #b7c5ba; padding-left: 12px; }
.ad-slot:has(.ad-placement-note) { flex-wrap: wrap; row-gap: 0; padding: 2px 18px; line-height: 1.2; }
.ad-placement-note { flex-basis: 100%; margin: 0; line-height: 1.2; letter-spacing: normal; text-transform: none; }
.device-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 13px 20px; font-size: .79rem; text-align: center; border-top: 1px solid var(--line); color: #45594b; }
.device-note svg { width: 18px; height: 18px; }
.logo-controls { border: 0; border-top: 1px solid var(--line); margin: 21px 0 0; padding: 14px 0 0; min-width: 0; }
.logo-controls legend { padding: 0 8px 0 0; font-weight: 600; font-size: .9rem; }
input[type="file"] { display: block; width: 100%; font-size: .8rem; color: var(--muted); margin-top: 3px; }
input[type="file"]::file-selector-button { background: var(--pale); color: var(--green); border: 1px solid #acbcaf; border-radius: 4px; padding: 7px 9px; margin-right: 10px; cursor: pointer; }
.range-label { display: flex; justify-content: space-between; margin-top: 15px; align-items: baseline; }
.range-label output { font-size: .8rem; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--green); margin: 4px 0 12px; }
#logo-warning { color: #72521e; }
body[data-page="logo"] .result-column { display: flex; flex-direction: column; justify-content: flex-start; }
body[data-page="logo"] .result-area { flex: 1; display: flex; flex-direction: column; }
body[data-page="logo"] .sign-preview { margin-top: auto; margin-bottom: auto; width: 320px; padding-top: 18px; padding-bottom: 18px; }
body[data-page="logo"] .qr-frame { width: 260px; }
body[data-page="logo"] .result-actions { margin-top: 8px; }
.noscript-note { border: 1px solid #b65b18; padding: 15px; background: #fff4e5; }
.related-pages { display: grid; grid-template-columns: 1fr 1fr 1fr; list-style: none; margin: 32px 0 0; padding: 0; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.related-pages li { display: flex; align-items: center; }
.related-pages li + li { border-left: 1px solid var(--line); }
.related-pages a { display: block; width: 100%; font-size: .9rem; padding: 18px 24px; line-height: 1.4; }
.article-copy { max-width: 736px; margin: 58px auto 76px; }
.copy-section { margin-bottom: 38px; }
h2 { font-size: 1.85rem; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 19px; color: var(--green); }
.article-copy p { font-size: 1rem; line-height: 1.8; margin: 0 0 18px; }
.illustration { margin: 27px -18px 28px; background: var(--pale); border-radius: 6px; overflow: hidden; }
.illustration img { display: block; height: auto; width: 100%; }
h3 { font-size: 1.04rem; line-height: 1.5; font-weight: 650; margin: 0 0 8px; }
.faq-item { padding: 21px 0 4px; border-top: 1px solid var(--line); }
.site-footer { background: #edf1ec; border-top: 1px solid var(--line); }
.footer-inner { padding: 29px 0; align-items: start; }
.footer-inner .site-identity > a { font-size: .9rem; white-space: nowrap; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 25px; justify-content: flex-end; font-size: .8rem; }
.print-sheet { display: none; }
dialog { max-width: min(480px, calc(100% - 40px)); padding: 27px; border: 1px solid #9cac9e; border-radius: 9px; color: var(--ink); box-shadow: 0 12px 60px #142c2330; }
dialog::backdrop { background: #142c2366; }
dialog p { margin: 0 0 25px; font-size: 1.1rem; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (min-width: 900px) {
  body[data-page="sign"] .sign-preview { width: 294px; }
}
@media (max-width: 1000px) {
  .header-inner { gap: 26px; }
  .site-header nav { gap: 18px; }
  .site-header nav a { font-size: .875rem; }
  #wifi-form { padding: 25px; }
  .result-area { padding: 20px; }
  .result-actions .button-print { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .header-inner, .footer-inner, main { width: calc(100% - 36px); }
  .header-inner { display: block; padding: 15px 0 12px; }
  .home-link { font-size: .9rem; }
  .site-header nav { margin-top: 14px; justify-content: space-between; gap: 13px; align-items: start; }
  .site-header nav a { font-size: .875rem; max-width: 33%; }
  .page-intro { padding: 27px 0 22px; }
  h1 { font-size: 2.15rem; }
  .intro-copy { font-size: .93rem; }
  .tool-grid { grid-template-columns: 1fr; }
  #wifi-form { border-right: 0; border-bottom: 1px solid var(--line); padding: 23px; }
  .result-area { padding: 20px 22px 18px; }
  .sign-preview { width: 290px; }
  .qr-frame { width: 234px; }
  .result-actions .button-print { flex-basis: auto; }
  .device-note { font-size: .75rem; line-height: 1.5; align-items: start; padding: 14px 18px; }
  .device-note svg { margin-top: 2px; }
  .related-pages { margin-top: 26px; grid-template-columns: 1fr; }
  .related-pages li + li { border-left: 0; border-top: 1px solid var(--line); }
  .related-pages a { padding: 13px 9px; }
  .article-copy { margin-top: 40px; margin-bottom: 45px; }
  h2 { font-size: 1.65rem; }
  .article-copy p { font-size: .98rem; }
  .illustration { margin-left: 0; margin-right: 0; }
  .footer-inner { display: block; padding: 24px 0; }
  .site-footer nav { display: grid; justify-content: start; margin-top: 17px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a, input, select { transition: background-color .12s ease, border-color .12s ease; }
}
@page { size: auto; margin: 16mm; }
@media print {
  :root, body { color: #000; background: #fff; }
  .page-chrome, .site-header, nav, .site-footer, .ad-slot, .tool-shell, button, dialog, .skip-link { display: none !important; }
  body.has-result .print-sheet, body.has-result .print-sheet[hidden] { display: block !important; }
  .print-sheet { width: 100%; break-inside: avoid; page-break-inside: avoid; }
  .print-sign-inner { max-width: 165mm; min-height: 225mm; margin: 0 auto; padding: 16mm 12mm; border: 1.5pt solid #000; text-align: center; display: flex; align-items: center; flex-direction: column; justify-content: center; }
  .print-heading { display: flex; align-items: center; justify-content: center; gap: 4mm; font-size: 36pt; font-weight: 600; line-height: 1.2; }
  .print-heading svg { width: 12mm; height: 12mm; }
  #print-qr { display: block; width: 112mm; height: 112mm; max-width: 100%; margin: 8mm auto 5mm; image-rendering: pixelated; }
  .print-network { font-size: 23pt; font-weight: 600; margin: 0; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
  .print-instruction { font-size: 14pt; line-height: 1.4; margin: 7mm 0 0; }
}
/* Keep the utility ahead of the guide, with a compact paper preview on phones. */
.page-intro { padding-bottom: 24px; }
.page-intro h1 { margin-bottom: 0; }
.after-tool-intro { max-width: 736px; margin: 32px auto 0; }
.network-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.network-options .checkbox-label, .network-options .logo-link { margin-top: 3px; }
.draft-panel { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.draft-panel summary { color: var(--green); font-size: .875rem; cursor: pointer; width: fit-content; }
.draft-panel .draft-controls { padding-top: 12px; margin-top: 0; border-top: 0; }
.draft-panel summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
@media (max-width: 720px) {
  .page-intro { padding-top: 15px; padding-bottom: 12px; }
  h1 { font-size: 1.95rem; }
  #wifi-form { padding: 18px; }
  #ssid-help { display: none; }
  .security-password { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 12px; }
  .security-password:has(#password-field[hidden]) { grid-template-columns: 1fr; }
  .form-field { margin-bottom: 12px; }
  .security-password select { font-size: .875rem; padding-left: 9px; padding-right: 24px; background-position: right 7px center; }
  .network-options .checkbox-label, .network-options .logo-link { margin-top: 0; font-size: .875rem; }
  .draft-panel { margin-top: 15px; padding-top: 11px; }
  .result-area { padding: 14px 18px; }
  .result-topline { margin-bottom: 9px; }
  .sign-preview, body[data-page="logo"] .sign-preview { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: 1fr auto 1fr; gap: 0 10px; width: 100%; padding: 10px; }
  .qr-frame, body[data-page="logo"] .qr-frame { grid-column: 1; grid-row: 1 / 4; width: 150px; margin: 0; }
  .sign-heading { grid-column: 2; grid-row: 1; align-self: end; margin-bottom: 9px; }
  .preview-network { grid-column: 2; grid-row: 2; font-size: .9rem; margin: 0 0 7px; }
  .scan-instruction { grid-column: 2; grid-row: 3; align-self: start; font-size: .75rem; text-wrap: balance; }
  #preview-empty { padding: 10px; margin: 0; }
  #preview-empty svg { width: 28px; height: 28px; }
  #preview-empty p { font-size: .75rem; margin-top: 9px; }
  .preview-status { font-size: .8125rem; margin-top: 9px; margin-bottom: 9px; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .result-actions .button { font-size: .78rem; padding: 7px 5px; }
  .result-actions .button-print svg { display: none; }
  .device-note { padding: 11px 14px; }
  .ad-slot { padding-top: 8px; padding-bottom: 8px; }
  .after-tool-intro { margin-top: 28px; }
  .logo-controls { margin-top: 17px; padding-top: 9px; }
  .logo-controls .field-help { font-size: .75rem; }
  .logo-controls .range-label { margin-top: 11px; }
}
@media (max-width: 359px) {
  .security-password { grid-template-columns: 1fr; }
  .sign-preview, body[data-page="logo"] .sign-preview { grid-template-columns: 132px minmax(0, 1fr); gap: 0 7px; }
  .qr-frame, body[data-page="logo"] .qr-frame { width: 132px; }
}
