/* SiriX mobile layer. Loaded after app.css. Delete this file (and its <link>) to revert. */

/* ---------- all screens: colour and contrast (text colour follows its background) ---------- */
:root{--acc-ink:#055F69}
@media(prefers-color-scheme:dark){:root{--bg:#0B0B0D;--acc-ink:#27C4D6}}
body{background:var(--bg);color:var(--fg)}
::placeholder{color:var(--mut);opacity:1}
.badge-n,.jn{color:var(--on-acc,#fff)}
.lock,.pbar .on,.openbox,.feat .fi{color:var(--acc-ink)}
.btn:disabled,.btn[disabled]{opacity:.7}
/* dark panels (hero, band, secure): notes and links follow the panel, not the page */
.hero .note,.hero .mute,.secure .note,.secure .mute,.band .note,.band .mute{color:inherit;opacity:.8}
.hero a:not(.btn),.secure a:not(.btn){color:#8FE9F2}
.band a:not(.btn){color:inherit;text-decoration:underline}
.hero .sbox a:not(.btn){color:var(--acc-ink)}

/* ---------- all screens: touch polish ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:64px}
a,button,summary,label,select,input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.badge-n{min-width:16px;text-align:center;line-height:16px}
@media(hover:none){
  .btn:hover,.btn.alt:hover,.btn.outline:hover{transform:none;box-shadow:none;filter:none}
  .btn:active{transform:scale(.97);filter:brightness(.92)}
  .card:hover .ico{transform:none}
}

/* ---------- phones and small tablets ---------- */
@media(max-width:860px){
  body{overflow-x:clip}
  main{overflow-wrap:break-word}
  img,video{max-width:100%;height:auto}

  /* top bar */
  .topin{flex-wrap:wrap;gap:.45rem .6rem;padding:.45rem max(.75rem,env(safe-area-inset-right)) .45rem max(.75rem,env(safe-area-inset-left))}
  .logo{order:1}
  .logo img{height:26px;width:auto}

  /* visitors and admins: one swipeable row of links instead of 3 wrapped rows */
  .topr{order:2;margin-left:auto;gap:.4rem}
  .topr>span{display:none}
  .nav{order:3;flex:1 1 100%;flex-wrap:nowrap;gap:.15rem;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;
    margin:0 calc(-1*max(.75rem,env(safe-area-inset-left)));padding:0 .75rem .1rem;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent)}
  .nav::-webkit-scrollbar{display:none}
  .nav a{flex:0 0 auto;white-space:nowrap;min-height:40px;display:inline-flex;align-items:center;scroll-snap-align:start;padding:.4rem .85rem}

  /* members: compact bar = logo + search + avatar */
  .has-tabs .topin{flex-wrap:nowrap;align-items:center}
  .has-tabs .hsearch{order:2;flex:1 1 auto;min-width:0}
  .has-tabs .hsearch input{height:38px;min-height:38px;border-radius:19px;padding:.3rem .9rem;background:var(--soft)}
  .has-tabs .me{order:3;flex:0 0 auto}
  .has-tabs .me summary{padding:0;border:0;min-height:0;border-radius:50%}
  .has-tabs .me summary>span:last-child{display:none}
  .has-tabs .me .av{width:36px;height:36px;font-size:13px}

  /* Me menu becomes a full-width sheet under the bar, with a dimmed backdrop */
  .me[open]::before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:15}
  .me .menu{position:fixed;z-index:20;left:max(.6rem,env(safe-area-inset-left));right:max(.6rem,env(safe-area-inset-right));top:calc(env(safe-area-inset-top,0px) + 56px);
    min-width:0;max-height:calc(100vh - 150px);max-height:calc(100dvh - 150px);overflow-y:auto;overscroll-behavior:contain;padding:.4rem;border-radius:14px}
  .me .menu a,.me .menu button{min-height:44px;display:flex;align-items:center;padding:.5rem .8rem;border-radius:8px}
  .me .menu .note{padding:.5rem .8rem}
  .me .menu [data-cmdk]{display:none}

  /* members: bottom tab bar (thumb reach) */
  .has-tabs{padding-bottom:calc(60px + env(safe-area-inset-bottom,0px))}
  .has-tabs.kb{padding-bottom:0}
  .has-tabs.kb .inav{display:none}
  .inav{position:fixed;left:0;right:0;bottom:0;margin:0;gap:0;flex-wrap:nowrap;justify-content:space-around;align-items:stretch;z-index:10;
    background:var(--card);border-top:1px solid var(--line);padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);
    box-shadow:0 -4px 16px rgba(0,0,0,.06)}
  .inav a{flex:1 1 0;min-width:0;min-height:56px;justify-content:center;gap:2px;padding:.3rem .1rem .25rem;font-size:10.5px;line-height:1.1;
    border-bottom:0;border-top:2px solid transparent;text-align:center}
  .inav a>span:not(.badge-n){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .inav a.on{color:var(--acc);border-top-color:var(--acc);font-weight:700}
  .inav a:active{background:var(--soft)}
  .inav a svg{width:23px;height:23px}
  .inav .badge-n{top:3px;left:calc(50% + 4px);right:auto;font-size:10px;padding:0 5px}

  /* page content */
  .wrap1{padding:.8rem .75rem 2rem}
  .wrap1 h1{font-size:1.5rem}
  h2{font-size:1.2rem}
  .heroin{padding:1.5rem .9rem;gap:1.2rem}
  .hero p{max-width:none}
  .trust{gap:1rem}
  .li .card,.li2 .card,.li3 .card{padding:.75rem}
  .li,.li2,.li3{gap:.8rem}

  /* forms: 16px stops iOS zooming in on focus, 44px targets */
  main input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),main select,main textarea,.hsearch input{font-size:16px!important}
  select,input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input[type=search],input[type=tel],input[type=url]{min-height:44px}
  .hsearch input{min-height:38px}
  textarea{min-height:96px}
  input[type=checkbox],input[type=radio]{width:20px;height:20px}
  .btn,a.btn,button.btn{min-height:44px}
  .btn.sm,a.btn.sm,button.btn.sm{min-height:40px}
  .act{min-width:0}

  /* tables scroll sideways inside themselves instead of breaking the page */
  main table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tablewrap table{display:table;min-width:560px}
  th,td{min-width:84px}

  /* messaging */
  .msgwrap{min-height:0}
  .msgwrap .lst a{padding:.85rem .9rem}
  .msgs{max-height:60vh;max-height:60dvh}
  .m{max-width:88%}

  /* command palette sits clear of the notch */
  .cmdk{padding-top:calc(env(safe-area-inset-top,0px) + 8vh)}

  footer{padding:1rem .8rem}
  footer a{display:inline-block;padding:.3rem .15rem}
}

/* phone landscape: icons only, keeps screen height for content */
@media(max-width:860px) and (max-height:440px) and (orientation:landscape){
  .has-tabs{padding-bottom:calc(46px + env(safe-area-inset-bottom,0px))}
  .inav a{min-height:44px}
  .inav a>span:not(.badge-n){display:none}
}

@media(max-width:380px){
  .logo img{height:22px}
  .has-tabs .hsearch input{padding:.3rem .7rem}
  .inav a{font-size:10px}
}

@media(prefers-reduced-motion:reduce){.inav a,.btn{transition:none!important}}
