/* 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;

  --content-text-on-dark: #f8fafc;
  --content-text-on-light: #111827;

  --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"],
.site-nav a.is-active{
  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;
}

.content .embed-image,
.content .content-image{
  margin: 0;
}

.content .embed-image img,
.content .content-image img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.content .content-image--center,
.content .embed-image:not([class*="content-image--"]){
  margin: 1rem auto;
  text-align: center;
}

.content .content-image--center img,
.content .embed-image:not([class*="content-image--"]) img{
  margin: 0 auto;
}

.content .content-image--left.content-image--tight{
  float: left;
  margin: 0 1rem 0.75rem 0;
}

.content .content-image--right.content-image--tight{
  float: right;
  margin: 0 0 0.75rem 1rem;
}

.content .content-image--inline{
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.35rem;
}

.content .content-image--inline img{
  display: inline-block;
  vertical-align: middle;
}

.content-clearfix{
  clear: both;
}

@media (max-width: 720px){
  .content .content-image--left.content-image--tight,
  .content .content-image--right.content-image--tight{
    float: none;
    margin: 1rem auto;
    text-align: center;
    max-width: 100% !important;
  }

  .content .content-image--left.content-image--tight img,
  .content .content-image--right.content-image--tight img{
    margin: 0 auto;
  }
}

/* Structured content blocks */
.content-image-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin: 1rem 0;
  width: 100%;
}

.content-image-row--center{
  justify-content: center;
}

.content-image-row--left{
  justify-content: flex-start;
}

.content-image-row--right{
  justify-content: flex-end;
}

.content-image-row__cell{
  flex: 1 1 calc((100% - 24px) / 3);
  min-width: 120px;
  max-width: 100%;
}

.content-image-row[data-cols="2"] .content-image-row__cell{
  flex-basis: calc((100% - 12px) / 2);
}

.content-image-row[data-cols="1"] .content-image-row__cell{
  flex-basis: 100%;
}

.content-image-row__cell .content-image,
.content-image-row__cell .embed-image{
  margin: 0;
}

.content blockquote{
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--blue);
  color: rgba(238,244,255,.88);
  background: rgba(255,255,255,.03);
  border-radius: 0 12px 12px 0;
}

.content hr.content-divider{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.content .embed-caption{
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.92em;
  text-align: center;
}

.content .content-youtube{
  margin: 1.25rem 0;
}

.content .content-file{
  margin: 1.5rem 0;
}

.content .content-file--button .file-download-btn,
.content .content-file--card .file-download-btn,
.content .content-file--embedded .file-download-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 0;
}

.content .content-file--card{
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}

.content .content-file--card .file-card-label,
.content .content-file--embedded .file-embed-label{
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.content .content-file--embedded{
  --doc-height: 600px;
}

.content .file-embed-viewer{
  width: 100%;
  max-width: 100%;
  height: var(--doc-height, 600px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.35);
}

.content .file-embed-viewer .doc-embed-frame{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.content .file-fallback{
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92em;
}

@media (max-width: 720px){
  .content .content-file--embedded{
    --doc-height: 450px;
  }

  .content .content-file--button .file-download-btn,
  .content .content-file--card .file-download-btn,
  .content .content-file--embedded .file-download-btn{
    display: flex;
    width: 100%;
    text-align: center;
  }
}

/* Visual canvas layout (public) */
.canvas-layout-wrap{
  width: 100%;
  max-width: 100%;
  overflow: visible;
  margin: 0 0 1.5rem;
  position: relative;
}

.canvas-layout{
  position: relative;
  transform-origin: top left;
  max-width: none;
  background: transparent;
  color: var(--content-text-on-dark);
  overflow: visible;
}

.canvas-layout .canvas-object{
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
}

.canvas-flow-layout{
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.5;
  background: transparent;
  color: var(--content-text-on-dark);
  padding: 24px 32px;
  border-radius: 12px;
}

.canvas-flow-layout .canvas-flow-text{
  color: var(--content-text-on-dark);
}

.canvas-flow-layout .canvas-flow-text .canvas-text-inner{
  margin: 0 0 1rem;
}

.canvas-flow-layout .canvas-flow-media--block{
  clear: both;
}

.canvas-flow-layout .content-image img{
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.preview .canvas-flow-layout{
  padding: 8px 0;
}

.preview .canvas-flow-layout .content-image--left.content-image--tight,
.preview .canvas-flow-layout .content-image--right.content-image--tight{
  max-width: 100%;
}

.canvas-layout .canvas-object--text{
  color: var(--content-text-on-dark);
  line-height: 1.5;
  overflow: visible;
  height: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.canvas-layout .canvas-object--text a,
.canvas-flow-layout .canvas-flow-text a,
.canvas-flow-layout .canvas-text-inner a{
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.canvas-layout .canvas-object--text .canvas-text-inner{
  margin: 0;
  padding: 0;
}

.canvas-layout .canvas-object--image img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.canvas-layout .canvas-object--youtube .embed.content-youtube{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-top: 0;
  margin: 0;
}

.canvas-layout .canvas-object--youtube .embed.content-youtube iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.canvas-layout .canvas-object--file .content-file{
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.canvas-layout .canvas-object--file .content-file--embedded{
  height: 100%;
  --doc-height: 100%;
}

.canvas-layout .canvas-object--file .file-embed-viewer{
  flex: 1;
  min-height: 0;
  height: auto;
}

.canvas-layout .canvas-object--divider hr{
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.content .tiptap-table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}

.content .tiptap-table th,
.content .tiptap-table td{
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.content .tiptap-table th{
  background: rgba(255,255,255,0.04);
}

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;}
