/* Shared shell for the Devices pages. Same tokens and colour scheme as the
   front page and the legal shell, plus the product-page furniture: the status
   bar, the photo slot, the spec table and the SKU cards. */

:root {
    --bg: #f5f6f8;
    --text: #17181c;
    --text-sub: #555a63;
    --text-mute: #696e79;
    --rule: #d5d8df;
    --rule-soft: #e6e8ed;
    --rule-strong: #828b9e; /* 3.2:1 — for control borders, not hairlines */
    --accent: #1a56c8;
    --glow: rgba(26, 86, 200, 0.10);

    --serif: 'Noto Serif JP', 'YuMincho', 'Yu Mincho', serif;
    --sans: 'Noto Sans JP', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Menlo', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: light;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.9;
    max-width: 760px;
    margin: 0 auto;
    padding: 72px 40px 120px;
}

::selection { background: var(--text); color: var(--bg); }

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

/* ── masthead (same rhythm as the legal shell) ── */
.page-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-mute);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 48px;
}

.page-top a {
    position: relative;
    color: var(--text-sub);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.page-top a:hover { color: var(--text); border-bottom-color: var(--text); }
.page-top a::before {
    content: '';
    position: absolute;
    inset: -5px -6px;
}

.page-top .right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.page-top .right a[aria-current="page"] { color: var(--text); }

/* ── status bar, borrowed from the front page ── */
.mx-bar {
    display: flex;
    gap: 18px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-mute);
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
    padding: 7px 2px;
    margin-bottom: 30px;
}
.mx-bar .right { margin-left: auto; }

.dotlive {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 7px;
    vertical-align: 1px;
}

/* Japanese has no spaces, so text-wrap: balance happily breaks mid-word.
   Headline copy wraps each phrase in .nb to keep breaks at phrase joints. */
h1 .nb { display: inline-block; }

h1 {
    font-family: var(--serif);
    font-size: clamp(25px, 4.2vw, 33px);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-wrap: balance;
    margin-bottom: 10px;
}

.lead {
    color: var(--text-sub);
    text-wrap: pretty;
    margin-bottom: 44px;
}

section { margin-bottom: 56px; }

h2 {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.5;
    margin: 40px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule-soft);
}

p { text-wrap: pretty; }
p + p { margin-top: 12px; }

a { color: var(--accent); }
a:hover { opacity: 0.75; }

/* ── product shelf (index) ── */
.shelf {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.unit {
    border: 1px solid var(--rule);
    background: #fff;
    padding: 22px 24px 24px;
}

.unit-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.unit-code {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--accent);
}

.unit-name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.unit-status {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
    white-space: nowrap;
}
.unit-status.on { color: var(--accent); }

.unit-tag { color: var(--text-sub); font-size: 13.5px; margin-bottom: 14px; }

.unit-foot {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ── photo slot: an honest placeholder until product photos exist ── */
.photo-slot {
    height: clamp(180px, 34vw, 260px);
    border: 1px solid var(--rule);
    background: repeating-linear-gradient(45deg, #eef0f4 0 14px, #e8eaef 14px 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rule-strong);
    margin-bottom: 30px;
}

/* ── spec table ── */
.spec {
    display: grid;
    grid-template-columns: 140px 1fr;
    row-gap: 8px;
    font-size: 13.5px;
    margin: 18px 0 8px;
}
.spec dt {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-mute);
    padding-top: 3px;
}
.spec dd { color: var(--text); }

@media (max-width: 520px) {
    .spec { grid-template-columns: 1fr; row-gap: 2px; }
    .spec dd { margin-bottom: 10px; }
}

/* ── SKU cards ── */
.sku-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 26px 0 8px;
}

.sku {
    flex: 1 1 240px;
    border: 1px solid var(--rule);
    background: #fff;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
}

.sku-code {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 6px;
}

.sku-name { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }

.sku-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 18px;
}

.sku .btn { margin-top: auto; align-self: flex-start; }

/* ── buttons ── */
.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 20px;
    transition: opacity 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { opacity: 1; box-shadow: 0 2px 14px var(--glow); }

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-ghost { border: 1px solid var(--rule-strong); color: var(--text); }

/* ── FAQ ── */
.faq dt {
    font-weight: 600;
    font-size: 14px;
    margin-top: 20px;
}
.faq dd {
    font-size: 13.5px;
    color: var(--text-sub);
    margin-top: 4px;
}

/* ── footer ── */
.page-foot {
    margin-top: 72px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.13em;
    color: var(--text-mute);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.page-foot a {
    position: relative;
    color: var(--text-sub);
    text-decoration: none;
    margin-right: 20px;
}
.page-foot a:hover { color: var(--text); }
.page-foot a::before {
    content: '';
    position: absolute;
    inset: -8px -6px;
}

@media (max-width: 640px) {
    body { padding: 48px 22px 90px; }
}

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