@charset "UTF-8";

:root {
  --bg: #fff;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --accent: #3c8139;
  --accent-soft: #f2fff1;
  --border-hard: #006600;
  --border: #e5efe5;
  --radius: 6px;
  --container: 1100px;
  --link-color: #2299ff;
  --link-hover-color: #0066cc;
  --link-active-color: #004c99;
  --link-visited-color: #5a7fcc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0px;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  padding-top: 50px;
  overflow-y: scroll;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

main {
  margin: 20px;
}

a { color: var(--link-color); }
a:hover { color: var(--link-hover-color); }
a:active { color: var(--link-active-color); }
a:visited { color: var(--link-visited-color);; }

i[data-lucide] {
  vertical-align: middle;
}


/* ================= ヘッダー ================= */
#site-header {
  padding: 0 20px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

#site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  z-index: -1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 18px;
}

.brand img { height: 30px; }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 4px;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.25s;
}

.primary-nav a:hover::after, a.nowthis::after {
  width: 100%;
}

.nav-toggle { display:none; }

/* ================= トップページヒーロー ================= */
.hero {
  padding: 70px 0 60px;
}

.hero-content h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}

.lead {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-cta .btn {
  margin-right: 12px;
}

.hero-inner { 
  display:grid;
  grid-template-columns:1fr 320px;
  gap:24px;
  align-items:start
}

.status-card {
  margin-top: 50px;
  padding: 30px 26px;
  border-radius: 10px;
  background: var(--border);
}

/* ================= サブページヒーロー ================= */
.page-header {
  background-color: var(--accent-soft); 
  padding: 40px 0 30px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-left: -20px;
  margin-right: -20px;
}

.breadcrumbs {
  font-size: 13px;
  margin-bottom: 15px;
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.breadcrumbs li[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.page-title {
  font-size: 28px;
  margin: 0 0 10px 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
}

.page-lead {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 800px;
}

/* ================= ボタン ================= */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 70%, black);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ================= カード ================= */
.portal-cards {
  padding: 30px 0 70px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 26px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.card h2 {
  margin-top: 0;
  font-size: 20px;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

.card-actions {
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ================= ニュース表示 ================= */
.news-list {
  padding-bottom: 60px;
}

.section-header h2 {
  font-size: 22px;
  margin-bottom: 16px;
}

.news-items {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.news-items li {
  padding: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: center;
}

.news-items li a {
  display: flex;
  width: 100%;
  gap: 20px;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 0;
  align-items: center;
}

.news-items a {
  text-decoration: none;
  color: var(--ink);
}

.news-items a:hover {
  color: var(--accent);
}

.news-items a:hover .title {
  text-decoration: underline;
}

.news-items li a:hover {
  background: rgba(0,0,0,0.03);
  transition: all 0.3s ease;
}

.news-items time {
  width: 100px;
  color: var(--muted);
}

.news-label {
  background-color: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* ラベルの色違い用 */
.news-label.label-update { background-color: #2b6cb0; }

.news-footer {
  display: flex;
}

.link-more {
  margin-left: auto;
}

/* ================= 検索フォーム ================= */
.site-search {
  padding-bottom: 60px;
}

.search-row {
  display: flex;
  max-width: 520px;
}

.search-row input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

.search-row button {
  padding: 12px 18px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}

/* ================= フッター ================= */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--accent);
}

/* ================= ドロワーメニュー ================= */
.menu-button,
.menu-background,
.drawer-only {
  display: none;
}
@media (max-width: 800px) {
  .primary-nav {
    position: fixed;
    top: 0;
    left: auto; /* 左右位置変更①：右ならauto、左なら-100% */ 
    right: -100%; /* 左右位置変更②：右なら-100%、左なら指定なし */ 
    width: 280px;
    max-width: 80%;
    height: 100%;
    background-color: #ffffff;
    transition: right 0.4s ease;  /* 左右位置変更③：left/rightを入れ替え */ 
    z-index: 1001;
    overflow-y: auto;
    padding-top: 40px;
  }
  .menu-checkbox:checked ~ .primary-nav {
    right: 0; /* 左右位置変更④：left/rightを入れ替え */ 
  }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
  }
  .primary-nav a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
  }
  .primary-nav a::after {
    display: none;
  }
  .drawer-only {
    display: block;
    padding: 0 20px;
  }
  .drawer-header {
    margin-bottom: 20px;
    line-height: 1.5;
  }
  .drawer-footer {
    margin-top: 30px;
    padding-bottom: 30px;
    font-size: 12px;
    color: var(--muted);
  }
  .menu-button {
    display: block;
    position: fixed;
    top: 25px; 
    right: 20px; /* 左側に置く場合は left: 20px; に変更 */
    cursor: pointer;
    z-index: 1002;
  }
  .menu-button .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
    transition: 0.4s;
  }
  .menu-checkbox:checked ~ .menu-button .bar:nth-child(1) {
    transform: rotate(45deg) translate(-2px, 3px);
  }
  .menu-checkbox:checked ~ .menu-button .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-checkbox:checked ~ .menu-button .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -13px);
  }
  .menu-background {
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    cursor: pointer;
  }
  .menu-checkbox:checked ~ .menu-background {
    visibility: visible;
    opacity: 1;
  }
}

/* ================= ツール一覧 ================= */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex;
  align-items: flex-start;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tool-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon img,
.tool-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-info {
  flex: 1;
}

.tool-name {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 700;
}

.tool-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ================= 記事本文（article-content） ================= */
.article-content {
  color: #333;
  line-height: 1.8;
}

/* --- 見出し --- */
.article-content h2 {
  font-size: 24px;
  color: var(--ink);
  padding-bottom: 10px;
  margin: 40px 0 20px;
  border-bottom: 2px solid var(--accent);
}

.article-content h3 {
  font-size: 20px;
  color: var(--ink);
  padding: 25px 0 10px;
  border-bottom: 1px dashed var(--border-hard);
  padding-bottom: 5px;
}

.article-content h4 {
  font-size: 16px;
  padding: 2px 5px;
  color: var(--ink);
  background-color: var(--accent-soft);
}

/* --- 段落（本文） --- */
.article-content p {
  margin: 0 0 1em;
  font-size: 16px;
}

/* --- 強調 --- */
.article-content strong {
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
}

/* --- リスト --- */
.article-content li {
  margin-bottom: 0.5em;
}
.article-content li:last-child {
  margin-bottom: 0;
}

/* --- 表テーブル --- */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius);    /* 角丸 */
  background-color: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 15px;
}

.table th,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  line-height: 1.5;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table th:last-child,
.table td:last-child {
  border-right: none;
}

.table thead tr {
  border-bottom: 2px solid var(--border);
}

.table th {
  background-color: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}
.table tbody tr:hover {
  background-color: #fafafa;
}

/* セレクトボックス */
.select-box {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 40px 10px 12px;
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233c8139' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select-box:focus {
  outline: none;
  border-color: var(--border-hard);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select-box:hover {
  border-color: var(--border-hard);
}

 /* ログインフォーム */
.login-box { max-width: 400px; }
.login-box .error { color: red; margin-bottom: 10px; }
.login-box input { width: 100%; margin-bottom: 10px; padding: 8px; box-sizing: border-box; }
.login-box .btn-submit { background: #007bff; color: white; border: none; padding: 10px; cursor: pointer; width: 100%; }

/* ================= レスポンシブ ================= */
@media (max-width:1000px) {
  .cards-grid { grid-template-columns:repeat(2,1fr); }
  .hero-inner { grid-template-columns:1fr 280px; }
}

@media (max-width: 800px) {
  .cards-grid { grid-template-columns: 1fr; gap: 12px; }
  .portal-cards { padding: 0 0 70px; }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; gap:12px; text-align:center; }
  .hero-inner { grid-template-columns:1fr; }
  .page-header { margin-right: 0; margin-left: 0; padding: 30px 0 20px; margin-bottom: 30px; }
  .page-title { font-size: 22px; }
  .hero-cta .btn { margin: 8px 12px; }
  .status-card { margin: 0; }
  main { margin: 28px 0; }
  .breadcrumbs { padding: 0 8px; }
  .page-title, .page-lead { padding: 0 12px; }
  .article-content h2 { font-size: 20px; }
  .article-content h3 { font-size: 18px; }
  .article-content h4 { font-size: 15px; }
  .article-content p { margin: 0 0 0.6em; font-size: 15px; }
}