/* Tamiliyal journal: dashboard + public pages ------------------------------ */
.tmfj {
  --tmf-accent: #6b2e1f;
  --tmf-border: #d6d3cf;
  --tmf-muted: #5f5a55;
  --tmf-bg: #fff;
  --tmf-soft: #faf7f4;
  --tmfj-ok: #1c6331;
  --tmfj-warn: #8a3b00;
  --tmfj-err: #9b1c14;
  max-width: 1100px;
  margin: 1.5rem auto;
  font-size: 16px;
  line-height: 1.55;
  color: inherit;
}
.tmfj *, .tmfj *::before, .tmfj *::after { box-sizing: border-box; }
.tmfj h2 { margin: 0 0 .75rem; font-size: 1.35em; line-height: 1.3; }
.tmfj h3 { margin: 0 0 .6rem; font-size: 1.1em; }
.tmfj h4 { margin: 1rem 0 .35rem; font-size: 1em; }
.tmfj a { color: var(--tmf-accent); }
.tmfj .tmf-submit, .tmfj .tmf-clear { font-size: .95em; padding: .55rem 1rem; line-height: 1.3; }
.tmfj .tmf-badge { font-size: .75em; }
.tmfj .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.tmfj-muted { color: var(--tmf-muted); font-size: .9em; }
.tmfj-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; letter-spacing: .02em; white-space: nowrap; }
.tmfj-empty { padding: 2rem 1rem; text-align: center; color: var(--tmf-muted); background: var(--tmf-soft); border-radius: 10px; }
.tmfj-link { color: var(--tmf-muted); }
.tmfj-danger { color: var(--tmfj-err) !important; border-color: #f0bdb9 !important; }
.tmfj-small { max-width: 7rem; }

/* Top bar and tabs */
.tmfj-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; font-size: .95em; }
.tmfj-tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 2px solid var(--tmf-border); margin-bottom: 1.25rem; }
.tmfj-tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--tmf-muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 6px 6px 0 0; }
.tmfj-tabs a:hover { color: var(--tmf-accent); background: var(--tmf-soft); }
.tmfj-tabs a.is-active { color: var(--tmf-accent); border-bottom-color: var(--tmf-accent); }
.tmfj-count { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--tmf-accent); color: #fff; font-size: .75em; text-align: center; line-height: 1.5; margin-left: .25em; }
.tmfj-subtabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0 0 1rem; }
.tmfj-subtabs a { padding: .35rem .8rem; border: 1px solid var(--tmf-border); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9em; background: var(--tmf-bg); }
.tmfj-subtabs a.is-active { background: var(--tmf-accent); border-color: var(--tmf-accent); color: #fff; }
.tmfj-subtabs a.is-active .tmfj-muted { color: rgba(255, 255, 255, .8); }
.tmfj-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tmfj-head h2 { margin: 0; }
.tmfj-search { display: flex; gap: .4rem; }
.tmfj-search input { padding: .45rem .7rem; border: 1px solid #b9b4ae; border-radius: 6px; font: inherit; min-width: 14rem; }

/* Notices */
.tmfj-notice { padding: .8rem 1rem; border-radius: 8px; margin: 0 0 1rem; border: 1px solid; }
.tmfj-notice--ok { background: #e3f3e7; border-color: #b6dcc0; color: var(--tmfj-ok); }
.tmfj-notice--error { background: #fbe7e6; border-color: #f0bdb9; color: var(--tmfj-err); }
.tmfj-notice--warn { background: #fdf2dc; border-color: #f0d49a; color: #7a4d00; }
.tmfj-ok { color: var(--tmfj-ok); }
.tmfj-flag { display: inline-block; font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1em .5em; border-radius: 4px; background: #fbe7e6; color: var(--tmfj-err); vertical-align: middle; }
.tmfj-flag--info { background: #e8eef7; color: #1f3f6e; }

/* Cards and forms */
.tmfj-card { border: 1px solid var(--tmf-border); border-radius: 10px; background: var(--tmf-bg); padding: 1.1rem 1.2rem; margin: 0 0 1rem; }
.tmfj-card--action { border-color: var(--tmf-accent); box-shadow: inset 4px 0 0 var(--tmf-accent); }
.tmfj-form p { margin: 0 0 .85rem; }
.tmfj-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.tmfj-form label.tmfj-check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.tmfj-form label.tmfj-check input { margin-top: .3rem; }
.tmfj-form input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]),
.tmfj-form select, .tmfj-form textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #b9b4ae; border-radius: 6px; font: inherit; background: #fff; color: inherit;
}
.tmfj-form input.tmfj-small { width: 7rem; }
.tmfj-form textarea { resize: vertical; }
.tmfj-form input:focus, .tmfj-form select:focus, .tmfj-form textarea:focus { outline: 2px solid var(--tmf-accent); outline-offset: 1px; border-color: var(--tmf-accent); }
.tmfj-form input[disabled] { background: var(--tmf-soft); color: var(--tmf-muted); }
.tmfj-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }
.tmfj-row--4 { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.tmfj-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tmfj-actions form { margin: 0; }
.tmfj-auth { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem; align-items: start; }
.tmfj-auth #loginform p { margin: 0 0 .85rem; }
.tmfj-auth #loginform label { display: block; font-weight: 600; margin-bottom: .3rem; }
.tmfj-auth #loginform input[type=text], .tmfj-auth #loginform input[type=password] { width: 100%; padding: .55rem .7rem; border: 1px solid #b9b4ae; border-radius: 6px; font: inherit; }
.tmfj-auth #loginform .login-remember label { display: flex; gap: .4rem; font-weight: 400; }
.tmfj-auth #loginform input[type=submit] { padding: .6rem 1.2rem; border: 0; border-radius: 6px; background: var(--tmf-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

/* Tables */
.tmfj-table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; background: var(--tmf-bg); font-size: .95em; }
.tmfj-table th, .tmfj-table td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--tmf-border); vertical-align: top; }
.tmfj-table th { font-size: .8em; text-transform: uppercase; letter-spacing: .05em; color: var(--tmf-muted); border-bottom-width: 2px; }
.tmfj-table tbody tr:hover { background: var(--tmf-soft); }
.tmfj-table a { font-weight: 600; text-decoration: none; }
.tmfj-table a:hover { text-decoration: underline; }
.tmfj-facts { border-collapse: collapse; width: 100%; font-size: .95em; }
.tmfj-facts th { text-align: left; width: 11rem; padding: .35rem .75rem .35rem 0; color: var(--tmf-muted); font-weight: 600; vertical-align: top; }
.tmfj-facts td { padding: .35rem 0; }

/* Files */
.tmfj-files { list-style: none; margin: 0 0 .75rem; padding: 0; }
.tmfj-files li { padding: .5rem 0; border-bottom: 1px dashed var(--tmf-border); }
.tmfj-files li:last-child { border-bottom: 0; }
.tmfj-files a { font-weight: 600; }
.tmfj-files a::before { content: "📄 "; }
.tmfj-note { margin-top: .25rem; font-size: .9em; color: var(--tmf-muted); white-space: pre-line; }
.tmfj-plain { list-style: none; margin: 0; padding: 0; }
.tmfj-plain li { margin: 0 0 .3rem; }

/* Workspace */
.tmfj-ws-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 1rem; }
.tmfj-kicker { font-size: .85em; color: var(--tmf-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: .3rem; }
.tmfj-kicker .tmfj-code { color: var(--tmf-accent); text-transform: none; }
.tmfj-title { margin: 0 0 .3rem !important; font-size: 1.45em !important; }
.tmfj-ws-links { font-size: .9em; }
.tmfj-stages { display: flex; margin: 0 0 1.25rem; counter-reset: stage; border: 1px solid var(--tmf-border); border-radius: 10px; overflow: hidden; }
.tmfj-stages a { flex: 1; text-align: center; padding: .7rem .5rem; text-decoration: none; color: var(--tmf-muted); font-weight: 600; background: var(--tmf-bg); border-right: 1px solid var(--tmf-border); position: relative; font-size: .95em; }
.tmfj-stages a:last-child { border-right: 0; }
.tmfj-stages a::before { counter-increment: stage; content: counter(stage); display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; margin-right: .4em; border-radius: 50%; border: 2px solid currentColor; font-size: .8em; }
.tmfj-stages a.is-done { color: var(--tmfj-ok); }
.tmfj-stages a.is-done::before { content: "✓"; background: var(--tmfj-ok); border-color: var(--tmfj-ok); color: #fff; }
.tmfj-stages a.is-current { color: var(--tmf-accent); }
.tmfj-stages a.is-active { background: var(--tmf-soft); box-shadow: inset 0 -3px 0 var(--tmf-accent); color: var(--tmf-accent); }
.tmfj-ws { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
.tmfj-prose { white-space: normal; overflow-wrap: anywhere; }
.tmfj-confidential { background: #fff8e6; border-left: 3px solid #e0b64a; padding: .5rem .75rem; }
.tmfj-review { border: 1px solid var(--tmf-border); border-radius: 8px; padding: .6rem .85rem; margin: 0 0 .6rem; }
.tmfj-review summary { cursor: pointer; display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.tmfj-review[open] summary { margin-bottom: .5rem; }
.tmfj-rs { display: inline-block; font-size: .75em; font-weight: 700; padding: .1em .55em; border-radius: 999px; background: #eee; color: #444; }
.tmfj-rs--invited { background: #e8eef7; color: #1f3f6e; }
.tmfj-rs--accepted { background: #fdf2dc; color: #7a4d00; }
.tmfj-rs--completed { background: #e3f3e7; color: var(--tmfj-ok); }
.tmfj-rs--declined, .tmfj-rs--cancelled { background: #f1efed; color: var(--tmf-muted); text-decoration: line-through; }
.tmfj-rec { font-weight: 700; font-size: .85em; }
.tmfj-history { list-style: none; margin: 0; padding: 0; }
.tmfj-history li { padding: .5rem 0 .5rem .9rem; border-left: 2px solid var(--tmf-border); margin-left: .3rem; position: relative; font-size: .93em; }
.tmfj-history li::before { content: ""; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--tmf-accent); }
.tmfj-history li.is-internal::before { background: var(--tmf-border); }
.tmfj-history .tmfj-prose { margin-top: .25rem; white-space: pre-line; }
.tmfj-new-reviewer { background: var(--tmf-soft); padding: .75rem .75rem .1rem; border-radius: 8px; margin: 0 0 .85rem; }
.tmfj-embed { margin: 0 0 1rem; max-width: none; }

/* Public: article page */
.tmfj-public { max-width: 1040px; }
.tmfj-crumbs { font-size: .9em; color: var(--tmf-muted); margin: 0 0 1rem; }
.tmfj-article-title { font-size: 2em; line-height: 1.2; margin: .2rem 0 .5rem; }
.tmfj-article-alt { font-size: 1.2em; margin: 0 0 .75rem; font-family: "Latha", "Nirmala UI", "Noto Sans Tamil", serif; color: var(--tmf-muted); }
[lang=ta] { font-family: "Latha", "Nirmala UI", "Noto Sans Tamil", inherit; }
.tmfj-authors { font-size: 1.1em; font-weight: 600; margin: 0 0 .25rem; }
.tmfj-affils { color: var(--tmf-muted); font-size: .92em; margin: 0 0 1rem; }
.tmfj-article-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .9rem 0; margin: 0 0 1.25rem; border-top: 1px solid var(--tmf-border); border-bottom: 1px solid var(--tmf-border); }
.tmfj-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2rem; align-items: start; }
.tmfj-article-main section { margin: 0 0 1.75rem; }
.tmfj-article-main h2 { font-size: 1.2em; color: var(--tmf-accent); }
.tmfj-article-main .tmfj-prose { text-align: justify; hyphens: auto; }
.tmfj-keywords { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; padding: 0; }
.tmfj-keywords li { padding: .2rem .7rem; border-radius: 999px; background: var(--tmf-soft); border: 1px solid var(--tmf-border); font-size: .9em; }
.tmfj-refs summary { cursor: pointer; list-style: revert; }
.tmfj-refs summary h2 { display: inline; }
.tmfj-refs ol { font-size: .92em; padding-left: 1.5rem; margin-top: .75rem; }
.tmfj-refs li { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.tmfj-cite { background: var(--tmf-soft); border: 1px solid var(--tmf-border); border-radius: 10px; padding: 1rem 1.1rem; }
.tmfj-cite-tabs { display: flex; gap: .3rem; margin: 0 0 .6rem; flex-wrap: wrap; }
.tmfj-cite-tabs button { font: inherit; font-size: .88em; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--tmf-border); background: #fff; cursor: pointer; color: inherit; }
.tmfj-cite-tabs button[aria-selected=true] { background: var(--tmf-accent); border-color: var(--tmf-accent); color: #fff; }
.tmfj-cite-text { background: #fff; border-radius: 6px; padding: .75rem .9rem; font-size: .95em; overflow-wrap: anywhere; border: 1px solid var(--tmf-border); }
.tmfj-cite-actions { margin: .6rem 0 0; font-size: .92em; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tmfj-meta { margin: 0 0 1.25rem; font-size: .93em; }
.tmfj-meta dt { font-size: .78em; text-transform: uppercase; letter-spacing: .06em; color: var(--tmf-muted); font-weight: 700; margin-top: .75rem; }
.tmfj-meta dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.tmfj-license { font-size: .88em; border-top: 1px solid var(--tmf-border); padding-top: .75rem; }
.tmfj-license p { margin: .25rem 0 0; }

/* Public: issues and archive */
.tmfj-issue-head { margin: 0 0 1rem; }
.tmfj-issue-title { margin: 0; font-size: 1.7em; color: var(--tmf-accent); }
.tmfj-issue-sub { font-size: 1.15em; margin: .2rem 0; font-weight: 600; }
.tmfj-issue-head p { margin: .2rem 0; }
.tmfj-section { font-size: 1em !important; text-transform: uppercase; letter-spacing: .07em; color: var(--tmf-muted); border-bottom: 1px solid var(--tmf-border); padding-bottom: .35rem; margin: 1.5rem 0 .25rem !important; }
.tmfj-toc { list-style: none; margin: 0; padding: 0; }
.tmfj-toc-item { display: flex; gap: 1rem; justify-content: space-between; padding: .85rem 0; border-bottom: 1px solid #ece9e5; }
.tmfj-toc-title { font-weight: 700; font-size: 1.08em; text-decoration: none; line-height: 1.35; }
.tmfj-toc-title:hover { text-decoration: underline; }
.tmfj-toc-authors { color: var(--tmf-muted); font-size: .93em; margin-top: .15rem; }
.tmfj-toc-side { display: flex; gap: .75rem; align-items: flex-start; white-space: nowrap; }
.tmfj-toc-pdf { font-size: .8em; font-weight: 700; padding: .2rem .6rem; border: 1px solid var(--tmf-accent); border-radius: 4px; text-decoration: none; }
.tmfj-toc-pdf:hover { background: var(--tmf-accent); color: #fff !important; }
.tmfj-more { margin-top: 1.25rem; }
.tmfj-year { font-size: 1.2em; color: var(--tmf-muted); margin: 1.5rem 0 .6rem !important; }
.tmfj-issues { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem; }
.tmfj-issue-card a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--tmf-border); border-radius: 10px; text-decoration: none; color: inherit; background: var(--tmf-bg); border-top: 4px solid var(--tmf-accent); }
.tmfj-issue-card a:hover { background: var(--tmf-soft); }
.tmfj-issue-card-label { font-weight: 700; font-size: 1.1em; color: var(--tmf-accent); }
.tmfj-issue-card-title { font-weight: 600; }

@media (max-width: 860px) {
  .tmfj-ws, .tmfj-article-grid { grid-template-columns: 1fr; }
  .tmfj-stages { flex-direction: column; }
  .tmfj-stages a { border-right: 0; border-bottom: 1px solid var(--tmf-border); text-align: left; }
}
@media (max-width: 640px) {
  .tmfj-table thead { display: none; }
  .tmfj-table, .tmfj-table tbody, .tmfj-table tr, .tmfj-table td { display: block; width: 100%; }
  .tmfj-table tr { border-bottom: 1px solid var(--tmf-border); padding: .4rem 0; }
  .tmfj-table td { border: 0; padding: .2rem .25rem; }
  .tmfj-toc-item { flex-direction: column; gap: .35rem; }
  .tmfj-article-title { font-size: 1.55em; }
  .tmfj-search input { min-width: 0; flex: 1; }
  .tmfj-search { width: 100%; }
}
.tmfj-article-main [lang=ta] .tmfj-prose { text-align: left; }

/* 3.1: ORCID / DOI icons, subtitles, per-author affiliations */
.tmfj-icon { display: inline-block; vertical-align: -3px; flex: none; }
.tmfj-orcid { display: inline-block; margin-left: .3em; text-decoration: none; line-height: 1; }
.tmfj-orcid .tmfj-icon { vertical-align: -2px; }
.tmfj-orcid:hover .tmfj-icon, .tmfj-orcid:focus-visible .tmfj-icon { filter: brightness(.9); }
.tmfj-doi { display: inline-flex; align-items: center; gap: .35em; font-size: .92em; overflow-wrap: anywhere; text-decoration: none; }
.tmfj-doi span { text-decoration: underline; text-underline-offset: 2px; }
.tmfj-author sup { font-size: .7em; margin-left: .05em; font-weight: 600; }
.tmfj-article-subtitle { font-size: 1.3em; margin: -.2rem 0 .6rem; color: #444; font-style: italic; }
ol.tmfj-affils { margin: .35rem 0 1rem; padding-left: 1.3rem; }
ol.tmfj-affils li { margin: 0 0 .1rem; }
.tmfj-toc-subtitle { font-style: italic; color: #444; margin-top: .1rem; }
.tmfj-toc-alt { color: var(--tmf-muted); font-size: .95em; margin-top: .1rem; }
.tmfj-toc-authors { font-weight: 600; color: inherit; }
.tmfj-toc-affils { font-size: .85em; color: var(--tmf-muted); margin: .15rem 0 0; }
ol.tmfj-toc-affils { padding-left: 1.2rem; }
.tmfj-toc-doi { margin-top: .3rem; font-size: .9em; }
.tmfj-authors-table { width: 100%; border-collapse: collapse; font-size: .92em; margin: 0 0 .5rem; }
.tmfj-authors-table th { text-align: left; font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--tmf-muted); padding: .3rem .3rem; }
.tmfj-authors-table td { padding: .25rem .3rem; vertical-align: top; }
.tmfj-authors-table td:first-child { width: 1.5rem; color: var(--tmf-muted); padding-top: .8rem; }
.tmfj-authors-table input[type=text] { width: 100%; }
.tmfj-crossref-list { margin: .25rem 0 .75rem; padding-left: 1.2rem; font-size: .92em; }
.tmfj-crossref-list li.is-bad { color: var(--tmfj-err); }
.tmfj-crossref-list li.is-ok { color: var(--tmfj-ok); }
@media (max-width: 640px) {
  .tmfj-authors-table thead { display: none; }
  .tmfj-authors-table tr { display: block; border-bottom: 1px solid var(--tmf-border); padding: .4rem 0; }
  .tmfj-authors-table td { display: block; }
  .tmfj-authors-table td:first-child { padding-top: 0; font-weight: 700; }
}
.tmfj-authors-table th:nth-child(5), .tmfj-authors-table td:nth-child(5) { width: 12.5em; }
.tmfj-authors-table th:nth-child(4), .tmfj-authors-table td:nth-child(4) { width: 34%; }
.tmfj-authors-table input[name$="[orcid]"] { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; }
@media (max-width: 640px) { .tmfj-authors-table td:nth-child(n) { width: auto; } }
.tmfj-authors-edit { border: 1px solid var(--tmf-border); border-radius: 8px; padding: .5rem .9rem .2rem; margin: 0 0 1rem; }

/* 3.2: issue covers, delete */
.tmfj-issue-head.has-cover { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 1.5rem; align-items: start; }
.tmfj-issue-cover { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); border: 1px solid var(--tmf-border); display: block; }
.tmfj-issue-head .tmfj-issue-desc { margin-top: .6rem; }
.tmfj-issue-card.has-cover a { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto 1fr; column-gap: .9rem; }
.tmfj-issue-card-cover { grid-row: 1 / span 3; width: 72px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; border: 1px solid var(--tmf-border); }
.tmfj-side-cover { display: block; margin: 0 0 1rem; }
.tmfj-side-cover img { display: block; width: 100%; max-width: 200px; height: auto; border-radius: 6px; border: 1px solid var(--tmf-border); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.tmfj-cover-edit { border: 1px solid var(--tmf-border); border-radius: 8px; padding: .5rem .9rem .2rem; margin: 0 0 .9rem; }
.tmfj-cover-edit legend { font-weight: 600; padding: 0 .3rem; }
.tmfj-cover-row { display: flex; gap: 1rem; align-items: flex-start; }
.tmfj-cover-fields { flex: 1; min-width: 0; }
.tmfj-cover-thumb { width: 110px; height: auto; border-radius: 4px; border: 1px solid var(--tmf-border); flex: none; }
.tmfj-ws-head .tmfj-cover-thumb { width: 72px; margin-right: 1rem; }
.tmfj-ws-head-main { flex: 1; }
.tmfj-cover-mini { width: 30px; height: 40px; object-fit: cover; border-radius: 3px; border: 1px solid var(--tmf-border); vertical-align: middle; margin-right: .6rem; }
.tmfj-card--danger { border-color: #f0bdb9; }
.tmfj-card--danger h3 { color: var(--tmfj-err); }
@media (max-width: 640px) {
  .tmfj-issue-head.has-cover { grid-template-columns: 1fr; }
  .tmfj-issue-cover { max-width: 220px; }
  .tmfj-cover-row { flex-direction: column; }
}

/* 3.3 Website widgets: [tamiliyal_latest_articles] / [tamiliyal_latest_issues] -- */
.tmfw { margin: 1.25rem 0; max-width: 100%; }
.tmfw ul.tmfw-track { list-style: none; margin: 0; padding: 0; }
.tmfw-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.tmfw-top:empty { display: none; }
.tmfw .tmfw-heading { margin: 0; font-size: 1.25em; color: var(--tmf-accent); }
.tmfw > .tmfw-heading { margin-bottom: .75rem; }
.tmfw-controls { display: flex; gap: .35rem; margin-left: auto; }
.tmfw-btn { width: 2.25rem; height: 2.25rem; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--tmf-border); border-radius: 50%; background: var(--tmf-bg); color: var(--tmf-accent); font-size: 1.25em; line-height: 1; cursor: pointer; }
.tmfw-btn:hover:not(:disabled) { background: var(--tmf-soft); border-color: var(--tmf-accent); }
.tmfw-btn:focus-visible { outline: 2px solid var(--tmf-accent); outline-offset: 2px; }
.tmfw-btn:disabled { opacity: .35; cursor: default; }
.tmfw-pause { font-size: .7em; letter-spacing: -.1em; }
.tmfw-pause .tmfw-i-play, .tmfw-pause.is-paused .tmfw-i-pause { display: none; }
.tmfw-pause.is-paused .tmfw-i-play { display: inline; letter-spacing: 0; }
.tmfw.is-static .tmfw-prev, .tmfw.is-static .tmfw-next { visibility: hidden; }

/* Cards */
.tmfw-item { min-width: 0; }
.tmfw-article, .tmfw--grid .tmfw-issue, .tmfw--carousel .tmfw-issue { border: 1px solid var(--tmf-border); border-radius: 10px; background: var(--tmf-bg); }
.tmfw-article { display: flex; gap: .85rem; padding: .9rem 1rem; }
.tmfw-body { min-width: 0; flex: 1; }
.tmfw-type { display: inline-block; font-size: .72em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tmf-muted); margin-bottom: .2rem; }
.tmfw .tmfw-title { margin: 0 0 .3rem; font-size: 1.02em; line-height: 1.35; }
.tmfw .tmfw-title a { color: var(--tmf-accent); text-decoration: none; }
.tmfw .tmfw-title a:hover, .tmfw .tmfw-title a:focus { text-decoration: underline; }
.tmfw-sub, .tmfw-alt { margin: 0 0 .3rem; font-size: .9em; color: var(--tmf-muted); }
.tmfw-authors { margin: 0 0 .3rem; font-size: .9em; font-weight: 600; }
.tmfw-abstract { margin: 0 0 .35rem; font-size: .88em; color: var(--tmf-muted); }
.tmfw-meta, .tmfw-doi, .tmfw-links { margin: 0 0 .2rem; font-size: .84em; color: var(--tmf-muted); }
.tmfw-meta a { color: inherit; }
.tmfw-doi .tmfj-doi { word-break: break-all; }
.tmfw-thumb { flex: 0 0 64px; }
.tmfw-thumb img { width: 64px; aspect-ratio: 600 / 850; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.tmfw-badge { display: inline-block; font-size: .65em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15em .5em; border-radius: 4px; background: var(--tmf-accent); color: #fff; vertical-align: middle; }
.tmfw-more { margin: .6rem 0 0; font-size: .95em; }

/* Issue cards */
.tmfw-issue { display: flex; flex-direction: column; overflow: hidden; }
.tmfw-issue .tmfw-body { padding: .75rem .9rem .85rem; }
.tmfw-cover { display: block; aspect-ratio: 600 / 850; background: var(--tmf-soft); }
.tmfw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tmfw-cover.is-blank { display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, var(--tmf-accent), #3d170d); color: #fff; text-decoration: none; text-align: center; font-weight: 700; font-size: 1.1em; line-height: 1.3; }

/* Grid of issues */
.tmfw--grid ul.tmfw-track { display: grid; grid-template-columns: repeat(var(--tmfw-cols, 4), minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .tmfw--grid ul.tmfw-track { grid-template-columns: repeat(min(var(--tmfw-cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 640px) { .tmfw--grid ul.tmfw-track { grid-template-columns: repeat(min(var(--tmfw-cols, 4), 2), minmax(0, 1fr)); gap: .75rem; } }

/* Plain lists */
.tmfw--list ul.tmfw-track { display: grid; gap: .6rem; }
.tmfw--list .tmfw-issue { flex-direction: row; align-items: flex-start; gap: .85rem; border-bottom: 1px solid var(--tmf-border); padding-bottom: .6rem; }
.tmfw--list .tmfw-issue .tmfw-cover { flex: 0 0 64px; border-radius: 4px; overflow: hidden; }
.tmfw--list .tmfw-issue .tmfw-cover.is-blank { font-size: .55em; padding: .3rem; }
.tmfw--list .tmfw-issue .tmfw-body { padding: 0; }

/* Carousel */
.tmfw--carousel ul.tmfw-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--tmfw-per, 3) - 1) * 1rem) / var(--tmfw-per, 3)); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: .5rem; }
.tmfw--carousel ul.tmfw-track:focus-visible { outline: 2px solid var(--tmf-accent); outline-offset: 3px; border-radius: 10px; }
.tmfw--carousel .tmfw-item { scroll-snap-align: start; }
.tmfw--carousel .tmfw-article { height: 100%; }
@media (max-width: 900px) { .tmfw--carousel ul.tmfw-track { grid-auto-columns: calc((100% - 1rem) / min(var(--tmfw-per, 3), 2)); } }
@media (max-width: 600px) { .tmfw--carousel ul.tmfw-track { grid-auto-columns: 85%; } .tmfw-issues.tmfw--carousel ul.tmfw-track { grid-auto-columns: 46%; } }
@media (prefers-reduced-motion: reduce) { .tmfw--carousel ul.tmfw-track { scroll-behavior: auto; } }

/* Ticker: continuous scroll, pauses on hover / focus / button */
.tmfw--ticker .tmfw-viewport { position: relative; overflow: hidden; border: 1px solid var(--tmf-border); border-radius: 10px; background: var(--tmf-bg); }
.tmfw--ticker .tmfw-article { border: 0; border-radius: 0; border-bottom: 1px solid var(--tmf-border); }
.tmfw-dir-up .tmfw-viewport { height: var(--tmfw-h, 360px); }
.tmfw-dir-up.is-running .tmfw-viewport::before, .tmfw-dir-up.is-running .tmfw-viewport::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5rem; z-index: 1; pointer-events: none; }
.tmfw-dir-up.is-running .tmfw-viewport::before { top: 0; background: linear-gradient(var(--tmf-bg), transparent); }
.tmfw-dir-up.is-running .tmfw-viewport::after { bottom: 0; background: linear-gradient(transparent, var(--tmf-bg)); }
.tmfw-dir-left ul.tmfw-track { display: flex; width: max-content; }
.tmfw-dir-left .tmfw-article { width: min(340px, 80vw); border-bottom: 0; border-right: 1px solid var(--tmf-border); }
.tmfw--ticker.is-running ul.tmfw-track { animation: tmfw-up var(--tmfw-dur, 24s) linear infinite; }
.tmfw-dir-left.is-running ul.tmfw-track { animation-name: tmfw-left; }
.tmfw--ticker.is-running .tmfw-viewport:hover ul.tmfw-track, .tmfw--ticker.is-running .tmfw-viewport:focus-within ul.tmfw-track, .tmfw--ticker.is-paused ul.tmfw-track { animation-play-state: paused; }
.tmfw--ticker.is-static .tmfw-viewport { overflow: auto; }
.tmfw-dir-up.is-static .tmfw-viewport { height: auto; max-height: var(--tmfw-h, 360px); }
@keyframes tmfw-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes tmfw-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tmfw--ticker ul.tmfw-track { animation: none !important; } }

/* Narrow containers (sidebars) */
.widget .tmfw, .wp-block-column .tmfw { margin: 0; }
.widget .tmfw-thumb { display: none; }

/* 3.4 Author guidelines page: [tamiliyal_author_guidelines] ------------------ */
.tmfg { max-width: 860px; }
.tmfg h2 { color: var(--tmf-accent); margin: 0 0 .75rem; }
.tmfg h3 { margin: 1.25rem 0 .5rem; }
.tmfg p, .tmfg li, .tmfg dd { overflow-wrap: anywhere; }
.tmfg ul, .tmfg ol { padding-left: 1.4rem; }
.tmfg li { margin-bottom: .4rem; }
.tmfg-lead { font-size: 1.08em; }
.tmfg-cta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.tmfg-cta a { text-decoration: none; display: inline-block; }
.tmfg-facts { border: 1px solid var(--tmf-border); border-radius: 10px; background: var(--tmf-soft); padding: .9rem 1.1rem; margin: 0 0 1.5rem; }
.tmfg-facts dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.5rem; }
.tmfg-facts dl > div { min-width: 0; }
.tmfg-facts dt { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tmf-muted); }
.tmfg-facts dd { margin: 0; }
.tmfg-tamil { border-left: 4px solid var(--tmf-accent); background: var(--tmf-soft); padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 0 0 1.5rem; line-height: 1.75; }
.tmfg-tamil h2 { font-size: 1.15em; }
.tmfg-tamil p { margin: .4rem 0 0; }
.tmfg-toc { border: 1px solid var(--tmf-border); border-radius: 10px; padding: .9rem 1.1rem; margin: 0 0 2rem; }
.tmfg-toc h2 { font-size: 1.05em; margin-bottom: .4rem; }
.tmfg-toc ol { columns: 2; column-gap: 2rem; margin: 0; }
.tmfg-toc li { break-inside: avoid; margin-bottom: .25rem; }
.tmfg-sec { padding-top: .5rem; margin-bottom: 2rem; scroll-margin-top: 80px; }
.tmfg-sec + .tmfg-sec { border-top: 1px solid var(--tmf-border); padding-top: 1.5rem; }
.tmfg-num { color: var(--tmf-muted); font-weight: 400; }
.tmfg-top { font-size: .85em; margin: .75rem 0 0; }
.tmfg-top a { color: var(--tmf-muted); }
.tmfg-types, .tmfg-dl { margin: 0; display: grid; gap: .65rem; }
.tmfg-types dt, .tmfg-dl dt { font-weight: 700; }
.tmfg-types dd, .tmfg-dl dd { margin: .1rem 0 0; }
.tmfg-steps > li { padding-left: .25rem; margin-bottom: .6rem; }
.tmfg-check { list-style: none; padding-left: 0 !important; }
.tmfg-check li { position: relative; padding-left: 1.8rem; }
.tmfg-check li::before { content: "✓"; position: absolute; left: 0; top: .05em; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--tmfj-ok); color: #fff; font-size: .75em; display: grid; place-items: center; }
.tmfg-tip, .tmfg-example { background: #fff8e6; border: 1px solid #f0dca6; border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; }
.tmfg-tip ul, .tmfg-example ul { margin: .4rem 0 0; }
.tmfg-tip p:first-child, .tmfg-example p:first-child { margin-top: 0; }
.tmfg-eg { display: block; margin-top: .25rem; font-size: .92em; color: var(--tmf-muted); }
.tmfg code { font-size: .92em; background: var(--tmf-soft); border: 1px solid var(--tmf-border); border-radius: 4px; padding: .05em .35em; white-space: normal; }
.tmfg-table-wrap { overflow-x: auto; margin: .75rem 0 1rem; }
.tmfg-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.tmfg-table th, .tmfg-table td { text-align: left; vertical-align: top; padding: .55rem .65rem; border-bottom: 1px solid var(--tmf-border); }
.tmfg-table thead th { font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--tmf-muted); border-bottom-width: 2px; }
.tmfg-table tbody th { font-weight: 700; width: 28%; }
.tmfg-refs td { font-family: Georgia, "Times New Roman", serif; }
.tmfg-req { display: inline-block; font-size: .75em; font-weight: 700; padding: .12em .55em; border-radius: 4px; white-space: nowrap; }
.tmfg-req--required { background: #e3f3e7; color: var(--tmfj-ok); }
.tmfg-req--optional { background: #eeecea; color: var(--tmf-muted); }
.tmfg-end { border-top: 2px solid var(--tmf-accent); margin-top: 2rem; padding-top: 1.25rem; }
.tmfg-updated { font-size: .85em; }
.tmfg-editor ul { margin: .25rem 0 0; }
@media (max-width: 640px) {
  .tmfg-facts dl { grid-template-columns: minmax(0, 1fr); }
  .tmfg-toc ol { columns: 1; }
  .tmfg-table tbody th { width: auto; }
  .tmfg-structure-wrap .tmfg-table, .tmfg-structure-wrap tbody, .tmfg-structure-wrap tr, .tmfg-structure-wrap th, .tmfg-structure-wrap td { display: block; }
  .tmfg-structure-wrap thead { display: none; }
  .tmfg-structure-wrap tr { border-bottom: 1px solid var(--tmf-border); padding: .5rem 0; }
  .tmfg-structure-wrap th, .tmfg-structure-wrap td { border: 0; padding: .15rem 0; }
  .tmfg-structure-wrap th { display: inline-block; margin-right: .5rem; }
  .tmfg-structure-wrap td:nth-child(2) { display: inline-block; }
  .tmfg-refs tr, .tmfg-refs th, .tmfg-refs td { display: block; border: 0; padding: .1rem 0; }
  .tmfg-refs tr { border-bottom: 1px solid var(--tmf-border); padding: .45rem 0; }
}
@media print {
  .tmfg-cta, .tmfg-toc, .tmfg-top, .tmfg-editor { display: none !important; }
  .tmfg-sec { break-inside: auto; }
  .tmfg a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}
.tmf-guidelines-link { margin: -.25rem 0 1rem; font-weight: 600; }

/* 3.5 Tamil subtitle ---------------------------------------------------------- */
.tmfj-article-subtitle-alt { font-size: 1.1em; margin: -.55rem 0 .75rem; font-family: "Latha", "Nirmala UI", "Noto Sans Tamil", serif; color: var(--tmf-muted); }
.tmfj-toc-subtitle-alt { color: var(--tmf-muted); font-size: .9em; margin-top: .05rem; }
.tmfj-toc-subtitle-alt, .tmfj-toc-alt, .tmfw-alt, .tmfw-sub-alt { font-family: "Latha", "Nirmala UI", "Noto Sans Tamil", inherit; }
.tmfw-sub-alt { margin: -.2rem 0 .3rem; font-size: .85em; color: var(--tmf-muted); }
.tmfj-ws-sub { font-style: italic; color: #444; margin-top: .1rem; }
.tmfj-ws-alt { color: var(--tmf-muted); margin-top: .1rem; font-family: "Latha", "Nirmala UI", "Noto Sans Tamil", inherit; }
/* Article content: headings, tables and figures with automatic numbering (3.6) */
.tmf-article-content { counter-reset: tmftab tmffig; }
.tmf-article-content h2 { font-size: 1.2em; margin: 1.1em 0 .45em; }
.tmf-article-content h3 { font-size: 1.07em; margin: .95em 0 .4em; }
.tmf-article-content h4 { font-size: 1em; font-style: italic; margin: .8em 0 .35em; }
.tmf-article-content table { counter-increment: tmftab; border-collapse: collapse; width: 100%; margin: 1em 0 1.2em; font-size: .93em; }
.tmf-article-content caption { caption-side: top; text-align: center; font-size: .92em; padding: 0 0 .4em; }
.tmf-article-content caption::before { content: "Table " counter(tmftab) ". "; font-weight: 700; }
.tmf-article-content th, .tmf-article-content td { border: 1px solid #9c968f; padding: .35em .5em; vertical-align: top; min-width: 2.5em; }
.tmf-article-content th { background: #efeae6; font-weight: 700; text-align: center; }
.tmf-article-content td p, .tmf-article-content th p { margin: 0 0 .3em; }
.tmf-article-content figure { counter-increment: tmffig; margin: 1em auto 1.2em; text-align: center; }
.tmf-article-content figure img { max-width: 100%; height: auto; display: block; margin: 0 auto .4em; }
.tmf-article-content figcaption { font-size: .92em; }
.tmf-article-content figcaption::before { content: "Fig. " counter(tmffig) ". "; font-weight: 700; }
.tmf-article-content blockquote { margin: 0 0 .7em; padding: .2em .9em; border-left: 3px solid var(--tmf-accent, #6b2e1f); font-style: italic; }
.tmf-article-content a { color: #0b57a4; }
.tmfj-content > summary { cursor: pointer; } .tmfj-content > summary h3 { display: inline; margin: 0; } .tmfj-content .tmf-article-content { margin-top: .8rem; }
