/* HomeTab — Quiet Mode: compact, responsive dark and light workspaces */
:root{
  color-scheme:dark;
  --bg:#0e1117;--side:#12161d;--surface:#171c25;--surface-2:#1d2430;
  --card:#1b212c;--card-hover:#222b38;--border:#2b3441;
  --text:#f4f5f7;--soft:#d7dce4;--muted:#9ca7b6;--faint:#727e90;
  --accent:#bdaefc;--accent-soft:#312d47;--mint:#9edec5;--gold:#f0cd98;
  --font:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-width:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased}
button,input{font:inherit}
button{cursor:pointer}
a{color:inherit}
img,svg{max-width:100%}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-weight:700;letter-spacing:-.035em}
[hidden]{display:none!important}
button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.skip{position:fixed;z-index:100;top:-120px;left:16px;padding:12px 16px;background:var(--accent);color:var(--bg);border-radius:8px;text-decoration:none}
.skip:focus{top:16px}
.brand-symbol{width:33px;height:33px;flex:none;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:4px;transform:rotate(-5deg)}
.brand-symbol i{display:block;border-radius:5px;background:var(--accent)}
.brand-symbol i:nth-child(2){background:var(--mint);border-radius:5px 10px 5px 5px}
.brand-symbol i:nth-child(3){background:var(--gold);border-radius:5px 5px 5px 10px}
.brand-symbol i:nth-child(4){background:#8e9cf2;border-radius:5px 5px 10px 5px}
.brand-period{color:var(--accent)}
.loading{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;color:var(--muted);font-size:13px}
.loading .brand-symbol{width:54px;height:54px;gap:6px}

/* Theme controls appear both before and after selecting a space. */
.theme-toggle{display:grid;place-items:center;flex:none;width:37px;height:37px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--soft);transition:background .15s,border-color .15s}
.theme-toggle:hover{background:var(--card-hover);border-color:var(--accent)}
.theme-toggle .theme-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .moon-icon{display:none}
:root[data-theme="light"] .theme-toggle .sun-icon{display:none}
:root[data-theme="light"] .theme-toggle .moon-icon{display:block}

/* Single, intentional entry — no exposed space list */
.chooser{min-height:100dvh;background:radial-gradient(ellipse 40% 35% at 50% 18%,#252439 0%,transparent 100%),var(--bg)}
.login-layout{width:min(100% - 40px,1150px);min-height:100dvh;margin:0 auto;display:flex;align-items:center;flex-direction:column}
.login-top{width:100%;padding-top:clamp(32px,7vh,76px);display:flex;align-items:center;justify-content:space-between;gap:14px}
.login-brand{display:flex;align-items:center;gap:12px;font-weight:750;font-size:22px;letter-spacing:-.055em}
.login-brand .brand-symbol{width:30px;height:30px}
.login-card{width:min(100%,465px);background:linear-gradient(160deg,#1e2530,#171c24 68%);border:1px solid #333b4a;border-radius:22px;padding:clamp(26px,4.4vw,43px);box-shadow:0 28px 80px #0000002e;margin:auto 0}
.login-icon{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;margin-bottom:25px}
.login-icon svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.login-eyebrow{font-size:10px;color:var(--mint);font-weight:750;letter-spacing:.15em;margin-bottom:11px}
.login-card h1{font-size:clamp(25px,4vw,33px);line-height:1.15;margin-bottom:12px}
.login-description{font-size:14px;line-height:1.7;color:var(--muted);margin-bottom:30px}
.access-form{display:flex;flex-direction:column;gap:19px}
.field{display:grid;gap:9px}
.field label{font-size:12px;color:var(--soft);font-weight:650}
.field input{width:100%;height:51px;padding:0 15px;background:#10151d;border:1px solid #3b4553;border-radius:10px;color:var(--text);font-size:15px;outline:none}
.field input::placeholder{color:#778391}
.field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #bdaefc20}
.field input[aria-invalid=true]{border-color:#efa2a0}
#pin-input{letter-spacing:.28em;font-size:18px}
#pin-input::placeholder{letter-spacing:.2em}
.pin-error{color:#ffb7b4;font-size:12px;line-height:1.5;margin-top:-6px}
.remember{display:flex;align-items:flex-start;gap:10px;color:var(--muted);font-size:12px;line-height:1.5;cursor:pointer}
.remember input{margin:2px 0 0;accent-color:var(--accent);width:16px;height:16px;flex:none}
.submit{border:0;border-radius:10px;width:100%;min-height:49px;background:var(--accent);color:#161521;padding:12px 17px;display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:13px;font-weight:750;transition:background .2s,transform .2s}
.submit:hover{background:#d2c9ff;transform:translateY(-1px)}
.submit svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.disclaimer{display:flex;align-items:flex-start;gap:10px;border-top:1px solid var(--border);padding-top:19px;margin-top:24px;color:var(--faint);font-size:11px;line-height:1.6}
.disclaimer svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6}
.login-footer{align-self:stretch;display:flex;justify-content:space-between;gap:15px;padding:28px 0;color:var(--faint);font-size:10px;letter-spacing:.1em;font-weight:650}

/* Sidebar */
.dashboard{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100dvh}
.sidebar{position:sticky;top:0;height:100dvh;min-height:550px;background:var(--side);border-right:1px solid #28303b;padding:30px 15px 24px;display:flex;flex-direction:column;gap:0;overflow-y:auto;scrollbar-width:thin}
.sidebar-brand,.mobile-brand{display:flex;align-items:center;gap:10px;white-space:nowrap;letter-spacing:-.055em;font-size:21px;font-weight:750}
.sidebar-brand{padding:0 14px;margin-bottom:61px}
.sidebar-brand .brand-symbol{width:29px;height:29px;gap:3px}
.sidebar-section{margin-bottom:35px}
.sidebar-heading{padding:0 14px;margin-bottom:14px;color:var(--faint);font-size:10px;letter-spacing:.11em;font-weight:750}
.profile-switch{display:flex;align-items:center;gap:11px;width:100%;min-width:0;padding:12px 10px;text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text)}
.profile-switch:hover{background:var(--card-hover)}
.side-avatar{display:grid;place-items:center;flex:none;width:39px;height:39px;border-radius:11px;background:var(--accent-soft);font-size:21px}
.profile-detail{min-width:0;display:flex;flex:1;flex-direction:column;gap:5px;align-items:flex-start}
.profile-detail strong{font-size:13px;line-height:1.1;overflow-wrap:anywhere}
.profile-detail small{color:var(--muted);font-size:11px}
.profile-switch svg{width:16px;height:16px;flex:none;fill:none;stroke:var(--faint);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.category-nav{display:flex;flex-direction:column;gap:3px}
.filter-button{display:flex;align-items:center;gap:11px;width:100%;border:0;border-radius:9px;background:transparent;color:var(--muted);padding:11px 13px;text-align:left;font-size:12px;font-weight:600;white-space:nowrap}
.filter-button:hover{background:#202632;color:var(--text)}
.filter-button[aria-pressed=true]{background:var(--accent-soft);color:#e6dfff}
.filter-emoji{width:19px;text-align:center;flex:none;font-size:15px;line-height:1.1}
.filter-count{margin-left:auto;font-size:11px;font-weight:500;color:var(--faint)}
.sidebar-bottom{display:flex;align-items:center;gap:9px;margin-top:auto;padding:16px 13px 0;border-top:1px solid var(--border);color:var(--faint);font-size:10px;line-height:1.5}
.status-dot{width:7px;height:7px;flex:none;background:var(--mint);border-radius:50%;box-shadow:0 0 0 3px #9edec516}

/* Main app */
.main{min-width:0;max-width:1660px;width:100%;margin:0 auto;padding:0 clamp(22px,3.8vw,64px)}
.toolbar{min-height:77px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border)}
.toolbar-location,.toolbar-actions{display:flex;align-items:center;gap:10px}
.toolbar-location{font-size:11px;color:var(--faint);letter-spacing:.035em;font-weight:650}
.toolbar-location strong{color:var(--soft);font-size:12px;font-weight:650;letter-spacing:0}
.toolbar-location svg{width:13px;height:13px;fill:none;stroke:#687387;stroke-width:2}
.full-date{font-size:12px;color:var(--muted);font-weight:500}
.mobile-brand,.mobile-switch{display:none}
.welcome{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:38px 0 30px}
.greeting{font-size:13px;line-height:1.5;color:var(--mint);font-weight:650;margin-bottom:8px}
.welcome h1{font-size:clamp(28px,3.2vw,43px);line-height:1.15;font-weight:700}
.welcome-sub{color:var(--muted);font-size:13px;line-height:1.6;margin-top:9px}
.clock{display:flex;flex-direction:column;align-items:flex-end;flex:none;gap:6px;color:var(--text)}
.clock strong{font-size:clamp(23px,2.8vw,36px);line-height:1;font-weight:650;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.clock span{font-size:10px;color:var(--faint);font-weight:700;letter-spacing:.11em}
.search-section{display:flex;align-items:center;gap:22px;margin:0 0 42px}
.search-box{display:flex;align-items:center;gap:12px;max-width:660px;flex:1;min-width:0;min-height:55px;background:var(--surface);border:1px solid #35404e;border-radius:13px;padding:0 17px;transition:border-color .2s}
.search-box:focus-within{border-color:var(--accent)}
.search-box svg{width:20px;height:20px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.search-box input{background:transparent;color:var(--text);font-size:13px;border:0;outline:0;width:100%;min-width:0}
.search-box input:focus-visible{outline:0}
.search-box input::placeholder{color:#8590a0}
.search-box kbd{display:grid;place-items:center;flex:none;border-radius:5px;border:1px solid #4a5360;background:#272e3a;min-width:25px;height:25px;color:var(--muted);font-size:11px;font-family:var(--font)}
.search-hint{font-size:12px;color:var(--faint)}
.mobile-categories{display:none}

/* Favourites and collections */
.section{margin-bottom:48px}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}
.section-title{display:flex;align-items:center;gap:11px;min-width:0}
.section-title h2{font-size:18px;font-weight:700;line-height:1.2;letter-spacing:-.035em}
.section-symbol{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:9px;background:#363041;color:var(--gold);font-size:16px}
.library-symbol{color:var(--mint);background:#253a35;font-size:19px}
.section-aside{font-size:11px;color:var(--faint);white-space:nowrap}
.link-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.link-card{position:relative;min-width:0;min-height:85px;display:flex;align-items:center;gap:12px;border:1px solid var(--border);background:var(--surface);border-radius:13px;padding:16px;text-decoration:none;transition:transform .16s,border-color .16s,background .16s}
.link-card:hover{background:var(--card-hover);border-color:#546072;transform:translateY(-2px)}
.link-card:active{transform:translateY(0)}
.link-logo{width:42px;height:42px;flex:none;border-radius:12px;background:#293140;display:grid;place-items:center;overflow:hidden}
.link-logo img{display:block;width:27px;height:27px;object-fit:contain}
.link-emoji{display:grid;place-items:center;font-size:23px;line-height:1}
.link-logo[data-has-icon=true] .link-emoji{display:none}
.link-info{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px}
.link-info strong{display:block;color:var(--text);font-size:12px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.link-info small{display:block;color:var(--muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.link-card>svg{width:15px;height:15px;flex:none;align-self:flex-start;fill:none;stroke:var(--faint);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.favourites .link-card{min-height:143px;align-items:flex-start;flex-direction:column;gap:16px;background:linear-gradient(145deg,#212734,#1b2029)}
.favourites .link-card:hover{background:#272e3c}
.favourites .link-logo{width:46px;height:46px}
.favourites .link-logo img{width:29px;height:29px}
.favourites .link-info{gap:5px}
.favourites .link-info strong{font-size:13px}
.favourites .link-card>svg{position:absolute;top:20px;right:18px}
.library{margin-top:6px}
.group{margin-bottom:28px}
.group-heading{display:flex;gap:10px;align-items:center;margin:0 0 13px}
.group-heading>span{display:grid;place-items:center;font-size:14px;width:30px;height:30px;border-radius:8px;background:#252d38}
.group-heading h3{font-size:13px;color:var(--soft);font-weight:700;letter-spacing:0}
.group-heading small{font-size:11px;color:var(--faint);margin-left:auto}
.no-results{border:1px dashed #3b4552;background:var(--surface);border-radius:16px;text-align:center;padding:45px 20px}
.empty-icon{font-size:36px;color:var(--accent);line-height:1}
.no-results h3{font-size:18px;margin:12px 0 6px}
.no-results p{color:var(--muted);font-size:13px}
.no-results button{margin-top:18px;border:1px solid #584e85;background:var(--accent-soft);color:#eee8ff;border-radius:9px;padding:10px 14px;font-size:12px;font-weight:700}
.site-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:84px;margin-top:50px;border-top:1px solid var(--border);color:var(--faint);font-size:11px}
.site-footer span span{padding:0 6px}

@media(max-width:1280px){
 .link-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .search-hint{display:none}
}
@media(max-width:1000px){
 .dashboard{grid-template-columns:210px minmax(0,1fr)}
 .sidebar{padding-inline:11px}
 .sidebar-brand{padding-left:10px}
 .main{padding-inline:24px}
 .link-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:800px){
 .dashboard{display:block}
 .sidebar{display:none}
 .main{padding-inline:clamp(18px,4.3vw,36px)}
 .toolbar{min-height:69px}
 .toolbar-location{display:none}
 .mobile-brand{display:flex;gap:9px;font-size:18px}
 .mobile-brand .brand-symbol{width:25px;height:25px;gap:3px}
 .mobile-switch{display:grid;place-items:center;width:37px;height:37px;border:1px solid var(--border);border-radius:10px;color:var(--soft);background:var(--surface)}
 .mobile-switch svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 .toolbar-actions{gap:14px}
 .welcome{padding:31px 0 23px}
 .search-section{margin-bottom:20px}
 .mobile-categories{display:flex;gap:9px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain;padding:0 0 12px;margin:0 0 31px}
 .mobile-categories .filter-button{width:auto;flex:none;border:1px solid var(--border);background:var(--surface);padding:9px 12px;border-radius:100px;gap:7px}
 .mobile-categories .filter-button[aria-pressed=true]{border-color:#706399;background:var(--accent-soft);color:#f1eaff}
 .mobile-categories .filter-count{display:none}
}
@media(max-width:540px){
 .main{padding-inline:17px}
 .toolbar{min-height:66px}
 .full-date{display:none}
 .welcome{align-items:flex-start;gap:15px;padding:29px 0 22px}
 .greeting{font-size:12px;margin-bottom:7px}
 .welcome h1{font-size:clamp(24px,6vw,30px);max-width:290px}
 .welcome-sub{font-size:12px;max-width:270px}
 .clock{align-self:flex-start;padding-top:3px}
 .clock strong{font-size:20px}
 .clock span{font-size:9px}
 .search-box{min-height:51px}
 .section{margin-bottom:38px}
 .section-aside{display:none}
 .section-title h2{font-size:17px}
 .section-head{margin-bottom:14px}
 .link-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .favourites .link-card{min-height:138px;padding:14px;gap:14px}
 .link-card{min-height:78px;padding:12px;gap:9px}
 .link-logo{width:36px;height:36px;border-radius:9px}
 .link-logo img{width:24px;height:24px}
 .link-emoji{font-size:20px}
 .link-info strong{font-size:12px}
 .link-info small{font-size:10px}
 .link-card>svg{display:none}
 .favourites .link-card>svg{display:block;top:16px;right:14px}
 .group{margin-bottom:24px}
 .site-footer{margin-top:20px;font-size:10px}
 .login-layout{width:min(100% - 32px,460px)}
 .login-top{padding-top:34px}
 .login-card{margin:42px 0;border-radius:18px}
 .login-footer{padding:0 0 29px}
}
@media(max-width:365px){
 .welcome{flex-wrap:wrap}
 .clock{flex-direction:row;gap:9px;align-items:center;padding:0}
 .link-grid{grid-template-columns:minmax(0,1fr)}
 .favourites .link-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .favourites .link-card{min-height:130px}
 .login-footer span:last-child{display:none}
}

/* Light mode keeps the same compact layout, with quieter paper-and-ink colours. */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f5f6f8;--side:#fcfcfd;--surface:#ffffff;--surface-2:#f2f4f7;
  --card:#ffffff;--card-hover:#f0f2f7;--border:#dfe4ec;
  --text:#1b2230;--soft:#354052;--muted:#556273;--faint:#677587;
  --accent:#6749ac;--accent-soft:#ede8f8;--mint:#266d54;--gold:#855b21;
}
:root[data-theme="light"] .brand-symbol i:first-child{background:#9580db}
:root[data-theme="light"] .brand-symbol i:nth-child(2){background:#87bfa9}
:root[data-theme="light"] .brand-symbol i:nth-child(3){background:#e8be7d}
:root[data-theme="light"] .brand-symbol i:nth-child(4){background:#929ae2}
:root[data-theme="light"] .chooser{background:radial-gradient(ellipse 42% 34% at 50% 16%,#e9e6f5 0%,transparent 100%),var(--bg)}
:root[data-theme="light"] .login-card{background:#fff;border-color:#e0e4eb;box-shadow:0 25px 70px #23334a0b}
:root[data-theme="light"] .field input{background:#fafbfc;border-color:#cbd4e0;color:var(--text)}
:root[data-theme="light"] .field input::placeholder{color:#687687}
:root[data-theme="light"] .field input:focus{box-shadow:0 0 0 3px #6749ac23}
:root[data-theme="light"] .field input[aria-invalid=true]{border-color:#ae3d40}
:root[data-theme="light"] .pin-error{color:#a12d36}
:root[data-theme="light"] .submit{background:var(--accent);color:#fff}
:root[data-theme="light"] .submit:hover{background:#563799}
:root[data-theme="light"] .sidebar{border-right-color:var(--border)}
:root[data-theme="light"] .filter-button:hover{background:#eff1f6;color:var(--text)}
:root[data-theme="light"] .filter-button[aria-pressed=true]{color:#543a91}
:root[data-theme="light"] .toolbar-location svg{stroke:#7c8694}
:root[data-theme="light"] .search-box{border-color:#cbd3de}
:root[data-theme="light"] .search-box input::placeholder{color:#687587}
:root[data-theme="light"] .search-box kbd{background:#f2f3f6;border-color:#dce2e8;color:#687585}
:root[data-theme="light"] .section-symbol{background:#f9f0df;color:#82551b}
:root[data-theme="light"] .library-symbol{background:#e6f2eb;color:#26684c}
:root[data-theme="light"] .link-card:hover{border-color:#b9bed6}
:root[data-theme="light"] .link-logo{background:#eef1f6}
:root[data-theme="light"] .favourites .link-card{background:linear-gradient(145deg,#fff,#faf9fd)}
:root[data-theme="light"] .favourites .link-card:hover{background:#f1edf8}
:root[data-theme="light"] .group-heading>span{background:#edf0f5}
:root[data-theme="light"] .no-results{background:#fff;border-color:#c4ccd7}
:root[data-theme="light"] .no-results button{border-color:#c7b9e3;color:#553992;background:#eee8f9}
:root[data-theme="light"] .profile-switch:hover{background:#f0f2f7}
:root[data-theme="light"] .mobile-categories .filter-button[aria-pressed=true]{border-color:#a89bcf;background:#ede8f8;color:#53368e}
:root[data-theme="light"] .mobile-switch{background:#fff;border-color:var(--border)}
:root[data-theme="light"] .sidebar-bottom .status-dot{background:#3e9871}

@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto}
 *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}
}