html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  background: #fff;
  color: #000;
  font-family: "Geist", Helvetica, Arial, sans-serif;
  margin: 0;
}

html[data-theme="dark"] body {
  background: #111;
  color: #c8c8c8;
}

section[id] {
  scroll-margin-top: 56px;
}

.section-divider {
  border: none;
  border-top: 1px solid #CBD1D9;
  margin: 16px 0;
}

html[data-theme="dark"] .section-divider {
  border-top-color: #3a3a3a;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border-bottom: 2px solid #000;
  padding: 0 max(15px, calc((100% - 700px) / 2));
}

html[data-theme="dark"] nav {
  background: #111;
  border-bottom-color: #c8c8c8;
}

nav strong {
  font-family: "Fraunces", Georgia, serif;
  margin-right: 5px;
}

nav a {
  color: #000;
  margin-right: 0;
}

html[data-theme="dark"] nav a {
  color: #c8c8c8;
}

nav .nav-controls {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

nav .lang-selector a {
  margin-right: 0;
}

nav .lang-selector a.active {
  font-weight: bold;
  text-decoration: none;
}

.theme-toggle {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #000;
  box-shadow: 2px 2px 0px #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
}

html[data-theme="dark"] .theme-toggle {
  background: #111;
  border-color: #c8c8c8;
  color: #c8c8c8;
  box-shadow: 2px 2px 0px #c8c8c8;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (max-width: 640px) {
  nav .lang-sep {
    display: none;
  }

  nav .lang-selector a.active {
    display: none;
  }
}

p {
  line-height: 1.4rem;
}

ol li, ul li {
  margin-bottom: 8px;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
}

button {
  background: #fff;
  border: 1px solid #000000;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  padding: 4px 12px;
  color: inherit;
}

html[data-theme="dark"] button {
  background: #111;
  border-color: #c8c8c8;
}

main {
  max-width: 700px;
  padding: 15px;
  margin: 0 auto;
}

.card {
  border: 2px solid #cbd1d9;
  border-radius: 8px;
  box-shadow: 2px 2px 0px #cbd1d9;
  padding: 16px;
  margin: 15px 0;
}

html[data-theme="dark"] .card {
  border-color: #4a4a4a;
  box-shadow: 2px 2px 0px #4a4a4a;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.card p {
  margin: 0;
}

.card .example {
  margin-top: 8px;
  font-style: italic;
  font-family: "Fraunces", Georgia, serif;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.principle-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-width: 0;
}

.principle-number {
  position: absolute;
  top: -0.15em;
  right: 0.1em;
  z-index: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 5.5rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  color: #e4e8ed;
  pointer-events: none;
  user-select: none;
}

html[data-theme="dark"] .principle-number {
  color: #2a2a2a;
}

.principle-card p {
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .principles-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feeling-quotes {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.feeling-quote {
  border-left: 2px solid #cbd1d9;
  padding-left: 16px;
  margin-bottom: 16px;
}

.feeling-quote:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .feeling-quote {
  border-left-color: #4a4a4a;
}

.feeling-quote-text {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.4rem;
}

.feeling-quote-feeling {
  margin: 8px 0 0;
  font-family: "Geist", Helvetica, Arial, sans-serif;
  line-height: 1.4rem;
}

.closing {
  font-size: 20px;
  font-weight: bold;
  background: #F1FFA6;
  display: inline;
}

html[data-theme="dark"] .closing {
  background: #4a5815;
}

#support {
  margin: 12px 0 0;
}

#support-btn {
  padding: 6px 12px;
  border: 2px solid #000;
  border-radius: 4px;
  background: #F1FFA6;
  color: #000;
  box-shadow: 2px 2px 0px black;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  vertical-align: middle;
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

html[data-theme="dark"] #support-btn {
  background: #4a5815;
  border-color: #c8c8c8;
  color: #c8c8c8;
  box-shadow: 2px 2px 0px #c8c8c8;
}

#support-btn:hover {
  background: #d4e84a;
}

html[data-theme="dark"] #support-btn:hover {
  background: #7a9224;
}

#support-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

#support-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

#share {
  margin-bottom: 24px;
}

.share-actions {
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#share-btn {
  padding: 6px 12px;
  border: 2px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  box-shadow: 2px 2px 0px black;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  vertical-align: middle;
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

html[data-theme="dark"] #share-btn {
  background: #111;
  border-color: #c8c8c8;
  color: #c8c8c8;
  box-shadow: 2px 2px 0px #c8c8c8;
}

#share-btn:hover {
  background: #f5f5f5;
}

html[data-theme="dark"] #share-btn:hover {
  background: #1a1a1a;
}

#share-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

#share-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.share-feedback {
  font-size: 14px;
  opacity: 0.7;
}

html[data-lang="pt"] .en { display: none; }
html[data-lang="en"] .pt { display: none; }
