/* =============================================================================
   Content Pages
   Shared components for informational HTML-block pages (guide, service pages,
   forwarding, policy pages). Tokens, bare-tag text, headings, divider-top,
   buttons and .hyperlink come from global.css; this file adds only the
   components that need more than a tag. Page-local layout that exactly one
   page uses lives in that page's own <style> block (docs/3.16 Hard Rule 2).

   Every content page roots under `.luna`; component classes are bare and
   semantic, scoped under that root. See docs/3.16-content-pages.md.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Article-page header skeleton — title, description, divider.
   ----------------------------------------------------------------------------- */
.luna .section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.luna .section-header p {
    max-width: var(--width-content);
    margin: var(--space-lg) auto 0;
}

.luna .section-divider {
    width: 100%;
    max-width: var(--width-content);
    height: 2px;
    border: none;
    margin: var(--space-lg) auto 0;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* Narrow centered column — forms and other capped-width blocks. */
.luna .narrow-col {
    max-width: var(--width-narrow);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* -----------------------------------------------------------------------------
   Verdict marks — ○ / × / △ coverage symbols, one status colour each. Shared by
   the insurance and buyer-protection pages so the symbols read identically.
   (The buyer-protection matrix layout around them is page-local.)
   ----------------------------------------------------------------------------- */
.luna .verdict {
    flex-shrink: 0;
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
}

/* The table selector outranks .data-table td *, which resets cell text color. */
.luna .verdict-yes,
.luna .data-table td .verdict-yes {
    color: var(--status-success);
}

.luna .verdict-no,
.luna .data-table td .verdict-no {
    color: var(--status-danger);
}

.luna .verdict-cond,
.luna .data-table td .verdict-cond {
    color: var(--status-warning);
}

/* -----------------------------------------------------------------------------
   Subsection — a titled block nested under a section <h2>. Reads as a child of
   the section, not a peer, so a long section keeps a clear two-level hierarchy.
   ----------------------------------------------------------------------------- */
.luna .subsection > h3 {
    margin: 0 0 var(--space-xs);
}

.luna .subsection > :last-child {
    margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Collapse — native <details>/<summary>, no JS. For edge-case detail that most
   readers skip (special paperwork lists, FAQ answers).
   ----------------------------------------------------------------------------- */
.luna .collapse {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.luna .collapse + .collapse {
    margin-top: var(--space-sm);
}

.luna .collapse > summary {
    list-style: none;
    cursor: pointer;
    padding: var(--space) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--heading);
}

.luna .collapse > summary::-webkit-details-marker {
    display: none;
}

.luna .collapse > summary::after {
    content: "+";
    font-size: var(--font-size-xl);
    line-height: 1;
    color: var(--body-text);
}

.luna .collapse[open] > summary::after {
    content: "\2212";
}

.luna .collapse > summary:hover {
    color: var(--accent-hover);
}

.luna .collapse-body {
    padding: 0 var(--space-lg) var(--space);
}

/* Wide tables scroll edge to edge inside a collapse; the body side padding is
   reapplied inside the scroll region so phones get the full card width. */
.luna .collapse:not(.collapse-slim) > .collapse-body > .table-scroll {
    margin-inline: calc(-1 * var(--space-lg));
    padding-inline: var(--space-lg);
}

/* Slim variant — no card border, tight height, small caret. For inline detail
   next to body copy where the full bordered card is too tall (fee notes). */
.luna .collapse-slim {
    border: none;
    border-radius: 0;
}

.luna .collapse-slim + .collapse-slim {
    margin-top: var(--space-2xs);
}

.luna .collapse-slim > summary {
    padding: var(--space-2xs) 0;
    justify-content: flex-start;
    gap: var(--space-xs);
    font-weight: var(--font-weight-medium);
    color: var(--accent);
}

.luna .collapse-slim > summary::after {
    content: "";
    order: -1;
    width: 0;
    height: 0;
    border-left: var(--space-2xs) solid currentColor;
    border-top: var(--space-2xs) solid transparent;
    border-bottom: var(--space-2xs) solid transparent;
    transition: transform var(--transition-fast);
}

.luna .collapse-slim[open] > summary::after {
    content: "";
    transform: rotate(90deg);
}

.luna .collapse-slim > .collapse-body {
    padding: var(--space-2xs) 0 var(--space-xs) var(--space);
}

/* -----------------------------------------------------------------------------
   Fee tiles — parallel value cards so a "we charge whichever is highest"
   comparison reads at a glance instead of as a list of sentences.
   ----------------------------------------------------------------------------- */
.luna .fee-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space);
    margin: 0;
}

.luna .fee-tile {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space);
    text-align: center;
    background: var(--surface);
}

.luna .fee-tile__label {
    font-size: var(--font-size-sm);
    color: var(--body-text);
    margin: 0 0 var(--space-xs);
}

.luna .fee-tile__value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--heading);
    margin: 0;
}

/* -----------------------------------------------------------------------------
   Overview — a label/value definition list for a company or spec summary
   (About page 会社概要). Two columns on desktop, stacked on mobile.
   ----------------------------------------------------------------------------- */
.luna .overview {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0;
    margin: 0 auto;
    max-width: var(--width-content);
    border-top: 1px solid var(--border-soft);
}

.luna .overview__label,
.luna .overview__value {
    padding: var(--space) var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.luna .overview__label {
    font-weight: var(--font-weight-bold);
    color: var(--heading);
    white-space: nowrap;
}

.luna .overview__value {
    color: var(--body-text);
}

/* -----------------------------------------------------------------------------
   Flow — a horizontal phase pipeline (ORDER -> STORAGE -> SHIPPING). Three
   labelled columns of node cards, joined by a chevron between columns. Themeable
   (no hardcoded colors, no SVG) and stacks vertically on mobile.
   ----------------------------------------------------------------------------- */
.luna .flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: var(--space);
    margin: var(--space-xs) 0;
}

.luna .flow__col {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.luna .flow__label {
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--body-text);
    margin: 0 0 var(--space-xs);
}

.luna .flow__node {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space);
    text-align: center;
    background: var(--surface);
}

.luna .flow__node-kicker {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-2xs);
}

.luna .flow__node-title {
    display: block;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--heading);
}

.luna .flow__arrow {
    align-self: center;
    color: var(--body-text);
    font-size: var(--font-size-xl);
    line-height: 1;
}

/* -----------------------------------------------------------------------------
   Content CTA — the closing "Place Your Order" band that ends every content
   page. Centered, ruled off from the section above.
   ----------------------------------------------------------------------------- */
.luna .content-cta {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-soft);
    text-align: center;
}

.luna .filter-input {
    display: block;
    width: 100%;
    max-width: 40ch;
}

.luna .option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
}

.luna .option-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

.luna .option-card > * {
    margin: 0;
}

.luna .option-card > img {
    display: block;
    height: calc(var(--space) * 2);
    width: auto;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .luna .option-grid {
        grid-template-columns: 1fr;
    }

    .luna .fee-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .luna .overview {
        grid-template-columns: 1fr;
    }

    .luna .overview__label {
        padding-bottom: 0;
        border-bottom: none;
    }

    .luna .flow {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .luna .flow__label {
        margin-top: var(--space);
    }

    .luna .flow__arrow {
        transform: rotate(90deg);
    }
}

/* -----------------------------------------------------------------------------
   Circle step — a numbered walkthrough step: gold SVG number badge beside a
   title, with an optional screenshot below (e.g. a How to Participate section).
   The number badge is inline SVG in the page markup.
   ----------------------------------------------------------------------------- */
.luna .circle-step {
    --badge-size: 1.625rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: var(--font-weight-bold);
    color: var(--heading);
}

.luna .circle-step svg {
    flex-shrink: 0;
    width: var(--badge-size);
    height: var(--badge-size);
}

.luna .circle-step circle {
    fill: var(--accent);
}

.luna .circle-step text {
    fill: var(--on-accent);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
}

.luna .step-image {
    --step-image-width: 32rem;
    display: block;
    max-width: min(100%, var(--step-image-width));
    height: auto;
    margin: var(--space-xs) auto 0;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}
