/* The dashboard's Settings page (assets/js/settings-page.js): this browser's contactID settings, read from the extension
   and saved straight into it. Everything is scoped under .stp. Coral for actions, mint for switches that are on. */
   .stp{--coral:#EE6055;--coral-strong:#C9473C;--coral-deep:#B23A30;--coral-soft:#FFF4F3;--coral-line:#F6C3BE;--mint:#3DE8B7;--mint-ink:#0B7F61;--mint-soft:#E2FBF3;--mint-line:#B9F0DD;--amber-ink:#735800;--amber-soft:#FEF7D6;--amber-line:#F2E2A0;--ink:#1F1D1B;--text:#333333;--slate:#555555;--mute:#8A8580;--line:#EAE6E2;--line2:#F1EEEA;--paper:#FAF9F7;--r:14px;color:var(--text);font-size:14px;line-height:1.5}
   .stp *{box-sizing:border-box}
   .stp [hidden]{display:none!important}
   .stp a{color:var(--coral-strong);font-weight:600;text-decoration:none}
   .stp a:hover{text-decoration:underline}
   .stp button{font:inherit}
   .stp :focus-visible{outline:2px solid var(--coral);outline-offset:2px}
   
   /* the bar at the top: which computer, its state, Save */
   .stp-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;margin-bottom:18px}
   .stp-who{display:flex;align-items:center;gap:12px;min-width:0}
   .stp-pc{width:40px;height:40px;border-radius:11px;background:var(--coral-soft);color:var(--coral);display:flex;align-items:center;justify-content:center;flex:none}
   .stp-pc svg{width:20px;height:20px}
   .stp-who b{display:block;font-size:15px;font-weight:700;color:var(--ink)}
   .stp-who small{display:block;font-size:12.5px;color:var(--mute)}
   .stp-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--mint);margin-right:6px;vertical-align:1px}
   .stp-acts{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
   .stp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1.5px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:9px 15px;font-size:13.5px;font-weight:700;cursor:pointer;white-space:nowrap;line-height:1.2;transition:background .15s,border-color .15s}
   .stp-btn:hover{background:var(--paper);border-color:#D9D4CE}
   .stp-btn:disabled{opacity:.45;cursor:not-allowed}
   .stp-btn.primary{background:var(--coral-strong);border-color:var(--coral-strong);color:#fff}
   .stp-btn.primary:hover{background:var(--coral-deep);border-color:var(--coral-deep)}
   .stp-btn.danger{border-color:var(--coral-line);color:var(--coral-deep)}
   .stp-btn.danger:hover{background:var(--coral-soft)}
   .stp-btn.ghost{border-color:transparent;background:transparent;color:var(--slate)}
   .stp-btn.ghost:hover{background:var(--line2);color:var(--ink)}
   .stp-btn.sm{padding:7px 12px;font-size:12.5px;border-radius:9px}
   .stp-btn svg{width:15px;height:15px;flex:none}
   
   /* notes */
   .stp-note{display:flex;gap:10px;align-items:flex-start;border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.55;margin-bottom:16px;border:1px solid var(--line);background:var(--paper)}
   .stp-note svg{width:18px;height:18px;flex:none;margin-top:1px}
   .stp-note.warn{background:var(--amber-soft);border-color:var(--amber-line);color:var(--amber-ink)}
   .stp-note.err{background:var(--coral-soft);border-color:var(--coral-line);color:var(--coral-deep)}
   .stp-note.ok{background:var(--mint-soft);border-color:var(--mint-line);color:var(--mint-ink)}
   .stp-note b{font-weight:700}
   .stp-note .stp-acts{margin-top:10px}
   
   /* layout: the section menu on the left, the sections on the right */
   .stp-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:start}
   .stp-nav{position:sticky;top:100px;display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:8px}
   .stp-nav button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--slate);font-size:13.5px;font-weight:600;cursor:pointer;text-align:left}
   .stp-nav button:hover{background:var(--paper);color:var(--ink)}
   .stp-nav button[aria-current="true"]{background:var(--coral-soft);color:var(--coral-strong);font-weight:800}
   .stp-nav button svg{width:17px;height:17px;flex:none}
   .stp-nav .stp-nav-dot{margin-left:auto;width:7px;height:7px;border-radius:50%;background:var(--coral)}
   .stp-main{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:6px 26px}
   .stp-sec{padding:26px 0;border-bottom:1px solid var(--line2);scroll-margin-top:96px}
   .stp-sec:last-child{border-bottom:0}
   .stp-sec > header{margin-bottom:18px}
   .stp-sec h2{margin:0;font-size:17px;font-weight:800;color:var(--ink)}
   .stp-sec > header p{margin:3px 0 0;font-size:13px;color:var(--mute)}
   .stp-field{display:flex;flex-direction:column;gap:6px;padding:16px 0;border-top:1px solid var(--line2)}
   .stp-sec > header + .stp-field{border-top:0;padding-top:0}
   .stp-label{font-size:13.5px;font-weight:700;color:var(--ink)}
   .stp-help{font-size:12.5px;line-height:1.55;color:var(--mute);margin:0}
   .stp-help b{color:var(--slate)}
   .stp-err{font-size:12.5px;font-weight:600;color:var(--coral-deep);margin:0}
   .stp-count{font-size:12.5px;font-weight:600;color:var(--slate)}
   .stp-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
   
   /* inputs */
   .stp input[type="text"],.stp input[type="number"],.stp input[type="password"],.stp input[type="time"],.stp select,.stp textarea{padding:9px 12px;border:1.5px solid #E2DEDA;border-radius:10px;font:inherit;font-size:13.5px;color:var(--ink);background:#fff;max-width:100%}
   .stp input:focus,.stp select:focus,.stp textarea:focus{outline:none;border-color:var(--coral);box-shadow:0 0 0 3px rgba(238,96,85,.14)}
   .stp .bad input,.stp .bad textarea,.stp .bad select,.stp input.bad{border-color:var(--coral-deep)}
   .stp input[type="number"]{width:140px}
   .stp textarea{width:100%;resize:vertical;min-height:110px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.55}
   .stp select{min-width:min(220px,100%)}
   .stp input:disabled,.stp select:disabled{background:var(--paper);color:var(--mute)}
   
   /* switches (a real checkbox, styled) */
   .stp-switch{display:flex;align-items:flex-start;gap:12px;cursor:pointer}
   .stp-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
   .stp-track{width:40px;height:22px;border-radius:999px;background:#DCD8D4;position:relative;flex:none;transition:background .15s;margin-top:1px}
   .stp-track::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
   .stp-switch input:checked + .stp-track{background:var(--mint-ink)}
   .stp-switch input:checked + .stp-track::after{left:20px}
   .stp-switch input:focus-visible + .stp-track{outline:2px solid var(--coral);outline-offset:2px}
   .stp-switch input:disabled + .stp-track{opacity:.5}
   .stp-switch-text{display:flex;flex-direction:column;gap:3px;min-width:0}
   .stp-switch-text b{font-size:13.5px;font-weight:700;color:var(--ink)}
   .stp-reveal{margin:10px 0 0 52px;display:flex;flex-direction:column;gap:12px}
   
   /* day chips and filter chips */
   .stp-days{display:flex;gap:6px;flex-wrap:wrap}
   .stp-day{padding:6px 12px;border-radius:999px;border:1.5px solid var(--line);background:#fff;font-size:12.5px;font-weight:700;color:var(--mute);cursor:pointer}
   .stp-day[aria-pressed="true"]{background:var(--coral);border-color:var(--coral);color:#fff}
   .stp-chips{display:flex;flex-wrap:wrap;gap:6px}
   .stp-chip{display:inline-flex;align-items:center;gap:6px;background:var(--line2);border-radius:999px;padding:4px 6px 4px 11px;font-size:12.5px;font-weight:600;color:var(--ink)}
   .stp-chip button{width:20px;height:20px;border:0;border-radius:50%;background:transparent;color:var(--mute);cursor:pointer;line-height:1;font-size:14px}
   .stp-chip button:hover{background:#fff;color:var(--ink)}
   .stp-filter{display:flex;flex-direction:column;gap:8px;flex:1 1 280px;min-width:0}
   .stp-filters{display:flex;gap:18px;flex-wrap:wrap}
   
   /* required questions: two cards to choose from */
   .stp-cards{display:flex;gap:14px;flex-wrap:wrap}
   .stp-card{flex:1 1 260px;border:2px solid var(--line);border-radius:14px;padding:16px;background:#fff;display:flex;flex-direction:column;gap:8px;cursor:pointer}
   .stp-card.on{border-color:var(--coral)}
   .stp-card:not(.on):hover{border-color:#D9D4CE}
   .stp-card-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
   .stp-card-top input{width:18px;height:18px;accent-color:var(--coral);margin:0;flex:none}
   .stp-card-top label{flex:1;cursor:pointer}
   .stp-card-top b{font-size:15px;font-weight:700;color:var(--ink)}
   .stp-tag{font-size:10.5px;font-weight:700;color:#0C2A22;background:#D3FBF1;padding:3px 8px;border-radius:999px;white-space:nowrap}
   .stp-tag.plain{color:var(--slate);background:var(--line2)}
   .stp-card ul{margin:0 0 0 28px;padding-left:16px;font-size:13px;line-height:1.6;color:#444}
   .stp-card details{margin-left:28px;font-size:12.5px;line-height:1.6;color:#666}
   .stp-card summary{cursor:pointer;color:var(--coral-strong);font-weight:700;font-size:12.5px;list-style:none}
   .stp-card summary::-webkit-details-marker{display:none}
   .stp-card details p{margin:8px 0 0;background:var(--paper);border-radius:10px;padding:10px 12px}
   
   /* form display grid */
   .stp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px}
   
   /* captcha key status and proxy list */
   .stp-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:#0C2A22;background:#D3FBF1;border-radius:999px;padding:3px 9px;white-space:nowrap}
   .stp-pill.plain{background:var(--line2);color:var(--slate)}
   .stp-pill .stp-dot{width:7px;height:7px;margin:0;vertical-align:0;background:var(--mint-ink)}
   /* captcha key: contactID Key or My own key, and the own key's box */
   .stp-field > .stp-cards{margin-top:4px}
   .stp-field > .stp-note,.stp-keybox .stp-note{margin:0}
   .stp-keybox .stp-row > .stp-label{min-width:56px}
   .stp-box{border:1.5px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;background:#fff}
   .stp-list{border:1px solid var(--line);border-radius:12px;max-height:280px;overflow:auto;background:#fff}
   .stp-list-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line2);font-size:12.5px}
   .stp-list-row:last-child{border-bottom:0}
   /* a proxy's reason (why it is not used, why it failed) on a line of its own under it */
   .stp-list-row.has-why{flex-wrap:wrap}
   .stp-why{flex:0 0 100%;font-size:12px;line-height:1.5;color:var(--slate)}
   .stp-list.stp-proxies{max-height:440px}
   .stp-list-row code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all;flex:1;min-width:0}
   .stp-list-empty{padding:14px;font-size:12.5px;color:var(--mute)}
   .stp-ok{color:var(--mint-ink);font-weight:700;white-space:nowrap}
   .stp-bad{color:var(--coral-deep);font-weight:700;white-space:nowrap}
   .stp-warn{color:var(--amber-ink);font-weight:700;white-space:nowrap}
   /* A proxy's status has several parts ("failed · it is asked again at 10:42 · 2 connection failures"). On one line that
      never wraps, a phone showed the start of it and the list scrolled sideways for the rest (Nov 16, 2026): the row
      wraps (the status goes under the proxy when both do not fit) and the status breaks between its parts. */
   .stp-proxies .stp-list-row{flex-wrap:wrap}
   .stp-proxies .stp-list-row code{flex:1 1 140px}
   .stp-status{white-space:normal;min-width:0;max-width:100%}
   /* a part stays whole and goes to the next line as one piece; only a part wider than the row itself (a long
      translation on a phone: Japanese at 320px) breaks inside */
   .stp-status .stp-bit{display:inline-block;max-width:100%;white-space:normal;overflow-wrap:anywhere;vertical-align:top}
   /* an example of a proxy is one long word: it breaks instead of leaving a narrow screen */
   .stp-more code{overflow-wrap:anywhere}
   .stp details.stp-more{font-size:12.5px;color:var(--slate)}
   .stp details.stp-more summary{cursor:pointer;font-weight:700;color:var(--coral-strong)}
   .stp details.stp-more ul,.stp details.stp-more ol{margin:8px 0 0;padding-left:20px;line-height:1.7}
   .stp details.stp-more code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
   .stp-recent{list-style:none;margin:0;padding:10px 12px;background:var(--paper);border-radius:10px;display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:var(--slate)}
   .stp-recent span{color:var(--mute)}
   /* an AI app's name with its real logo (assets/js/settings-page.js appWho) */
   .stp-app,.stp-recent .stp-app{display:inline-flex;align-items:center;gap:4px;color:var(--ink);font-weight:600;vertical-align:bottom}
   .stp-app-logo{width:14px;height:14px;flex:none;object-fit:contain;border-radius:3px;background:#fff}
   
   /* the bar that appears while something is not saved */
   .stp-unsaved{position:fixed;left:50%;bottom:22px;transform:translate(-50%,140%);z-index:900;display:flex;align-items:center;gap:14px;background:#1F1D1B;color:#fff;border-radius:14px;padding:10px 12px 10px 18px;box-shadow:0 18px 40px -12px rgba(0,0,0,.45);transition:transform .25s ease,visibility 0s linear .25s;visibility:hidden;max-width:calc(100vw - 32px)}
   .stp-unsaved.on{transform:translate(-50%,0);visibility:visible;transition:transform .25s ease,visibility 0s linear 0s}
   /* under the open support chat (assets/js/chatgram-support.js: zIndex 400, html.cg-chat-open while it is open) */
   html.cg-chat-open .stp-unsaved{z-index:390}
   .stp-unsaved span{font-size:13.5px;font-weight:600}
   .stp-unsaved .stp-btn.ghost{color:#D9D4CE}
   .stp-unsaved .stp-btn.ghost:hover{background:rgba(255,255,255,.1);color:#fff}
   
   /* a question before something that cannot be undone */
   .stp-modal-bg{position:fixed;inset:0;background:rgba(20,18,16,.45);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
   .stp-modal{background:#fff;border-radius:16px;max-width:440px;width:100%;padding:22px;box-shadow:0 24px 60px -12px rgba(0,0,0,.35)}
   .stp-modal h3{margin:0 0 8px;font-size:17px;color:var(--ink)}
   .stp-modal p{margin:0 0 18px;font-size:13.5px;color:var(--slate);white-space:pre-line}
   .stp-modal .stp-acts{justify-content:flex-end}
   
   /* waiting for the extension */
   .stp-skel{height:14px;border-radius:7px;background:linear-gradient(90deg,var(--line2),#F7F5F2,var(--line2));background-size:200% 100%;animation:stp-shine 1.2s linear infinite;margin:10px 0}
   @keyframes stp-shine{to{background-position:-200% 0}}
   .stp-empty{text-align:center;padding:40px 20px;background:#fff;border:1px solid var(--line);border-radius:var(--r)}
   .stp-empty .stp-pc{margin:0 auto 14px;width:52px;height:52px;border-radius:14px}
   .stp-empty h2{margin:0 0 8px;font-size:18px;color:var(--ink)}
   .stp-empty p{margin:0 auto 18px;max-width:560px;color:var(--slate);font-size:13.5px}
   .stp-empty .stp-acts{justify-content:center}
   
   @media (max-width:1000px){
     /* minmax(0, ...) as on a wide screen: with a plain 1fr the column is as wide as its widest piece that cannot
        wrap (a select with a long choice, a long button), and on a phone the whole page was wider than the screen
        whenever proxies were on (406px on a 320px screen, measured Nov 16, 2026) */
     .stp-layout{grid-template-columns:minmax(0,1fr)}
     .stp-nav{position:sticky;top:76px;z-index:20;flex-direction:row;overflow-x:auto;padding:6px;gap:4px}
     .stp-nav button{width:auto;white-space:nowrap;padding:8px 12px}
   }
   @media (max-width:640px){
     .stp-main{padding:4px 16px}
     /* a long button ("Put the browser back on its own connection") takes two lines instead of leaving the screen */
     .stp-btn{white-space:normal;text-align:center}
     .stp-box{padding:12px}
     .stp-grid{grid-template-columns:1fr}
     .stp-reveal{margin-left:0}
     .stp-card ul,.stp-card details{margin-left:0}
     .stp-top{padding:14px}
     /* above the support chat button (bottom right, 20px + 60px: assets/js/chatgram-support.js), like a message above a
        floating button: Save and the chat both stay in reach */
     .stp-unsaved{left:16px;right:16px;bottom:92px;transform:translateY(calc(100% + 120px));flex-wrap:wrap;justify-content:space-between}
     .stp-unsaved.on{transform:none}
   }
   @media (prefers-reduced-motion:reduce){
     .stp-unsaved,.stp-track,.stp-track::after{transition:none}
     .stp-skel{animation:none}
   }
   