/* ec-base.css — Element defaults */

body {
  font-family: var(--ec-font-sans);
  font-size: var(--ec-font-md);
  font-weight: var(--ec-font-normal);
  line-height: var(--ec-leading-relaxed);
  color: var(--ec-text-primary);
  background-color: var(--ec-bg-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--ec-font-bold);
  line-height: var(--ec-leading-tight);
  color: var(--ec-text-primary);
}

h1 {
  font-size: var(--ec-font-3xl);
}

h2 {
  font-size: var(--ec-font-2xl);
}

h3 {
  font-size: var(--ec-font-xl);
}

h4 {
  font-size: var(--ec-font-lg);
}

h5 {
  font-size: var(--ec-font-md);
}

h6 {
  font-size: var(--ec-font-sm);
}

p {
  color: var(--ec-text-secondary);
  margin-bottom: var(--ec-space-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ec-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

strong,
b {
  font-weight: var(--ec-font-bold);
}

em,
i {
  font-style: italic;
}

ul,
ol {
  padding-left: var(--ec-space-6);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  color: var(--ec-text-secondary);
  margin-bottom: var(--ec-space-2);
  line-height: var(--ec-leading-relaxed);
}

img {
  height: auto;
}

input,
select,
textarea,
button {
  font-family: var(--ec-font-sans);
}

:focus-visible {
  outline: 3px solid var(--ec-accent);
  outline-offset: var(--ec-focus-ring-offset);
}

cite {
  font-style: normal;
}

table {
  width: 100%;
}

th,
td {
  padding: var(--ec-space-3) var(--ec-space-4);
  text-align: left;
  color: var(--ec-text-secondary);
  border: 1px solid var(--ec-border);
  font-size: var(--ec-font-sm);
}

th {
  font-weight: var(--ec-font-bold);
  color: var(--ec-text-primary);
  background-color: var(--ec-bg-secondary);
}

caption {
  font-weight: var(--ec-font-bold);
  color: var(--ec-text-primary);
  margin-bottom: var(--ec-space-3);
  text-align: left;
  font-size: var(--ec-font-lg);
}

details {
  border: 1px solid var(--ec-border);
  border-radius: var(--ec-radius-md);
  margin-bottom: var(--ec-space-3);
  background-color: var(--ec-bg-primary);
}

summary {
  padding: var(--ec-space-4) var(--ec-space-5);
  font-weight: var(--ec-font-medium);
  color: var(--ec-text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ec-space-4);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: var(--ec-font-xl);
  font-weight: var(--ec-font-normal);
  color: var(--ec-text-muted);
  flex-shrink: 0;
  line-height: 1;
}

details[open] summary::after {
  content: '−';
}

details[open] summary {
  border-bottom: 1px solid var(--ec-border-light);
}