/* ==========================================================================
   Axourdia 登記簿（Register）視覺系統：淺色紙面、欄線、紅色（AGA／公司）與青色（DMA）兩種墨色
   ========================================================================== */

:root {
    --paper: #F6F7F5;
    --sheet: #FFFFFF;
    --rule: #D6DDD9;
    --rule-strong: #A9B6B1;
    --ink: #141918;
    --ink-2: #3F4846;
    --ink-3: #5B6563;
    --red: #C8281F;
    --red-deep: #A51F18;
    --red-wash: #FBEDEC;
    --teal: #0E6B66;
    --teal-wash: #E7F2F1;
    --board: #111514;
    --board-ink: #E7ECEA;
    --board-muted: #9AA6A2;
    --board-rule: #2A3230;

    --font: 'Public Sans', 'Noto Sans TC', system-ui, sans-serif;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 72px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* 從其他頁面連到錨點（例如 /#solutions）時，區塊標題不被固定頁首擋住 */
section[id] { scroll-margin-top: var(--header-h); }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    font-feature-settings: "tnum" 1;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, blockquote { margin: 0; }
button { font: inherit; }

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 2px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -60px;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 8px 14px;
    text-decoration: none;
    font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* --- 欄線：貫穿整頁的登記簿直欄，對齊四欄版面 --- */

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* --- 頁首：登記簿的表頭列 --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 247, 245, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--rule);
}
.site-header .bar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}
.brand img { width: 40px; height: 40px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.brand-tag { display: block; font-size: 11.5px; font-weight: 500; color: var(--red); letter-spacing: 0.01em; }

.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main > a,
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    background: none;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border-radius: 2px;
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-main > a:hover,
.nav-trigger:hover,
.group.is-open .nav-trigger { color: var(--ink); background: var(--sheet); }
.nav-trigger svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.group.is-open .nav-trigger svg { transform: rotate(180deg); }

.group { position: relative; }
.solutions-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 340px;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    box-shadow: 0 6px 14px -8px rgba(20, 25, 24, 0.25);
    padding: 8px 0;
}
.group:hover .solutions-menu,
.group.is-open .solutions-menu { display: block; }
/* 讓滑鼠從按鈕移到選單時不會斷開 */
.group:hover::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
/* 選單項目變多後，矮螢幕上可在選單內捲動，不會超出視窗 */
.solutions-menu { max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain; }
.menu-group + .menu-group { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 6px; }
.menu-head {
    padding: 8px 18px 4px;
    font-size: 15px;
    font-weight: 700;
}
.menu-head.aga { color: var(--red); }
.menu-head.dma { color: var(--teal); }
.solutions-menu a {
    display: block;
    padding: 8px 18px;
    font-size: 14.5px;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
}
.solutions-menu a:hover,
.solutions-menu a:focus-visible { background: var(--paper); color: var(--ink); outline-offset: -2px; }
/* AGA 領域：點擊展開該領域已有的 AGA */
.menu-domain > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    font-size: 14.5px;
    color: var(--ink-2);
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
}
.menu-domain > summary::-webkit-details-marker { display: none; }
.menu-domain > summary:hover,
.menu-domain > summary:focus-visible { background: var(--paper); color: var(--ink); outline-offset: -2px; }
.menu-domain[open] > summary { color: var(--ink); font-weight: 600; }
.menu-domain > summary svg { width: 14px; height: 14px; flex: none; margin-left: auto; transition: transform .2s var(--ease); }
.menu-domain[open] > summary svg { transform: rotate(180deg); }
.menu-subs { margin: 2px 18px 6px 26px; border-left: 2px solid var(--red); }
.solutions-menu .menu-subs a { padding: 6px 14px; font-size: 14px; }
/* 第一層：AGA / DMA 兩個架構，點開後才列出各領域與面向 */
.menu-arch > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; list-style: none; cursor: pointer; }
.menu-arch > summary::-webkit-details-marker { display: none; }
.menu-arch > summary:hover, .menu-arch > summary:focus-visible { background: var(--paper); outline-offset: -2px; }
.menu-arch > summary svg { width: 14px; height: 14px; flex: none; transition: transform .2s var(--ease); }
.menu-arch[open] > summary svg { transform: rotate(180deg); }
.menu-arch[open] { padding-bottom: 6px; }
.menu-arch > .menu-domain > summary, .solutions-menu .menu-arch > a { padding-left: 30px; }
.menu-arch .menu-subs { margin-left: 38px; }
/* 各領域的總覽頁：清單第一行，字色淡一階，與產品區分 */
.solutions-menu .menu-subs a.menu-overview, .mobile-submenu-panel .menu-subs a.menu-overview { color: var(--ink-3); }
.solutions-menu .menu-subs a.menu-overview[aria-current="page"], .mobile-submenu-panel .menu-subs a.menu-overview[aria-current="page"] { color: var(--ink); }
.menu-dma .menu-subs { border-left-color: var(--teal); }

.lang-switch { display: flex; gap: 2px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--rule); }
.lang-switch button {
    height: 32px;
    min-width: 40px;
    border: 1px solid transparent;
    background: none;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
}
.lang-switch button[aria-pressed="true"] { color: var(--red); border-color: var(--red); }

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--rule-strong);
    background: var(--sheet);
    color: var(--ink);
    cursor: pointer;
    border-radius: 2px;
    align-items: center;
    justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }

#mobile-menu { display: none; }

/* --- 共用元素 --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.section { padding: clamp(80px, 11vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.h2 {
    font-size: clamp(30px, 3.6vw, 44px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.lang-en .h2 { letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); line-height: 1.75; }

.code { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; font-weight: 600; }

/* --- Hero：正在登記的登記簿 --- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.hero .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
}
.hero-copy { grid-column: 1 / span 2; padding-right: clamp(24px, 4vw, 56px); }
.hero h1 {
    font-size: clamp(40px, 5vw, 66px);
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -0.005em;
    text-wrap: balance;
}
body.lang-en .hero h1 { font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -0.03em; line-height: 1.08; }
.hero .lead { margin-top: 28px; max-width: 34em; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }

/* --- 解決方案：兩本分冊 --- */
.sol-head { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.sol-head .h2 { grid-column: 1 / span 2; }
.sol-head p { grid-column: 3 / span 2; padding-left: 0; }
.ledgers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.ledger { padding-top: 26px; }
.ledger + .ledger { border-left: 1px solid var(--rule-strong); padding-left: clamp(20px, 3vw, 40px); }
.ledger:first-child { padding-right: clamp(20px, 3vw, 40px); }
.ledger-title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.ledger-title.aga { color: var(--red); }
.ledger-title.dma { color: var(--teal); }
.ledger-sub { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.ledger-rule { height: 0; border-top: 3px double; margin: 18px 0 0; }
.ledger-rule.aga { border-color: var(--red); }
.ledger-rule.dma { border-color: var(--teal); }

.product {
    display: grid;
    grid-template-columns: 96px 1fr 28px;
    gap: 20px;
    align-items: start;
    padding: 26px 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
    transition: background-color .2s var(--ease);
}
.product:hover { background: var(--sheet); }
.product-code { font-size: 15px; font-weight: 700; line-height: 1.5; }
.product-code small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); border-top: 1px solid var(--rule-strong); margin-top: 6px; padding-top: 4px; width: fit-content; }
.product-name { font-size: 18px; font-weight: 700; line-height: 1.45; }
.product-desc { margin-top: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.7; }
.product-go { width: 22px; height: 22px; margin-top: 4px; transition: transform .25s var(--ease); }
.product:hover .product-go { transform: translate(3px, -3px); }
.ledger .aga-c { color: var(--red); }
.ledger .dma-c { color: var(--teal); }

/* AGA 領域：點擊展開該領域已有的 AGA，每項各自連到產品頁 */
.domain { border-bottom: 1px solid var(--rule); }
.product-code.with-icon { display: flex; align-items: center; gap: 8px; }
.domain-icon { width: 20px; height: 20px; flex: none; }
.domain > summary {
    display: grid;
    grid-template-columns: 96px 1fr 28px;
    gap: 20px;
    align-items: start;
    padding: 26px 0;
    list-style: none;
    cursor: pointer;
    transition: background-color .2s var(--ease);
}
.domain > summary::-webkit-details-marker { display: none; }
.domain > summary:hover { background: var(--sheet); }
.domain > summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.domain-toggle { width: 22px; height: 22px; margin-top: 4px; transition: transform .25s var(--ease); }
.domain[open] .domain-toggle { transform: rotate(180deg); }
.domain-subs { list-style: none; margin: -6px 0 24px 116px; padding: 0; border-left: 3px double var(--red); }
.domain-subs li + li { border-top: 1px solid var(--rule); }
.domain-sub {
    display: grid;
    grid-template-columns: 64px 1fr 18px;
    gap: 14px;
    align-items: center;
    padding: 12px 14px 12px 18px;
    color: inherit;
    text-decoration: none;
    transition: background-color .2s var(--ease);
}
.domain-sub:hover { background: var(--sheet); }
.domain-sub-code { font-size: 14px; font-weight: 700; color: var(--red); }
.domain-sub-name { font-size: 15.5px; font-weight: 700; }
.domain-dma > summary:focus-visible { outline-color: var(--teal); }
.domain-dma .domain-subs { border-left-color: var(--teal); }
.domain-dma .domain-sub-code { color: var(--teal); }
/* 尚無產品、可客製化開發的服務類別：與既有產品區分 */
.domain-sub.is-custom { align-items: start; }
.domain-sub-tag { width: fit-content; margin-top: 2px; padding: 1px 6px; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--ink-3); border: 1px dashed var(--rule-strong); white-space: nowrap; }
.domain-sub.is-custom .domain-sub-name { display: block; font-weight: 600; color: var(--ink-2); }
.domain-sub-desc { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }
.domain-sub.is-custom svg { margin-top: 4px; }
/* 領域總覽：清單第一行，實線框標籤（已有內容），與「可客製」的虛線框區分 */
.domain-sub.is-overview .domain-sub-tag { border-style: solid; border-color: var(--red); color: var(--red); }
.domain-dma .domain-sub.is-overview .domain-sub-tag { border-color: var(--teal); color: var(--teal); }
.domain-subs li.domain-overview-item + li { border-top-color: var(--rule-strong); }
.domain-sub.is-custom .domain-sub-code { margin-top: 1px; }
.domain-sub svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform .25s var(--ease); }
.domain-sub:hover svg { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: no-preference) {
    .domain[open] .domain-subs { animation: arch-in .35s var(--ease) both; }
}
@media (max-width: 767.98px) {
    .domain > summary { grid-template-columns: 1fr 24px; gap: 8px 12px; }
    .domain > summary .product-code { grid-column: 1 / -1; }
    .domain-toggle { grid-row: 2; grid-column: 2; }
    .domain-subs { margin-left: 0; }
}

/* --- 理念 --- */
.about .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.about .h2 { grid-column: 1 / span 2; padding-right: 32px; }
.about-body { grid-column: 3 / span 2; }
.steps { margin-top: 48px; border-top: 2px solid var(--ink); }
.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}
.step-no { font-weight: 700; color: var(--accent); }
.step h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.step p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* --- AGA 流程 --- */

/* --- 立場（紅墨批註） --- */
.stance-box { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sheet); border: 1px solid var(--rule-strong); }
.stance-main { grid-column: 1 / span 2; padding: clamp(32px, 5vw, 56px); border-right: 1px solid var(--rule); }
.stance-main p { margin-top: 20px; color: var(--ink-2); }
.stance-note { grid-column: 3 / span 2; padding: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: var(--red); color: #fff; }
.stance-note blockquote { font-size: clamp(19px, 1.8vw, 23px); font-weight: 600; line-height: 1.6; }
.stance-note .btn { border-color: #fff; color: #fff; background: transparent; width: fit-content; }
.stance-note .btn:hover { background: #fff; color: var(--red); }

/* --- 聯絡 --- */
.contact-head { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 48px; }
.contact-head .h2 { grid-column: 1 / span 2; }
.contact-head p { grid-column: 3 / span 2; align-self: end; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.contact-info { grid-column: 1 / span 2; padding: 8px clamp(20px, 3vw, 40px) 0 0; }
.info-row { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; }
.info-row dt { color: var(--ink-3); font-size: 14px; }
.info-row dd { margin: 0; color: var(--ink); }
.info-row a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.info-row a:hover { border-color: var(--red); color: var(--red); }
.map { margin-top: 24px; border: 1px solid var(--rule-strong); }
.map iframe { display: block; width: 100%; height: 240px; border: 0; }
.social { display: flex; gap: 8px; margin-top: 20px; }
.social a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule-strong); color: var(--ink-2); background: var(--sheet); border-radius: 2px; }
.social a:hover { color: var(--red); border-color: var(--red); }
.social svg { width: 22px; height: 22px; }

.contact-form { grid-column: 3 / span 2; padding: 8px 0 0 clamp(20px, 3vw, 40px); border-left: 1px solid var(--rule-strong); }
.field { padding: 16px 0 6px; border-bottom: 1px solid var(--rule-strong); transition: border-color .2s var(--ease); }
.field:focus-within { border-bottom-color: var(--red); }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.field input, .field textarea {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 17px;
    padding: 6px 0 8px;
    outline: none;
    resize: vertical;
}
.field textarea { min-height: 110px; }
.form-foot { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.form-foot .btn { width: 100%; justify-content: center; }

/* --- 頁尾：登記簿的封底 --- */
.site-footer { background: var(--board); color: var(--board-ink); padding: 72px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.foot-brand { grid-column: 1 / span 2; display: flex; gap: 16px; align-items: flex-start; }
.foot-brand img { width: 56px; height: 56px; }
.foot-brand .brand-name { font-size: 22px; }
.foot-brand p { margin-top: 10px; color: var(--board-muted); font-size: 15px; max-width: 26em; }
.foot-brand .brand-tag { color: #F0645B; }
.foot-links { grid-column: 3 / span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; align-content: start; }
.foot-links h3 { font-size: 16px; font-weight: 600; color: var(--board-muted); margin-bottom: 6px; }
.foot-links a { display: block; padding: 4px 0; color: var(--board-ink); text-decoration: none; font-size: 15px; }
.foot-links a:hover { color: #F0645B; }
.foot-base { grid-column: 1 / -1; margin-top: 56px; padding-top: 20px; border-top: 3px double var(--board-rule); color: var(--board-muted); font-size: 13.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --- 平板 --- */
@media (max-width: 1023.98px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-copy, .register { grid-column: 1 / -1; padding-right: 0; }

    .sol-head, .about .wrap, .framework-head, .contact-head { grid-template-columns: 1fr; gap: 20px; }
    .sol-head > *, .about .h2, .about-body, .framework-head > *, .contact-head > * { grid-column: 1 / -1 !important; padding-right: 0; }

    .stance-box { grid-template-columns: 1fr; }
    .stance-main, .stance-note { grid-column: 1 / -1; border-right: 0; }
}

/* --- 手機 --- */
@media (max-width: 767.98px) {
    :root { --header-h: 64px; }

    .nav-main, .lang-switch { display: none; }
    .menu-btn { display: inline-flex; }
    .brand img { width: 34px; height: 34px; }
    .brand-name { font-size: 18px; }

    #mobile-menu {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows .3s var(--ease);
        border-top: 1px solid transparent;
        background: var(--paper);
    }
    #mobile-menu > div { overflow: hidden; }
    #mobile-menu.open { grid-template-rows: 1fr; border-top-color: var(--rule); }
    .m-nav { padding: 8px var(--gutter) 20px; }
    .m-nav > a, .mobile-submenu-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        min-height: 52px;
        padding: 0;
        border: 0;
        border-bottom: 1px solid var(--rule);
        background: none;
        color: var(--ink);
        font-size: 17px;
        font-weight: 600;
        text-decoration: none;
        text-align: left;
        cursor: pointer;
    }
    .mobile-submenu-arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
    .mobile-submenu.open .mobile-submenu-arrow { transform: rotate(90deg); }
    .mobile-submenu-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
    .mobile-submenu-panel > div { overflow: hidden; }
    .mobile-submenu.open .mobile-submenu-panel { grid-template-rows: 1fr; }
    .m-group-head { padding: 14px 0 4px; font-size: 14px; font-weight: 700; }
    .m-arch > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 6px 0; list-style: none; cursor: pointer; font-size: 15px; }
    .m-arch > summary::-webkit-details-marker { display: none; }
    .m-arch > summary svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
    .m-arch[open] > summary svg { transform: rotate(180deg); }
    .m-arch[open] { padding-bottom: 8px; }
    .m-group-head.aga { color: var(--red); }
    .m-group-head.dma { color: var(--teal); }
    .mobile-submenu-panel a { display: block; padding: 10px 0 10px 14px; color: var(--ink-2); text-decoration: none; font-size: 15.5px; border-left: 1px solid var(--rule-strong); }
    .menu-domain > summary { padding: 10px 0 10px 14px; font-size: 15.5px; border-left: 1px solid var(--rule-strong); }
    .menu-domain > summary:hover { background: none; }
    .menu-domain > summary svg { width: 16px; height: 16px; }
    .menu-subs { margin: 0; padding-bottom: 4px; border-left: 1px solid var(--rule-strong); }
    .mobile-submenu-panel .menu-subs a { padding: 8px 0 8px 30px; font-size: 15px; border-left: 0; }
    .menu-dma .menu-subs { border-left-color: var(--rule-strong); }
    .m-lang { display: flex; gap: 8px; padding-top: 16px; }
    .m-lang button { height: 40px; min-width: 52px; border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink-3); font-weight: 600; border-radius: 2px; }
    .m-lang button[aria-pressed="true"] { color: var(--red); border-color: var(--red); }

    .hero { padding-top: 40px; }
    .hero h1 { font-size: clamp(34px, 9.4vw, 44px); }
    body.lang-en .hero h1 { font-size: clamp(32px, 8.6vw, 40px); }
    .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

    .ledgers { grid-template-columns: 1fr; }
    .ledger + .ledger { border-left: 0; padding-left: 0; margin-top: 48px; border-top: 2px solid var(--ink); }
    .ledger:first-child { padding-right: 0; }
    .product { grid-template-columns: 1fr 24px; gap: 8px 12px; }
    .product-code { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
    .product-code small { display: inline; border: 0; margin: 0; padding: 0; }
    .product-go { grid-row: 2; grid-column: 2; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-info, .contact-form { grid-column: 1 / -1; padding: 8px 0 0; border-left: 0; }
    .contact-form { margin-top: 40px; border-top: 2px solid var(--ink); }
    .info-row { grid-template-columns: 76px 1fr; }

    .site-footer .wrap { grid-template-columns: 1fr; }
    .foot-brand, .foot-links { grid-column: 1 / -1; }
    .foot-links { margin-top: 40px; }
}

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

.product-name, .product-desc, .flow-name { display: block; }
.foot-brand .brand-name { color: var(--board-ink); }

/* 第一輪檢視修正 */

.h2, .stance-main .h2 { text-wrap: balance; }
body.lang-zh .h1-line { display: block; }

.foot-links { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767.98px) {
    .foot-links { grid-template-columns: 1fr 1fr; row-gap: 28px; }
}

/* --- 導覽列捲動後切換為黑底樣式 --- */
.site-header {
    transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header .brand-name,
.site-header .nav-main > a,
.site-header .nav-trigger,
.site-header .lang-switch button,
.site-header .menu-btn { transition: color .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease); }
.site-header .brand img { transition: filter .35s var(--ease); }

.site-header.is-scrolled {
    background: rgba(0, 0, 0, 0.94);
    border-bottom-color: #2A2F2E;
}
.site-header.is-scrolled .brand { color: #fff; }
.site-header.is-scrolled .brand img { filter: invert(1); }
.site-header.is-scrolled .brand-tag { color: #F0645B; }
.site-header.is-scrolled .nav-main > a,
.site-header.is-scrolled .nav-trigger { color: #fff; }
.site-header.is-scrolled .nav-main > a:hover,
.site-header.is-scrolled .nav-trigger:hover,
.site-header.is-scrolled .group.is-open .nav-trigger { color: #F0645B; background: transparent; }
.site-header.is-scrolled .lang-switch { border-left-color: #2A2F2E; }
.site-header.is-scrolled .lang-switch button { color: #fff; }
.site-header.is-scrolled .lang-switch button[aria-pressed="true"] { color: #F0645B; border-color: #F0645B; }
.site-header.is-scrolled .solutions-menu { background: #0B0D0D; border-color: #2A2F2E; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.6); }
.site-header.is-scrolled .menu-group + .menu-group { border-top-color: #2A2F2E; }
.site-header.is-scrolled .menu-head.aga { color: #F0645B; }
.site-header.is-scrolled .menu-head.dma { color: #4FB3AC; }
.site-header.is-scrolled .solutions-menu a { color: #E7ECEA; }
.site-header.is-scrolled .solutions-menu a:hover,
.site-header.is-scrolled .solutions-menu a:focus-visible { background: #1A1F1E; color: #fff; }
.site-header.is-scrolled .menu-domain > summary { color: #E7ECEA; }
.site-header.is-scrolled .menu-domain > summary:hover,
.site-header.is-scrolled .menu-domain > summary:focus-visible { background: #1A1F1E; color: #fff; }
.site-header.is-scrolled .menu-arch > summary:hover,
.site-header.is-scrolled .menu-arch > summary:focus-visible { background: #1A1F1E; }
.site-header.is-scrolled .menu-subs { border-left-color: #F0645B; }
.site-header.is-scrolled .menu-dma .menu-subs { border-left-color: #4FB3AC; }
.site-header.is-scrolled .solutions-menu .menu-subs a.menu-overview, .site-header.is-scrolled .mobile-submenu-panel .menu-subs a.menu-overview { color: #9AA6A2; }
.site-header.is-scrolled .solutions-menu .menu-subs a.menu-overview[aria-current="page"] { color: #fff; }
.site-header.is-scrolled .menu-btn { background: transparent; border-color: #3A4241; color: #fff; }

@media (max-width: 767.98px) {
    .site-header.is-scrolled #mobile-menu { background: #000; }
    .site-header.is-scrolled #mobile-menu.open { border-top-color: #2A2F2E; }
    .site-header.is-scrolled .m-nav > a,
    .site-header.is-scrolled .mobile-submenu-toggle { color: #fff; border-bottom-color: #2A2F2E; }
    .site-header.is-scrolled .m-group-head.aga { color: #F0645B; }
    .site-header.is-scrolled .m-group-head.dma { color: #4FB3AC; }
    .site-header.is-scrolled .mobile-submenu-panel a { color: #E7ECEA; border-left-color: #3A4241; }
    .site-header.is-scrolled .menu-domain > summary { border-left-color: #3A4241; }
    .site-header.is-scrolled .menu-domain > summary:hover { background: none; }
    .site-header.is-scrolled .menu-subs { border-left-color: #3A4241; }
    .site-header.is-scrolled .menu-dma .menu-subs { border-left-color: #3A4241; }
    .site-header.is-scrolled .m-lang button { background: transparent; border-color: #3A4241; color: #fff; }
    .site-header.is-scrolled .m-lang button[aria-pressed="true"] { color: #F0645B; border-color: #F0645B; }
}

/* --- 理念區：工作拆解表 --- */
.about .wrap { grid-template-rows: auto 1fr; }
.about .h2 { grid-row: 1; }
.about-body { grid-row: 1 / span 2; }

@media (max-width: 1023.98px) {
    .about .wrap { grid-template-rows: none; }
    .about .h2, .about-body { grid-row: auto; }

}

@media (max-width: 1023.98px) {
    .about .h2 { order: 0; }
    .about-body { order: 1; }

}

/* 中文標題手動斷行：每個 .h-line 為一個詞組，只在中文模式下換行 */
body.lang-zh .h-line { display: block; }

/* --- 向量 logo：顏色跟著文字色（currentColor），淺色／黑底導覽列自動切換 --- */
.brand-mark { height: 50px; width: auto; flex: none; color: var(--ink); transition: color .35s var(--ease); }
.site-header.is-scrolled .brand-mark { color: #fff; }
.foot-mark { height: 60px; width: auto; flex: none; color: var(--board-ink); }
@media (max-width: 767.98px) { .brand-mark { height: 42px; } }

/* --- 首頁大標題打字動畫 --- */
.h1-line.is-typing { position: relative; }
.type-ghost { visibility: hidden; }
.type-live { position: absolute; left: 0; top: 0; right: 0; }
.type-caret {
    display: inline-block;
    width: 0.09em;
    height: 0.95em;
    margin-left: 0.06em;
    vertical-align: -0.08em;
    background: var(--red);
    animation: caret-blink 1s steps(1) infinite;
    transition: opacity .4s var(--ease);
}
.type-caret.is-done { opacity: 0; }
@keyframes caret-blink { 50% { background: transparent; } }

/* 登記簿等標題快打完才開始寫入，首屏只有一個連續的動態 */

/* 游標淡出後暫停閃爍動畫 */
.type-caret.is-done { animation-play-state: paused; }

/* ==========================================================================
   首屏：Axourdia 架構圖（取代示意登記簿）
   ========================================================================== */
.arch-map {
    grid-column: 3 / span 2;
    margin: 0;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    box-shadow: 0 1px 0 var(--rule), 0 8px 16px -10px rgba(20, 25, 24, 0.22);
}
.arch-head { padding: 18px 24px 14px; border-bottom: 2px solid var(--ink); }
.arch-title { font-size: 18px; font-weight: 700; }

.arch-row {
    --c: var(--red);
    --wash: var(--red-wash);
    display: grid;
    grid-template-columns: 1fr minmax(28px, 0.55fr) 1.25fr minmax(28px, 0.55fr) 1fr;
    align-items: center;
    padding: 34px 24px;
}
.arch-row.dma { --c: var(--teal); --wash: var(--teal-wash); border-top: 1px solid var(--rule); }

.arch-node { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.arch-icon { width: 52px; height: 52px; color: var(--ink); }
.arch-icon .accent { stroke: var(--c); }
.arch-icon .accent-stroke { stroke: var(--c); }

.arch-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 10px;
    border: 1.5px solid var(--c);
    background-color: var(--wash);
    background-image: linear-gradient(var(--sheet) 1px, transparent 1px), linear-gradient(90deg, var(--sheet) 1px, transparent 1px);
    background-size: 12px 12px;
    text-align: center;
}
.arch-core b { font-size: clamp(26px, 2.4vw, 34px); line-height: 1; letter-spacing: 0.02em; color: var(--c); }
.arch-core span { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.arch-flow { position: relative; height: 2px; margin: 0 6px; background: var(--rule-strong); }
.arch-flow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--c);
    border-right: 2px solid var(--c);
    transform: translateY(-50%) rotate(45deg);
}
.arch-flow i {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, var(--c) 0 8px, transparent 8px 14px);
}

@media (prefers-reduced-motion: no-preference) {
    .arch-row { animation: arch-in .8s var(--ease) both; animation-delay: calc(var(--r) * 0.45s + 2.4s); }
    .arch-flow i { animation: flow 1.1s linear 4; animation-delay: calc(var(--r) * 0.45s + 2.9s); }
}
@keyframes arch-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes flow {
    from { background-position: 0 0; }
    to { background-position: 14px 0; }
}

/* ==========================================================================
   理念區：工作拆解（取代示意表格）
   ========================================================================== */
.decompose {
    grid-column: 1 / span 2;
    grid-row: 2;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin: 48px clamp(24px, 4vw, 56px) 0 0;
    padding: 24px;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    box-shadow: 0 1px 0 var(--rule), 0 8px 16px -10px rgba(20, 25, 24, 0.22);
}
.dc-head { font-size: 16px; font-weight: 700; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }

@media (max-width: 1023.98px) {
    .arch-map { grid-column: 1 / -1; margin-top: 48px; }
    .decompose { grid-column: 1 / -1; grid-row: auto; order: 2; position: static; margin: 40px 0 0; }
}
@media (max-width: 767.98px) {
    .arch-row { padding: 26px 14px; grid-template-columns: 1fr 22px 1.2fr 22px 1fr; }
    .arch-head { padding: 14px 16px 12px; }
    .arch-icon { width: 40px; height: 40px; }
    .arch-node { font-size: 12.5px; gap: 8px; }
    .arch-core { padding: 12px 6px; }
    .arch-core span { font-size: 11.5px; }
    .arch-flow { margin: 0 3px; }
    .decompose { padding: 18px; }

}

/* 理念區：工作拆解改為工程圖形式（黑：架構判斷／紅：規則化的重複元件） */

/* 進入畫面時，紅色重複元件依序描繪出來，像系統自動補上細節 */

/* ==========================================================================
   理念區：工作拆解（簡化版）— 一個直條拆成兩段，高度與右側內容底部對齊
   ========================================================================== */
.decompose {
    position: static;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 360px;
}

@media (max-width: 1023.98px) {
    .decompose { min-height: 420px; }
}

/* 理念區排版：左「標題／工作拆解」對右「段落／三個步驟」，第二列兩側等高 */
.about .wrap { grid-template-rows: auto auto; row-gap: 48px; }
.about .h2 { grid-column: 1 / span 2; grid-row: 1; }
.about-body { grid-column: 3 / span 2; grid-row: 1; }
.about .steps { grid-column: 3 / span 2; grid-row: 2; margin-top: 0; }
.decompose { grid-column: 1 / span 2; grid-row: 2; margin: 0 clamp(24px, 4vw, 56px) 0 0; min-height: 0; }
@media (max-width: 1023.98px) {
    .about .wrap { row-gap: 0; }
    .about .h2, .about-body, .about .steps, .decompose { grid-column: 1 / -1; grid-row: auto; }
    .about .h2 { order: 0; }
    .about-body { order: 1; margin-top: 20px; }
    .about .steps { order: 2; margin-top: 40px; }
    .decompose { order: 3; margin: 40px 0 0; min-height: 420px; }
}
/* 工作拆解不撐高這一列：高度完全跟隨右側三個步驟 */
@media (min-width: 1024px) {
    .decompose { contain: size; padding: 20px; }

    .about .steps { align-self: start; }
}
/* 圖示放在文字左側，節省高度 */

/* ==========================================================================
   理念區：簡化流程圖（黑：少數關鍵判斷／紅：大量重複步驟）
   ========================================================================== */

@media (max-width: 1023.98px) {
    .decompose { min-height: 0; }

}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 流程圖放大：圖例改為精簡單行 */

/* 架構圖：AGA／DMA 方塊內加上英文全名 */
.arch-core .arch-full { display: block; max-width: 13em; font-size: 11.5px; font-weight: 500; line-height: 1.35; color: var(--ink-3); letter-spacing: 0.01em; }
.arch-core { gap: 6px; padding: 18px 12px; }
@media (max-width: 767.98px) {
    .arch-core .arch-full { font-size: 10px; }
}

/* ==========================================================================
   內頁共用：與首頁同一套登記簿視覺；DMA 產品頁以青色為強調色
   ========================================================================== */
:root { --accent: var(--red); --accent-deep: var(--red-deep); --accent-wash: var(--red-wash); }
body.theme-dma { --accent: var(--teal); --accent-deep: #0A524E; --accent-wash: var(--teal-wash); }

/* 目前所在頁面 */
.nav-main > a[aria-current="page"], .nav-trigger.is-current { color: var(--accent); }
.solutions-menu a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--paper); }
.site-header.is-scrolled .nav-main > a[aria-current="page"], .site-header.is-scrolled .nav-trigger.is-current { color: #F0645B; }
.site-header.is-scrolled .solutions-menu a[aria-current="page"] { background: #1A1F1E; color: #fff; }
.m-nav > a[aria-current="page"] { color: var(--accent); }
.mobile-submenu-panel a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 頁首區 */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 8vw, 104px); }
.page-hero .wrap { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.page-hero-copy { grid-column: 1 / span 2; padding-right: clamp(24px, 4vw, 56px); }
.page-hero-copy.wide { grid-column: 1 / span 3; padding-right: 0; }
.page-hero h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.15; font-weight: 700; letter-spacing: -0.005em; }
.page-hero h1.code { font-size: clamp(52px, 6.4vw, 88px); line-height: 1; letter-spacing: -0.02em; }
.prod-zh { margin-top: 18px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.35; }
.prod-full { margin-top: 4px; font-size: clamp(14px, 1.2vw, 16px); font-weight: 600; color: var(--accent); }
.page-hero .lead { margin-top: 26px; max-width: 34em; }
/* DMA 產品頁首屏已無右側卡片，說明文字放寬 */
body.theme-dma .page-hero-copy.wide .lead { max-width: 46em; }
.page-hero .hero-actions { margin-top: 36px; }
.page-hero .btn-red { background: var(--accent); border-color: var(--accent); }
.page-hero .btn-red:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
#co-develop .btn-red { background: var(--accent); border-color: var(--accent); }
#co-develop .btn-red:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* 產品流程卡（產品頁首屏右側） */
.proc {
    grid-column: 3 / span 2;
    margin: 0;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    box-shadow: 0 1px 0 var(--rule), 0 8px 16px -10px rgba(20, 25, 24, 0.22);
}
.proc-head { padding: 18px 24px 14px; border-bottom: 2px solid var(--ink); font-size: 18px; font-weight: 700; }
.proc-steps { list-style: none; margin: 0; padding: 4px 24px 8px; }
.proc-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center; padding: 16px 0; position: relative; }
/* 分隔線從文字欄開始，不穿過左側的編號連接線 */
.proc-steps li + li::after { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--rule); }
.proc-steps li + li::before { content: ""; position: absolute; left: 16px; top: -12px; width: 2px; height: 24px; background: var(--accent); opacity: .35; }
.proc-no { width: 34px; height: 34px; border: 1.5px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-wash); position: relative; z-index: 1; }
.proc-steps li.out .proc-no { background: var(--accent); color: #fff; }
.proc-steps b { display: block; font-size: 16px; line-height: 1.4; }
.proc-steps span.d { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.proc-loop { display: flex; align-items: center; gap: 10px; margin: 0 24px 22px; padding: 10px 14px; border: 1px dashed var(--accent); color: var(--accent); font-size: 13.5px; font-weight: 600; }
.proc-loop svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
    .proc-steps li, .chain { animation: arch-in .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.12s + 0.2s); }
}

/* 區塊標題 */
.sec-head { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head .h2 { grid-column: 1 / span 2; padding-right: 32px; }
.sec-head .lead { grid-column: 3 / span 2; }

/* 三欄問題列 */

.cell h3 { font-size: 19px; font-weight: 700; line-height: 1.45; }
.cell p { margin-top: 10px; font-size: 15.5px; color: var(--ink-2); line-height: 1.75; }

/* 四欄功能格 */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.grid4 .cell { padding: 24px 22px 26px; border-bottom: 1px solid var(--rule); }
.grid4 .cell:not(:nth-child(4n+1)) { border-left: 1px solid var(--rule); }
.grid4 .cell:nth-child(4n+1) { padding-left: 0; }
.grid4 .cell h3 { font-size: 17px; }
.grid4 .cell p { font-size: 14.5px; }

/* 左標題、右步驟 */
.split { display: grid; grid-template-columns: repeat(4, 1fr); }
.split > .split-left { grid-column: 1 / span 2; padding-right: clamp(24px, 4vw, 56px); }
.split > .split-right { grid-column: 3 / span 2; }
.split .lead { margin-top: 20px; }
.split .steps { margin-top: 0; }
.split .btn { margin-top: 32px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.grid2 .cell { padding: 22px 22px 24px; border-bottom: 1px solid var(--rule); }
.grid2 .cell:nth-child(odd) { padding-left: 0; }
.grid2 .cell:nth-child(even) { border-left: 1px solid var(--rule); }
.grid2 .cell h3 { font-size: 17px; }
.grid2 .cell p { font-size: 14.5px; }

/* Q&A：原生 details，鍵盤可操作 */
.qa { border-top: 2px solid var(--ink); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 22px 0; font-size: 18px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-top: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .25s var(--ease); }
.qa details[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.qa summary:hover { color: var(--accent); }
.qa .qa-a { padding: 0 48px 24px 0; max-width: 52em; color: var(--ink-2); font-size: 16px; line-height: 1.85; }

/* 職缺 */
.jobs { border-top: 2px solid var(--ink); }
.job { display: grid; grid-template-columns: repeat(4, 1fr); padding: 32px 0 34px; border-bottom: 1px solid var(--rule); }
.job-main { grid-column: 1 / span 2; padding-right: clamp(24px, 4vw, 56px); }
.job-main h3 { font-size: 22px; font-weight: 700; line-height: 1.4; }
.job-main p { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; line-height: 1.8; }
.job-meta { grid-column: 3; margin: 0; padding-right: 20px; }
.job-meta div { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.job-meta dt { font-size: 12.5px; color: var(--ink-3); }
.job-meta dd { margin: 2px 0 0; font-weight: 600; }
.job-go { grid-column: 4; align-self: start; justify-self: end; }
.job-go .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.jobs-cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 32px; background: var(--sheet); border: 1px solid var(--rule-strong); }
.jobs-cta p { font-size: 18px; font-weight: 700; }

/* 最新消息 */
.news-list { border-top: 2px solid var(--ink); }
.news-item { display: grid; grid-template-columns: repeat(4, 1fr); padding: 32px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; transition: background-color .2s var(--ease); }
.news-item:hover { background: var(--sheet); }
.news-date { grid-column: 1; font-size: 15px; font-weight: 700; color: var(--accent); padding-top: 4px; }
.news-body { grid-column: 2 / span 2; padding-right: 32px; }
.news-body h2 { font-size: 22px; font-weight: 700; line-height: 1.45; }
.news-body p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 700; color: var(--accent); font-size: 15px; }
.news-more svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.news-item:hover .news-more svg { transform: translate(3px, -3px); }
.news-thumb { grid-column: 4; border: 1px solid var(--rule-strong); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sheet); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 文章 */
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 20px; font-size: 14.5px; }
.article-meta .tag { padding: 3px 10px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 13px; }
.article-meta time { color: var(--ink-3); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--ink-2); font-weight: 600; text-decoration: none; font-size: 15px; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 16px; height: 16px; }
.article-cover { border: 1px solid var(--rule-strong); background: var(--sheet); }
.article-cover img { width: 100%; height: auto; }
.article { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(40px, 6vw, 72px); }
.article-body { grid-column: 1 / span 3; max-width: 46em; }
.article-body .lead-big { font-size: clamp(19px, 1.8vw, 23px); font-weight: 600; line-height: 1.7; color: var(--ink); }
.article-body p { margin-top: 22px; font-size: 17px; line-height: 1.9; color: var(--ink-2); }
.article-body h2 { margin-top: 48px; font-size: 26px; font-weight: 700; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.article-body ul { list-style: none; margin: 0; padding: 0; }
.article-body li { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.article-body li strong { display: block; color: var(--ink); font-size: 17px; }
.article-side { grid-column: 4; padding-left: 32px; }
.article-side .sticky { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 12px; }
.article-side .btn { width: 100%; justify-content: center; }

@media (max-width: 1023.98px) {
    .page-hero .wrap, .sec-head, .split, .job, .news-item, .article { grid-template-columns: 1fr; }
    .page-hero-copy, .page-hero-copy.wide, .proc, .sec-head > *, .split > *, .job > *, .news-item > *, .article > * { grid-column: 1 / -1 !important; padding-right: 0; padding-left: 0; }
    .proc { margin-top: 48px; }
    .sec-head { gap: 16px; }
    .split > .split-right { margin-top: 36px; }

    .grid4 { grid-template-columns: 1fr 1fr; }
    .grid4 .cell { padding: 20px 16px 22px; }
    .grid4 .cell:nth-child(4n+1) { padding-left: 16px; }
    .grid4 .cell:nth-child(odd) { padding-left: 0; border-left: 0; }
    .grid4 .cell:nth-child(even) { border-left: 1px solid var(--rule); }
    .job { gap: 18px; }
    .job-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
    .job-go { justify-self: start; }
    .news-item { gap: 14px; }
    .news-thumb { order: -1; max-width: 420px; }
    .article-side { margin-top: 40px; }
    .article-side .sticky { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
    .grid4, .grid2 { grid-template-columns: 1fr; }
    .grid4 .cell, .grid4 .cell:nth-child(odd), .grid4 .cell:nth-child(even), .grid2 .cell, .grid2 .cell:nth-child(odd), .grid2 .cell:nth-child(even) { padding: 20px 0 22px; border-left: 0; }
    .proc-head, .proc-steps { padding-left: 16px; padding-right: 16px; }
    .proc-loop { margin-left: 16px; margin-right: 16px; }

    .job-meta { grid-template-columns: 1fr; }
    .qa summary { font-size: 16.5px; }
    .qa .qa-a { padding-right: 0; font-size: 15.5px; }
    .jobs-cta { padding: 22px 20px; }
    .article-side .sticky { grid-template-columns: 1fr; }
}

/* 內容較少的頁面：主要內容撐滿剩餘高度，頁尾貼齊畫面底部 */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* 人才招募：「你會參與打造的系統」分層圖 */

/* 人才招募：「我們正在打造的產品」 */

/* 人才招募：「我們提供的服務」— 左深色品牌欄、右三項服務 */

/* 移除品牌欄後，服務卡改為單欄 */

/* 首頁架構圖：橫跨 AGA／DMA 的客製化底欄 */

/* 首屏：左側標題區與右側架構圖等高——標題貼齊卡片上緣、按鈕貼齊卡片下緣 */
@media (min-width: 1024px) {
    .hero .wrap { align-items: stretch; }
    .hero .hero-copy { display: flex; flex-direction: column; }
    .hero .hero-copy h1 { margin-top: -0.12em; margin-bottom: auto; }
    .hero .hero-copy .lead { margin-top: 32px; }
}

/* 首屏：說明文字置於右側架構圖的垂直中線；標題貼上緣、按鈕貼下緣 */
@media (min-width: 1024px) {
    .hero .hero-copy { display: grid; grid-template-rows: 1fr auto 1fr; }
    .hero .hero-copy h1 { align-self: start; margin-bottom: 0; }
    .hero .hero-copy .lead { margin-top: 0; align-self: center; }
    .hero .hero-copy .hero-actions { align-self: end; margin-top: 0; }
}
/* 按鈕緊接在說明文字下方（說明文字仍對齊架構圖中線） */
@media (min-width: 1024px) {
    .hero .hero-copy .hero-actions { align-self: start; margin-top: 32px; }
}

/* 首屏與下一個區塊之間的分隔線（與其他區塊之間的線一致） */
.hero + .section, .page-hero + .section { border-top: 1px solid var(--rule); }

/* 首頁：各區塊上下間距收緊約 2 成，內容整體往上 */
body.home .hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(56px, 7vw, 96px); }
body.home .section { padding-top: clamp(64px, 8.5vw, 112px); padding-bottom: clamp(64px, 8.5vw, 112px); }

/* 首頁：筆電（MacBook 等螢幕高度較矮）再收緊間距，讓首屏內容完整落在第一個畫面 */
@media (min-width: 1024px) and (max-height: 1000px) {
    body.home .hero { padding-top: 48px; padding-bottom: 72px; }
    body.home .section { padding-top: 88px; padding-bottom: 88px; }
}

/* 內頁首個區塊與頁首的距離，統一跟首頁相同；內容靠上對齊，與首頁左右兩欄同高起排 */
.page-hero, .section.page-contact { padding-top: clamp(40px, 6vw, 80px); }
.page-hero .wrap { align-items: start; }
@media (min-width: 1024px) and (max-height: 1000px) {
    .page-hero, .section.page-contact { padding-top: 48px; }
}

/* 理念區：改用 AGA 架構列（與首屏相同），垂直置中於等高卡片內 */
.decompose.dc-aga { display: flex; flex-direction: column; }
.decompose.dc-aga .dc-head { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; }
.decompose.dc-aga .arch-row { flex: 1; padding: 24px 4px; animation: none; }
@media (max-width: 1023.98px) {
    .decompose.dc-aga { min-height: 0; }
    .decompose.dc-aga .arch-row { padding: 32px 0 20px; }
}

/* 首屏卡片：改為服務清單（客製化開發、自動化生成、數位管理） */

/* 首屏服務清單：三項平均分配卡片高度，不留空白；左側標題／說明／按鈕之間保留間距 */
@media (min-width: 1024px) {
    .hero .hero-copy { row-gap: 32px; }
    .arch-map { display: flex; flex-direction: column; }

}
/* 首屏服務清單放大，讓卡片內容飽滿 */

/* 首屏卡片底部：合作流程（需求訪談 → 系統規劃 → 導入上線） */
.hero-process { margin-top: auto; padding: 18px 24px 22px; border-top: 3px double var(--ink); background: var(--paper); --accent: var(--ink); --accent-wash: #fff; }
.hero-process-title { font-size: 13.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 12px; }
/* 流程用時間軸呈現（節點＋連線），避免方框看起來像可點擊的按鈕 */
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.process-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 6px 0; text-align: center; }
.process-steps li::before { content: ""; position: absolute; top: 5px; left: 50%; right: -50%; height: 1.5px; background: var(--rule-strong); }
.process-steps li::after { content: ""; position: absolute; top: 0; left: calc(50% - 6px); width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--ink); background: var(--sheet); }
.process-steps li.end::before { display: none; }
.process-steps li.end::after { border-color: var(--red); background: var(--red); }
.process-steps .step-no { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.process-steps .step-name { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.process-steps li.end .step-no { color: var(--red); }
@media (prefers-reduced-motion: no-preference) {
    .hero-process { animation: arch-in .8s var(--ease) both; animation-delay: 3.1s; }
}
@media (max-width: 767.98px) {
    .hero-process { padding: 16px 16px 18px; }
    .process-steps .step-name { font-size: 14px; }
}

/* 首屏卡片：客製化開發為主軸，下分「自動化生成」「數位管理」兩個方向 */
.cust-main { display: grid; grid-template-columns: 60px 1fr; gap: 20px; align-items: center; padding: 26px 24px 0; }
.cust-icon { width: 60px; height: 60px; padding: 13px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; background: var(--ink); }
.cust-main b { display: block; font-size: clamp(22px, 1.9vw, 26px); line-height: 1.3; }
.cust-main span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }

.cust-branch { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 40px 24px 24px; }
/* 分支線：主軸 → 橫線 → 兩個方向 */
.cust-branch::before { content: ""; position: absolute; left: 54px; top: 0; width: 2px; height: 20px; background: var(--ink); }
.cust-branch::after { content: ""; position: absolute; left: 54px; right: calc(25% + 8.5px); top: 20px; height: 2px; background: var(--ink); }
.cust-sub { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; border: 1.5px solid; }
.cust-sub::before { content: ""; position: absolute; top: -21px; left: 50%; width: 2px; height: 20px; background: var(--ink); transform: translateX(-50%); }
.cust-sub.aga::before { left: 30px; }
.cust-sub.aga { border-color: rgba(200, 40, 31, 0.5); background: var(--red-wash); }
.cust-sub.dma { border-color: rgba(14, 107, 102, 0.5); background: var(--teal-wash); }
.cust-sub-icon { width: 36px; height: 36px; padding: 7px; margin-bottom: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; background: #fff; border: 1.5px solid currentColor; }
.cust-sub.aga .cust-sub-icon, .cust-sub.aga b { color: var(--red); }
.cust-sub.dma .cust-sub-icon, .cust-sub.dma b { color: var(--teal); }
.cust-sub b { font-size: 18px; line-height: 1.35; }
.cust-sub span { font-size: 14.5px; color: var(--ink-2); line-height: 1.65; }
@media (prefers-reduced-motion: no-preference) {
    .cust-main { animation: arch-in .8s var(--ease) both; animation-delay: 2.4s; }
    .cust-branch::before, .cust-branch::after { animation: arch-in .6s var(--ease) both; animation-delay: 2.7s; }
    .cust-sub { animation: arch-in .8s var(--ease) both; animation-delay: calc(var(--i) * 0.15s + 2.85s); }
}
@media (max-width: 767.98px) {
    .cust-main { grid-template-columns: 44px 1fr; gap: 14px; padding: 20px 16px 0; }
    .cust-icon { width: 44px; height: 44px; padding: 9px; }
    .cust-branch { grid-template-columns: 1fr; gap: 10px; padding: 24px 16px 18px 52px; }
    .cust-branch::before { left: 37px; height: auto; bottom: 18px; }
    .cust-branch::after { display: none; }
    .cust-sub::before { top: 50%; left: -15px !important; width: 14px; height: 2px; transform: none; }
}

/* 首屏卡片縮小：依內容決定高度，不再被左側撐高；左側標題／說明／按鈕由上往下自然排列 */
@media (min-width: 1024px) {
    .hero .arch-map { align-self: start; }
    .hero .hero-copy { grid-template-rows: auto auto auto; align-content: start; row-gap: 32px; }
    .hero .hero-copy .lead { align-self: start; }
}
.cust-main { padding: 22px 24px 0; gap: 18px; grid-template-columns: 52px 1fr; }
.cust-icon { width: 52px; height: 52px; padding: 11px; }
.cust-main b { font-size: clamp(21px, 1.7vw, 24px); }
.cust-main span { margin-top: 4px; font-size: 14.5px; }
.cust-branch { flex: none; padding: 34px 24px 22px; gap: 12px; }
/* AGA 這段直線由圖示一路畫到卡片頂端，不再由卡片另外接一段，避免兩段在不同螢幕密度下對不齊 */
.cust-branch::before { left: 49px; top: -24px; height: 58px; }
.cust-branch::after { left: 49px; right: calc(25% + 8px); top: 17px; }
.cust-sub { padding: 14px 16px 16px; gap: 4px; }
.cust-sub::before { top: -18px; height: 17px; }
.cust-sub.aga::before { display: none; }
.cust-sub-icon { width: 32px; height: 32px; padding: 6px; margin-bottom: 4px; }
.cust-sub b { font-size: 17px; }
.cust-sub span { font-size: 14px; line-height: 1.6; }
.hero-process { padding: 16px 24px 18px; }
.hero-process-title { margin-bottom: 10px; }
@media (max-width: 767.98px) {
    .cust-main { grid-template-columns: 44px 1fr; padding: 18px 16px 0; }
    .cust-icon { width: 44px; height: 44px; padding: 9px; }
    .cust-branch { padding: 20px 16px 16px 52px; }
    .cust-branch::before { left: 37px; height: auto; }
}
@media (max-width: 767.98px) {
    .cust-sub::before, .cust-sub.aga::before { display: block; top: 50%; left: -15px; width: 14px; height: 2px; transform: none; }
}
/* 架構方塊英文全名：「Automated Generation」不拆行，第二行為 Architecture */
.arch-full .nw { white-space: nowrap; }
.arch-core .arch-full { max-width: none; }

/* --- 其他領域客製化 AGA 頁（aga-custom） --- */
.split-note { margin-top: 16px; font-size: 15px; color: var(--ink-2); line-height: 1.7; }
.proof-list.ledger { padding-top: 0; border-top: 2px solid var(--ink); }
.proof-list .product { padding: 22px 0; }
.share-table { border-top: 2px solid var(--ink); overflow-x: auto; }
.share-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.share-table th, .share-table td { padding: 16px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); line-height: 1.6; }
.share-table th:first-child, .share-table td:first-child { padding-left: 0; }
.share-table thead th { padding-top: 12px; padding-bottom: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule-strong); }
.share-table tbody th { width: 26%; font-weight: 700; color: var(--accent); }
.share-table td { color: var(--ink-2); }
.share-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 767.98px) {
    .share-table table { font-size: 14px; }
    .share-table th, .share-table td { padding: 12px 8px; }
}

/* --- 首頁：外包自動化團隊（自建與委託比較、導入後的改變） --- */
.cmp { border-top: 2px solid var(--ink); }
.cmp-row { display: grid; grid-template-columns: 1fr 1.5fr 1.5fr; border-bottom: 1px solid var(--rule); }
.cmp-row > div { padding: 18px 20px; font-size: 15.5px; line-height: 1.65; }
.cmp-label { padding-left: 0 !important; font-weight: 700; color: var(--ink); }
.cmp-self { color: var(--ink-3); }
.cmp-us { color: var(--ink); font-weight: 600; background: var(--red-wash); border-left: 2px solid var(--red); }
.cmp-head > div { padding-top: 14px; padding-bottom: 12px; font-size: 13.5px; font-weight: 700; }
.cmp-head .cmp-self { color: var(--ink-3); }
.cmp-head .cmp-us { color: var(--red); }
.team-sub { margin: clamp(56px, 7vw, 88px) 0 20px; font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; }
.team-benefits { margin: 0; padding: 0; list-style: none; }
.team-benefits .cell .step-no { display: block; margin-bottom: 14px; font-size: 14px; }
.team-benefits h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.team-benefits p { margin-top: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 1023.98px) {
    .team-benefits { grid-template-columns: 1fr 1fr; }
    .team-benefits .cell:nth-child(3) { border-left: 0; }
}
@media (max-width: 767.98px) {
    .cmp-row { grid-template-columns: 1fr 1fr; }
    .cmp-label { grid-column: 1 / -1; padding: 14px 0 0 !important; }
    .cmp-row > div { padding: 10px 12px 14px; font-size: 14.5px; }
    .cmp-head .cmp-label { display: none; }
    .team-benefits { grid-template-columns: 1fr; }
    .team-benefits .cell { border-left: 0 !important; padding-left: 0; padding-right: 0; }
}

/* --- 聯絡表單：分步選擇架構、領域與項目 --- */
.field-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.field-choices { margin: 0; padding: 18px 0 16px; border: 0; border-bottom: 1px solid var(--rule-strong); min-width: 0; }
.field-choices[hidden], .contact-form form[hidden], .form-done[hidden] { display: none; }
/* legend 改為浮動，間距才會跟一般欄位一致（fieldset 的 legend 預設會疊在邊框上） */
.field-choices legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.field-choices .choices { clear: both; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border: 1px solid var(--rule-strong); background: var(--sheet); font-size: 14.5px; line-height: 1.4; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.choice b { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-wash); color: var(--red); font-weight: 600; }
.choice:has(input:checked) b { color: var(--red); }
/* DMA 的選項用青綠色 */
.choice[data-arch="dma"]:has(input:checked),
[data-arch="dma"] .choice:has(input:checked) { border-color: var(--teal); background: var(--teal-wash); color: var(--teal); }
[data-arch="dma"] .choice:has(input:checked) b { color: var(--teal); }
.field textarea::placeholder { color: var(--ink-3); opacity: .75; font-size: 14.5px; }
.form-done { padding: 40px 0; border-top: 3px double var(--red); border-bottom: 1px solid var(--rule-strong); }
.form-done:focus { outline: none; }
.form-done h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; }
.form-done p { margin-top: 10px; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 767.98px) {
    .field-row { grid-template-columns: 1fr; }
}

/* --- 404 頁面 --- */
.not-found { min-height: calc(100vh - var(--header-h) - 120px); display: flex; align-items: center; }
.not-found .wrap { width: 100%; }
.nf-code { font-size: clamp(64px, 10vw, 120px); font-weight: 700; line-height: 1; color: var(--red); letter-spacing: -0.02em; margin-bottom: 18px; }
.not-found .hero-actions { flex-wrap: wrap; }

/* --- 人才招募：沒有職缺時的畫面（.jobs 裡沒有 .job 時自動顯示，並收起「沒有合適職位」橫幅） --- */
.jobs-empty { display: none; padding: 40px 0 44px; border-bottom: 1px solid var(--rule); }
.jobs:not(:has(.job)) ~ .jobs-empty { display: block; }
.jobs:not(:has(.job)) ~ .jobs-cta { display: none; }
.jobs-empty h3 { font-size: 22px; font-weight: 700; line-height: 1.4; }
.jobs-empty p { margin-top: 12px; max-width: 40em; color: var(--ink-2); font-size: 15.5px; line-height: 1.8; }
.jobs-empty-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767.98px) {
    .jobs-empty-actions .btn { flex: 1 1 100%; justify-content: center; }
}
