/* TEALA content templates: prebuilt CSS, no Tailwind build required. */
.teala-content-page{color:var(--foreground)}
.teala-page-hero{display:flex;min-height:15rem;flex-direction:column;justify-content:center;padding:7rem 1.5rem 2rem}
.teala-page-hero__eyebrow{display:flex;align-items:center;gap:.75rem;font-size:.72rem;font-weight:500;letter-spacing:.28em;text-transform:uppercase;color:color-mix(in oklab,var(--foreground) 60%,transparent)}
.teala-page-hero__eyebrow span{display:block;width:2rem;height:1px;background:var(--brand-lime-strong)}
.teala-page-hero__title{margin:1rem 0 0;font-family:var(--font-display);font-size:2.35rem;line-height:1.02;letter-spacing:-.04em;font-weight:500}
.teala-page-hero__description{max-width:42rem;margin:1rem 0 0;font-size:.9rem;line-height:1.75;color:color-mix(in oklab,var(--foreground) 70%,transparent)}
.teala-section{padding:0 1.5rem 6rem}
.teala-tabs{display:flex;gap:.5rem;margin:0 -1.5rem 2.5rem;padding:0 1.5rem .5rem;overflow-x:auto;scrollbar-width:none}
.teala-tabs::-webkit-scrollbar{display:none}
.teala-tab{display:inline-flex;flex:0 0 auto;min-height:2.5rem;align-items:center;justify-content:center;border-radius:.5rem;padding:.65rem 1rem;background:white;color:color-mix(in oklab,var(--foreground) 65%,transparent);font-size:.88rem;font-weight:500;text-decoration:none;transition:background-color .2s,color .2s}
.teala-tab:hover{background:color-mix(in oklab,var(--foreground) 6%,white);color:var(--foreground)}
.teala-tab.is-active{background:var(--brand-ink);color:white}
.teala-news-list{margin:0;padding:0;border-top:1px solid color-mix(in oklab,var(--foreground) 10%,transparent);list-style:none}
.teala-news-list li{margin:0;padding:0}
.teala-news-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:center;padding:1.5rem 1rem;border-bottom:1px solid color-mix(in oklab,var(--foreground) 10%,transparent);color:inherit;text-decoration:none;transition:background-color .2s,color .2s}
.teala-news-row:hover{background:color-mix(in oklab,var(--brand-ink) 75%,transparent);color:white}
.teala-news-row__tag{grid-column:1;display:flex;align-items:center;gap:.5rem;white-space:nowrap;font-size:.72rem;font-weight:500;letter-spacing:.08em;color:color-mix(in oklab,currentColor 60%,transparent)}
.teala-news-row__tag span{width:.375rem;height:.375rem;flex:0 0 auto;border-radius:999px;background:var(--brand-lime-strong)}
.teala-news-row:hover .teala-news-row__tag span{background:var(--brand-lime)}
.teala-news-row__date{display:none;font-size:.72rem;font-weight:500;letter-spacing:.06em;color:color-mix(in oklab,currentColor 52%,transparent)}
.teala-news-row__main{grid-column:1;min-width:0}
.teala-news-row__main h2{margin:.4rem 0 0;font-family:var(--font-display);font-size:1.15rem;line-height:1.5;letter-spacing:-.02em;font-weight:500}
.teala-news-row__date--mobile{display:block;margin-top:.25rem}
.teala-news-row>.teala-icon-button{grid-column:2;grid-row:1 / span 2;align-self:center}
.teala-icon-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;flex:0 0 auto;border:1px solid color-mix(in oklab,currentColor 15%,transparent);border-radius:999px;color:inherit;transition:transform .2s,background-color .2s,color .2s,border-color .2s}
.teala-news-row:hover .teala-icon-button{background:var(--brand-lime);border-color:var(--brand-lime);color:var(--brand-ink)}
.teala-svg-icon{width:1rem;height:1rem}
.teala-pagination{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:2.5rem}
.teala-pagination__arrow,.teala-pagination__page{display:grid;min-width:2.5rem;height:2.5rem;place-items:center;border:1px solid color-mix(in oklab,var(--foreground) 15%,transparent);border-radius:999px;color:var(--foreground);text-decoration:none;transition:background-color .2s,color .2s}
.teala-pagination__page{border:0;padding:0 .75rem;font-size:.88rem;font-weight:500;background:white}
.teala-pagination__page.is-active,.teala-pagination a:hover{background:var(--brand-ink);color:white}
.teala-pagination__arrow.is-disabled{opacity:.35}
.teala-event-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
.teala-event-card{min-width:0}
.teala-event-card__link{display:flex;height:100%;flex-direction:column;overflow:hidden;border-radius:1rem;background:white;color:inherit;text-decoration:none}
.teala-event-card__image-wrap{position:relative;aspect-ratio:16/10;overflow:hidden;background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.teala-event-card__image-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.22,1,.36,1)}
.teala-event-card__link:hover .teala-event-card__image-wrap img{transform:scale(1.05)}
.teala-event-card__date{position:absolute;top:1rem;left:1rem;border-radius:.5rem;padding:.45rem .75rem;background:rgba(255,255,255,.95);box-shadow:0 5px 18px rgba(0,0,0,.08);font-size:.72rem;letter-spacing:.06em}
.teala-event-card__body{display:flex;flex:1;flex-direction:column;padding:1.5rem}
.teala-event-card__category{font-size:.68rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--brand-ink)}
.teala-event-card__body h2{margin:.55rem 0 0;font-family:var(--font-display);font-size:1.25rem;line-height:1.28;letter-spacing:-.02em;font-weight:500}
.teala-event-card__body p{margin:.8rem 0 0;font-size:.9rem;line-height:1.7;color:color-mix(in oklab,var(--foreground) 70%,transparent)}
.teala-event-card__action{display:flex;justify-content:flex-end;margin-top:auto;padding-top:1.5rem}
.teala-icon-button.is-dark{border-color:var(--brand-ink);background:var(--brand-ink);color:white}
.teala-event-card__link:hover .teala-icon-button.is-dark{transform:translate(.12rem,-.12rem)}
.teala-empty-state{padding:2.5rem 1rem;color:color-mix(in oklab,var(--foreground) 60%,transparent);font-size:.95rem}
.teala-detail{padding:8rem 1.5rem 6rem}
.teala-detail__inner{max-width:none}
.teala-back-link{display:inline-flex;align-items:center;gap:.5rem;color:color-mix(in oklab,var(--foreground) 60%,transparent);font-size:.72rem;font-weight:500;letter-spacing:.2em;text-decoration:none;text-transform:uppercase;transition:color .2s}
.teala-back-link:hover{color:var(--foreground)}
.teala-detail__meta{display:flex;align-items:center;gap:1rem;margin-top:2rem;color:color-mix(in oklab,var(--foreground) 60%,transparent);font-size:.72rem;font-weight:500;letter-spacing:.08em}
.teala-detail__category{display:flex;align-items:center;gap:.5rem}
.teala-detail__category>span{width:.375rem;height:.375rem;border-radius:999px;background:var(--brand-lime-strong)}
.teala-detail__title{max-width:64rem;margin:1rem 0 0;font-family:var(--font-display);font-size:2.35rem;line-height:1.08;letter-spacing:-.04em;font-weight:500}
.teala-rich-text{max-width:none;width:100%;margin-top:2.5rem;color:color-mix(in oklab,var(--foreground) 75%,transparent);font-size:.95rem;line-height:1.85}
.teala-rich-text p{margin:0 0 1.25rem}
.teala-rich-text a{color:var(--brand-ink);text-decoration:underline;text-underline-offset:.2em}
.teala-event-detail{padding-left:0;padding-right:0}
.teala-event-detail .teala-detail__inner{padding:0 1.5rem}
.teala-event-detail__hero{margin-top:2.5rem;aspect-ratio:16/9;overflow:hidden;background:color-mix(in oklab,var(--foreground) 7%,transparent)}
.teala-event-detail__hero img{width:100%;height:100%;object-fit:cover}

@media (min-width:48rem){
  .teala-page-hero{min-height:26rem;padding:10rem 2.5rem 5rem}
  .teala-page-hero__eyebrow{font-size:.78rem}
  .teala-page-hero__title{margin-top:1.5rem;font-size:4.5rem}
  .teala-page-hero__description{margin-top:1.5rem;font-size:1rem}
  .teala-section{padding:0 2.5rem 8rem}
  .teala-tabs{margin:0 0 2.5rem;padding:0 0 .5rem;overflow:visible;flex-wrap:wrap}
  .teala-tab{min-height:2.75rem;padding:.7rem 1.25rem;font-size:1rem}
  .teala-news-row{grid-template-columns:minmax(9rem,2fr) minmax(9rem,2fr) minmax(0,7fr) auto;padding:1.75rem 1.5rem}
  .teala-news-row__tag{grid-column:1;grid-row:1}
  .teala-news-row__date{display:block;grid-column:2;grid-row:1}
  .teala-news-row__main{grid-column:3;grid-row:1}
  .teala-news-row__main h2{margin:0;font-size:1.5rem}
  .teala-news-row__date--mobile{display:none}
  .teala-news-row>.teala-icon-button{grid-column:4;grid-row:1}
  .teala-event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .teala-event-card__body h2{font-size:1.5rem}
  .teala-detail{padding:10rem 2.5rem 8rem}
  .teala-detail__title{font-size:3.75rem;line-height:1.05}
  .teala-rich-text{font-size:1rem}
  .teala-event-detail{padding-left:0;padding-right:0}
  .teala-event-detail .teala-detail__inner{padding:0 2.5rem}
  .teala-event-detail__hero{margin:2.5rem 2.5rem 0;border-radius:1rem}
}

@media (min-width:64rem){
  .teala-event-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Phase 4 UI polish: mobile language, page background, footer CTA. */
.teala-page-hero{position:relative;isolation:isolate}
.teala-page-hero::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-5rem 0 auto;
  height:min(30rem,58vh);
  background-image:
    linear-gradient(to right,var(--background) 0%,transparent 28%,transparent 72%,var(--background) 100%),
    radial-gradient(50% 45% at 88% 2%,color-mix(in oklab,var(--brand-lime) 22%,transparent),transparent 70%),
    url("../images/circuit.svg");
  background-position:center top,center top,right top;
  background-size:100% 100%,100% 100%,480px 480px;
  background-repeat:no-repeat,no-repeat,repeat;
  opacity:.28;
  -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 22%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 0%,#000 22%,transparent 100%);
  pointer-events:none
}

.teala-mobile-language{padding-bottom:max(3rem,calc(env(safe-area-inset-bottom) + 2rem))}
.teala-mobile-language__label{font-size:.75rem}
.teala-mobile-language__options{gap:1.75rem}
.teala-mobile-language__option{
  display:inline-flex;
  align-items:center;
  min-height:2.75rem;
  font-size:1.125rem;
  line-height:1.4;
  letter-spacing:.01em;
  text-decoration:none
}

/* Footer Join Us follows the same shared arrow hover motion as other CTA buttons. */

@media (max-width:47.999rem){
  .teala-page-hero::before{
    inset:-4rem 0 auto;
    height:22rem;
    background-position:center top,center top,72% top;
    background-size:100% 100%,100% 100%,360px 360px;
    opacity:.22;
    -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 18%,transparent 100%);
    mask-image:linear-gradient(to bottom,#000 0%,#000 18%,transparent 100%)
  }
  .teala-mobile-nav{padding-bottom:1rem}
}

@media (prefers-reduced-motion:reduce){
}


/* Phase 4.1 UI stability -------------------------------------------------- */
/* Keep every shared non-home page title block at exactly the same height. */
.teala-page-hero{
  box-sizing:border-box;
  height:18rem;
  min-height:18rem;
  max-height:18rem;
}

/* Match the homepage "了解更多 / Learn More" CTA: only the icon shifts. */
.teala-footer-join__icon{
  transition:transform .15s ease;
}
.teala-footer-join:hover .teala-footer-join__icon,
.teala-footer-join:focus-visible .teala-footer-join__icon{
  transform:translateX(.125rem);
}

@media (min-width:48rem){
  .teala-page-hero{
    height:26rem;
    min-height:26rem;
    max-height:26rem;
  }
}

@media (prefers-reduced-motion:reduce){
  .teala-footer-join__icon{transition:none}
  .teala-footer-join:hover .teala-footer-join__icon,
  .teala-footer-join:focus-visible .teala-footer-join__icon{transform:none}
}


/* Keep the primary navigation from compressing the logo at intermediate widths. */
.teala-header-logo{flex:0 0 auto;min-width:0}
@media (min-width:768px) and (max-width:1279px){
  #site-header .teala-desktop-nav{display:none!important}
  #site-header .teala-mobile-toggle{display:grid!important}
  /* The menu button is shown up to 1279px, so its panel must be able to open here too (it carries md:hidden). */
  [data-mobile-menu]:not(.hidden){display:block!important}
}
@media (min-width:1280px){
  #site-header .teala-desktop-nav{display:flex!important}
  #site-header .teala-mobile-toggle{display:none!important}
}
/* Global selection colour. */
::selection{background:var(--brand-lime-strong);color:#fff;text-shadow:none}
::-moz-selection{background:var(--brand-lime-strong);color:#fff;text-shadow:none}

/* Article content from the editor: the base reset removes list bullets, heading sizes etc., so restore them. */
.teala-rich-text h2,.teala-rich-text h3,.teala-rich-text h4{margin:2.25rem 0 1rem;color:var(--foreground);font-family:var(--font-display);font-weight:500;line-height:1.35;letter-spacing:-.01em}
.teala-rich-text h2{font-size:1.5rem}
.teala-rich-text h3{font-size:1.25rem}
.teala-rich-text h4{font-size:1.075rem}
.teala-rich-text>:first-child{margin-top:0}
.teala-rich-text ul,.teala-rich-text ol{margin:0 0 1.25rem;padding-left:1.5rem}
.teala-rich-text ul{list-style:disc}
.teala-rich-text ol{list-style:decimal}
.teala-rich-text li{margin:.35rem 0}
.teala-rich-text li>ul,.teala-rich-text li>ol{margin:.35rem 0 0}
.teala-rich-text blockquote{margin:1.75rem 0;padding:.25rem 0 .25rem 1.25rem;border-left:3px solid var(--brand-lime);color:var(--foreground)}
.teala-rich-text blockquote p:last-child{margin-bottom:0}
.teala-rich-text hr{margin:2.5rem 0;border:0;border-top:1px solid color-mix(in oklab,var(--foreground) 15%,transparent)}
.teala-rich-text strong,.teala-rich-text b{color:var(--foreground);font-weight:600}
.teala-rich-text img{max-width:100%;height:auto}
.teala-rich-text .aligncenter{display:block;margin-left:auto;margin-right:auto}
.teala-rich-text .alignleft{float:left;margin:.25rem 1.5rem 1rem 0}
.teala-rich-text .alignright{float:right;margin:.25rem 0 1rem 1.5rem}
.teala-rich-text .wp-caption{max-width:100%}
.teala-rich-text .wp-caption-text{margin-top:.5rem;font-size:.85rem;color:color-mix(in oklab,var(--foreground) 55%,transparent)}
.teala-rich-text::after{content:"";display:table;clear:both}
/* Tables: wrapped in .teala-table-scroll (see teala_content_html) so wide tables scroll on phones. Border width/style/colour set in the editor are written on the table and inherited by every cell; a cell's own settings win. */
.teala-rich-text .teala-table-scroll{max-width:100%;margin:1.75rem 0;overflow-x:auto}
.teala-rich-text table{width:100%;border-collapse:collapse;font-size:.9rem;line-height:1.6}
.teala-rich-text table:not(.teala-table-plain){border:1px solid color-mix(in oklab,var(--foreground) 14%,transparent)}
.teala-rich-text table:not(.teala-table-plain)>:is(thead,tbody,tfoot),.teala-rich-text table:not(.teala-table-plain)>*>tr{border-width:inherit;border-style:inherit;border-color:inherit}
.teala-rich-text th,.teala-rich-text td{min-width:7rem;padding:.65rem .85rem;border-width:inherit;border-style:inherit;border-color:inherit;text-align:left;vertical-align:top}
.teala-rich-text th,.teala-rich-text thead td{background:color-mix(in oklab,var(--brand-ink) 6%,transparent);color:var(--foreground);font-weight:600}
@media (max-width:767px){.teala-rich-text .alignleft,.teala-rich-text .alignright{float:none;margin:1rem auto}}

/* Galleries (新增媒體 → 建立圖庫): photos side by side, column count from the gallery settings; 2 columns on phones. */
.teala-rich-text .gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1.75rem 0}
.teala-rich-text .gallery-columns-1{grid-template-columns:minmax(0,1fr)}
.teala-rich-text .gallery-columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.teala-rich-text .gallery-columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.teala-rich-text .gallery-columns-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.teala-rich-text .gallery-columns-6,.teala-rich-text .gallery-columns-7,.teala-rich-text .gallery-columns-8,.teala-rich-text .gallery-columns-9{grid-template-columns:repeat(6,minmax(0,1fr))}
.teala-rich-text .gallery-item{margin:0;min-width:0}
.teala-rich-text .gallery-icon a,.teala-rich-text .gallery-icon>img{display:block}
.teala-rich-text .gallery-item img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.teala-rich-text .gallery-caption{margin-top:.4rem;font-size:.8rem;line-height:1.5;color:color-mix(in oklab,var(--foreground) 55%,transparent)}
@media (max-width:767px){.teala-rich-text .gallery:not(.gallery-columns-1){grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Tables set to 表格內容 → 外框樣式 → 無框線: full width, equal columns, no borders; photos inside shrink to fit (e.g. photos side by side). */
.teala-rich-text table.teala-table-plain{table-layout:fixed;font-size:inherit;line-height:inherit}
.teala-rich-text table.teala-table-plain{border:0!important}
/* !important: the editor also writes border="1" and per-cell border widths, which must not show on 無框線 tables. */
.teala-rich-text table.teala-table-plain th,.teala-rich-text table.teala-table-plain td{min-width:0;padding:.375rem;border:0!important;background:none;font-weight:inherit;vertical-align:top}
.teala-rich-text table img{max-width:100%;height:auto}
.teala-rich-text table.teala-table-plain img{display:block}
.teala-rich-text table.teala-table-plain img.aligncenter{margin-left:auto;margin-right:auto}
.teala-rich-text table.teala-table-plain td p{margin:0}
