/* ── PAS brand layer ───────────────────────────────────────────────────────
   Shared by the public landing page and the login page only.
   Everything is scoped to .pas-page so the authenticated app shell is
   unaffected. Landing-specific layout lives in landing.css.
   ──────────────────────────────────────────────────────────────────────── */

.pas-page {
    --pas-ink: #14231D;
    --pas-ink-soft: #3F4B45;
    --pas-muted: #56615A;
    --pas-paper: #F4F4EF;
    --pas-surface: #FFFFFF;
    --pas-surface-soft: #EDEEE7;
    --pas-pine: #0E5A46;
    --pas-pine-deep: #0A4435;
    --pas-pine-soft: #E4EEE8;
    --pas-brass: #B08A52;
    --pas-line: #D7D9D1;
    --pas-line-strong: #BEC2B7;

    --pas-sans: "PingFang HK", "PingFang TC", "Microsoft JhengHei",
                "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pas-serif: "Iowan Old Style", "Palatino Linotype", Palatino,
                 "Songti TC", "Noto Serif TC", Georgia, serif;

    margin: 0;
    background: var(--pas-paper);
    color: var(--pas-ink);
    font-family: var(--pas-sans);
    font-size: 16px;
    line-height: 1.65;
    color-scheme: light;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.pas-page img,
.pas-page svg {
    display: block;
    max-width: 100%;
}

.pas-page p,
.pas-page h1,
.pas-page h2,
.pas-page h3,
.pas-page h4,
.pas-page dl,
.pas-page dd,
.pas-page figure {
    margin: 0;
}

.pas-page a {
    color: inherit;
}

.pas-page :focus-visible {
    outline: 3px solid var(--pas-brass);
    outline-offset: 3px;
    border-radius: 1px;
}

.pas-page .btn-pas:focus-visible,
.pas-page.auth-page .btn-primary:focus-visible,
.pas-page .access :focus-visible {
    outline-color: var(--pas-paper);
}

/* ── Utilities ───────────────────────────────────────────────────────────── */

.pas-page .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pas-page .skip-link {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 100;
    padding: .6rem .9rem;
    background: var(--pas-ink);
    color: var(--pas-paper);
    font-size: .82rem;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform .15s ease;
}

.pas-page .skip-link:focus {
    transform: none;
}

/* ── Brand lockup ───────────────────────────────────────────────────────── */

.pas-page .brand-mark {
    flex: none;
    color: var(--pas-ink);
}

.pas-page .brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: var(--pas-ink);
}

.pas-page .brand-lockup__text {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.pas-page .brand-lockup__short {
    font-family: var(--pas-serif);
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.pas-page .brand-lockup__full {
    margin-top: .2rem;
    font-size: .68rem;
    letter-spacing: .015em;
    color: var(--pas-muted);
}

/* ── Actions ─────────────────────────────────────────────────────────────── */

.pas-page .btn-pas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .72rem 1.2rem;
    border: 1px solid var(--pas-pine);
    border-radius: 2px;
    background: var(--pas-pine);
    color: #FFFFFF;
    font-family: var(--pas-sans);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.pas-page .btn-pas:hover {
    background: var(--pas-pine-deep);
    border-color: var(--pas-pine-deep);
}

.pas-page .btn-pas:active {
    transform: translateY(1px);
}

.pas-page .link-quiet {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--pas-ink);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--pas-pine);
    text-decoration-thickness: 1px;
    text-underline-offset: .32em;
}

.pas-page .link-quiet:hover {
    text-decoration-color: var(--pas-pine);
}

/* ── Language switch (brand variant) ─────────────────────────────────────── */

.pas-page .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .76rem;
    letter-spacing: .02em;
}

.pas-page .lang-switch__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 44px;
    padding: 0 .15rem;
    color: var(--pas-muted);
    text-decoration: none;
}

.pas-page .lang-switch__link:hover,
.pas-page .lang-switch__link.is-active {
    color: var(--pas-ink);
}

.pas-page .lang-switch__link.is-active {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--pas-pine);
    text-underline-offset: .28em;
}

.pas-page .lang-switch__sep {
    color: var(--pas-line-strong);
}

/* ── Login page ──────────────────────────────────────────────────────────── */

.pas-page.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4.75rem 1rem 2rem;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0 47px,
            rgba(176, 138, 82, .13) 47px 48px
        ),
        var(--pas-paper);
}

.pas-page.auth-page .auth-lang {
    position: absolute;
    top: 1.1rem;
    right: 1.25rem;
}

.pas-page.auth-page .auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.pas-page.auth-page .auth-brand {
    margin-bottom: 1.65rem;
    text-align: center;
}

.pas-page.auth-page .auth-brand__link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    color: var(--pas-ink);
    text-decoration: none;
}

.pas-page.auth-page .auth-brand__link .brand-mark {
    width: 46px;
    height: 46px;
}

.pas-page.auth-page .auth-brand__wordmark {
    font-family: var(--pas-serif);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1;
}

.pas-page.auth-page .auth-brand__name {
    margin-top: .3rem;
    color: var(--pas-muted);
    font-size: .76rem;
    letter-spacing: .015em;
}

.pas-page.auth-page .card {
    border: 1px solid var(--pas-line-strong);
    border-top: 3px solid var(--pas-pine);
    border-radius: 2px;
    background: var(--pas-surface);
    box-shadow: 0 28px 55px -38px rgba(20, 35, 29, .5);
}

.pas-page.auth-page .auth-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.pas-page.auth-page .form-label {
    color: var(--pas-ink-soft);
}

.pas-page.auth-page .input-group-text,
.pas-page.auth-page .form-control,
.pas-page.auth-page .btn-light {
    border-color: var(--pas-line-strong);
    border-radius: 2px;
}

.pas-page.auth-page .form-control:focus {
    border-color: var(--pas-pine);
    box-shadow: 0 0 0 .2rem rgba(14, 90, 70, .15);
}

.pas-page.auth-page .input-group:focus-within .input-group-text {
    border-color: var(--pas-pine);
}

.pas-page.auth-page .btn-primary {
    border-color: var(--pas-pine);
    border-radius: 2px;
    background: var(--pas-pine);
    font-weight: 600;
}

.pas-page.auth-page .btn-primary:hover,
.pas-page.auth-page .btn-primary:focus {
    border-color: var(--pas-pine-deep);
    background: var(--pas-pine-deep);
}

.pas-page.auth-page .auth-footer {
    margin-top: 1.1rem;
    color: var(--pas-muted);
    font-size: .74rem;
    text-align: center;
}

.pas-page.auth-page .alert-danger {
    border: 1px solid #E3BDB6;
    border-radius: 2px;
    background: #F8EAE7;
    color: #7A2C20;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */

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