@charset "UTF-8";

:root {
  --ns-blue: #6f8da9;
  --ns-blue-dark: #405d78;
  --ns-line: #b8c7d5;
  --ns-pale: #edf2f6;
  --ns-row: #f4f6f8;
  --ns-text: #202a34;
  --ns-muted: #617283;
  --ns-white: #fff;
  --ns-shadow: 0 8px 24px rgba(35, 56, 75, .10);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 28px 18px 76px;
  color: var(--ns-text);
  background:
    linear-gradient(90deg, rgba(111,141,169,.08) 0, rgba(111,141,169,.08) 1px, transparent 1px, transparent 100%),
    #f7f9fb;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px;
}

.site-header {
  width: min(100%, 960px);
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
  background: var(--ns-white);
  border: 1px solid var(--ns-line);
  border-top: 4px solid var(--ns-blue);
  box-shadow: var(--ns-shadow);
}

.brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 112px;
  min-height: 66px;
  padding-right: 20px;
  border-right: 1px solid #dce4eb;
}

.brand img { display: block; width: 92px; max-height: 58px; object-fit: contain; }

.heading { min-width: 0; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--ns-blue-dark);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.4px;
}
h1 {
  margin: 0;
  color: var(--ns-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 36px);
  font-weight: bold;
}
.intro { margin: 6px 0 0; color: var(--ns-muted); line-height: 1.5; }

.panel {
  width: min(100%, 960px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--ns-white);
  border: 1px solid var(--ns-line);
  box-shadow: var(--ns-shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 22px;
  background: linear-gradient(#f8fafc, #eaf0f5);
  border-bottom: 1px solid var(--ns-line);
}
.panel-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--ns-blue);
  border-radius: 2px;
  font-family: Georgia, serif;
  font-size: 30px;
  line-height: 1;
}
.panel-title h2 { margin: 0; color: var(--ns-blue-dark); font-size: 17px; }
.panel-title p { margin: 4px 0 0; color: var(--ns-muted); font-size: 12px; }

.generator { padding: 22px; }
label { display: block; margin-bottom: 8px; color: var(--ns-blue-dark); font-weight: bold; }
.input-row { display: flex; gap: 10px; }
input[type="number"] {
  width: min(100%, 340px);
  min-width: 0;
  padding: 12px 13px;
  color: var(--ns-text);
  background: white;
  border: 1px solid #9fb1c1;
  border-radius: 2px;
  font: inherit;
}
input[type="number"]:focus {
  outline: 2px solid rgba(111,141,169,.25);
  border-color: var(--ns-blue);
}
button { font: inherit; }
.input-row > button {
  min-height: 42px;
  padding: 10px 18px;
  color: white;
  background: var(--ns-blue-dark);
  border: 1px solid var(--ns-blue-dark);
  border-radius: 2px;
  font-weight: bold;
  cursor: pointer;
  transition: background .15s ease;
}
.input-row > button:hover { background: #2e465d; }
.input-row > button:focus-visible, .code-item:focus-visible { outline: 3px solid #d1a54c; outline-offset: 2px; }
.hint { margin: 10px 0 0; color: var(--ns-muted); font-size: 12px; line-height: 1.5; }

.results { padding: 0 22px 24px; }
.empty-state, .status-message {
  padding: 16px;
  color: var(--ns-muted);
  background: var(--ns-row);
  border: 1px solid #e0e7ed;
  text-align: center;
}
.status-message.error { color: #8b3030; background: #fff5f4; border-color: #e7c5c2; }
.status-message.loading { color: var(--ns-blue-dark); }
.results-heading {
  margin: 0 0 10px;
  padding: 10px 12px;
  color: var(--ns-blue-dark);
  background: var(--ns-pale);
  border-left: 3px solid var(--ns-blue);
  font-weight: bold;
}
.code-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.code-list li { min-width: 0; }
.code-item {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: #25445e;
  background: #f4f6f8;
  border: 1px solid #c5d1dc;
  border-radius: 2px;
  cursor: pointer;
  font-weight: bold;
  overflow-wrap: anywhere;
  transition: background .15s ease, border-color .15s ease;
}
.code-item:hover { background: #e6edf3; border-color: var(--ns-blue); }
.code-item.copied { color: #245b3b; background: #eaf5ed; border-color: #94bea0; }

.site-footer {
  position: fixed;
  right: 14px;
  bottom: 10px;
  padding: 6px 10px;
  color: var(--ns-muted);
  background: rgba(247,249,251,.92);
  border: 1px solid #dce4eb;
  font-size: 11px;
}

@media (max-width: 560px) {
  body { padding: 12px 10px 58px; }
  .site-header { align-items: flex-start; gap: 14px; padding: 14px; }
  .brand { width: 72px; min-height: 52px; padding-right: 12px; }
  .brand img { width: 60px; }
  .eyebrow { letter-spacing: .7px; font-size: 9px; }
  .panel-title, .generator { padding: 15px; }
  .input-row { flex-direction: column; }
  input[type="number"], .input-row > button { width: 100%; }
  .results { padding: 0 15px 16px; }
  .code-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
