:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #10233f;
  background: #eef3f8;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #ffffff 0, transparent 35%),
    #eef3f8;
}

button,
select {
  font: inherit;
}

body.is-capturing .header-actions {
  visibility: hidden;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #63748a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #10233f;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.header-content {
  flex: 1;
  min-width: 0;
}

.investment-field {
  display: block;
  max-width: 620px;
  margin-top: 22px;
}

.investment-label {
  display: block;
  margin-bottom: 7px;
  color: #68798f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#investment-name {
  width: 100%;
  padding: 4px 0 9px;
  border: 0;
  border-bottom: 1px solid #bcc9d6;
  border-radius: 0;
  outline: none;
  color: #17304d;
  background: transparent;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 650;
  line-height: 1.35;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

#investment-name::placeholder {
  color: #98a6b5;
  font-weight: 500;
}

#investment-name:hover {
  border-bottom-color: #8ea2b6;
}

#investment-name:focus {
  border-bottom-color: #2f6fa5;
  box-shadow: 0 2px 0 rgba(47, 111, 165, 0.12);
}

.secondary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #c9d4df;
  border-radius: 12px;
  color: #23374f;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #17365d;
  border-radius: 12px;
  color: #ffffff;
  background: #17365d;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #214979;
  box-shadow: 0 8px 20px rgba(23, 54, 93, 0.18);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}
.secondary-button:hover {
  transform: translateY(-1px);
  border-color: #9fb0c3;
  box-shadow: 0 8px 20px rgba(32, 58, 86, 0.08);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  display: grid;
  grid-template-rows: auto 1.2rem 1fr;
  align-items: start;

  min-height: 130px;
  padding: 18px;
  border: 1px solid rgba(203, 214, 225, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(21, 45, 74, 0.06);
}

.summary-label {
  display: block;
  margin: 0;
  color: #68798f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card strong {
  align-self: end;
  margin-top: 8px;
  color: #122944;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.summary-card-emphasis {
  border: 2px solid rgba(77, 213, 173, 0.45);

  background:
    linear-gradient(
      135deg,
     rgba(236, 255, 248, 0.98),
     rgba(255, 255, 255, 0.98)
    );

  box-shadow:
    0 12px 30px rgba(77, 213, 173, 0.12);

}

.summary-subtitle {
  display: block;
  margin: 4px 0 0;
  color: #7a899d;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.summary-label sup,

.voting-note sup {
  font-size: 0.65em;
  vertical-align: super;
}

.voting-note {
  margin: -2px 2px 18px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.table-panel {
  overflow: hidden;
  border: 1px solid rgba(195, 207, 220, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(24, 48, 77, 0.08);
}

.table-header,
.vote-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 160px 190px;
  align-items: center;
}

.table-header {
  min-height: 52px;
  padding: 0 18px;
  color: #f5f8fb;
  background: #17365d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-header span:nth-child(2),
.table-header span:nth-child(3) {
  text-align: right;
}

.vote-row {
  min-height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid #e4eaf0;
  transition: background 150ms ease;
}

.vote-row:last-child {
  border-bottom: 0;
}

.vote-row:hover {
  background: #f8fafc;
}

.constituency-cell {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.constituency-code {
  flex: 0 0 auto;
  color: #7c8ba0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.constituency-cell strong {
  overflow: hidden;
  color: #18304c;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voting-power-cell {
  text-align: right;
  color: #334b66;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.position-cell {
  display: flex;
  justify-content: flex-end;
}

.position-select {
  width: 148px;
  min-height: 34px;
  padding: 0 38px 0 14px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
  font-weight: 800;
  cursor: pointer;
  appearance: none;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.position-select:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 54, 81, 0.14);
}

.position-support {
  background-color: #4DD5AD;
}

.position-comment {
  background-color: #6f5bd3;
}

.position-abstain {
  background-color: #4E5791;
}

.position-object {
  background-color: #F122AF;
}

.position-select option {
  color: #172c45;
  background: #ffffff;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding: 24px 0 40px;
  }

  .app-header {
    align-items: flex-start;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-header {
    display: none;
  }

  .vote-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }

  .constituency-cell {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .voting-power-cell {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .position-cell {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .position-select {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .app-header {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }
  .header-actions {
    width: 100%;
  }

  .header-actions button {
    flex: 1;
  }
  .summary-card {
    min-height: 92px;
    padding: 15px;
  }
  .investment-field {
    width: 100%;
  }
}
.data-date {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.data-date strong {
  color: #24364d;
  font-weight: 700;
}