/* One-Time Secret — styles. Safe to edit to match your own branding. */

/* Sterling IT brand colours, sampled from the logo:
 *   blue #3CB4E9   grey #A6A6A6
 * The brand blue is too light to carry white button text (2.4:1), so buttons
 * use a darkened version of it that clears the 4.5:1 accessibility mark,
 * while the pure brand blue is kept for focus rings and accents. */
:root {
  --brand:     #3CB4E9;
  --brand-ink: #A6A6A6;

  --bg:        #f4f6f9;
  --panel:     #ffffff;
  --ink:       #16202c;
  --muted:     #5d6b7c;
  --line:      #d9e0e8;
  --accent:    #297ca1;
  --accent-in: #ffffff;
  --focus:     #3CB4E9;
  --ok:        #1a7f52;
  --warn:      #a4520d;
  --bad:       #b3261e;
  --code-bg:   #f0f3f7;
  --radius:    10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #11161d;
    --panel:   #1a212b;
    --ink:     #e6ecf3;
    --muted:   #98a6b6;
    --line:    #2c3644;
    --accent:  #3CB4E9;
    --accent-in: #08131a;
    --focus:   #3CB4E9;
    --ok:      #4cc38a;
    --warn:    #e0a458;
    --bad:     #f2837a;
    --code-bg: #131922;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 640px; margin: 0 auto; }

header.site { margin-bottom: 1.5rem; }
header.site h1 { margin: 0 0 .25rem; font-size: 1.3rem; letter-spacing: -.01em; }
header.site p  { margin: 0; color: var(--muted); font-size: .95rem; }

/* The logo is a transparent PNG, so it sits correctly on both the light and
 * dark backgrounds without a white box around it. */
.logo { display: inline-block; line-height: 0; margin-bottom: .9rem; }
.logo img { display: block; height: auto; max-width: 100%; }
a.logo:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

@media (max-width: 420px) {
  .logo img { width: 170px; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: .35rem; }

textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
textarea { min-height: 9rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.field { margin-bottom: 1.15rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > .field { flex: 1 1 12rem; }

button {
  font: inherit;
  font-weight: 600;
  padding: .7rem 1.3rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-in);
  cursor: pointer;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; }
button.secondary { background: transparent; color: var(--accent); border-color: var(--line); }

.msg { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.1rem; font-size: .92rem; border: 1px solid var(--line); }
.msg.err  { color: var(--bad);  border-color: var(--bad); }
.msg.ok   { color: var(--ok);   border-color: var(--ok); }
.msg.warn { color: var(--warn); border-color: var(--warn); }

.linkbox {
  display: flex; gap: .5rem; align-items: stretch; margin-bottom: .6rem;
}
.linkbox input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
}

pre.secret {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
  max-height: 26rem;
  overflow: auto;
}

footer.site { margin-top: 1.5rem; color: var(--muted); font-size: .82rem; text-align: center; }
footer.site a { color: var(--muted); }

.hidden { display: none !important; }
.center { text-align: center; }

/* Utility classes. These exist so no markup needs a style="" attribute —
 * the Content-Security-Policy blocks inline styles, and a policy that trips
 * over the app's own pages is a policy nobody will keep an eye on. */
.stack      { margin-top: 1.25rem; }
.panel-head { margin: 0 0 .5rem; font-size: 1.05rem; }
.gap-below  { margin-bottom: 1rem; }
.gap-small  { margin: 0 0 .8rem; }
.gap-above  { margin-top: 1rem; }
.optional   { font-weight: 400; }
.msg.stacked{ margin-bottom: .5rem; }
.over-limit { color: var(--bad); }
.spinner { color: var(--muted); font-size: .9rem; }

ul.notes { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .86rem; }
ul.notes li { margin-bottom: .25rem; }

table.check { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.check th, table.check td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.check th { width: 30%; font-weight: 600; }
.tag { font-weight: 700; }
.tag.pass { color: var(--ok); }
.tag.fail { color: var(--bad); }
.tag.warn { color: var(--warn); }
