/* CC Salt — mobile-first, large easy-to-read */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:root{
  --blue:#2aa7ff;
  --blue-2:#0b5fff;
  --yellow:#ffd400;
  --border:rgba(238,244,255,.12);
  --border-strong:rgba(238,244,255,.22);
  --shadow:0 10px 30px rgba(0,0,0,.35);

  --bg:#070b12;
  --panel:#0c1628;
  --text:#eef4ff;
  --muted:rgba(238,244,255,.72);
  --line: rgba(255,255,255,0.10);
  --accent:rgba(238,244,255,.92);
  --max: 980px;

  --base: 18px;
  --lh: 1.75;
  --radius: 16px;
}

body{
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(42,167,255,.18), transparent 60%),
    radial-gradient(700px 400px at 85% 0%, rgba(11,95,255,.14), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #0a1220 100%);
  color: var(--text);
  font: var(--base)/var(--lh) system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container{
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 18px;
}

header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}

.site-title{
  font-size: 34px;
  letter-spacing: 0.2px;
  /* Subtitle removed, so give the title enough breathing room before the nav */
  margin: 10px 0 14px;
  line-height: 1.15;
}

/* Nav headings — horizontal swipe on mobile */
.site-nav{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 10px 2px 14px;
  margin: 0;
}
.site-nav::-webkit-scrollbar{ height: 10px; }
.site-nav::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.14); border-radius: 999px; }

.site-nav a{
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--accent);
  font-size: 16px;
  line-height: 1.2;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

/* Active tab — yellow highlight (desktop + mobile) */
.site-nav a[aria-current="page"]{
  background: var(--yellow);
  border-color: rgba(0,0,0,0.25);
  color: #111;
  font-weight: 800;
  text-decoration: none;
}

main{ padding: 20px 0 34px; }

article{
  background: linear-gradient(180deg, rgba(12,22,40,.95), rgba(11,20,36,.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 20px;
}

h1, h2, h3{
  line-height: 1.18;
  margin: 0 0 14px;
}
h1{ font-size: 32px; }
h2{ font-size: 24px; margin-top: 22px; }
h3{ font-size: 20px; margin-top: 18px; }

.meta{
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 14px;
}

.content p{ margin: 0 0 16px; }
.content ul, .content ol{ margin: 0 0 16px 24px; }
.content li{ margin: 6px 0; }

.content blockquote{
  margin: 16px 0;
  padding: 14px 14px;
  border-left: 4px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 12px;
}

.content pre{
  overflow-x: auto;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #000;
}
.content code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.98em;
}

table{
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
td, th{
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  font-size: 16px;
}

.list{
  display: grid;
  gap: 14px;
}
.card{
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display:block;
}
.card .title{
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}
.card .excerpt{
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

footer{
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 20px 0 34px;
  margin-top: 26px;
  font-size: 14px;
}
.admin-link{ color: rgba(255,255,255,0.75); }

@media (min-width: 900px){
  :root{
  --blue:#2aa7ff;
  --blue-2:#0b5fff;
  --yellow:#ffd400;
  --border:rgba(238,244,255,.12);
  --border-strong:rgba(238,244,255,.22);
  --shadow:0 10px 30px rgba(0,0,0,.35);
 --base: 17px; }
  .container{ padding: 22px; }
  .site-title{ font-size: 38px; }
  article{ padding: 24px; }
}

@media (max-width: 420px){
  :root{
  --blue:#2aa7ff;
  --blue-2:#0b5fff;
  --yellow:#ffd400;
  --border:rgba(238,244,255,.12);
  --border-strong:rgba(238,244,255,.22);
  --shadow:0 10px 30px rgba(0,0,0,.35);
 --base: 19px; }
  .container{ padding: 16px; }
  .site-title{ font-size: 32px; }
  .site-nav a{ padding: 12px 14px; }
}


/* Responsive embeds */
.embed{position:relative; width:100%; padding-top:56.25%; border-radius:14px; overflow:hidden; background:#000;}
.embed iframe{position:absolute; inset:0; width:100%; height:100%;}


/* Active tab: yellow with black text */
.tab.active, .tabs a.active, .tabs-scroll a.active{
  background: #ff0;
  color:#000;
  font-weight:700;
}

/* Timeline/bracket decorations: keep spacing but make invisible and never overlap text */
.article-item,
.post-item,
.article-card,
.post-card,
.card{ position: relative; }

.article-item::before,
.article-item::after,
.post-item::before,
.post-item::after,
.article-card::before,
.article-card::after,
.post-card::before,
.post-card::after{
  pointer-events: none;
  z-index: 0 !important;
  opacity: 0;
  visibility: hidden;
}

.article-item > *,
.post-item > *,
.article-card > *,
.post-card > *,
.card > *{
  position: relative;
  z-index: 1;
}

/* Form fields — dark background + large readable text */
input[type="text"],
input[type="password"],
input[type="url"],
input[type="email"],
textarea,
select{
  background: #0b0f17;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 1.05rem;
  outline: none;
}
textarea{ background:#0b111d; min-height: 260px; resize: vertical; }
input:focus, textarea:focus, select:focus{
  border-color: rgba(42,167,255,.70);
  box-shadow: 0 0 0 4px rgba(42,167,255,.14);
}

/* Ocean-blue links */
a.inline-link, a.link, .admin-link{
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.inline-link:hover, a.link:hover, .admin-link:hover{ color: #7bd0ff; }

/* =========================
   Admin theme overrides
   Clear white borders + white text on dark input backgrounds
   ========================= */
body.admin{
  color: #fff;
}

body.admin .panel,
body.admin .card,
body.admin .admin-panel,
body.admin .admin-card{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
}

body.admin .topbar,
body.admin .admin-topbar{
  border-bottom: 1px solid rgba(255,255,255,0.28);
}

body.admin label{
  color: rgba(255,255,255,0.72);
}

body.admin input[type="text"],
body.admin input[type="password"],
body.admin input[type="url"],
body.admin textarea,
body.admin select{
  width: 100%;
  color: #fff;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

body.admin textarea{
  background: #121212;
  min-height: 320px;
  resize: vertical;
}

body.admin input::placeholder,
body.admin textarea::placeholder{
  color: rgba(255,255,255,0.45);
}

body.admin input:focus,
body.admin textarea:focus,
body.admin select:focus{
  border-color: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

body.admin .toolbar{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
}

body.admin .toolbar button,
body.admin button,
body.admin .btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

body.admin .toolbar button:hover,
body.admin button:hover,
body.admin .btn:hover{
  background: rgba(255,255,255,0.10);
}

body.admin .btn-primary{
  background: #ffd400;
  color: #111;
  border-color: rgba(0,0,0,0.25);
  font-weight: 800;
}

body.admin .btn-danger{
  border-color: rgba(255,255,255,0.85);
  background: rgba(255,0,0,0.10);
}

body.admin .notice,
body.admin .flash{
  border: 1px solid rgba(255,255,255,0.28);
  border-left: 4px solid #ffd400;
  background: rgba(255,212,0,0.08);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
}


/* PowerPoint embeds */
.embed.embed-ppt iframe{
  width:100%;
  height:70vh;
  max-height:720px;
  border:0;
  border-radius:14px;
}


/* CCSaltEmbeds */
.embed-open{display:inline-block;margin:0 0 10px 0;font-size:14px;text-decoration:underline;}
.embed-loading,.embed-error{padding:12px;border-radius:12px;background:rgba(255,255,255,0.06);}
.pdf-pages{display:flex;flex-direction:column;gap:12px;overflow:auto;max-width:100%;}
.pdf-page{max-width:100%;height:auto;border-radius:12px;}
.docx-body{background:rgba(255,255,255,0.04);padding:14px;border-radius:12px;overflow:auto;}
.docx-body img{max-width:100%;height:auto;}


/* ZIPDOC viewer */
.zipdoc{background:#0d0f12;border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:14px;margin:14px 0;color:#e8eef5}
.zipdoc .zipdoc-docx{line-height:1.6}
.zipdoc .zipdoc-docx h1,.zipdoc .zipdoc-docx h2,.zipdoc .zipdoc-docx h3{margin:14px 0 8px}
.zipdoc .zipdoc-docx p{margin:10px 0}
.zipdoc-more{opacity:.8;font-size:.9em;margin-top:6px}


.doclink a{display:inline-block;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;text-decoration:none}
.embed{position:relative;width:100%;padding-top:56.25%;overflow:hidden;border-radius:14px;}
.embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.embed.embed-pdf{
  padding-top:0;
  height:70vh;
  max-height:720px;
  background:#0b0b0b;
}
.embed.embed-pdf iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
