/* SayStak security page (security.html). Shares site.css; this adds the page's own pieces.
   IDEA  "You hold the keys": a key card in the hero, then one working example control per section.
   Examples are clearly labelled and change nothing real (security.js). */

.sec { background: var(--bg); --text-3: #67646f; }
.sx-kicker { font: 600 14px/1 var(--sans); color: var(--accent); }
.sx-hero { padding: 72px 0 96px; background: radial-gradient(90% 120% at 85% 10%, #dfe8ff 0%, rgba(223, 232, 255, 0) 60%), var(--bg); border-bottom: 1px solid var(--line); }
.sx-hero-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.sx-hero h1 { margin-top: 16px; font-size: clamp(46px, 6.4vw, 84px); line-height: .98; }
.sx-lede { margin-top: 22px; font-size: clamp(18px, 1.6vw, 21px); color: var(--text-2); max-width: 30em; }
.sx-ctas { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

/* The key card */
.sx-keycard { position: relative; background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 1px 2px rgba(25, 24, 32, .06), 0 30px 60px -24px rgba(20, 43, 156, .35); border: 1px solid #e4e7f3; }
.sx-keycard::before { content: ""; position: absolute; inset: -14px -14px auto auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #83b2ff 0%, rgba(131, 178, 255, 0) 70%); z-index: -1; }
.kc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #efede8; }
.kc-head b { display: block; font-size: 16px; }
.kc-head small { color: var(--text-3); font-size: 13px; }
.kc-av, .sp-av { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #eef1ff; display: grid; place-items: center; overflow: hidden; }
.kc-av svg { width: 44px; height: 44px; margin-top: 6px; }
.kc-pill { margin-left: auto; font: 600 12px/1 var(--sans); color: #1f3fa8; background: #e8eeff; border-radius: 999px; padding: 7px 10px; white-space: nowrap; }
.kc-list li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #f3f1ec; font-size: 15px; }
.kc-list li:last-child { border-bottom: 0; }
.kc-list em { margin-left: auto; font: 600 12.5px/1 var(--sans); font-style: normal; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.kc-list em.on { color: #136c46; background: #e4f6ec; }
.kc-list em.kc-ask { color: #8a4b05; background: #fdf0d8; }
.kc-list em.off { color: var(--text-3); background: #f1f0ec; }
.kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: #fbf7ee; font: 500 14px/1.3 var(--sans); color: #6b4a12; }
.kc-dot { width: 8px; height: 8px; border-radius: 50%; background: #e69a19; box-shadow: 0 0 0 4px rgba(230, 154, 25, .18); }

/* Sections */
.sx-row { padding: 104px 0; }
.sx-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sx-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.sx-flip .sx-copy { order: 2; }
.sx-copy h2 { font-size: clamp(32px, 3.8vw, 48px); }
.sx-copy > p { margin-top: 16px; font-size: 18px; color: var(--text-2); max-width: 30em; }
.sx-center { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sx-center > p { margin-left: auto; margin-right: auto; }
.sx-facts { margin-top: 24px; display: grid; gap: 12px; }
.sx-facts li { padding-left: 18px; position: relative; color: var(--text-2); font-size: 16px; }
.sx-facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--m-body); }
.sx-facts b { color: var(--ink); font-weight: 600; }
.sx-checks { margin-top: 22px; display: grid; gap: 10px; }
.sx-checks li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.sx-checks li::before { content: "✓"; color: #136c46; font-weight: 700; }

/* Example panels */
.sx-panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 24px 50px -30px rgba(25, 24, 32, .35); }
.sx-alt .sx-panel { background: var(--bg); box-shadow: none; }
.sp-label { font: 600 13px/1 var(--sans); color: var(--text-2); margin: 4px 0 10px; }
.sp-note { margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.sp-say { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f3f6ff; color: #1f3fa8; font-size: 14.5px; min-height: 46px; }
.sp-av { width: 30px; height: 30px; border-radius: 9px; }
.sp-av svg { width: 33px; height: 33px; margin-top: 5px; }

.sp-tabs { display: flex; gap: 6px; padding: 4px; background: var(--muted-bg); border-radius: 12px; }
.sp-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 600; cursor: pointer; }
.sp-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(25, 24, 32, .12); }
.sp-tabs .sp-av { width: 24px; height: 24px; border-radius: 7px; }
.sp-tabs .sp-av svg { width: 27px; height: 27px; }
.sp-apps { margin-top: 8px; }
.sp-apps li, .conns li { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #f0eee9; }
.sp-apps li:last-child, .conns li:last-child { border-bottom: 0; }
.sp-apps li > span:not(.hl), .conns li > span { flex: 1; display: flex; flex-direction: column; }
.sp-apps b, .conns b { font-weight: 600; font-size: 15px; }
.sp-apps small, .conns small { color: var(--text-3); font-size: 13px; }

/* Switch */
.sw { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; border: 0; background: #d6d3cc; cursor: pointer; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.sw[aria-checked="true"] { background: #2e9e63; }
.sw[aria-checked="true"]::after { transform: translateX(18px); }

/* Segmented control and channel chips */
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--muted-bg); border-radius: 12px; margin-bottom: 20px; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 0 6px; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(25, 24, 32, .12); }
.chans { display: flex; flex-wrap: wrap; gap: 8px; }
.chans button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text-3); font-weight: 600; cursor: pointer; text-decoration: line-through; }
.chans button[aria-pressed="true"] { color: var(--ink); border-color: #9db6f0; background: #eef3ff; text-decoration: none; }
.sp-preview { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #e7e5df; }
.sp-preview p { font-size: 15px; }

/* Approval */
.ap-head { display: flex; align-items: center; gap: 10px; }
.ap-head p { font-size: 15px; }
.ap-state { margin-left: auto; font: 600 12px/1 var(--sans); padding: 7px 10px; border-radius: 999px; background: #fdf0d8; color: #8a4b05; white-space: nowrap; }
.ap-state.ok { background: #e4f6ec; color: #136c46; }
.ap-state.no { background: #f1f0ec; color: var(--text-2); }
.ap-mail { margin-top: 14px; padding: 16px; border-radius: 14px; background: #faf9f6; border: 1px solid #eceae4; font-size: 15px; color: #3b3944; }
.ap-to { font-size: 13px; color: var(--text-3); }
.ap-to span { display: inline-block; width: 28px; font-weight: 600; }
.ap-subj { margin: 6px 0 8px; font-weight: 600; color: var(--ink); }
.ap-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.b-dark, .b-line, .b-text { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 11px; font: 600 14.5px/1 var(--sans); cursor: pointer; }
.b-dark { background: var(--ink); color: #fff; border: 0; }
.b-line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.b-text { background: transparent; border: 0; color: var(--text-2); }
.b-line.sm { flex: none; min-height: 36px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.conns .st { flex: none; }
.ap-btns button:disabled { opacity: .45; cursor: default; }

/* Budget */
.bud-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bud-top b { font: 600 26px/1.1 var(--serif); }
.bud-top small { color: var(--text-3); font-size: 13.5px; }
.sx-panel input[type="range"] { width: 100%; margin: 16px 0 12px; accent-color: var(--m-body); height: 28px; }
.bud-bar { height: 10px; border-radius: 999px; background: #e9e7e1; overflow: hidden; }
.bud-bar i { display: block; height: 100%; background: linear-gradient(90deg, #83b2ff, #3268e7); border-radius: inherit; transition: width .3s, background .3s; }
.bud-bar i.full { background: linear-gradient(90deg, #f6b34a, #e0632c); }
.bud-used { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.bud-ask { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid #e7e5df; font-size: 14.5px; }
.bud-ask p { flex: 1; }
.bud-btn { font: 600 13px/1 var(--sans); padding: 9px 12px; border-radius: 9px; background: var(--ink); color: #fff; white-space: nowrap; }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.roles li { padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.roles b { font: 600 19px/1.2 var(--serif); }
.roles p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.roles li:first-child { background: var(--charcoal); border-color: var(--charcoal); }
.roles li:first-child b, .roles li:first-child p { color: #fff; }
.roles li:first-child p { color: var(--paper-2); }
.roles-extra { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roles-extra p { padding: 16px 18px; border-radius: 14px; background: #eef3ff; color: #24356e; font-size: 15px; }

/* Connections */
.st { font: 600 12px/1 var(--sans); font-style: normal; padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.st.on { color: #136c46; background: #e4f6ec; }
.st.wait { color: #8a4b05; background: #fdf0d8; }
.st.off { color: var(--text-3); background: #f1f0ec; }
.sched { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #e7e5df; }
.sched span { flex: 1; display: flex; flex-direction: column; }
.sched b { font-weight: 600; font-size: 15px; }
.sched small { color: var(--text-3); font-size: 13px; }

/* Data */
.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.data-grid li { padding: 26px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.data-grid h3 { font: 600 20px/1.2 var(--serif); }
.data-grid p { margin-top: 10px; color: var(--text-2); font-size: 15.5px; }
.sx-faq { border-top: 1px solid var(--line); }


@media (max-width: 980px) {
  .sx-hero-row, .sx-grid { grid-template-columns: 1fr; gap: 40px; }
  .sx-flip .sx-copy { order: 0; }
  .roles { grid-template-columns: 1fr 1fr; }
  .roles-extra, .data-grid { grid-template-columns: 1fr; }
  .sx-row { padding: 80px 0; }
  .sx-hero { padding: 48px 0 72px; }
}
@media (max-width: 560px) {
  .seg { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: 1fr; }
  .kc-pill { display: none; }
  .conns .st { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sw, .sw::after, .bud-bar i { transition: none; }
}
