/* Shared styles for the Backgammon policy and support pages. */
:root {
  --coal: #0B0B0B;
  --card: #151515;
  --line: #262626;
  --text: #F6F3EB;
  --dim: #A9A59C;
  --lime: #C7F000;
  --danger: #FF6B7A;
  --ok: #C7F000;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--coal);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.wordmark {
  color: var(--text);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-decoration: none;
}
.wordmark:hover { color: var(--lime); }
.site-header .back {
  font-size: 15px;
}

/* Main content */
main {
  padding: 32px 0 48px;
}
h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 10px;
}
h3 {
  font-size: 18px;
  margin: 24px 0 6px;
}
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
.lead {
  color: var(--dim);
  margin-bottom: 24px;
}
.meta {
  color: var(--dim);
  font-size: 15px;
}
small, .dim { color: var(--dim); }

a {
  color: var(--lime);
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #1E1E1E;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-word;
}
pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--lime);
  background: var(--card);
  border-radius: 0 10px 10px 0;
}
blockquote > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--dim);
  font-weight: 500;
}

/* Forms */
label {
  display: block;
  font-weight: 500;
  margin: 14px 0 6px;
}
input[type="text"], textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--coal);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 12px;
}
input[type="text"]:focus, textarea:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  border-color: transparent;
}
.btn, button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--coal);
  background: var(--lime);
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  margin-top: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
button.danger {
  background: var(--danger);
  color: var(--coal);
}
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #3A3A3A;
}

.msg { margin-top: 14px; font-weight: 500; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
[hidden] { display: none !important; }

/* Footer */
.pp-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}
.pp-footer img {
  display: block;
  margin: 0 auto 14px;
  height: auto;
  max-width: 100%;
}
.pp-footer p { margin: 0 0 6px; }
.pp-footer nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}
.pp-footer nav a { color: var(--text); text-decoration: none; }
.pp-footer nav a:hover { color: var(--lime); }

/* Inside a game portal: hide the studio mark and the support link. */
html.portal .pp-footer-mark,
html.portal a[href="/support"] { display: none; }

/* Inside the Powell Play app: outside links do nothing. */
html.pp-host a[href^="http"]:not([href*="backgammon.powellplay.com"]) {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
}

@media (min-width: 640px) {
  body { font-size: 18px; }
  h1 { font-size: 42px; }
  main { padding: 48px 0 64px; }
}
