/* b.boz.ng — industrial notebook
   Helvetica, ink on paper, huge type, no accent gimmicks. */

:root {
    --bobi-paper: #f4f2ec;
    --bobi-ink: #161616;
    --bobi-mute: #6e6b64;
    --bobi-line: #161616;
    --bobi-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --ghost-accent-color: #161616;
    --background-color: #f4f2ec;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bobi-paper: #161412;
        --bobi-ink: #f3efe6;
        --bobi-mute: #a39e93;
        --bobi-line: #f3efe6;
        --background-color: #161412;
        --ghost-accent-color: #f3efe6;
    }
}

html.is-inverted {
    --bobi-paper: #161412;
    --bobi-ink: #f3efe6;
    --bobi-mute: #a39e93;
    --bobi-line: #f3efe6;
    --background-color: #161412;
    --ghost-accent-color: #f3efe6;
}

@media (prefers-color-scheme: dark) {
    html.is-inverted {
        --bobi-paper: #f4f2ec;
        --bobi-ink: #161616;
        --bobi-mute: #6e6b64;
        --bobi-line: #161616;
        --background-color: #f4f2ec;
        --ghost-accent-color: #161616;
    }
}

html {
    background: var(--bobi-paper);
    overflow-anchor: none;
    overflow-x: hidden;
}

body,
.gh-viewport {
    overflow-x: hidden;
}

body,
.has-sans-title,
.has-sans-body,
.is-title,
.is-body,
.gh-content,
input,
button,
textarea {
    font-family: var(--bobi-sans) !important;
}

body {
    background: var(--bobi-paper);
    color: var(--bobi-ink);
}

/* Chinese headings must not orphan a single character. */
h1,
h2,
h3,
h4,
.is-title,
.bobi-claim,
.bobi-lead-title,
.bobi-row-title,
.gh-footer-signup-header,
.gh-article-title {
    line-break: strict;
    word-break: keep-all;
    overflow-wrap: normal;
    text-wrap: pretty;
}

.bobi-skip {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 20;
    background: var(--bobi-ink);
    color: var(--bobi-paper);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.bobi-skip:focus {
    top: 12px;
}

/* Nav */
.bobi-nav,
.gh-navigation {
    background: var(--bobi-paper) !important;
    color: var(--bobi-ink) !important;
    border-bottom: 2px solid var(--bobi-line);
    min-height: 64px;
}

.gh-navigation-inner {
    min-height: 76px;
}

.gh-navigation-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.gh-navigation-logo {
    font-size: 2.4rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em;
    white-space: nowrap;
    line-height: 1;
}

.bobi-nav-taiji {
    display: block;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 auto;
}

.bobi-nav-taiji .bobi-taiji-mark {
    animation: bobi-spin 8s linear infinite;
}

@keyframes bobi-spin {
    to { transform: rotate(360deg); }
}

.gh-navigation-menu a {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gh-button,
.gh-navigation .gh-button,
a.gh-button[data-portal] {
    background: var(--bobi-ink) !important;
    background-color: var(--bobi-ink) !important;
    color: var(--bobi-paper) !important;
    border-radius: 0 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    padding: 0.8em 1.4em !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.gh-button:hover,
.gh-button:focus-visible {
    background: var(--bobi-paper) !important;
    color: var(--bobi-ink) !important;
    outline: 2px solid var(--bobi-ink);
}

.gh-button:active {
    transform: translateY(1px);
}

/* Homepage masthead */
.bobi-mast {
    border-bottom: 2px solid var(--bobi-line);
    padding: 1.4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
    overflow-anchor: none;
}

.bobi-mast-inner {
    width: 100%;
    margin: 0;
    padding: 0 max(4vmin, 20px);
    box-sizing: border-box;
}

.bobi-footer .gh-inner {
    width: min(1180px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.bobi-kicker {
    display: inline-block;
    background: var(--bobi-ink);
    color: var(--bobi-paper);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 6px 10px;
    margin: 0 0 1.25rem;
}

.bobi-wordmark {
    position: relative;
    margin: 0;
    font-size: clamp(4.2rem, 16vw, 11rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.88;
    white-space: nowrap;
}

.bobi-ghost {
    position: absolute;
    inset: -0.08em auto auto -0.06em;
    font-size: 1em;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--bobi-ink) 18%, transparent);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.bobi-claim {
    margin: 1.5rem 0 0;
    max-width: 18em;
    font-size: clamp(1.65rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.bobi-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: 2rem;
    border: 2px solid var(--bobi-line);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bobi-meta div {
    padding: 10px 14px;
    border-right: 2px solid var(--bobi-line);
    white-space: nowrap;
}

.bobi-meta div:last-child {
    border-right: none;
}

.bobi-meta .lbl {
    color: var(--bobi-mute);
    margin-right: 8px;
}

.bobi-taiji {
    display: block;
    width: 5rem;
    height: 5rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    overflow-anchor: none;
}

.bobi-taiji-mark {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    will-change: transform;
}

.bobi-taiji-mark .taiji-field {
    fill: var(--bobi-paper);
}

.bobi-taiji-mark .taiji-edge {
    fill: none;
    stroke: var(--bobi-ink);
    stroke-width: 3;
}

.bobi-taiji-mark .taiji-yang {
    fill: var(--bobi-ink);
}

.bobi-taiji-mark .taiji-seed-yin {
    fill: var(--bobi-paper);
}

.bobi-taiji-mark .taiji-seed-yang {
    fill: var(--bobi-ink);
}

.bobi-taiji:focus-visible {
    outline: 3px solid var(--bobi-ink);
    outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .bobi-nav-taiji .bobi-taiji-mark,
    .bobi-taiji-mark {
        animation: none;
        transition: none;
    }
}

/* Featured lead */
.bobi-lead {
    width: 100%;
    border-bottom: 2px solid var(--bobi-line);
    padding: 0;
}

.bobi-lead-link {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.7fr);
    gap: 1.5rem;
    padding: 2.25rem 8rem 2.5rem;
    color: inherit;
    text-decoration: none;
}

.bobi-lead-title {
    margin: 0.4rem 0 0;
    font-size: clamp(2.1rem, 5.4vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.bobi-lead-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 1rem 0 0;
    max-width: 36em;
    font-size: 1.45rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--bobi-ink) 78%, var(--bobi-paper));
}

.bobi-lead-go {
    margin: 1.4rem 0 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none;
}

.bobi-lead-meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.45rem;
    border-left: 2px solid var(--bobi-line);
    padding-left: 1.25rem;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bobi-lead-link:hover .bobi-lead-title,
.bobi-lead-link:focus-visible .bobi-lead-title,
.bobi-row-link:hover .bobi-row-title {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.18em;
}

.bobi-lead-link:focus-visible,
.bobi-row-link:focus-visible,
.gh-navigation-logo:focus-visible {
    outline: 3px solid var(--bobi-ink);
    outline-offset: 4px;
}

/* Index list */
.bobi-index {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 3rem;
    overflow: visible;
}

.bobi-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--bobi-ink);
    color: var(--bobi-paper);
    padding: 1rem 8rem;
}

.bobi-sec-head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.bobi-sec-head .en {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--bobi-paper) 70%, var(--bobi-ink));
}

.bobi-feed {
    list-style: none;
    width: 100%;
    margin: 0;
    padding: 0;
    counter-reset: bobi;
}

.bobi-row {
    border-bottom: 2px solid var(--bobi-line);
    counter-increment: bobi;
}

.bobi-row-link {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1.35rem 8rem;
    color: inherit;
    text-decoration: none;
}

.bobi-row-no::before {
    content: counter(bobi, decimal-leading-zero);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--bobi-ink);
}

.bobi-row-title {
    display: block;
    font-size: clamp(1.45rem, 3.2vw, 2.15rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.bobi-row-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.45rem;
    max-width: 40em;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--bobi-mute);
}

.bobi-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 7.5rem;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bobi-mute);
    white-space: nowrap;
}

.bobi-row-link:hover,
.bobi-row-link:focus-visible,
.bobi-lead-link:hover {
    background: color-mix(in srgb, var(--bobi-ink) 4%, var(--bobi-paper));
}

.bobi-lead-link.is-chosen,
.bobi-row-link.is-chosen {
    background: var(--bobi-ink);
    color: var(--bobi-paper);
}

.bobi-lead-link.is-chosen .bobi-lead-excerpt,
.bobi-row-link.is-chosen .bobi-row-excerpt,
.bobi-row-link.is-chosen .bobi-row-side,
.bobi-lead-link.is-chosen .bobi-lead-meta {
    color: color-mix(in srgb, var(--bobi-paper) 72%, var(--bobi-ink));
}

.bobi-row-link.is-chosen .bobi-row-no::before {
    -webkit-text-stroke-color: var(--bobi-paper);
}

/* Article */
.gh-article-header {
    padding-top: 2.25rem !important;
}

.gh-article-title {
    font-size: clamp(2.4rem, 6.5vw, 4.6rem) !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    line-height: 1.12 !important;
    max-width: none;
}

.post-template .gh-canvas {
    display: block !important;
    width: min(82rem, calc(100% - 9.6rem));
    max-width: none;
    margin-inline: auto;
    padding: 0;
}

.post-template .gh-canvas > * {
    grid-column: auto !important;
    max-width: none !important;
}

.gh-article-excerpt {
    max-width: 28em;
    font-size: clamp(1.45rem, 2.6vw, 1.85rem) !important;
    font-weight: 650;
    line-height: 1.45;
}

.page-about .gh-article-excerpt {
    margin-top: 2.9em;
}

.page-about .gh-canvas {
    display: block !important;
    width: min(82rem, calc(100% - 9.6rem));
    max-width: none;
    margin-inline: auto;
    padding: 0;
}

.page-about .gh-canvas > * {
    grid-column: auto !important;
    max-width: none !important;
}

.page-about .gh-content > p {
    max-width: 28em;
    font-size: clamp(1.45rem, 2.6vw, 1.85rem) !important;
    font-weight: 650;
    line-height: 1.45;
    color: var(--bobi-ink);
}

.gh-article-tag {
    display: inline-block;
    background: var(--bobi-ink);
    color: var(--bobi-paper) !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 5px 9px;
    margin-bottom: 1rem;
}

.gh-article-bobi-meta {
    margin-top: 1.75rem;
}

.gh-content {
    font-size: 1.5rem !important;
    line-height: 1.7;
}
.gh-content > p,
.gh-content > ul,
.gh-content > ol,
.gh-content > blockquote {
    font-size: inherit;
    line-height: 1.7;
}

.post-template .gh-content > p,
.post-template .gh-content > ul,
.post-template .gh-content > ol,
.post-template .gh-content > blockquote,
.post-template .gh-content > h2,
.post-template .gh-content > h3 {
    max-width: none;
}

.gh-content > h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem) !important;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.gh-content > h3 {
    font-size: clamp(1.3rem, 2.6vw, 1.7rem) !important;
    font-weight: 800;
}

.gh-content a {
    color: var(--bobi-ink);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.gh-content a:hover {
    text-decoration-thickness: 3px;
}

.gh-content blockquote {
    border-left: 6px solid var(--bobi-ink);
    background: color-mix(in srgb, var(--bobi-ink) 4%, var(--bobi-paper));
    padding: 0.9rem 1.1rem;
    font-weight: 750;
}

.gh-container.is-list .gh-card,
.gh-container.is-grid .gh-card {
    background: transparent;
    box-shadow: none;
    border: 0;
}

/* Footer */
.bobi-footer,
.gh-footer {
    background: var(--bobi-paper) !important;
    color: var(--bobi-ink) !important;
    border-top: 2px solid var(--bobi-line);
}

.bobi-footer .gh-inner {
    width: 100%;
    max-width: none;
    padding-top: 3.2rem;
    padding-bottom: 3.2rem;
    padding-inline: 0;
}

.bobi-subscribe {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 1.6rem;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.bobi-subscribe-copy {
    justify-self: end;
    text-align: right;
}

.bobi-subscribe-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.bobi-subscribe-note {
    margin: 0.35rem 0 0;
    font-size: 1.1rem;
    color: inherit;
}

.bobi-subscribe-form.gh-form {
    display: flex !important;
    align-items: stretch;
    position: static;
    grid-column: 2;
    flex: 0 0 auto;
    height: auto !important;
    max-width: none;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.bobi-subscribe-form .gh-form-input {
    position: static !important;
    inset: auto !important;
    flex: 0 0 30.6rem;
    width: 30.6rem !important;
    max-width: 30.6rem;
    height: auto !important;
    padding: 0.8em 1em !important;
    border: 2px solid var(--bobi-line) !important;
    border-radius: 0 !important;
    background: var(--bobi-paper) !important;
    font-size: 1.5rem !important;
}

.bobi-subscribe-form .gh-button {
    position: static !important;
    right: auto !important;
    top: auto !important;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0.8em 1.4em !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.bobi-subscribe-form > svg {
    display: none;
}

.bobi-subscribe-form [data-members-error] {
    position: absolute;
}

.gh-form,
.gh-input,
.gh-form-input {
    border-radius: 0 !important;
    background: var(--bobi-paper) !important;
    color: var(--bobi-ink) !important;
}

.gh-search-icon,
.gh-icon-button {
    color: var(--bobi-ink);
}

@media (max-width: 767px) {
    .bobi-mast {
        padding: 1.6rem 0 1.8rem;
    }

    .bobi-mast-inner {
        width: 100%;
        padding: 0 max(4vmin, 20px);
    }

    .bobi-lead-link,
    .bobi-row-link {
        padding-left: 3.2rem;
        padding-right: 3.2rem;
    }

    .bobi-sec-head {
        padding: 1rem 3.2rem;
    }

    .bobi-taiji {
        width: 4.25rem;
        height: 4.25rem;
    }

    #gh-navigation,
    #gh-navigation .gh-navigation-brand {
        height: auto;
        min-height: 72px;
    }

    .gh-navigation-logo {
        font-size: 2rem !important;
    }

    .bobi-subscribe {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: none;
        margin: 0;
        gap: 1.6rem;
        padding-inline: 2.4rem;
    }

    .bobi-subscribe-copy {
        justify-self: center;
        text-align: center;
    }

    .bobi-subscribe-form.gh-form {
        grid-column: auto;
    }

    .bobi-subscribe-form .gh-form-input {
        flex: 1 1 auto;
        width: min(30.6rem, 100%) !important;
        max-width: 100%;
    }

    .bobi-footer .gh-inner {
        padding-top: 3.6rem;
        padding-bottom: 3.6rem;
    }

    .bobi-subscribe-form {
        width: 100%;
    }

    .bobi-lead-link,
    .bobi-row-link {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .bobi-lead-meta,
    .bobi-row-side {
        border: 0;
        padding: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }

    .bobi-row-no {
        display: none;
    }

    .gh-article-title,
    .gh-footer-signup-header,
    .bobi-sec-head h2 {
        max-width: none;
        white-space: normal;
    }

    .bobi-meta div {
        flex: 1 1 auto;
        border-bottom: 2px solid var(--bobi-line);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
