/*
 * Violet OS — base stylesheet.
 *
 * Colours come from the brand palette agreed with the marketing agency and
 * recorded in the roles document, so panels built later match the charts and
 * printed material already in circulation.
 *
 * Vazirmatn is served from this host, not from Google Fonts: fonts.googleapis
 * is unreliable from inside Iran, and a panel that loses its typeface halfway
 * through a shift is a panel people stop trusting.
 */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #3B1553;
  --purple-mid: #5C2C78;
  --purple-pale: #C9B3D8;
  --orange: #F47C35;
  --orange-pale: #FBD9C2;
  --brown: #4A2E1F;
  --caramel: #C88141;
  --blue: #5765AE;

  --green: #2F7D52;
  --green-pale: #DCEFE3;
  --red: #B3261E;
  --red-pale: #F7DEDC;
  --amber: #96430E;

  --cream: #FAF6F2;
  --paper: #FFFFFF;
  --ink: #2E1F16;
  --muted: #8B7A6E;
  --line: #E9DFD6;

  --radius: 10px;
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* --------------------------------------------------------------- panel -- */

.panel {
  width: 100%;
  max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  background: var(--purple);
  color: #fff;
  padding: 22px 24px 24px;
  position: relative;
}

.panel-head::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--caramel), var(--blue));
}

.brand {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 6px;
}

.panel-head h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.panel-head .sub {
  font-size: 13px;
  color: var(--purple-pale);
  margin-top: 4px;
}

.panel-foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.9;
}

.panel-foot code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  direction: ltr;
  display: inline-block;
}

/* ------------------------------------------------------------- verdict -- */

.verdict {
  margin: 20px 24px 4px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.verdict-ok {
  background: var(--green-pale);
  color: var(--green);
  border-inline-start: 4px solid var(--green);
}

.verdict-bad {
  background: var(--red-pale);
  color: var(--red);
  border-inline-start: 4px solid var(--red);
}

/* -------------------------------------------------------------- checks -- */

.checks {
  list-style: none;
  padding: 12px 24px 20px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.check:first-child {
  border-top: none;
}

.mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-top: 3px;
}

.check-ok .mark { background: var(--green-pale); color: var(--green); }
.check-bad .mark { background: var(--red-pale); color: var(--red); }
.check-warn .mark { background: var(--orange-pale); color: var(--amber); }
.check-skip .mark { background: #F0EAE4; color: var(--muted); }

.text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--purple);
}

.detail {
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-word;
  /*
   * Version strings and error messages are Latin text inside a right-to-left
   * page; without this they render with their punctuation moved around.
   */
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
}

@media (max-width: 480px) {
  .panel-head { padding: 18px 16px 20px; }
  .checks { padding: 10px 16px 16px; }
  .verdict { margin: 16px 16px 2px; }
  .panel-foot { padding: 12px 16px 16px; }
}
