:root {
    --page:#f4f6f9; --surface:#fff; --surface-soft:#f8fafc; --ink:#17202a; --muted:#637083;
    --line:#d8dee8; --line-strong:#b9c3d2; --teal:#0f766e; --teal-dark:#0b5d57; --blue:#315efb;
    --amber:#d97706; --danger:#b42318; --shadow:0 18px 48px rgba(23,32,42,.12);
    --mono:"SFMono-Regular",Consolas,"Liberation Mono","Courier New",monospace; --sans:Arial,Helvetica,sans-serif;
}
*{box-sizing:border-box}
html{min-width:320px}
html{background:#fff}
body{margin:0;min-height:100vh;color:var(--ink);background:#fff;font-family:var(--sans)}
html.theme-dark{--page:#0c111d;--surface:#111827;--surface-soft:#172033;--ink:#e6edf7;--muted:#96a3b8;--line:rgba(148,163,184,.24);--line-strong:rgba(148,163,184,.42);--teal:#2dd4bf;--teal-dark:#5eead4;--blue:#60a5fa;--amber:#f59e0b;--danger:#fb7185;--shadow:0 18px 48px rgba(0,0,0,.34)}
html.theme-dark body{background:linear-gradient(180deg,rgba(12,17,29,.96),rgba(15,23,42,.98)),radial-gradient(circle at 15% 8%,rgba(45,212,191,.13),transparent 28%),radial-gradient(circle at 88% 10%,rgba(96,165,250,.12),transparent 24%),var(--page)}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button,.file-button,.home-link{border:1px solid transparent;border-radius:12px;min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;color:var(--ink);background:var(--surface);cursor:pointer;font-weight:800;font-size:.98rem;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease}
button:hover,.file-button:hover,.home-link:hover{border-color:var(--line-strong);box-shadow:0 10px 26px rgba(23,32,42,.12);transform:translateY(-1px)}
button:disabled{cursor:not-allowed;opacity:.58;transform:none;box-shadow:none}
svg{width:17px;height:17px;flex:0 0 auto;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none}
.app-header{position:sticky;top:0;z-index:20;border-bottom:1px solid var(--line);background:rgba(255,255,255,.92);backdrop-filter:blur(16px)}
.header-inner{width:min(1480px,100%);margin:0 auto;min-height:68px;padding:0 24px;display:flex;align-items:center;gap:12px}
.brand{display:inline-flex;align-items:center;gap:12px;min-width:0;font-weight:800;flex:0 1 auto}.brand-logo{display:block;width:clamp(160px,24vw,260px);max-width:100%;height:auto;max-height:48px;flex:0 0 auto;aspect-ratio:360/88}.brand-mark{width:38px;height:38px;border-radius:8px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--teal),var(--blue));box-shadow:0 12px 26px rgba(49,94,251,.22);font-family:var(--mono);font-size:.86rem}.brand-copy{min-width:0;display:grid;gap:2px}.brand-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem}.brand-copy span{color:var(--muted);font-size:.82rem;font-weight:700}
.brand-logo{display:block;width:clamp(160px,24vw,260px);max-width:100%;height:auto;max-height:48px;flex:0 0 auto;aspect-ratio:360/88}
.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto;min-height:40px}.home-link{color:var(--teal-dark);background:#ecfdf5;border-color:#bce7d4}
.primary-nav{display:flex;align-items:center;gap:4px;min-width:0}.nav-item{position:relative}.nav-link,.nav-trigger{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;border:1px solid transparent;border-radius:8px;color:var(--muted);background:transparent;font-size:.9rem;font-weight:800;white-space:nowrap;cursor:pointer;transition:color .18s ease,background .18s ease,border-color .18s ease}.nav-link:hover,.nav-trigger:hover,.nav-item.open>.nav-trigger{color:var(--ink);background:var(--surface-soft);border-color:var(--line)}.nav-trigger i{font-size:.72rem;transition:transform .18s ease}.nav-item.open .nav-trigger i,.nav-item:hover .nav-trigger i{transform:rotate(180deg)}.dropdown-menu{position:absolute;top:calc(100% + 10px);left:0;z-index:30;min-width:320px;padding:6px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.98);box-shadow:0 24px 48px rgba(23,32,42,.16);display:grid;gap:3px;opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease}.nav-item:hover .dropdown-menu,.nav-item.open .dropdown-menu{opacity:1;visibility:visible;transform:translateY(0)}.dropdown-menu a{min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 12px;border-radius:10px;color:var(--ink);font-size:.86rem;font-weight:700;transition:color .18s ease,background .18s ease,transform .18s ease}.dropdown-menu a::after{content:"\f105";color:var(--muted);font-family:"Font Awesome 6 Free";font-size:.72rem;font-weight:900}.dropdown-menu a:hover{color:var(--teal-dark);background:var(--surface-soft);transform:translateX(3px)}
.header-search{min-width:250px;height:40px;display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface);overflow:hidden}.header-search input{width:100%;min-width:0;height:100%;border:0;outline:none;padding:0 11px;color:var(--ink);background:transparent;font-size:.9rem;font-weight:700}.header-search input::placeholder{color:var(--muted)}.search-submit,.theme-toggle,.menu-toggle{min-height:38px;border-radius:7px}.search-submit{width:40px;padding:0;color:var(--muted);background:transparent;border-color:transparent;box-shadow:none}.search-submit:hover{color:var(--ink);background:var(--surface-soft);box-shadow:none;transform:none}.theme-toggle{color:var(--teal-dark);background:#ecfdf5;border-color:#bce7d4}.theme-toggle i{width:16px;text-align:center}.menu-toggle{display:none;width:42px;padding:0;position:relative;color:var(--ink);background:var(--surface);border-color:var(--line)}.menu-toggle span{position:absolute;width:19px;height:2px;border-radius:999px;background:currentColor;transition:transform .18s ease,opacity .18s ease}.menu-toggle span:nth-child(1){transform:translateY(-6px)}.menu-toggle span:nth-child(3){transform:translateY(6px)}.menu-toggle[aria-expanded="true"] span:nth-child(1){transform:rotate(45deg)}.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}.menu-toggle[aria-expanded="true"] span:nth-child(3){transform:rotate(-45deg)}
.header-search{flex:0 1 auto}
.page{width:min(1480px,100%);margin:0 auto;padding:22px 24px 20px;display:grid;gap:16px}.title-row,.toolbar,.workspace,.metrics,.status-bar,.tool-summary,.site-footer__inner,.site-footer__bottom{width:100%}.title-row{display:flex;justify-content:space-between;align-items:end;gap:16px}.title-row > div,.title-meta{min-width:0}.eyebrow{margin:0 0 6px;color:var(--teal-dark);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}h1{margin:0;font-size:clamp(1.9rem,3.4vw,3rem);line-height:1.04;letter-spacing:-.03em;overflow-wrap:anywhere;word-break:break-word;max-width:100%}.title-meta{display:flex;flex-wrap:wrap;gap:8px}.meta-chip{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.72);color:var(--muted);font-weight:800;font-size:.84rem}.meta-dot{width:8px;height:8px;border-radius:50%;background:var(--teal)}
.toolbar-inner{padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.92);box-shadow:var(--shadow);display:flex;justify-content:space-between;gap:14px;align-items:center}.control-cluster{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.control{display:inline-flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 8px 20px rgba(23,32,42,.04)}.control label{color:var(--muted);font-size:.8rem;font-weight:800}.control select,.control input[type="number"]{min-width:180px;border:0;outline:none;background:transparent;color:var(--ink);font-weight:800;min-height:28px}.switch-control{display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--muted);font-size:.8rem;font-weight:800;cursor:pointer;user-select:none}.switch-control input{position:absolute;opacity:0;pointer-events:none}.switch-track{width:34px;height:20px;padding:2px;border-radius:999px;background:#cbd5e1;transition:background .18s ease}.switch-thumb{width:16px;height:16px;display:block;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(23,32,42,.25);transition:transform .18s ease}.switch-control input:checked+.switch-track{background:var(--teal)}.switch-control input:checked+.switch-track .switch-thumb{transform:translateX(14px)}.toolbar-actions{justify-content:flex-end}.file-button,.primary-button,.danger-button{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;border:1px solid transparent;border-radius:12px;font-weight:800;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease,color .18s ease}.file-button:hover,.primary-button:hover,.danger-button:hover{border-color:var(--line-strong);box-shadow:0 10px 26px rgba(23,32,42,.12);transform:translateY(-1px)}.file-button{color:var(--teal-dark);background:#ecfdf5;border-color:#bce7d4}.primary-button{color:#fff;background:var(--teal);border-color:var(--teal);box-shadow:0 12px 26px rgba(15,118,110,.2)}.primary-button:hover{background:var(--teal-dark);border-color:var(--teal-dark)}.danger-button{color:var(--danger);background:#fff7f5;border-color:#f4c7c2}.danger-button:disabled{cursor:not-allowed;opacity:.58;transform:none;box-shadow:none}
.workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.editor-panel{min-width:0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 12px 34px rgba(23,32,42,.08);border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.94)}.panel-header,.panel-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:rgba(248,250,252,.9)}.panel-header{border-bottom:1px solid var(--line)}.panel-footer{border-top:1px solid var(--line);color:var(--muted);font-size:.84rem;font-weight:700}.panel-title{display:inline-flex;align-items:center;gap:10px;font-weight:900}.panel-tools{display:inline-flex;gap:8px}.icon-button{width:40px;height:40px;padding:0;border-color:var(--line);background:var(--surface-soft)}
.editor-shell{min-height:380px;display:flex}.editor-shell textarea,.output-box{width:100%;min-height:380px;border:1px solid var(--line);border-radius:14px;outline:none;padding:18px 20px;background:var(--surface);color:var(--ink);font-family:var(--mono);font-size:1rem;line-height:1.75;resize:vertical;white-space:pre-wrap;word-break:break-word;box-shadow:0 10px 24px rgba(23,32,42,.06)}.editor-shell textarea::placeholder,.output-box::placeholder{color:#94a3b8}.editor-shell textarea.no-wrap,.output-box.no-wrap{white-space:pre;overflow-wrap:normal;overflow-x:auto}.output-box{overflow:auto;background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(15,23,42,.94));color:#e2e8f0}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.metric{padding:14px 16px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.9);box-shadow:var(--shadow)}.metric span{display:block;color:var(--muted);font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.metric strong{display:block;margin-top:6px;font-size:1.25rem}
.status-bar{padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.9);box-shadow:var(--shadow)}.status-copy{display:inline-flex;align-items:center;gap:10px;color:var(--muted);font-weight:800}.status-light{width:10px;height:10px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 5px rgba(15,118,110,.12)}.status-light.busy{background:var(--amber);box-shadow:0 0 0 5px rgba(217,119,6,.12)}.progress{margin-top:10px;height:8px;border-radius:999px;background:rgba(203,213,225,.5);overflow:hidden}.progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--teal),var(--blue));transition:width .18s ease}
.tool-summary{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(220px,.75fr);gap:18px;align-items:center;margin-top:6px;padding:20px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.92);box-shadow:var(--shadow)}.tool-summary h2{margin:0 0 8px;font-size:1.12rem}.tool-summary p{margin:0 0 8px;color:var(--muted);line-height:1.6}.tool-summary__example{padding:12px 14px;border-radius:12px;background:var(--surface-soft);font-family:var(--mono);white-space:pre-wrap}.tool-summary__figure{margin:0}.tool-summary__figure img{display:block;width:min(100%,320px);margin-left:auto;object-fit:contain}
.color-palette{margin-top:18px;padding:24px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,rgba(15,118,110,.05),rgba(255,255,255,.94));box-shadow:var(--shadow)}.theme-dark .color-palette{background:linear-gradient(180deg,rgba(20,184,166,.08),rgba(15,23,42,.94));border-color:rgba(20,184,166,.16)}.color-palette__header{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}.color-palette__header h2,.color-palette__title h3{margin:0}.color-palette__header h2{font-size:1.1rem}.color-palette__header p,.color-palette__title p{margin:6px 0 0;color:var(--muted);line-height:1.6}.theme-dark .color-palette__header p,.theme-dark .color-palette__title p{color:#cbd5e1}.color-palette__grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-top:18px}.color-swatch{min-width:0;overflow:hidden;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.82);box-shadow:0 10px 24px rgba(23,32,42,.08)}.theme-dark .color-swatch{background:rgba(15,23,42,.72);border-color:rgba(148,163,184,.14)}.color-swatch__preview{height:120px;border-bottom:1px solid rgba(15,23,42,.06)}.theme-dark .color-swatch__preview{border-bottom-color:rgba(148,163,184,.12)}.color-swatch__meta{display:grid;gap:4px;padding:12px 14px}.color-swatch__meta strong{font-size:.92rem}.color-swatch__meta span{color:var(--muted);font-size:.82rem;word-break:break-word}.theme-dark .color-swatch__meta span{color:#cbd5e1}
.site-footer{margin-top:18px;padding-top:16px;border-top:0;background:#CACCCC;color:#1f2937;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}.site-footer__inner{display:grid;grid-template-columns:1.15fr 1.55fr .85fr;gap:18px;align-items:start}.site-footer__brand{display:grid;gap:12px}.site-footer__logo img{width:217px;height:auto;aspect-ratio:360/88}.site-footer__brand p,.site-footer__social p{margin:0;color:#475569;line-height:1.65}.site-footer__brand p{margin-top:10px}.site-footer__mail{display:inline-flex;align-items:center;gap:10px;color:#0f3bff;font-weight:800;width:fit-content}.site-footer__links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.site-footer__group{display:grid;gap:10px}.site-footer__group h4,.site-footer__social h4{margin:0;font-size:1rem;color:#1f2937}.site-footer__group ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}.site-footer__group a{color:#475569;font-weight:700}.site-footer__group a:hover{color:#0f3bff}.site-footer__social{display:grid;gap:12px}.site-footer__social-row{display:flex;gap:10px;flex-wrap:wrap}.site-footer__social-row a{width:38px;height:38px;display:inline-grid;place-items:center;border-radius:8px;border:1px solid rgba(15,59,255,.14);background:rgba(15,59,255,.05);color:#0f3bff}.site-footer__social-row a:hover{color:#0f3bff;border-color:rgba(15,59,255,.24);background:rgba(15,59,255,.1)}.site-footer__bottom{margin-top:14px;padding:14px 0 0;border-top:1px solid rgba(148,163,184,.22);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;color:#64748b;font-size:.88rem}.site-footer__bottom p{margin:0}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:1120px){.workspace,.metrics,.site-footer__inner,.site-footer__links{grid-template-columns:1fr}.title-row,.site-footer__bottom{flex-direction:column;align-items:start}.site-footer__links{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:1320px){.header-inner{flex-wrap:wrap}.primary-nav{flex:1 1 100%;margin-left:0;order:3;width:100%;justify-content:flex-start;gap:4px}.header-actions{width:100%;margin-left:0;order:4;justify-content:flex-end;flex-wrap:wrap;gap:10px}.header-search{min-width:min(100%,280px);flex:1 1 280px}}
@media (max-width:960px){.color-palette__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.color-palette__header{flex-direction:column;align-items:start}.color-palette__grid{grid-template-columns:1fr}}
@media (max-width:860px){.header-inner,.page{padding-left:16px;padding-right:16px}.header-inner{flex-wrap:wrap}.brand-logo{width:clamp(136px,42vw,200px);max-height:40px}.primary-nav{position:absolute;left:16px;right:16px;top:68px;display:none;flex-direction:column;align-items:stretch;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow);width:auto;max-width:calc(100vw - 32px);max-height:calc(100vh - 96px);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}.primary-nav.open{display:flex}.nav-link,.nav-trigger{justify-content:space-between;width:100%}.dropdown-menu{position:static;opacity:1;visibility:visible;transform:none;box-shadow:none;min-width:0;max-width:100%;margin-top:4px;padding:6px;background:var(--surface-soft)}.dropdown-menu a::after{content:""}.header-search{min-width:0;flex:1}.menu-toggle{display:inline-flex}.header-actions{margin-left:0;width:100%;justify-content:flex-end;flex-wrap:wrap;min-height:86px;align-content:flex-start}.title-row{flex-direction:column;align-items:start}.title-row > div{width:100%}.title-meta{justify-content:flex-start}.toolbar-inner{flex-direction:column;align-items:stretch}.toolbar-actions{justify-content:flex-start;flex-wrap:wrap;width:100%}.toolbar-actions > *{flex:1 1 150px;min-width:0}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-summary__figure img{margin-left:0;max-width:100%}}
html.theme-dark .dropdown-menu,html.theme-dark .panel-header,html.theme-dark .panel-footer,html.theme-dark .tool-summary,html.theme-dark .metric,html.theme-dark .status-bar{background:rgba(17,24,39,.94)}html.theme-dark .site-footer{background:#CACCCC}html.theme-dark .nav-link:hover,html.theme-dark .nav-trigger:hover,html.theme-dark .nav-item.open>.nav-trigger{background:#1f2937}html.theme-dark .output-box{background:#020617;color:#e2e8f0}html.theme-dark .site-footer__social-row a{background:rgba(15,59,255,.05)}
