:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f4;
  --text: #222222;
  --muted: #5f6368;
  --line: #e3e3de;
  --accent: #2b3a67;
  --accent-dark: #1f2b4f;
  --accent-tint: #eceff7;
  --danger: #a12a2a;
  --radius: 2px;
  --container: 1100px;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Noto Sans", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #7a8cc7; outline-offset: 2px; }

h1, h2, h3 { line-height: 1.35; font-weight: 500; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: .01em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.05rem; color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

/* Section label pill (small outlined tag above each heading) */
.pill {
  display: inline-block; padding: .15rem .9rem; margin-bottom: 1rem; font-size: .85rem;
  color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent); border-radius: 24px;
}

/* Buttons */
.btn {
  display: inline-block; padding: .75rem 1.8rem; border: 1px solid var(--accent); border-radius: var(--radius);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--accent); border-color: #fff; }
.btn-light:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-small { padding: .35rem 1rem; font-size: .9rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--text); font-size: .9rem; white-space: nowrap; }
.site-nav a:hover { color: var(--accent); }
.site-nav .btn-outline { color: var(--accent); }
.site-nav .btn-outline:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { list-style: none; display: flex; align-items: center; gap: 4px !important; margin: 0; padding: 0; }
.lang-switch a { padding: .2rem .5rem; border: 1px solid transparent; font-size: .85rem; }
.lang-switch a[aria-current] { border-color: var(--line); background: var(--bg-alt); font-weight: 700; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); padding: 10px; border-radius: var(--radius); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--text); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Hero: full-width image with the name, tagline and one button on top */
.hero { position: relative; background: var(--accent); color: #fff; }
.hero-img { width: 100%; height: clamp(380px, 52vw, 640px); object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(31, 43, 79, .72), rgba(31, 43, 79, .15)); }
.hero-name { font-size: .95rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: .6rem; opacity: .9; }
.hero h1 { max-width: 640px; margin-bottom: 1.6rem; }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 1rem; }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 48px 0 0; }
.figure { border-top: 2px solid var(--accent); padding-top: 12px; }
.figure dt { font-size: 1.9rem; font-weight: 500; color: var(--accent); line-height: 1.2; }
.figure dd { margin: 0; color: var(--muted); font-size: .9rem; }

/* Product cards: image first, name and one line below, no borders */
.card-list { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card-img { width: 100%; aspect-ratio: 20 / 13; object-fit: cover; border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.card h3 { margin-bottom: .2em; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

.partner-row { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.partner-row li { border: 1px solid var(--line); padding: 8px 12px; background: var(--bg); }
.partner-row img { width: 140px; height: auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 4px; }
.req { color: var(--muted); font-weight: 400; font-size: .8rem; }
.hint { color: var(--muted); font-size: .85rem; margin: -6px 0 18px; }
.field input, .field textarea {
  width: 100%; padding: .65rem .75rem; font: inherit; color: inherit; background: #fff;
  border: 1px solid #b9b9b2; border-radius: var(--radius);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { border: 1px solid var(--danger); border-left-width: 4px; background: #fdf4f4; padding: 14px 18px; margin-bottom: 24px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.contact-list { margin: 0 0 24px; display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; }
.contact-list dt { color: var(--muted); font-size: .9rem; }
.contact-list dd { margin: 0; }
.map iframe { width: 100%; height: 280px; border: 1px solid var(--line); }

/* Footer: slim bar */
.site-footer { border-top: 1px solid var(--line); padding-top: 32px; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-contact { color: var(--muted); }
.footer-bottom { margin-top: 24px; padding-top: 14px; padding-bottom: 24px; color: var(--muted); }

/* Thank-you and error pages */
.page-simple { padding: 120px 0; }

/* Responsive */
@media (max-width: 960px) {
  .card-list { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 16px 20px 24px; flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 12px; }
  .header-actions { flex-wrap: wrap; }
  .section { padding: 64px 0; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .hero-overlay { background: rgba(31, 43, 79, .55); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
  .card-list, .form-grid { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; gap: 2px; }
  .contact-list dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Login, portal and tables */
.form-narrow { max-width: 460px; margin: 0 auto; }
.portal-main { padding: 48px 0 80px; min-height: 70vh; }
.field select {
  width: 100%; padding: .65rem .75rem; font: inherit; color: inherit; background: #fff;
  border: 1px solid #b9b9b2; border-radius: var(--radius);
}
.field select:focus { border-color: var(--accent); }
.notice { border: 1px solid #9fb3e0; border-left-width: 4px; background: var(--accent-tint); padding: 14px 18px; margin: 0 0 24px; }
.notice p { margin: 6px 0 0; }
.temp-pass { font-size: 1.1rem; background: #fff; border: 1px solid var(--line); padding: 2px 8px; user-select: all; }
.inline-form { display: inline; margin: 0; }
.panel { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; }
.table-wrap { overflow-x: auto; margin-top: 24px; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-weight: 500; color: var(--muted); font-size: .85rem; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .inline-form + .inline-form { margin-left: 6px; }
.badge { display: inline-block; padding: 0 .6rem; border-radius: 12px; font-size: .8rem; border: 1px solid var(--line); }
.badge-ok { background: #eef6ee; border-color: #b9d6b9; color: #2d5a2d; }
.badge-off { background: #f3f3f1; color: var(--muted); }
.plain-list { list-style: none; margin: 0; padding: 0; }

/* Portal navigation bar, page headers, toolbars, tabs */
.portal-nav { border-top: 1px solid var(--line); background: var(--bg-alt); }
.portal-nav ul { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0 20px; overflow-x: auto; white-space: nowrap; }
.portal-nav a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: .93rem; border-bottom: 2px solid transparent; }
.portal-nav a:hover { color: var(--accent); }
.portal-nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.page-head h1 { margin: 0; font-size: 1.8rem; }
.small-title { font-size: 1.1rem; margin-top: 32px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 8px; }
.toolbar input[type="search"], .toolbar select { padding: .45rem .7rem; font: inherit; border: 1px solid #b9b9b2; border-radius: var(--radius); background: #fff; min-width: 200px; }
.tabs { display: flex; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.tabs a { display: block; padding: 6px 16px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--text); font-size: .9rem; }
.tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tiles { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile { display: block; padding: 22px 20px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--text); font-weight: 500; }
.tile:hover { border-color: var(--accent); color: var(--accent); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.num.neg { color: var(--danger); }
.num.pos { color: #2d5a2d; }
.badge-warn { background: #fff6e5; border-color: #ecd09a; color: #7a5200; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-size: .93rem; }
.check input { margin-top: 5px; }
.perm-box { border: 1px solid var(--line); padding: 16px 20px 8px; margin: 8px 0 20px; }
.perm-box legend { padding: 0 8px; font-weight: 500; }
.perm-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; }
.perm-group h3 { font-size: .85rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 4px; }
.perm-none { display: none; }
.perm-box.no-perms .perm-groups { display: none; }
.perm-box.no-perms .perm-none { display: block; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@media (max-width: 820px) { .perm-groups { grid-template-columns: 1fr; } }

/* Landing: services and company facts */
.hero-text { max-width: 620px; margin: 0 0 1.6rem; font-size: 1.05rem; opacity: .95; }
.service-list { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: none; }
.service { border-top: 2px solid var(--accent); padding-top: 14px; }
.service-no { display: block; font-size: 1.9rem; font-weight: 500; color: var(--accent); line-height: 1.2; margin-bottom: .3em; }
.service h3 { margin-bottom: .4em; }
.service p { color: var(--muted); font-size: .93rem; margin: 0; }
.company-facts { display: grid; grid-template-columns: minmax(120px, 1fr) 3fr; gap: 0; margin: 36px 0 0; border-top: 1px solid var(--line); }
.company-facts dt, .company-facts dd { margin: 0; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.company-facts dt { color: var(--muted); font-size: .9rem; }
@media (max-width: 960px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-list { grid-template-columns: 1fr; } .company-facts { grid-template-columns: 1fr; } .company-facts dt { border-bottom: 0; padding-bottom: 0; } }
.site-header .container { max-width: 1280px; }
.brand { flex-shrink: 0; }
.lang-switch a { white-space: nowrap; }
h1, h2, h3 { text-wrap: balance; }
:lang(ja) { word-break: auto-phrase; line-break: strict; }

/* Company logo (transparent PNG, drawn at 2x for sharp screens) */
.logo { display: block; height: 48px; width: auto; }
.site-footer .logo { height: 44px; }
