@charset "utf-8";

:root {
    --color-accent: var(--td-colors-accent, #2563eb);
    --color-accent-dark: var(--td-colors-accent-dark, #1746a2);
    --color-on-accent: #ffffff;
    --color-text: #182230;
    --color-muted: #5f6c7b;
    --color-border: #dce3ea;
    --color-surface: #ffffff;
    --color-surface-soft: #f5f8fb;

    /* The brand teal splits by job. #17aabd reaches only 2.79:1 against white,
       so it stays on surfaces that carry no text of their own — figures, fills
       behind dark text, decorative rules. Anything that has to be *read*
       (labels, links, button fills under white text) uses --color-brand-ink at
       4.92:1, which clears WCAG AA without leaving the hue. */
    --color-brand: #17aabd;
    --color-brand-ink: #0e7c8a;
    --color-brand-ink-dark: #0b6b76;
    --color-brand-soft: #e9f9fb;

    --shadow-card: 0 12px 36px rgba(24, 34, 48, 0.08);
    --content-width: 1120px;
    /* Reading measure for article bodies: ~44 Japanese characters at 1.7rem. */
    --measure: 76rem;
}

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: "Noto Sans JP", system-ui, sans-serif;
    font-size: 1.6rem;
    line-height: 1.75;
}

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

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 1rem 1.5rem;
    transform: translateY(-180%);
    border-radius: 0.6rem;
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
}

/* The amber ring only reached 2.0:1 against white, below the 3:1 that WCAG
   asks of a focus indicator. Near-black clears it against the page (16:1) and
   against the teal button fills it lands on (6.1:1), so one ring works
   everywhere on this light site. */
:focus-visible {
    outline: 3px solid #101828;
    outline-offset: 3px;
}

.site-main {
    min-height: 60vh;
    margin-top: 72px;
}

.home .site-main {
    margin-top: 120px;
}

.commonHeader__logo a,
.commonFooter__logo a {
    display: inline-block;
}

.commonFooter__isms img {
    margin-right: auto;
    margin-left: auto;
}

.commonHeader__nav .sub-menu {
    display: none;
}

.commonHeader .menuTrigger {
    width: 44px;
    height: 44px;
    padding: 12px;
    border: 0;
    background: transparent;
}

.commonHeader .menuTrigger > span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #333;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.commonHeader .menuTrigger > span:nth-child(1) {
    transform: translateY(-6px);
}

.commonHeader .menuTrigger > span:nth-child(3) {
    transform: translateY(6px);
}

.commonHeader .menuTrigger[aria-expanded="true"] > span:nth-child(1) {
    transform: rotate(45deg);
}

.commonHeader .menuTrigger[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
}

.commonHeader .menuTrigger[aria-expanded="true"] > span:nth-child(3) {
    transform: rotate(-45deg);
}

.commonHeader__nav.is-open {
    display: block;
}

.footer-extra:empty,
.home-slot:empty,
.slot-before-content:empty,
.slot-after-content:empty {
    display: none;
}

.footer-extra {
    width: min(var(--content-width), calc(100% - 4rem));
    margin: 0 auto 3rem;
}

.content-container,
.archive-container {
    width: min(var(--content-width), calc(100% - 4rem));
    margin: 0 auto;
    padding: 4.8rem 0 8rem;
}

.content-container {
    max-width: var(--measure);
}

.breadcrumbs {
    margin-bottom: 3.2rem;
    color: var(--color-muted);
    font-size: 1.3rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
    margin-left: 0.6rem;
    content: "/";
    color: #98a2b3;
}

/* inline-block + vertical padding lifts the hit area past the 24px WCAG 2.5.8
   floor without changing where the trail sits. */
.breadcrumbs a {
    display: inline-block;
    padding: 0.4rem 0;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.entry__header {
    margin-bottom: 3.2rem;
}

.entry__header h1,
.archive-header h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(3rem, 5vw, 5.2rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* The category used to sit above the h1 as a pill. The breadcrumb one line
   higher already names it, so it now rides in the meta row as an ordinary
   link — same destination, no second badge competing with the title. */
.entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin-top: 1.6rem;
    color: var(--color-muted);
    font-size: 1.3rem;
}

.entry__category {
    color: var(--color-brand-ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* The view model hands over a URL with no intrinsic size, so the box is
   reserved here instead: without it the hero pushes the whole article down the
   moment it decodes. */
.entry__hero {
    width: 100%;
    max-height: 560px;
    margin-bottom: 4rem;
    aspect-ratio: 16 / 9;
    border-radius: 1.6rem;
    background: var(--color-surface-soft);
    object-fit: cover;
}

.entry-content {
    color: #263444;
    font-size: 1.7rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #101828;
    line-height: 1.45;
}

/* Hierarchy comes from size, weight and the space above each heading — not
   from a tinted block with a coloured bar down one side. The space above a
   heading is deliberately much larger than the space below it, so a heading
   binds to the section it opens. */
.entry-content h2 {
    margin: 6.4rem 0 1.6rem;
    font-size: clamp(2.6rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.entry-content h3 {
    margin: 4.8rem 0 1.2rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.entry-content h4 {
    margin: 3.2rem 0 1rem;
    color: #344054;
    font-size: 1.9rem;
    font-weight: 700;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table,
.entry-content figure,
.entry-content pre {
    margin: 0 0 2.4rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.6em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li + li {
    margin-top: 0.7rem;
}

.entry-content a {
    color: #076fbd;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.entry-content blockquote {
    padding: 1.6rem 2rem;
    border-radius: 0.8rem;
    background: var(--color-surface-soft);
    color: #475467;
}

.entry-content img {
    margin-right: auto;
    margin-left: auto;
    border-radius: 1rem;
}

.entry-content figure {
    max-width: 100%;
}

.entry-content figcaption {
    margin-top: 0.8rem;
    color: var(--color-muted);
    font-size: 1.3rem;
    text-align: center;
}

.entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    min-width: 12rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

.entry-content th {
    background: var(--color-surface-soft);
}

.entry-content pre {
    padding: 1.8rem;
    overflow-x: auto;
    border-radius: 1rem;
    background: #101828;
    color: #f8fafc;
}

.entry-content :not(pre) > code {
    padding: 0.15em 0.35em;
    border-radius: 0.4rem;
    background: #eef2f6;
}

.entry__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 4rem 0 0;
    padding: 0;
    list-style: none;
}

.entry__tags a {
    display: inline-flex;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    font-size: 1.3rem;
}

.archive-header {
    margin-bottom: 4rem;
    padding-bottom: 2.4rem;
    border-bottom: 1px solid var(--color-border);
}

.archive-header > p:last-child {
    max-width: 72rem;
    margin: 1.4rem 0 0;
    color: var(--color-muted);
}

.post-grid,
.home-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.post-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 1.4rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.post-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef2f6;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__media img {
    transform: scale(1.03);
}

.post-card__body {
    padding: 2rem;
}

.post-card__category {
    margin: 0 0 0.8rem;
    color: var(--color-brand-ink);
    font-size: 1.2rem;
    font-weight: 700;
}

.post-card__title {
    margin: 0;
    font-size: 1.9rem;
    line-height: 1.55;
}

.post-card__title a:hover {
    color: var(--color-accent);
}

.post-card__date {
    display: block;
    margin-top: 1rem;
    color: var(--color-muted);
    font-size: 1.2rem;
}

.post-card__excerpt {
    display: -webkit-box;
    margin: 1.2rem 0 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 1.4rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    margin-top: 5.6rem;
}

.pagination__numbers {
    display: flex;
    gap: 0.6rem;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 4rem;
    min-height: 4rem;
    padding: 0.6rem 1rem;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 0.6rem;
}

.pagination span[aria-current="page"] {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-on-accent);
}

.button,
.td-form-submit,
.td-social-share a,
.td-social-share-copy,
.td-social-follow a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.8rem;
    padding: 1rem 2rem;
    border: 1px solid var(--color-accent);
    border-radius: 0.8rem;
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover,
.td-form-submit:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.button--secondary {
    background: transparent;
    color: var(--color-accent);
}

.empty-state {
    padding: 4rem;
    border-radius: 1.2rem;
    background: var(--color-surface-soft);
    text-align: center;
}

.error-page {
    width: min(720px, calc(100% - 4rem));
    margin: 0 auto;
    padding: 10rem 0;
    text-align: center;
}

.error-page__code {
    margin: 0;
    color: var(--color-brand-ink);
    font-family: "Oswald", sans-serif;
    font-size: 8rem;
    font-weight: 600;
    line-height: 1;
}

.error-page h1 {
    margin: 2rem 0 1rem;
    font-size: 3.2rem;
}

.error-page__actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 3rem;
}

.search-form,
.td-form {
    display: grid;
    gap: 1.2rem;
}

.search-form input,
.td-form input,
.td-form textarea,
.td-form select {
    width: 100%;
    min-height: 4.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 0.6rem;
    background: var(--color-surface);
}

.td-form-success,
.td-form-thanks {
    padding: 1.6rem;
    border-radius: 0.8rem;
    background: #ecfdf3;
    color: #027a48;
}

.td-form-error {
    color: #b42318;
}

/* The submit wrapper carries the button styling (shared with .button), so the
   real <button> inside it has to stay transparent and fill the pill. */
.td-form-submit button {
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    /* Inherits size and weight from the wrapper so per-page overrides on
       .td-form-submit reach the visible text. */
    font: inherit;
    cursor: pointer;
}

/* The site-specific lead form always uses the readable brand teal, even when
   the generic theme accent remains operator-configurable. */
.td-form-wrap--lead .td-form-submit {
    border-color: var(--color-brand-ink);
    background: var(--color-brand-ink);
}

.td-form-wrap--lead .td-form-submit:hover {
    border-color: var(--color-brand-ink-dark);
    background: var(--color-brand-ink-dark);
}

.td-form-field {
    display: grid;
    gap: 0.6rem;
}

.td-form-field label,
.td-form-fieldset legend {
    font-size: 1.4rem;
    font-weight: 700;
}

.td-form-required {
    margin-right: 0.4rem;
    color: #e53e3e;
}

.td-form-note {
    color: var(--color-muted);
    font-size: 1.2rem;
    line-height: 1.6;
}

.td-form-field-error {
    color: #b42318;
    font-size: 1.3rem;
}

.td-form-field--invalid input,
.td-form-field--invalid textarea {
    border-color: #b42318;
}

.td-form-fieldset {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.td-form-options {
    display: grid;
    gap: 0.4rem;
}

.td-form-options label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 400;
}

.td-form-options input {
    width: auto;
    min-height: 0;
}

.td-form-heading {
    font-size: 1.8rem;
    font-weight: 700;
}

.td-form-consent {
    color: var(--color-muted);
    font-size: 1.3rem;
    text-align: center;
}

/* Wrapper emitted by the irusiru-lead plugin's component. On /corporate the
   theme's own .corporate-lead-form supplies the card, so the wrapper only has
   to hold the form together where nothing else does — /business-contact places
   the component straight into the page body. */
.td-form-wrap {
    display: grid;
    gap: 1.6rem;
}

.td-form-wrap--lead {
    max-width: 64rem;
    margin-inline: auto;
    padding: 2.4rem;
    border: 1px solid var(--color-border);
    border-radius: 1.2rem;
    background: var(--color-surface);
}

.corporate-lead-form .td-form-wrap--lead {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.td-form-field--captcha {
    justify-items: center;
}

@media (max-width: 767px) {
    .td-form-wrap--lead {
        padding: 1.6rem;
    }
}

.related-posts {
    margin-top: 5.6rem;
    padding-top: 3.2rem;
    border-top: 1px solid var(--color-border);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.home-slot {
    width: min(var(--content-width), calc(100% - 4rem));
    margin: 4rem auto;
}

.home-articles__grid {
    width: min(var(--content-width), calc(100% - 4rem));
    margin: 0 auto;
    text-align: left;
}

.home-articles__links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 4rem;
}

.home-articles__links .button {
    border-color: var(--color-brand-ink);
    background: var(--color-brand-ink);
}

.home-articles__links .button:hover {
    background: var(--color-brand-ink-dark);
}

.home-articles__links .button--secondary {
    background: #ffffff;
    color: var(--color-brand-ink);
}

.page-personal .about__img img,
.page-personal .plan__mark {
    margin-right: auto;
    margin-left: auto;
}

.page-personal .plan__mark {
    display: inline-block;
    vertical-align: middle;
}

.page-personal .plan__mark--ok {
    width: 2.667rem;
}

.page-personal .plan__mark--ng {
    width: 1.867rem;
}

.page-personal .howto__video iframe {
    border: 0;
}

.page-personal .qa__content dt {
    margin: 0;
}

.page-personal .qa .trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.page-personal .qa .trigger .trigger__btn {
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.page-personal .qa .trigger .trigger__btn::before,
.page-personal .qa .trigger .trigger__btn::after {
    position: absolute;
    top: 6px;
    left: 0;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: #333;
    content: "";
    transition: transform 0.2s ease;
}

.page-personal .qa .trigger .trigger__btn::after {
    transform: rotate(90deg);
}

.page-personal .qa .trigger[aria-expanded="true"] .trigger__btn::after {
    transform: rotate(0);
}

.page-personal .qa__content dd.hidden:not([hidden]) {
    display: block;
}

.page-personal .qa .hidden[hidden] {
    display: none;
}

@media (max-width: 1120px) {
    .commonHeader__nav .sub-menu {
        display: block;
    }

    .commonHeader__nav {
        overflow-y: auto;
        padding: 6rem 2rem 3rem;
    }

    .commonHeader__nav ul {
        height: auto;
        min-height: 100%;
    }

    .commonFooter__nav__layout .commonFooter__nav:last-of-type {
        margin-left: 3rem;
    }
}

@media (max-width: 860px) {
    .post-grid,
    .home-articles__grid,
    .related-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    /* 4rem keeps 20px of gutter on each side of a 390px phone. The old 2.8rem
       left body text 14px from the bezel, which is where the detector's
       viewport-edge findings were coming from. */
    .content-container,
    .archive-container {
        width: min(100% - 4rem, var(--content-width));
        padding: 3.2rem 0 6rem;
    }

    .entry__header h1,
    .archive-header h1 {
        font-size: 3rem;
    }

    .entry-content {
        font-size: 1.6rem;
    }

    .entry-content h2 {
        margin-top: 4.8rem;
        font-size: 2.4rem;
    }

    .entry-content h3 {
        margin-top: 3.6rem;
        font-size: 2rem;
    }

    .post-grid,
    .home-articles__grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .commonFooter__nav__layout {
        align-items: flex-start;
        justify-content: flex-start;
        gap: 2.4rem;
    }

    .commonFooter__nav__layout .commonFooter__nav:last-of-type {
        margin-left: 0;
    }

    .commonFooter__isms img {
        width: min(260px, 80vw);
    }

    .error-page__actions,
    .home-articles__links {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Movement goes, feedback stays. Every transform in this theme is decorative
   (card zoom, button lift, smooth scroll), so those are cancelled outright —
   but colour and opacity transitions are how hover and focus announce
   themselves, and blanket-killing them to 0.01ms would remove information
   rather than motion. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }

    .post-card:hover .post-card__media img,
    .button:hover,
    .td-form-submit:hover,
    .article-cta__button:hover,
    .td-cta-button:hover,
    .commonHeader__nav ul li.commonHeader__btn a:hover {
        transform: none;
    }
}
