:root {
    --bg-color: #FFF5E1;          /* cream */
    --text-color: #3C2F2F;        /* dark brown */
    --nav-bg: #A32D2D;            /* dark red */
    --nav-text: #FFF5E1;          /* cream */
    --link-color: #800000;        /* maroon */
    --mail-bg-color: #B2AC9D;     /* darker cream */
}

/* Layout + typography */
html, body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-image: url('/static/images/4umheader2560.jpg');
    background-size: auto;
    background-position: left top;
    background-repeat: no-repeat;
    height: 105px;
    width: 100%;
    display: block;
    margin-bottom: 5px;
}

main { flex: 1; margin-bottom: 2em; }

a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--nav-bg); text-decoration: underline; }

.content-wrapper {
    margin-top: 0;
    width: auto;          /* ⬅ instead of 95vw */
    max-width: none;      /* ⬅ instead of 95% */
    margin-left: 0;       /* ⬅ remove centering offset */
    margin-right: 0;
    padding: 0;
}

/* Form layout */
.form-table { width: 100%; table-layout: fixed; border: none; }
.form-table th {
    width: 120px;
    text-align: left;
    padding-right: 10px;
    white-space: nowrap;
    vertical-align: top;
}
.form-table td { width: 99%; }

input[name="title"],
input[name="source"],
input[name="url_source"],
input[name="author"] {
    width: 500px;
    max-width: 100%;
    box-sizing: border-box;
}

input[name="publish_year"] { width: 60px; }
select[name="publish_month"], select[name="publish_day"] { width: auto; }

.info-text { font-size: 0.8em; font-style: italic; }
.error-message { color: red; font-size: 0.9em; margin-top: 6px; }

.button-cell { text-align: center; }

.button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    color: var(--bg-color);
    background: linear-gradient(to right, #A32D2D, #7D1F1F);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}
.button:hover {
    background: linear-gradient(to right, #7D1F1F, #A32D2D);
    color: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Editor (reuses /static/css/editor.css for core styling) */
.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.toolbar button {
    border: 1px solid #ccc;
    background: #fafafa;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
}
.toolbar button:hover { background: #f0f0f0; }

.editor-container {
    min-height: 400px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    cursor: text;
}

/* Responsive */
@media (max-width: 768px) {
    .form-table th, .form-table td { display: block; width: 100%; }
    input, textarea, select { width: 100%; }
}
/* ----------------------------------------------------------
   Match readarticle thin red frame for composition area
   ---------------------------------------------------------- */

body.post-article-page .content-wrapper {
  display: flex;
  justify-content: center;
  background-color: var(--bg-color);
}

body.post-article-page main.article-frame {
  background-color: #F9E9C7;          /* parchment-like cream */
  border: 1px solid #A32D2D;          /* dark red border */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  padding: 1.5rem 2rem;
  margin: 1rem 40px 2rem 40px;
  max-width: 1100px;
  width: calc(100% - 80px);
  box-sizing: border-box;
}

body.post-article-page .article-block {
  border-left: 6px solid #A32D2D;     /* same accent bar */
  padding-left: 1rem;
  margin-bottom: 1rem;
}

/* Keep iframe/image embed visuals consistent with readarticle */
body.post-article-page iframe {
  border: 0;
  background: #000;
  vertical-align: top;
  max-width: 100%;
  height: auto;
}

body.post-article-page iframe[src*="youtube.com"],
body.post-article-page iframe[src*="rumble.com"],
body.post-article-page iframe[src*="bitchute.com"] {
  display: inline-block !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}

body.post-article-page iframe[src*="youtube.com/shorts"],
body.post-article-page iframe.yt-shorts {
  aspect-ratio: 9 / 16;
  max-width: 360px;
}

body.post-article-page .image-wrapper {
  display: inline-block !important;
  margin: 10px 0;
  border: 2px solid #ccc;
  background: #fff;
  overflow: hidden;
  max-width: 100%;
}

body.post-article-page .image-wrapper img {
  display: inline-block !important;
  width: attr(width px) !important;
  height: auto !important;
}

@supports not (width: attr(width px)) {
  body.post-article-page .image-wrapper img {
    width: initial !important;
  }
}

/* Hide any editor-only handles during display preview */
body.post-article-page .image-resize-handle,
body.post-article-page .video-resize-handle,
body.post-article-page .image-delete-handle,
body.post-article-page .video-delete-handle,
body.post-article-page .image-overlay,
body.post-article-page .video-overlay {
  display: none !important;
}

/* Left alignment to match readarticle */
body.post-article-page .content-wrapper.align-left {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  background-color: var(--bg-color);
}

body.post-article-page main.article-frame.left-aligned {
  background-color: #F9E9C7;
  border: 1px solid #A32D2D;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  padding: 1.5rem 2rem;
  margin-left: 40px;  /* aligns under nav (same offset as readarticle) */
  margin-right: 20px;
  width: calc(100% - 380px);
  max-width: 1200px;
  box-sizing: border-box;
}

/* --- Final vertical alignment: match readarticle gap below nav --- */
body.post-article-page main.article-frame.full-span {
  background-color: #F9E9C7;
  border: 1px solid #A32D2D;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  padding: 0rem 2rem;

  /* ✅ Precise layout */
  margin-top: 0px;           /* about 3/16" on most monitors */
  margin-left: 40px;            /* stay flush with nav */
  margin-right: 20px;
  width: auto !important;
  // width: 1200px;
  max-width: none; !important;
  box-sizing: border-box;
  display: block;
}

#editor {
    background: #E8C590;  /* Warm golden parchment – noticeable but harmonious */
    color: #3C2F2F;                  /* Match your --text-color for readability */
}