.appbody { background: var(--cream); }
.apphead { position: relative; color: #fff; overflow: hidden; isolation: isolate; padding-bottom: 56px; }
.apphead .sky { background: url("/assets/sky-card2.jpg") center 75% / cover no-repeat, linear-gradient(180deg, #031435, #002b68); }
.apphero { margin-top: 30px; }
.apphero h1 { margin-top: 14px; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; font-weight: 500; letter-spacing: -.028em; }
.apphero .lede { max-width: 620px; }
.netpill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; font-size: 13px; color: #fff; background: rgba(90, 110, 150, .42); border: 1px solid rgba(210, 222, 255, .38); }
.netpill i { width: 7px; height: 7px; background: #8a93a6; }
.netpill.ok i { background: #7be0a6; } .netpill.bad i { background: #f0b46a; }
button.b { border-radius: 2px; }
button.b:disabled { opacity: .38; cursor: not-allowed; }

.notice { margin-top: 30px; padding: 14px 18px; border: 1px solid #e2c39b; background: #f8ecdc; color: #6e430f; font-size: 13.5px; }
.panel { position: relative; margin-top: 44px; border: 1px solid var(--rule); background: rgba(255, 255, 255, .25); padding: 30px 28px; }
.panel::before, .panel::after { content: ""; position: absolute; width: 5px; height: 5px; background: var(--mark); top: -3px; left: -3px; }
.panel::after { left: auto; right: -3px; }
.ph2 h2 { margin-top: 10px; font-size: clamp(24px, 2.3vw, 32px); font-weight: 400; letter-spacing: -.02em; }
.row2 { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }

.steps { list-style: none; margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); }
.st { padding: 22px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 18px; }
.st:first-child { border-left: 0; }
.st.done .n { background: var(--ink); color: #fff; }
.sh { display: flex; gap: 14px; }
.n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--rule); color: var(--gray); }
.sh h3, .act h3 { font-size: 16.5px; font-weight: 500; letter-spacing: -.01em; }
.sh p, .act p { margin-top: 6px; font-size: 12.8px; line-height: 1.5; color: var(--gray); }
.sb { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.fl { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink); }
.fl em { font-style: normal; color: var(--gray2); margin-left: 4px; }
.fl input { height: 40px; padding: 0 12px; border: 1px solid var(--rule); background: var(--paper); font: 13px Inter, sans-serif; color: var(--ink); border-radius: 2px; outline: none; }
.fl input.mono { font-family: var(--mono); font-size: 12.5px; }
.fl input:focus { border-color: #9b9a90; }
.fl input[type=file] { height: auto; padding: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper); }
.kv span { color: var(--gray); }
.kv code { font: 11.5px var(--mono); color: var(--ink); word-break: break-all; }
.kv a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.kv.wide { margin-top: 14px; }
.rehearse { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: 12.8px; color: var(--gray); }
.rehearse b { color: var(--ink); font-weight: 500; }
.ok { color: #23704c !important; font-size: 12.8px; }

.loadform { display: flex; gap: 6px; min-width: min(100%, 460px); }
.loadform input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--rule); background: var(--paper); border-radius: 2px; font-size: 12.5px; outline: none; }
.loadform .b { height: 40px; }
.stats4 { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); }
.stats4 > div { padding: 18px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.stats4 > div:first-child { border-left: 0; }
.stats4 span { font-size: 12px; color: var(--gray); }
.stats4 b { font-size: 24px; font-weight: 400; letter-spacing: -.02em; }
.acts3 { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.act { border: 1px solid var(--rule); background: var(--paper); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.act.key { border-color: #c9c3ae; box-shadow: inset 3px 0 0 #2e4d7b; }
.act .b { margin-top: auto; }
.wideact { margin-top: 14px; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; align-items: end; }
.wideact .b { margin: 0; height: 40px; }

.log { list-style: none; margin-top: 20px; display: grid; gap: 6px; font-size: 13px; }
.log li { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--rule); background: var(--paper); }
.log li.empty { color: var(--gray); }
.log time { font: 11.5px var(--mono); color: var(--gray2); flex: none; }
.log .msg { flex: 1; }
.log .err { color: #9a3d12; }
.log a { font: 11.5px var(--mono); color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.foot.sm { margin-top: 90px; }
.foot.sm .legal { border-top: 0; padding: 40px 0; }

@media (max-width: 980px) {
  .steps, .acts3, .stats4 { grid-template-columns: 1fr; }
  .st, .stats4 > div { border-left: 0; border-top: 1px solid var(--rule); }
  .st:first-child, .stats4 > div:first-child { border-top: 0; }
  .wideact { grid-template-columns: 1fr; }
  .navr .netpill { display: none; }
}

[hidden] { display: none !important; }
.fl > em { margin-top: -3px; margin-left: 0; font-size: 11.5px; }

.netpill select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: #fff; font: 13px Inter, sans-serif; cursor: pointer; padding-right: 14px; outline: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: right 4px center, right 0 center; background-size: 4px 4px; background-repeat: no-repeat; }
.netpill select option { color: #111; }

.assetpick { margin-top: 22px; max-width: 280px; }
.assetpick select { height: 40px; padding: 0 12px; border: 1px solid var(--rule); background: var(--paper); font: 13px Inter, sans-serif; color: var(--ink); border-radius: 2px; }
.fl textarea { padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); font: 12.5px var(--mono); color: var(--ink); border-radius: 2px; outline: none; resize: vertical; }
.gasless { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--ink); }
.gasless input { width: 16px; height: 16px; accent-color: #2e4d7b; }
#reqBox { grid-template-columns: 1.2fr 1fr auto auto; }
#rLink { word-break: break-all; }

/* v2: frozen banner, agents, sentinel, audit dialog */
.frozen { margin-top: 18px; display: grid; grid-template-columns: 1fr 260px auto; gap: 14px; align-items: end; padding: 16px 18px; border: 1px solid #d9a9a0; background: #f6e3de; color: #6d2414; font-size: 13.5px; }
.frozen b { font-weight: 600; }
.lede2 { margin-top: 14px; max-width: 820px; font-size: 13.5px; line-height: 1.6; color: var(--gray); }
.lede2 code, .hint code { font: 12px var(--mono); color: var(--ink); }
.hint { margin-top: 12px; font-size: 12.8px; color: var(--gray); }
#newAgent { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
#newAgent > div:first-child { grid-column: 1 / -1; }
.agent { align-content: start; margin-top: 14px; border: 1px solid var(--rule); background: var(--paper); padding: 20px; display: grid; gap: 14px; }
.agent .top { align-self: start; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.agent .top h3 { font-size: 16.5px; font-weight: 500; }
.agent .top code { font: 11.5px var(--mono); color: var(--gray); word-break: break-all; }
.pill { display: inline-block; padding: 2px 8px; font-size: 11.5px; border: 1px solid var(--rule); margin-left: 8px; color: var(--gray); }
.pill.on { color: #23704c; border-color: #9fcfb5; background: #e6f4ec; } .pill.off { color: #9a3d12; border-color: #e2b9a2; background: #f8ece4; }
.agent .grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); }
.agent .grid > div { padding: 12px 14px; border-left: 1px solid var(--rule); display: grid; gap: 4px; font-size: 12px; color: var(--gray); }
.agent .grid > div:first-child { border-left: 0; } .agent .grid b { font-size: 16px; font-weight: 400; color: var(--ink); }
.agent .cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.agent textarea { min-height: 96px; }
.agent .row { display: flex; gap: 8px; flex-wrap: wrap; }
.runs { list-style: none; display: grid; gap: 6px; font-size: 12.8px; }
.runs li { border: 1px solid var(--rule); padding: 10px 12px; background: var(--cream); }
.runs li .q { color: var(--gray); font-size: 12px; } .runs li .a { margin-top: 6px; white-space: pre-wrap; } .runs li .e { margin-top: 6px; color: #9a3d12; }
.runs li a { font: 11.5px var(--mono); color: var(--ink); text-decoration: underline; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink); }
.check input { width: 16px; height: 16px; accent-color: #2e4d7b; }
#alerts li.high .msg { color: #9a3d12; } #alerts li .msg b { font-weight: 500; }
dialog#audit { margin: auto; width: min(680px, calc(100% - 32px)); max-height: calc(100% - 48px); border: 1px solid var(--rule); background: var(--cream); padding: 0; color: var(--ink); }
dialog#audit::backdrop { background: rgba(3, 20, 53, .55); }
.ad { padding: 26px 26px 22px; display: grid; gap: 14px; }
.ad h2 { font-size: 22px; font-weight: 400; letter-spacing: -.015em; }
.ad h2.stop { color: #9a3d12; } .ad h2.review { color: #8a5a0f; } .ad h2.ok { color: #23704c; }
.adcalls, .adwarn { list-style: none; display: grid; gap: 6px; font-size: 13px; }
.adcalls li { padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); display: flex; justify-content: space-between; gap: 12px; }
.adcalls li span:last-child { font: 11.5px var(--mono); color: var(--gray); white-space: nowrap; }
.adcalls li.bad span:last-child { color: #9a3d12; }
.adwarn li { padding: 10px 12px; border-left: 3px solid var(--rule); background: var(--paper); line-height: 1.5; }
.adwarn li.high { border-color: #c4532c; } .adwarn li.medium { border-color: #d39b3a; } .adwarn li.info { border-color: #8a93a6; color: var(--gray); }
.adai { padding: 12px 14px; background: #e8edf6; border: 1px solid #c6d1e6; font-size: 13px; line-height: 1.6; }
.admeta { font: 11px var(--mono); color: var(--gray2); word-break: break-all; }
.adbtn { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 980px) {
  .frozen, #newAgent, .agent .cols, .agent .grid { grid-template-columns: 1fr; }
  .agent .grid > div { border-left: 0; border-top: 1px solid var(--rule); } .agent .grid > div:first-child { border-top: 0; }
}
.assetpick select { appearance: none; -webkit-appearance: none; width: 100%; padding: 0 40px 0 12px; cursor: pointer; outline: none;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23161616' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; }
.assetpick select:focus { border-color: #9b9a90; }
.liveproof { margin-top: 26px; padding: 12px 16px; border: 1px solid #9fcfb5; background: #e6f4ec; color: #1d5a3d; font-size: 13px; line-height: 1.6; }
.liveproof a { color: #1d5a3d; text-decoration: underline; text-underline-offset: 2px; font-family: var(--mono); font-size: 12px; }
/* v3: vault type picker */
.vtype { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vt { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--rule); background: var(--paper); font-size: 13px; line-height: 1.55; color: var(--gray); cursor: pointer; }
.vt b { color: var(--ink); font-weight: 500; }
.vt input { margin-top: 3px; accent-color: #2e4d7b; }
.vt.on { border-color: #2e4d7b; box-shadow: inset 3px 0 0 #2e4d7b; }
.badge { font-style: normal; font-size: 11px; color: #23704c; border: 1px solid #9fcfb5; background: #e6f4ec; padding: 1px 6px; margin-left: 4px; }
@media (max-width: 980px) { .vtype { grid-template-columns: 1fr; } }
/* inline results under the button that was pressed, and a toast */
.fmsg { margin-top: 2px; padding: 9px 11px; font-size: 12.8px; line-height: 1.5; border-left: 3px solid; }
.fmsg.err { color: #8a2f0c; background: #f8e7df; border-color: #c4532c; }
.fmsg.ok { color: #1d5a3d; background: #e6f4ec; border-color: #2f9e67; }
.fmsg:empty { display: none; }
.hint2 { font-size: 12px; color: #8a5a0f; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: min(420px, calc(100% - 36px)); padding: 12px 14px; font-size: 13px; line-height: 1.5; box-shadow: 0 10px 30px rgba(3, 20, 53, .25); }
#toast.err { background: #8a2f0c; color: #fff; } #toast.ok { background: #1d5a3d; color: #fff; }
/* plans */
.plannow { font-size: 13.5px; color: var(--gray); max-width: 520px; text-align: right; }
.plannow b { color: var(--ink); font-weight: 500; }
.plans { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pc { border: 1px solid var(--rule); background: var(--paper); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.pc.want { border-color: #2e4d7b; background: #f3f6fb; }
.pc.on { border-color: #2e4d7b; box-shadow: inset 3px 0 0 #2e4d7b; }
.pc h3 { font-size: 18px; font-weight: 500; }
.pc .pr { font-size: 26px; letter-spacing: -.02em; } .pc .pr small { font-size: 13px; color: var(--gray); }
.pc .or { font-size: 12.5px; color: #1d5a3d; }
.pc ul { list-style: none; display: grid; gap: 6px; font-size: 12.8px; color: var(--gray); line-height: 1.45; }
.pc ul li::before { content: "✓  "; color: #23704c; }
#planBuy { margin-top: 14px; grid-template-columns: 1.4fr .7fr .5fr 1.2fr auto; gap: 14px; }
#planBuy select { height: 40px; padding: 0 12px; border: 1px solid var(--rule); background: var(--paper); font: 13px Inter, sans-serif; }
.th { margin-top: 22px; font-size: 16.5px; font-weight: 500; }
@media (max-width: 980px) { .plans, #planBuy { grid-template-columns: 1fr; } .plannow { text-align: left; } }

/* migrate: move funds from an exposed wallet into the vault */
#migPanel .note { margin-top: 10px; font-size: 13px; color: var(--gray); max-width: 820px; line-height: 1.55; }
.miglist { list-style: none; margin-top: 16px; border: 1px solid var(--rule); background: var(--paper); }
.miglist li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.miglist li:last-child { border-bottom: 0; }
.miglist li .amt { font-family: var(--mono); font-size: 12.5px; }
.miglist li.empty, .miglist li.info { display: block; color: var(--gray); }
.miglist li.done { opacity: .55; }
.migact { margin-top: 14px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.expo { display: inline-block; font: 600 11px var(--mono); padding: 2px 7px; margin-left: 6px; }
.expo.bad { background: #f8e7df; color: #8a2f0c; } .expo.ok { background: #e6f4ec; color: #1d5a3d; }
@media (max-width: 640px) { .miglist li { grid-template-columns: 1fr auto; } .miglist li .amt { grid-column: 1 / -1; } }
