main {
  max-width: 700px;
}

table, th, td {
  border: 1px solid #ccc;
  border-collapse: collapse;
  padding: 4px 8px;
}

.label-card,
.profile-section-card {
  display: inline-block;
  border: 1px solid #ccc;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

.label-card.selected,
.profile-section-card.selected {
  border-color: #007bff;
  background-color: #e6f0ff;
}

.label-card-content,
.profile-section-card-content {
  display: inline-block;
}

.label-colon {
  padding-right: 0.1rem;
}

.is-hidden {
  display: none;
}

section#charts {
  margin-bottom: 1rem;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
}

#typing-table {
  width: 100%;
}
#typing-table th:nth-child(1) {  /* Label */
  width: 9rem;
}
#typing-table th:nth-child(2) {  /* Core */
  min-width: 9rem;
}
#typing-table th:nth-child(3) {  /* Date */
  max-width: 6.5rem;
}

#profile-section-card-container,
#label-card-container,
#referral-wrapper {
  text-align: center;
  padding-bottom: 0.5rem;
}


.referral {
  font-style: italic;
}

button.action-btn {
  margin-right: 4px;
  font-size: 0.9rem;
  align-items: center;
  background-clip: padding-box;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  padding: 0.2rem 0.7rem 0.3rem;
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: auto;
}
button.action-btn:hover,
button.action-btn:focus {
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}
button.action-btn:hover {
  transform: translateY(-1px);
}
button.action-btn:active {
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  transform: translateY(0);
}

button.btn-edit        { background-color: hsl(220 60 50); }
button.btn-edit:hover,
button.btn-edit:focus  { background-color: hsl(220 60 60); }
button.btn-edit:active { background-color: hsl(220 60 40);
}
button.btn-move        { font-weight: 1000;
                         background-color: hsl(215 60 50); }
button.btn-move:hover,
button.btn-move:focus  { background-color: hsl(215 60 60); }
button.btn-move:active { background-color: hsl(215 60 40);
}

button.btn-save        { background-color: hsl(120 50 50); }
button.btn-save:hover,
button.btn-save:focus  { background-color: hsl(120 50 60); }
button.btn-save:active { background-color: hsl(120 50 40);
}
button.btn-abort        { background-color: hsl(0 0 60); }
button.btn-abort:hover,
button.btn-abort:focus  { background-color: hsl(0 0 70); }
button.btn-abort:active { background-color: hsl(0 0 50);
}
button.btn-delete        { background-color: hsl(350 60 50); }
button.btn-delete:hover,
button.btn-delete:focus  { background-color: hsl(350 60 60); }
button.btn-delete:active { background-color: hsl(350 60 40);
}

button.btn-add        { background-color: hsl(215 60 50); }
button.btn-add:hover,
button.btn-add:focus  { background-color: hsl(215 60 60); }
button.btn-add:active { background-color: hsl(215 60 40);
}

button.action-btn:disabled {
  background-color: lightgray;
}
button.action-btn:disabled:hover,
button.action-btn:disabled:focus,
button.action-btn:disabled:active {
  transform: none;
  box-shadow: none;
}


/* *********************************** */
/* *** TYPOGRAPHY ******************** */
/* *********************************** */

:root {
  --h0-size: 2.2rem;
  --h1-size: 1.8rem;
  --h2-size: 1.5rem;
  --h2-3-size: 1.4rem;
  --h3-size: 1.25rem;
  --h4-size: 1.1rem;
  --h5-size: 1rem;
  --h6-size: 0.95rem;
}

html {
  font-size: 100%; /* 16px default */
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #111;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}
h1 {
  font-size: var(--h1-size);
  margin-bottom: 0.75rem;
}
h2 {
  font-size: var(--h2-size);
  margin-bottom: 0.6rem;
}
h3 {
  font-size: var(--h3-size);
  margin-bottom: 0.5rem;
}
h4 {
  font-size: var(--h4-size);
  margin-bottom: 0.4rem;
}
h5 {
  font-size: var(--h5-size);
  margin-bottom: 0.3rem;
}
h6 {
  font-size: var(--h6-size);
  margin-bottom: 0.2rem;
}
.page-title h1,
.page-title h2 {
  margin-bottom: 0;
  /* bottom margin only on big screen */
}

p {
  margin-bottom: 0.75rem;
}

.kaomoji {
  white-space: nowrap;
}

.plus-sign-visual {
  font-size: var(--h0-size);
}

em,
h2#subtitle {
  font-style: italic;
}

th {
  font-size: var(--h5-size);
  font-weight: bold;
}

#view-stage1 h4,
#view-stage1 h5 {
  margin-top: 0.7rem;
}
#view-stage2 h4 {
  margin-top: 0.9rem;
}
#view-stage2 h5 {
  margin-top: 0.8rem;
}
#view-stage2 p {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Slightly larger on wider screens */
@media (min-width: 700px) {
  h1 { font-size: var(--h0-size); }
  h2 { font-size: var(--h1-size); }
  h3 { font-size: var(--h2-3-size); }
}
@media (min-width: 1000px) {
  .app-view hgroup h3 {
    font-size: var(--h2-size);
  }
  .app-view hgroup p {
    font-size: var(--h5-size);
  }
}
