:root {
  color-scheme: light;
  --background: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #d9dee7;
  --ink: #18202b;
  --muted: #667085;
  --accent: #2459a9;
  --accent-dark: #194584;
  --danger: #a12626;
  --active: #176b43;
  --paused: #8a5a11;
  --closed: #596273;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--background);
  line-height: 1.6;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

.landing {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.landing__content {
  width: min(38rem, 100%);
}

.landing h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 7vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.landing p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.25;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.private-badge {
  flex: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.summary-card,
.panel {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
}

.summary-card {
  padding: 1rem;
}

.summary-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-card__value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.2;
}

.panel {
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.panel__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel__body {
  padding: 1.1rem;
}

.empty {
  margin: 0;
  padding: 2.5rem 1rem;
  color: var(--muted);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.site-name {
  min-width: 10rem;
  font-weight: 700;
}

.site-url {
  display: block;
  max-width: 25rem;
  overflow-wrap: anywhere;
}

.notes {
  min-width: 14rem;
  max-width: 28rem;
  color: var(--muted);
  white-space: pre-wrap;
}

.status {
  display: inline-block;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  color: white;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.45;
}

.status--active {
  background: var(--active);
}

.status--paused {
  background: var(--paused);
}

.status--closed {
  background: var(--closed);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid #aeb7c6;
  border-radius: 0.45rem;
  color: var(--ink);
  background: white;
  padding: 0.62rem 0.7rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(36 89 169 / 16%);
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  color: white;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  color: white;
  background: var(--accent-dark);
}

.button--secondary {
  border-color: var(--border);
  color: var(--ink);
  background: var(--surface);
}

.button--secondary:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.errors {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem 0.8rem 2rem;
  border: 1px solid #e5b7b7;
  border-radius: 0.45rem;
  color: var(--danger);
  background: #fff5f5;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
}

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

@media (max-width: 720px) {
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .private-badge {
    align-self: flex-start;
  }
}

