/* Pagine pubbliche dei documenti (firma e testi legali): neutre, senza marchio né risorse esterne. */
:root {
  --accent: #1f4f8f;
  --accent-ink: #ffffff;
  --ink: #1d2330;
  --muted: #5b6475;
  --line: #d7dbe3;
  --surface: #ffffff;
  --page: #f4f5f7;
  --paper: #fcfcfd;
  --danger: #a3261b;
  --ok: #1d6b3a;
  --ok-surface: #eef7f1;
  --warn-surface: #fff8e1;
  --warn-line: #e6cf7a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  font-size: 16px;
}

.shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 600px;
  padding-top: 48px;
}

main {
  flex: 1;
  padding-bottom: 40px;
}

.top {
  background: var(--surface);
  border-top: 6px solid var(--accent);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 24px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 12px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

.paper {
  background: var(--paper);
  max-height: 70vh;
  overflow: auto;
  overflow-wrap: anywhere;
}

.legal.paper {
  max-height: none;
}

.paper h1 {
  font-size: 1.35rem;
}

.paper h2 {
  font-size: 1.1rem;
  margin-top: 24px;
}

.paper h3 {
  font-size: 1rem;
}

.paper blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 4px solid var(--line);
  color: var(--muted);
}

.table {
  overflow-x: auto;
}

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

th,
td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--page);
}

.code,
.meta,
.hash {
  color: var(--muted);
  margin: 0 0 8px;
}

.code {
  font-weight: 600;
}

.hash code {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 14px;
}

.hint {
  font-weight: 400;
  color: var(--muted);
}

input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #8a93a5;
  border-radius: 8px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible,
.paper:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.code-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.code-row label {
  flex: 1;
}

.code-row button {
  margin-bottom: 14px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.check input {
  width: auto;
  margin-top: 4px;
  flex: none;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px;
}

legend {
  font-weight: 600;
  padding: 0 6px;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

button:disabled,
input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.status {
  min-height: 1.5em;
  margin: 12px 0 0;
}

.status.error {
  color: var(--danger);
}

.status.done {
  color: var(--ok);
}

.notice {
  background: var(--warn-surface);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 12px 14px;
}

.done-card {
  background: var(--ok-surface);
  border-color: var(--ok);
}

.files {
  list-style: none;
  padding: 0;
  margin: 0;
}

.files li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.files code {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  color: var(--muted);
}

summary {
  cursor: pointer;
  font-weight: 600;
  margin-top: 16px;
}

.services {
  list-style: none;
  padding: 0;
}

.service {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.bottom {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .code-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  h1 {
    font-size: 1.35rem;
  }

  .card {
    padding: 16px;
  }

  .actions button,
  form > button.primary {
    width: 100%;
  }
}
