/* Public AkiFuns theme refresh. Loaded by public templates only. */
:root {
  --primary: #3949c6;
  --primary-container: #5668df;
  --on-primary: #fff;
  --primary-fixed: #e4e8ff;
  --primary-fixed-dim: #c6ceff;
  --secondary: #6556bd;
  --secondary-container: #e9e5ff;
  --secondary-fixed: #e9e5ff;
  --secondary-fixed-dim: #d8d1ff;
  --tertiary: #416b83;
  --tertiary-container: #dcecf5;
  --error: #b42332;
  --error-container: #ffe3e5;
  --surface: #fbfaff;
  --surface-dim: #e5e4ef;
  --surface-bright: #fbfaff;
  --surface-container-lowest: #fff;
  --surface-container-low: #f5f4fc;
  --surface-container: #efedf8;
  --surface-container-high: #e8e6f2;
  --surface-container-highest: #dfdeeb;
  --on-surface: #20233b;
  --on-surface-variant: #5d6078;
  --outline: #777990;
  --outline-variant: #d7d6e5;
  --background: #fbfaff;
  --on-background: #20233b;
  --surface-variant: #e8e6f2;
  --glass-bg: #fff;
  --glass-blur: none;
  --glass-border: 1px solid #e3e2ef;
  --glass-shadow: 0 8px 24px rgb(38 39 78 / 6%);
  --glow-lime: none;
  --glow-blue: none;
  scroll-padding-top: 104px;
}

html { scroll-padding-top: 104px; }
body { background: #fbfaff; color: #20233b; }

/* The public menu remains visible while scrolling and reads as a floating bar. */
.site-header,
body > nav.public-floating-nav {
  position: sticky !important;
  top: 12px !important;
  z-index: 1000 !important;
  width: min(1240px, calc(100% - 32px)) !important;
  margin: 0 auto 24px !important;
  border: 1px solid #e5e3f0 !important;
  border-radius: 18px !important;
  background: rgb(255 255 255 / 96%) !important;
  box-shadow: 0 8px 28px rgb(44 46 100 / 9%) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.admin-online-present .site-header,
body.admin-online-present > nav.public-floating-nav { top: 46px !important; }
.site-header .container { width: 100%; }
.site-header + main { padding-top: 0; }
body > nav.public-floating-nav > div:first-child { padding-block: 12px !important; }
body > nav.public-floating-nav a,
.site-nav a { text-decoration: none; }
.text-primary { color: #3949c6 !important; }
.bg-primary { background-color: #3949c6 !important; }
.bg-secondary-fixed { background-color: #e9e5ff !important; }
.text-on-secondary-fixed { color: #35358b !important; }
.border-primary { border-color: #3949c6 !important; }
.bg-surface { background-color: #fbfaff !important; }
.text-on-surface { color: #20233b !important; }
.text-on-surface-variant { color: #5d6078 !important; }
.border-outline-variant { border-color: #d7d6e5 !important; }
[class~="bg-primary-container/10"] { background-color: rgb(57 73 198 / 10%) !important; }
.site-nav a { padding: 8px 10px; border-radius: 10px; }
.site-nav a:hover, .site-nav a.active { background: #f0efff; }
.site-menu-toggle { display: none; align-items: center; justify-content: center; border: 1px solid #e3e2ef; border-radius: 11px; background: #fff; color: #3949c6; padding: 8px; cursor: pointer; }
.site-menu-toggle .material-symbols-outlined { font-size: 22px; }
.site-mobile-nav[hidden] { display: none !important; }
.site-mobile-nav { display: none; }
.site-mobile-nav a { color: #444762; text-decoration: none; padding: 9px 12px; border-radius: 10px; }
.site-mobile-nav a:hover, .site-mobile-nav a.active { color: #3949c6; background: #f0efff; }
.site-mobile-nav .site-mobile-sub-link { padding-left: 28px; font-size: .94em; }
.site-mobile-nav form { padding: 4px 8px 12px; }
.site-mobile-nav input { width: 100%; border: 1px solid #d7d6e5; border-radius: 12px; padding: 10px 12px; }
#mobile-menu { max-height: min(65vh, 540px); overflow-y: auto; }
#mobile-menu-btn { border: 0; background: transparent; border-radius: 10px; padding: 6px; cursor: pointer; }

main { min-height: 68vh; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(400px, 1fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
  width: min(1240px, calc(100% - 64px));
  max-width: none;
  padding: clamp(4.5rem, 8vw, 7rem) 0 !important;
}
.home-hero-copy { min-width: 0; }
.home-hero-eyebrow {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  gap: 9px;
  margin-bottom: 1.2rem;
  color: #3949c6;
  font-size: clamp(.58rem, 1.3vw, .72rem);
  font-weight: 750;
  letter-spacing: clamp(.06em, .13vw, .16em);
}
.home-hero-eyebrow span { flex: 0 0 19px; width: 19px; height: 2px; background: #5365df; }
.home-hero h1 { margin: 0 0 1rem; font-size: clamp(3.25rem, 5.3vw, 4.65rem); line-height: 1.12; letter-spacing: -.055em; }
.home-hero-copy > p { max-width: 520px; margin: 0; font-size: 1rem; line-height: 1.9; }
.home-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.55rem; }
.home-hero-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 18px; border-radius: 11px; font-size: .9rem; font-weight: 700; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.home-hero-actions a:hover { transform: translateY(-2px); }
.home-hero-primary { color: #fff; background: #4055db; box-shadow: 0 8px 20px rgb(57 73 198 / 20%); }
.home-hero-primary:hover { background: #3246c9; box-shadow: 0 10px 24px rgb(57 73 198 / 26%); }
.home-hero-secondary { color: #252947; background: #fff; border: 1px solid #dedff0; }
.home-hero-secondary:hover { background: #f5f5ff; }
.home-hero-carousel {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.72;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 28px;
  background: #e8eaff;
  box-shadow: 0 24px 48px rgb(54 69 168 / 19%);
}
.home-hero-carousel-slides, .home-hero-slide { position: absolute; inset: 0; }
.home-hero-slide[hidden] { display: none !important; }
.home-hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-hero-slide::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(180deg, transparent 0%, rgb(18 25 66 / 12%) 32%, rgb(18 25 66 / 78%) 100%); pointer-events: none; }
.home-hero-slide-caption { position: absolute; z-index: 1; right: 72px; bottom: 26px; left: 30px; color: #fff; text-shadow: 0 1px 8px rgb(10 16 46 / 28%); }
.home-hero-slide-category { display: inline-flex; margin-bottom: 7px; font-size: .63rem; font-weight: 750; letter-spacing: .16em; opacity: .86; }
.home-hero-slide-caption h2 { margin: 0; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.25; font-weight: 750; letter-spacing: -.03em; }
.home-hero-slide-caption p { margin: 5px 0 0; font-size: .86rem; line-height: 1.5; opacity: .9; }
.home-hero-carousel-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  transform: translateY(-50%);
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  color: #fff;
  background: rgb(29 38 97 / 35%);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.home-hero-carousel-arrow:hover { transform: translateY(-50%) scale(1.06); background: rgb(29 38 97 / 62%); }
.home-hero-carousel-prev { left: 16px; }
.home-hero-carousel-next { right: 16px; }
.home-hero-carousel-toggle { position: absolute; z-index: 2; bottom: 14px; left: 20px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgb(255 255 255 / 48%); border-radius: 50%; color: #fff; background: rgb(29 38 97 / 35%); font-size: .7rem; cursor: pointer; backdrop-filter: blur(8px); }
.home-hero-carousel-dots { position: absolute; z-index: 2; right: 20px; bottom: 17px; display: flex; gap: 7px; align-items: center; }
.home-hero-carousel-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgb(255 255 255 / 58%); cursor: pointer; transition: width .2s ease, background .2s ease; }
.home-hero-carousel-dots button.active { width: 20px; background: #fff; }
.home-hero-carousel-arrow:focus-visible, .home-hero-carousel-toggle:focus-visible, .home-hero-carousel-dots button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .home-hero-carousel-arrow, .home-hero-carousel-dots button { transition: none; }
}
.project-filters { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.project-list-section { width: min(1240px, calc(100% - 32px)); max-width: none; padding-inline: 0 !important; }
#project-grid { align-items: stretch; }
.nav-item-trigger::after, .nav-top-link::after, .nav-dropdown-label::after {
  background: #8b86de !important;
  box-shadow: none !important;
}
.project-item .glass-card { height: 100%; }
.project-item .glass-card > .aspect-video { background-color: #efeffa; }
.project-item .glass-card img { object-fit: cover; }
.project-item h3 { letter-spacing: -.02em; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.glass, body .glass-card {
  background: #fff !important;
  border: 1px solid #e5e3f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 24px rgb(38 39 78 / 5%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body .glass-card:hover { border-color: #c9c6ed !important; box-shadow: 0 14px 30px rgb(38 39 78 / 9%) !important; }
.cyber-glow-btn:hover { box-shadow: 0 8px 22px rgb(57 73 198 / 22%) !important; }
.filter-chip { background: #fff; color: #555973; }
.filter-chip.active { background: #3949c6 !important; color: #fff !important; border-color: #3949c6 !important; }
input[type="search"] { background: #fff !important; border-color: #d7d6e5 !important; color: #20233b; }
input[type="search"]:focus { border-color: #727de0 !important; box-shadow: 0 0 0 3px rgb(86 104 223 / 12%); }
.site-footer { margin-top: 0; border-top: 1px solid #e5e3f0; background: #f5f4fc; }
.site-footer, .site-footer p { color: #5d6078; }
.site-footer { padding-block: 2rem; }
.public-page-content { max-width: 900px; margin: 0 auto; }
.manual-content, .privacy-content { max-width: 780px; margin-inline: auto; font-size: 1rem; line-height: 1.85; }
.manual-content h1, .manual-content h2, .manual-content h3,
.privacy-content h1, .privacy-content h2, .privacy-content h3,
.guide-section h3 { border-color: #7882df !important; }
.manual-content a, .privacy-content a, .guide-section a { color: #3949c6 !important; }
.manual-content img, .privacy-content img { border-radius: 14px; }
.result-snippet mark { background: #ece9ff !important; color: #34358e; }

@media (max-width: 768px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; width: calc(100% - 20px); padding-block: 3rem 2.5rem !important; }
  .home-hero h1 { font-size: clamp(2.5rem, 11vw, 3.8rem); }
  .home-hero-carousel { width: 100%; aspect-ratio: 1.35; border-radius: 22px; }
  .home-hero-slide-caption { right: 62px; bottom: 22px; left: 20px; }
  .home-hero-slide-caption h2 { font-size: 1.35rem; }
  .home-hero-slide-caption p { font-size: .76rem; }
  .home-hero-carousel-arrow { width: 34px; height: 34px; }
  .home-hero-carousel-prev { left: 10px; }
  .home-hero-carousel-next { right: 10px; }
  .home-hero-carousel-toggle { bottom: 10px; left: 14px; }
  .home-hero-carousel-dots { right: 16px; bottom: 13px; }
  .project-list-section { width: calc(100% - 20px); }
  .project-filters { padding-bottom: 2.5rem !important; }
  .site-header, body > nav.public-floating-nav {
    top: 8px !important;
    width: calc(100% - 20px) !important;
    margin-bottom: 16px !important;
    border-radius: 15px !important;
  }
  body.admin-online-present .site-header,
  body.admin-online-present > nav.public-floating-nav { top: 40px !important; }
  .site-header .container { height: 60px; }
  .site-menu-toggle { display: inline-flex; }
  .site-mobile-nav:not([hidden]) { display: flex; flex-direction: column; gap: 3px; padding: 4px 12px 12px; }
  body > nav.public-floating-nav > div:first-child { padding-block: 10px !important; }
  .hero { min-height: 62vh; }
  .privacy-section, .manual-section { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 首頁最新動態 */
.latest-updates { width: min(1240px, calc(100% - 32px)); max-width: none; padding-inline: 0 !important; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.latest-list { list-style: none; margin: 0; padding: 0.25rem 1.5rem; border-radius: 0.75rem; overflow-wrap: anywhere; }
.latest-row { display: grid; grid-template-columns: 6.5rem 13rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.8rem 0; line-height: 1.6; }
.latest-row + .latest-row { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.latest-date { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #003ec7; white-space: nowrap; }
.latest-project { font-weight: 600; color: inherit; }
.latest-project:hover { color: #003ec7; }
.latest-version { font-weight: 500; opacity: 0.6; font-size: 0.9em; }
.latest-more { margin-left: 0.4em; opacity: 0.55; font-size: 0.9em; white-space: nowrap; }
@media (max-width: 860px) {
  .latest-updates { width: calc(100% - 20px); }
  .latest-list { padding: 0.25rem 1rem; }
  .latest-row { grid-template-columns: 1fr; gap: 0.1rem; padding: 0.7rem 0; }
  .latest-date:empty { display: none; }
}
