/* ============================================================
   1:1 reproduction of the embedded stylesheet from
   http://www.hsmc.com.tw/index.asp
   (accent #6A89BD · Arial/Helvetica · table-based layout)
   ============================================================ */

html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
}

#table3 { flex-shrink: 0; }
#table4 { flex: 1 0 auto; }

.style1 {
    border: 1px solid #6A89BD;
    font-family: Arial, Helvetica, sans-serif;
    color: #6A89BD;
    text-align: center;
    vertical-align: middle;
    font-size: small;
}

.style2 {
    border-left: 0px solid #C0C0C0;
    border-right-style: solid;
    border-right-width: 0;
    border-top: 0px solid #C0C0C0;
    border-bottom-style: solid;
    border-bottom-width: 0;
    text-align: center;
    padding-left: 10px;
    padding-right: 0px;
    padding-top: 5px;
    padding-bottom: 0px;
}

.style3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: medium;
    color: #6A89BD;
    text-align: left;
    font-weight: bold;
}

.style4 {
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
}

.style6 {
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}

/* ---- footer bar (pinned to bottom, copyright left + RSS icon right) ---- */
.footer-bar {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-top: 1px solid #6A89BD;
}
.footer-copyright {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #000;
}
.footer-icons { display: flex; align-items: center; gap: 10px; }
.footer-icons a { display: inline-block; line-height: 0; }
.footer-icons svg path { transition: fill 0.15s; }
.footer-icons a:hover svg path { fill: #6A89BD; }

.style7 {
    border: 0px solid #6A89BD;
    margin: 20px;
    font-family: Arial, Helvetica, sans-serif;
    color: #6A89BD;
    text-align: center;
}

.style26 { background-image: url('/img/logo01.svg'); }
.style27 { background-image: url('/img/logo02.svg'); }
.style28 { background-position: left; background-image: url('/img/logo03.svg'); }

A:link    { text-decoration: none; color: #6A89BD; }
A:visited { text-decoration: none; color: #6A89BD; }
A:active  { text-decoration: none; }
A:hover   { text-decoration: none; color: white; background-color: #6A89BD; }

/* ---- content (rich-text editor output) helpers --------------
   Not part of the reference CSS; only used to lay out mock
   post/page body copy inside .style4. Text stays Arial black. */
.post-content p  { margin: 0 0 12px 0; }
.post-content h3 { font-family: Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; margin: 12px 0 6px 0; }
.post-content ul { margin: 0 0 12px 20px; padding: 0; }
.post-content code { font-family: monospace; }

/* ---- post footer meta (below the box, bottom-right, soft grey) ---- */
.post-footer {
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #9AA6B8;
    padding-right: 10px;
    padding-bottom: 6px;
}

/* ---- edit button (top-right of a post, superuser only) ---- */
.post-shell { position: relative; }
.edit-btn {
    position: absolute;
    top: 0;
    right: 4px;
    z-index: 5;
    display: inline-block;
    line-height: 0;
    padding: 5px;
    border: 1px solid #6A89BD;
    background: #fff;
    text-decoration: none;
    border-radius: 3px;
}
.edit-btn:hover { background: #6A89BD; }
.edit-btn:hover svg path { fill: #fff; }

/* ---- post list row (invisible table: title left, date right) ---- */
.post-row td { border: none; padding: 1px 0; }
.post-date {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #9AA6B8;
    padding-right: 6px;
}

/* ---- search results ---- */
.search-kind {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #9AA6B8;
}
.search-snippet {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #000;
    padding: 2px 0 6px 18px;
}
.search-snippet mark {
    background-color: #d7e0f0;
    color: #6A89BD;
    font-weight: bold;
}

/* ---- projects grid ---- */
.projects-grid td { border: none; }
.project-desc {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #000;
}

/* ---- project detail content ---- */
.project-content img { max-width: 100%; height: auto; }
.project-content h1, .project-content h2, .project-content h3, .project-content h4 { color: #6A89BD; }
.project-content p { margin: 0 0 12px 0; }
.project-content video { max-width: 100%; }

/* ---- content portal form controls ---- */
.portal-input {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #000;
    border: 1px solid #6A89BD;
    padding: 3px;
    background: #fff;
}
.portal-input:focus { outline: 1px solid #6A89BD; }

.portal-btn {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    font-weight: bold;
    color: #6A89BD;
    background: #fff;
    border: 1px solid #6A89BD;
    padding: 4px 12px;
    cursor: pointer;
}
.portal-btn:hover { color: #fff; background: #6A89BD; }

.linkbtn {
    background: none;
    border: none;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #6A89BD;
    cursor: pointer;
    text-decoration: none;
}
.linkbtn:hover { color: #fff; background: #6A89BD; }

.portal-btn-link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    padding: 0 8px;
    vertical-align: middle;
}

/* ---- editor mode tabs + markdown/raw split ---- */
.editor-tabs { margin-bottom: 2px; }
.editor-tab {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    font-weight: bold;
    color: #6A89BD;
    background: #fff;
    border: 1px solid #6A89BD;
    padding: 4px 14px;
    cursor: pointer;
    margin-right: 4px;
}
.editor-tab.active { color: #fff; background: #6A89BD; }
.editor-hint {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #9AA6B8;
    margin-left: 6px;
}

.editor-split { width: 100%; }
.editor-col {
    width: 50%;
    vertical-align: top;
    padding: 0 6px 0 0;
}
.editor-col:last-child { padding: 0 0 0 6px; }
.editor-ta {
    width: 100%;
    box-sizing: border-box;
    font-family: Menlo, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
}
.editor-ta-full { width: 100%; }
.editor-preview {
    border: 1px solid #C0C0C0;
    background: #fbfbfb;
    padding: 10px;
    min-height: 300px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #000;
    text-align: left;
    overflow: auto;
}
.editor-preview img { max-width: 100%; height: auto; }
.editor-preview h1, .editor-preview h2, .editor-preview h3, .editor-preview h4 { color: #6A89BD; }
.editor-preview code { font-family: Menlo, Monaco, "Courier New", monospace; }
.editor-preview pre { background: #f0f0f0; padding: 8px; overflow: auto; }
