/* ============================================================
   sej.css — global stylesheet for sej.app
   Drop into any page with:
     <link rel="stylesheet" href="sej.css">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --bg:        #484d55;
  --surface:   #3d4148;
  --surface2:  #34383f;
  --surface3:  #2b2f35;
  --border:    rgba(0,0,0,0.32);
  --border-h:  rgba(0,0,0,0.48);
  --text:      #c8cdd6;
  --text-dim:  #8a9099;
  --text-faint:#555b65;
  --blue:      #7aaec4;
  --blue-dim:  #3d6e9e;
  --green:     #6aad84;
  --amber:     #c4a443;
  --red:       #c46a6a;
  --shadow:    0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.35);
  --inset:     inset 0 1px 3px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.15);
  --radius:    4px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: 4rem;
}

/* Subtle noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h4, h5, h6 {
  font-family: 'Libre Baskerville', serif;
  color: var(--text);
  line-height: 1.25;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 0.75rem; }
h2 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.6rem; }
h3 { font-size: 1rem;    font-weight: 700; margin: 1.25rem 0 0.5rem; font-family: 'DM Sans', sans-serif; }
h4 { font-size: 0.9rem;  font-weight: 500; margin: 1rem 0 0.4rem; font-family: 'DM Sans', sans-serif; color: var(--text-dim); }

p { color: var(--text-dim); margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--text); font-weight: 600; }
em, i { font-style: italic; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.4rem; color: var(--text-dim); }
li { margin-bottom: 0.3rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

code {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.83em;
  background: rgba(0,0,0,0.25);
  padding: 0.1em 0.45em;
  border-radius: 3px;
  color: #a0c8e8;
  border: 1px solid rgba(0,0,0,0.25);
}

pre {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ── Page wrapper ───────────────────────────────────────── */
/* Wrap page content in <div class="page"> */
.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2rem;
}

/* Two-column layout: <div class="layout"> */
.layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; }
}

/* ── Header ─────────────────────────────────────────────── */
/* Styles #HEAD as it exists in the original HTML */
#HEAD {
  padding: 8px 16px;
  background: var(--surface2) !important;
  height: auto !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

#HEAD b {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.3rem;
  color: var(--text);
}

#HEAD i {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--text-faint);
  display: block;
  margin-top: -2px;
}

/* The vertical divider inside #HEAD */
#HEAD > div > div > div:nth-child(2) {
  border-left-color: var(--border-h) !important;
}

/* Nav links inside #HEAD */
#Nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem !important;
  font-weight: 500;
  color: var(--text-dim) !important;
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.12s;
}
#Nav a:hover { color: var(--text) !important; background: var(--surface3); }

/* Page title (the <center><h1> that follows #HEAD) */
center h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ── Tables ─────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  font-size: 0.9rem;
  color: var(--text-dim);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,0.08); }

/* ── Buttons / links that look like buttons ─────────────── */
a[href$=".msi"],
a[href$=".deb"],
a[href$=".rpm"],
a[href$=".exe"],
a[href$=".dmg"],
a.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none !important;
  border: 1px solid var(--border);
  background: var(--blue-dim);
  color: #cce4f4 !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.12s;
  margin-right: 0.35rem;
  margin-bottom: 0.2rem;
}

a[href$=".msi"]:hover,
a[href$=".deb"]:hover,
a[href$=".rpm"]:hover,
a[href$=".exe"]:hover,
a[href$=".dmg"]:hover,
a.btn:hover {
  color: var(--text) !important;
  background: #4a88bf;
  box-shadow: var(--shadow);
  text-decoration: none !important;
}

/* a[href$=".msi"] { background: var(--blue-dim); border-color: rgba(0,0,0,0.4); color: #cce4f4 !important; }
a[href$=".msi"]:hover { background: #4a88bf; } */

/* ── Cards ──────────────────────────────────────────────── */
/*
  Wrap any section in a card:
    <div class="card"> ... </div>
  Add a header with:
    <div class="card-header">Title</div>
  Followed by:
    <div class="card-body"> ... </div>
*/
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.card-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.card-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 5px var(--blue);
  flex-shrink: 0;
}

.card-body {
  padding: 1.1rem;
}

.card-body > *:last-child { margin-bottom: 0; }

/* ── Callout / warning box ──────────────────────────────── */
.callout, .warning {
  display: flex;
  gap: 0.7rem;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.28);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.65rem 0.9rem;
  margin: 0.85rem 0;
  font-size: 0.83rem;
  color: #b89e56;
  line-height: 1.65;
}

.callout.info { border-left-color: var(--blue); color: var(--blue); }
.callout.success { border-left-color: var(--green); color: var(--green); }
.callout.danger { border-left-color: var(--red); color: var(--red); }

/* ── Screenshot / image containers ─────────────────────── */
/* The original .images column */
.images {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 30%;
}

.images img,
.screenshot img {
  display: block;
  width: 200%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}

.images img:hover,
.screenshot img:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* Original .container layout */
.container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.text {
  flex: 1;
  width: 70%;
}

/* ── Section dividers ───────────────────────────────────── */
/* h3 used as section headings in the original */
.text h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text h3::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* Wrap h3 + following content in a card automatically via JS-free approach */
/* The card wrapping is done in HTML; these styles make it look right without it too */
.text > h3 + p,
.text > h3 + ul,
.text > h3 + ol {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ── Download table container ───────────────────────────── */
.text > h2 + table,
.text table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

/* ── Lists inside text content ──────────────────────────── */
.text ul {
  list-style: none;
  padding: 0;
  color: var(--text-dim);
}

.text ul li {
  padding: 0.22rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 0.88rem;
}

.text ul li:last-child { border-bottom: none; }

.text ul li::before {
  content: '›';
  color: var(--blue);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.7;
}

/* ── Price / badge elements ─────────────────────────────── */
.price {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.badge.blue   { background: rgba(122,174,196,0.15); border-color: rgba(122,174,196,0.3); color: var(--blue); }
.badge.green  { background: rgba(106,173,132,0.15); border-color: rgba(106,173,132,0.3); color: var(--green); }
.badge.amber  { background: rgba(196,164,67,0.15);  border-color: rgba(196,164,67,0.3);  color: var(--amber); }
.badge.red    { background: rgba(196,106,106,0.15); border-color: rgba(196,106,106,0.3); color: var(--red); }

/* ── Footer / status bar ────────────────────────────────── */
footer, .statusbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface3);
  border-top: 1px solid var(--border);
  padding: 0.3rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 100;
}

footer .ok, .statusbar .ok { color: var(--green); }

/* ── Obfuscated email ───────────────────────────────────── */
.obfmail::after {
  content: attr(data-name) "@" attr(data-domain) "." attr(data-tld);
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface3); }

/* ── Selection ──────────────────────────────────────────── */
::selection { background: rgba(122,174,196,0.3); color: var(--text); }
