/* Remedy Client Portal. Same tokens as remedy.global and the file host:
   #0b0b0b ground, #f2f2f0 ink, Archivo Black display, Geist text. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0b0b0b; color: #f2f2f0; font-family: 'Geist', 'Archivo', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.55; }
::selection { background: #f2f2f0; color: #0b0b0b; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

a { color: #f2f2f0; transition: color 0.3s ease; }
a:hover { color: #8f8f8b; }
.mono, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; }
.black { font-family: 'Archivo Black', 'Archivo', sans-serif; text-transform: uppercase; font-weight: 400; }
.muted { color: #8f8f8b; }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* top bar */
.top { padding: 12px clamp(12px, 3vw, 32px); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 10px 10px 10px 16px; border: 1px solid #222; border-radius: 14px; background: #0f0f0f; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #f2f2f0; }
.lockup:hover { color: #f2f2f0; }
.lockup img { width: 44px; height: 44px; object-fit: contain; }
.lockup span { display: flex; flex-direction: column; }
.lockup b { font-size: 16px; letter-spacing: .04em; line-height: 1.3; }
.lockup small { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: #8f8f8b; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav form { margin: 0; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) clamp(16px, 3vw, 32px) 80px; }
.wrap-narrow { max-width: 480px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.head > div { min-width: 0; }
.label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: #8f8f8b; margin: 0 0 8px; }
.h1 { font-size: clamp(26px, 4.5vw, 40px); line-height: 1.05; letter-spacing: .01em; margin: 0; overflow-wrap: anywhere; }
.h2 { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #8f8f8b; margin: 36px 0 12px; }
.lede { color: #c9c9c5; margin: 10px 0 0; max-width: 62ch; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { justify-content: space-between; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }

/* surfaces */
.card { background: #111111; border: 1px solid #262626; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); padding: 18px 20px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; overflow-wrap: anywhere; }
.card p { margin: 6px 0 0; }
.card h3 + form, .card h3 + .field, .card > form, .card > .inline-form, .card > .scroll, .card > .note { margin-top: 14px; }
.card > form:first-child { margin-top: 0; }
.panel form { margin-top: 22px; }
.panel form + p, .panel > p.small { margin: 16px 0 0; }
.panel { border: 1px solid #2c2c2c; background: #121212; border-radius: 12px; padding: clamp(20px, 4vw, 28px); }
.stat { font-family: 'Archivo Black', 'Archivo', sans-serif; font-size: 30px; line-height: 1.1; margin: 2px 0 0; }
.empty { color: #8f8f8b; padding: 22px 20px; margin: 0; }
.scroll { overflow-x: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Geist', sans-serif; font-size: 14px; font-weight: 600; white-space: nowrap; line-height: 1.2; color: #f2f2f0; background: #141414; border: 1px solid #2c2c2c; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); padding: 10px 16px; cursor: pointer; text-decoration: none; transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover { background: #1a1a1a; border-color: #4a4a4a; color: #f2f2f0; }
.btn:active { transform: scale(0.96); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #f2f2f0; outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-solid { background: #f2f2f0; color: #0b0b0b; border-color: #f2f2f0; box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 8px 24px rgba(242,242,240,0.12); }
.btn-solid:hover { background: #ffffff; color: #0b0b0b; border-color: #ffffff; }
.btn-sm { font-size: 13px; padding: 7px 12px; }
.btn-wide { width: 100%; }
.btn.is-on { border-color: #f2f2f0; }
.linklike { background: none; border: 0; padding: 0; color: #c9c9c5; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.linklike:hover { color: #f2f2f0; }

/* pills */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.pill-solid { color: #0b0b0b; background: #f2f2f0; }
.pill-line { color: #c9c9c5; border-color: #333; font-weight: 500; }
.pill-warn { color: #f2f2f0; border-color: #f2f2f0; border-style: dashed; }
.pill-alert { color: #f2f2f0; background: #2a1212; border-color: #5a2c2c; }

/* forms */
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #8f8f8b; margin: 0 0 8px; }
.field small { display: block; color: #8f8f8b; font-size: 13px; margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select { background: #0b0b0b; border: 1px solid #2c2c2c; border-radius: 10px; color: #f2f2f0; font-family: 'Geist', sans-serif; font-size: 15px; padding: 12px 14px; width: 100%; transition: border-color 0.25s ease; }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.card textarea { min-height: 96px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8f8f8b 50%), linear-gradient(135deg, #8f8f8b 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input::placeholder, textarea::placeholder { color: #6f6f6b; }
input:focus, textarea:focus, select:focus { border-color: #f2f2f0; outline: none; }
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; letter-spacing: .4em; text-align: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.inline-form select, .inline-form input { width: auto; flex: 1 1 140px; padding: 8px 12px; font-size: 14px; }
.inline-form select { padding-right: 32px; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.or { display: flex; align-items: center; gap: 12px; color: #8f8f8b; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #2c2c2c; }

/* tables */
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #8f8f8b; padding: 14px 16px 12px; border-bottom: 1px solid #262626; white-space: nowrap; }
td { font-size: 14px; padding: 12px 16px; border-bottom: 1px solid #1c1c1c; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td a.title { font-weight: 600; text-decoration: none; }
td a.title:hover { text-decoration: underline; color: #f2f2f0; }

/* messages */
.err { color: #f2f2f0; background: #2a1212; border: 1px solid #5a2c2c; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 0 0 18px; }
.ok { color: #0b0b0b; background: #f2f2f0; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 0 0 18px; }
.note { border: 1px solid #262626; border-radius: 10px; padding: 12px 14px; color: #c9c9c5; font-size: 14px; }

/* ticket thread */
.thread > * + * { margin-top: 12px; }
.msg { border: 1px solid #262626; border-radius: 12px; background: #111111; padding: 14px 18px; }
.msg-staff { border-color: #4a4a4a; background: #151515; }
.msg header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 13px; color: #8f8f8b; margin: 0 0 8px; }
.msg header b { color: #f2f2f0; font-weight: 600; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* one-line network summary on the overview */
.netline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; text-decoration: none; padding: 14px 20px; transition: border-color 0.3s ease; }
.netline:hover { border-color: #4a4a4a; color: #f2f2f0; }

/* status page: one row per server, stacking cleanly on a phone */
.node { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 20px; padding: 14px 20px; border-bottom: 1px solid #1c1c1c; }
.node:last-child { border-bottom: none; }
.node-main { min-width: 0; overflow-wrap: anywhere; }
.node-note { margin-top: 6px; font-size: 14px; color: #c9c9c5; }
.node-side { flex: none; text-align: right; }
.node-side .small { margin-top: 6px; }

/* server status */
.server { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.server .meta { color: #8f8f8b; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.events { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; color: #8f8f8b; }
.events li { padding: 4px 0; }

/* overview: one row per client server (status, ping, flags and updates) */
.srv { display: grid; grid-template-columns: minmax(170px, 1.2fr) 150px 84px minmax(0, 2.2fr); gap: 8px 24px; align-items: start; padding: 14px 20px; border-bottom: 1px solid #1c1c1c; }
.srv:last-child { border-bottom: none; }
.srv > div { min-width: 0; overflow-wrap: anywhere; }
.srv-head { padding: 14px 20px 12px; border-bottom-color: #262626; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #8f8f8b; }
.srv-head > div { overflow-wrap: normal; white-space: nowrap; }
.srv-status .small { margin-top: 6px; }
.srv-ping { font-size: 14px; white-space: nowrap; padding-top: 3px; }
.srv-ping b { display: none; }
.srv-flag { font-size: 14px; color: #c9c9c5; padding-top: 3px; }
.srv .events { margin: 0; }
.srv .events li { padding: 2px 0; }
.srv-flag + .events { margin-top: 6px; }
@media (max-width: 760px) {
  .srv { grid-template-columns: minmax(0, 1fr) auto; }
  .srv-head { display: none; }
  .srv-status { text-align: right; }
  .srv-ping, .srv-notes { grid-column: 1 / -1; padding-top: 0; }
  .srv-ping b { display: inline; color: #8f8f8b; font-weight: 500; margin-right: 6px; }
}

/* links to the agreements, at the foot of every page */
.foot { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 36px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6f6f6b; }
.foot a { color: #6f6f6b; text-decoration: none; }
.foot a:hover { color: #f2f2f0; }
.foot span { margin-right: auto; }
.agree { margin: 14px 0 0; }
.agree-box { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 14px; color: #c9c9c5; cursor: pointer; }
.agree-box input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: #f2f2f0; }
.pay .agree { margin: 0 0 14px; }

/* payment pages: Stripe's card form beside a summary */
.pay-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.pay form { margin-top: 14px; }
.pay-el { min-height: 220px; margin: 0 0 18px; }
.pay-el > p { margin: 0; padding: 6px 0; }
.pay .err { margin: 0 0 14px; }
.pay-foot { margin: 14px 0 0; }
.pay-summary h3 { margin-top: 2px; }
.pay-lines { margin: 16px 0 14px; padding: 0; border-top: 1px solid #1c1c1c; }
.pay-lines > div { display: flex; justify-content: space-between; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid #1c1c1c; font-size: 14px; }
.pay-lines dt { color: #8f8f8b; min-width: 0; overflow-wrap: anywhere; }
.pay-lines dd { margin: 0; text-align: right; white-space: nowrap; }
@media (max-width: 820px) {
  .pay-split { grid-template-columns: 1fr; }
  .pay-summary { order: -1; }
}

pre { background: #111111; border: 1px solid #262626; border-radius: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 1.7; color: #c9c9c5; overflow-x: auto; margin: 10px 0 0; }

/* website previews: a live thumbnail (the real page, drawn 1280 wide and scaled down) */
.thumb { display: block; position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid #262626; border-radius: 10px; background: #0b0b0b; --s: 0.25; transition: border-color 0.3s ease; }
.thumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(var(--s)); transform-origin: 0 0; pointer-events: none; background: #ffffff; }
.thumb-link { display: block; text-decoration: none; }
.thumb-link:hover .thumb, .thumb-link:focus-visible .thumb { border-color: #f2f2f0; }
.site-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: center; }
.site-info h3 { font-size: 20px; }
.site-info .actions, .site-info .note { margin-top: 14px; }
.site-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.site-tile h3 { margin-top: 14px; }
.site-tile p:last-child { margin-top: 12px; }
.site-actions { margin-top: 12px; }
.update .body { color: #c9c9c5; overflow-wrap: anywhere; }
input[type=file] { width: 100%; font-family: 'Geist', sans-serif; font-size: 14px; color: #c9c9c5; background: #0b0b0b; border: 1px dashed #2c2c2c; border-radius: 10px; padding: 12px 14px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: #f2f2f0; background: #141414; border: 1px solid #2c2c2c; border-radius: 8px; padding: 7px 12px; margin-right: 12px; cursor: pointer; }

/* the full preview: the site on the left, its comments on the right */
.wrap-wide { max-width: 1680px; }
.viewer-head { margin-bottom: 14px; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.viewer-frame { position: sticky; top: 12px; height: calc(100vh - 150px); min-height: 480px; border: 1px solid #262626; border-radius: 12px; overflow: hidden; background: #ffffff; }
.viewer-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.viewer-side { max-height: calc(100vh - 150px); min-height: 480px; overflow-y: auto; padding-right: 2px; }
.viewer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.viewer-tools label { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.viewer-tools input { accent-color: #f2f2f0; }
.viewer-side .card { padding: 14px 16px; }
.viewer-side .card textarea { min-height: 76px; margin-top: 8px; font-size: 14px; padding: 10px 12px; }
.viewer-side .card .actions { margin-top: 8px; }
.viewer-side > form.card { margin: 0 0 12px; border-color: #f2f2f0; }
.pv-head { display: flex; gap: 10px; align-items: flex-start; }
.pv-num { flex: none; width: 26px; height: 26px; border-radius: 50% 50% 50% 2px; background: #f2f2f0; color: #0b0b0b; border: 1px solid #f2f2f0; font: 700 12px/1 'Geist', sans-serif; cursor: pointer; padding: 0; }
.pv-where { min-width: 0; }
.pv-where b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pv-thread.is-open { border-color: #f2f2f0; }
.pv-thread.is-done { opacity: .72; }
.pv-thread.is-done .pv-num { background: transparent; color: #f2f2f0; }
.pv-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid #1c1c1c; }
.pv-note b { color: #f2f2f0; font-weight: 600; }
.pv-note .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin-top: 2px; }
.pv-reply { margin-top: 10px; }
.viewer-side .pv-reply textarea { min-height: 44px; margin-top: 0; }
@media (max-width: 900px) {
  .site-card { grid-template-columns: 1fr; }
  .viewer { grid-template-columns: 1fr; }
  .viewer-frame { position: static; height: 70vh; }
  .viewer-side { max-height: none; min-height: 0; }
}

/* server figures from Remedy Mesh */
.feed-server + .feed-server { margin-top: 14px; }
.feed-flag { font-size: 14px; color: #f2f2f0; border-left: 2px solid #f2f2f0; padding-left: 10px; }
.feed-more { margin: 12px 0 14px; }
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 28px; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid #1c1c1c; }
.figs > div { min-width: 0; }
.figs dt { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #8f8f8b; margin: 0 0 6px; }
.figs dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.figs dd.small { margin-top: 4px; }
.meter { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 6px; margin-top: 8px; border: 0; border-radius: 3px; background: #1c1c1c; color: #f2f2f0; overflow: hidden; }
.meter::-webkit-progress-bar { background: #1c1c1c; border-radius: 3px; }
.meter::-webkit-progress-value { background: #f2f2f0; border-radius: 3px; }
.meter::-moz-progress-bar { background: #f2f2f0; border-radius: 3px; }
p.netline { margin: 0 0 14px; }
