/*
Theme Name: TIERS
Theme URI: https://tiers.utu.fi/
Description: Website theme for the TIERS research group at the University of Turku. Home page with an optional recruiting note, Team and Projects managed from the admin menu, publications through the teachPress plugin. No tracking, no external fonts, no third-party scripts.
Author: TIERS
Version: 1.8.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tiers
*/

/* Colours come from the colour scheme chosen in Appearance > Customize (see inc/helpers.php).
   These are only fallbacks. */
:root {
  --deep:#3C4044; --head:#2c3033; --link:#9c3f0e; --tint:#fcf1e7; --line:#f1d9c3;
  --accent:#FD7B41; --accent-d:#a8470f; --pill:#fbe3d0; --bg:#ffffff; --text:#25282a;
  --muted:#6a6e72; --footer:#2d3033; --photo-bg:#f6e5d5; --photo-fg:#6a6e72;
  --hero1:#2d3033; --hero2:#5b6066; --hero-title:#FFC62B; --hero-eyebrow:#EDBF9B;
  --highlight:#DD700B; --highlight-line:#c3640a; --on-highlight:#16181a;
  --card:#fcf1e7; --btn:#3C4044; --btn-fg:#ffffff; --btn-o:#3C4044;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--deep); padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }
section { margin-bottom: 60px; }

/* ---------- Header ---------- */
.site-header { background: var(--deep); color: #fff; position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; }
.utu-logo { display: block; line-height: 0; }
.utu-logo-img { display: block; }
.bdiv { width: 1px; height: 38px; background: rgba(255,255,255,.35); margin: 0 20px; }
.logo { font-family: var(--serif); font-size: 30px; line-height: 1.1; letter-spacing: .03em; color: #fff; text-decoration: none; white-space: nowrap; }
.bsub { font-size: 11.5px; line-height: 1.3; color: #cfe0d6; margin-left: 14px; width: 190px; }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav li { position: relative; margin-left: 30px; }
.main-nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 6px 0; display: inline-block; border-bottom: 3px solid transparent; }
.main-nav a:hover { border-bottom-color: rgba(255,255,255,.55); }
.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current_page_item > a { border-bottom-color: var(--accent); }
.main-nav .menu-item-has-children > a:after { content: " ▾"; font-size: 11px; }
.main-nav .sub-menu { display: none; position: absolute; left: -16px; top: 100%; min-width: 280px; background: var(--footer); padding: 10px 0; margin: 0; list-style: none; z-index: 60; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu li { margin: 0; }
.main-nav .sub-menu a { display: block; padding: 8px 18px; border-bottom: 0; font-weight: 400; font-size: 15px; }
.main-nav .sub-menu a:hover { background: rgba(255,255,255,.1); }
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 3px; padding: 8px 16px; font: inherit; font-size: 14px; cursor: pointer; }

/* ---------- Titles and text ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 22px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.breadcrumb .sep { margin: 0 8px; }
h1.page-title { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1.08; margin: 40px 0 0; color: var(--head); }
h1.page-title:after { content: ""; display: block; width: 64px; height: 4px; background: var(--accent); margin-top: 18px; }
.lead { max-width: 70ch; font-size: 18px; margin: 20px 0 44px; }
.lead > :first-child { margin-top: 0; }
.lead > :last-child { margin-bottom: 0; }
h2.sec { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.15; color: var(--head); margin: 0 0 22px; }
h2.sec:before { content: ""; display: block; width: 36px; height: 3px; background: var(--accent); margin-bottom: 12px; }
.sechead { display: flex; justify-content: space-between; align-items: flex-end; }
.sechead a { font-weight: 600; font-size: 15px; margin-bottom: 24px; }

/* ---------- Page content (block editor) ---------- */
.entry-content { padding-bottom: 60px; }
.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content > h2, .entry-content > h3, .entry-content > h4, .entry-content > blockquote, .entry-content > .wp-block-buttons { max-width: 72ch; }
.entry-content h2, .entry-content h3 { font-family: var(--serif); font-weight: 400; color: var(--head); line-height: 1.2; }
.entry-content h2 { font-size: 32px; margin: 56px 0 20px; }
.entry-content h2:before { content: ""; display: block; width: 36px; height: 3px; background: var(--accent); margin-bottom: 12px; }
.entry-content h3 { font-size: 24px; margin: 28px 0 14px; }
.entry-content p, .entry-content li { font-size: 17px; }
.entry-content figure { margin: 0 0 20px; }
.entry-content .wp-block-columns { margin-bottom: 22px; }
.entry-content .wp-block-column > .is-style-card { height: 100%; }
.lead.entry-content { padding-bottom: 0; }
.entry-content > .is-style-card { margin-bottom: 22px; }
.is-style-card { background: var(--tint); border: 1px solid var(--line); padding: 24px 24px 28px; }
.is-style-card h3 { margin-top: 0; font-size: 25px; }
.is-style-card > :last-child { margin-bottom: 0; }
.wp-block-table table { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); }
.wp-block-table th, .wp-block-table td { padding: 12px 18px; border: 0; border-top: 1px solid var(--line); text-align: left; font-size: 16px; }
.wp-block-table thead th { background: var(--line); border-bottom: 0; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.post-item { max-width: 72ch; margin-bottom: 32px; }
.post-item h2 { font-family: var(--serif); font-weight: 400; margin: 0 0 4px; }
.notice-admin { background: #fff8e0; border: 1px solid #e6d28a; padding: 10px 16px; margin-bottom: 32px; }
.notice-admin p { margin: 0; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--btn); color: var(--btn-fg); border: 1.5px solid var(--btn); border-radius: 3px; padding: 12px 28px; font-weight: 600; text-decoration: none; margin: 0 10px 8px 0; font-size: 16px; }
.btn:hover { filter: brightness(1.12); color: var(--btn-fg); }
.btn.o { background: transparent; color: var(--btn-o); border-color: var(--btn-o); }
.btn.o:hover { background: var(--btn-o); color: var(--btn-fg); filter: none; }
.btn.w { background: #fff; color: #1f4a37; border-color: #fff; }
.btn.w:hover { background: var(--tint); }
.btn.ow { background: transparent; color: #fff; border-color: #fff; }
.btn.ow:hover { background: rgba(255,255,255,.14); }
.btn.s { padding: 9px 20px; font-size: 14px; }
.wp-block-button__link { background: var(--btn); color: var(--btn-fg); border-radius: 3px; padding: 12px 28px; font-weight: 600; text-decoration: none; }

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 72px 0 76px; background: linear-gradient(90deg, var(--hero1) 0%, var(--hero2) 100%); }
.hero:not(.has-photo) { background: url(assets/network.svg) no-repeat right top / auto 100%, linear-gradient(90deg, var(--hero1) 0%, var(--hero2) 100%); }
.hero.has-photo { background-size: cover; background-position: center; background-color: var(--hero1); }
.hero.has-photo:before { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: linear-gradient(90deg, rgba(10,22,17,.92) 0%, rgba(10,22,17,.55) 60%, rgba(10,22,17,.25) 100%); }
.hero .wrap { position: relative; }
.hero .ht { max-width: 660px; }
.hero .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--hero-eyebrow); margin: 0 0 16px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 54px; line-height: 1.08; margin: 0 0 20px; color: var(--hero-title); }
.hero p.l { font-size: 18px; margin: 0 0 26px; max-width: 44ch; color: #e6ece8; }

/* ---------- Home: recruiting note ---------- */
.rec { display: grid; grid-template-columns: 270px 1fr; margin: 40px 0 36px; background: var(--highlight); border: 1px solid var(--highlight-line); color: var(--on-highlight); }
.rec.nof { grid-template-columns: 1fr; }
.rec-img img { display: block; width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.rec .rb { padding: 24px 30px 26px; }
.rec .btn { background: var(--on-highlight); border-color: var(--on-highlight); color: var(--highlight); }
.rec .tagr { display: inline-block; background: var(--on-highlight); color: var(--highlight); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 12px; border-radius: 3px; }
.rec h2 { font-family: var(--serif); font-weight: 400; font-size: 29px; line-height: 1.15; color: var(--on-highlight); margin: 10px 0 8px; }
.rec p { margin: 0 0 16px; max-width: 70ch; }
.rec .meta { font-size: 14px; margin-left: 6px; }

/* ---------- Home: themes strip, tiles, current projects ---------- */
.th3 { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.t3 { padding: 42px 28px 30px; border-left: 1px solid var(--line); }
.t3:first-child { border-left: 0; padding-left: 0; }
.t3 h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--head); margin: 0 0 8px; }
.t3 p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; }
.t3 .go, .tile4 .go { font-weight: 600; font-size: 15px; text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 22px; }
.tile4 { display: block; background: var(--card); border: 1px solid var(--line); padding: 22px 22px 24px; text-decoration: none; color: inherit; }
.tile4:hover { border-color: var(--link); }
.tile4 h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--head); margin: 0 0 8px; }
.tile4 p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.tile4 .go { color: var(--link); }
.cp { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--line); }
.cpi { display: block; padding: 20px 24px; border-left: 1px solid var(--line); color: inherit; text-decoration: none; }
.cpi:first-child { border-left: 0; }
.cpi:hover b { text-decoration: underline; }
.cpi .date { margin-bottom: 8px; }
.cpi b { display: block; font-size: 17px; line-height: 1.3; }
.cpi .f { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.date { display: inline-block; background: var(--pill); color: var(--accent-d); font-weight: 600; font-size: 13px; border-radius: 3px; padding: 3px 12px; margin-bottom: 12px; }

/* ---------- Home: find us, call to action ---------- */
.findus { display: grid; grid-template-columns: 2.2fr 1fr; background: var(--card); border: 1px solid var(--line); margin-bottom: 64px; }
.findus .mapimg { display: block; line-height: 0; }
.findus img { width: 100%; height: auto; display: block; }
.findus .mapimg { position: relative; }
.mapcredit { position: absolute; left: 8px; bottom: 6px; font-size: 11px; line-height: 1; color: #333; background: rgba(255,255,255,.85); padding: 3px 7px; }
.findus .info { padding: 24px 26px; align-self: center; }
.findus h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--head); margin: 0 0 8px; }
.findus p { margin: 0 0 4px; font-size: 15px; }
.findus .a { color: var(--muted); margin-bottom: 16px; }
.ctab { background: var(--tint); border-top: 1px solid var(--line); padding: 58px 24px; text-align: center; margin-bottom: 0; }
.ctab h2 { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.15; color: var(--head); margin: 0 0 10px; }
.ctab p { margin: 0 auto 26px; max-width: 56ch; color: var(--muted); font-size: 17px; }
.ctab .btn { margin: 0; }

/* ---------- Projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 22px; row-gap: 22px; margin-bottom: 22px; }
.proj { background: var(--card); border: 1px solid var(--line); }
.proj .thumb { display: block; line-height: 0; }
.proj .thumb img { width: 100%; height: 170px; object-fit: cover; display: block; }
.proj-body { padding: 20px 22px 22px; }
.proj h3 { font-family: var(--sans); font-size: 19px; line-height: 1.25; margin: 0 0 4px; color: var(--text); }
.proj h3 a { color: var(--text); text-decoration: none; }
.proj h3 a:hover { text-decoration: underline; }
.proj .fund { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.proj p { margin: 0; font-size: 15px; }
.proj .more2 { margin-top: 14px; font-weight: 600; font-size: 14.5px; }
.pmeta { margin: 22px 0 0; }
.pmeta span { display: inline-block; margin: 0 10px 6px 0; border-radius: 3px; font-size: 13px; padding: 3px 12px; }
.pmeta .k { background: var(--deep); color: #fff; font-weight: 600; }
.pmeta .m { border: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.bigph { margin-bottom: 44px; }
.bigph img { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.layout2 { display: grid; grid-template-columns: 2fr 1fr; column-gap: 44px; margin-bottom: 40px; }
.layout2 .entry-content { padding-bottom: 0; }
.layout2 .entry-content > * { max-width: none; }
.side { background: var(--tint); border: 1px solid var(--line); padding: 22px; align-self: start; }
.side h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--head); margin: 0 0 10px; }
.side dl { margin: 0; }
.side dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.side dd { margin: 2px 0 0; font-size: 15px; word-break: break-word; }
.backrow { margin: 0 0 60px; }
.back { font-weight: 600; }
.arena { display: block; background: var(--card); border: 1px solid var(--line); padding: 26px 28px; margin: 40px 0 0; }
.arena h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--head); margin: 0 0 12px; }
.arena p { margin: 0 0 16px; max-width: 64ch; font-size: 17px; }
.arena .btn { margin: 0; }

/* ---------- Team ---------- */
.leaders { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 22px; row-gap: 22px; }
.leader { display: flex; background: var(--card); border: 1px solid var(--line); padding: 26px; }
.leader > .tile, .leader > .person-photo { flex: 0 0 170px; margin-right: 26px; }
.leader h3 { font-size: 25px; line-height: 1.2; margin: 2px 0 4px; }
.role { color: var(--muted); margin: 0 0 12px; }
.leader p { margin: 0 0 10px; font-size: 15.5px; }
.leader .mail { margin-top: 8px; font-size: 14.5px; }
.tile.ini { background: var(--bg); color: var(--deep); font-family: var(--serif); display: flex; align-items: center; justify-content: center; width: 92px; height: 92px; font-size: 32px; margin-bottom: 16px; }
.tile.ini.big { width: 170px; height: 170px; font-size: 56px; margin-bottom: 0; }
.person-photo { width: 92px; margin-bottom: 16px; }
.person-photo img { display: block; width: 92px; height: 92px; object-fit: cover; }
.person-photo.big { width: 170px; margin-bottom: 0; }
.person-photo.big img { width: 170px; height: 170px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 22px; row-gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 22px; }
.card h3 { font-size: 20px; line-height: 1.2; margin: 0 0 3px; }
.card .role { font-size: 15px; margin: 0 0 10px; }
.card p { margin: 0; font-size: 15.5px; }
.ico { margin-top: 14px; }
.ib { display: inline-block; width: 34px; height: 34px; border: 1px solid var(--line); color: var(--link); background: var(--bg); text-align: center; padding-top: 7px; margin: 0 8px 8px 0; vertical-align: top; }
.ib:hover { background: var(--tint); border-color: var(--link); }
.ib svg { width: 18px; height: 18px; display: inline-block; }
.fm2 { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 28px; }
.fr { display: flex; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.fi2 { width: 34px; height: 34px; background: var(--card); color: var(--deep); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-right: 12px; flex: none; }
.fr .nm { flex: 1; font-size: 15.5px; }
.fr .li { color: var(--link); width: 20px; height: 20px; flex: none; }
.fr .li svg { width: 18px; height: 18px; display: block; }

/* ---------- YouTube play button ---------- */
.tiers-yt { position: relative; width: 100%; padding-top: 56.25%; background: #1d2823; }
.tiers-yt iframe, .tiers-yt-button { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }
.tiers-yt-button { background: #1d2823; color: #fff; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tiers-play { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.92); position: relative; display: block; margin-bottom: 10px; }
.tiers-play:after { content: ""; position: absolute; left: 29px; top: 21px; border-left: 23px solid #1d2823; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.tiers-yt-label { font-weight: 600; }
.tiers-yt-note { font-size: 12.5px; opacity: .8; margin-top: 2px; }
.tiers-yt-button:hover .tiers-play { background: var(--card); }

/* ---------- teachPress lists (publications): white page, plain dark text, no boxes ---------- */
.teachpress_pub_list { font-size: 16px; color: var(--text); }
.teachpress_filter { margin: 0 0 30px; }
.teachpress_filter select, .teachpress_pub_list select, .teachpress_pub_list input[type=text] { border: 1px solid var(--line); padding: 9px 14px; font: inherit; font-size: 14.5px; background: var(--bg); color: var(--text); border-radius: 3px; margin: 0 8px 8px 0; max-width: 100%; }
.teachpress_pub_list input[type=submit], .teachpress_pub_list button { background: var(--btn); color: var(--btn-fg); border: 0; padding: 10px 22px; font: inherit; font-weight: 600; border-radius: 3px; cursor: pointer; }
.teachpress_pub_list h3, .tp_h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--head); margin: 38px 0 6px; }
.tp_publication { background: none !important; border: 0 !important; border-top: 1px solid var(--line) !important; padding: 16px 0 !important; margin: 0 !important; overflow: hidden; box-shadow: none !important; }
.tp_h3 + .tp_publication { border-top: 0 !important; }
.tp_pub_image_left { float: left; margin: 0 20px 8px 0; }
.tp_pub_image_left img, .tp_pub_image_right img { display: block; max-width: 150px; height: auto; }
.tp_pub_image_right { float: right; margin: 0 0 8px 20px; }
.tp_pub_info { margin: 0 !important; padding: 0 !important; }
.tp_pub_author { margin: 0 0 2px; color: var(--text); }
.tp_pub_title { margin: 0 0 4px; font-weight: 700; font-size: 17px; line-height: 1.35; color: var(--text); }
.tp_pub_title a { color: var(--text); }
.teachpress_pub_list .tp_pub_type, .tp_publication .tp_pub_type, span.tp_pub_type { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 0 0 6px !important; color: var(--text) !important; font-size: 14px !important; font-weight: 400 !important; font-style: italic; box-shadow: none !important; text-transform: none !important; }
.tp_pub_type:before { content: "("; }
.tp_pub_type:after { content: ")"; }
.tp_pub_additional { margin: 0 0 6px; color: var(--text); }
.tp_pub_menu { margin: 8px 0 0; font-size: 15px; }
.teachpress_pub_list .tp_pub_menu a, .tp_pub_menu a, .tp_pub_menu .tp_show { display: inline; border: 0 !important; background: none !important; padding: 0 !important; margin: 0 14px 4px 0; font-weight: 600; color: var(--link); text-decoration: underline; cursor: pointer; }
/* Compact layout (default): title first, then authors, venue and links running on together. */
body.pubs-compact .tp_publication { padding: 10px 0 !important; }
body.pubs-compact .tp_pub_info { display: flex !important; flex-wrap: wrap; align-items: baseline; }
body.pubs-compact .tp_pub_info > * { order: 5; flex: 0 0 100%; }
body.pubs-compact .tp_pub_info > .tp_pub_title { order: 1; flex: 0 0 100%; margin: 0 0 1px; font-size: 16.5px; }
body.pubs-compact .tp_pub_info > .tp_pub_author { order: 2; flex: 0 1 auto; margin: 0 6px 0 0; }
body.pubs-compact .tp_pub_info > .tp_pub_author:after { content: " ·"; }
body.pubs-compact .tp_pub_info > .tp_pub_additional { order: 3; flex: 0 1 auto; margin: 0 14px 0 0; }
body.pubs-compact .tp_pub_info > .tp_pub_menu { order: 4; flex: 0 0 auto; margin: 0; font-size: 14.5px; }
body.pubs-compact .teachpress_pub_list h3, body.pubs-compact .tp_h3 { margin-top: 30px; }
/* teachPress's own one-paragraph layout (template="tp_template_orig_s") */
.tp_publication_simple td { padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 16px; line-height: 1.5; }
.tp_pub_title_simple { font-weight: 700; }
.tp_pub_menu_simple { font-size: 14.5px; }
.tp_pub_menu_simple a { color: var(--link); font-weight: 600; }
.scholar-line { margin: 0 0 26px; }
.scholar-line .btn { margin: 0; }
.scholar-line svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; display: inline-block; }
.tp_bibtex_entry pre, .tp_abstract_entry { background: var(--tint); border: 1px solid var(--line); padding: 10px 14px; font-size: 13px; overflow-x: auto; white-space: pre-wrap; }
.tp_pub_tags { color: var(--text); font-size: 14px; }

/* ---------- Events (home page) ---------- */
.events-intro { margin: -8px 0 22px; color: var(--muted); }
.ev-list { background: var(--card); border: 1px solid var(--line); }
.ev { display: flex; padding: 18px 22px; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev-date { flex: 0 0 64px; margin-right: 22px; text-align: center; background: var(--bg); border: 1px solid var(--line); padding: 8px 0 6px; align-self: flex-start; }
.ev-date b { display: block; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.05; color: var(--head); }
.ev-date span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ev-body { flex: 1; }
.ev h3 { font-size: 18px; line-height: 1.3; margin: 0 0 2px; }
.ev-meta { margin: 0 0 6px; color: var(--muted); font-size: 14.5px; }
.ev-note { margin: 0 0 6px; font-size: 15.5px; }
.ev-link { margin: 0; font-size: 14.5px; font-weight: 600; }

/* ---------- Funders and collaborators (project page) ---------- */
.plogos { display: flex; flex-wrap: wrap; }
.pitem { display: flex; align-items: center; justify-content: center; width: 200px; height: 104px; margin: 0 16px 16px 0; padding: 14px 18px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: #1d2024; }
.pitem img { max-width: 100%; max-height: 72px; width: auto; height: auto; display: block; object-fit: contain; }
a.pitem:hover { border-color: var(--link); }
.pname { font-weight: 600; font-size: 15px; text-align: center; line-height: 1.3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; padding: 44px 0 34px; }
.fi { display: grid; grid-template-columns: 1.4fr 1fr 1fr; column-gap: 48px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 10px 0 0; font-size: 14px; max-width: 36ch; }
.site-footer .flogo { margin: 14px 0 0; }
.site-footer .flogo .logo { font-size: 24px; }
.fnav .menu { list-style: none; margin: 0; padding: 0; }
.fnav li { margin: 0 0 12px; }
.fnav a { font-size: 15px; text-decoration: underline; }
.fh { font-size: 12px !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #bcd0c5; margin: 0 0 14px !important; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1000px) {
  .proj-grid, .th3, .cp { grid-template-columns: 1fr; }
  .t3, .t3:first-child { border-left: 0; padding: 26px 0; border-top: 1px solid var(--line); }
  .t3:first-child { border-top: 0; }
  .cpi, .cpi:first-child { border-left: 0; border-top: 1px solid var(--line); }
  .cpi:first-child { border-top: 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .fm2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .collab-pair { grid-template-columns: 1fr; row-gap: 12px; }
  .collab-svg.is-zoom { border-left: 0; }
  .nav-toggle { display: inline-block; }
  .site-header .wrap { flex-wrap: wrap; }
  .main-nav { display: none; width: 100%; padding-top: 12px; }
  .main-nav.is-open { display: block; }
  .main-nav .menu { display: block; }
  .main-nav li { margin: 0; }
  .main-nav a { padding: 10px 0; }
  .main-nav .sub-menu { display: block; position: static; background: transparent; padding: 0 0 4px 16px; min-width: 0; }
  .main-nav .menu-item-has-children > a:after { content: ""; }
  .bsub { display: none; }
  .bdiv { margin: 0 12px; height: 28px; }
  .logo { font-size: 24px; }
  .utu-logo-img { max-height: 32px; }
  h1.page-title { font-size: 40px; margin-top: 30px; }
  .lead { font-size: 16px; }
  .hero { padding: 40px 0 44px; }
  .hero:not(.has-photo) { background: linear-gradient(90deg, var(--hero1) 0%, var(--hero2) 100%); }
  .hero h1 { font-size: 36px; }
  .rec, .findus, .layout2, .leaders, .grid, .tiles { grid-template-columns: 1fr; }
  .rec .rb { padding: 22px; }
  
  .leader { display: block; padding: 22px; }
  .leader > .tile, .leader > .person-photo { margin: 0 0 16px; }
  .tile.ini.big { width: 110px; height: 110px; font-size: 36px; }
  .person-photo.big, .person-photo.big img { width: 110px; }
  .person-photo.big img { height: 110px; }
  .fm2 { grid-template-columns: 1fr; }
  .fi { grid-template-columns: 1fr; row-gap: 26px; }
  .sechead { display: block; }
  .sechead a { display: block; margin: -8px 0 16px; }
  .ctab h2 { font-size: 28px; }
}
@media (prefers-color-scheme: dark) {
  body.dark-auto .findus img { filter: brightness(.8) saturate(.9); }
  body.dark-auto .notice-admin { background: #3a3318; border-color: #6b5d24; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- OpenStreetMap (click to load) ---------- */
.osm { position: relative; }
.osm img { width: 100%; height: auto; display: block; }
.osm .osm-ui { position: absolute; left: 12px; bottom: 12px; }
.osm .osm-load { display: block; width: auto; height: auto; margin: 0; padding: 9px 16px 8px; text-align: left; line-height: 1.35; cursor: pointer; }
.osm .osm-load span { display: block; font-size: 14px; line-height: 1.35; }
.osm .osm-load small { display: block; font-size: 11.5px; line-height: 1.35; font-weight: 400; }
.osm .osm-canvas { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 2; }
.osm.is-live img { visibility: hidden; }
.osm.is-live .osm-ui { display: none; }
.osm.is-loading .osm-load { opacity: .6; }

/* ---------- Collaboration map ---------- */
.collab-section { margin-bottom: 60px; }
.collab-intro { margin: -8px 0 22px; color: var(--muted); }
.collab { margin: 0; background: var(--card); border: 1px solid var(--line); padding: 12px 14px 8px; }
.collab-svg { width: 100%; height: auto; display: block; }
.collab-pair { display: grid; grid-template-columns: 3fr 2fr; column-gap: 14px; align-items: center; }
.collab-svg.is-zoom { border-left: 1px solid var(--line); }
.collab-land { fill: var(--line); }
.collab-dot { fill: var(--accent); fill-opacity: .82; stroke: var(--card); stroke-width: 1.5; }
.collab-dot:hover { fill-opacity: 1; stroke: var(--head); }
.collab-home path { fill: var(--head); }
.collab-home circle { fill: var(--card); }
.collab figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px 4px; }
.collab-list { margin-top: 14px; }
.collab-list summary { cursor: pointer; font-weight: 600; color: var(--link); }
.collab-list table { border-collapse: collapse; margin-top: 10px; min-width: 320px; }
.collab-list th, .collab-list td { padding: 6px 22px 6px 0; border-top: 1px solid var(--line); text-align: left; font-size: 15px; }
.collab-list thead th { border-top: 0; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- Past projects: small and quiet ---------- */
.proj-past { list-style: none; margin: 0 0 22px; padding: 0; background: var(--card); border: 1px solid var(--line); }
.proj-past li { display: flex; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.proj-past li:first-child { border-top: 0; }
.pp-years { flex: 0 0 96px; color: var(--muted); font-size: 14px; }
.pp-main { flex: 1; }
.pp-main a { font-weight: 600; color: var(--text); text-decoration: none; }
.pp-main a:hover { text-decoration: underline; }
.pp-funder { display: block; color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) { .proj-past li { display: block; } .pp-years { display: block; margin-bottom: 1px; } }
.pluginmap { line-height: 1.4; min-height: 270px; }
.pluginmap .leaflet-container { z-index: 1; }

/* ---------- Symbols for the research themes ---------- */
.theme-icon { margin: 0 0 14px; line-height: 0; }
.tiers-icon { width: 64px; height: 64px; display: block; }
.tiers-icon .ic { stroke: var(--link); }
.tiers-icon .fl { fill: var(--link); }
.tiers-icon .mk { fill: var(--card); stroke: var(--link); }
.is-style-card .theme-icon { margin-bottom: 10px; }
.t3 .theme-icon { margin-bottom: 12px; }

/* ---------- Research themes as a row, with an optional figure ---------- */
.themes-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 56px; }
.tcard { background: var(--card); border: 1px solid var(--line); padding: 22px 22px 24px; }
.tcard h3 { margin: 4px 0 6px; font-size: 20px; }
.tcard p { margin: 0; color: var(--muted); font-size: 15.5px; }
.theme-fig { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; margin: 0 0 14px; }

/* ---------- Robot development ---------- */
.robots-section { margin-bottom: 60px; }
.robots-intro { margin: -8px 0 24px; color: var(--muted); }
.robot-row { display: flex; gap: 36px; align-items: center; margin: 0 0 36px; }
.robot-row:nth-child(even) { flex-direction: row-reverse; }
.rr-media { flex: 1.2; min-width: 0; }
.rr-text { flex: 1; min-width: 0; }
.rr-img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 460px; object-fit: cover; display: block; }
.rr-video { margin-top: 12px; }
.rr-text h3 { font-size: 26px; margin: 0 0 10px; }
.rr-text p { margin: 0 0 12px; color: var(--muted); font-size: 17px; }
.robot-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.robot-card { background: var(--card); border: 1px solid var(--line); }
.rc-img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.robot-card .b { padding: 16px 18px 18px; }
.robot-card h3 { margin: 0 0 6px; font-size: 19px; }
.robot-card p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.robots-home { margin-bottom: 20px; }

/* ---------- Folded lists ---------- */
.proj-past-wrap summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 6px 0 10px; }
details:not([open]) > *:not(summary) { display: none; }
.menu-item-muted > a { color: var(--muted); font-size: .92em; }
@media (max-width: 760px) {
  .themes-row, .robot-cards { grid-template-columns: 1fr; }
  .robot-row, .robot-row:nth-child(even) { flex-direction: column; align-items: stretch; gap: 16px; }
}
