/* agent-logs portal — inherits SDS brand system */

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

:root {
  --black: #000000;
  --white: #FFFFFF;
  --blue: #2C40D3;
  --light-blue: #BFE2FE;
  --dark-grey: #5A5A5A;
  --body-size: 17px;
  --body-leading: 20px;
  --h3-size: 34px;
  --h2-size: 48px;
  --h1-size: 68px;
  --header-tracking: -0.05em;
  --header-leading: 0.9;
  --max-width: 960px;
  --gutter: 24px;
}

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

body {
  font-family: 'Finder', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:lang(ja) {
  font-family: 'Now Gothic GB', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: var(--header-tracking);
}

h1 {
  font-size: var(--h1-size);
  line-height: calc(var(--h1-size) * var(--header-leading));
  margin-bottom: 24px;
}

h2 {
  font-size: var(--h2-size);
  line-height: calc(var(--h2-size) * var(--header-leading));
  margin-bottom: 20px;
}

h3 {
  font-size: var(--h3-size);
  line-height: calc(var(--h3-size) * var(--header-leading));
  margin-bottom: 16px;
}

p { margin-bottom: 1em; }

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

strong { font-weight: 700; }

/* ── Layout ── */

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

/* ── Header ── */

.site-header {
  background: var(--black);
  color: var(--white);
  padding: 20px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  height: 40px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-header nav a {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-header nav a:hover {
  opacity: 0.7;
  text-decoration: none;
}

/* ── Hero ── */

.hero {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 60px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, var(--h1-size));
  line-height: 1;
  margin-bottom: 16px;
}

.hero .subtitle {
  font-size: 20px;
  line-height: 28px;
  opacity: 0.8;
  max-width: 600px;
}

/* ── Sections ── */

.section {
  padding: 48px 0;
}

.section + .section {
  border-top: 1px solid #E0E0E0;
}

/* ── Status dashboard ── */

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.status-card {
  border: 1px solid #E0E0E0;
  padding: 24px;
}

.status-card .label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark-grey);
  margin-bottom: 8px;
}

.status-card .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: var(--header-tracking);
}

.status-card .value.ok { color: #2E7D32; }
.status-card .value.warn { color: #E65100; }
.status-card .value.off { color: var(--dark-grey); }

/* ── Project table ── */

.project-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.project-table th,
.project-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #E0E0E0;
  vertical-align: top;
}

.project-table th {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark-grey);
  background: #F8F8F8;
}

.project-table .status {
  display: inline-block;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
}

.project-table .status.shared {
  background: #E8F5E9;
  color: #2E7D32;
}

.project-table .status.withdrawn {
  background: #FFF3E0;
  color: #E65100;
}

/* ── Info box ── */

.info-box {
  background: var(--light-blue);
  padding: 20px 24px;
  margin: 20px 0;
}

.info-box.warning {
  background: #FFF3E0;
}

/* ── Code block ── */

.code-block {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 24px;
  margin: 20px 0;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.code-block .comment { color: #6a6a8a; }
.code-block .command { color: #BFE2FE; }
.code-block .output { color: #7a7a9a; }
.code-block .success { color: #66bb6a; }

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; text-decoration: none; }

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-danger {
  background: transparent;
  color: #C62828;
  border: 1px solid #C62828;
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid #E0E0E0;
}

/* ── Auth ── */

.auth-bar {
  font-size: 14px;
}

.auth-bar .user-name {
  font-weight: 700;
}

.login-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ── Steps ── */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  padding: 16px 0 16px 48px;
  position: relative;
  border-bottom: 1px solid #E0E0E0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 16px;
  width: 32px;
  height: 32px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps .code-block {
  margin: 12px 0 0;
}

.steps p {
  margin-bottom: 0;
}

/* ── Footer ── */

.site-footer {
  margin-top: auto;
  background: var(--black);
  color: var(--white);
  padding: 32px 0;
  font-size: 14px;
}

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

.site-footer a {
  color: var(--white);
  opacity: 0.6;
}
.site-footer a:hover { opacity: 1; }

/* ── Responsive ── */

@media (max-width: 900px) {
  :root {
    --h1-size: 40px;
    --h2-size: 32px;
    --h3-size: 24px;
  }

  .hero { padding: 48px 0 36px; }

  .site-header .logo {
    height: 32px;
  }

  .status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .project-table {
    font-size: 14px;
  }
}
