@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#0d1018;--panel:#141925;--panel2:#191f2d;--line:#262e40;--text:#edf0fa;--muted:#8992a8;--accent:#7888ff;--accent2:#a1aaff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Manrope,Arial,sans-serif}.app-shell{display:flex;min-height:100vh}.sidebar{width:230px;flex-shrink:0;background:#10141e;border-right:1px solid var(--line);padding:25px 15px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:0 10px 38px}.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#9aa5ff,#5867df);display:grid;place-items:center;color:#101421;font-weight:900;font-size:23px}.brand strong{display:block;font-size:13px;letter-spacing:2px}.brand small{font:9px 'DM Mono';color:var(--muted);letter-spacing:1.4px}.side-link,.quick-link{border:0;background:transparent;color:#9ba4b8;text-align:left;padding:12px 13px;border-radius:9px;font:600 13px Manrope;cursor:pointer;margin:2px 0}.side-link span{margin-left:9px}.side-link.active,.side-link:hover,.quick-link:hover{background:#20283a;color:white}.side-label{font:10px 'DM Mono';color:#69738b;letter-spacing:1.4px;margin:33px 12px 10px}.quick-link{font-size:12px;padding:9px 13px}.sidebar-bottom{margin-top:auto;padding:15px 10px 0;color:#7d879d;font-size:11px;border-top:1px solid var(--line)}.status-dot{display:inline-block;width:7px;height:7px;background:#55d69b;border-radius:50%;margin-right:8px}.main{flex:1;min-width:0}.topbar{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px}.crumb{font:11px 'DM Mono';letter-spacing:1.1px;color:#8992a8}.crumb span{padding:0 10px;color:#4b5468}.crumb b{color:#dfe4f2;font-weight:500}.top-actions{display:flex;align-items:center;gap:15px}.pill{font:9px 'DM Mono';letter-spacing:1px;border:1px solid #3a4560;color:#9da9ff;padding:6px 9px;border-radius:20px}.small-btn,.nav-btn{background:var(--panel2);border:1px solid var(--line);color:#dce1f2;border-radius:8px;padding:8px 12px;cursor:pointer}.view{display:none}.view.active{display:block}#browser-view{height:calc(100vh - 64px);position:relative;display:none;flex-direction:column}#browser-view.active{display:flex}.tab-strip{height:43px;display:flex;align-items:end;padding:0 18px;gap:5px;background:#111621;border-bottom:1px solid var(--line);overflow-x:auto}.tab{height:34px;min-width:130px;max-width:210px;padding:0 12px;display:flex;align-items:center;gap:8px;background:#171e2b;border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;color:#aeb7ca;font-size:11px;cursor:pointer}.tab.active{background:#20283a;color:white}.tab span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.tab button{background:none;border:0;color:#7e89a1;cursor:pointer}.nav-bar{height:57px;display:flex;align-items:center;gap:8px;padding:0 18px;background:#151b27;border-bottom:1px solid var(--line)}.nav-btn{width:34px;height:34px;padding:0;font-size:17px}.address-form{height:36px;display:flex;align-items:center;gap:9px;flex:1;background:#0e131d;border:1px solid #30394d;border-radius:9px;padding:0 7px 0 12px}.lock{color:#9ba7ff}.address-form input,.hero-search input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:white;font:12px 'DM Mono'}.address-form button{background:#6575f0;border:0;border-radius:6px;color:white;padding:7px 15px;font-weight:700;cursor:pointer}.browser-status{height:25px;display:flex;justify-content:space-between;padding:5px 20px;color:#778198;font:9px 'DM Mono';letter-spacing:.6px;border-bottom:1px solid var(--line)}#page-host{color:#a1aaff}.start-page{width:min(700px,90%);margin:7vh auto 0}.hero-kicker,.section-kicker{font:10px 'DM Mono';letter-spacing:2px;color:#8f9cff}.start-page h1,.content-view h1{font-size:clamp(38px,5vw,62px);line-height:1.05;letter-spacing:-3px;margin:18px 0}.start-page h1 em{font-style:normal;color:#8795ff}.start-page>p,.muted{color:var(--muted);font-size:14px;line-height:1.7}.hero-search{margin:30px 0 28px;height:55px;border:1px solid #3b4560;background:#151c2a;border-radius:12px;display:flex;align-items:center;padding:6px 7px 6px 16px;gap:12px}.hero-search>span{font-size:21px;color:#9aa6ff}.hero-search input{font-family:Manrope;font-size:13px}.hero-search button,.primary-btn{background:#7584ff;color:#0c1020;border:0;border-radius:8px;padding:12px 18px;font-weight:800;cursor:pointer}.shortcut-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.shortcut{background:#151b27;border:1px solid var(--line);border-radius:10px;color:white;padding:15px 6px;display:flex;flex-direction:column;align-items:center;gap:9px;cursor:pointer}.shortcut b{width:32px;height:32px;border-radius:9px;background:#252e45;display:grid;place-items:center;color:#aab4ff;font-size:12px}.shortcut span{font-size:10px;color:#aab2c4}.notice{margin-top:36px;border:1px solid #30384c;background:#151b27;border-radius:10px;padding:15px;display:flex;gap:12px;color:#9ba6ff}.notice strong{font-size:11px;color:#dce2f4}.notice p{font-size:10px;line-height:1.6;color:#8791a6;margin:5px 0 0}.page-frame{border:0;background:white;width:100%;flex:1;min-height:0}.hidden{display:none!important}.loading,.error-panel{margin:auto;display:flex;align-items:center;flex-direction:column;gap:12px;color:#dce2f4}.loading span,.error-panel p{font-size:12px;color:var(--muted)}.spinner{width:32px;height:32px;border:3px solid #30394e;border-top-color:#8795ff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#38252c;color:#ff9da9;font-size:22px}.error-panel{text-align:center;max-width:480px;padding:25px}.error-panel h2{margin:0}.error-panel p{line-height:1.6}.content-view{padding:55px clamp(25px,5vw,75px)}.content-view h1{margin-bottom:8px}.home-cards,.tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:35px}.home-cards article,.tool-card{background:#151b27;border:1px solid var(--line);border-radius:13px;padding:22px}.home-cards article>span,.tool-card>span{font:9px 'DM Mono';letter-spacing:1.5px;color:#8f9cff}.home-cards h2,.tool-card h2{font-size:19px;margin:20px 0 8px}.home-cards p{color:var(--muted);font-size:12px;line-height:1.6;min-height:40px}.home-cards button,.tool-card button{border:1px solid #424d68;background:#222b40;color:#dce2f7;border-radius:7px;padding:9px 12px;cursor:pointer;font-size:11px}.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-card textarea{width:100%;min-height:100px;background:#0e131d;border:1px solid var(--line);border-radius:8px;color:#e6eafa;padding:11px;resize:vertical;font:11px 'DM Mono';margin:10px 0}.tool-card pre{white-space:pre-wrap;word-break:break-word;background:#0e131d;padding:10px;border-radius:8px;color:#aeb8d0;font:10px 'DM Mono';max-height:180px;overflow:auto}.colour-row,.button-row,.counts{display:flex;align-items:center;gap:12px;margin:18px 0}.colour-row input{width:45px;height:38px;background:none;border:0}.colour-row code{flex:1;color:#cbd2e5}#colour-preview{height:48px;border-radius:8px;background:#6d7cff}.counts{font-size:11px;color:var(--muted)}.counts b{color:#dfe5f5;font-size:18px;margin-left:10px}@media(max-width:850px){.sidebar{width:65px;padding:18px 8px}.brand{padding:0 4px 30px}.brand>div:last-child,.side-link span,.side-label,.quick-link,.sidebar-bottom{display:none}.side-link{text-align:center}.side-link span{display:none}.home-cards{grid-template-columns:1fr}.shortcut-grid{grid-template-columns:repeat(3,1fr)}.tool-grid{grid-template-columns:1fr}.topbar{padding:0 14px}}

/* Chromebook, tablet and narrow-window resilience */
html,body{min-width:320px;min-height:100%;overflow-x:hidden}
@media(max-width:600px){
  .app-shell{min-height:100dvh;flex-direction:column}
  .sidebar{width:100%;height:auto;min-height:0;padding:8px 10px;display:flex;flex-direction:row;align-items:center;gap:5px;border-right:0;border-bottom:1px solid var(--line);overflow-x:auto}
  .brand{padding:0 8px 0 0;gap:7px;flex-shrink:0}
  .brand-mark{width:30px;height:30px;font-size:18px}
  .brand>div:last-child{display:block}
  .brand strong{font-size:10px}
  .brand small{display:none}
  .side-link{padding:9px 10px;white-space:nowrap}
  .side-link span{display:inline;margin-left:4px}
  .side-label,.quick-link,.sidebar-bottom{display:none}
  .main{width:100%;min-height:0}
  .topbar{height:52px;padding:0 10px}
  .top-actions{gap:6px}
  .pill{display:none}
  #browser-view{height:calc(100dvh - 52px - 48px)}
  .nav-bar{padding:0 8px;gap:5px;height:auto;min-height:54px;flex-wrap:wrap}
  .nav-btn{flex:0 0 32px}
  .address-form{flex:1 1 180px;min-width:0}
  .browser-status{padding:5px 10px}
  .start-page{margin:5vh auto 25px;width:92%}
  .start-page h1,.content-view h1{font-size:clamp(34px,9vw,48px);letter-spacing:-1.5px}
  .shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .content-view{padding:28px 16px}
}
