/*
 * Additions to the mockup CSS: elements WordPress needs (links in place of
 * the mockup's plain divs) and the pages the mockup does not show.
 * Only the mockup's tokens are used, so everything stays in its style.
 */

/* Wordmark and titles became links; keep them looking exactly as before. */
a.wordmark { display: block; }
.masthead a.wordmark:hover { color: var(--ink); }
.t-item a { color: inherit; }
.mega-w-auto { min-width: 0; }

/* The scrolling ticker text passes behind the "Latest" pill, not over it
   (the animated transform otherwise paints above the unpositioned pill). */
.ticker-pill { position: relative; z-index: 1; }

/* Admin bar must not cover the ticker for logged-in editors. */
body.admin-bar .mega { z-index: 300; }

/* ─── Lists (archives, search) ─── */
.sm-list { padding-bottom: 48px; }
.sm-list h1.sec-label { font-size: 15px; }
.sm-list-items { padding: 20px 0; max-width: 820px; }
.sm-list .news-item { grid-template-columns: 1fr 160px; }
.sm-list .news-item.sm-no-img { grid-template-columns: 1fr; }
.sm-list .ni-img { height: 104px; }
.sm-list h2.ni-title { font-size: 20px; }
.sm-archive-desc { font-family: var(--body); font-size: 13px; color: var(--mid); padding-top: 14px; max-width: 720px; }
.sm-empty { font-family: var(--body); color: var(--mid); padding: 24px 0; }
.sm-pagination .nav-links { display: flex; gap: 14px; font-family: var(--ui); font-size: 11px; letter-spacing: .06em; padding-top: 8px; }
.sm-pagination .page-numbers.current { color: var(--copper); font-weight: 600; }

/* ─── Search ─── */
.sm-search { padding: 20px 0 8px; max-width: 560px; }
.sm-search form { display: flex; gap: 8px; }
.sm-search label { flex: 1; }
.sm-search .search-field { width: 100%; font-family: var(--body); font-size: 14px; padding: 9px 12px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); }
.sm-search .search-submit, .sm-submit { background: var(--ink); color: var(--white); border: none; font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 0 18px; cursor: pointer; }
.sm-search .search-submit:hover, .sm-submit:hover { background: var(--green); }
.sm-search-count { padding-bottom: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ─── Single items and pages ─── */
.sm-article { max-width: 860px; padding-top: 40px; padding-bottom: 56px; }
.sm-article-head { margin-bottom: 28px; }
.sm-article .hero-kicker { margin-bottom: 18px; }
h1.sm-title { font-size: 42px; cursor: default; }
h1.sm-title:hover { color: var(--ink); }
.sm-deck { font-size: 16px; }
.sm-byline { margin-top: 4px; }
.sm-figure { margin: 0 0 32px; }
.sm-figure img { height: auto; max-height: 520px; }
.sm-figure figcaption { margin-top: 8px; }
.sm-content { font-family: var(--body); font-size: 15px; line-height: 1.8; color: var(--ink); }
.sm-content > * + * { margin-top: 1.1em; }
.sm-content h2, .sm-content h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin-top: 1.6em; }
.sm-content h2 { font-size: 26px; }
.sm-content h3 { font-size: 21px; }
.sm-content a { color: var(--green); border-bottom: 1px solid currentColor; }
.sm-content ul, .sm-content ol { padding-left: 1.4em; }
.sm-content img { height: auto; }
.sm-content blockquote { border-left: 2px solid var(--copper); padding-left: 18px; font-style: italic; color: var(--mid); }
.sm-page .hero-kicker a { color: var(--muted); }
.sm-child-pages { list-style: none; margin-top: 28px; border-top: 1px solid var(--rule); }
.sm-child-pages li { border-bottom: 1px solid var(--rule-lt); }
.sm-child-pages a { display: block; padding: 12px 0; font-family: var(--display); font-size: 19px; font-weight: 500; }
.sm-child-pages a:hover { color: var(--copper); }

/* Details box under a title (preprint, working group, event, job, article). */
.sm-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 6px; }
.sm-details > div { padding: 12px 16px 12px 0; }
.sm-details dt { font-family: var(--ui); font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sm-details dd { font-family: var(--ui); font-size: 12px; color: var(--ink); }
.sm-details dd a { color: var(--green); border-bottom: 1px solid currentColor; }
.sm-details .repo { font-weight: 600; }
.sm-note { margin-top: 12px; }

/* ─── Discussion ─── */
.sm-comments { margin-top: 48px; }
.sm-comments h2.sec-label { font-size: 15px; }
.sm-thread { margin-top: 18px; }
.sm-thread .pp-thread-text p + p { margin-top: .6em; }
.sm-comments .comment-respond { margin-top: 28px; }
.sm-comments .comment-reply-title { font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.sm-comments .comment-form p { margin-bottom: 12px; }
.sm-comments .comment-form label { display: block; font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sm-comments .comment-form input[type=text], .sm-comments .comment-form input[type=email], .sm-comments .comment-form input[type=url], .sm-comments .comment-form textarea { width: 100%; font-family: var(--body); font-size: 14px; padding: 9px 12px; border: 1px solid var(--rule); }
.sm-comments .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; }
.sm-submit { padding: 10px 20px; }

@media (max-width:900px){
  .sm-article { padding-top: 24px; }
  h1.sm-title { font-size: 30px; }
  .sm-list .news-item { grid-template-columns: 1fr 96px; }
  .sm-list .ni-img { height: 72px; }
}
.sm-comments .must-log-in, .sm-comments .logged-in-as { font-family: var(--ui); font-size: 12px; color: var(--mid); }
.sm-comments .must-log-in a, .sm-comments .logged-in-as a { color: var(--green); border-bottom: 1px solid currentColor; }

/* News from another site: link to the full story at the source. */
.sm-source { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.sm-source-link { display: inline-block; background: var(--ink); color: var(--white); font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; }
.sm-source-link:hover { background: var(--green); color: var(--white); }
.sm-source .meta { margin: 0; }

/* ─── Events calendar ─── */
.sm-events .sm-archive-desc { padding-bottom: 4px; }
.sm-ev-label { font-family: var(--ui); font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 0 10px; }
.sm-ev-label-rule { padding-top: 22px; border-top: 1px solid var(--rule-lt); margin-top: 8px; }
.sm-ev-past { list-style: none; max-width: 820px; }
.sm-ev-past li { display: flex; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule-lt); font-family: var(--display); font-size: 17px; }
.sm-ev-past .meta { margin: 0; min-width: 170px; }
.sm-ev-past a:hover { color: var(--copper); }
@media (max-width:900px){ .sm-ev-past li { flex-direction: column; gap: 2px; } }

/* ─── Community forms (join, member area, write for us, proposals) ─── */
.sm-form { max-width: 640px; margin-top: 18px; }
.sm-content .sm-form > * + * { margin-top: 0; }
.sm-field { margin: 0 0 16px; }
.sm-field label { display: block; font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.sm-field input[type=text], .sm-field input[type=email], .sm-field input[type=url], .sm-field input[type=password], .sm-field textarea, .sm-field select {
  width: 100%; font-family: var(--body); font-size: 14px; line-height: 1.5; padding: 9px 12px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); border-radius: 0; }
.sm-field input:focus, .sm-field textarea:focus, .sm-field select:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.sm-help { display: block; font-family: var(--ui); font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.sm-req { color: var(--copper); }
.sm-check label { display: flex; gap: 8px; align-items: flex-start; font-family: var(--ui); font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.sm-check input { margin-top: 3px; }
.sm-check a, .sm-form-note a, .sm-form-lead a, .sm-member-block a, .sm-member-links a, .sm-wg-panel a:not(.orcid) { color: var(--green); border-bottom: 1px solid currentColor; }
.sm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sm-form-lead { font-family: var(--ui); font-size: 13px; color: var(--mid); }
.sm-form-errors { border-left: 3px solid var(--copper); background: #fbf1ec; padding: 10px 16px; margin: 16px 0; font-family: var(--ui); font-size: 13px; color: var(--ink); max-width: 640px; }
.sm-form-errors ul { margin: 0; padding-left: 1.1em; }
.sm-form-note { border-left: 3px solid var(--green); background: #eef5f0; padding: 12px 16px; margin: 16px 0; font-family: var(--ui); font-size: 13px; line-height: 1.6; color: var(--ink); max-width: 640px; }
.sm-form-note.info { border-left-color: var(--muted); background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--muted); }
.sm-form-note.error { border-left-color: var(--copper); background: #fbf1ec; }
.sm-inline-form { display: inline-block; margin: 0 6px 0 0; max-width: none; }
.sm-inline-form .sm-submit { padding: 7px 14px; }
.sm-link-btn { background: none; border: none; padding: 0; font-family: var(--ui); font-size: 11px; color: var(--muted); border-bottom: 1px solid currentColor; cursor: pointer; }
.sm-link-btn:hover { color: var(--copper); }
.sm-orcid-btn { display: inline-block; background: #a6ce39; color: #fff !important; border: none !important; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 9px 16px; }
.sm-orcid-btn:hover { background: #8fb52d; }

/* Member area */
.sm-member-block { border-top: 1px solid var(--rule); padding: 18px 0 8px; margin-top: 18px; max-width: 640px; }
.sm-content h2.sm-member-h, .sm-member-h { font-family: var(--ui); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sm-member-list { list-style: none; padding: 0 !important; }
.sm-member-list li { padding: 7px 0; border-bottom: 1px solid var(--rule-lt); font-family: var(--display); font-size: 17px; }
.sm-member-list .meta { display: block; margin: 0 0 2px; }
.sm-member-links { font-family: var(--ui); font-size: 12px; margin-top: 24px; }

/* Working group membership panel */
.sm-wg-panel { margin-top: 44px; }
.sm-wg-panel h2.sec-label { font-size: 15px; }
.sm-wg-members, .sm-wg-requests { list-style: none; margin: 14px 0 18px; }
.sm-wg-members li, .sm-wg-requests li { padding: 8px 0; border-bottom: 1px solid var(--rule-lt); font-family: var(--ui); font-size: 13px; }
.sm-wg-actions { margin-top: 6px; }
.sm-wg-panel .sm-form { margin-top: 10px; }
.sm-wg-updates { list-style: none; margin: 14px 0 18px; }
.sm-wg-updates li { padding: 12px 0; border-bottom: 1px solid var(--rule-lt); }
.sm-wg-update-title { font-family: var(--display); font-size: 19px; font-weight: 600; margin: 4px 0 6px; }
.sm-wg-update-text { font-size: 15px; line-height: 1.6; }
.sm-wg-update-text p { margin: 0 0 8px; }
.sm-wg-post summary { cursor: pointer; font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--green); margin: 8px 0; }

/* Articles: competing interests, closed discussions */
.sm-conflicts { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--rule-lt); font-family: var(--ui); font-size: 12px; color: var(--mid); }
.sm-closed { margin-top: 18px; }
.sm-comments .comment-respond .sm-form-note { margin-top: 0; }

/* ─── Phones: compact header ───
   Top bar: only "Join / Subscribe" and a ☰ button for the other links.
   Main menu: "☰ Menu" | SM logo | search; the menu opens as a panel with
   each section expanding in place (the desktop drop-downs don't fit). */
.util-kebab, .util-menu, .nav-toggle, .nav-search-mobile { display: none; }
@media (max-width:900px){
  .util-bar { position: relative; justify-content: flex-end; padding-right: 4px; }
  .util-left, .util-right > a:not(.btn-sub) { display: none; }
  .util-right { gap: 4px; }
  .util-right .btn-sub { padding: 5px 12px; white-space: nowrap; }
  /* Same look as the menu button on www.iacm.forth.gr: ☰ in a thin rounded box */
  .util-kebab { display: flex; align-items: center; justify-content: center; margin: 0 8px 0 6px; padding: 4px 7px; background: none; border: 1px solid var(--rule); border-radius: 3px; font-size: 14px; line-height: 1; color: var(--ink); cursor: pointer; }
  .util-bar.m-open .util-kebab { border-color: var(--ink); background: var(--off); }
  .util-bar.m-open .util-menu { display: block; position: absolute; top: 100%; right: 8px; z-index: 400; min-width: 200px; background: var(--white); border: 1px solid var(--rule); border-top: 2px solid var(--copper); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px 0; }
  .util-menu a { display: block; padding: 11px 18px; font-family: var(--ui); font-size: 13px; color: var(--ink); letter-spacing: .02em; }
  .util-menu a:hover { background: var(--off); color: var(--copper); }
  .util-menu a.btn-sub { display: none; }

  .nav-inner { flex-wrap: wrap; height: auto; padding: 0; overflow: visible; justify-content: space-between; }
  .nav-toggle { display: flex; align-items: center; gap: 8px; order: 1; height: 46px; padding: 0 16px; background: none; border: none; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
  .nav-toggle span { font-size: 16px; font-weight: 400; }
  .nav-center { display: flex; order: 2; border: none; padding: 0; }
  .nav-search-mobile { display: flex; align-items: center; justify-content: center; order: 3; width: 56px; height: 46px; font-size: 20px; color: var(--mid); }
  .nav-left, .nav-right { display: none; order: 4; flex: 0 0 100%; flex-direction: column; }
  .nav-right { order: 5; }
  .primary-nav.m-open .nav-left, .primary-nav.m-open .nav-right { display: flex; }
  .primary-nav.m-open .nav-left { border-top: 1px solid var(--rule); max-height: none; }
  .primary-nav.m-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,.1); }
  .nav-right .nav-search-btn { display: none; }
  .nav-item { display: block; border-bottom: 1px solid var(--rule-lt); }
  .nav-item > button, .nav-item > a { width: 100%; justify-content: space-between; height: auto; padding: 15px 16px; font-size: 12px; color: var(--ink); border-bottom: none; margin: 0; }
  .nav-item > button:hover, .nav-item.open > button, .nav-item.open > a { border-bottom: none; color: var(--copper); }
  .caret { font-size: 9px; color: var(--muted); }
  .mega, .dropdown, .mega.right { position: static; min-width: 0 !important; width: 100%; border: none; border-top: 1px solid var(--rule-lt); box-shadow: none; padding: 6px 16px 14px; background: var(--off); }
  .nav-item.open .mega { display: block; }
  .mega-cols { display: block; }
  .mc { border-right: none; padding: 0; margin: 10px 0 0; }
  .mc-h { margin-bottom: 4px; }
  .mc-links a { padding: 8px 4px; font-size: 14px; }
  .mc-links small { font-size: 11px; }
  .mega-card { width: auto; padding: 12px 0 0; margin-top: 10px; border-left: none; border-top: 1px solid var(--rule-lt); }
  .mc-card-body { font-size: 13px; }
  .dropdown { padding: 4px 16px 10px; }
  .dropdown li a { padding: 10px 4px; font-size: 14px; }
}

/* ─── Phones: homepage and footer tidy-ups ─── */
@media (max-width:900px){
  /* Masthead: shorter rules so the tagline fits on one line */
  .masthead-rule { gap: 12px; }
  .masthead-rule span { width: 32px; }
  .masthead-rule em { white-space: nowrap; }
  /* Podcast strip: show the episode title on one line instead of an empty bar */
  .live-left { min-width: 0; }
  .live-title { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Section banners and band heads: title, subtitle and "see all" stack instead of squeezing */
  .sec-banner > div { flex-wrap: wrap; row-gap: 2px; }
  .sec-banner > div > span:first-child { white-space: nowrap; }
  .pp-head, .wg-head, .voices-head { flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
  .pp-title-wrap, .wg-title-wrap, .voices-title-wrap { flex-wrap: wrap; row-gap: 4px; }
  .pp-badge-new { align-self: center; }
  /* News list: long imported summaries cut to four lines, picture beside the title */
  .ni-deck { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .ni-img { align-self: start; margin-top: 22px; }
  /* Footer: link columns two by two, legal line stacked */
  .footer-top { grid-template-columns: 1fr 1fr !important; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-links { flex-wrap: wrap; gap: 8px 16px; }
}

/* Checkbox sentences with links ("I accept the terms and the privacy notice") flow as
   normal text; as flex items every link and text piece became its own column. */
.sm-check label { display: block; position: relative; padding-left: 22px; line-height: 1.55; }
.sm-check input { position: absolute; left: 0; top: 0; margin: 3px 0 0; }
