:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18201d;
  background: #f5f7f6;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f5f7f6; }
a { color: inherit; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }

.site-header {
  min-height: 68px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid #dce3df;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.admin-link { color: #17654a; font-weight: 650; text-decoration: none; }
.admin-link:hover { text-decoration: underline; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  padding: 72px max(5vw, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  color: #ffffff;
  background-color: #111714;
  background-image: url('/assets/yunsu-logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: rgba(10, 15, 13, .82);
}
.hero-copy { max-width: 610px; }
.hero h1, .admin-heading h1 { margin: 6px 0 12px; font-size: 46px; line-height: 1.08; letter-spacing: 0; }
.hero p:not(.eyebrow) { max-width: 520px; color: #cbd6d0; font-size: 18px; line-height: 1.7; }
.eyebrow { margin: 0; color: #2e8b68; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.release-section, .tool-section, .admin-heading, .admin-main > .status-line {
  width: min(1180px, 90vw);
  margin-left: auto;
  margin-right: auto;
}
.release-section, .tool-section { padding: 54px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 5px 0 0; font-size: 25px; }
.status-line { min-height: 24px; margin-top: 18px; color: #58645f; }

.release-list { margin-top: 18px; border-top: 1px solid #ccd6d1; }
.release-row {
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, .8fr) minmax(280px, 2fr) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #ccd6d1;
}
.release-row h3 { margin: 0 0 7px; font-size: 19px; }
.release-row p { margin: 4px 0; color: #65716b; }
.hash { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.download-button, button {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #17654a;
  border-radius: 6px;
  background: #17654a;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.secondary-button { background: #ffffff; color: #17654a; }
button:disabled, .download-button.disabled { opacity: .48; cursor: not-allowed; }
.integrity-band { padding: 44px 5vw; color: #e8efeb; background: #26322d; }
.integrity-band h2, .integrity-band p { width: min(1180px, 90vw); margin-left: auto; margin-right: auto; }
.integrity-band h2 { margin-bottom: 8px; }
.integrity-band p { color: #bac8c1; }
footer { padding: 28px 5vw; color: #6b7771; text-align: center; background: #ffffff; }

.admin-main { padding-bottom: 50px; }
.admin-heading { padding: 44px 0 28px; display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.admin-heading h1 { margin-bottom: 0; font-size: 34px; }
.auth-row { display: grid; grid-template-columns: auto minmax(220px, 320px) auto; align-items: center; gap: 10px; }
.auth-row label { color: #59655f; font-size: 13px; font-weight: 700; }
input, textarea {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #bdc9c3;
  border-radius: 5px;
  background: #ffffff;
  color: #18201d;
  outline: none;
}
input:focus, textarea:focus { border-color: #17654a; box-shadow: 0 0 0 3px rgba(23, 101, 74, .12); }
.tool-section { border-top: 1px solid #ccd6d1; }
.batch-form { margin-top: 24px; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; gap: 14px; align-items: end; }
.batch-form label { display: grid; gap: 7px; color: #59655f; font-size: 13px; font-weight: 700; }
.batch-result { margin-top: 24px; }
.result-toolbar { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.batch-result textarea { width: 100%; height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid #ccd6d1; background: #ffffff; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e0e6e3; text-align: left; vertical-align: middle; }
th { background: #edf2ef; color: #526059; font-size: 12px; }
td { font-size: 13px; }
.row-actions { display: flex; gap: 8px; }
.row-actions button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.danger-button { border-color: #a43d3d; background: #ffffff; color: #a43d3d; }
.state { font-weight: 700; }
.state.active { color: #17654a; }
.state.revoked { color: #a43d3d; }
dialog { width: min(620px, 90vw); padding: 0; border: 1px solid #b9c5bf; border-radius: 8px; box-shadow: 0 24px 80px rgba(21, 31, 26, .28); }
dialog::backdrop { background: rgba(17, 23, 20, .56); }
.dialog-heading { padding: 18px 20px; display: flex; justify-content: space-between; border-bottom: 1px solid #d8e0dc; }
.dialog-heading h2 { margin: 0; font-size: 20px; }
.icon-button { width: 34px; min-height: 34px; padding: 0; border-color: transparent; background: transparent; color: #303b36; font-size: 24px; }
.device-list { max-height: 420px; overflow: auto; padding: 14px 20px 20px; }
.device-row { padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 16px; border-bottom: 1px solid #e0e6e3; }
.device-row p { margin: 3px 0; color: #65716b; font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .site-header { padding: 0 20px; }
  .hero { min-height: 430px; padding: 54px 24px; align-items: center; background-position: center; background-size: cover; }
  .hero h1 { font-size: 38px; }
  .release-row { padding: 20px 0; grid-template-columns: 1fr; gap: 10px; }
  .release-row .download-button { width: 100%; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .auth-row { grid-template-columns: 1fr; }
  .batch-form { grid-template-columns: 1fr 1fr; }
  .batch-form button { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .brand span { display: none; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .batch-form { grid-template-columns: 1fr; }
}
