/* 矽塔（sita.tech）配色主題 */
:root {
    --navy-deep: #000F39;
    --navy: #00154C;
    --slate: #334370;
    --mist: #EBECF1;
    --white: #FFFFFF;
    --link: #0038CC;
    --ink: #212529;
    --rule: #D3D6E0;
    --rule-on-navy: rgba(235, 236, 241, .22);

    --font-body: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --font-display: "Inter Tight", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ink);
    background: var(--white);
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
    margin: 0;
    padding: 0;
}

a {
    color: var(--link);
    text-underline-offset: .2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid #7C9BFF;
    outline-offset: 3px;
    border-radius: 2px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
    padding: .1em .4em;
    border-radius: 4px;
    background: var(--mist);
    color: var(--navy);
}

.wrap {
    width: min(100% - 3rem, 68rem);
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    padding: .5rem 1rem;
    background: var(--white);
    color: var(--navy);
    border-radius: 0 0 6px 6px;
    z-index: 10;
}

.skip:focus {
    top: 0;
}

/* ---------- Hero ---------- */

.hero {
    color: var(--white);
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(51, 67, 112, .75), transparent 70%),
        linear-gradient(180deg, var(--navy-deep), var(--navy));
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    padding-block: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--white);
    text-decoration: none;
}

.brand img {
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--rule-on-navy);
}

.nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.75rem;
    list-style: none;
}

.nav ul a {
    color: var(--mist);
    font-size: .9375rem;
    text-decoration: none;
    padding-block: .25rem;
    border-bottom: 2px solid transparent;
}

.nav ul a:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

.hero-body {
    padding-block: clamp(3rem, 9vw, 6.5rem) clamp(4rem, 10vw, 7.5rem);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .02em;
}

.lead {
    margin-top: .5rem;
    color: var(--mist);
    font-size: 1.125rem;
}

.picker {
    margin-top: clamp(2.5rem, 6vw, 4rem);
}

.picker label {
    display: block;
    color: var(--mist);
    font-size: .9375rem;
}

.domain {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-top: .5rem;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 9.5vw, 6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

/* 讓輸入框寬度隨內容自動伸縮 */
.grow {
    display: inline-grid;
    max-width: 100%;
}

.grow::after {
    content: attr(data-value);
    visibility: hidden;
    white-space: pre;
}

.grow::after,
.grow input {
    grid-area: 1 / 1;
    box-sizing: content-box;
    font: inherit;
    letter-spacing: inherit;
    padding: 0 .08em;
    border-right: .05em solid transparent;
}

.grow::after {
    min-width: 1ch;
}

/* 寬度完全由 ::after 的文字決定，輸入框本身不貢獻固有寬度 */
.grow input {
    width: 0;
    min-width: 100%;
    box-sizing: border-box;
    color: var(--white);
    background: rgba(235, 236, 241, .08);
    border: 0;
    border-bottom: .06em solid var(--mist);
    border-radius: .08em .08em 0 0;
    caret-color: var(--white);
}

.grow input::placeholder {
    color: var(--white);
    opacity: .78;
}

.grow.is-typing input {
    animation: caret 1s steps(1) infinite;
}

@keyframes caret {
    0%, 55% {
        border-right-color: var(--white);
    }

    56%, 100% {
        border-right-color: transparent;
    }
}

.grow input:hover {
    background: rgba(235, 236, 241, .14);
}

.grow input:focus-visible {
    outline: none;
    background: rgba(235, 236, 241, .16);
    border-bottom-color: #7C9BFF;
}

.grow input[aria-invalid="true"] {
    border-bottom-color: #FFB4A8;
}

.tld {
    color: #9AA6C8;
}

.hint {
    margin-top: .75rem;
    min-height: 1.8em;
    color: #B9C1D9;
    font-size: .875rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: .5rem 1.5rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    border: 1.5px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary {
    min-height: 3.5rem;
    padding-inline: 2rem;
    font-size: 1.125rem;
    color: var(--navy-deep);
    background: var(--white);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .35);
}

.btn-primary::after {
    content: "";
    width: .55em;
    height: .55em;
    margin-left: .75em;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: translateY(-.15em) rotate(45deg);
}

.btn-primary:hover {
    background: var(--mist);
}

.btn-light {
    color: var(--navy-deep);
    background: var(--white);
}

.btn-light:hover {
    background: var(--mist);
}

.btn-ghost {
    color: var(--white);
    background: transparent;
    border-color: var(--rule-on-navy);
}

.btn-ghost:hover {
    border-color: var(--white);
}

/* ---------- Sections ---------- */

.band {
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.band-mist {
    background: var(--mist);
}

.band-navy {
    color: var(--white);
    background: var(--navy);
}

.band-navy a:not(.btn) {
    color: var(--white);
}

.split {
    display: grid;
    gap: 1.5rem 4rem;
}

@media (min-width: 52rem) {
    .split {
        grid-template-columns: minmax(0, 5fr) minmax(0, 9fr);
        align-items: start;
    }
}

.split-head {
    margin-bottom: 2.5rem;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.6vw, 2.375rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy-deep);
}

.band-navy h2 {
    color: var(--white);
}

h3 {
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--navy);
}

.band-navy h3 {
    color: var(--white);
}

.aside {
    margin-top: .75rem;
    color: var(--slate);
    max-width: 38em;
}

h2 + .aside {
    margin-top: .75rem;
}

.split-head .aside {
    margin-top: 0;
}

.band-navy .aside {
    color: var(--mist);
}

.band-navy .aside strong {
    color: var(--white);
    border-bottom: 2px solid var(--white);
}

.prose {
    max-width: 38em;
}

.prose h3 {
    margin-bottom: .75rem;
}

.prose p + p {
    margin-top: 1rem;
}

.mail {
    font-size: 1.25rem;
    font-weight: 500;
}

/* 申請對象 */

.who {
    display: grid;
    border-top: 1px solid var(--rule);
}

.who > div {
    display: grid;
    gap: .25rem 2rem;
    padding-block: 1.25rem;
    border-bottom: 1px solid var(--rule);
}

@media (min-width: 36rem) {
    .who > div {
        grid-template-columns: 7em minmax(0, 1fr);
    }
}

.who dt {
    font-weight: 700;
    color: var(--navy);
}

.who dd {
    color: var(--ink);
}

/* 申請流程 */

.steps {
    list-style: none;
    counter-reset: step;
    margin-bottom: 2rem;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 1.75rem 3.5rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
    background: var(--white);
    border-radius: 50%;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1.125rem - .5px);
    top: 2.75rem;
    bottom: .5rem;
    width: 1px;
    background: var(--rule-on-navy);
}

.steps p {
    margin-top: .25rem;
    color: var(--mist);
}

/* 資源列表 */

.table-scroll {
    overflow-x: auto;
}

.resources {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.resources th {
    padding: .75rem 1rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--slate);
    border-bottom: 2px solid var(--navy);
    white-space: nowrap;
}

.resources td {
    padding: 1.75rem 1rem;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

.resources th:first-child,
.resources td:first-child {
    padding-left: 0;
}

.resources td:first-child {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    white-space: nowrap;
    padding-right: 2.5rem;
}

.resources td:nth-child(2) {
    font-size: 1.125rem;
    vertical-align: middle;
}

.resources tbody tr:hover {
    background: #F6F7FA;
}

.resources td:first-child a {
    color: var(--navy);
}

.resources td:last-child {
    white-space: nowrap;
    color: var(--slate);
    font-size: .9375rem;
    vertical-align: middle;
}

@media (max-width: 40rem) {
    .resources thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .resources tr {
        display: block;
        padding-block: 1.125rem;
        border-bottom: 1px solid var(--rule);
    }

    .resources tbody tr:first-child {
        border-top: 2px solid var(--navy);
    }

    .resources tbody tr:hover {
        background: none;
    }

    .resources td,
    .resources td:first-child {
        display: block;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .resources td:last-child {
        margin-top: .25rem;
        white-space: normal;
    }
}

/* ---------- Footer ---------- */

.footer {
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
    color: #C5CBDD;
    background: var(--navy-deep);
    font-size: .9375rem;
}

.footer a {
    color: var(--white);
}

.notes {
    display: grid;
    gap: 2rem 4rem;
}

@media (min-width: 52rem) {
    .notes {
        grid-template-columns: 1fr 1fr;
    }
}

.footer h2 {
    margin-bottom: .5rem;
    font-size: 1.0625rem;
    color: var(--white);
}

.colophon {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule-on-navy);
    font-size: .875rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .grow.is-typing input {
        animation: none;
    }
}

/* ---------- 404 ---------- */

.notfound {
    background: var(--navy);
}

.notfound .hero {
    min-height: 100vh;
}
